From 8cb74eacb3c1a8658d8ec231e339c827c5b1d6e4 Mon Sep 17 00:00:00 2001 From: Ross Rhodes Date: Sun, 18 Oct 2020 00:13:21 +0100 Subject: [PATCH 001/314] feat(ecs): environment files for containers in EC2 task definitions --- packages/@aws-cdk/aws-ecs/README.md | 10 +- .../aws-ecs/lib/container-definition.ts | 47 +- .../@aws-cdk/aws-ecs/lib/environment-file.ts | 128 ++ packages/@aws-cdk/aws-ecs/lib/index.ts | 1 + packages/@aws-cdk/aws-ecs/package.json | 9 +- .../test/demo-envfiles/test-envfile.env | 1 + .../ec2/integ.environment-file.expected.json | 1328 +++++++++++++++++ .../test/ec2/integ.environment-file.ts | 73 + .../test/ec2/test.ec2-task-definition.ts | 42 + .../aws-ecs/test/test.container-definition.ts | 163 ++ .../aws-ecs/test/test.environment-file.ts | 59 + packages/@aws-cdk/aws-s3-assets/lib/asset.ts | 8 + .../@aws-cdk/aws-s3-assets/test/asset.test.ts | 18 + 13 files changed, 1882 insertions(+), 5 deletions(-) create mode 100644 packages/@aws-cdk/aws-ecs/lib/environment-file.ts create mode 100644 packages/@aws-cdk/aws-ecs/test/demo-envfiles/test-envfile.env create mode 100644 packages/@aws-cdk/aws-ecs/test/ec2/integ.environment-file.expected.json create mode 100644 packages/@aws-cdk/aws-ecs/test/ec2/integ.environment-file.ts create mode 100644 packages/@aws-cdk/aws-ecs/test/test.environment-file.ts diff --git a/packages/@aws-cdk/aws-ecs/README.md b/packages/@aws-cdk/aws-ecs/README.md index d63f9974cc76c..bac4f59c7881a 100644 --- a/packages/@aws-cdk/aws-ecs/README.md +++ b/packages/@aws-cdk/aws-ecs/README.md @@ -287,7 +287,7 @@ obtained from either DockerHub or from ECR repositories, or built directly from ### Environment variables -To pass environment variables to the container, use the `environment` and `secrets` props. +To pass environment variables to the container, you can use the `environment`, `environmentFiles`, and `secrets` props. ```ts taskDefinition.addContainer('container', { @@ -296,6 +296,10 @@ taskDefinition.addContainer('container', { environment: { // clear text, not for sensitive data STAGE: 'prod', }, + environmentFiles: [ // list of environment files hosted either on local disk or S3 + ecs.EnvironmentFile.fromAsset('./demo-env-file.env'), + ecs.EnvironmentFile.fromBucket(s3Bucket, 'assets/demo-env-file.env'), + ], secrets: { // Retrieved from AWS Secrets Manager or AWS Systems Manager Parameter Store at container start-up. SECRET: ecs.Secret.fromSecretsManager(secret), DB_PASSWORD: ecs.Secret.fromSecretsManager(dbSecret, 'password'), // Reference a specific JSON field @@ -304,7 +308,9 @@ taskDefinition.addContainer('container', { }); ``` -The task execution role is automatically granted read permissions on the secrets/parameters. +The task execution role is automatically granted read permissions on the secrets/parameters. Support for environment +files is restricted to the EC2 launch type for files hosted on S3. Further details provided in the AWS documentation +about [specifying environment variables](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html). ## Service diff --git a/packages/@aws-cdk/aws-ecs/lib/container-definition.ts b/packages/@aws-cdk/aws-ecs/lib/container-definition.ts index 93fa347799d38..6ca479c2911ce 100644 --- a/packages/@aws-cdk/aws-ecs/lib/container-definition.ts +++ b/packages/@aws-cdk/aws-ecs/lib/container-definition.ts @@ -6,6 +6,7 @@ import { Construct } from 'constructs'; import { NetworkMode, TaskDefinition } from './base/task-definition'; import { ContainerImage, ContainerImageConfig } from './container-image'; import { CfnTaskDefinition } from './ecs.generated'; +import { EnvironmentFile, EnvironmentFileConfig } from './environment-file'; import { LinuxParameters } from './linux-parameters'; import { LogDriver, LogDriverConfig } from './log-drivers/log-driver'; @@ -141,6 +142,15 @@ export interface ContainerDefinitionOptions { */ readonly environment?: { [key: string]: string }; + /** + * The environment files to pass to the container. + * + * @see https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html + * + * @default - No environment files. + */ + readonly environmentFiles?: EnvironmentFile[]; + /** * The secret environment variables to pass to the container. * @@ -350,6 +360,11 @@ export class ContainerDefinition extends cdk.Construct { */ public readonly taskDefinition: TaskDefinition; + /** + * The environment files for this container + */ + public readonly environmentFiles?: EnvironmentFileConfig[]; + /** * The log configuration specification for the container. */ @@ -399,6 +414,18 @@ export class ContainerDefinition extends cdk.Construct { }); } } + + if (this.taskDefinition.isFargateCompatible && props.environmentFiles) { + throw new Error(`Cannot specify environment files for a task using the FARGATE launch type in container '${this.node.id}'.`); + } + + if (props.environmentFiles) { + this.environmentFiles = []; + + for (const environmentFile of props.environmentFiles) { + this.environmentFiles.push(environmentFile.bind(this)); + } + } } /** @@ -581,6 +608,7 @@ export class ContainerDefinition extends cdk.Construct { workingDirectory: this.props.workingDirectory, logConfiguration: this.logDriverConfig, environment: this.props.environment && renderKV(this.props.environment, 'name', 'value'), + environmentFiles: this.environmentFiles && renderEnvironmentFiles(this.environmentFiles), secrets: this.secrets, extraHosts: this.props.extraHosts && renderKV(this.props.extraHosts, 'hostname', 'ipAddress'), healthCheck: this.props.healthCheck && renderHealthCheck(this.props.healthCheck), @@ -643,13 +671,30 @@ export interface HealthCheck { } function renderKV(env: { [key: string]: string }, keyName: string, valueName: string): any[] { - const ret = new Array(); + const ret = []; for (const [key, value] of Object.entries(env)) { ret.push({ [keyName]: key, [valueName]: value }); } return ret; } +function renderEnvironmentFiles(environmentFiles: EnvironmentFileConfig[]): any[] { + const ret = []; + for (const environmentFile of environmentFiles) { + const s3Location = environmentFile.s3Location; + + if (!s3Location) { + throw Error('Environment file must specify an S3 location'); + } + + ret.push({ + type: environmentFile.fileType, + value: `arn:aws:s3:::${s3Location.bucketName}/${s3Location.objectKey}`, + }); + } + return ret; +} + function renderHealthCheck(hc: HealthCheck): CfnTaskDefinition.HealthCheckProperty { return { command: getHealthCheckCommand(hc), diff --git a/packages/@aws-cdk/aws-ecs/lib/environment-file.ts b/packages/@aws-cdk/aws-ecs/lib/environment-file.ts new file mode 100644 index 0000000000000..fee1dabf18562 --- /dev/null +++ b/packages/@aws-cdk/aws-ecs/lib/environment-file.ts @@ -0,0 +1,128 @@ +import { IBucket, Location } from '@aws-cdk/aws-s3'; +import { Asset, AssetOptions } from '@aws-cdk/aws-s3-assets'; +import { Construct } from '@aws-cdk/core'; + +/** + * Constructs for types of environment filess + */ +export abstract class EnvironmentFile { + /** + * Loads the environment file from a local disk path. + * + * @param path Local disk path + * @param options + */ + public static fromAsset(path: string, options?: AssetOptions): AssetEnvironmentFile { + return new AssetEnvironmentFile(path, options); + } + + /** + * Loads the environment file from an S3 bucket. + * + * @returns `S3EnvironmentFile` associated with the specified S3 object. + * @param bucket The S3 bucket + * @param key The object key + * @param objectVersion Optional S3 object version + */ + public static fromBucket(bucket: IBucket, key: string, objectVersion?: string): S3EnvironmentFile { + return new S3EnvironmentFile(bucket, key, objectVersion); + } + + /** + * Called when the container is initialized to allow this object to bind + * to the stack. + * + * @param scope The binding scope + */ + public abstract bind(scope: Construct): EnvironmentFileConfig; +} + +/** + * Environment file from a local directory. + */ +export class AssetEnvironmentFile extends EnvironmentFile { + private asset?: Asset; + + /** + * @param path The path to the asset file or directory. + * @param options + */ + constructor(public readonly path: string, private readonly options: AssetOptions = { }) { + super(); + } + + public bind(scope: Construct): EnvironmentFileConfig { + // If the same AssetCode is used multiple times, retain only the first instantiation. + if (!this.asset) { + this.asset = new Asset(scope, 'EnvironmentFile', { + path: this.path, + ...this.options, + }); + } + + if (!this.asset.isFile) { + throw new Error(`Asset must be a single file (${this.path})`); + } + + return { + fileType: EnvironmentFileType.S3, + s3Location: { + bucketName: this.asset.s3BucketName, + objectKey: this.asset.s3ObjectKey, + }, + }; + } +} + +/** + * Environment file from S3. + */ +export class S3EnvironmentFile extends EnvironmentFile { + private readonly bucketName: string; + + constructor(bucket: IBucket, private key: string, private objectVersion?: string) { + super(); + + if (!bucket.bucketName) { + throw new Error('bucketName is undefined for the provided bucket'); + } + + this.bucketName = bucket.bucketName; + } + + public bind(_scope: Construct): EnvironmentFileConfig { + return { + fileType: EnvironmentFileType.S3, + s3Location: { + bucketName: this.bucketName, + objectKey: this.key, + objectVersion: this.objectVersion, + }, + }; + } +} + +/** + * Configuration for the environment file + */ +export interface EnvironmentFileConfig { + /** + * The type of environment file + */ + readonly fileType: EnvironmentFileType; + + /** + * The location of the environment file in S3 + */ + readonly s3Location: Location; +} + +/** + * Type of environment file to be included in the container definition + */ +export enum EnvironmentFileType { + /** + * Environment file hosted on S3, referenced by object ARN + */ + S3 = 's3', +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/lib/index.ts b/packages/@aws-cdk/aws-ecs/lib/index.ts index 688c2c9c0004c..6c6ebd10bd3c6 100644 --- a/packages/@aws-cdk/aws-ecs/lib/index.ts +++ b/packages/@aws-cdk/aws-ecs/lib/index.ts @@ -5,6 +5,7 @@ export * from './base/task-definition'; export * from './container-definition'; export * from './container-image'; export * from './cluster'; +export * from './environment-file'; export * from './firelens-log-router'; export * from './placement'; diff --git a/packages/@aws-cdk/aws-ecs/package.json b/packages/@aws-cdk/aws-ecs/package.json index c3d6d784e8364..7f8bf84532dc6 100644 --- a/packages/@aws-cdk/aws-ecs/package.json +++ b/packages/@aws-cdk/aws-ecs/package.json @@ -71,7 +71,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "@aws-cdk/aws-s3-assets": "0.0.0", + "@aws-cdk/aws-s3-deployment": "0.0.0", "@types/nodeunit": "^0.0.31", "@types/proxyquire": "^1.3.28", "cdk-build-tools": "0.0.0", @@ -98,6 +98,8 @@ "@aws-cdk/aws-logs": "0.0.0", "@aws-cdk/aws-route53": "0.0.0", "@aws-cdk/aws-route53-targets": "0.0.0", + "@aws-cdk/aws-s3": "0.0.0", + "@aws-cdk/aws-s3-assets": "0.0.0", "@aws-cdk/aws-secretsmanager": "0.0.0", "@aws-cdk/aws-servicediscovery": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", @@ -109,6 +111,7 @@ }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { + "@aws-cdk/assets": "0.0.0", "@aws-cdk/aws-applicationautoscaling": "0.0.0", "@aws-cdk/aws-autoscaling": "0.0.0", "@aws-cdk/aws-autoscaling-hooktargets": "0.0.0", @@ -132,7 +135,9 @@ "@aws-cdk/aws-ssm": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/cx-api": "0.0.0", - "constructs": "^3.0.4" + "constructs": "^3.0.4", + "@aws-cdk/aws-s3": "0.0.0", + "@aws-cdk/aws-s3-assets": "0.0.0" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-ecs/test/demo-envfiles/test-envfile.env b/packages/@aws-cdk/aws-ecs/test/demo-envfiles/test-envfile.env new file mode 100644 index 0000000000000..1566bb1d76a71 --- /dev/null +++ b/packages/@aws-cdk/aws-ecs/test/demo-envfiles/test-envfile.env @@ -0,0 +1 @@ +FOO=bar \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/integ.environment-file.expected.json b/packages/@aws-cdk/aws-ecs/test/ec2/integ.environment-file.expected.json new file mode 100644 index 0000000000000..0c611b4879869 --- /dev/null +++ b/packages/@aws-cdk/aws-ecs/test/ec2/integ.environment-file.expected.json @@ -0,0 +1,1328 @@ +{ + "Resources": { + "Bucket83908E77": { + "Type": "AWS::S3::Bucket", + "Properties": { + "PublicAccessBlockConfiguration": { + "BlockPublicAcls": true, + "BlockPublicPolicy": true, + "IgnorePublicAcls": true, + "RestrictPublicBuckets": true + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "Vpc8378EB38": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc" + } + ] + } + }, + "VpcPublicSubnet1Subnet5C2D37C4": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.0.0/18", + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": "test-region-1a", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1RouteTable6C95E38E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1RouteTableAssociation97140677": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + } + } + }, + "VpcPublicSubnet1DefaultRoute3DA9E72A": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPublicSubnet1EIPD7E02669": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1NATGateway4D7517AA": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet1EIPD7E02669", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet2Subnet691E08A3": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.64.0/18", + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": "test-region-1b", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet2RouteTable94F7E489": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet2RouteTableAssociationDD5762D8": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + } + } + }, + "VpcPublicSubnet2DefaultRoute97F91067": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPublicSubnet2EIP3C605A87": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet2NATGateway9182C01D": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet2EIP3C605A87", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPrivateSubnet1Subnet536B997A": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.128.0/18", + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": "test-region-1a", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" + } + ] + } + }, + "VpcPrivateSubnet1RouteTableB2C5B500": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" + } + ] + } + }, + "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + } + } + }, + "VpcPrivateSubnet1DefaultRouteBE02A9ED": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + } + } + }, + "VpcPrivateSubnet2Subnet3788AAA1": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.192.0/18", + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": "test-region-1b", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" + } + ] + } + }, + "VpcPrivateSubnet2RouteTableA678073B": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" + } + ] + } + }, + "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + } + }, + "VpcPrivateSubnet2DefaultRoute060D2087": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet2NATGateway9182C01D" + } + } + }, + "VpcIGWD7BA715C": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc" + } + ] + } + }, + "VpcVPCGWBF912B6E": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "InternetGatewayId": { + "Ref": "VpcIGWD7BA715C" + } + } + }, + "EcsCluster97242B84": { + "Type": "AWS::ECS::Cluster" + }, + "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroup912E1231": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/InstanceSecurityGroup", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": { + "Fn::Join": [ + "", + [ + "ec2.", + { + "Ref": "AWS::URLSuffix" + } + ] + ] + } + } + } + ], + "Version": "2012-10-17" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DeregisterContainerInstance", + "ecs:RegisterContainerInstance", + "ecs:Submit*" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + }, + { + "Action": [ + "ecs:Poll", + "ecs:StartTelemetrySession" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": [ + "ecs:DiscoverPollEndpoint", + "ecr:GetAuthorizationToken", + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupInstanceProfile2CE606B3": { + "Type": "AWS::IAM::InstanceProfile", + "Properties": { + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupLaunchConfigB7E376C1": { + "Type": "AWS::AutoScaling::LaunchConfiguration", + "Properties": { + "ImageId": { + "Ref": "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" + }, + "InstanceType": "t2.micro", + "IamInstanceProfile": { + "Ref": "EcsClusterDefaultAutoScalingGroupInstanceProfile2CE606B3" + }, + "SecurityGroups": [ + { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroup912E1231", + "GroupId" + ] + } + ], + "UserData": { + "Fn::Base64": { + "Fn::Join": [ + "", + [ + "#!/bin/bash\necho ECS_CLUSTER=", + { + "Ref": "EcsCluster97242B84" + }, + " >> /etc/ecs/ecs.config\nsudo iptables --insert FORWARD 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP\nsudo service iptables save\necho ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config" + ] + ] + } + } + }, + "DependsOn": [ + "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80", + "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" + ] + }, + "EcsClusterDefaultAutoScalingGroupASGC1A785DB": { + "Type": "AWS::AutoScaling::AutoScalingGroup", + "Properties": { + "MaxSize": "1", + "MinSize": "1", + "LaunchConfigurationName": { + "Ref": "EcsClusterDefaultAutoScalingGroupLaunchConfigB7E376C1" + }, + "Tags": [ + { + "Key": "Name", + "PropagateAtLaunch": true, + "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" + } + ], + "VPCZoneIdentifier": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + ] + }, + "UpdatePolicy": { + "AutoScalingReplacingUpdate": { + "WillReplace": true + }, + "AutoScalingScheduledAction": { + "IgnoreUnmodifiedGroupSizeProperties": true + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ], + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeInstances", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeHosts" + ], + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" + } + ] + ] + } + }, + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + }, + { + "Action": [ + "ecs:UpdateContainerInstancesState", + "ecs:ListTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(event))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(event))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n while has_tasks(cluster, instance_arn):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\n\ndef has_tasks(cluster, instance_arn):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n tasks = instance['runningTasksCount'] + instance['pendingTasksCount']\n print('Instance %s has %s tasks' % (instance_arn, tasks))\n\n return tasks > 0\n\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", + "Arn" + ] + }, + "Runtime": "python3.6", + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "EcsCluster97242B84" + } + } + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + ] + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic7A89925AFDCBEE50": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Protocol": "lambda", + "TopicArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + }, + "Endpoint": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + } + } + }, + "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "autoscaling.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "sns:Publish", + "Effect": "Allow", + "Resource": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4": { + "Type": "AWS::SNS::Topic", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookFFA63029": { + "Type": "AWS::AutoScaling::LifecycleHook", + "Properties": { + "AutoScalingGroupName": { + "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" + }, + "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", + "DefaultResult": "CONTINUE", + "HeartbeatTimeout": 300, + "NotificationTargetARN": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + }, + "RoleARN": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B", + "Arn" + ] + } + }, + "DependsOn": [ + "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88", + "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B" + ] + }, + "ExecutionRole605A040B": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ecs-tasks.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Policies": [ + { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetBucketLocation", + "s3:GetObject" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "s3Policy" + } + ] + } + }, + "TaskDefinitionTaskRoleFD40A61D": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ecs-tasks.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "TaskDefinitionB36D86D9": { + "Type": "AWS::ECS::TaskDefinition", + "Properties": { + "ContainerDefinitions": [ + { + "EnvironmentFiles": [ + { + "Type": "s3", + "Value": { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3Bucket7B2069B7" + }, + "/", + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3VersionKey40E12C15" + } + ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3VersionKey40E12C15" + } + ] + } + ] + } + ] + ] + } + }, + { + "Type": "s3", + "Value": { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "Bucket83908E77" + }, + "/test-envfile.env" + ] + ] + } + } + ], + "Essential": true, + "Image": "amazon/amazon-ecs-sample", + "Memory": 256, + "Name": "Container" + } + ], + "ExecutionRoleArn": { + "Fn::GetAtt": [ + "ExecutionRole605A040B", + "Arn" + ] + }, + "Family": "awsecsintegTaskDefinition11DF163D", + "NetworkMode": "awsvpc", + "RequiresCompatibilities": [ + "EC2" + ], + "TaskRoleArn": { + "Fn::GetAtt": [ + "TaskDefinitionTaskRoleFD40A61D", + "Arn" + ] + } + } + }, + "EnvFileDeploymentCustomResourceDBE78DE4": { + "Type": "Custom::CDKBucketDeployment", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C81C01536", + "Arn" + ] + }, + "SourceBucketNames": [ + { + "Ref": "AssetParameters972240f9dd6e036a93d5f081af9a24315b2053828ac049b3b19b2fa12d7ae64aS3Bucket1F1A8472" + } + ], + "SourceObjectKeys": [ + { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParameters972240f9dd6e036a93d5f081af9a24315b2053828ac049b3b19b2fa12d7ae64aS3VersionKeyBC7CFB0C" + } + ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParameters972240f9dd6e036a93d5f081af9a24315b2053828ac049b3b19b2fa12d7ae64aS3VersionKeyBC7CFB0C" + } + ] + } + ] + } + ] + ] + } + ], + "DestinationBucketName": { + "Ref": "Bucket83908E77" + }, + "RetainOnDelete": false, + "Prune": true + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ] + } + }, + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRoleDefaultPolicy88902FDF": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetObject*", + "s3:GetBucket*", + "s3:List*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::", + { + "Ref": "AssetParameters972240f9dd6e036a93d5f081af9a24315b2053828ac049b3b19b2fa12d7ae64aS3Bucket1F1A8472" + } + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::", + { + "Ref": "AssetParameters972240f9dd6e036a93d5f081af9a24315b2053828ac049b3b19b2fa12d7ae64aS3Bucket1F1A8472" + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "s3:GetObject*", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + "s3:PutObject*", + "s3:Abort*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "Bucket83908E77", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "Bucket83908E77", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRoleDefaultPolicy88902FDF", + "Roles": [ + { + "Ref": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265" + } + ] + } + }, + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C81C01536": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Ref": "AssetParametersc9ac4b3b65f3510a2088b7fd003de23d2aefac424025eb168725ce6769e3c176S3Bucket77147E20" + }, + "S3Key": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParametersc9ac4b3b65f3510a2088b7fd003de23d2aefac424025eb168725ce6769e3c176S3VersionKey4253216F" + } + ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParametersc9ac4b3b65f3510a2088b7fd003de23d2aefac424025eb168725ce6769e3c176S3VersionKey4253216F" + } + ] + } + ] + } + ] + ] + } + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265", + "Arn" + ] + }, + "Runtime": "python3.6", + "Timeout": 900 + }, + "DependsOn": [ + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRoleDefaultPolicy88902FDF", + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265" + ] + }, + "ServiceD69D759B": { + "Type": "AWS::ECS::Service", + "Properties": { + "Cluster": { + "Ref": "EcsCluster97242B84" + }, + "DeploymentConfiguration": { + "MaximumPercent": 200, + "MinimumHealthyPercent": 50 + }, + "DesiredCount": 1, + "EnableECSManagedTags": false, + "LaunchType": "EC2", + "NetworkConfiguration": { + "AwsvpcConfiguration": { + "AssignPublicIp": "DISABLED", + "SecurityGroups": [ + { + "Fn::GetAtt": [ + "ServiceSecurityGroupC96ED6A7", + "GroupId" + ] + } + ], + "Subnets": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + ] + } + }, + "SchedulingStrategy": "REPLICA", + "TaskDefinition": { + "Ref": "TaskDefinitionB36D86D9" + } + } + }, + "ServiceSecurityGroupC96ED6A7": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "aws-ecs-integ/Service/SecurityGroup", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + } + }, + "Parameters": { + "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id" + }, + "AssetParametersc9ac4b3b65f3510a2088b7fd003de23d2aefac424025eb168725ce6769e3c176S3Bucket77147E20": { + "Type": "String", + "Description": "S3 bucket for asset \"c9ac4b3b65f3510a2088b7fd003de23d2aefac424025eb168725ce6769e3c176\"" + }, + "AssetParametersc9ac4b3b65f3510a2088b7fd003de23d2aefac424025eb168725ce6769e3c176S3VersionKey4253216F": { + "Type": "String", + "Description": "S3 key for asset version \"c9ac4b3b65f3510a2088b7fd003de23d2aefac424025eb168725ce6769e3c176\"" + }, + "AssetParametersc9ac4b3b65f3510a2088b7fd003de23d2aefac424025eb168725ce6769e3c176ArtifactHash4E343C6C": { + "Type": "String", + "Description": "Artifact hash for asset \"c9ac4b3b65f3510a2088b7fd003de23d2aefac424025eb168725ce6769e3c176\"" + }, + "AssetParameters972240f9dd6e036a93d5f081af9a24315b2053828ac049b3b19b2fa12d7ae64aS3Bucket1F1A8472": { + "Type": "String", + "Description": "S3 bucket for asset \"972240f9dd6e036a93d5f081af9a24315b2053828ac049b3b19b2fa12d7ae64a\"" + }, + "AssetParameters972240f9dd6e036a93d5f081af9a24315b2053828ac049b3b19b2fa12d7ae64aS3VersionKeyBC7CFB0C": { + "Type": "String", + "Description": "S3 key for asset version \"972240f9dd6e036a93d5f081af9a24315b2053828ac049b3b19b2fa12d7ae64a\"" + }, + "AssetParameters972240f9dd6e036a93d5f081af9a24315b2053828ac049b3b19b2fa12d7ae64aArtifactHash4253F7E5": { + "Type": "String", + "Description": "Artifact hash for asset \"972240f9dd6e036a93d5f081af9a24315b2053828ac049b3b19b2fa12d7ae64a\"" + }, + "AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3Bucket7B2069B7": { + "Type": "String", + "Description": "S3 bucket for asset \"872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724d\"" + }, + "AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3VersionKey40E12C15": { + "Type": "String", + "Description": "S3 key for asset version \"872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724d\"" + }, + "AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dArtifactHashC2522C05": { + "Type": "String", + "Description": "Artifact hash for asset \"872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724d\"" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/integ.environment-file.ts b/packages/@aws-cdk/aws-ecs/test/ec2/integ.environment-file.ts new file mode 100644 index 0000000000000..dba6a15805027 --- /dev/null +++ b/packages/@aws-cdk/aws-ecs/test/ec2/integ.environment-file.ts @@ -0,0 +1,73 @@ +import * as path from 'path'; +import * as ec2 from '@aws-cdk/aws-ec2'; +import * as iam from '@aws-cdk/aws-iam'; +import * as s3 from '@aws-cdk/aws-s3'; +import * as s3deployment from '@aws-cdk/aws-s3-deployment'; +import * as cdk from '@aws-cdk/core'; +import * as ecs from '../../lib'; + +const app = new cdk.App(); +const stack = new cdk.Stack(app, 'aws-ecs-integ'); + +// S3 bucket to host envfile without public access +const bucket = new s3.Bucket(stack, 'Bucket', { + blockPublicAccess: s3.BlockPublicAccess.BLOCK_ALL, + removalPolicy: cdk.RemovalPolicy.DESTROY, +}); +const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 2 }); + +// ECS cluster to host EC2 task +const cluster = new ecs.Cluster(stack, 'EcsCluster', { vpc }); +cluster.addCapacity('DefaultAutoScalingGroup', { + instanceType: new ec2.InstanceType('t2.micro'), +}); + +// permit EC2 task to read envfiles from S3 +const s3PolicyStatement = new iam.PolicyStatement({ + actions: ['s3:GetBucketLocation', 's3:GetObject'], +}); + +s3PolicyStatement.addAllResources(); + +const executionRole = new iam.Role(stack, 'ExecutionRole', { + assumedBy: new iam.ServicePrincipal('ecs-tasks.amazonaws.com'), + inlinePolicies: { + s3Policy: new iam.PolicyDocument({ + statements: [s3PolicyStatement], + }), + }, +}); + +// define task to run the container with envfiles +const taskDefinition = new ecs.Ec2TaskDefinition(stack, 'TaskDefinition', { + executionRole, + networkMode: ecs.NetworkMode.AWS_VPC, +}); + +// deploy an envfile to S3 and delete when the bucket is deleted +const envFileDeployment = new s3deployment.BucketDeployment(stack, 'EnvFileDeployment', { + destinationBucket: bucket, + retainOnDelete: false, + sources: [s3deployment.Source.asset(path.join(__dirname, '../demo-envfiles'))], +}); + +// define container with envfiles - one from local disk and another from S3 +const containerDefinition = new ecs.ContainerDefinition(stack, 'Container', { + environmentFiles: [ + ecs.EnvironmentFile.fromAsset(path.join(__dirname, '../demo-envfiles/test-envfile.env')), + ecs.EnvironmentFile.fromBucket(bucket, 'test-envfile.env'), + ], + image: ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample'), + memoryLimitMiB: 256, + taskDefinition, +}); + +containerDefinition.node.addDependency(envFileDeployment); + +// define a service to run the task definition +new ecs.Ec2Service(stack, 'Service', { + cluster, + taskDefinition, +}); + +app.synth(); diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/test.ec2-task-definition.ts b/packages/@aws-cdk/aws-ecs/test/ec2/test.ec2-task-definition.ts index 9688e649b545c..242b9f4a72cd4 100644 --- a/packages/@aws-cdk/aws-ecs/test/ec2/test.ec2-task-definition.ts +++ b/packages/@aws-cdk/aws-ecs/test/ec2/test.ec2-task-definition.ts @@ -260,6 +260,7 @@ export = { dockerSecurityOptions: ['ECS_SELINUX_CAPABLE=true'], entryPoint: ['/app/node_modules/.bin/cdk'], environment: { TEST_ENVIRONMENT_VARIABLE: 'test environment variable value' }, + environmentFiles: [ecs.EnvironmentFile.fromAsset(path.join(__dirname, '../demo-envfiles/test-envfile.env'))], essential: true, extraHosts: { EXTRAHOST: 'extra host' }, healthCheck: { @@ -316,6 +317,47 @@ export = { Value: 'test environment variable value', }, ], + EnvironmentFiles: [{ + Type: 's3', + Value: { + 'Fn::Join': [ + '', + [ + 'arn:aws:s3:::', + { + Ref: 'AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3Bucket7B2069B7', + }, + '/', + { + 'Fn::Select': [ + 0, + { + 'Fn::Split': [ + '||', + { + Ref: 'AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3VersionKey40E12C15', + }, + ], + }, + ], + }, + { + 'Fn::Select': [ + 1, + { + 'Fn::Split': [ + '||', + { + Ref: 'AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3VersionKey40E12C15', + }, + ], + }, + ], + }, + ], + ], + }, + }], Essential: true, ExtraHosts: [ { diff --git a/packages/@aws-cdk/aws-ecs/test/test.container-definition.ts b/packages/@aws-cdk/aws-ecs/test/test.container-definition.ts index cb282dd9bf870..54a3311922774 100644 --- a/packages/@aws-cdk/aws-ecs/test/test.container-definition.ts +++ b/packages/@aws-cdk/aws-ecs/test/test.container-definition.ts @@ -1,6 +1,7 @@ import * as path from 'path'; import { expect, haveResource, haveResourceLike, InspectionFailure } from '@aws-cdk/assert'; import * as ecr_assets from '@aws-cdk/aws-ecr-assets'; +import * as s3 from '@aws-cdk/aws-s3'; import * as secretsmanager from '@aws-cdk/aws-secretsmanager'; import * as ssm from '@aws-cdk/aws-ssm'; import * as cdk from '@aws-cdk/core'; @@ -60,6 +61,7 @@ export = { key: 'foo', value: 'bar', }, + environmentFiles: [ecs.EnvironmentFile.fromAsset(path.join(__dirname, 'demo-envfiles/test-envfile.env'))], essential: true, extraHosts: { name: 'dev-db.hostname.pvt', @@ -118,6 +120,47 @@ export = { Value: 'bar', }, ], + EnvironmentFiles: [{ + Type: 's3', + Value: { + 'Fn::Join': [ + '', + [ + 'arn:aws:s3:::', + { + Ref: 'AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3Bucket7B2069B7', + }, + '/', + { + 'Fn::Select': [ + 0, + { + 'Fn::Split': [ + '||', + { + Ref: 'AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3VersionKey40E12C15', + }, + ], + }, + ], + }, + { + 'Fn::Select': [ + 1, + { + 'Fn::Split': [ + '||', + { + Ref: 'AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3VersionKey40E12C15', + }, + ], + }, + ], + }, + ], + ], + }, + }], Essential: true, ExtraHosts: [ { @@ -659,6 +702,126 @@ export = { }, + 'Environment Files': { + 'can add asset environment file to the container definition'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const taskDefinition = new ecs.Ec2TaskDefinition(stack, 'TaskDef'); + + // WHEN + taskDefinition.addContainer('cont', { + image: ecs.ContainerImage.fromRegistry('test'), + memoryLimitMiB: 1024, + environmentFiles: [ecs.EnvironmentFile.fromAsset(path.join(__dirname, 'demo-envfiles/test-envfile.env'))], + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::ECS::TaskDefinition', { + ContainerDefinitions: [ + { + EnvironmentFiles: [{ + Type: 's3', + Value: { + 'Fn::Join': [ + '', + [ + 'arn:aws:s3:::', + { + Ref: 'AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3Bucket7B2069B7', + }, + '/', + { + 'Fn::Select': [ + 0, + { + 'Fn::Split': [ + '||', + { + Ref: 'AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3VersionKey40E12C15', + }, + ], + }, + ], + }, + { + 'Fn::Select': [ + 1, + { + 'Fn::Split': [ + '||', + { + Ref: 'AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3VersionKey40E12C15', + }, + ], + }, + ], + }, + ], + ], + }, + }], + }, + ], + })); + + test.done(); + }, + 'can add s3 bucket environment file to the container definition'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const bucket = new s3.Bucket(stack, 'Bucket', { + bucketName: 'test-bucket', + }); + const taskDefinition = new ecs.Ec2TaskDefinition(stack, 'TaskDef'); + + // WHEN + taskDefinition.addContainer('cont', { + image: ecs.ContainerImage.fromRegistry('test'), + memoryLimitMiB: 1024, + environmentFiles: [ecs.EnvironmentFile.fromBucket(bucket, 'test-key')], + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::ECS::TaskDefinition', { + ContainerDefinitions: [ + { + EnvironmentFiles: [{ + Type: 's3', + Value: { + 'Fn::Join': [ + '', + [ + 'arn:aws:s3:::', + { + Ref: 'Bucket83908E77', + }, + '/test-key', + ], + ], + }, + }], + }, + ], + })); + + test.done(); + }, + 'throws when using environment files for a Fargate task'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const taskDefinition = new ecs.FargateTaskDefinition(stack, 'TaskDef'); + + // THEN + test.throws(() => taskDefinition.addContainer('cont', { + image: ecs.ContainerImage.fromRegistry('test'), + memoryLimitMiB: 1024, + environmentFiles: [ecs.EnvironmentFile.fromAsset(path.join(__dirname, 'demo-envfiles/test-envfile.env'))], + }), /Cannot specify environment files for a task using the FARGATE launch type in container/); + + test.done(); + }, + }, + 'Given GPU count parameter': { 'will add resource requirements to container definition'(test: Test) { // GIVEN diff --git a/packages/@aws-cdk/aws-ecs/test/test.environment-file.ts b/packages/@aws-cdk/aws-ecs/test/test.environment-file.ts new file mode 100644 index 0000000000000..a0d6fc29d3aed --- /dev/null +++ b/packages/@aws-cdk/aws-ecs/test/test.environment-file.ts @@ -0,0 +1,59 @@ +import * as path from 'path'; +import * as cdk from '@aws-cdk/core'; +import { Test } from 'nodeunit'; +import * as ecs from '../lib'; + +/* eslint-disable dot-notation */ + +export = { + 'ecs.EnvironmentFile.fromAsset': { + 'fails if asset is not a single file'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const fileAsset = ecs.EnvironmentFile.fromAsset(path.join(__dirname, 'demo-envfiles')); + + // THEN + test.throws(() => defineContainerDefinition(stack, fileAsset), /Asset must be a single file/); + test.done(); + }, + + 'only one environment file asset object is created even if multiple container definitions use the same file'(test: Test) { + // GIVEN + const app = new cdk.App(); + const stack = new cdk.Stack(app); + const fileAsset = ecs.EnvironmentFile.fromAsset(path.join(__dirname, 'demo-envfiles/test-envfile.env')); + + // WHEN + const image = ecs.ContainerImage.fromRegistry('/aws/aws-example-app'); + const taskDefinition = new ecs.Ec2TaskDefinition(stack, 'TaskDef'); + const containerDefinitionProps: ecs.ContainerDefinitionProps = { + environmentFiles: [fileAsset], + image, + memoryLimitMiB: 512, + taskDefinition, + }; + + new ecs.ContainerDefinition(stack, 'ContainerOne', containerDefinitionProps); + new ecs.ContainerDefinition(stack, 'ContainerTwo', containerDefinitionProps); + + // THEN + const assembly = app.synth(); + const synthesized = assembly.stacks[0]; + + // container one has an asset, container two does not + test.deepEqual(synthesized.assets.length, 1); + test.done(); + }, + }, +}; + +function defineContainerDefinition(stack: cdk.Stack, environmentFile: ecs.EnvironmentFile) { + const taskDefinition = new ecs.Ec2TaskDefinition(stack, 'TaskDef'); + + return new ecs.ContainerDefinition(stack, 'Container', { + environmentFiles: [environmentFile], + image: ecs.ContainerImage.fromRegistry('/aws/aws-example-app'), + memoryLimitMiB: 512, + taskDefinition, + }); +} diff --git a/packages/@aws-cdk/aws-s3-assets/lib/asset.ts b/packages/@aws-cdk/aws-s3-assets/lib/asset.ts index d1cb59520e0f0..880e3d9c7e1d2 100644 --- a/packages/@aws-cdk/aws-s3-assets/lib/asset.ts +++ b/packages/@aws-cdk/aws-s3-assets/lib/asset.ts @@ -96,6 +96,12 @@ export class Asset extends cdk.Construct implements cdk.IAsset { */ public readonly bucket: s3.IBucket; + /** + * Indicates if this asset is a single file. Allows constructs to ensure that the + * correct file type was used. + */ + public readonly isFile: boolean; + /** * Indicates if this asset is a zip archive. Allows constructs to ensure that the * correct file type was used. @@ -129,6 +135,8 @@ export class Asset extends cdk.Construct implements cdk.IAsset { const packaging = determinePackaging(staging.sourcePath); + this.isFile = packaging === cdk.FileAssetPackaging.FILE; + // sets isZipArchive based on the type of packaging and file extension this.isZipArchive = packaging === cdk.FileAssetPackaging.ZIP_DIRECTORY ? true diff --git a/packages/@aws-cdk/aws-s3-assets/test/asset.test.ts b/packages/@aws-cdk/aws-s3-assets/test/asset.test.ts index 199594ef95bf0..2258bde4d09cf 100644 --- a/packages/@aws-cdk/aws-s3-assets/test/asset.test.ts +++ b/packages/@aws-cdk/aws-s3-assets/test/asset.test.ts @@ -140,6 +140,24 @@ test('multiple assets under the same parent', () => { expect(() => new Asset(stack, 'MyDirectory2', { path: path.join(__dirname, 'sample-asset-directory') })).not.toThrow(); }); +test('isFile indicates if the asset represents a single file', () => { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + const directoryAsset = new Asset(stack, 'DirectoryAsset', { + path: path.join(__dirname, 'sample-asset-directory'), + }); + + const fileAsset = new Asset(stack, 'FileAsset', { + path: path.join(__dirname, 'sample-asset-directory', 'sample-asset-file.txt'), + }); + + // THEN + expect(directoryAsset.isFile).toBe(false); + expect(fileAsset.isFile).toBe(true); +}); + test('isZipArchive indicates if the asset represents a .zip file (either explicitly or via ZipDirectory packaging)', () => { // GIVEN const stack = new cdk.Stack(); From db8ac639e6136d4c2359ad0facd7650ac349c0be Mon Sep 17 00:00:00 2001 From: AWS CDK Automation <43080478+aws-cdk-automation@users.noreply.github.com> Date: Thu, 29 Oct 2020 15:04:16 +0100 Subject: [PATCH 002/314] chore: npm-check-updates && yarn upgrade (#11196) Ran npm-check-updates and yarn upgrade to keep the `yarn.lock` file up-to-date. --- package.json | 6 +- packages/@aws-cdk/assets/package.json | 4 +- .../package.json | 8 +- .../@aws-cdk/aws-cloudformation/package.json | 2 +- .../aws-codepipeline-actions/package.json | 2 +- .../aws-global-table-coordinator/package.json | 6 +- packages/@aws-cdk/aws-dynamodb/package.json | 2 +- packages/@aws-cdk/aws-eks/package.json | 2 +- packages/@aws-cdk/aws-iam/package.json | 2 +- packages/@aws-cdk/aws-lambda/package.json | 4 +- packages/@aws-cdk/aws-logs/package.json | 2 +- packages/@aws-cdk/core/package.json | 8 +- .../@aws-cdk/custom-resources/package.json | 6 +- .../@monocdk-experiment/assert/package.json | 2 +- .../rewrite-imports/package.json | 2 +- packages/aws-cdk-lib/package.json | 2 +- packages/aws-cdk/package.json | 14 +- packages/awslint/package.json | 8 +- packages/cdk-assets/package.json | 4 +- packages/cdk-dasm/package.json | 2 +- packages/decdk/package.json | 6 +- packages/monocdk/package.json | 2 +- tools/cdk-build-tools/package.json | 10 +- tools/cdk-integ-tools/package.json | 2 +- tools/cfn2ts/package.json | 4 +- tools/eslint-plugin-cdk/package.json | 6 +- tools/nodeunit-shim/package.json | 2 +- tools/pkglint/package.json | 2 +- tools/pkgtools/package.json | 2 +- tools/yarn-cling/package.json | 2 +- yarn.lock | 304 ++++++++---------- 31 files changed, 203 insertions(+), 227 deletions(-) diff --git a/package.json b/package.json index 149b14aa6fd11..97f1691cbe9b0 100644 --- a/package.json +++ b/package.json @@ -18,9 +18,9 @@ "fs-extra": "^9.0.1", "graceful-fs": "^4.2.4", "jest-junit": "^12.0.0", - "jsii-diff": "^1.13.0", - "jsii-pacmak": "^1.13.0", - "jsii-rosetta": "^1.13.0", + "jsii-diff": "^1.14.0", + "jsii-pacmak": "^1.14.0", + "jsii-rosetta": "^1.14.0", "lerna": "^3.22.1", "standard-version": "^9.0.0", "typescript": "~3.9.7" diff --git a/packages/@aws-cdk/assets/package.json b/packages/@aws-cdk/assets/package.json index 6e1cf69242109..e91c6966fcd76 100644 --- a/packages/@aws-cdk/assets/package.json +++ b/packages/@aws-cdk/assets/package.json @@ -70,13 +70,13 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "@types/sinon": "^9.0.7", + "@types/sinon": "^9.0.8", "aws-cdk": "0.0.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "nodeunit": "^0.11.3", "pkglint": "0.0.0", - "sinon": "^9.2.0", + "sinon": "^9.2.1", "ts-mock-imports": "^1.3.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json b/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json index e2dc3cb7ee209..9e4e9abd7f9ce 100644 --- a/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json +++ b/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json @@ -29,15 +29,15 @@ "devDependencies": { "aws-sdk": "^2.596.0", "aws-sdk-mock": "^5.1.0", - "eslint": "^7.10.0", + "eslint": "^7.12.1", "eslint-config-standard": "^14.1.1", "eslint-plugin-import": "^2.22.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-standard": "^4.0.1", - "jest": "^26.4.2", + "eslint-plugin-standard": "^4.0.2", + "jest": "^26.6.1", "lambda-tester": "^3.6.0", "nock": "^13.0.4", - "ts-jest": "^26.4.1" + "ts-jest": "^26.4.3" } } diff --git a/packages/@aws-cdk/aws-cloudformation/package.json b/packages/@aws-cdk/aws-cloudformation/package.json index d3455407ee69f..1c8a3abc64568 100644 --- a/packages/@aws-cdk/aws-cloudformation/package.json +++ b/packages/@aws-cdk/aws-cloudformation/package.json @@ -74,7 +74,7 @@ "@aws-cdk/aws-sns-subscriptions": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@aws-cdk/aws-ssm": "0.0.0", - "@types/aws-lambda": "^8.10.63", + "@types/aws-lambda": "^8.10.64", "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-codepipeline-actions/package.json b/packages/@aws-cdk/aws-codepipeline-actions/package.json index 2b5bbafbbdc04..fde49ea10ae3f 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/package.json +++ b/packages/@aws-cdk/aws-codepipeline-actions/package.json @@ -69,7 +69,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-cloudtrail": "0.0.0", - "@types/lodash": "^4.14.161", + "@types/lodash": "^4.14.163", "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json b/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json index 5d846f80c2e3e..fcfbb22fdcc06 100644 --- a/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json +++ b/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json @@ -29,13 +29,13 @@ "devDependencies": { "aws-sdk": "^2.596.0", "aws-sdk-mock": "^5.1.0", - "eslint": "^7.10.0", + "eslint": "^7.12.1", "eslint-config-standard": "^14.1.1", "eslint-plugin-import": "^2.22.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-standard": "^4.0.1", - "jest": "^26.4.2", + "eslint-plugin-standard": "^4.0.2", + "jest": "^26.6.1", "lambda-tester": "^3.6.0", "nock": "^13.0.4" } diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index 5886965758ac7..a634e0435fd3e 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -81,7 +81,7 @@ "cfn2ts": "0.0.0", "jest": "^26.6.1", "pkglint": "0.0.0", - "sinon": "^9.2.0", + "sinon": "^9.2.1", "ts-jest": "^26.4.3" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index 134b064601cec..428c5681a732a 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -80,7 +80,7 @@ "cfn2ts": "0.0.0", "nodeunit": "^0.11.3", "pkglint": "0.0.0", - "sinon": "^9.2.0", + "sinon": "^9.2.1", "cdk8s-plus": "^0.33.0", "cdk8s": "^0.33.0" }, diff --git a/packages/@aws-cdk/aws-iam/package.json b/packages/@aws-cdk/aws-iam/package.json index a8251a0f8ee9c..afa2349dbafca 100644 --- a/packages/@aws-cdk/aws-iam/package.json +++ b/packages/@aws-cdk/aws-iam/package.json @@ -78,7 +78,7 @@ "cfn2ts": "0.0.0", "jest": "^26.6.1", "pkglint": "0.0.0", - "sinon": "^9.2.0" + "sinon": "^9.2.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-lambda/package.json b/packages/@aws-cdk/aws-lambda/package.json index efaa129f724ff..8288e16cab85e 100644 --- a/packages/@aws-cdk/aws-lambda/package.json +++ b/packages/@aws-cdk/aws-lambda/package.json @@ -77,8 +77,8 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "@types/aws-lambda": "^8.10.63", - "@types/lodash": "^4.14.161", + "@types/aws-lambda": "^8.10.64", + "@types/lodash": "^4.14.163", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index e00799e6d2309..d529831126b85 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -81,7 +81,7 @@ "nock": "^13.0.4", "nodeunit": "^0.11.3", "pkglint": "0.0.0", - "sinon": "^9.2.0" + "sinon": "^9.2.1" }, "dependencies": { "@aws-cdk/aws-cloudwatch": "0.0.0", diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json index 2871bd877e10e..d181a3f8ce75a 100644 --- a/packages/@aws-cdk/core/package.json +++ b/packages/@aws-cdk/core/package.json @@ -168,17 +168,17 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/lodash": "^4.14.161", + "@types/lodash": "^4.14.163", "@types/minimatch": "^3.0.3", - "@types/node": "^10.17.42", - "@types/sinon": "^9.0.7", + "@types/node": "^10.17.44", + "@types/sinon": "^9.0.8", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", "fast-check": "^2.6.0", "lodash": "^4.17.20", "nodeunit-shim": "0.0.0", "pkglint": "0.0.0", - "sinon": "^9.2.0", + "sinon": "^9.2.1", "ts-mock-imports": "^1.3.0" }, "dependencies": { diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index 422905a72ea0c..8472edf850213 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -76,9 +76,9 @@ "@aws-cdk/aws-events": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/aws-ssm": "0.0.0", - "@types/aws-lambda": "^8.10.63", + "@types/aws-lambda": "^8.10.64", "@types/fs-extra": "^8.1.1", - "@types/sinon": "^9.0.7", + "@types/sinon": "^9.0.8", "aws-sdk": "^2.781.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", @@ -87,7 +87,7 @@ "fs-extra": "^9.0.1", "nock": "^13.0.4", "pkglint": "0.0.0", - "sinon": "^9.2.0" + "sinon": "^9.2.1" }, "dependencies": { "@aws-cdk/aws-cloudformation": "0.0.0", diff --git a/packages/@monocdk-experiment/assert/package.json b/packages/@monocdk-experiment/assert/package.json index 33a8c6cb89a8c..00310c9815af3 100644 --- a/packages/@monocdk-experiment/assert/package.json +++ b/packages/@monocdk-experiment/assert/package.json @@ -35,7 +35,7 @@ "devDependencies": { "@monocdk-experiment/rewrite-imports": "0.0.0", "@types/jest": "^26.0.15", - "@types/node": "^10.17.42", + "@types/node": "^10.17.44", "cdk-build-tools": "0.0.0", "constructs": "^3.2.0", "jest": "^26.6.1", diff --git a/packages/@monocdk-experiment/rewrite-imports/package.json b/packages/@monocdk-experiment/rewrite-imports/package.json index b46d38a7c4072..ebd269363e9a4 100644 --- a/packages/@monocdk-experiment/rewrite-imports/package.json +++ b/packages/@monocdk-experiment/rewrite-imports/package.json @@ -37,7 +37,7 @@ "devDependencies": { "@types/glob": "^7.1.3", "@types/jest": "^26.0.15", - "@types/node": "^10.17.42", + "@types/node": "^10.17.44", "cdk-build-tools": "0.0.0", "pkglint": "0.0.0" }, diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index 3f5b5832bac07..7a1d46afdb6a2 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -255,7 +255,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "@types/fs-extra": "^8.1.1", - "@types/node": "^10.17.42", + "@types/node": "^10.17.44", "cdk-build-tools": "0.0.0", "constructs": "^3.2.0", "fs-extra": "^9.0.1", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 2cd2b6ad90e58..cc67af22ad1de 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -45,20 +45,20 @@ "@types/jest": "^26.0.15", "@types/minimatch": "^3.0.3", "@types/mockery": "^1.4.29", - "@types/node": "^10.17.42", + "@types/node": "^10.17.44", "@types/promptly": "^3.0.0", "@types/semver": "^7.3.4", - "@types/sinon": "^9.0.7", + "@types/sinon": "^9.0.8", "@types/table": "^5.0.0", "@types/uuid": "^8.3.0", "@types/wrap-ansi": "^3.0.0", - "@types/yargs": "^15.0.7", + "@types/yargs": "^15.0.9", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "jest": "^26.6.1", "mockery": "^2.1.0", "pkglint": "0.0.0", - "sinon": "^9.2.0", + "sinon": "^9.2.1", "ts-jest": "^26.4.3", "ts-mock-imports": "^1.3.0", "@octokit/rest": "^18.0.6", @@ -72,7 +72,7 @@ "@aws-cdk/yaml-cfn": "0.0.0", "archiver": "^5.0.2", "aws-sdk": "^2.781.0", - "camelcase": "^6.1.0", + "camelcase": "^6.2.0", "cdk-assets": "0.0.0", "colors": "^1.4.0", "decamelize": "^4.0.0", @@ -80,12 +80,12 @@ "glob": "^7.1.6", "json-diff": "^0.5.4", "minimatch": ">=3.0", - "promptly": "^3.0.3", + "promptly": "^3.1.0", "proxy-agent": "^4.0.0", "semver": "^7.3.2", "source-map-support": "^0.5.19", "table": "^6.0.3", - "uuid": "^8.3.0", + "uuid": "^8.3.1", "wrap-ansi": "^7.0.0", "yargs": "^16.1.0" }, diff --git a/packages/awslint/package.json b/packages/awslint/package.json index ca00e313d834f..e47c9135317d9 100644 --- a/packages/awslint/package.json +++ b/packages/awslint/package.json @@ -16,16 +16,16 @@ "awslint": "bin/awslint" }, "dependencies": { - "@jsii/spec": "^1.13.0", - "camelcase": "^6.1.0", + "@jsii/spec": "^1.14.0", + "camelcase": "^6.2.0", "colors": "^1.4.0", "fs-extra": "^9.0.1", - "jsii-reflect": "^1.13.0", + "jsii-reflect": "^1.14.0", "yargs": "^16.1.0" }, "devDependencies": { "@types/fs-extra": "^8.1.1", - "@types/yargs": "^15.0.7", + "@types/yargs": "^15.0.9", "pkglint": "0.0.0", "typescript": "~3.9.7" }, diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index 872685de14586..b570b0bf71728 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -35,8 +35,8 @@ "@types/jest": "^26.0.15", "@types/jszip": "^3.4.1", "@types/mock-fs": "^4.13.0", - "@types/node": "^10.17.42", - "@types/yargs": "^15.0.7", + "@types/node": "^10.17.44", + "@types/yargs": "^15.0.9", "cdk-build-tools": "0.0.0", "jest": "^26.6.1", "jszip": "^3.5.0", diff --git a/packages/cdk-dasm/package.json b/packages/cdk-dasm/package.json index 0e101ed10fc98..22917b59c1fcc 100644 --- a/packages/cdk-dasm/package.json +++ b/packages/cdk-dasm/package.json @@ -26,7 +26,7 @@ }, "license": "Apache-2.0", "dependencies": { - "codemaker": "^1.13.0", + "codemaker": "^1.14.0", "yaml": "1.10.0" }, "devDependencies": { diff --git a/packages/decdk/package.json b/packages/decdk/package.json index 444dd22bc53f5..c628a56491d46 100644 --- a/packages/decdk/package.json +++ b/packages/decdk/package.json @@ -189,7 +189,7 @@ "@aws-cdk/yaml-cfn": "0.0.0", "constructs": "^3.2.0", "fs-extra": "^9.0.1", - "jsii-reflect": "^1.13.0", + "jsii-reflect": "^1.14.0", "jsonschema": "^1.4.0", "yaml": "1.10.0", "yargs": "^16.1.0" @@ -198,9 +198,9 @@ "@types/fs-extra": "^8.1.1", "@types/jest": "^26.0.15", "@types/yaml": "1.9.7", - "@types/yargs": "^15.0.7", + "@types/yargs": "^15.0.9", "jest": "^26.6.1", - "jsii": "^1.13.0" + "jsii": "^1.14.0" }, "keywords": [ "aws", diff --git a/packages/monocdk/package.json b/packages/monocdk/package.json index 09edf62b2ffb9..01c1daa8cf623 100644 --- a/packages/monocdk/package.json +++ b/packages/monocdk/package.json @@ -254,7 +254,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "@types/fs-extra": "^8.1.1", - "@types/node": "^10.17.42", + "@types/node": "^10.17.44", "cdk-build-tools": "0.0.0", "constructs": "^3.2.0", "fs-extra": "^9.0.1", diff --git a/tools/cdk-build-tools/package.json b/tools/cdk-build-tools/package.json index b998bdd74c1e9..53e2c7198fc50 100644 --- a/tools/cdk-build-tools/package.json +++ b/tools/cdk-build-tools/package.json @@ -35,23 +35,23 @@ "devDependencies": { "@types/fs-extra": "^8.1.1", "@types/jest": "^26.0.15", - "@types/yargs": "^15.0.7", + "@types/yargs": "^15.0.9", "pkglint": "0.0.0" }, "dependencies": { "@typescript-eslint/eslint-plugin": "^4.6.0", - "@typescript-eslint/parser": "^4.3.0", + "@typescript-eslint/parser": "^4.6.0", "eslint-plugin-cdk": "0.0.0", "awslint": "0.0.0", "colors": "^1.4.0", - "eslint": "^7.10.0", + "eslint": "^7.12.1", "eslint-import-resolver-node": "^0.3.4", "eslint-import-resolver-typescript": "^2.3.0", "eslint-plugin-import": "^2.22.1", "fs-extra": "^9.0.1", "jest": "^26.6.1", - "jsii": "^1.13.0", - "jsii-pacmak": "^1.13.0", + "jsii": "^1.14.0", + "jsii-pacmak": "^1.14.0", "nodeunit": "^0.11.3", "nyc": "^15.1.0", "ts-jest": "^26.4.3", diff --git a/tools/cdk-integ-tools/package.json b/tools/cdk-integ-tools/package.json index 33fbc7e557f79..871da4eb75467 100644 --- a/tools/cdk-integ-tools/package.json +++ b/tools/cdk-integ-tools/package.json @@ -30,7 +30,7 @@ "license": "Apache-2.0", "devDependencies": { "@types/fs-extra": "^8.1.1", - "@types/yargs": "^15.0.7", + "@types/yargs": "^15.0.9", "cdk-build-tools": "0.0.0", "pkglint": "0.0.0" }, diff --git a/tools/cfn2ts/package.json b/tools/cfn2ts/package.json index 30ed578d2df47..d1aedf2f03824 100644 --- a/tools/cfn2ts/package.json +++ b/tools/cfn2ts/package.json @@ -30,7 +30,7 @@ "license": "Apache-2.0", "dependencies": { "@aws-cdk/cfnspec": "0.0.0", - "codemaker": "^1.13.0", + "codemaker": "^1.14.0", "fast-json-patch": "^3.0.0-1", "fs-extra": "^9.0.1", "yargs": "^16.1.0" @@ -38,7 +38,7 @@ "devDependencies": { "@types/fs-extra": "^8.1.1", "@types/jest": "^26.0.15", - "@types/yargs": "^15.0.7", + "@types/yargs": "^15.0.9", "cdk-build-tools": "0.0.0", "jest": "^26.6.1", "pkglint": "0.0.0" diff --git a/tools/eslint-plugin-cdk/package.json b/tools/eslint-plugin-cdk/package.json index dd58cfc498a5a..840b5b578a2ce 100644 --- a/tools/eslint-plugin-cdk/package.json +++ b/tools/eslint-plugin-cdk/package.json @@ -15,14 +15,14 @@ "@types/eslint": "^7.2.4", "@types/fs-extra": "^8.1.1", "@types/jest": "^26.0.15", - "@types/node": "^10.17.42", + "@types/node": "^10.17.44", "eslint-plugin-rulesdir": "^0.1.0", "jest": "^26.6.1", "typescript": "~3.9.7" }, "dependencies": { - "@typescript-eslint/parser": "^4.3.0", - "eslint": "^7.10.0", + "@typescript-eslint/parser": "^4.6.0", + "eslint": "^7.12.1", "fs-extra": "^9.0.1" }, "jest": { diff --git a/tools/nodeunit-shim/package.json b/tools/nodeunit-shim/package.json index 68a6de1d0b276..4d1981eaed8d1 100644 --- a/tools/nodeunit-shim/package.json +++ b/tools/nodeunit-shim/package.json @@ -13,7 +13,7 @@ }, "devDependencies": { "@types/jest": "^26.0.15", - "@types/node": "^10.17.42", + "@types/node": "^10.17.44", "typescript": "~3.9.7" }, "dependencies": { diff --git a/tools/pkglint/package.json b/tools/pkglint/package.json index 02857cf3a1f5a..cbddea940b58f 100644 --- a/tools/pkglint/package.json +++ b/tools/pkglint/package.json @@ -37,7 +37,7 @@ "devDependencies": { "@types/fs-extra": "^8.1.1", "@types/semver": "^7.3.4", - "@types/yargs": "^15.0.7", + "@types/yargs": "^15.0.9", "eslint-plugin-cdk": "0.0.0", "jest": "^26.6.1", "typescript": "~3.9.7" diff --git a/tools/pkgtools/package.json b/tools/pkgtools/package.json index 545966b08e07e..836ed85516754 100644 --- a/tools/pkgtools/package.json +++ b/tools/pkgtools/package.json @@ -30,7 +30,7 @@ "license": "Apache-2.0", "devDependencies": { "@types/fs-extra": "^8.1.1", - "@types/yargs": "^15.0.7", + "@types/yargs": "^15.0.9", "cdk-build-tools": "0.0.0", "pkglint": "0.0.0" }, diff --git a/tools/yarn-cling/package.json b/tools/yarn-cling/package.json index 0a03fa83c3404..9ab91dbd1b5bd 100644 --- a/tools/yarn-cling/package.json +++ b/tools/yarn-cling/package.json @@ -39,7 +39,7 @@ }, "devDependencies": { "@types/jest": "^26.0.15", - "@types/node": "^10.17.42", + "@types/node": "^10.17.44", "@types/yarnpkg__lockfile": "^1.1.4", "jest": "^26.6.1", "pkglint": "0.0.0", diff --git a/yarn.lock b/yarn.lock index 71f221894b262..fbbfb283d1dba 100644 --- a/yarn.lock +++ b/yarn.lock @@ -973,10 +973,10 @@ exec-sh "^0.3.2" minimist "^1.2.0" -"@eslint/eslintrc@^0.1.3": - version "0.1.3" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.1.3.tgz#7d1a2b2358552cc04834c0979bd4275362e37085" - integrity sha512-4YVwPkANLeNtRjMekzux1ci8hIaH5eGKktGqR0d3LWsKNn5B2X/1Z6Trxy7jQXl9EBGE6Yj02O+t09FMeRllaA== +"@eslint/eslintrc@^0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.2.1.tgz#f72069c330461a06684d119384435e12a5d76e3c" + integrity sha512-XRUeBZ5zBWLYgSANMpThFddrZZkEbGHgUdt5UJjZfnlN9BGCiUBrf+nvbRupSjMvqzwnQN0qwCmOxITt1cfywA== dependencies: ajv "^6.12.4" debug "^4.1.1" @@ -1271,12 +1271,12 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" -"@jsii/spec@^1.13.0": - version "1.13.0" - resolved "https://registry.yarnpkg.com/@jsii/spec/-/spec-1.13.0.tgz#3389e047065b6b7f7fda238a90d58ac577c811bf" - integrity sha512-BeDBk9OqsTjo5Oe5MrXT+dt0WqjzPN5DsYedmnhP65oceuBdx3VKS/nKGQ8DOB+9587Go8i9L+nri1wwQz3bpA== +"@jsii/spec@^1.14.0": + version "1.14.0" + resolved "https://registry.yarnpkg.com/@jsii/spec/-/spec-1.14.0.tgz#79ef7626616e3cd6eaf503f8f4c0c9640c220a5b" + integrity sha512-hgJG0d1W+VgXZD8TeXt4wlFwdkT9izUN5fY+yzKkh+zZUNebEayXDP6LXOFD4iJZ83nUGjEVayzaZt4rAhwt5A== dependencies: - jsonschema "^1.2.7" + jsonschema "^1.4.0" "@lerna/add@3.21.0": version "3.21.0" @@ -2984,10 +2984,10 @@ dependencies: "@types/glob" "*" -"@types/aws-lambda@^8.10.63": - version "8.10.63" - resolved "https://registry.yarnpkg.com/@types/aws-lambda/-/aws-lambda-8.10.63.tgz#3316174e7a23b8505d1b7bdc979a5c3030d5e203" - integrity sha512-XEE+3iJxyeCmZTUoHZRbnxSy8aMxXXwrALgsoDBGcgkbll+8bDfuk4XbIJ9Oaec/Pxee6rno6SGMiV6EbqhF+A== +"@types/aws-lambda@^8.10.64": + version "8.10.64" + resolved "https://registry.yarnpkg.com/@types/aws-lambda/-/aws-lambda-8.10.64.tgz#4bdcb725aef96bef0cb1decf19c7efff1df22fe7" + integrity sha512-LRKk2UQCSi7BsO5TlfSI8cTNpOGz+MH6+RXEWtuZmxJficQgxwEYJDiKVirzgyiHce0L0F4CqCVvKTwblAeOUw== "@types/babel__core@^7.0.0", "@types/babel__core@^7.1.7": version "7.1.10" @@ -3113,10 +3113,10 @@ dependencies: jszip "*" -"@types/lodash@^4.14.161": - version "4.14.161" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.161.tgz#a21ca0777dabc6e4f44f3d07f37b765f54188b18" - integrity sha512-EP6O3Jkr7bXvZZSZYlsgt5DIjiGr0dXP1/jVEwVLTFgg0d+3lWVQkRavYVQszV7dYUwvg0B8R0MBDpcmXg7XIA== +"@types/lodash@^4.14.163": + version "4.14.163" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.163.tgz#6026f73c8267a0b7d41c7c8aadacfa2a5255774f" + integrity sha512-BeZM/FZaV53emqyHxn9L39Oz6XbHMBRLA1b1quROku48J/1kYYxPmVOJ/qSQheb81on4BI7H6QDo6bkUuRaDNQ== "@types/md5@^2.2.1": version "2.2.1" @@ -3152,10 +3152,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.2.tgz#2de1ed6670439387da1c9f549a2ade2b0a799256" integrity sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA== -"@types/node@^10.17.42": - version "10.17.42" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.42.tgz#90dd71b26fe4f4e2929df6b07e72ef2e9648a173" - integrity sha512-HElxYF7C/MSkuvlaHB2c+82zhXiuO49Cq056Dol8AQuTph7oJtduo2n6J8rFa+YhJyNgQ/Lm20ZaxqD0vxU0+Q== +"@types/node@^10.17.44": + version "10.17.44" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.44.tgz#3945e6b702cb6403f22b779c8ea9e5c3f44ead40" + integrity sha512-vHPAyBX1ffLcy4fQHmDyIUMUb42gHZjPHU66nhvbMzAWJqHnySGZ6STwN3rwrnSd1FHB0DI/RWgGELgKSYRDmw== "@types/nodeunit@^0.0.31": version "0.0.31" @@ -3199,10 +3199,10 @@ resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.4.tgz#43d7168fec6fa0988bb1a513a697b29296721afb" integrity sha512-+nVsLKlcUCeMzD2ufHEYuJ9a2ovstb6Dp52A5VsoKxDXgvE051XgHI/33I1EymwkRGQkwnA0LkhnUzituGs4EQ== -"@types/sinon@^9.0.7": - version "9.0.7" - resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-9.0.7.tgz#c277e19cf9eb0c71106e785650f1e5c299262302" - integrity sha512-uyFiy2gp4P/FK9pmU3WIbT5ZzH54hCswwRkQFhxX7xl8jzhW3g+xOkVqk5YP4cIO//Few8UDAX0MtzFpqBEqwA== +"@types/sinon@^9.0.8": + version "9.0.8" + resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-9.0.8.tgz#1ed0038d356784f75b086104ef83bfd4130bb81b" + integrity sha512-IVnI820FZFMGI+u1R+2VdRaD/82YIQTdqLYC9DLPszZuynAJDtCvCtCs3bmyL66s7FqRM3+LPX7DhHnVTaagDw== dependencies: "@types/sinonjs__fake-timers" "*" @@ -3257,13 +3257,20 @@ resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-15.0.0.tgz#cb3f9f741869e20cce330ffbeb9271590483882d" integrity sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw== -"@types/yargs@^15.0.0", "@types/yargs@^15.0.7": +"@types/yargs@^15.0.0": version "15.0.7" resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.7.tgz#dad50a7a234a35ef9460737a56024287a3de1d2b" integrity sha512-Gf4u3EjaPNcC9cTu4/j2oN14nSVhr8PQ+BvBcBQHAhDZfl0bVIiLgvnRXv/dn58XhTm9UXvBpvJpDlwV65QxOA== dependencies: "@types/yargs-parser" "*" +"@types/yargs@^15.0.9": + version "15.0.9" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.9.tgz#524cd7998fe810cdb02f26101b699cccd156ff19" + integrity sha512-HmU8SeIRhZCWcnRskCs36Q1Q00KBV6Cqh/ora8WN1+22dY07AZdn6Gel8QZ3t26XYPImtcL8WV/eqjhVmMEw4g== + dependencies: + "@types/yargs-parser" "*" + "@types/yarnpkg__lockfile@^1.1.4": version "1.1.4" resolved "https://registry.yarnpkg.com/@types/yarnpkg__lockfile/-/yarnpkg__lockfile-1.1.4.tgz#445251eb00bd9c1e751f82c7c6bf4f714edfd464" @@ -3294,24 +3301,16 @@ eslint-scope "^5.0.0" eslint-utils "^2.0.0" -"@typescript-eslint/parser@^4.3.0": - version "4.3.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.3.0.tgz#684fc0be6551a2bfcb253991eec3c786a8c063a3" - integrity sha512-JyfRnd72qRuUwItDZ00JNowsSlpQGeKfl9jxwO0FHK1qQ7FbYdoy5S7P+5wh1ISkT2QyAvr2pc9dAemDxzt75g== +"@typescript-eslint/parser@^4.6.0": + version "4.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.6.0.tgz#7e9ff7df2f21d5c8f65f17add3b99eeeec33199d" + integrity sha512-Dj6NJxBhbdbPSZ5DYsQqpR32MwujF772F2H3VojWU6iT4AqL4BKuoNWOPFCoSZvCcADDvQjDpa6OLDAaiZPz2Q== dependencies: - "@typescript-eslint/scope-manager" "4.3.0" - "@typescript-eslint/types" "4.3.0" - "@typescript-eslint/typescript-estree" "4.3.0" + "@typescript-eslint/scope-manager" "4.6.0" + "@typescript-eslint/types" "4.6.0" + "@typescript-eslint/typescript-estree" "4.6.0" debug "^4.1.1" -"@typescript-eslint/scope-manager@4.3.0": - version "4.3.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.3.0.tgz#c743227e087545968080d2362cfb1273842cb6a7" - integrity sha512-cTeyP5SCNE8QBRfc+Lgh4Xpzje46kNUhXYfc3pQWmJif92sjrFuHT9hH4rtOkDTo/si9Klw53yIr+djqGZS1ig== - dependencies: - "@typescript-eslint/types" "4.3.0" - "@typescript-eslint/visitor-keys" "4.3.0" - "@typescript-eslint/scope-manager@4.6.0": version "4.6.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.6.0.tgz#b7d8b57fe354047a72dfb31881d9643092838662" @@ -3320,30 +3319,11 @@ "@typescript-eslint/types" "4.6.0" "@typescript-eslint/visitor-keys" "4.6.0" -"@typescript-eslint/types@4.3.0": - version "4.3.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.3.0.tgz#1f0b2d5e140543e2614f06d48fb3ae95193c6ddf" - integrity sha512-Cx9TpRvlRjOppGsU6Y6KcJnUDOelja2NNCX6AZwtVHRzaJkdytJWMuYiqi8mS35MRNA3cJSwDzXePfmhU6TANw== - "@typescript-eslint/types@4.6.0": version "4.6.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.6.0.tgz#157ca925637fd53c193c6bf226a6c02b752dde2f" integrity sha512-5FAgjqH68SfFG4UTtIFv+rqYJg0nLjfkjD0iv+5O27a0xEeNZ5rZNDvFGZDizlCD1Ifj7MAbSW2DPMrf0E9zjA== -"@typescript-eslint/typescript-estree@4.3.0": - version "4.3.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.3.0.tgz#0edc1068e6b2e4c7fdc54d61e329fce76241cee8" - integrity sha512-ZAI7xjkl+oFdLV/COEz2tAbQbR3XfgqHEGy0rlUXzfGQic6EBCR4s2+WS3cmTPG69aaZckEucBoTxW9PhzHxxw== - dependencies: - "@typescript-eslint/types" "4.3.0" - "@typescript-eslint/visitor-keys" "4.3.0" - debug "^4.1.1" - globby "^11.0.1" - is-glob "^4.0.1" - lodash "^4.17.15" - semver "^7.3.2" - tsutils "^3.17.1" - "@typescript-eslint/typescript-estree@4.6.0": version "4.6.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.6.0.tgz#85bd98dcc8280511cfc5b2ce7b03a9ffa1732b08" @@ -3358,14 +3338,6 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/visitor-keys@4.3.0": - version "4.3.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.3.0.tgz#0e5ab0a09552903edeae205982e8521e17635ae0" - integrity sha512-xZxkuR7XLM6RhvLkgv9yYlTcBHnTULzfnw4i6+z2TGBLy9yljAypQaZl9c3zFvy7PNI7fYWyvKYtohyF8au3cw== - dependencies: - "@typescript-eslint/types" "4.3.0" - eslint-visitor-keys "^2.0.0" - "@typescript-eslint/visitor-keys@4.6.0": version "4.6.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.6.0.tgz#fb05d6393891b0a089b243fc8f9fb8039383d5da" @@ -4372,11 +4344,16 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -camelcase@^6.0.0, camelcase@^6.1.0: +camelcase@^6.0.0: version "6.1.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.1.0.tgz#27dc176173725fb0adf8a48b647f4d7871944d78" integrity sha512-WCMml9ivU60+8rEJgELlFp1gxFcEGxwYleE3bziHEDeqsqAWGHdimB7beBFGjLzVNgPGyDsfgXLQEYMpmIFnVQ== +camelcase@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" + integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== + caniuse-api@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-3.0.0.tgz#5e4d90e2274961d46291997df599e3ed008ee4c0" @@ -4635,12 +4612,12 @@ code-point-at@^1.0.0: resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= -codemaker@^1.13.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/codemaker/-/codemaker-1.13.0.tgz#1b6885305644c6487d68c3f5329f4d1d1c5ee1b3" - integrity sha512-Tr6GcuAYJHAPHMhU5OaRhzJkeJdSqkPL/R8gpSvlQa0EQ2C44W5cWqXYMLy09+pkEVmVm5suMc406opObV1N3A== +codemaker@^1.14.0: + version "1.14.0" + resolved "https://registry.yarnpkg.com/codemaker/-/codemaker-1.14.0.tgz#b49e73d75dc26aa7cbffdfc81e7baa0bd2e4c244" + integrity sha512-QVHiMU6adGEhD6zxilR60OycWyiDFXfRYQceLtwp3qYoZkxJI7bpSr6T1cWiyNH3GpeLNZ8HucY1WreFqx3xhA== dependencies: - camelcase "^6.0.0" + camelcase "^6.2.0" decamelize "^4.0.0" fs-extra "^9.0.1" @@ -5557,22 +5534,22 @@ dedent@^0.7.0: resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" integrity sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw= -deep-equal@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.0.3.tgz#cad1c15277ad78a5c01c49c2dee0f54de8a6a7b0" - integrity sha512-Spqdl4H+ky45I9ByyJtXteOm9CaIrPmnIPmOhrkKGNYWeDgCvJ8jNYVCTjChxW4FqGuZnLHADc8EKRMX6+CgvA== +deep-equal@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.0.4.tgz#6b0b407a074666033169df3acaf128e1c6f3eab6" + integrity sha512-BUfaXrVoCfgkOQY/b09QdO9L3XNoF2XH0A3aY9IQwQL/ZjLOe8FQgCNVl1wiolhsFo8kFdO9zdPViCPbmaJA5w== dependencies: - es-abstract "^1.17.5" + es-abstract "^1.18.0-next.1" es-get-iterator "^1.1.0" is-arguments "^1.0.4" is-date-object "^1.0.2" - is-regex "^1.0.5" + is-regex "^1.1.1" isarray "^2.0.5" - object-is "^1.1.2" + object-is "^1.1.3" object-keys "^1.1.1" - object.assign "^4.1.0" + object.assign "^4.1.1" regexp.prototype.flags "^1.3.0" - side-channel "^1.0.2" + side-channel "^1.0.3" which-boxed-primitive "^1.0.1" which-collection "^1.0.1" which-typed-array "^1.1.2" @@ -6203,7 +6180,7 @@ eslint-plugin-rulesdir@^0.1.0: resolved "https://registry.yarnpkg.com/eslint-plugin-rulesdir/-/eslint-plugin-rulesdir-0.1.0.tgz#ad144d7e98464fda82963eff3fab331aecb2bf08" integrity sha1-rRRNfphGT9qClj7/P6szGuyyvwg= -eslint-plugin-standard@^4.0.1: +eslint-plugin-standard@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.0.2.tgz#021211a9f077e63a6847e7bb9ab4247327ac8e0c" integrity sha512-nKptN8l7jksXkwFk++PhJB3cCDTcXOEyhISIN86Ue2feJ1LFyY3PrY3/xT2keXlJSY5bpmbiTG0f885/YKAvTA== @@ -6233,13 +6210,13 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== -eslint@^7.10.0: - version "7.10.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.10.0.tgz#494edb3e4750fb791133ca379e786a8f648c72b9" - integrity sha512-BDVffmqWl7JJXqCjAK6lWtcQThZB/aP1HXSH1JKwGwv0LQEdvpR7qzNrUT487RM39B5goWuboFad5ovMBmD8yA== +eslint@^7.12.1: + version "7.12.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.12.1.tgz#bd9a81fa67a6cfd51656cdb88812ce49ccec5801" + integrity sha512-HlMTEdr/LicJfN08LB3nM1rRYliDXOmfoO4vj39xN6BLpFzF00hbwBoqHk8UcJ2M/3nlARZWy/mslvGEuZFvsg== dependencies: "@babel/code-frame" "^7.0.0" - "@eslint/eslintrc" "^0.1.3" + "@eslint/eslintrc" "^0.2.1" ajv "^6.10.0" chalk "^4.0.0" cross-spawn "^7.0.2" @@ -6248,7 +6225,7 @@ eslint@^7.10.0: enquirer "^2.3.5" eslint-scope "^5.1.1" eslint-utils "^2.1.0" - eslint-visitor-keys "^1.3.0" + eslint-visitor-keys "^2.0.0" espree "^7.3.0" esquery "^1.2.0" esutils "^2.0.2" @@ -7929,7 +7906,7 @@ is-potential-custom-element-name@^1.0.0: resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.0.tgz#0c52e54bcca391bb2c494b21e8626d7336c6e397" integrity sha1-DFLlS8yjkbssSUsh6GJtczbG45c= -is-regex@^1.0.5, is-regex@^1.1.1: +is-regex@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9" integrity sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg== @@ -8579,7 +8556,7 @@ jest-worker@^26.6.1: merge-stream "^2.0.0" supports-color "^7.0.0" -jest@^26.4.2, jest@^26.6.1: +jest@^26.6.1: version "26.6.1" resolved "https://registry.yarnpkg.com/jest/-/jest-26.6.1.tgz#821e8280d2bdeeed40ac7bc43941dceff0f1b650" integrity sha512-f+ahfqw3Ffy+9vA7sWFGpTmhtKEMsNAZiWBVXDkrpIO73zIz22iimjirnV78kh/eWlylmvLh/0WxHN6fZraZdA== @@ -8690,68 +8667,68 @@ jsesc@~0.5.0: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= -jsii-diff@^1.13.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/jsii-diff/-/jsii-diff-1.13.0.tgz#91f3276dda151fdae2c9a0262666ecdcf44576ea" - integrity sha512-8yc4QjmXzoMjAPVMUD+BJNvBKhqM4sEXR3XUGz3/gCa8tbqvpEGsBjXHEnWlU5BHJU5uUpt0HFF+yEVpDg9YuQ== +jsii-diff@^1.14.0: + version "1.14.0" + resolved "https://registry.yarnpkg.com/jsii-diff/-/jsii-diff-1.14.0.tgz#d9bc6c3df853f52659fb798392280483c9c557b8" + integrity sha512-/8M8C+Qah4U6Dn6Jm4GtGQyjHyn8djSnyzQ+eVG90FbUHRbmNAN/r643AcbqipyFDqim4IjYUnX56EMtR6Xc+Q== dependencies: - "@jsii/spec" "^1.13.0" + "@jsii/spec" "^1.14.0" fs-extra "^9.0.1" - jsii-reflect "^1.13.0" + jsii-reflect "^1.14.0" log4js "^6.3.0" typescript "~3.9.7" - yargs "^16.0.3" + yargs "^16.1.0" -jsii-pacmak@^1.13.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/jsii-pacmak/-/jsii-pacmak-1.13.0.tgz#28cc1cd4013142aa6169a4e04fd14abe8a42c559" - integrity sha512-I297/yAdNnEyEIE2X+Vv2KVdxBOT7KCF/9ZPpPyReAsPfh0RULbUyUH+qhfS9DnblmvjMF8fOjoJHGC5DcZlFQ== +jsii-pacmak@^1.14.0: + version "1.14.0" + resolved "https://registry.yarnpkg.com/jsii-pacmak/-/jsii-pacmak-1.14.0.tgz#febb8c2bad45a06380613fa077c0aca829842fb8" + integrity sha512-6PibxOriIhsiPBxdMBvv+xwDD6JJewooZwWEHbJO6JYT2JzZ4EXxmxZ0PCZk1aIynv39vnaULkoYtjzO4XT4CA== dependencies: - "@jsii/spec" "^1.13.0" + "@jsii/spec" "^1.14.0" clone "^2.1.2" - codemaker "^1.13.0" + codemaker "^1.14.0" commonmark "^0.29.2" escape-string-regexp "^4.0.0" fs-extra "^9.0.1" - jsii-reflect "^1.13.0" - jsii-rosetta "^1.13.0" + jsii-reflect "^1.14.0" + jsii-rosetta "^1.14.0" semver "^7.3.2" spdx-license-list "^6.3.0" xmlbuilder "^15.1.1" - yargs "^16.0.3" + yargs "^16.1.0" -jsii-reflect@^1.13.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/jsii-reflect/-/jsii-reflect-1.13.0.tgz#773531fd5f449094a3fec102f741922a68391424" - integrity sha512-HQPjqIWAkMGg/SbiX+m/3MMdMo0p9wejosQNuiynvOYV9LqCRRbRi7MK3BuK4QeOaUHvJw4b+0bu6eCaD3cWxw== +jsii-reflect@^1.14.0: + version "1.14.0" + resolved "https://registry.yarnpkg.com/jsii-reflect/-/jsii-reflect-1.14.0.tgz#c8c1f1026b45b0cd9022677868d8548b8562ee43" + integrity sha512-LOImMIFu/DgRNdgXloA5OVGOtEOZsm1UQ2qQHQ3O0MHWgqGvyBRYPh7wwgytucB37lGEz8KgphiJ/gmTAcA1oA== dependencies: - "@jsii/spec" "^1.13.0" + "@jsii/spec" "^1.14.0" colors "^1.4.0" fs-extra "^9.0.1" - oo-ascii-tree "^1.13.0" - yargs "^16.0.3" + oo-ascii-tree "^1.14.0" + yargs "^16.1.0" -jsii-rosetta@^1.13.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/jsii-rosetta/-/jsii-rosetta-1.13.0.tgz#b422ac25f882432aea898facdd8f558086827274" - integrity sha512-WN95UohWdG+LYr3VG3Sug2qtcvpXcQTY/Pd68XH3+WW1jmxfoa/P7zu18zofi7zOVA5IFmip+r63ahfs7TIyOw== +jsii-rosetta@^1.14.0: + version "1.14.0" + resolved "https://registry.yarnpkg.com/jsii-rosetta/-/jsii-rosetta-1.14.0.tgz#a31b76720292360acd5009883903c0332772ba5c" + integrity sha512-6giv6Bo4zyC4eIw0vUO2/VRvxavdiASH/YzlRdPFWFDecvkyhGSzFTd+kQ2+y+JrQUSiGnUfduF6S/daLTCVIA== dependencies: - "@jsii/spec" "^1.13.0" + "@jsii/spec" "^1.14.0" commonmark "^0.29.2" fs-extra "^9.0.1" typescript "~3.9.7" - xmldom "^0.3.0" - yargs "^16.0.3" + xmldom "^0.4.0" + yargs "^16.1.0" -jsii@^1.13.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/jsii/-/jsii-1.13.0.tgz#8a2ac2f60cd666d0ed76dc39204321caa7c9c775" - integrity sha512-SA4YEegodByqI04BrRbR29QE+MGHGVQ5wG7byLDjVle0zRfRaJYc2nH13Jy4nhkC1aqBkRwHI9atKUrNDiNa0w== +jsii@^1.14.0: + version "1.14.0" + resolved "https://registry.yarnpkg.com/jsii/-/jsii-1.14.0.tgz#75fc3b2aa2645926a7e432df8d94c1fecdd9d6c9" + integrity sha512-6vW8sdVu3S5t3kVVI7d9hzxhZ8wqz4J3mHBMArbL/qJpUVB3ruF2W0RVPKwi16u4hnYNqE29TbSq+H5qdepKqg== dependencies: - "@jsii/spec" "^1.13.0" + "@jsii/spec" "^1.14.0" case "^1.6.3" colors "^1.4.0" - deep-equal "^2.0.3" + deep-equal "^2.0.4" fs-extra "^9.0.1" log4js "^6.3.0" semver "^7.3.2" @@ -8759,7 +8736,7 @@ jsii@^1.13.0: sort-json "^2.0.0" spdx-license-list "^6.3.0" typescript "~3.9.7" - yargs "^16.0.3" + yargs "^16.1.0" json-diff@^0.5.4: version "0.5.4" @@ -8852,7 +8829,7 @@ jsonparse@^1.2.0: resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= -jsonschema@^1.2.7, jsonschema@^1.4.0: +jsonschema@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.4.0.tgz#1afa34c4bc22190d8e42271ec17ac8b3404f87b2" integrity sha512-/YgW6pRMr6M7C+4o8kS+B/2myEpHCrxO4PEWnqJNBFMjn7EWXqlQ4tGwL6xTHeRplwuZmcAncdvfOad1nT2yMw== @@ -10128,7 +10105,7 @@ object-inspect@^1.8.0: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.8.0.tgz#df807e5ecf53a609cc6bfe93eac3cc7be5b3a9d0" integrity sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA== -object-is@^1.0.1, object-is@^1.1.2: +object-is@^1.0.1, object-is@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.3.tgz#2e3b9e65560137455ee3bd62aec4d90a2ea1cc81" integrity sha512-teyqLvFWzLkq5B9ki8FVWA902UER2qkxmdA4nLf+wjOLAWgxzCWZNCxpDq9MvE8MmhWNr+I8w3BN49Vx36Y6Xg== @@ -10216,10 +10193,10 @@ onetime@^5.1.0: dependencies: mimic-fn "^2.1.0" -oo-ascii-tree@^1.13.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/oo-ascii-tree/-/oo-ascii-tree-1.13.0.tgz#6abe2a34a4d7b1fb4aa5b8488eb00ae58ab67f3a" - integrity sha512-z4OE5yHSNO3F3SDGwNnN4IiTqxiAca0TahL3TbvFzp659UkG0k9PizhQyqmDgPflfyh1C0ULIr0s7b6y7TgBMQ== +oo-ascii-tree@^1.14.0: + version "1.14.0" + resolved "https://registry.yarnpkg.com/oo-ascii-tree/-/oo-ascii-tree-1.14.0.tgz#156f285161a13c5c44cb96fd5e40f1cf3b036661" + integrity sha512-G9MFFuZa8rXMVo4Za8cy9a3uUEsRY7Ru2JZmi/YElM3mqPvYVQqmhGtD2WUzB5q/E3iaGOrT2rI8iFtPImoOCw== open@^7.0.3: version "7.3.0" @@ -11229,12 +11206,11 @@ promise-retry@^1.1.1: err-code "^1.0.0" retry "^0.10.0" -promptly@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/promptly/-/promptly-3.0.3.tgz#e178f722e73d82c60d019462044bccfdd9872f42" - integrity sha512-EWnzOsxVKUjqKeE6SStH1/cO4+DE44QolaoJ4ojGd9z6pcNkpgfJKr1ncwxrOFHSTIzoudo7jG8y0re30/LO1g== +promptly@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/promptly/-/promptly-3.1.0.tgz#7f723392f527f032dc295991060d3be612186ea1" + integrity sha512-ygvIcmkt+eWtrQwI1/w7wDfzfAWI7IJX1AUVsWQEQwTmpQ5jeSyiD1g6NuI9VXWhz8LK5a5Bcngp/sKnOgQtiA== dependencies: - pify "^3.0.0" read "^1.0.4" prompts@^2.0.1: @@ -12143,7 +12119,7 @@ shellwords@^0.1.1: resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== -side-channel@^1.0.2: +side-channel@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.3.tgz#cdc46b057550bbab63706210838df5d4c19519c3" integrity sha512-A6+ByhlLkksFoUepsGxfj5x1gTSrs+OydsRptUxeNCabQpCFUvcwIczgOigI8vhY/OJCnPnyE9rGiwgvr9cS1g== @@ -12163,7 +12139,7 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" -sinon@^9.0.1, sinon@^9.2.0: +sinon@^9.0.1: version "9.2.0" resolved "https://registry.yarnpkg.com/sinon/-/sinon-9.2.0.tgz#1d333967e30023609f7347351ebc0dc964c0f3c9" integrity sha512-eSNXz1XMcGEMHw08NJXSyTHIu6qTCOiN8x9ODACmZpNQpr0aXTBXBnI4xTzQzR+TEpOmLiKowGf9flCuKIzsbw== @@ -12176,6 +12152,19 @@ sinon@^9.0.1, sinon@^9.2.0: nise "^4.0.4" supports-color "^7.1.0" +sinon@^9.2.1: + version "9.2.1" + resolved "https://registry.yarnpkg.com/sinon/-/sinon-9.2.1.tgz#64cc88beac718557055bd8caa526b34a2231be6d" + integrity sha512-naPfsamB5KEE1aiioaoqJ6MEhdUs/2vtI5w1hPAXX/UwvoPjXcwh1m5HiKx0HGgKR8lQSoFIgY5jM6KK8VrS9w== + dependencies: + "@sinonjs/commons" "^1.8.1" + "@sinonjs/fake-timers" "^6.0.1" + "@sinonjs/formatio" "^5.0.1" + "@sinonjs/samsam" "^5.2.0" + diff "^4.0.2" + nise "^4.0.4" + supports-color "^7.1.0" + sisteransi@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" @@ -13193,24 +13182,6 @@ trivial-deferred@^1.0.1: resolved "https://registry.yarnpkg.com/trivial-deferred/-/trivial-deferred-1.0.1.tgz#376d4d29d951d6368a6f7a0ae85c2f4d5e0658f3" integrity sha1-N21NKdlR1jaKb3oK6FwvTV4GWPM= -ts-jest@^26.4.1: - version "26.4.2" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.4.2.tgz#00b6c970bee202ceef7c6e6e9805c4837b22dab8" - integrity sha512-0+MynTTzzbuy5rGjzsCKjxHJk5gY906c/FSaqQ3081+G7dp2Yygfa9hVlbrtNNcztffh1mC6Rs9jb/yHpcjsoQ== - dependencies: - "@jest/create-cache-key-function" "^26.5.0" - "@types/jest" "26.x" - bs-logger "0.x" - buffer-from "1.x" - fast-json-stable-stringify "2.x" - jest-util "^26.1.0" - json5 "2.x" - lodash.memoize "4.x" - make-error "1.x" - mkdirp "1.x" - semver "7.x" - yargs-parser "20.x" - ts-jest@^26.4.3: version "26.4.3" resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.4.3.tgz#d153a616033e7ec8544b97ddbe2638cbe38d53db" @@ -13619,6 +13590,11 @@ uuid@^8.3.0: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.0.tgz#ab738085ca22dc9a8c92725e459b1d507df5d6ea" integrity sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ== +uuid@^8.3.1: + version "8.3.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.1.tgz#2ba2e6ca000da60fce5a196954ab241131e05a31" + integrity sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg== + v8-compile-cache@^2.0.0, v8-compile-cache@^2.0.3: version "2.1.1" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz#54bc3cdd43317bca91e35dcaf305b1a7237de745" @@ -13965,10 +13941,10 @@ xmlchars@^2.1.1, xmlchars@^2.2.0: resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== -xmldom@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.3.0.tgz#e625457f4300b5df9c2e1ecb776147ece47f3e5a" - integrity sha512-z9s6k3wxE+aZHgXYxSTpGDo7BYOUfJsIRyoZiX6HTjwpwfS2wpQBQKa2fD+ShLyPkqDYo5ud7KitmLZ2Cd6r0g== +xmldom@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.4.0.tgz#8771e482a333af44587e30ce026f0998c23f3830" + integrity sha512-2E93k08T30Ugs+34HBSTQLVtpi6mCddaY8uO+pMNk1pqSjV5vElzn4mmh6KLxN3hki8rNcHSYzILoh3TEWORvA== xregexp@2.0.0: version "2.0.0" From 52bf72b02738926c6c9ff21a976facfdee18af90 Mon Sep 17 00:00:00 2001 From: AWS CDK Team Date: Thu, 29 Oct 2020 14:19:11 +0000 Subject: [PATCH 003/314] chore(release): 1.71.0 --- CHANGELOG.md | 41 +++++++++++++++++++++++++++++++++++++++++ lerna.json | 2 +- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bb4d99fb0643..6993f622a281f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,47 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.71.0](https://github.com/aws/aws-cdk/compare/v1.70.0...v1.71.0) (2020-10-29) + + +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES + +* **synthetics:** `runtime` is now a required property. + +### ⚠ BREAKING CHANGES + +* **core:** Creation stack traces for `Lazy` values are no longer +captured by default. The `CDK_DEBUG=true` environment variable must be +set in order to capture stack traces (this is also achieved by using the +`--debug` option of the `cdk` CLI). Users should not need those stack +traces most of the time, and should only enable creation stack trace +captures when tyring to troubleshoot a resolution error that they are +otherwise unable to trace back. + +### Features + +* **autoscaling:** CloudFormation init for ASGs ([#9674](https://github.com/aws/aws-cdk/issues/9674)) ([bdf1d30](https://github.com/aws/aws-cdk/commit/bdf1d30a08c034703ca05eebe8e9d0cc5e070949)), closes [#9065](https://github.com/aws/aws-cdk/issues/9065) [#9664](https://github.com/aws/aws-cdk/issues/9664) +* **cli:** `--all` flag to select all stacks ([#10745](https://github.com/aws/aws-cdk/issues/10745)) ([bcd9d0a](https://github.com/aws/aws-cdk/commit/bcd9d0aa900aceb32e50031ea1a8f8a21e07a963)), closes [#3222](https://github.com/aws/aws-cdk/issues/3222) +* **cli:** change virtualenv directory to `.venv` to comply with python recommendation ([#10995](https://github.com/aws/aws-cdk/issues/10995)) ([a4a41b5](https://github.com/aws/aws-cdk/commit/a4a41b5e006110304b51ee55c34e91cc3f129281)), closes [#9134](https://github.com/aws/aws-cdk/issues/9134) +* **cli:** disable version check ([#10975](https://github.com/aws/aws-cdk/issues/10975)) ([575e47e](https://github.com/aws/aws-cdk/commit/575e47e4d6e8b89b4402ddc4b7bdea985b1e6edf)), closes [#10974](https://github.com/aws/aws-cdk/issues/10974) +* **core:** make creationStack collection for Lazy opt-in ([#11170](https://github.com/aws/aws-cdk/issues/11170)) ([a3fae02](https://github.com/aws/aws-cdk/commit/a3fae02a5256a25fca011bab2a2aa9be58121c6e)) +* **init-templates:** Java init template tests updated to JUnit 5 ([#11101](https://github.com/aws/aws-cdk/issues/11101)) ([e0c00a1](https://github.com/aws/aws-cdk/commit/e0c00a1aafe82d390fd1859090e0bbe1ac249043)), closes [#10694](https://github.com/aws/aws-cdk/issues/10694) +* upgrade "constructs" to 3.2.0 ([#11145](https://github.com/aws/aws-cdk/issues/11145)) ([d85e3ed](https://github.com/aws/aws-cdk/commit/d85e3eda8a0d97d60d178922bf9db33a31f4abe9)) +* **redshift:** add publiclyAccessible prop ([#11162](https://github.com/aws/aws-cdk/issues/11162)) ([9f8a6de](https://github.com/aws/aws-cdk/commit/9f8a6dee36105f7bbf7f433075881d5068fb5779)), closes [#11161](https://github.com/aws/aws-cdk/issues/11161) +* **stepfunctions-tasks:** Support for Athena APIs: StartQueryExecution, StopQueryExeuction, GetQueryResults and GetQueryExecution ([#11045](https://github.com/aws/aws-cdk/issues/11045)) ([19180cc](https://github.com/aws/aws-cdk/commit/19180cc7dd2e3cfbbcc82ef2b45f3a8f60894f8c)) +* **synthetics:** The CloudWatch Synthetics Construct Library is now in Developer Preview ([#11180](https://github.com/aws/aws-cdk/issues/11180)) ([b3b5f48](https://github.com/aws/aws-cdk/commit/b3b5f48ba457d382b6289997f164444ac6dfed0a)) + + +### Bug Fixes + +* **aws-rds/aws-secretmanager:** `credentials.fromSecret` does not access `secretsmanager.ISecret` ([#11033](https://github.com/aws/aws-cdk/issues/11033)) ([35ad608](https://github.com/aws/aws-cdk/commit/35ad608fb0c9801756b0557b460e3587684b7110)), closes [#11015](https://github.com/aws/aws-cdk/issues/11015) +* **bootstrap:** same-account modern bootstrapping still requires policy ARNs ([#9867](https://github.com/aws/aws-cdk/issues/9867)) ([f5ab374](https://github.com/aws/aws-cdk/commit/f5ab374eafeafff02f386be445d10863717b51ed)), closes [#8571](https://github.com/aws/aws-cdk/issues/8571) +* **codebuild:** ReportGroup name is ignored ([#11080](https://github.com/aws/aws-cdk/issues/11080)) ([1e2250a](https://github.com/aws/aws-cdk/commit/1e2250aa8345ee9fe22ed2a7395ba28994fe8ff1)), closes [#11052](https://github.com/aws/aws-cdk/issues/11052) +* **core:** assets are duplicated between nested Cloud Assemblies ([#11008](https://github.com/aws/aws-cdk/issues/11008)) ([c84217f](https://github.com/aws/aws-cdk/commit/c84217f94cf66cae800d434350b3b3d7676a03b3)), closes [#10877](https://github.com/aws/aws-cdk/issues/10877) [#9627](https://github.com/aws/aws-cdk/issues/9627) [#9917](https://github.com/aws/aws-cdk/issues/9917) +* **ec2:** `CfnInit` cannot be used with custom constructs ([#11167](https://github.com/aws/aws-cdk/issues/11167)) ([01c52c8](https://github.com/aws/aws-cdk/commit/01c52c84118b101de9aaca3091673b16d6871386)) +* **region-info:** incorrect S3 static website endpoint for us-gov-west-1 ([#10920](https://github.com/aws/aws-cdk/issues/10920)) ([dde9c55](https://github.com/aws/aws-cdk/commit/dde9c5530478e9371726278ef34b82da19624a4b)), closes [40aws-cdk/region-info/build-tools/generate-static-data.ts#L47-L49](https://github.com/40aws-cdk/region-info/build-tools/generate-static-data.ts/issues/L47-L49) + + ## [1.70.0](https://github.com/aws/aws-cdk/compare/v1.69.0...v1.70.0) (2020-10-23) diff --git a/lerna.json b/lerna.json index a530390f60415..16f32cc984c13 100644 --- a/lerna.json +++ b/lerna.json @@ -11,5 +11,5 @@ "tools/*" ], "rejectCycles": "true", - "version": "1.70.0" + "version": "1.71.0" } From 54f54f34e3e904c1ce9f95bc46ffe07170637c8d Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Thu, 29 Oct 2020 15:13:33 +0000 Subject: [PATCH 004/314] chore: attributions for all bundled third party dependencies (#11195) Attribute all bundled third party dependencies in the corresponding packages' NOTICE files along with their license. Internal ref: tiny/57ei9h5p Added a 'pkglint' rule that ensures that these are present. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-codepipeline-actions/NOTICE | 30 +++ packages/@aws-cdk/aws-ecr-assets/NOTICE | 21 ++ packages/@aws-cdk/aws-eks/NOTICE | 21 ++ .../@aws-cdk/cloud-assembly-schema/NOTICE | 44 ++++ packages/@aws-cdk/core/NOTICE | 38 +++ packages/@aws-cdk/cx-api/NOTICE | 21 ++ packages/@aws-cdk/yaml-cfn/NOTICE | 21 ++ packages/monocdk/NOTICE | 121 ++++++++++ tools/pkglint/lib/packagejson.ts | 30 ++- tools/pkglint/lib/rules.ts | 28 ++- tools/pkglint/lib/util.ts | 13 ++ tools/pkglint/test/fake-module.ts | 60 +++++ tools/pkglint/test/rules.test.ts | 217 ++++++++++++++---- 13 files changed, 611 insertions(+), 54 deletions(-) create mode 100644 tools/pkglint/test/fake-module.ts diff --git a/packages/@aws-cdk/aws-codepipeline-actions/NOTICE b/packages/@aws-cdk/aws-codepipeline-actions/NOTICE index bfccac9a7f69c..f7178de244080 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/NOTICE +++ b/packages/@aws-cdk/aws-codepipeline-actions/NOTICE @@ -1,2 +1,32 @@ AWS Cloud Development Kit (AWS CDK) Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +------------------------------------------------------------------------------- + +The AWS CDK includes the following third-party software/licensing: + +** case - https://www.npmjs.com/package/case +Copyright (c) 2013 Nathan Bubna + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +---------------- \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecr-assets/NOTICE b/packages/@aws-cdk/aws-ecr-assets/NOTICE index bfccac9a7f69c..7aa28b59a89a0 100644 --- a/packages/@aws-cdk/aws-ecr-assets/NOTICE +++ b/packages/@aws-cdk/aws-ecr-assets/NOTICE @@ -1,2 +1,23 @@ AWS Cloud Development Kit (AWS CDK) Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +------------------------------------------------------------------------------- + +The AWS CDK includes the following third-party software/licensing: + +** minimatch - https://www.npmjs.com/package/minimatch +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---------------- \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eks/NOTICE b/packages/@aws-cdk/aws-eks/NOTICE index bfccac9a7f69c..280d721a219ce 100644 --- a/packages/@aws-cdk/aws-eks/NOTICE +++ b/packages/@aws-cdk/aws-eks/NOTICE @@ -1,2 +1,23 @@ AWS Cloud Development Kit (AWS CDK) Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +------------------------------------------------------------------------------- + +The AWS CDK includes the following third-party software/licensing: + +** yaml - https://www.npmjs.com/package/yaml +Copyright 2018 Eemeli Aro + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +---------------- \ No newline at end of file diff --git a/packages/@aws-cdk/cloud-assembly-schema/NOTICE b/packages/@aws-cdk/cloud-assembly-schema/NOTICE index bfccac9a7f69c..c6b9659936f50 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/NOTICE +++ b/packages/@aws-cdk/cloud-assembly-schema/NOTICE @@ -1,2 +1,46 @@ AWS Cloud Development Kit (AWS CDK) Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +------------------------------------------------------------------------------- + +The AWS CDK includes the following third-party software/licensing: + +** jsonschema - https://www.npmjs.com/package/jsonschema +Copyright (C) 2012-2015 Tom de Grunt + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- + +** semver - https://www.npmjs.com/package/semver +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---------------- \ No newline at end of file diff --git a/packages/@aws-cdk/core/NOTICE b/packages/@aws-cdk/core/NOTICE index bfccac9a7f69c..d103738dc9483 100644 --- a/packages/@aws-cdk/core/NOTICE +++ b/packages/@aws-cdk/core/NOTICE @@ -1,2 +1,40 @@ AWS Cloud Development Kit (AWS CDK) Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +------------------------------------------------------------------------------- + +The AWS CDK includes the following third-party software/licensing: + +** minimatch - https://www.npmjs.com/package/minimatch +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---------------- + +** fs-extra - https://www.npmjs.com/package/fs-extra +Copyright (c) 2011-2017 JP Richardson + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files +(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- \ No newline at end of file diff --git a/packages/@aws-cdk/cx-api/NOTICE b/packages/@aws-cdk/cx-api/NOTICE index bfccac9a7f69c..32d2a32e00e25 100644 --- a/packages/@aws-cdk/cx-api/NOTICE +++ b/packages/@aws-cdk/cx-api/NOTICE @@ -1,2 +1,23 @@ AWS Cloud Development Kit (AWS CDK) Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +------------------------------------------------------------------------------- + +The AWS CDK includes the following third-party software/licensing: + +** semver - https://www.npmjs.com/package/semver +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---------------- \ No newline at end of file diff --git a/packages/@aws-cdk/yaml-cfn/NOTICE b/packages/@aws-cdk/yaml-cfn/NOTICE index bfccac9a7f69c..280d721a219ce 100644 --- a/packages/@aws-cdk/yaml-cfn/NOTICE +++ b/packages/@aws-cdk/yaml-cfn/NOTICE @@ -1,2 +1,23 @@ AWS Cloud Development Kit (AWS CDK) Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +------------------------------------------------------------------------------- + +The AWS CDK includes the following third-party software/licensing: + +** yaml - https://www.npmjs.com/package/yaml +Copyright 2018 Eemeli Aro + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +---------------- \ No newline at end of file diff --git a/packages/monocdk/NOTICE b/packages/monocdk/NOTICE index bfccac9a7f69c..392ba117cb70b 100644 --- a/packages/monocdk/NOTICE +++ b/packages/monocdk/NOTICE @@ -1,2 +1,123 @@ AWS Cloud Development Kit (AWS CDK) Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +------------------------------------------------------------------------------- + +The AWS CDK includes the following third-party software/licensing: + +** minimatch - https://www.npmjs.com/package/minimatch +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---------------- + +** fs-extra - https://www.npmjs.com/package/fs-extra +Copyright (c) 2011-2017 JP Richardson + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files +(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** semver - https://www.npmjs.com/package/semver +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---------------- + +** yaml - https://www.npmjs.com/package/yaml +Copyright 2018 Eemeli Aro + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +---------------- + +** case - https://www.npmjs.com/package/case +Copyright (c) 2013 Nathan Bubna + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** jsonschema - https://www.npmjs.com/package/jsonschema +Copyright (C) 2012-2015 Tom de Grunt + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- \ No newline at end of file diff --git a/tools/pkglint/lib/packagejson.ts b/tools/pkglint/lib/packagejson.ts index dabd3c67be6de..86be0b30cdc50 100644 --- a/tools/pkglint/lib/packagejson.ts +++ b/tools/pkglint/lib/packagejson.ts @@ -63,7 +63,7 @@ export class PackageJson { private readonly includeRules: RegExp[]; private readonly excludeRules: RegExp[]; - private reports: Report[] = []; + private _reports: Report[] = []; constructor(public readonly fullPath: string) { this.json = JSON.parse(fs.readFileSync(fullPath, { encoding: 'utf-8' })); @@ -97,7 +97,11 @@ export class PackageJson { } public report(report: Report) { - this.reports.push(report); + this._reports.push(report); + } + + public get reports() { + return this._reports; } public get dependencies(): {[key: string]: string} { @@ -113,8 +117,8 @@ export class PackageJson { } public applyFixes() { - const fixable = this.reports.filter(r => r.fix); - const nonFixable = this.reports.filter(r => !r.fix); + const fixable = this._reports.filter(r => r.fix); + const nonFixable = this._reports.filter(r => !r.fix); if (fixable.length > 0) { process.stderr.write(`${path.resolve(this.fullPath)}\n`); @@ -126,20 +130,20 @@ export class PackageJson { } this.save(); - this.reports = nonFixable; + this._reports = nonFixable; } public displayReports(relativeTo: string) { if (this.hasReports) { process.stderr.write(`In package ${colors.blue(path.relative(relativeTo, this.fullPath))}\n`); - this.reports.forEach(report => { + this._reports.forEach(report => { process.stderr.write(`- [${colors.yellow(report.ruleName)}] ${report.message}${report.fix ? colors.green(' (fixable)') : ''}\n`); }); } } public get hasReports() { - return this.reports.length > 0; + return this._reports.length > 0; } /** @@ -205,6 +209,10 @@ export class PackageJson { return Object.keys(this.json.dependencies || {}).filter(predicate).map(name => ({ name, version: this.json.dependencies[name] })); } + public getBundledDependencies(): string[] { + return this.json.bundledDependencies ?? []; + } + /** * Adds a devDependency to the package. */ @@ -275,6 +283,14 @@ export class PackageJson { return lines.indexOf(line) !== -1; } + /** + * Whether the package-level file begins with the specified lines + */ + public fileBeginsWith(fileName: string, ...lines: string[]): boolean { + const fileLines = this.readFileLinesSync(fileName).slice(0, lines.length); + return fileLines.every((fileLine, index) => fileLine === lines[index]); + } + /** * Whether the package-level file content is the given text */ diff --git a/tools/pkglint/lib/rules.ts b/tools/pkglint/lib/rules.ts index a897d0e9e5ce2..9a9e56980c214 100644 --- a/tools/pkglint/lib/rules.ts +++ b/tools/pkglint/lib/rules.ts @@ -8,7 +8,7 @@ import { PackageJson, ValidationRule } from './packagejson'; import { deepGet, deepSet, expectDevDependency, expectJSON, - fileShouldBe, fileShouldContain, + fileShouldBe, fileShouldBeginWith, fileShouldContain, fileShouldNotContain, findInnerPackages, monoRepoRoot, @@ -131,7 +131,31 @@ export class NoticeFile extends ValidationRule { public readonly name = 'license/notice-file'; public validate(pkg: PackageJson): void { - fileShouldBe(this.name, pkg, 'NOTICE', NOTICE); + fileShouldBeginWith(this.name, pkg, 'NOTICE', ...NOTICE.split('\n')); + } +} + +/** + * NOTICE files must contain 3rd party attributions + */ +export class ThirdPartyAttributions extends ValidationRule { + public readonly name = 'license/3p-attributions'; + + public validate(pkg: PackageJson): void { + if (pkg.json.private) { + return; + } + const bundled = pkg.getBundledDependencies(); + const lines = fs.readFileSync(path.join(pkg.packageRoot, 'NOTICE'), { encoding: 'utf8' }).split('\n'); + for (const dep of bundled) { + const re = new RegExp(`^\\*\\* ${dep}`); + if (!lines.find(l => re.test(l))) { + pkg.report({ + message: `Missing attribution for bundled dependency '${dep}' in NOTICE file`, + ruleName: this.name, + }); + } + } } } diff --git a/tools/pkglint/lib/util.ts b/tools/pkglint/lib/util.ts index 13ecfc06f5d9d..10b4415a6c3ca 100644 --- a/tools/pkglint/lib/util.ts +++ b/tools/pkglint/lib/util.ts @@ -72,6 +72,19 @@ export function fileShouldBe(ruleName: string, pkg: PackageJson, fileName: strin } } +/** + * Export a package-level file to contain specific content + */ +export function fileShouldBeginWith(ruleName: string, pkg: PackageJson, fileName: string, ...lines: string[]) { + const isContent = pkg.fileBeginsWith(fileName, ...lines); + if (!isContent) { + pkg.report({ + ruleName, + message: `${fileName} does NOT begin with ${lines}'`, + }); + } +} + /** * Enforce a dev dependency */ diff --git a/tools/pkglint/test/fake-module.ts b/tools/pkglint/test/fake-module.ts new file mode 100644 index 0000000000000..535805b2106d8 --- /dev/null +++ b/tools/pkglint/test/fake-module.ts @@ -0,0 +1,60 @@ +import * as os from 'os'; +import * as path from 'path'; +import * as fs from 'fs-extra'; + +export interface FakeModuleProps { + /** + * The contents of the package json. + * If an empty object, i.e. `{}`, is provided, an empty file is created. + * @default - no package json will be created + */ + readonly packagejson?: any; + /** + * The contents of the README.md file. Each item in the array represents a single line. + * If an empty list is provided, an empty file is created. + * @default - no README.md file will be created + */ + readonly readme?: string[]; + /** + * The contents of the NOTICE file. Each item in the array represents a single line. + * If an empty list is provided, an empty file is created. + * @default - no NOTICE file will be created + */ + readonly notice?: string[]; +} + +export class FakeModule { + private _tmpdir: string | undefined; + private cleanedUp: boolean = false; + + constructor(private readonly props: FakeModuleProps = {}) { + } + + public async tmpdir(): Promise { + if (this.cleanedUp) { + throw new Error('Cannot re-create cleaned up fake module'); + } + if (!this._tmpdir) { + const tmpdir = await fs.mkdtemp(path.join(os.tmpdir(), 'pkglint-rules-test-')); + await fs.writeFile(path.join(tmpdir, 'package.json'), JSON.stringify(this.props.packagejson ?? {}), { encoding: 'utf8' }); + if (this.props.readme !== undefined) { + const contents = this.props.readme.join('\n'); + await fs.writeFile(path.join(tmpdir, 'README.md'), contents, { encoding: 'utf8' }); + } + if (this.props.notice !== undefined) { + const contents = this.props.notice.join('\n'); + await fs.writeFile(path.join(tmpdir, 'NOTICE'), contents, { encoding: 'utf8' }); + } + this._tmpdir = tmpdir; + } + return this._tmpdir; + } + + public async cleanup() { + if (!this.cleanedUp && this._tmpdir) { + await fs.emptyDir(this._tmpdir); + await fs.rmdir(this._tmpdir); + } + this.cleanedUp = true; + } +} \ No newline at end of file diff --git a/tools/pkglint/test/rules.test.ts b/tools/pkglint/test/rules.test.ts index c2629c959226b..db07e312daa0b 100644 --- a/tools/pkglint/test/rules.test.ts +++ b/tools/pkglint/test/rules.test.ts @@ -1,19 +1,35 @@ -import * as os from 'os'; import * as path from 'path'; import * as fs from 'fs-extra'; import { PackageJson } from '../lib/packagejson'; import * as rules from '../lib/rules'; +import { FakeModule } from './fake-module'; describe('FeatureStabilityRule', () => { + let fakeModule: FakeModule | undefined; + + beforeEach(() => { + fakeModule = undefined; + }); + + afterEach(async () => { + if (fakeModule) { + await fakeModule.cleanup(); + } + }); + test('feature table is rendered', async () => { - const dirPath = await fakeModuleDir({ - features: [ - { name: 'Experimental Feature', stability: 'Experimental' }, - { name: 'Stable Feature', stability: 'Stable' }, - { name: 'Dev Preview Feature', stability: 'Developer Preview' }, - { name: 'Not Implemented Feature', stability: 'Not Implemented' }, - ], + fakeModule = new FakeModule({ + packagejson: { + features: [ + { name: 'Experimental Feature', stability: 'Experimental' }, + { name: 'Stable Feature', stability: 'Stable' }, + { name: 'Dev Preview Feature', stability: 'Developer Preview' }, + { name: 'Not Implemented Feature', stability: 'Not Implemented' }, + ], + }, + readme: [], }); + const dirPath = await fakeModule.tmpdir(); const rule = new rules.FeatureStabilityRule(); const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); @@ -30,10 +46,14 @@ describe('FeatureStabilityRule', () => { }); test('CFN Resources is rendered', async () => { - const dirPath = await fakeModuleDir({ - 'cdk-build': { cloudformation: 'Foo::Bar' }, - 'features': [], + fakeModule = new FakeModule({ + packagejson: { + 'cdk-build': { cloudformation: 'Foo::Bar' }, + 'features': [], + }, + readme: [], }); + const dirPath = await fakeModule.tmpdir(); const rule = new rules.FeatureStabilityRule(); const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); @@ -47,10 +67,14 @@ describe('FeatureStabilityRule', () => { describe('banner notices', () => { test('CFN Resources', async () => { - const dirPath = await fakeModuleDir({ - 'cdk-build': { cloudformation: 'Foo::Bar' }, - 'features': [], + fakeModule = new FakeModule({ + packagejson: { + 'cdk-build': { cloudformation: 'Foo::Bar' }, + 'features': [], + }, + readme: [], }); + const dirPath = await fakeModule.tmpdir(); const rule = new rules.FeatureStabilityRule(); const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); @@ -62,11 +86,15 @@ describe('FeatureStabilityRule', () => { }); test('experimental', async () => { - const dirPath = await fakeModuleDir({ - features: [ - { name: 'Feature', stability: 'Experimental' }, - ], + fakeModule = new FakeModule({ + packagejson: { + features: [ + { name: 'Feature', stability: 'Experimental' }, + ], + }, + readme: [], }); + const dirPath = await fakeModule.tmpdir(); const rule = new rules.FeatureStabilityRule(); const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); @@ -80,11 +108,15 @@ describe('FeatureStabilityRule', () => { }); test('developer preview', async () => { - const dirPath = await fakeModuleDir({ - features: [ - { name: 'Feature', stability: 'Developer Preview' }, - ], + fakeModule = new FakeModule({ + packagejson: { + features: [ + { name: 'Feature', stability: 'Developer Preview' }, + ], + }, + readme: [], }); + const dirPath = await fakeModule.tmpdir(); const rule = new rules.FeatureStabilityRule(); const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); @@ -98,11 +130,15 @@ describe('FeatureStabilityRule', () => { }); test('stable', async () => { - const dirPath = await fakeModuleDir({ - features: [ - { name: 'Feature', stability: 'Stable' }, - ], + fakeModule = new FakeModule({ + packagejson: { + features: [ + { name: 'Feature', stability: 'Stable' }, + ], + }, + readme: [], }); + const dirPath = await fakeModule.tmpdir(); const rule = new rules.FeatureStabilityRule(); const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); @@ -117,12 +153,16 @@ describe('FeatureStabilityRule', () => { }); test('skip if package private', async () => { - const dirPath = await fakeModuleDir({ - private: true, - features: [ - { name: 'Experimental Feature', stability: 'Experimental' }, - ], + fakeModule = new FakeModule({ + packagejson: { + private: true, + features: [ + { name: 'Experimental Feature', stability: 'Experimental' }, + ], + }, + readme: [], }); + const dirPath = await fakeModule.tmpdir(); const rule = new rules.FeatureStabilityRule(); const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); @@ -132,7 +172,11 @@ describe('FeatureStabilityRule', () => { }); test('skip if features is not specified', async () => { - const dirPath = await fakeModuleDir({}); + fakeModule = new FakeModule({ + packagejson: {}, + readme: [], + }); + const dirPath = await fakeModule.tmpdir(); const rule = new rules.FeatureStabilityRule(); const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); @@ -142,11 +186,14 @@ describe('FeatureStabilityRule', () => { }); test('skip if README.md is missing', async () => { - const dirPath = await fakeModuleDir({ - features: [ - { name: 'Experimental Feature', stability: 'Experimental' }, - ], - }, false); + fakeModule = new FakeModule({ + packagejson: { + features: [ + { name: 'Experimental Feature', stability: 'Experimental' }, + ], + }, + }); + const dirPath = await fakeModule.tmpdir(); const rule = new rules.FeatureStabilityRule(); const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); @@ -156,11 +203,91 @@ describe('FeatureStabilityRule', () => { }); }); -async function fakeModuleDir(json: { [key: string]: any }, createReadme: boolean = true): Promise { - const tmpdir = await fs.mkdtemp(path.join(os.tmpdir(), 'pkglint-rules-test-')); - await fs.writeFile(path.join(tmpdir, 'package.json'), JSON.stringify(json)); - if (createReadme) { - await fs.createFile(path.join(tmpdir, 'README.md')); - } - return tmpdir; -} \ No newline at end of file +describe('ThirdPartyAttributions', () => { + let fakeModule: FakeModule | undefined; + + beforeEach(() => { + fakeModule = undefined; + }); + + afterEach(async () => { + if (fakeModule) { + await fakeModule.cleanup(); + } + }); + + test('errors when attribution missing for bundled dependencies', async() => { + fakeModule = new FakeModule({ + packagejson: { + bundledDependencies: ['dep1', 'dep2'], + }, + notice: [], + }); + const dirPath = await fakeModule.tmpdir(); + + const rule = new rules.ThirdPartyAttributions(); + + const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); + rule.validate(pkgJson); + + expect(pkgJson.hasReports).toBe(true); + expect(pkgJson.reports.length).toEqual(2); + for (const report of pkgJson.reports) { + expect(report.ruleName).toEqual('license/3p-attributions'); + } + }); + + test('passes when attribution is present', async() => { + fakeModule = new FakeModule({ + packagejson: { + bundledDependencies: ['dep1', 'dep2'], + }, + notice: [ + '** dep1 - https://link-somewhere', + '** dep2 - https://link-elsewhere', + ], + }); + const dirPath = await fakeModule.tmpdir(); + + const rule = new rules.ThirdPartyAttributions(); + + const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); + rule.validate(pkgJson); + + expect(pkgJson.hasReports).toBe(false); + }); + + test('skipped when no bundled dependencies', async() => { + fakeModule = new FakeModule({ + packagejson: { + }, + notice: [], + }); + const dirPath = await fakeModule.tmpdir(); + + const rule = new rules.ThirdPartyAttributions(); + + const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); + rule.validate(pkgJson); + + expect(pkgJson.hasReports).toBe(false); + }); + + test('skipped for private packages', async () => { + fakeModule = new FakeModule({ + packagejson: { + private: true, + bundledDependencies: ['dep1', 'dep2'], + }, + notice: [], + }); + const dirPath = await fakeModule.tmpdir(); + + const rule = new rules.ThirdPartyAttributions(); + + const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); + rule.validate(pkgJson); + + expect(pkgJson.hasReports).toBe(false); + }); +}); \ No newline at end of file From 0c8264adf782d1adbfe8d538186a71093d9c8834 Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Thu, 29 Oct 2020 15:43:00 +0000 Subject: [PATCH 005/314] fix(apigateway): changes to gateway response does not trigger auto deployment (#11068) The auto deployment feature is implemented by recording changes to the RestApi and replacing the AWS::ApiGateway::Deployment resource on any changes. The GatewayResponse construct was not registered, and hence no deployments occurred on changes to this. fixes #10963 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-apigateway/lib/gateway-response.ts | 18 ++- .../test/gateway-response.test.ts | 114 ++++++++++++++++++ .../aws-apigateway/test/restapi.test.ts | 91 +------------- 3 files changed, 130 insertions(+), 93 deletions(-) create mode 100644 packages/@aws-cdk/aws-apigateway/test/gateway-response.test.ts diff --git a/packages/@aws-cdk/aws-apigateway/lib/gateway-response.ts b/packages/@aws-cdk/aws-apigateway/lib/gateway-response.ts index e28ba7355000a..7c2aabbd0704e 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/gateway-response.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/gateway-response.ts @@ -1,6 +1,6 @@ import { IResource, Resource } from '@aws-cdk/core'; import { Construct } from 'constructs'; -import { CfnGatewayResponse } from './apigateway.generated'; +import { CfnGatewayResponse, CfnGatewayResponseProps } from './apigateway.generated'; import { IRestApi } from './restapi'; /** @@ -58,13 +58,25 @@ export class GatewayResponse extends Resource implements IGatewayResponse { constructor(scope: Construct, id: string, props: GatewayResponseProps) { super(scope, id); - const resource = new CfnGatewayResponse(this, 'Resource', { + const gatewayResponseProps: CfnGatewayResponseProps = { restApiId: props.restApi.restApiId, responseType: props.type.responseType, responseParameters: this.buildResponseParameters(props.responseHeaders), responseTemplates: props.templates, statusCode: props.statusCode, - }); + }; + + const resource = new CfnGatewayResponse(this, 'Resource', gatewayResponseProps); + + const deployment = props.restApi.latestDeployment; + if (deployment) { + deployment.node.addDependency(resource); + deployment.addToLogicalId({ + gatewayResponse: { + ...gatewayResponseProps, + }, + }); + } this.node.defaultChild = resource; } diff --git a/packages/@aws-cdk/aws-apigateway/test/gateway-response.test.ts b/packages/@aws-cdk/aws-apigateway/test/gateway-response.test.ts new file mode 100644 index 0000000000000..3c96d86c1410d --- /dev/null +++ b/packages/@aws-cdk/aws-apigateway/test/gateway-response.test.ts @@ -0,0 +1,114 @@ +import '@aws-cdk/assert/jest'; +import { ABSENT } from '@aws-cdk/assert'; +import { Stack } from '@aws-cdk/core'; +import { ResponseType, RestApi } from '../lib'; + +describe('gateway response', () => { + test('gateway response resource is created', () => { + // GIVEN + const stack = new Stack(); + + // WHEN + const api = new RestApi(stack, 'restapi', { + deploy: false, + cloudWatchRole: false, + }); + + api.root.addMethod('GET'); + api.addGatewayResponse('test-response', { + type: ResponseType.ACCESS_DENIED, + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGateway::GatewayResponse', { + ResponseType: 'ACCESS_DENIED', + RestApiId: stack.resolve(api.restApiId), + StatusCode: ABSENT, + ResponseParameters: ABSENT, + ResponseTemplates: ABSENT, + }); + }); + + test('gateway response resource is created with parameters', () => { + // GIVEN + const stack = new Stack(); + + // WHEN + const api = new RestApi(stack, 'restapi', { + deploy: false, + cloudWatchRole: false, + }); + + api.root.addMethod('GET'); + api.addGatewayResponse('test-response', { + type: ResponseType.AUTHORIZER_FAILURE, + statusCode: '500', + responseHeaders: { + 'Access-Control-Allow-Origin': 'test.com', + 'test-key': 'test-value', + }, + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGateway::GatewayResponse', { + ResponseType: 'AUTHORIZER_FAILURE', + RestApiId: stack.resolve(api.restApiId), + StatusCode: '500', + ResponseParameters: { + 'gatewayresponse.header.Access-Control-Allow-Origin': 'test.com', + 'gatewayresponse.header.test-key': 'test-value', + }, + ResponseTemplates: ABSENT, + }); + }); + + test('gateway response resource is created with templates', () => { + // GIVEN + const stack = new Stack(); + + // WHEN + const api = new RestApi(stack, 'restapi', { + deploy: false, + cloudWatchRole: false, + }); + + api.root.addMethod('GET'); + api.addGatewayResponse('test-response', { + type: ResponseType.AUTHORIZER_FAILURE, + statusCode: '500', + templates: { + 'application/json': '{ "message": $context.error.messageString, "statusCode": "488" }', + }, + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGateway::GatewayResponse', { + ResponseType: 'AUTHORIZER_FAILURE', + RestApiId: stack.resolve(api.restApiId), + StatusCode: '500', + ResponseParameters: ABSENT, + ResponseTemplates: { + 'application/json': '{ "message": $context.error.messageString, "statusCode": "488" }', + }, + }); + }); + + test('deployment changes when gateway response is updated', () => { + // GIVEN + const stack = new Stack(); + const restApi = new RestApi(stack, 'restapi', { + deploy: true, + }); + const deploymentResource = restApi.latestDeployment!.node.defaultChild; + const logicalId = (deploymentResource as any).calculateLogicalId(); + + // WHEN + restApi.addGatewayResponse('gatewayResponse', { + type: ResponseType.AUTHORIZER_CONFIGURATION_ERROR, + }); + const newLogicalId = (deploymentResource as any).calculateLogicalId(); + + // THEN + expect(newLogicalId).not.toEqual(logicalId); + }); +}); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/restapi.test.ts b/packages/@aws-cdk/aws-apigateway/test/restapi.test.ts index 8b1c159e2baa5..0617ae6f8eeaf 100644 --- a/packages/@aws-cdk/aws-apigateway/test/restapi.test.ts +++ b/packages/@aws-cdk/aws-apigateway/test/restapi.test.ts @@ -1,5 +1,5 @@ import '@aws-cdk/assert/jest'; -import { ABSENT, ResourcePart, SynthUtils } from '@aws-cdk/assert'; +import { ResourcePart, SynthUtils } from '@aws-cdk/assert'; import { GatewayVpcEndpoint } from '@aws-cdk/aws-ec2'; import { App, CfnElement, CfnResource, Stack } from '@aws-cdk/core'; import * as apigw from '../lib'; @@ -807,95 +807,6 @@ describe('restapi', () => { }); }); - test('gateway response resource is created', () => { - // GIVEN - const stack = new Stack(); - - // WHEN - const api = new apigw.RestApi(stack, 'restapi', { - deploy: false, - cloudWatchRole: false, - }); - - api.root.addMethod('GET'); - api.addGatewayResponse('test-response', { - type: apigw.ResponseType.ACCESS_DENIED, - }); - - // THEN - expect(stack).toHaveResource('AWS::ApiGateway::GatewayResponse', { - ResponseType: 'ACCESS_DENIED', - RestApiId: stack.resolve(api.restApiId), - StatusCode: ABSENT, - ResponseParameters: ABSENT, - ResponseTemplates: ABSENT, - }); - }); - - test('gateway response resource is created with parameters', () => { - // GIVEN - const stack = new Stack(); - - // WHEN - const api = new apigw.RestApi(stack, 'restapi', { - deploy: false, - cloudWatchRole: false, - }); - - api.root.addMethod('GET'); - api.addGatewayResponse('test-response', { - type: apigw.ResponseType.AUTHORIZER_FAILURE, - statusCode: '500', - responseHeaders: { - 'Access-Control-Allow-Origin': 'test.com', - 'test-key': 'test-value', - }, - }); - - // THEN - expect(stack).toHaveResource('AWS::ApiGateway::GatewayResponse', { - ResponseType: 'AUTHORIZER_FAILURE', - RestApiId: stack.resolve(api.restApiId), - StatusCode: '500', - ResponseParameters: { - 'gatewayresponse.header.Access-Control-Allow-Origin': 'test.com', - 'gatewayresponse.header.test-key': 'test-value', - }, - ResponseTemplates: ABSENT, - }); - }); - - test('gateway response resource is created with templates', () => { - // GIVEN - const stack = new Stack(); - - // WHEN - const api = new apigw.RestApi(stack, 'restapi', { - deploy: false, - cloudWatchRole: false, - }); - - api.root.addMethod('GET'); - api.addGatewayResponse('test-response', { - type: apigw.ResponseType.AUTHORIZER_FAILURE, - statusCode: '500', - templates: { - 'application/json': '{ "message": $context.error.messageString, "statusCode": "488" }', - }, - }); - - // THEN - expect(stack).toHaveResource('AWS::ApiGateway::GatewayResponse', { - ResponseType: 'AUTHORIZER_FAILURE', - RestApiId: stack.resolve(api.restApiId), - StatusCode: '500', - ResponseParameters: ABSENT, - ResponseTemplates: { - 'application/json': '{ "message": $context.error.messageString, "statusCode": "488" }', - }, - }); - }); - test('"restApi" and "api" properties return the RestApi correctly', () => { // GIVEN const stack = new Stack(); From 87887a3faf24f5fde608135429585c6521637764 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20W=C3=BCrbach?= Date: Thu, 29 Oct 2020 21:05:06 +0100 Subject: [PATCH 006/314] fix(core): support docker engine v20.10.0-beta1 (#11124) Running an image by only providing the hash fails on docker engine v20.10.0-beta1 with invalid repository name. ``` docker run --rm b92402b29db56f1bbace74c369bedef5ee296a76fd8545426255247da70ce21a docker: Error response from daemon: invalid repository name (b92402b29db56f1bbace74c369bedef5ee296a76fd8545426255247da70ce21a), cannot specify 64-byte hexadecimal strings. ``` Using `docker run --rm sha256:b92402b29db56f1bbace74c369bedef5ee296a76fd8545426255247da70ce21a` instead works as expected. I haven't been able to pinpoint the exact change yet as this seems not to be mentioned in https://github.com/docker/docker-ce/blob/0fc7084265b3786a5867ec311d3f916af7bf7a23/CHANGELOG.md Created an issue with docker to clarify whether this is a regression or a planned change https://github.com/docker/cli/issues/2815 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/core/lib/bundling.ts | 4 ++-- packages/@aws-cdk/core/test/bundling.test.ts | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/@aws-cdk/core/lib/bundling.ts b/packages/@aws-cdk/core/lib/bundling.ts index 8326d8f55e3aa..234b3ce969b42 100644 --- a/packages/@aws-cdk/core/lib/bundling.ts +++ b/packages/@aws-cdk/core/lib/bundling.ts @@ -117,7 +117,7 @@ export class BundlingDockerImage { const docker = dockerExec(dockerArgs); - const match = docker.stdout.toString().match(/sha256:([a-z0-9]+)/); + const match = docker.stdout.toString().match(/sha256:[a-z0-9]+/); if (!match) { throw new Error('Failed to extract image ID from Docker build output'); @@ -129,7 +129,7 @@ export class BundlingDockerImage { // different every time the Docker layer cache is cleared, due primarily to // timestamps. const hash = FileSystem.fingerprint(path, { extraHash: JSON.stringify(options) }); - return new BundlingDockerImage(match[1], hash); + return new BundlingDockerImage(match[0], hash); } /** @param image The Docker image */ diff --git a/packages/@aws-cdk/core/test/bundling.test.ts b/packages/@aws-cdk/core/test/bundling.test.ts index a33ee4a96b087..5bc4c0d55e1be 100644 --- a/packages/@aws-cdk/core/test/bundling.test.ts +++ b/packages/@aws-cdk/core/test/bundling.test.ts @@ -46,11 +46,11 @@ nodeunitShim({ }, 'bundling with image from asset'(test: Test) { - const imageId = 'abcdef123456'; + const imageId = 'sha256:abcdef123456'; const spawnSyncStub = sinon.stub(child_process, 'spawnSync').returns({ status: 0, stderr: Buffer.from('stderr'), - stdout: Buffer.from(`sha256:${imageId}`), + stdout: Buffer.from(imageId), pid: 123, output: ['stdout', 'stderr'], signal: null, @@ -133,11 +133,11 @@ nodeunitShim({ }, 'BundlerDockerImage json is the bundler image if building an image'(test: Test) { - const imageId = 'abcdef123456'; + const imageId = 'sha256:abcdef123456'; sinon.stub(child_process, 'spawnSync').returns({ status: 0, stderr: Buffer.from('stderr'), - stdout: Buffer.from(`sha256:${imageId}`), + stdout: Buffer.from(imageId), pid: 123, output: ['stdout', 'stderr'], signal: null, From 79200e75b2468ccdee46154d049f3ceb30bb51e1 Mon Sep 17 00:00:00 2001 From: Dominic Fezzie Date: Thu, 29 Oct 2020 14:49:42 -0700 Subject: [PATCH 007/314] feat(appmesh): add Virtual Gateways and Gateway Routes (#10879) ---- This is a draft PR to resolve #9533 Takes an approach for creating protocol specific Gateway Routes as described in https://github.com/aws/aws-cdk/pull/10793 This is a draft as I am seeking feedback on the implementation and approach for creating per protocol variants of App Mesh Resources. Before merging: - [x] Approach for per protocol variants defined - [x] Update Gateway Listeners to follow the same pattern - [x] Add more integ tests *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-appmesh/README.md | 101 +++++-- .../aws-appmesh/lib/gateway-route-spec.ts | 209 ++++++++++++++ .../@aws-cdk/aws-appmesh/lib/gateway-route.ts | 168 ++++++++++++ packages/@aws-cdk/aws-appmesh/lib/index.ts | 4 + packages/@aws-cdk/aws-appmesh/lib/mesh.ts | 16 ++ .../@aws-cdk/aws-appmesh/lib/private/utils.ts | 41 +++ .../aws-appmesh/lib/shared-interfaces.ts | 24 +- .../lib/virtual-gateway-listener.ts | 227 +++++++++++++++ .../aws-appmesh/lib/virtual-gateway.ts | 226 +++++++++++++++ .../@aws-cdk/aws-appmesh/lib/virtual-node.ts | 41 +-- packages/@aws-cdk/aws-appmesh/package.json | 27 ++ .../aws-appmesh/test/integ.mesh.expected.json | 176 ++++++++++++ .../@aws-cdk/aws-appmesh/test/integ.mesh.ts | 36 +++ .../aws-appmesh/test/test.gateway-route.ts | 152 +++++++++++ .../aws-appmesh/test/test.virtual-gateway.ts | 258 ++++++++++++++++++ 15 files changed, 1640 insertions(+), 66 deletions(-) create mode 100644 packages/@aws-cdk/aws-appmesh/lib/gateway-route-spec.ts create mode 100644 packages/@aws-cdk/aws-appmesh/lib/gateway-route.ts create mode 100644 packages/@aws-cdk/aws-appmesh/lib/private/utils.ts create mode 100644 packages/@aws-cdk/aws-appmesh/lib/virtual-gateway-listener.ts create mode 100644 packages/@aws-cdk/aws-appmesh/lib/virtual-gateway.ts create mode 100644 packages/@aws-cdk/aws-appmesh/test/test.gateway-route.ts create mode 100644 packages/@aws-cdk/aws-appmesh/test/test.virtual-gateway.ts diff --git a/packages/@aws-cdk/aws-appmesh/README.md b/packages/@aws-cdk/aws-appmesh/README.md index 1becd4cf81772..e38a8ea49a9e9 100644 --- a/packages/@aws-cdk/aws-appmesh/README.md +++ b/packages/@aws-cdk/aws-appmesh/README.md @@ -126,8 +126,6 @@ mesh.addVirtualService('virtual-service', { A `virtual node` acts as a logical pointer to a particular task group, such as an Amazon ECS service or a Kubernetes deployment. -![Virtual node logical diagram](https://docs.aws.amazon.com/app-mesh/latest/userguide/images/virtual_node.png) - When you create a `virtual node`, you must specify the DNS service discovery hostname for your task group. Any inbound traffic that your `virtual node` expects should be specified as a listener. Any outbound traffic that your `virtual node` expects to reach should be specified as a backend. The response metadata for your new `virtual node` contains the Amazon Resource Name (ARN) that is associated with the `virtual node`. Set this value (either the full ARN or the truncated resource name) as the APPMESH_VIRTUAL_NODE_NAME environment variable for your task group's Envoy proxy container in your task definition or pod spec. For example, the value could be mesh/default/virtualNode/simpleapp. This is then mapped to the node.id and node.cluster Envoy parameters. @@ -144,7 +142,6 @@ const namespace = new servicediscovery.PrivateDnsNamespace(this, 'test-namespace const service = namespace.createService('Svc'); const node = mesh.addVirtualNode('virtual-node', { - dnsHostName: 'node-a', cloudMapService: service, listener: { portMapping: { @@ -170,7 +167,6 @@ Create a `VirtualNode` with the the constructor and add tags. ```typescript const node = new VirtualNode(this, 'node', { mesh, - dnsHostName: 'node-1', cloudMapService: service, listener: { portMapping: { @@ -193,7 +189,7 @@ const node = new VirtualNode(this, 'node', { cdk.Tag.add(node, 'Environment', 'Dev'); ``` -The listeners property can be left blank and added later with the `mesh.addListeners()` method. The `healthcheck` property is optional but if specifying a listener, the `portMappings` must contain at least one property. +The listeners property can be left blank and added later with the `node.addListeners()` method. The `healthcheck` property is optional but if specifying a listener, the `portMappings` must contain at least one property. ## Adding a Route @@ -235,34 +231,79 @@ router.addRoute('route', { }); ``` -Multiple routes may also be added at once to different applications or targets. +## Adding a Virtual Gateway + +A _virtual gateway_ allows resources outside your mesh to communicate to resources that are inside your mesh. +The virtual gateway represents an Envoy proxy running in an Amazon ECS task, in a Kubernetes service, or on an Amazon EC2 instance. +Unlike a virtual node, which represents an Envoy running with an application, a virtual gateway represents Envoy deployed by itself. + +A virtual gateway is similar to a virtual node in that it has a listener that accepts traffic for a particular port and protocol (HTTP, HTTP2, GRPC). +The traffic that the virtual gateway receives, is directed to other services in your mesh, +using rules defined in gateway routes which can be added to your virtual gateway. + +Create a virtual gateway with the constructor: ```typescript -ratingsRouter.addRoutes( - ['route1', 'route2'], - [ - { - routeTargets: [ - { - virtualNode, - weight: 1, - }, - ], - prefix: `/path-to-app`, - routeType: RouteType.HTTP, +const gateway = new appmesh.VirtualGateway(stack, 'gateway', { + mesh: mesh, + listeners: [appmesh.VirtualGatewayListener.httpGatewayListener({ + port: 443, + healthCheck: { + interval: cdk.Duration.seconds(10), }, - { - routeTargets: [ - { - virtualNode: virtualNode2, - weight: 1, - }, - ], - prefix: `/path-to-app2`, - routeType: RouteType.HTTP, + })], + accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout'), + virtualGatewayName: 'virtualGateway', +}); +``` + +Add a virtual gateway directly to the mesh: + +```typescript +const gateway = mesh.addVirtualGateway('gateway', { + accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout'), + virtualGatewayName: 'virtualGateway', + listeners: [appmesh.VirtualGatewayListener.httpGatewayListener({ + port: 443, + healthCheck: { + interval: cdk.Duration.seconds(10), + }, + })], +}); +``` + +The listeners field can be omitted which will default to an HTTP Listener on port 8080. +A gateway route can be added using the `gateway.addGatewayRoute()` method. + +## Adding a Gateway Route + +A _gateway route_ is attached to a virtual gateway and routes traffic to an existing virtual service. +If a route matches a request, it can distribute traffic to a target virtual service. + +For HTTP based routes, the match field can be used to match on a route prefix. +By default, an HTTP based route will match on `/`. All matches must start with a leading `/`. + +```typescript +gateway.addGatewayRoute('gateway-route-http', { + routeSpec: appmesh.GatewayRouteSpec.httpRouteSpec({ + routeTarget: virtualService, + match: { + prefixMatch: '/', }, - ] -); + }), +}); ``` -The number of `route ids` and `route targets` must match as each route needs to have a unique name per router. +For GRPC based routes, the match field can be used to match on service names. +You cannot omit the field, and must specify a match for these routes. + +```typescript +gateway.addGatewayRoute('gateway-route-grpc', { + routeSpec: appmesh.GatewayRouteSpec.grpcRouteSpec({ + routeTarget: virtualService, + match: { + serviceName: 'my-service.default.svc.cluster.local', + }, + }), +}); +``` diff --git a/packages/@aws-cdk/aws-appmesh/lib/gateway-route-spec.ts b/packages/@aws-cdk/aws-appmesh/lib/gateway-route-spec.ts new file mode 100644 index 0000000000000..b75890ece1453 --- /dev/null +++ b/packages/@aws-cdk/aws-appmesh/lib/gateway-route-spec.ts @@ -0,0 +1,209 @@ +import * as cdk from '@aws-cdk/core'; +import { CfnGatewayRoute } from './appmesh.generated'; +import { Protocol } from './shared-interfaces'; +import { IVirtualService } from './virtual-service'; + +/** + * The criterion for determining a request match for this GatewayRoute + */ +export interface HttpGatewayRouteMatch { + /** + * Specifies the path to match requests with. + * This parameter must always start with /, which by itself matches all requests to the virtual service name. + * You can also match for path-based routing of requests. For example, if your virtual service name is my-service.local + * and you want the route to match requests to my-service.local/metrics, your prefix should be /metrics. + */ + readonly prefixPath: string; +} + +/** + * The criterion for determining a request match for this GatewayRoute + */ +export interface GrpcGatewayRouteMatch { + /** + * The fully qualified domain name for the service to match from the request + */ + readonly serviceName: string; +} + +/** + * Properties specific for HTTP Based GatewayRoutes + */ +export interface HttpRouteSpecProps { + /** + * The criterion for determining a request match for this GatewayRoute + * + * @default - matches on '/' + */ + readonly match?: HttpGatewayRouteMatch; + + /** + * The VirtualService this GatewayRoute directs traffic to + */ + readonly routeTarget: IVirtualService; +} + +/** + * Properties specific for a GRPC GatewayRoute + */ +export interface GrpcRouteSpecProps { + /** + * The criterion for determining a request match for this GatewayRoute + */ + readonly match: GrpcGatewayRouteMatch; + + /** + * The VirtualService this GatewayRoute directs traffic to + */ + readonly routeTarget: IVirtualService; +} + +/** + * All Properties for GatewayRoute Specs + */ +export interface GatewayRouteSpecConfig { + /** + * The spec for an http gateway route + * + * @default - no http spec + */ + readonly httpSpecConfig?: CfnGatewayRoute.HttpGatewayRouteProperty; + + /** + * The spec for an http2 gateway route + * + * @default - no http2 spec + */ + readonly http2SpecConfig?: CfnGatewayRoute.HttpGatewayRouteProperty; + + /** + * The spec for a grpc gateway route + * + * @default - no grpc spec + */ + readonly grpcSpecConfig?: CfnGatewayRoute.GrpcGatewayRouteProperty; +} + +/** + * Used to generate specs with different protocols for a GatewayRoute + */ +export abstract class GatewayRouteSpec { + /** + * Creates an HTTP Based GatewayRoute + * + * @param props - no http gateway route + */ + public static httpRouteSpec(props: HttpRouteSpecProps): GatewayRouteSpec { + return new HttpGatewayRouteSpec(props, Protocol.HTTP); + } + + /** + * Creates an HTTP2 Based GatewayRoute + * + * @param props - no http2 gateway route + */ + public static http2RouteSpec(props: HttpRouteSpecProps): GatewayRouteSpec { + return new HttpGatewayRouteSpec(props, Protocol.HTTP2); + } + + /** + * Creates an GRPC Based GatewayRoute + * + * @param props - no grpc gateway route + */ + public static grpcRouteSpec(props: GrpcRouteSpecProps): GatewayRouteSpec { + return new GrpcGatewayRouteSpec(props); + } + + /** + * Called when the GatewayRouteSpec type is initialized. Can be used to enforce + * mutual exclusivity with future properties + */ + public abstract bind(scope: cdk.Construct): GatewayRouteSpecConfig; +} + +class HttpGatewayRouteSpec extends GatewayRouteSpec { + /** + * The criterion for determining a request match for this GatewayRoute. + * + * @default - matches on '/' + */ + readonly match?: HttpGatewayRouteMatch; + + /** + * The VirtualService this GatewayRoute directs traffic to + */ + readonly routeTarget: IVirtualService; + + /** + * Type of route you are creating + */ + readonly routeType: Protocol; + + constructor(props: HttpRouteSpecProps, protocol: Protocol.HTTP | Protocol.HTTP2) { + super(); + this.routeTarget = props.routeTarget; + this.routeType = protocol; + this.match = props.match; + } + + public bind(_scope: cdk.Construct): GatewayRouteSpecConfig { + const prefixPath = this.match ? this.match.prefixPath : '/'; + if (prefixPath[0] != '/') { + throw new Error(`Prefix Path must start with \'/\', got: ${prefixPath}`); + } + const httpConfig: CfnGatewayRoute.HttpGatewayRouteProperty = { + match: { + prefix: prefixPath, + }, + action: { + target: { + virtualService: { + virtualServiceName: this.routeTarget.virtualServiceName, + }, + }, + }, + }; + return { + httpSpecConfig: this.routeType === Protocol.HTTP ? httpConfig : undefined, + http2SpecConfig: this.routeType === Protocol.HTTP2 ? httpConfig : undefined, + }; + } +} + +class GrpcGatewayRouteSpec extends GatewayRouteSpec { + /** + * The criterion for determining a request match for this GatewayRoute. + * + * @default - no default + */ + readonly match: GrpcGatewayRouteMatch; + + /** + * The VirtualService this GatewayRoute directs traffic to + */ + readonly routeTarget: IVirtualService; + + constructor(props: GrpcRouteSpecProps) { + super(); + this.match = props.match; + this.routeTarget = props.routeTarget; + } + + public bind(_scope: cdk.Construct): GatewayRouteSpecConfig { + return { + grpcSpecConfig: { + action: { + target: { + virtualService: { + virtualServiceName: this.routeTarget.virtualServiceName, + }, + }, + }, + match: { + serviceName: this.match.serviceName, + }, + }, + }; + } +} diff --git a/packages/@aws-cdk/aws-appmesh/lib/gateway-route.ts b/packages/@aws-cdk/aws-appmesh/lib/gateway-route.ts new file mode 100644 index 0000000000000..cc00c0f632ac3 --- /dev/null +++ b/packages/@aws-cdk/aws-appmesh/lib/gateway-route.ts @@ -0,0 +1,168 @@ +import * as cdk from '@aws-cdk/core'; +import { Construct } from 'constructs'; +import { CfnGatewayRoute } from './appmesh.generated'; +import { GatewayRouteSpec } from './gateway-route-spec'; +import { IVirtualGateway, VirtualGateway } from './virtual-gateway'; + +/** + * Interface for which all GatewayRoute based classes MUST implement + */ +export interface IGatewayRoute extends cdk.IResource { + /** + * The name of the GatewayRoute + * + * @attribute + */ + readonly gatewayRouteName: string, + + /** + * The Amazon Resource Name (ARN) for the GatewayRoute + * + * @attribute + */ + readonly gatewayRouteArn: string; + + /** + * The VirtualGateway the GatewayRoute belongs to + */ + readonly virtualGateway: IVirtualGateway; +} + +/** + * Basic configuration properties for a GatewayRoute + */ +export interface GatewayRouteBaseProps { + /** + * The name of the GatewayRoute + * + * @default - an automatically generated name + */ + readonly gatewayRouteName?: string; + + /** + * What protocol the route uses + */ + readonly routeSpec: GatewayRouteSpec; +} + +/** + * Properties to define a new GatewayRoute + */ +export interface GatewayRouteProps extends GatewayRouteBaseProps { + /** + * The VirtualGateway this GatewayRoute is associated with + */ + readonly virtualGateway: IVirtualGateway; +} + +/** + * GatewayRoute represents a new or existing gateway route attached to a VirtualGateway and Mesh + * + * @see https://docs.aws.amazon.com/app-mesh/latest/userguide/gateway-routes.html + */ +export class GatewayRoute extends cdk.Resource implements IGatewayRoute { + /** + * Import an existing GatewayRoute given an ARN + */ + public static fromGatewayRouteArn(scope: Construct, id: string, gatewayRouteArn: string): IGatewayRoute { + return new ImportedGatewayRoute(scope, id, { gatewayRouteArn }); + } + + /** + * The name of the GatewayRoute + */ + public readonly gatewayRouteName: string; + + /** + * The Amazon Resource Name (ARN) for the GatewayRoute + */ + public readonly gatewayRouteArn: string; + + /** + * The VirtualGateway this GatewayRoute is a part of + */ + public readonly virtualGateway: IVirtualGateway; + + constructor(scope: Construct, id: string, props: GatewayRouteProps) { + super(scope, id, { + physicalName: props.gatewayRouteName || cdk.Lazy.stringValue({ produce: () => this.node.uniqueId }), + }); + + this.virtualGateway = props.virtualGateway; + const routeSpecConfig = props.routeSpec.bind(this); + + const gatewayRoute = new CfnGatewayRoute(this, 'Resource', { + gatewayRouteName: this.physicalName, + meshName: props.virtualGateway.mesh.meshName, + spec: { + httpRoute: routeSpecConfig.httpSpecConfig, + http2Route: routeSpecConfig.http2SpecConfig, + grpcRoute: routeSpecConfig.grpcSpecConfig, + }, + virtualGatewayName: this.virtualGateway.virtualGatewayName, + }); + + this.gatewayRouteName = this.getResourceNameAttribute(gatewayRoute.attrGatewayRouteName); + this.gatewayRouteArn = this.getResourceArnAttribute(gatewayRoute.ref, { + service: 'appmesh', + resource: `mesh/${props.virtualGateway.mesh.meshName}/virtualRouter/${this.virtualGateway.virtualGatewayName}/gatewayRoute`, + resourceName: this.physicalName, + }); + } +} + +/** + * Interface with properties necessary to import a reusable GatewayRoute + */ +interface GatewayRouteAttributes { + /** + * The name of the GatewayRoute + */ + readonly gatewayRouteName?: string; + + /** + * The Amazon Resource Name (ARN) for the GatewayRoute + */ + readonly gatewayRouteArn?: string; + + /** + * The name of the mesh this GatewayRoute is associated with + */ + readonly meshName?: string; + + /** + * The name of the Virtual Gateway this GatewayRoute is associated with + */ + readonly virtualGateway?: IVirtualGateway; +} + +/** + * Represents an imported IGatewayRoute + */ +class ImportedGatewayRoute extends cdk.Resource implements IGatewayRoute { + /** + * The name of the GatewayRoute + */ + public gatewayRouteName: string; + + /** + * The Amazon Resource Name (ARN) for the GatewayRoute + */ + public gatewayRouteArn: string; + + /** + * The VirtualGateway the GatewayRoute belongs to + */ + public virtualGateway: IVirtualGateway; + + constructor(scope: Construct, id: string, props: GatewayRouteAttributes) { + super(scope, id); + if (props.gatewayRouteArn) { + this.gatewayRouteArn = props.gatewayRouteArn; + this.gatewayRouteName = cdk.Fn.select(4, cdk.Fn.split('/', cdk.Stack.of(scope).parseArn(props.gatewayRouteArn).resourceName!)); + this.virtualGateway = VirtualGateway.fromVirtualGatewayArn(this, 'virtualGateway', props.gatewayRouteArn); + } else { + throw new Error('Need gatewayRouteArn'); + } + } +} diff --git a/packages/@aws-cdk/aws-appmesh/lib/index.ts b/packages/@aws-cdk/aws-appmesh/lib/index.ts index ff36676e2ec1d..69cdfd8d2e3c6 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/index.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/index.ts @@ -6,3 +6,7 @@ export * from './shared-interfaces'; export * from './virtual-node'; export * from './virtual-router'; export * from './virtual-service'; +export * from './virtual-gateway'; +export * from './virtual-gateway-listener'; +export * from './gateway-route'; +export * from './gateway-route-spec'; diff --git a/packages/@aws-cdk/aws-appmesh/lib/mesh.ts b/packages/@aws-cdk/aws-appmesh/lib/mesh.ts index 2aaded50f99bc..961128151b537 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/mesh.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/mesh.ts @@ -1,6 +1,7 @@ import * as cdk from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnMesh } from './appmesh.generated'; +import { VirtualGateway, VirtualGatewayBaseProps } from './virtual-gateway'; import { VirtualNode, VirtualNodeBaseProps } from './virtual-node'; import { VirtualRouter, VirtualRouterBaseProps } from './virtual-router'; import { VirtualService, VirtualServiceBaseProps } from './virtual-service'; @@ -54,6 +55,11 @@ export interface IMesh extends cdk.IResource { * Adds a VirtualNode to the Mesh */ addVirtualNode(id: string, props?: VirtualNodeBaseProps): VirtualNode; + + /** + * Adds a VirtualGateway to the Mesh + */ + addVirtualGateway(id: string, props?: VirtualGatewayBaseProps): VirtualGateway; } /** @@ -99,6 +105,16 @@ abstract class MeshBase extends cdk.Resource implements IMesh { mesh: this, }); } + + /** + * Adds a VirtualGateway to the Mesh + */ + addVirtualGateway(id: string, props?: VirtualGatewayBaseProps): VirtualGateway { + return new VirtualGateway(this, id, { + ...props, + mesh: this, + }); + } } /** diff --git a/packages/@aws-cdk/aws-appmesh/lib/private/utils.ts b/packages/@aws-cdk/aws-appmesh/lib/private/utils.ts new file mode 100644 index 0000000000000..0f63fdaf05253 --- /dev/null +++ b/packages/@aws-cdk/aws-appmesh/lib/private/utils.ts @@ -0,0 +1,41 @@ +import * as cdk from '@aws-cdk/core'; +import { CfnVirtualGateway, CfnVirtualNode } from '../appmesh.generated'; + +type AppMeshHealthCheck = CfnVirtualNode.HealthCheckProperty | CfnVirtualGateway.VirtualGatewayHealthCheckPolicyProperty + +/** + * Validates health check properties, throws an error if they are misconfigured. + * + * @param healthCheck Healthcheck property from a Virtual Node or Virtual Gateway + */ +export function validateHealthChecks(healthCheck: AppMeshHealthCheck) { + (Object.keys(healthCheck) as Array) + .filter((key) => + HEALTH_CHECK_PROPERTY_THRESHOLDS[key] && + typeof healthCheck[key] === 'number' && + !cdk.Token.isUnresolved(healthCheck[key]), + ).map((key) => { + const [min, max] = HEALTH_CHECK_PROPERTY_THRESHOLDS[key]!; + const value = healthCheck[key]!; + + if (value < min) { + throw new Error(`The value of '${key}' is below the minimum threshold (expected >=${min}, got ${value})`); + } + if (value > max) { + throw new Error(`The value of '${key}' is above the maximum threshold (expected <=${max}, got ${value})`); + } + }); +} + +/** + * Minimum and maximum thresholds for HeathCheck numeric properties + * + * @see https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HealthCheckPolicy.html + */ +const HEALTH_CHECK_PROPERTY_THRESHOLDS: {[key in (keyof AppMeshHealthCheck)]?: [number, number]} = { + healthyThreshold: [2, 10], + intervalMillis: [5000, 300000], + port: [1, 65535], + timeoutMillis: [2000, 60000], + unhealthyThreshold: [2, 10], +}; \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appmesh/lib/shared-interfaces.ts b/packages/@aws-cdk/aws-appmesh/lib/shared-interfaces.ts index 7cd55df23565d..39111389b0a03 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/shared-interfaces.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/shared-interfaces.ts @@ -1,5 +1,5 @@ import * as cdk from '@aws-cdk/core'; -import { CfnVirtualNode } from './appmesh.generated'; +import { CfnVirtualGateway, CfnVirtualNode } from './appmesh.generated'; /** * Enum of supported AppMesh protocols @@ -23,24 +23,28 @@ export interface HealthCheck { * @default 2 */ readonly healthyThreshold?: number; + /** * Interval in milliseconds to re-check * * @default 5 seconds */ readonly interval?: cdk.Duration; + /** * The path where the application expects any health-checks, this can also be the application path. * * @default / */ readonly path?: string; + /** * The TCP port number for the healthcheck * * @default - same as corresponding port mapping */ readonly port?: number; + /** * The protocol to use for the healthcheck, for convinience a const enum has been defined. * Protocol.HTTP or Protocol.TCP @@ -48,12 +52,14 @@ export interface HealthCheck { * @default - same as corresponding port mapping */ readonly protocol?: Protocol; + /** * Timeout in milli-seconds for the healthcheck to be considered a fail. * * @default 2 seconds */ readonly timeout?: cdk.Duration; + /** * Number of failed attempts before considering the node DOWN. * @@ -82,7 +88,7 @@ export interface PortMapping { } /** - * Represents the properties needed to define healthy and active listeners for nodes. + * Represents the properties needed to define healthy and active listeners for nodes */ export interface VirtualNodeListener { /** @@ -111,6 +117,13 @@ export interface AccessLogConfig { * @default - no access logging */ readonly virtualNodeAccessLog?: CfnVirtualNode.AccessLogProperty; + + /** + * VirtualGateway CFN configuration for Access Logging + * + * @default - no access logging + */ + readonly virtualGatewayAccessLog?: CfnVirtualGateway.VirtualGatewayAccessLogProperty; } /** @@ -156,6 +169,11 @@ class FileAccessLog extends AccessLog { path: this.filePath, }, }, + virtualGatewayAccessLog: { + file: { + path: this.filePath, + }, + }, }; } -} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway-listener.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway-listener.ts new file mode 100644 index 0000000000000..a690c022f8c32 --- /dev/null +++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway-listener.ts @@ -0,0 +1,227 @@ +import * as cdk from '@aws-cdk/core'; +import { CfnVirtualGateway } from './appmesh.generated'; +import { validateHealthChecks } from './private/utils'; +import { HealthCheck, Protocol } from './shared-interfaces'; + +/** + * Represents the properties needed to define HTTP Listeners for a VirtualGateway + */ +export interface HttpGatewayListenerProps { + /** + * Port to listen for connections on + * + * @default - 8080 + */ + readonly port?: number + + /** + * The health check information for the listener + * + * @default - no healthcheck + */ + readonly healthCheck?: HealthCheck; +} + +/** + * Represents the properties needed to define GRPC Listeners for a VirtualGateway + */ +export interface GrpcGatewayListenerProps { + /** + * Port to listen for connections on + * + * @default - 8080 + */ + readonly port?: number + + /** + * The health check information for the listener + * + * @default - no healthcheck + */ + readonly healthCheck?: HealthCheck; +} + +/** + * Properties for a VirtualGateway listener + */ +export interface VirtualGatewayListenerConfig { + /** + * Single listener config for a VirtualGateway + */ + readonly listener: CfnVirtualGateway.VirtualGatewayListenerProperty, +} + +/** + * Represents the properties needed to define listeners for a VirtualGateway + */ +export abstract class VirtualGatewayListener { + /** + * Returns an HTTP Listener for a VirtualGateway + */ + public static httpGatewayListener(props: HttpGatewayListenerProps = {}): VirtualGatewayListener { + return new HttpGatewayListener(props); + } + + /** + * Returns an HTTP2 Listener for a VirtualGateway + */ + public static http2GatewayListener(props: HttpGatewayListenerProps = {}): VirtualGatewayListener { + return new Http2GatewayListener(props); + } + + /** + * Returns a GRPC Listener for a VirtualGateway + */ + public static grpcGatewayListener(props: GrpcGatewayListenerProps = {}): VirtualGatewayListener { + return new GrpcGatewayListener(props); + } + + /** + * Protocol the listener implements + */ + protected abstract protocol: Protocol; + + /** + * Port to listen for connections on + */ + protected abstract port: number; + + /** + * Health checking strategy upstream nodes should use when communicating with the listener + */ + protected abstract healthCheck?: HealthCheck; + + /** + * Called when the GatewayListener type is initialized. Can be used to enforce + * mutual exclusivity + */ + public abstract bind(scope: cdk.Construct): VirtualGatewayListenerConfig; + + protected renderHealthCheck(hc: HealthCheck): CfnVirtualGateway.VirtualGatewayHealthCheckPolicyProperty | undefined { + if (hc.protocol === Protocol.TCP) { + throw new Error('TCP health checks are not permitted for gateway listeners'); + } + + if (hc.protocol === Protocol.GRPC && hc.path) { + throw new Error('The path property cannot be set with Protocol.GRPC'); + } + + const protocol = hc.protocol? hc.protocol : this.protocol; + + const healthCheck: CfnVirtualGateway.VirtualGatewayHealthCheckPolicyProperty = { + healthyThreshold: hc.healthyThreshold || 2, + intervalMillis: (hc.interval || cdk.Duration.seconds(5)).toMilliseconds(), // min + path: hc.path || ((protocol === Protocol.HTTP || protocol === Protocol.HTTP2) ? '/' : undefined), + port: hc.port || this.port, + protocol: hc.protocol || this.protocol, + timeoutMillis: (hc.timeout || cdk.Duration.seconds(2)).toMilliseconds(), + unhealthyThreshold: hc.unhealthyThreshold || 2, + }; + + validateHealthChecks(healthCheck); + + return healthCheck; + } +} + +/** + * Represents the properties needed to define an HTTP Listener for a VirtualGateway + */ +class HttpGatewayListener extends VirtualGatewayListener { + /** + * Port to listen for connections on + * + * @default - 8080 + */ + readonly port: number; + + /** + * Health checking strategy upstream nodes should use when communicating with the listener + * + * @default - no healthcheck + */ + readonly healthCheck?: HealthCheck; + + /** + * Protocol the listener implements + */ + protected protocol: Protocol = Protocol.HTTP; + + constructor(props: HttpGatewayListenerProps = {}) { + super(); + this.port = props.port ? props.port : 8080; + this.healthCheck = props.healthCheck; + } + + /** + * Called when the GatewayListener type is initialized. Can be used to enforce + * mutual exclusivity + */ + public bind(_scope: cdk.Construct): VirtualGatewayListenerConfig { + return { + listener: { + portMapping: { + port: this.port, + protocol: this.protocol, + }, + healthCheck: this.healthCheck ? this.renderHealthCheck(this.healthCheck): undefined, + }, + }; + } +} + +/** +* Represents the properties needed to define an HTTP2 Listener for a VirtualGateway +*/ +class Http2GatewayListener extends HttpGatewayListener { + constructor(props: HttpGatewayListenerProps = {}) { + super(props); + this.protocol = Protocol.HTTP2; + } +} + +/** + * Represents the properties needed to define a GRPC Listener for Virtual Gateway + */ +class GrpcGatewayListener extends VirtualGatewayListener { + /** + * Port to listen for connections on + * + * @default - 8080 + */ + readonly port: number; + + /** + * Health checking strategy upstream nodes should use when communicating with the listener + * + * @default - no healthcheck + */ + readonly healthCheck?: HealthCheck; + + /** + * Protocol the listener implements + */ + protected protocol: Protocol = Protocol.GRPC; + + constructor(props: HttpGatewayListenerProps = {}) { + super(); + this.port = props.port ? props.port : 8080; + this.healthCheck = props.healthCheck; + } + + /** + * Called when the GatewayListener type is initialized. Can be used to enforce + * mutual exclusivity + */ + public bind(_scope: cdk.Construct): VirtualGatewayListenerConfig { + return { + listener: { + portMapping: { + port: this.port, + protocol: Protocol.GRPC, + }, + healthCheck: this.healthCheck? this.renderHealthCheck(this.healthCheck): undefined, + }, + }; + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway.ts new file mode 100644 index 0000000000000..51950f82dbb13 --- /dev/null +++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway.ts @@ -0,0 +1,226 @@ +import * as cdk from '@aws-cdk/core'; +import { Construct } from 'constructs'; +import { CfnVirtualGateway } from './appmesh.generated'; +import { GatewayRoute, GatewayRouteBaseProps } from './gateway-route'; + +import { IMesh, Mesh } from './mesh'; +import { AccessLog } from './shared-interfaces'; +import { VirtualGatewayListener, VirtualGatewayListenerConfig } from './virtual-gateway-listener'; + +/** + * Interface which all Virtual Gateway based classes must implement + */ +export interface IVirtualGateway extends cdk.IResource { + /** + * Name of the VirtualGateway + * + * @attribute + */ + readonly virtualGatewayName: string; + + /** + * The Amazon Resource Name (ARN) for the VirtualGateway + * + * @attribute + */ + readonly virtualGatewayArn: string; + + /** + * The mesh which the VirtualGateway belongs to + */ + readonly mesh: IMesh; + + /** + * Utility method to add a new GatewayRoute to the VirtualGateway + */ + addGatewayRoute(id: string, route: GatewayRouteBaseProps): GatewayRoute; +} + +/** + * Basic configuration properties for a VirtualGateway + */ +export interface VirtualGatewayBaseProps { + /** + * Name of the VirtualGateway + * + * @default - A name is automatically determined + */ + readonly virtualGatewayName?: string; + + /** + * Listeners for the VirtualGateway. Only one is supported. + * + * @default - Single HTTP listener on port 8080 + */ + readonly listeners?: VirtualGatewayListener[]; + + /** + * Access Logging Configuration for the VirtualGateway + * + * @default - no access logging + */ + readonly accessLog?: AccessLog; +} + +/** + * Properties used when creating a new VirtualGateway + */ +export interface VirtualGatewayProps extends VirtualGatewayBaseProps { + /** + * The mesh which the VirtualGateway belongs to + */ + readonly mesh: IMesh; +} + +abstract class VirtualGatewayBase extends cdk.Resource implements IVirtualGateway { + /** + * Name of the VirtualGateway + */ + public abstract readonly virtualGatewayName: string; + + /** + * The Amazon Resource Name (ARN) for the VirtualGateway + */ + public abstract readonly virtualGatewayArn: string; + + /** + * The name of the mesh which the VirtualGateway belongs to + */ + public abstract readonly mesh: IMesh; + + /** + * Utility method to add a new GatewayRoute to the VirtualGateway + */ + public addGatewayRoute(id: string, props: GatewayRouteBaseProps): GatewayRoute { + return new GatewayRoute(this, id, { + ...props, + virtualGateway: this, + }); + } +} + +/** + * VirtualGateway represents a newly defined App Mesh Virtual Gateway + * + * A virtual gateway allows resources that are outside of your mesh to communicate to resources that + * are inside of your mesh. + * + * @see https://docs.aws.amazon.com/app-mesh/latest/userguide/virtual_gateways.html + */ +export class VirtualGateway extends VirtualGatewayBase { + /** + * Import an existing VirtualGateway given an ARN + */ + public static fromVirtualGatewayArn(scope: Construct, id: string, virtualGatewayArn: string): IVirtualGateway { + return new ImportedVirtualGateway(scope, id, { virtualGatewayArn }); + } + + /** + * The name of the VirtualGateway + */ + public readonly virtualGatewayName: string; + + /** + * The Amazon Resource Name (ARN) for the VirtualGateway + */ + public readonly virtualGatewayArn: string; + + /** + * The Mesh that the VirtualGateway belongs to + */ + public readonly mesh: IMesh; + + protected readonly listeners = new Array(); + + constructor(scope: Construct, id: string, props: VirtualGatewayProps) { + super(scope, id, { + physicalName: props.virtualGatewayName || cdk.Lazy.stringValue({ produce: () => this.node.uniqueId }), + }); + + this.mesh = props.mesh; + + if (!props.listeners) { + // Use listener default of http listener port 8080 if no listener is defined + this.listeners.push(VirtualGatewayListener.httpGatewayListener().bind(this)); + } else { + props.listeners.forEach(listener => this.listeners.push(listener.bind(this))); + } + + const accessLogging = props.accessLog?.bind(this); + + const node = new CfnVirtualGateway(this, 'Resource', { + virtualGatewayName: this.physicalName, + meshName: this.mesh.meshName, + spec: { + listeners: this.listeners.map(listener => listener.listener), + logging: accessLogging !== undefined ? { + accessLog: accessLogging.virtualGatewayAccessLog, + } : undefined, + }, + }); + + this.virtualGatewayName = this.getResourceNameAttribute(node.attrVirtualGatewayName); + this.virtualGatewayArn = this.getResourceArnAttribute(node.ref, { + service: 'appmesh', + resource: `mesh/${props.mesh.meshName}/virtualGateway`, + resourceName: this.physicalName, + }); + } +} + +/** + * Unterface with properties necessary to import a reusable VirtualGateway + */ +interface VirtualGatewayAttributes { + /** + * The name of the VirtualGateway + */ + readonly virtualGatewayName?: string; + + /** + * The Amazon Resource Name (ARN) belonging to the VirtualGateway + */ + readonly virtualGatewayArn?: string; + + /** + * The Mesh that the VirtualGateway belongs to + */ + readonly mesh?: IMesh; + + /** + * The name of the mesh that the VirtualGateway belongs to + */ + readonly meshName?: string; +} + +/** + * Used to import a VirtualGateway and read its properties + */ +class ImportedVirtualGateway extends VirtualGatewayBase { + /** + * The name of the VirtualGateway + */ + public readonly virtualGatewayName: string; + + /** + * The Amazon Resource Name (ARN) belonging to the VirtualGateway + */ + public readonly virtualGatewayArn: string; + + /** + * The Mesh that the VirtualGateway belongs to + */ + public readonly mesh: IMesh; + + constructor(scope: Construct, id: string, props: VirtualGatewayAttributes) { + super(scope, id); + if (props.virtualGatewayArn) { + const meshName = cdk.Fn.select(0, cdk.Fn.split('/', cdk.Stack.of(scope).parseArn(props.virtualGatewayArn).resourceName!)); + this.mesh = Mesh.fromMeshName(this, 'Mesh', meshName); + this.virtualGatewayArn = props.virtualGatewayArn; + this.virtualGatewayName = cdk.Fn.select(2, cdk.Fn.split('/', cdk.Stack.of(scope).parseArn(props.virtualGatewayArn).resourceName!)); + } else { + throw new Error('Need virtualGatewayArn'); + } + } +} diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts index 233ad2d0f216c..bfad388fa91ee 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts @@ -3,6 +3,7 @@ import * as cdk from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnVirtualNode } from './appmesh.generated'; import { IMesh } from './mesh'; +import { validateHealthChecks } from './private/utils'; import { AccessLog, HealthCheck, PortMapping, Protocol, VirtualNodeListener } from './shared-interfaces'; import { IVirtualService } from './virtual-service'; @@ -154,19 +155,6 @@ abstract class VirtualNodeBase extends cdk.Resource implements IVirtualNode { } } -/** - * Minimum and maximum thresholds for HeathCheck numeric properties - * - * @see https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HealthCheckPolicy.html - */ -const HEALTH_CHECK_PROPERTY_THRESHOLDS: {[key in (keyof CfnVirtualNode.HealthCheckProperty)]?: [number, number]} = { - healthyThreshold: [2, 10], - intervalMillis: [5000, 300000], - port: [1, 65535], - timeoutMillis: [2000, 60000], - unhealthyThreshold: [2, 10], -}; - function renderHealthCheck(hc: HealthCheck | undefined, pm: PortMapping): CfnVirtualNode.HealthCheckProperty | undefined { if (hc === undefined) { return undefined; } @@ -178,38 +166,25 @@ function renderHealthCheck(hc: HealthCheck | undefined, pm: PortMapping): CfnVir throw new Error('The path property cannot be set with Protocol.GRPC'); } + const protocol = hc.protocol ?? pm.protocol; + const healthCheck: CfnVirtualNode.HealthCheckProperty = { healthyThreshold: hc.healthyThreshold || 2, intervalMillis: (hc.interval || cdk.Duration.seconds(5)).toMilliseconds(), // min - path: hc.path || (hc.protocol === Protocol.HTTP ? '/' : undefined), + path: hc.path || (protocol === Protocol.HTTP ? '/' : undefined), port: hc.port || pm.port, protocol: hc.protocol || pm.protocol, timeoutMillis: (hc.timeout || cdk.Duration.seconds(2)).toMilliseconds(), unhealthyThreshold: hc.unhealthyThreshold || 2, }; - (Object.keys(healthCheck) as Array) - .filter((key) => - HEALTH_CHECK_PROPERTY_THRESHOLDS[key] && - typeof healthCheck[key] === 'number' && - !cdk.Token.isUnresolved(healthCheck[key]), - ).map((key) => { - const [min, max] = HEALTH_CHECK_PROPERTY_THRESHOLDS[key]!; - const value = healthCheck[key]!; - - if (value < min) { - throw new Error(`The value of '${key}' is below the minimum threshold (expected >=${min}, got ${value})`); - } - if (value > max) { - throw new Error(`The value of '${key}' is above the maximum threshold (expected <=${max}, got ${value})`); - } - }); + validateHealthChecks(healthCheck); return healthCheck; } /** - * VirtualNode represents a newly defined AppMesh VirtualNode + * VirtualNode represents a newly defined App Mesh VirtualNode * * Any inbound traffic that your virtual node expects should be specified as a * listener. Any outbound traffic that your virtual node expects to reach @@ -241,7 +216,7 @@ export class VirtualNode extends VirtualNodeBase { public readonly virtualNodeName: string; /** - * The Amazon Resource Name belonging to the VirtualNdoe + * The Amazon Resource Name belonging to the VirtualNode */ public readonly virtualNodeArn: string; @@ -316,7 +291,7 @@ interface VirtualNodeAttributes { } /** - * Used to import a VirtualNode and read it's properties + * Used to import a VirtualNode and read its properties */ class ImportedVirtualNode extends VirtualNodeBase { /** diff --git a/packages/@aws-cdk/aws-appmesh/package.json b/packages/@aws-cdk/aws-appmesh/package.json index e3c345d954997..2789d9085284c 100644 --- a/packages/@aws-cdk/aws-appmesh/package.json +++ b/packages/@aws-cdk/aws-appmesh/package.json @@ -112,6 +112,29 @@ "from-signature:@aws-cdk/aws-appmesh.VirtualNode.fromVirtualNodeName", "from-signature:@aws-cdk/aws-appmesh.VirtualRouter.fromVirtualRouterName", "from-signature:@aws-cdk/aws-appmesh.VirtualService.fromVirtualServiceName", + "resource-attribute:@aws-cdk/aws-appmesh.GatewayRoute.gatewayRouteMeshName", + "resource-attribute:@aws-cdk/aws-appmesh.GatewayRoute.gatewayRouteMeshOwner", + "resource-attribute:@aws-cdk/aws-appmesh.GatewayRoute.gatewayRouteResourceOwner", + "resource-attribute:@aws-cdk/aws-appmesh.GatewayRoute.gatewayRouteUid", + "resource-attribute:@aws-cdk/aws-appmesh.GatewayRoute.gatewayRouteVirtualGatewayName", + "resource-attribute:@aws-cdk/aws-appmesh.GatewayGrpcRoute.gatewayRouteMeshName", + "resource-attribute:@aws-cdk/aws-appmesh.GatewayGrpcRoute.gatewayRouteMeshOwner", + "resource-attribute:@aws-cdk/aws-appmesh.GatewayGrpcRoute.gatewayRouteUid", + "resource-attribute:@aws-cdk/aws-appmesh.GatewayGrpcRoute.gatewayRouteResourceOwner", + "resource-attribute:@aws-cdk/aws-appmesh.GatewayGrpcRoute.gatewayRouteUid", + "resource-attribute:@aws-cdk/aws-appmesh.GatewayGrpcRoute.gatewayRouteVirtualGatewayName", + "resource-attribute:@aws-cdk/aws-appmesh.GatewayHttp2Route.gatewayRouteMeshName", + "resource-attribute:@aws-cdk/aws-appmesh.GatewayHttp2Route.gatewayRouteMeshOwner", + "resource-attribute:@aws-cdk/aws-appmesh.GatewayHttp2Route.gatewayRouteUid", + "resource-attribute:@aws-cdk/aws-appmesh.GatewayHttp2Route.gatewayRouteResourceOwner", + "resource-attribute:@aws-cdk/aws-appmesh.GatewayHttp2Route.gatewayRouteUid", + "resource-attribute:@aws-cdk/aws-appmesh.GatewayHttp2Route.gatewayRouteVirtualGatewayName", + "resource-attribute:@aws-cdk/aws-appmesh.GatewayHttpRoute.gatewayRouteMeshName", + "resource-attribute:@aws-cdk/aws-appmesh.GatewayHttpRoute.gatewayRouteMeshOwner", + "resource-attribute:@aws-cdk/aws-appmesh.GatewayHttpRoute.gatewayRouteUid", + "resource-attribute:@aws-cdk/aws-appmesh.GatewayHttpRoute.gatewayRouteResourceOwner", + "resource-attribute:@aws-cdk/aws-appmesh.GatewayHttpRoute.gatewayRouteUid", + "resource-attribute:@aws-cdk/aws-appmesh.GatewayHttpRoute.gatewayRouteVirtualGatewayName", "resource-attribute:@aws-cdk/aws-appmesh.IMesh.meshUid", "resource-attribute:@aws-cdk/aws-appmesh.IRoute.routeUid", "resource-attribute:@aws-cdk/aws-appmesh.IVirtualNode.virtualNodeUid", @@ -125,6 +148,10 @@ "resource-attribute:@aws-cdk/aws-appmesh.Route.routeResourceOwner", "resource-attribute:@aws-cdk/aws-appmesh.Route.routeUid", "resource-attribute:@aws-cdk/aws-appmesh.Route.routeVirtualRouterName", + "resource-attribute:@aws-cdk/aws-appmesh.VirtualGateway.virtualGatewayMeshName", + "resource-attribute:@aws-cdk/aws-appmesh.VirtualGateway.virtualGatewayMeshOwner", + "resource-attribute:@aws-cdk/aws-appmesh.VirtualGateway.virtualGatewayResourceOwner", + "resource-attribute:@aws-cdk/aws-appmesh.VirtualGateway.virtualGatewayUid", "resource-attribute:@aws-cdk/aws-appmesh.VirtualNode.virtualNodeMeshName", "resource-attribute:@aws-cdk/aws-appmesh.VirtualNode.virtualNodeMeshOwner", "resource-attribute:@aws-cdk/aws-appmesh.VirtualNode.virtualNodeResourceOwner", diff --git a/packages/@aws-cdk/aws-appmesh/test/integ.mesh.expected.json b/packages/@aws-cdk/aws-appmesh/test/integ.mesh.expected.json index 5b1b1657f0e20..e74a824311783 100644 --- a/packages/@aws-cdk/aws-appmesh/test/integ.mesh.expected.json +++ b/packages/@aws-cdk/aws-appmesh/test/integ.mesh.expected.json @@ -772,6 +772,151 @@ "VirtualNodeName": "meshstackmeshnode3C5835BCB" } }, + "meshgateway1B02387E8": { + "Type": "AWS::AppMesh::VirtualGateway", + "Properties": { + "MeshName": { + "Fn::GetAtt": [ + "meshACDFE68E", + "MeshName" + ] + }, + "Spec": { + "Listeners": [ + { + "PortMapping": { + "Port": 8080, + "Protocol": "http" + } + } + ], + "Logging": { + "AccessLog": { + "File": { + "Path": "/dev/stdout" + } + } + } + }, + "VirtualGatewayName": "gateway1" + } + }, + "meshgateway1gateway1routehttpE8D6F433": { + "Type": "AWS::AppMesh::GatewayRoute", + "Properties": { + "GatewayRouteName": "meshstackmeshgateway1gateway1routehttpBA921D42", + "MeshName": { + "Fn::GetAtt": [ + "meshACDFE68E", + "MeshName" + ] + }, + "Spec": { + "HttpRoute": { + "Action": { + "Target": { + "VirtualService": { + "VirtualServiceName": { + "Fn::GetAtt": [ + "meshserviceE06ECED5", + "VirtualServiceName" + ] + } + } + } + }, + "Match": { + "Prefix": "/" + } + } + }, + "VirtualGatewayName": { + "Fn::GetAtt": [ + "meshgateway1B02387E8", + "VirtualGatewayName" + ] + } + } + }, + "meshgateway1gateway1routehttp2FD69C306": { + "Type": "AWS::AppMesh::GatewayRoute", + "Properties": { + "GatewayRouteName": "meshstackmeshgateway1gateway1routehttp255781963", + "MeshName": { + "Fn::GetAtt": [ + "meshACDFE68E", + "MeshName" + ] + }, + "Spec": { + "Http2Route": { + "Action": { + "Target": { + "VirtualService": { + "VirtualServiceName": { + "Fn::GetAtt": [ + "meshserviceE06ECED5", + "VirtualServiceName" + ] + } + } + } + }, + "Match": { + "Prefix": "/" + } + } + }, + "VirtualGatewayName": { + "Fn::GetAtt": [ + "meshgateway1B02387E8", + "VirtualGatewayName" + ] + } + } + }, + "meshgateway1gateway1routegrpc76486062": { + "Type": "AWS::AppMesh::GatewayRoute", + "Properties": { + "GatewayRouteName": "meshstackmeshgateway1gateway1routegrpcCD4D891D", + "MeshName": { + "Fn::GetAtt": [ + "meshACDFE68E", + "MeshName" + ] + }, + "Spec": { + "GrpcRoute": { + "Action": { + "Target": { + "VirtualService": { + "VirtualServiceName": { + "Fn::GetAtt": [ + "meshserviceE06ECED5", + "VirtualServiceName" + ] + } + } + } + }, + "Match": { + "ServiceName": { + "Fn::GetAtt": [ + "meshserviceE06ECED5", + "VirtualServiceName" + ] + } + } + } + }, + "VirtualGatewayName": { + "Fn::GetAtt": [ + "meshgateway1B02387E8", + "VirtualGatewayName" + ] + } + } + }, "service27C65CF7D": { "Type": "AWS::AppMesh::VirtualService", "Properties": { @@ -797,6 +942,37 @@ "Spec": {}, "VirtualServiceName": "service3.domain.local" } + }, + "gateway2BCE5C5E0": { + "Type": "AWS::AppMesh::VirtualGateway", + "Properties": { + "MeshName": { + "Fn::GetAtt": [ + "meshACDFE68E", + "MeshName" + ] + }, + "Spec": { + "Listeners": [ + { + "HealthCheck": { + "HealthyThreshold": 2, + "IntervalMillis": 10000, + "Path": "/", + "Port": 443, + "Protocol": "http", + "TimeoutMillis": 2000, + "UnhealthyThreshold": 2 + }, + "PortMapping": { + "Port": 443, + "Protocol": "http" + } + } + ] + }, + "VirtualGatewayName": "meshstackgateway2BEC62D7C" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts b/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts index df55025f1365c..322ae1cc608d6 100644 --- a/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts +++ b/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts @@ -116,3 +116,39 @@ router.addRoute('route-3', { }, ], }); + +const gateway = mesh.addVirtualGateway('gateway1', { + accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout'), + virtualGatewayName: 'gateway1', +}); + +new appmesh.VirtualGateway(stack, 'gateway2', { + mesh: mesh, + listeners: [appmesh.VirtualGatewayListener.httpGatewayListener({ + port: 443, + healthCheck: { + interval: cdk.Duration.seconds(10), + }, + })], +}); + +gateway.addGatewayRoute('gateway1-route-http', { + routeSpec: appmesh.GatewayRouteSpec.httpRouteSpec({ + routeTarget: virtualService, + }), +}); + +gateway.addGatewayRoute('gateway1-route-http2', { + routeSpec: appmesh.GatewayRouteSpec.http2RouteSpec({ + routeTarget: virtualService, + }), +}); + +gateway.addGatewayRoute('gateway1-route-grpc', { + routeSpec: appmesh.GatewayRouteSpec.grpcRouteSpec({ + routeTarget: virtualService, + match: { + serviceName: virtualService.virtualServiceName, + }, + }), +}); diff --git a/packages/@aws-cdk/aws-appmesh/test/test.gateway-route.ts b/packages/@aws-cdk/aws-appmesh/test/test.gateway-route.ts new file mode 100644 index 0000000000000..842e553dfa20c --- /dev/null +++ b/packages/@aws-cdk/aws-appmesh/test/test.gateway-route.ts @@ -0,0 +1,152 @@ +import { expect, haveResourceLike } from '@aws-cdk/assert'; +import * as cdk from '@aws-cdk/core'; +import { Test } from 'nodeunit'; + +import * as appmesh from '../lib'; + +export = { + 'When creating a GatewayRoute': { + 'should have expected defaults'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + const mesh = new appmesh.Mesh(stack, 'mesh', { + meshName: 'test-mesh', + }); + + const virtualGateway = new appmesh.VirtualGateway(stack, 'gateway-1', { + listeners: [appmesh.VirtualGatewayListener.httpGatewayListener()], + mesh: mesh, + }); + + const virtualService = new appmesh.VirtualService(stack, 'vs-1', { + mesh: mesh, + virtualServiceName: 'target.local', + }); + + // Add an HTTP Route + virtualGateway.addGatewayRoute('gateway-http-route', { + routeSpec: appmesh.GatewayRouteSpec.httpRouteSpec({ + routeTarget: virtualService, + }), + gatewayRouteName: 'gateway-http-route', + }); + + virtualGateway.addGatewayRoute('gateway-http2-route', { + routeSpec: appmesh.GatewayRouteSpec.http2RouteSpec({ + routeTarget: virtualService, + }), + gatewayRouteName: 'gateway-http2-route', + }); + + virtualGateway.addGatewayRoute('gateway-grpc-route', { + routeSpec: appmesh.GatewayRouteSpec.grpcRouteSpec({ + routeTarget: virtualService, + match: { + serviceName: virtualService.virtualServiceName, + }, + }), + gatewayRouteName: 'gateway-grpc-route', + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::AppMesh::GatewayRoute', { + GatewayRouteName: 'gateway-http-route', + Spec: { + HttpRoute: { + Action: { + Target: { + VirtualService: { + VirtualServiceName: { + 'Fn::GetAtt': ['vs1732C2645', 'VirtualServiceName'], + }, + }, + }, + }, + Match: { + Prefix: '/', + }, + }, + }, + })); + expect(stack).to(haveResourceLike('AWS::AppMesh::GatewayRoute', { + GatewayRouteName: 'gateway-http2-route', + Spec: { + Http2Route: { + Action: { + Target: { + VirtualService: { + VirtualServiceName: { + 'Fn::GetAtt': ['vs1732C2645', 'VirtualServiceName'], + }, + }, + }, + }, + Match: { + Prefix: '/', + }, + }, + }, + })); + expect(stack).to(haveResourceLike('AWS::AppMesh::GatewayRoute', { + GatewayRouteName: 'gateway-grpc-route', + Spec: { + GrpcRoute: { + Action: { + Target: { + VirtualService: { + VirtualServiceName: { + 'Fn::GetAtt': ['vs1732C2645', 'VirtualServiceName'], + }, + }, + }, + }, + Match: { + ServiceName: { + 'Fn::GetAtt': ['vs1732C2645', 'VirtualServiceName'], + }, + }, + }, + }, + })); + test.done(); + }, + + 'should throw an exception if you start an http prefix match not with a /'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + + const mesh = new appmesh.Mesh(stack, 'mesh', { + meshName: 'test-mesh', + }); + + const virtualService = mesh.addVirtualService('testVirtualService'); + test.throws(() => appmesh.GatewayRouteSpec.httpRouteSpec({ + routeTarget: virtualService, + match: { + prefixPath: 'wrong', + }, + }).bind(stack), + /Prefix Path must start with \'\/\', got: wrong/); + test.done(); + }, + }, + + 'Can export and import GatewayRoutes and perform actions'(test: Test) { + const app = new cdk.App(); + // GIVEN + const stack = new cdk.Stack(app, 'Imports', { + env: { account: '123456789012', region: 'us-east-1' }, + }); + + // WHEN + const gatewayRoute2 = appmesh.GatewayRoute.fromGatewayRouteArn( + stack, 'importedGatewayRoute2', 'arn:aws:appmesh:us-east-1:123456789012:mesh/test-mesh/virtualGateway/test-gateway/gatewayRoute/test-gateway-route'); + // THEN + test.equal(gatewayRoute2.gatewayRouteName, 'test-gateway-route'); + test.equal(gatewayRoute2.virtualGateway.virtualGatewayName, 'test-gateway'); + test.equal(gatewayRoute2.virtualGateway.mesh.meshName, 'test-mesh'); + test.done(); + }, +}; \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appmesh/test/test.virtual-gateway.ts b/packages/@aws-cdk/aws-appmesh/test/test.virtual-gateway.ts new file mode 100644 index 0000000000000..1dd75b938ab04 --- /dev/null +++ b/packages/@aws-cdk/aws-appmesh/test/test.virtual-gateway.ts @@ -0,0 +1,258 @@ +import { expect, haveResourceLike } from '@aws-cdk/assert'; +import * as cdk from '@aws-cdk/core'; +import { Test } from 'nodeunit'; + +import * as appmesh from '../lib'; + +export = { + 'When creating a VirtualGateway': { + 'should have expected defaults'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + const mesh = new appmesh.Mesh(stack, 'mesh', { + meshName: 'test-mesh', + }); + + new appmesh.VirtualGateway(stack, 'testGateway', { + mesh: mesh, + }); + + new appmesh.VirtualGateway(stack, 'httpGateway', { + mesh: mesh, + listeners: [appmesh.VirtualGatewayListener.httpGatewayListener({ + port: 443, + healthCheck: { + interval: cdk.Duration.seconds(10), + }, + })], + }); + + new appmesh.VirtualGateway(stack, 'http2Gateway', { + mesh: mesh, + listeners: [appmesh.VirtualGatewayListener.http2GatewayListener({ + port: 443, + healthCheck: { + interval: cdk.Duration.seconds(10), + }, + })], + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::AppMesh::VirtualGateway', { + Spec: { + Listeners: [ + { + PortMapping: { + Port: 8080, + Protocol: appmesh.Protocol.HTTP, + }, + }, + ], + }, + VirtualGatewayName: 'testGateway', + })); + + expect(stack).to(haveResourceLike('AWS::AppMesh::VirtualGateway', { + Spec: { + Listeners: [ + { + HealthCheck: { + HealthyThreshold: 2, + IntervalMillis: 10000, + Port: 443, + Protocol: appmesh.Protocol.HTTP, + TimeoutMillis: 2000, + UnhealthyThreshold: 2, + Path: '/', + }, + PortMapping: { + Port: 443, + Protocol: appmesh.Protocol.HTTP, + }, + }, + ], + }, + VirtualGatewayName: 'httpGateway', + })); + + expect(stack).to(haveResourceLike('AWS::AppMesh::VirtualGateway', { + Spec: { + Listeners: [ + { + HealthCheck: { + HealthyThreshold: 2, + IntervalMillis: 10000, + Port: 443, + Protocol: appmesh.Protocol.HTTP2, + TimeoutMillis: 2000, + UnhealthyThreshold: 2, + Path: '/', + }, + PortMapping: { + Port: 443, + Protocol: appmesh.Protocol.HTTP2, + }, + }, + ], + }, + VirtualGatewayName: 'http2Gateway', + })); + test.done(); + }, + + 'should have expected features'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + const mesh = new appmesh.Mesh(stack, 'mesh', { + meshName: 'test-mesh', + }); + + new appmesh.VirtualGateway(stack, 'testGateway', { + virtualGatewayName: 'test-gateway', + listeners: [appmesh.VirtualGatewayListener.grpcGatewayListener({ + port: 80, + healthCheck: { + }, + })], + mesh: mesh, + accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout'), + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::AppMesh::VirtualGateway', { + Spec: { + Listeners: [ + { + HealthCheck: { + HealthyThreshold: 2, + IntervalMillis: 5000, + Port: 80, + Protocol: appmesh.Protocol.GRPC, + TimeoutMillis: 2000, + UnhealthyThreshold: 2, + }, + PortMapping: { + Port: 80, + Protocol: appmesh.Protocol.GRPC, + }, + }, + ], + Logging: { + AccessLog: { + File: { + Path: '/dev/stdout', + }, + }, + }, + }, + VirtualGatewayName: 'test-gateway', + })); + test.done(); + }, + }, + + 'When adding a gateway route to existing VirtualGateway ': { + 'should create gateway route resource'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + const mesh = new appmesh.Mesh(stack, 'mesh', { + meshName: 'test-mesh', + }); + + const virtualGateway = new appmesh.VirtualGateway(stack, 'testGateway', { + virtualGatewayName: 'test-gateway', + mesh: mesh, + }); + + const virtualService = mesh.addVirtualService('virtualService', {}); + + virtualGateway.addGatewayRoute('testGatewayRoute', { + gatewayRouteName: 'test-gateway-route', + routeSpec: appmesh.GatewayRouteSpec.httpRouteSpec({ + routeTarget: virtualService, + }), + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::AppMesh::GatewayRoute', { + GatewayRouteName: 'test-gateway-route', + Spec: { + HttpRoute: { + Action: { + Target: { + VirtualService: { + VirtualServiceName: { + 'Fn::GetAtt': ['meshvirtualService93460D43', 'VirtualServiceName'], + }, + }, + }, + }, + Match: { + Prefix: '/', + }, + }, + }, + })); + test.done(); + }, + }, + + 'When adding gateway routes to a VirtualGateway with existing gateway routes': { + 'should add gateway routes and not overwite'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + const mesh = new appmesh.Mesh(stack, 'mesh', { + meshName: 'test-mesh', + }); + + const virtualService = mesh.addVirtualService('virtualService', {}); + + const virtualGateway = mesh.addVirtualGateway('gateway'); + virtualGateway.addGatewayRoute('testGatewayRoute', { + gatewayRouteName: 'test-gateway-route', + routeSpec: appmesh.GatewayRouteSpec.httpRouteSpec({ + routeTarget: virtualService, + }), + }); + virtualGateway.addGatewayRoute('testGatewayRoute2', { + gatewayRouteName: 'test-gateway-route-2', + routeSpec: appmesh.GatewayRouteSpec.httpRouteSpec({ + routeTarget: virtualService, + }), + }); + // THEN + expect(stack).to(haveResourceLike('AWS::AppMesh::GatewayRoute', { + GatewayRouteName: 'test-gateway-route', + })); + expect(stack).to(haveResourceLike('AWS::AppMesh::GatewayRoute', { + GatewayRouteName: 'test-gateway-route-2', + })); + test.done(); + }, + }, + + 'Can export and import VirtualGateway and perform actions'(test: Test) { + const app = new cdk.App(); + // GIVEN + const stack = new cdk.Stack(app, 'Imports', { + env: { account: '123456789012', region: 'us-east-1' }, + }); + + // WHEN + const virtualGateway2 = appmesh.VirtualGateway.fromVirtualGatewayArn( + stack, 'importedGateway2', 'arn:aws:appmesh:us-east-1:123456789012:mesh/testMesh/virtualGateway/test-gateway'); + + // THEN + test.equal(virtualGateway2.mesh.meshName, 'testMesh'); + test.equal(virtualGateway2.virtualGatewayName, 'test-gateway'); + test.done(); + }, +}; \ No newline at end of file From e87a6a333c06d157f6d9074e05f251505525d0d5 Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Fri, 30 Oct 2020 07:45:47 +0000 Subject: [PATCH 008/314] feat(apigatewayv2): vpc link and private integrations (#11198) This reverts commit 65be3a0bd565f35161ee449d059db06cd77c20f5. Original PR: #10531 Co-authored-by: Ayush Goyal relates #10119 This commit was previously reverted due to a bug in jsii - aws/jsii#1947 and aws/jsii#1830. This has been fixed in jsii version 1.14.0. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../.eslintrc.js | 3 + .../aws-apigatewayv2-integrations/.gitignore | 17 + .../aws-apigatewayv2-integrations/.npmignore | 28 + .../aws-apigatewayv2-integrations/LICENSE | 201 +++++ .../aws-apigatewayv2-integrations/NOTICE | 2 + .../aws-apigatewayv2-integrations/README.md | 88 +++ .../jest.config.js | 2 + .../lib/http/alb.ts | 39 + .../lib/http/base-types.ts | 19 + .../lib/http/index.ts | 4 + .../lib/http/nlb.ts | 39 + .../lib/http/private/integration.ts | 65 ++ .../lib/http/service-discovery.ts | 44 ++ .../lib/index.ts | 1 + .../package.json | 104 +++ .../test/http/alb.test.ts | 101 +++ .../test/http/integ.alb.expected.json | 702 ++++++++++++++++++ .../test/http/integ.alb.ts | 31 + .../test/http/integ.nlb.expected.json | 667 +++++++++++++++++ .../test/http/integ.nlb.ts | 24 + .../integ.service-discovery.expected.json | 653 ++++++++++++++++ .../test/http/integ.service-discovery.ts | 28 + .../test/http/nlb.test.ts | 102 +++ .../test/http/private/integration.test.ts | 37 + .../test/http/service-discovery.test.ts | 77 ++ packages/@aws-cdk/aws-apigatewayv2/README.md | 27 + .../@aws-cdk/aws-apigatewayv2/lib/http/api.ts | 20 + .../aws-apigatewayv2/lib/http/index.ts | 1 + .../aws-apigatewayv2/lib/http/integration.ts | 44 ++ .../aws-apigatewayv2/lib/http/route.ts | 6 +- .../aws-apigatewayv2/lib/http/vpc-link.ts | 120 +++ .../@aws-cdk/aws-apigatewayv2/package.json | 2 + .../aws-apigatewayv2/test/http/api.test.ts | 40 + .../aws-apigatewayv2/test/http/route.test.ts | 38 +- .../test/http/vpc-link.test.ts | 188 +++++ .../lib/nlb/network-listener.ts | 2 +- packages/aws-cdk-lib/package.json | 1 + packages/decdk/package.json | 1 + packages/monocdk/package.json | 1 + 39 files changed, 3565 insertions(+), 4 deletions(-) create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/.eslintrc.js create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/.gitignore create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/.npmignore create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/LICENSE create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/NOTICE create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/README.md create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/jest.config.js create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/alb.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/base-types.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/index.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/nlb.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/private/integration.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/service-discovery.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/lib/index.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/package.json create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/alb.test.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.alb.expected.json create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.alb.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.nlb.expected.json create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.nlb.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.service-discovery.expected.json create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.service-discovery.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/nlb.test.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/private/integration.test.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/service-discovery.test.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2/lib/http/vpc-link.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2/test/http/vpc-link.test.ts diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/.eslintrc.js b/packages/@aws-cdk/aws-apigatewayv2-integrations/.eslintrc.js new file mode 100644 index 0000000000000..61dd8dd001f63 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/.eslintrc.js @@ -0,0 +1,3 @@ +const baseConfig = require('cdk-build-tools/config/eslintrc'); +baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/.gitignore b/packages/@aws-cdk/aws-apigatewayv2-integrations/.gitignore new file mode 100644 index 0000000000000..becda34c45624 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/.gitignore @@ -0,0 +1,17 @@ +*.d.ts +*.generated.ts +*.js +*.js.map +*.snk +.jsii +.LAST_BUILD +.LAST_PACKAGE +nyc.config.js +.nyc_output +coverage +dist +tsconfig.json +!.eslintrc.js +!jest.config.js + +junit.xml \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/.npmignore b/packages/@aws-cdk/aws-apigatewayv2-integrations/.npmignore new file mode 100644 index 0000000000000..093c734b1bd2f --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/.npmignore @@ -0,0 +1,28 @@ +# The basics +*.ts +*.tgz +*.snk +!*.d.ts +!*.js +**/cdk.out + +# Coverage +coverage +.nyc_output +.nycrc + +# Build gear +dist +.LAST_BUILD +.LAST_PACKAGE + +*.tsbuildinfo +tsconfig.json +!.jsii +.eslintrc.js +jest.config.js + +# exclude cdk artifacts +**/cdk.out +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/LICENSE b/packages/@aws-cdk/aws-apigatewayv2-integrations/LICENSE new file mode 100644 index 0000000000000..b71ec1688783a --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/NOTICE b/packages/@aws-cdk/aws-apigatewayv2-integrations/NOTICE new file mode 100644 index 0000000000000..bfccac9a7f69c --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/NOTICE @@ -0,0 +1,2 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/README.md b/packages/@aws-cdk/aws-apigatewayv2-integrations/README.md new file mode 100644 index 0000000000000..2cda8eab308ab --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/README.md @@ -0,0 +1,88 @@ +## AWS APIGatewayv2 Integrations + +--- + +![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) + +> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. + +--- + + +## Table of Contents + +- [Introduction](#introduction) +- [Private Integration](#private-integration) + +## Introduction + +Integrations connect a route to backend resources. HTTP APIs support Lambda proxy, AWS service, and HTTP proxy integrations. HTTP proxy integrations are also known as private integrations. + +Currently the following integrations are supported by this construct library. + +## Private Integration + +Private integrations enable integrating an HTTP API route with private resources in a VPC, such as Application Load Balancers or +Amazon ECS container-based applications. Using private integrations, resources in a VPC can be exposed for access by +clients outside of the VPC. + +The following integrations are supported for private resources in a VPC. + +### Application Load Balancer + +The following code is a basic application load balancer private integration of HTTP API: + +```ts +const vpc = new ec2.Vpc(stack, 'VPC'); +const lb = new elbv2.ALB(stack, 'lb', { vpc }); +const listener = lb.addListener('listener', { port: 80 }); +listener.addTargets('target', { + port: 80, +}); + +const httpEndpoint = new HttpApi(stack, 'HttpProxyPrivateApi', { + defaultIntegration: new HttpAlbIntegrationProps({ + listener, + }), +}); +``` + +### Network Load Balancer + +The following code is a basic network load balancer private integration of HTTP API: + +```ts +const vpc = new ec2.Vpc(stack, 'VPC'); +const lb = new elbv2.NLB(stack, 'lb', { vpc }); +const listener = lb.addListener('listener', { port: 80 }); +listener.addTargets('target', { + port: 80, +}); + +const httpEndpoint = new HttpApi(stack, 'HttpProxyPrivateApi', { + defaultIntegration: new HttpNlbIntegrationProps({ + listener, + }), +}); +``` + +### Cloud Map Service Discovery + +The following code is a basic discovery service private integration of HTTP API: + +```ts +const vpc = new ec2.Vpc(stack, 'VPC'); +const vpcLink = new VpcLink(stack, 'VpcLink', { vpc }); +const namespace = new servicediscovery.PrivateDnsNamespace(stack, 'Namespace', { + name: 'boobar.com', + vpc, +}); +const service = namespace.createService('Service'); + +const httpEndpoint = new HttpApi(stack, 'HttpProxyPrivateApi', { + defaultIntegration: new HttpServiceDiscoveryIntegration({ + vpcLink, + service, + }), +}); +``` diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/jest.config.js b/packages/@aws-cdk/aws-apigatewayv2-integrations/jest.config.js new file mode 100644 index 0000000000000..54e28beb9798b --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/jest.config.js @@ -0,0 +1,2 @@ +const baseConfig = require('cdk-build-tools/config/jest.config'); +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/alb.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/alb.ts new file mode 100644 index 0000000000000..2d35f89e8206e --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/alb.ts @@ -0,0 +1,39 @@ +import { HttpRouteIntegrationBindOptions, HttpRouteIntegrationConfig } from '@aws-cdk/aws-apigatewayv2'; +import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; +import { HttpPrivateIntegrationOptions } from './base-types'; +import { HttpPrivateIntegration } from './private/integration'; + +/** + * Properties to initialize `HttpAlbIntegration`. + */ +export interface HttpAlbIntegrationProps extends HttpPrivateIntegrationOptions { + /** + * The listener to the application load balancer used for the integration + */ + readonly listener: elbv2.ApplicationListener; +} + +/** + * The Application Load Balancer integration resource for HTTP API + */ +export class HttpAlbIntegration extends HttpPrivateIntegration { + constructor(private readonly props: HttpAlbIntegrationProps) { + super(); + } + + public bind(options: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig { + const vpcLink = this._configureVpcLink(options, { + vpcLink: this.props.vpcLink, + vpc: this.props.listener.loadBalancer.vpc, + }); + + return { + method: this.props.method ?? this.httpMethod, + payloadFormatVersion: this.payloadFormatVersion, + type: this.integrationType, + connectionType: this.connectionType, + connectionId: vpcLink.vpcLinkId, + uri: this.props.listener.listenerArn, + }; + } +} diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/base-types.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/base-types.ts new file mode 100644 index 0000000000000..5000dfb63a751 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/base-types.ts @@ -0,0 +1,19 @@ +import { HttpMethod, IVpcLink } from '@aws-cdk/aws-apigatewayv2'; + +/** + * Base options for private integration + */ +export interface HttpPrivateIntegrationOptions { + /** + * The vpc link to be used for the private integration + * + * @default - a new VpcLink is created + */ + readonly vpcLink?: IVpcLink; + + /** + * The HTTP method that must be used to invoke the underlying HTTP proxy. + * @default HttpMethod.ANY + */ + readonly method?: HttpMethod; +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/index.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/index.ts new file mode 100644 index 0000000000000..bd4bb0ee34cac --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/index.ts @@ -0,0 +1,4 @@ +export * from './base-types'; +export * from './alb'; +export * from './nlb'; +export * from './service-discovery'; diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/nlb.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/nlb.ts new file mode 100644 index 0000000000000..1ee7ce4f208ed --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/nlb.ts @@ -0,0 +1,39 @@ +import { HttpRouteIntegrationBindOptions, HttpRouteIntegrationConfig } from '@aws-cdk/aws-apigatewayv2'; +import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; +import { HttpPrivateIntegrationOptions } from './base-types'; +import { HttpPrivateIntegration } from './private/integration'; + +/** + * Properties to initialize `HttpNlbIntegration`. + */ +export interface HttpNlbIntegrationProps extends HttpPrivateIntegrationOptions { + /** + * The listener to the netwwork load balancer used for the integration + */ + readonly listener: elbv2.NetworkListener; +} + +/** + * The Network Load Balancer integration resource for HTTP API + */ +export class HttpNlbIntegration extends HttpPrivateIntegration { + constructor(private readonly props: HttpNlbIntegrationProps) { + super(); + } + + public bind(options: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig { + const vpcLink = this._configureVpcLink(options, { + vpcLink: this.props.vpcLink, + vpc: this.props.listener.loadBalancer.vpc, + }); + + return { + method: this.props.method ?? this.httpMethod, + payloadFormatVersion: this.payloadFormatVersion, + type: this.integrationType, + connectionType: this.connectionType, + connectionId: vpcLink.vpcLinkId, + uri: this.props.listener.listenerArn, + }; + } +} diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/private/integration.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/private/integration.ts new file mode 100644 index 0000000000000..6d32b22794722 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/private/integration.ts @@ -0,0 +1,65 @@ +import { + HttpConnectionType, + HttpIntegrationType, + HttpRouteIntegrationBindOptions, + HttpRouteIntegrationConfig, + IHttpRouteIntegration, + PayloadFormatVersion, + HttpMethod, + IVpcLink, +} from '@aws-cdk/aws-apigatewayv2'; +import * as ec2 from '@aws-cdk/aws-ec2'; + + +/** + * Options required to use an existing vpcLink or configure a new one + * + * @internal + */ +export interface VpcLinkConfigurationOptions { + /** + * The vpc link to be used for the private integration + * + * @default - a new VpcLink is created + */ + readonly vpcLink?: IVpcLink; + + /** + * The vpc for which the VpcLink needs to be created + * + * @default undefined + */ + readonly vpc?: ec2.IVpc; +} + +/** + * The HTTP Private integration resource for HTTP API + * + * @internal + */ +export abstract class HttpPrivateIntegration implements IHttpRouteIntegration { + protected httpMethod = HttpMethod.ANY; + protected payloadFormatVersion = PayloadFormatVersion.VERSION_1_0; // 1.0 is required and is the only supported format + protected integrationType = HttpIntegrationType.HTTP_PROXY; + protected connectionType = HttpConnectionType.VPC_LINK + + /** + * Adds a vpcLink to the API if not passed in the options + * + * @internal + */ + protected _configureVpcLink(bindOptions: HttpRouteIntegrationBindOptions, configOptions: VpcLinkConfigurationOptions): IVpcLink { + let vpcLink = configOptions.vpcLink; + if (!vpcLink) { + if (!configOptions.vpc) { + throw new Error('One of vpcLink or vpc should be provided for private integration'); + } + + vpcLink = bindOptions.route.httpApi.addVpcLink({ vpc: configOptions.vpc }); + } + + return vpcLink; + } + + public abstract bind(options: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig; +} diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/service-discovery.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/service-discovery.ts new file mode 100644 index 0000000000000..96e13d0a03273 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/service-discovery.ts @@ -0,0 +1,44 @@ +import { HttpMethod, IVpcLink, HttpRouteIntegrationBindOptions, HttpRouteIntegrationConfig } from '@aws-cdk/aws-apigatewayv2'; +import * as servicediscovery from '@aws-cdk/aws-servicediscovery'; +import { HttpPrivateIntegration } from './private/integration'; + +/** + * Properties to initialize `HttpServiceDiscoveryIntegration`. + */ +export interface HttpServiceDiscoveryIntegrationProps { + /** + * The discovery service used for the integration + */ + readonly service: servicediscovery.Service; + + /** + * The vpc link to be used for the private integration + */ + readonly vpcLink: IVpcLink; + + /** + * The HTTP method that must be used to invoke the underlying HTTP proxy. + * @default HttpMethod.ANY + */ + readonly method?: HttpMethod; +} + +/** + * The Service Discovery integration resource for HTTP API + */ +export class HttpServiceDiscoveryIntegration extends HttpPrivateIntegration { + constructor(private readonly props: HttpServiceDiscoveryIntegrationProps) { + super(); + } + + public bind(_: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig { + return { + method: this.props.method ?? this.httpMethod, + payloadFormatVersion: this.payloadFormatVersion, + type: this.integrationType, + connectionType: this.connectionType, + connectionId: this.props.vpcLink.vpcLinkId, + uri: this.props.service.serviceArn, + }; + } +} diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/index.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/index.ts new file mode 100644 index 0000000000000..c202386ae710e --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/index.ts @@ -0,0 +1 @@ +export * from './http'; diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json new file mode 100644 index 0000000000000..06d7c8376c1ba --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json @@ -0,0 +1,104 @@ +{ + "name": "@aws-cdk/aws-apigatewayv2-integrations", + "version": "0.0.0", + "description": "Integrations for AWS APIGateway V2", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "jsii": { + "outdir": "dist", + "targets": { + "dotnet": { + "namespace": "Amazon.CDK.AWS.APIGatewayv2.Integrations", + "packageId": "Amazon.CDK.AWS.APIGatewayv2.Integrations", + "signAssembly": true, + "assemblyOriginatorKeyFile": "../../key.snk", + "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/master/logo/default-256-dark.png" + }, + "java": { + "package": "software.amazon.awscdk.services.apigatewayv2.integrations", + "maven": { + "groupId": "software.amazon.awscdk", + "artifactId": "apigatewayv2-integrations" + } + }, + "python": { + "distName": "aws-cdk.aws-apigatewayv2-integrations", + "module": "aws_cdk.aws_apigatewayv2_integrations", + "classifiers": [ + "Framework :: AWS CDK", + "Framework :: AWS CDK :: 1" + ] + } + }, + "projectReferences": true + }, + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk.git", + "directory": "packages/@aws-cdk/aws-apigatewayv2-integrations" + }, + "homepage": "https://github.com/aws/aws-cdk", + "scripts": { + "build": "cdk-build", + "integ": "cdk-integ", + "lint": "cdk-lint", + "package": "cdk-package", + "awslint": "cdk-awslint", + "pkglint": "pkglint -f", + "test": "cdk-test", + "watch": "cdk-watch", + "compat": "cdk-compat", + "build+test": "npm run build && npm test", + "build+test+package": "npm run build+test && npm run package" + }, + "cdk-build": { + "jest": true, + "env": { + "AWSLINT_BASE_CONSTRUCT": true + } + }, + "keywords": [ + "aws", + "cdk", + "constructs", + "apigateway" + ], + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "license": "Apache-2.0", + "devDependencies": { + "@aws-cdk/assert": "0.0.0", + "@types/nodeunit": "^0.0.31", + "cdk-build-tools": "0.0.0", + "cdk-integ-tools": "0.0.0", + "nodeunit": "^0.11.3", + "pkglint": "0.0.0" + }, + "dependencies": { + "@aws-cdk/aws-apigatewayv2": "0.0.0", + "@aws-cdk/aws-ec2": "0.0.0", + "@aws-cdk/aws-elasticloadbalancingv2": "0.0.0", + "@aws-cdk/aws-servicediscovery": "0.0.0", + "@aws-cdk/core": "0.0.0", + "constructs": "^3.2.0" + }, + "peerDependencies": { + "@aws-cdk/aws-apigatewayv2": "0.0.0", + "@aws-cdk/aws-ec2": "0.0.0", + "@aws-cdk/aws-elasticloadbalancingv2": "0.0.0", + "@aws-cdk/aws-servicediscovery": "0.0.0", + "@aws-cdk/core": "0.0.0", + "constructs": "^3.0.4" + }, + "engines": { + "node": ">= 10.13.0 <13 || >=13.7.0" + }, + "stability": "experimental", + "maturity": "experimental", + "awscdkio": { + "announce": false + } +} diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/alb.test.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/alb.test.ts new file mode 100644 index 0000000000000..691da1e4c3b9f --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/alb.test.ts @@ -0,0 +1,101 @@ +import '@aws-cdk/assert/jest'; +import { HttpApi, HttpMethod, HttpRoute, HttpRouteKey, VpcLink } from '@aws-cdk/aws-apigatewayv2'; +import * as ec2 from '@aws-cdk/aws-ec2'; +import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; +import { Stack } from '@aws-cdk/core'; +import { HttpAlbIntegration } from '../../lib'; + +describe('HttpAlbIntegration', () => { + test('default', () => { + // GIVEN + const stack = new Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const lb = new elbv2.ApplicationLoadBalancer(stack, 'lb', { vpc }); + const listener = lb.addListener('listener', { port: 80 }); + listener.addTargets('target', { port: 80 }); + + // WHEN + const api = new HttpApi(stack, 'HttpApi'); + new HttpRoute(stack, 'HttpProxyPrivateRoute', { + httpApi: api, + integration: new HttpAlbIntegration({ + listener, + }), + routeKey: HttpRouteKey.with('/pets'), + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::Integration', { + IntegrationType: 'HTTP_PROXY', + ConnectionId: { + Ref: 'HttpApiVpcLink159804837', + }, + ConnectionType: 'VPC_LINK', + IntegrationMethod: 'ANY', + IntegrationUri: { + Ref: 'lblistener657ADDEC', + }, + PayloadFormatVersion: '1.0', + }); + }); + + test('able to add a custom vpcLink', () => { + // GIVEN + const stack = new Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const vpcLink = new VpcLink(stack, 'VpcLink', { vpc }); + const lb = new elbv2.ApplicationLoadBalancer(stack, 'lb', { vpc }); + const listener = lb.addListener('listener', { port: 80 }); + listener.addTargets('target', { port: 80 }); + + // WHEN + const api = new HttpApi(stack, 'HttpApi'); + new HttpRoute(stack, 'HttpProxyPrivateRoute', { + httpApi: api, + integration: new HttpAlbIntegration({ + vpcLink, + listener, + }), + routeKey: HttpRouteKey.with('/pets'), + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::Integration', { + IntegrationType: 'HTTP_PROXY', + ConnectionId: { + Ref: 'VpcLink42ED6FF0', + }, + ConnectionType: 'VPC_LINK', + IntegrationMethod: 'ANY', + IntegrationUri: { + Ref: 'lblistener657ADDEC', + }, + PayloadFormatVersion: '1.0', + }); + }); + + test('method option is correctly recognized', () => { + // GIVEN + const stack = new Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const lb = new elbv2.ApplicationLoadBalancer(stack, 'lb', { vpc }); + const listener = lb.addListener('listener', { port: 80 }); + listener.addTargets('target', { port: 80 }); + + // WHEN + const api = new HttpApi(stack, 'HttpApi'); + new HttpRoute(stack, 'HttpProxyPrivateRoute', { + httpApi: api, + integration: new HttpAlbIntegration({ + listener, + method: HttpMethod.PATCH, + }), + routeKey: HttpRouteKey.with('/pets'), + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::Integration', { + IntegrationMethod: 'PATCH', + }); + }); +}); diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.alb.expected.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.alb.expected.json new file mode 100644 index 0000000000000..a052f0243e596 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.alb.expected.json @@ -0,0 +1,702 @@ +{ + "Resources": { + "VPCB9E5F0B4": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC" + } + ] + } + }, + "VPCPublicSubnet1SubnetB4246D30": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.0.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1a", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1RouteTableFEE4B781": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1RouteTableAssociation0B0896DC": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + } + } + }, + "VPCPublicSubnet1DefaultRoute91CEF279": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet1EIP6AD938E8": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1NATGatewayE0556630": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet1EIP6AD938E8", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet2Subnet74179F39": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.32.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1b", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2RouteTable6F1A15F1": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2RouteTableAssociation5A808732": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + } + }, + "VPCPublicSubnet2DefaultRouteB7481BBA": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet2EIP4947BC00": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2NATGateway3C070193": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet2EIP4947BC00", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet3Subnet631C5E25": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.64.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1c", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PublicSubnet3" + } + ] + } + }, + "VPCPublicSubnet3RouteTable98AE0E14": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PublicSubnet3" + } + ] + } + }, + "VPCPublicSubnet3RouteTableAssociation427FE0C6": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet3RouteTable98AE0E14" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet3Subnet631C5E25" + } + } + }, + "VPCPublicSubnet3DefaultRouteA0D29D46": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet3RouteTable98AE0E14" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet3EIPAD4BC883": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PublicSubnet3" + } + ] + } + }, + "VPCPublicSubnet3NATGatewayD3048F5C": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet3EIPAD4BC883", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet3Subnet631C5E25" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PublicSubnet3" + } + ] + } + }, + "VPCPrivateSubnet1Subnet8BCA10E0": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.96.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1a", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PrivateSubnet1" + } + ] + } + }, + "VPCPrivateSubnet1RouteTableBE8A6027": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PrivateSubnet1" + } + ] + } + }, + "VPCPrivateSubnet1RouteTableAssociation347902D1": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + } + } + }, + "VPCPrivateSubnet1DefaultRouteAE1D6490": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet1NATGatewayE0556630" + } + } + }, + "VPCPrivateSubnet2SubnetCFCDAA7A": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.128.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1b", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PrivateSubnet2" + } + ] + } + }, + "VPCPrivateSubnet2RouteTable0A19E10E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PrivateSubnet2" + } + ] + } + }, + "VPCPrivateSubnet2RouteTableAssociation0C73D413": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + } + }, + "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet2NATGateway3C070193" + } + } + }, + "VPCPrivateSubnet3Subnet3EDCD457": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.160.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1c", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PrivateSubnet3" + } + ] + } + }, + "VPCPrivateSubnet3RouteTable192186F8": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PrivateSubnet3" + } + ] + } + }, + "VPCPrivateSubnet3RouteTableAssociationC28D144E": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet3RouteTable192186F8" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet3Subnet3EDCD457" + } + } + }, + "VPCPrivateSubnet3DefaultRoute27F311AE": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet3RouteTable192186F8" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" + } + } + }, + "VPCIGWB7E252D3": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC" + } + ] + } + }, + "VPCVPCGW99B986DC": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "InternetGatewayId": { + "Ref": "VPCIGWB7E252D3" + } + } + }, + "lbA35910C5": { + "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", + "Properties": { + "LoadBalancerAttributes": [ + { + "Key": "deletion_protection.enabled", + "Value": "false" + } + ], + "Scheme": "internal", + "SecurityGroups": [ + { + "Fn::GetAtt": [ + "lbSecurityGroup47B6F855", + "GroupId" + ] + } + ], + "Subnets": [ + { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + }, + { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + }, + { + "Ref": "VPCPrivateSubnet3Subnet3EDCD457" + } + ], + "Type": "application" + } + }, + "lbSecurityGroup47B6F855": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "Automatically created Security Group for ELB integalbintegrationlb02F792D5", + "SecurityGroupEgress": [ + { + "CidrIp": "255.255.255.255/32", + "Description": "Disallow all traffic", + "FromPort": 252, + "IpProtocol": "icmp", + "ToPort": 86 + } + ], + "SecurityGroupIngress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow from anyone on port 80", + "FromPort": 80, + "IpProtocol": "tcp", + "ToPort": 80 + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "lblistener657ADDEC": { + "Type": "AWS::ElasticLoadBalancingV2::Listener", + "Properties": { + "DefaultActions": [ + { + "FixedResponseConfig": { + "StatusCode": "200" + }, + "Type": "fixed-response" + } + ], + "LoadBalancerArn": { + "Ref": "lbA35910C5" + }, + "Port": 80, + "Protocol": "HTTP" + } + }, + "lblistenertargetGroupC7489D1E": { + "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", + "Properties": { + "Port": 80, + "Protocol": "HTTP", + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "HttpProxyPrivateApiA55E154D": { + "Type": "AWS::ApiGatewayV2::Api", + "Properties": { + "Name": "HttpProxyPrivateApi", + "ProtocolType": "HTTP" + } + }, + "HttpProxyPrivateApiDefaultRouteDefaultRouteIntegration0AE210B0": { + "Type": "AWS::ApiGatewayV2::Integration", + "Properties": { + "ApiId": { + "Ref": "HttpProxyPrivateApiA55E154D" + }, + "IntegrationType": "HTTP_PROXY", + "ConnectionId": { + "Ref": "HttpProxyPrivateApiVpcLink190366CAE" + }, + "ConnectionType": "VPC_LINK", + "IntegrationMethod": "ANY", + "IntegrationUri": { + "Ref": "lblistener657ADDEC" + }, + "PayloadFormatVersion": "1.0" + } + }, + "HttpProxyPrivateApiDefaultRoute1BDCA252": { + "Type": "AWS::ApiGatewayV2::Route", + "Properties": { + "ApiId": { + "Ref": "HttpProxyPrivateApiA55E154D" + }, + "RouteKey": "$default", + "Target": { + "Fn::Join": [ + "", + [ + "integrations/", + { + "Ref": "HttpProxyPrivateApiDefaultRouteDefaultRouteIntegration0AE210B0" + } + ] + ] + } + } + }, + "HttpProxyPrivateApiVpcLink190366CAE": { + "Type": "AWS::ApiGatewayV2::VpcLink", + "Properties": { + "Name": "integalbintegrationHttpProxyPrivateApiVpcLink125175F29", + "SubnetIds": [ + { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + }, + { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + }, + { + "Ref": "VPCPrivateSubnet3Subnet3EDCD457" + } + ], + "SecurityGroupIds": [] + } + }, + "HttpProxyPrivateApiDefaultStage18B3706E": { + "Type": "AWS::ApiGatewayV2::Stage", + "Properties": { + "ApiId": { + "Ref": "HttpProxyPrivateApiA55E154D" + }, + "StageName": "$default", + "AutoDeploy": true + } + } + }, + "Outputs": { + "Endpoint": { + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "HttpProxyPrivateApiA55E154D" + }, + ".execute-api.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/" + ] + ] + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.alb.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.alb.ts new file mode 100644 index 0000000000000..e077560466851 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.alb.ts @@ -0,0 +1,31 @@ +import { HttpApi } from '@aws-cdk/aws-apigatewayv2'; +import * as ec2 from '@aws-cdk/aws-ec2'; +import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; +import { App, CfnOutput, Stack } from '@aws-cdk/core'; +import { HttpAlbIntegration } from '../../lib'; + +/* + * Stack verification steps: + * * Deploy the stack and wait for the API endpoint output to get printed + * * Hit the above endpoint using curl and expect a 200 response + */ + +const app = new App(); + +const stack = new Stack(app, 'integ-alb-integration'); + +const vpc = new ec2.Vpc(stack, 'VPC'); +const lb = new elbv2.ApplicationLoadBalancer(stack, 'lb', { vpc }); +const listener = lb.addListener('listener', { port: 80 }); +listener.addTargets('target', { port: 80 }); +listener.addAction('dsf', { action: elbv2.ListenerAction.fixedResponse(200) }); + +const httpEndpoint = new HttpApi(stack, 'HttpProxyPrivateApi', { + defaultIntegration: new HttpAlbIntegration({ + listener, + }), +}); + +new CfnOutput(stack, 'Endpoint', { + value: httpEndpoint.url!, +}); diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.nlb.expected.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.nlb.expected.json new file mode 100644 index 0000000000000..ea3801b13354f --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.nlb.expected.json @@ -0,0 +1,667 @@ +{ + "Resources": { + "VPCB9E5F0B4": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC" + } + ] + } + }, + "VPCPublicSubnet1SubnetB4246D30": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.0.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1a", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1RouteTableFEE4B781": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1RouteTableAssociation0B0896DC": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + } + } + }, + "VPCPublicSubnet1DefaultRoute91CEF279": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet1EIP6AD938E8": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1NATGatewayE0556630": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet1EIP6AD938E8", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet2Subnet74179F39": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.32.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1b", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2RouteTable6F1A15F1": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2RouteTableAssociation5A808732": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + } + }, + "VPCPublicSubnet2DefaultRouteB7481BBA": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet2EIP4947BC00": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2NATGateway3C070193": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet2EIP4947BC00", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet3Subnet631C5E25": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.64.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1c", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PublicSubnet3" + } + ] + } + }, + "VPCPublicSubnet3RouteTable98AE0E14": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PublicSubnet3" + } + ] + } + }, + "VPCPublicSubnet3RouteTableAssociation427FE0C6": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet3RouteTable98AE0E14" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet3Subnet631C5E25" + } + } + }, + "VPCPublicSubnet3DefaultRouteA0D29D46": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet3RouteTable98AE0E14" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet3EIPAD4BC883": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PublicSubnet3" + } + ] + } + }, + "VPCPublicSubnet3NATGatewayD3048F5C": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet3EIPAD4BC883", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet3Subnet631C5E25" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PublicSubnet3" + } + ] + } + }, + "VPCPrivateSubnet1Subnet8BCA10E0": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.96.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1a", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PrivateSubnet1" + } + ] + } + }, + "VPCPrivateSubnet1RouteTableBE8A6027": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PrivateSubnet1" + } + ] + } + }, + "VPCPrivateSubnet1RouteTableAssociation347902D1": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + } + } + }, + "VPCPrivateSubnet1DefaultRouteAE1D6490": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet1NATGatewayE0556630" + } + } + }, + "VPCPrivateSubnet2SubnetCFCDAA7A": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.128.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1b", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PrivateSubnet2" + } + ] + } + }, + "VPCPrivateSubnet2RouteTable0A19E10E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PrivateSubnet2" + } + ] + } + }, + "VPCPrivateSubnet2RouteTableAssociation0C73D413": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + } + }, + "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet2NATGateway3C070193" + } + } + }, + "VPCPrivateSubnet3Subnet3EDCD457": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.160.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1c", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PrivateSubnet3" + } + ] + } + }, + "VPCPrivateSubnet3RouteTable192186F8": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PrivateSubnet3" + } + ] + } + }, + "VPCPrivateSubnet3RouteTableAssociationC28D144E": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet3RouteTable192186F8" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet3Subnet3EDCD457" + } + } + }, + "VPCPrivateSubnet3DefaultRoute27F311AE": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet3RouteTable192186F8" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" + } + } + }, + "VPCIGWB7E252D3": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC" + } + ] + } + }, + "VPCVPCGW99B986DC": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "InternetGatewayId": { + "Ref": "VPCIGWB7E252D3" + } + } + }, + "lbA35910C5": { + "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", + "Properties": { + "LoadBalancerAttributes": [ + { + "Key": "deletion_protection.enabled", + "Value": "false" + } + ], + "Scheme": "internal", + "Subnets": [ + { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + }, + { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + }, + { + "Ref": "VPCPrivateSubnet3Subnet3EDCD457" + } + ], + "Type": "network" + } + }, + "lblistener657ADDEC": { + "Type": "AWS::ElasticLoadBalancingV2::Listener", + "Properties": { + "DefaultActions": [ + { + "TargetGroupArn": { + "Ref": "lblistenertargetGroupC7489D1E" + }, + "Type": "forward" + } + ], + "LoadBalancerArn": { + "Ref": "lbA35910C5" + }, + "Port": 80, + "Protocol": "TCP" + } + }, + "lblistenertargetGroupC7489D1E": { + "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", + "Properties": { + "Port": 80, + "Protocol": "TCP", + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "HttpProxyPrivateApiA55E154D": { + "Type": "AWS::ApiGatewayV2::Api", + "Properties": { + "Name": "HttpProxyPrivateApi", + "ProtocolType": "HTTP" + } + }, + "HttpProxyPrivateApiDefaultRouteDefaultRouteIntegration0AE210B0": { + "Type": "AWS::ApiGatewayV2::Integration", + "Properties": { + "ApiId": { + "Ref": "HttpProxyPrivateApiA55E154D" + }, + "IntegrationType": "HTTP_PROXY", + "ConnectionId": { + "Ref": "HttpProxyPrivateApiVpcLink190366CAE" + }, + "ConnectionType": "VPC_LINK", + "IntegrationMethod": "ANY", + "IntegrationUri": { + "Ref": "lblistener657ADDEC" + }, + "PayloadFormatVersion": "1.0" + } + }, + "HttpProxyPrivateApiDefaultRoute1BDCA252": { + "Type": "AWS::ApiGatewayV2::Route", + "Properties": { + "ApiId": { + "Ref": "HttpProxyPrivateApiA55E154D" + }, + "RouteKey": "$default", + "Target": { + "Fn::Join": [ + "", + [ + "integrations/", + { + "Ref": "HttpProxyPrivateApiDefaultRouteDefaultRouteIntegration0AE210B0" + } + ] + ] + } + } + }, + "HttpProxyPrivateApiVpcLink190366CAE": { + "Type": "AWS::ApiGatewayV2::VpcLink", + "Properties": { + "Name": "integnlbintegrationHttpProxyPrivateApiVpcLink1C940EC42", + "SubnetIds": [ + { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + }, + { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + }, + { + "Ref": "VPCPrivateSubnet3Subnet3EDCD457" + } + ], + "SecurityGroupIds": [] + } + }, + "HttpProxyPrivateApiDefaultStage18B3706E": { + "Type": "AWS::ApiGatewayV2::Stage", + "Properties": { + "ApiId": { + "Ref": "HttpProxyPrivateApiA55E154D" + }, + "StageName": "$default", + "AutoDeploy": true + } + } + }, + "Outputs": { + "Endpoint": { + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "HttpProxyPrivateApiA55E154D" + }, + ".execute-api.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/" + ] + ] + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.nlb.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.nlb.ts new file mode 100644 index 0000000000000..9b78c3f676e30 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.nlb.ts @@ -0,0 +1,24 @@ +import { HttpApi } from '@aws-cdk/aws-apigatewayv2'; +import * as ec2 from '@aws-cdk/aws-ec2'; +import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; +import { App, CfnOutput, Stack } from '@aws-cdk/core'; +import { HttpNlbIntegration } from '../../lib'; + +const app = new App(); + +const stack = new Stack(app, 'integ-nlb-integration'); + +const vpc = new ec2.Vpc(stack, 'VPC'); +const lb = new elbv2.NetworkLoadBalancer(stack, 'lb', { vpc }); +const listener = lb.addListener('listener', { port: 80 }); +listener.addTargets('target', { port: 80 }); + +const httpEndpoint = new HttpApi(stack, 'HttpProxyPrivateApi', { + defaultIntegration: new HttpNlbIntegration({ + listener, + }), +}); + +new CfnOutput(stack, 'Endpoint', { + value: httpEndpoint.url!, +}); diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.service-discovery.expected.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.service-discovery.expected.json new file mode 100644 index 0000000000000..30e1c20fbaddc --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.service-discovery.expected.json @@ -0,0 +1,653 @@ +{ + "Resources": { + "VPCB9E5F0B4": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC" + } + ] + } + }, + "VPCPublicSubnet1SubnetB4246D30": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.0.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1a", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1RouteTableFEE4B781": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1RouteTableAssociation0B0896DC": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + } + } + }, + "VPCPublicSubnet1DefaultRoute91CEF279": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet1EIP6AD938E8": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1NATGatewayE0556630": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet1EIP6AD938E8", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet2Subnet74179F39": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.32.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1b", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2RouteTable6F1A15F1": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2RouteTableAssociation5A808732": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + } + }, + "VPCPublicSubnet2DefaultRouteB7481BBA": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet2EIP4947BC00": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2NATGateway3C070193": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet2EIP4947BC00", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet3Subnet631C5E25": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.64.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1c", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PublicSubnet3" + } + ] + } + }, + "VPCPublicSubnet3RouteTable98AE0E14": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PublicSubnet3" + } + ] + } + }, + "VPCPublicSubnet3RouteTableAssociation427FE0C6": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet3RouteTable98AE0E14" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet3Subnet631C5E25" + } + } + }, + "VPCPublicSubnet3DefaultRouteA0D29D46": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet3RouteTable98AE0E14" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet3EIPAD4BC883": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PublicSubnet3" + } + ] + } + }, + "VPCPublicSubnet3NATGatewayD3048F5C": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet3EIPAD4BC883", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet3Subnet631C5E25" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PublicSubnet3" + } + ] + } + }, + "VPCPrivateSubnet1Subnet8BCA10E0": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.96.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1a", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PrivateSubnet1" + } + ] + } + }, + "VPCPrivateSubnet1RouteTableBE8A6027": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PrivateSubnet1" + } + ] + } + }, + "VPCPrivateSubnet1RouteTableAssociation347902D1": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + } + } + }, + "VPCPrivateSubnet1DefaultRouteAE1D6490": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet1NATGatewayE0556630" + } + } + }, + "VPCPrivateSubnet2SubnetCFCDAA7A": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.128.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1b", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PrivateSubnet2" + } + ] + } + }, + "VPCPrivateSubnet2RouteTable0A19E10E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PrivateSubnet2" + } + ] + } + }, + "VPCPrivateSubnet2RouteTableAssociation0C73D413": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + } + }, + "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet2NATGateway3C070193" + } + } + }, + "VPCPrivateSubnet3Subnet3EDCD457": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.160.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1c", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PrivateSubnet3" + } + ] + } + }, + "VPCPrivateSubnet3RouteTable192186F8": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PrivateSubnet3" + } + ] + } + }, + "VPCPrivateSubnet3RouteTableAssociationC28D144E": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet3RouteTable192186F8" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet3Subnet3EDCD457" + } + } + }, + "VPCPrivateSubnet3DefaultRoute27F311AE": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet3RouteTable192186F8" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" + } + } + }, + "VPCIGWB7E252D3": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC" + } + ] + } + }, + "VPCVPCGW99B986DC": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "InternetGatewayId": { + "Ref": "VPCIGWB7E252D3" + } + } + }, + "VpcLink42ED6FF0": { + "Type": "AWS::ApiGatewayV2::VpcLink", + "Properties": { + "Name": "integservicediscoveryintegrationVpcLink09ACD3FF", + "SubnetIds": [ + { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + }, + { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + }, + { + "Ref": "VPCPrivateSubnet3Subnet3EDCD457" + } + ], + "SecurityGroupIds": [] + } + }, + "Namespace9B63B8C8": { + "Type": "AWS::ServiceDiscovery::PrivateDnsNamespace", + "Properties": { + "Name": "foobar.com", + "Vpc": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "NamespaceServiceCABDF534": { + "Type": "AWS::ServiceDiscovery::Service", + "Properties": { + "DnsConfig": { + "DnsRecords": [ + { + "TTL": 60, + "Type": "A" + } + ], + "NamespaceId": { + "Fn::GetAtt": [ + "Namespace9B63B8C8", + "Id" + ] + }, + "RoutingPolicy": "MULTIVALUE" + }, + "NamespaceId": { + "Fn::GetAtt": [ + "Namespace9B63B8C8", + "Id" + ] + } + } + }, + "HttpProxyPrivateApiA55E154D": { + "Type": "AWS::ApiGatewayV2::Api", + "Properties": { + "Name": "HttpProxyPrivateApi", + "ProtocolType": "HTTP" + } + }, + "HttpProxyPrivateApiDefaultRouteDefaultRouteIntegration0AE210B0": { + "Type": "AWS::ApiGatewayV2::Integration", + "Properties": { + "ApiId": { + "Ref": "HttpProxyPrivateApiA55E154D" + }, + "IntegrationType": "HTTP_PROXY", + "ConnectionId": { + "Ref": "VpcLink42ED6FF0" + }, + "ConnectionType": "VPC_LINK", + "IntegrationMethod": "ANY", + "IntegrationUri": { + "Fn::GetAtt": [ + "NamespaceServiceCABDF534", + "Arn" + ] + }, + "PayloadFormatVersion": "1.0" + } + }, + "HttpProxyPrivateApiDefaultRoute1BDCA252": { + "Type": "AWS::ApiGatewayV2::Route", + "Properties": { + "ApiId": { + "Ref": "HttpProxyPrivateApiA55E154D" + }, + "RouteKey": "$default", + "Target": { + "Fn::Join": [ + "", + [ + "integrations/", + { + "Ref": "HttpProxyPrivateApiDefaultRouteDefaultRouteIntegration0AE210B0" + } + ] + ] + } + } + }, + "HttpProxyPrivateApiDefaultStage18B3706E": { + "Type": "AWS::ApiGatewayV2::Stage", + "Properties": { + "ApiId": { + "Ref": "HttpProxyPrivateApiA55E154D" + }, + "StageName": "$default", + "AutoDeploy": true + } + } + }, + "Outputs": { + "Endpoint": { + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "HttpProxyPrivateApiA55E154D" + }, + ".execute-api.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/" + ] + ] + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.service-discovery.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.service-discovery.ts new file mode 100644 index 0000000000000..1ff64ba5955c9 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.service-discovery.ts @@ -0,0 +1,28 @@ +import { HttpApi, VpcLink } from '@aws-cdk/aws-apigatewayv2'; +import * as ec2 from '@aws-cdk/aws-ec2'; +import * as servicediscovery from '@aws-cdk/aws-servicediscovery'; +import { App, CfnOutput, Stack } from '@aws-cdk/core'; +import { HttpServiceDiscoveryIntegration } from '../../lib'; + +const app = new App(); + +const stack = new Stack(app, 'integ-service-discovery-integration'); + +const vpc = new ec2.Vpc(stack, 'VPC'); +const vpcLink = new VpcLink(stack, 'VpcLink', { vpc }); +const namespace = new servicediscovery.PrivateDnsNamespace(stack, 'Namespace', { + name: 'foobar.com', + vpc, +}); +const service = namespace.createService('Service'); + +const httpEndpoint = new HttpApi(stack, 'HttpProxyPrivateApi', { + defaultIntegration: new HttpServiceDiscoveryIntegration({ + vpcLink, + service, + }), +}); + +new CfnOutput(stack, 'Endpoint', { + value: httpEndpoint.url!, +}); diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/nlb.test.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/nlb.test.ts new file mode 100644 index 0000000000000..ec537cfedb311 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/nlb.test.ts @@ -0,0 +1,102 @@ +import '@aws-cdk/assert/jest'; +import { HttpApi, HttpMethod, HttpRoute, HttpRouteKey, VpcLink } from '@aws-cdk/aws-apigatewayv2'; +import * as ec2 from '@aws-cdk/aws-ec2'; +import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; +import { Stack } from '@aws-cdk/core'; +import { HttpNlbIntegration } from '../../lib'; + +describe('HttpNlbIntegration', () => { + test('default', () => { + // GIVEN + const stack = new Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const lb = new elbv2.NetworkLoadBalancer(stack, 'lb', { vpc }); + const listener = lb.addListener('listener', { port: 80 }); + listener.addTargets('target', { port: 80 }); + + // WHEN + const api = new HttpApi(stack, 'HttpApi'); + new HttpRoute(stack, 'HttpProxyPrivateRoute', { + httpApi: api, + integration: new HttpNlbIntegration({ + listener, + }), + routeKey: HttpRouteKey.with('/pets'), + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::Integration', { + IntegrationType: 'HTTP_PROXY', + ConnectionId: { + Ref: 'HttpApiVpcLink159804837', + }, + ConnectionType: 'VPC_LINK', + IntegrationMethod: 'ANY', + IntegrationUri: { + Ref: 'lblistener657ADDEC', + }, + PayloadFormatVersion: '1.0', + }); + }); + + test('able to add a custom vpcLink', () => { + // GIVEN + const stack = new Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const vpcLink = new VpcLink(stack, 'VpcLink', { vpc }); + const lb = new elbv2.NetworkLoadBalancer(stack, 'lb', { vpc }); + const listener = lb.addListener('listener', { port: 80 }); + listener.addTargets('target', { port: 80 }); + + // WHEN + const api = new HttpApi(stack, 'HttpApi'); + new HttpRoute(stack, 'HttpProxyPrivateRoute', { + httpApi: api, + integration: new HttpNlbIntegration({ + vpcLink, + listener, + }), + routeKey: HttpRouteKey.with('/pets'), + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::Integration', { + IntegrationType: 'HTTP_PROXY', + ConnectionId: { + Ref: 'VpcLink42ED6FF0', + }, + ConnectionType: 'VPC_LINK', + IntegrationMethod: 'ANY', + IntegrationUri: { + Ref: 'lblistener657ADDEC', + }, + PayloadFormatVersion: '1.0', + }); + }); + + + test('method option is correctly recognized', () => { + // GIVEN + const stack = new Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const lb = new elbv2.NetworkLoadBalancer(stack, 'lb', { vpc }); + const listener = lb.addListener('listener', { port: 80 }); + listener.addTargets('target', { port: 80 }); + + // WHEN + const api = new HttpApi(stack, 'HttpApi'); + new HttpRoute(stack, 'HttpProxyPrivateRoute', { + httpApi: api, + integration: new HttpNlbIntegration({ + listener, + method: HttpMethod.PATCH, + }), + routeKey: HttpRouteKey.with('/pets'), + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::Integration', { + IntegrationMethod: 'PATCH', + }); + }); +}); diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/private/integration.test.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/private/integration.test.ts new file mode 100644 index 0000000000000..ce5f269f648a0 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/private/integration.test.ts @@ -0,0 +1,37 @@ +import '@aws-cdk/assert/jest'; +import { HttpApi, HttpRoute, HttpRouteIntegrationBindOptions, HttpRouteIntegrationConfig, HttpRouteKey } from '@aws-cdk/aws-apigatewayv2'; +import { Stack } from '@aws-cdk/core'; +import { HttpPrivateIntegration } from '../../../lib/http/private/integration'; + +describe('HttpPrivateIntegration', () => { + test('throws error if both vpcLink and vpc are not passed', () => { + // GIVEN + const stack = new Stack(); + class DummyPrivateIntegration extends HttpPrivateIntegration { + constructor() { + super(); + } + + public bind(options: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig { + const vpcLink = this._configureVpcLink(options, {}); + + return { + method: this.httpMethod, + payloadFormatVersion: this.payloadFormatVersion, + type: this.integrationType, + connectionType: this.connectionType, + connectionId: vpcLink.vpcLinkId, + uri: 'some-uri', + }; + } + } + + // WHEN + const api = new HttpApi(stack, 'HttpApi'); + expect(() => new HttpRoute(stack, 'HttpProxyPrivateRoute', { + httpApi: api, + integration: new DummyPrivateIntegration(), + routeKey: HttpRouteKey.with('/pets'), + })).toThrow(/One of vpcLink or vpc should be provided for private integration/); + }); +}); diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/service-discovery.test.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/service-discovery.test.ts new file mode 100644 index 0000000000000..62097b9d0a3c0 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/service-discovery.test.ts @@ -0,0 +1,77 @@ +import '@aws-cdk/assert/jest'; +import { HttpApi, HttpMethod, HttpRoute, HttpRouteKey, VpcLink } from '@aws-cdk/aws-apigatewayv2'; +import * as ec2 from '@aws-cdk/aws-ec2'; +import * as servicediscovery from '@aws-cdk/aws-servicediscovery'; +import { Stack } from '@aws-cdk/core'; +import { HttpServiceDiscoveryIntegration } from '../../lib'; + +describe('HttpServiceDiscoveryIntegration', () => { + test('default', () => { + // GIVEN + const stack = new Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const vpcLink = new VpcLink(stack, 'VpcLink', { vpc }); + const namespace = new servicediscovery.PrivateDnsNamespace(stack, 'Namespace', { + name: 'foobar.com', + vpc, + }); + const service = namespace.createService('Service'); + + // WHEN + const api = new HttpApi(stack, 'HttpApi'); + new HttpRoute(stack, 'HttpProxyPrivateRoute', { + httpApi: api, + integration: new HttpServiceDiscoveryIntegration({ + vpcLink, + service, + }), + routeKey: HttpRouteKey.with('/pets'), + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::Integration', { + IntegrationType: 'HTTP_PROXY', + ConnectionId: { + Ref: 'VpcLink42ED6FF0', + }, + ConnectionType: 'VPC_LINK', + IntegrationMethod: 'ANY', + IntegrationUri: { + 'Fn::GetAtt': [ + 'NamespaceServiceCABDF534', + 'Arn', + ], + }, + PayloadFormatVersion: '1.0', + }); + }); + + test('method option is correctly recognized', () => { + // GIVEN + const stack = new Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const vpcLink = new VpcLink(stack, 'VpcLink', { vpc }); + const namespace = new servicediscovery.PrivateDnsNamespace(stack, 'Namespace', { + name: 'foobar.com', + vpc, + }); + const service = namespace.createService('Service'); + + // WHEN + const api = new HttpApi(stack, 'HttpApi'); + new HttpRoute(stack, 'HttpProxyPrivateRoute', { + httpApi: api, + integration: new HttpServiceDiscoveryIntegration({ + vpcLink, + service, + method: HttpMethod.PATCH, + }), + routeKey: HttpRouteKey.with('/pets'), + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::Integration', { + IntegrationMethod: 'PATCH', + }); + }); +}); diff --git a/packages/@aws-cdk/aws-apigatewayv2/README.md b/packages/@aws-cdk/aws-apigatewayv2/README.md index e5cf86886aa3d..208271df2a732 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/README.md +++ b/packages/@aws-cdk/aws-apigatewayv2/README.md @@ -24,6 +24,8 @@ - [Publishing HTTP APIs](#publishing-http-apis) - [Custom Domain](#custom-domain) - [Metrics](#metrics) + - [VPC Link](#vpc-link) + - [Private Integration](#private-integration) ## Introduction @@ -223,3 +225,28 @@ const stage = new HttpStage(stack, 'Stage', { }); const clientErrorMetric = stage.metricClientError(); ``` + +### VPC Link + +Private integrations let HTTP APIs connect with AWS resources that are placed behind a VPC. These are usually Application +Load Balancers, Network Load Balancers or a Cloud Map service. The `VpcLink` construct enables this integration. +The following code creates a `VpcLink` to a private VPC. + +```ts +const vpc = new ec2.Vpc(stack, 'VPC'); +const vpcLink = new VpcLink(stack, 'VpcLink', { vpc }); +``` + +Any existing `VpcLink` resource can be imported into the CDK app via the `VpcLink.fromVpcLinkId()`. + +```ts +const awesomeLink = VpcLink.fromVpcLinkId(stack, 'awesome-vpc-link', 'us-east-1_oiuR12Abd'); +``` + +### Private Integration + +Private integrations enable integrating an HTTP API route with private resources in a VPC, such as Application Load Balancers or +Amazon ECS container-based applications. Using private integrations, resources in a VPC can be exposed for access by +clients outside of the VPC. + +These integrations can be found in the [APIGatewayV2-Integrations](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-apigatewayv2-integrations-readme.html) constructs library. diff --git a/packages/@aws-cdk/aws-apigatewayv2/lib/http/api.ts b/packages/@aws-cdk/aws-apigatewayv2/lib/http/api.ts index ff75808b5a8d6..8ea35ab4f1312 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/lib/http/api.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/lib/http/api.ts @@ -6,6 +6,7 @@ import { DefaultDomainMappingOptions } from '../http/stage'; import { IHttpRouteIntegration } from './integration'; import { BatchHttpRouteOptions, HttpMethod, HttpRoute, HttpRouteKey } from './route'; import { HttpStage, HttpStageOptions } from './stage'; +import { VpcLink, VpcLinkProps } from './vpc-link'; /** * Represents an HTTP API @@ -73,6 +74,11 @@ export interface IHttpApi extends IResource { * @default - no statistic */ metricLatency(props?: MetricOptions): Metric; + + /** + * Add a new VpcLink + */ + addVpcLink(options: VpcLinkProps): VpcLink } /** @@ -178,6 +184,7 @@ export interface AddRoutesOptions extends BatchHttpRouteOptions { abstract class HttpApiBase extends Resource implements IHttpApi { // note that this is not exported public abstract readonly httpApiId: string; + private vpcLinks: Record = {}; public metric(metricName: string, props?: MetricOptions): Metric { return new Metric({ @@ -211,6 +218,19 @@ abstract class HttpApiBase extends Resource implements IHttpApi { // note that t public metricLatency(props?: MetricOptions): Metric { return this.metric('Latency', props); } + + public addVpcLink(options: VpcLinkProps): VpcLink { + const { vpcId } = options.vpc; + if (vpcId in this.vpcLinks) { + return this.vpcLinks[vpcId]; + } + + const count = Object.keys(this.vpcLinks).length + 1; + const vpcLink = new VpcLink(this, `VpcLink-${count}`, options); + this.vpcLinks[vpcId] = vpcLink; + + return vpcLink; + } } /** diff --git a/packages/@aws-cdk/aws-apigatewayv2/lib/http/index.ts b/packages/@aws-cdk/aws-apigatewayv2/lib/http/index.ts index c42e089aa1d08..ee07bd7af8ee2 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/lib/http/index.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/lib/http/index.ts @@ -4,3 +4,4 @@ export * from './integration'; export * from './integrations'; export * from './stage'; export * from './api-mapping'; +export * from './vpc-link'; diff --git a/packages/@aws-cdk/aws-apigatewayv2/lib/http/integration.ts b/packages/@aws-cdk/aws-apigatewayv2/lib/http/integration.ts index 237177f31957a..e609c9396c08f 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/lib/http/integration.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/lib/http/integration.ts @@ -33,6 +33,20 @@ export enum HttpIntegrationType { HTTP_PROXY = 'HTTP_PROXY', } +/** + * Supported connection types + */ +export enum HttpConnectionType { + /** + * For private connections between API Gateway and resources in a VPC + */ + VPC_LINK = 'VPC_LINK', + /** + * For connections through public routable internet + */ + INTERNET = 'INTERNET', +} + /** * Payload format version for lambda proxy integration * @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html @@ -86,6 +100,20 @@ export interface HttpIntegrationProps { */ readonly method?: HttpMethod; + /** + * The ID of the VPC link for a private integration. Supported only for HTTP APIs. + * + * @default - undefined + */ + readonly connectionId?: string; + + /** + * The type of the network connection to the integration endpoint + * + * @default HttpConnectionType.INTERNET + */ + readonly connectionType?: HttpConnectionType; + /** * The version of the payload format * @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html @@ -110,6 +138,8 @@ export class HttpIntegration extends Resource implements IHttpIntegration { integrationType: props.integrationType, integrationUri: props.integrationUri, integrationMethod: props.method, + connectionId: props.connectionId, + connectionType: props.connectionType, payloadFormatVersion: props.payloadFormatVersion?.version, }); this.integrationId = integ.ref; @@ -165,6 +195,20 @@ export interface HttpRouteIntegrationConfig { */ readonly method?: HttpMethod; + /** + * The ID of the VPC link for a private integration. Supported only for HTTP APIs. + * + * @default - undefined + */ + readonly connectionId?: string; + + /** + * The type of the network connection to the integration endpoint + * + * @default HttpConnectionType.INTERNET + */ + readonly connectionType?: HttpConnectionType; + /** * Payload format version in the case of lambda proxy integration * @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html diff --git a/packages/@aws-cdk/aws-apigatewayv2/lib/http/route.ts b/packages/@aws-cdk/aws-apigatewayv2/lib/http/route.ts index 6f13c46d9e3d5..e688e78d84921 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/lib/http/route.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/lib/http/route.ts @@ -120,16 +120,18 @@ export class HttpRoute extends Resource implements IHttpRoute { this.httpApi = props.httpApi; this.path = props.routeKey.path; - let integration: HttpIntegration | undefined; const config = props.integration.bind({ route: this, scope: this, }); - integration = new HttpIntegration(this, `${this.node.id}-Integration`, { + + const integration = new HttpIntegration(this, `${this.node.id}-Integration`, { httpApi: props.httpApi, integrationType: config.type, integrationUri: config.uri, method: config.method, + connectionId: config.connectionId, + connectionType: config.connectionType, payloadFormatVersion: config.payloadFormatVersion, }); diff --git a/packages/@aws-cdk/aws-apigatewayv2/lib/http/vpc-link.ts b/packages/@aws-cdk/aws-apigatewayv2/lib/http/vpc-link.ts new file mode 100644 index 0000000000000..ac832a730e62c --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2/lib/http/vpc-link.ts @@ -0,0 +1,120 @@ +import * as ec2 from '@aws-cdk/aws-ec2'; +import { IResource, Lazy, Resource } from '@aws-cdk/core'; +import { Construct } from 'constructs'; +import { CfnVpcLink } from '../apigatewayv2.generated'; + +/** + * Represents an API Gateway VpcLink + */ +export interface IVpcLink extends IResource { + /** + * Physical ID of the VpcLink resource + * @attribute + */ + readonly vpcLinkId: string; +} + +/** + * Properties for a VpcLink + */ +export interface VpcLinkProps { + /** + * The VPC in which the private resources reside. + */ + readonly vpc: ec2.IVpc; + + /** + * The name used to label and identify the VPC link. + * @default - automatically generated name + */ + readonly vpcLinkName?: string; + + /** + * A list of subnets for the VPC link. + * + * @default - private subnets of the provided VPC. Use `addSubnets` to add more subnets + */ + readonly subnets?: ec2.ISubnet[]; + + /** + * A list of security groups for the VPC link. + * + * @default - no security groups. Use `addSecurityGroups` to add security groups + */ + readonly securityGroups?: ec2.ISecurityGroup[]; +} + + +/** + * Define a new VPC Link + * Specifies an API Gateway VPC link for a HTTP API to access resources in an Amazon Virtual Private Cloud (VPC). + */ +export class VpcLink extends Resource implements IVpcLink { + /** + * Import a VPC Link by its Id + */ + public static fromVpcLinkId(scope: Construct, id: string, vpcLinkId: string): IVpcLink { + class Import extends Resource implements IVpcLink { + public vpcLinkId = vpcLinkId; + } + + return new Import(scope, id); + } + + /** + * Physical ID of the VpcLink resource + * @attribute + */ + public readonly vpcLinkId: string; + + private readonly subnets = new Array(); + private readonly securityGroups = new Array(); + + constructor(scope: Construct, id: string, props: VpcLinkProps) { + super(scope, id); + + const cfnResource = new CfnVpcLink(this, 'Resource', { + name: props.vpcLinkName || Lazy.stringValue({ produce: () => this.node.uniqueId }), + subnetIds: Lazy.listValue({ produce: () => this.renderSubnets() }), + securityGroupIds: Lazy.listValue({ produce: () => this.renderSecurityGroups() }), + }); + + this.vpcLinkId = cfnResource.ref; + + this.addSubnets(...props.vpc.privateSubnets); + + if (props.subnets) { + this.addSubnets(...props.subnets); + } + + if (props.securityGroups) { + this.addSecurityGroups(...props.securityGroups); + } + } + + /** + * Adds the provided subnets to the vpc link + * + * @param subnets + */ + public addSubnets(...subnets: ec2.ISubnet[]) { + this.subnets.push(...subnets); + } + + /** + * Adds the provided security groups to the vpc link + * + * @param groups + */ + public addSecurityGroups(...groups: ec2.ISecurityGroup[]) { + this.securityGroups.push(...groups); + } + + private renderSubnets() { + return this.subnets.map(subnet => subnet.subnetId); + } + + private renderSecurityGroups() { + return this.securityGroups.map(sg => sg.securityGroupId); + } +} diff --git a/packages/@aws-cdk/aws-apigatewayv2/package.json b/packages/@aws-cdk/aws-apigatewayv2/package.json index 75bc25b0c05af..c62cf72f5d918 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/package.json +++ b/packages/@aws-cdk/aws-apigatewayv2/package.json @@ -81,6 +81,7 @@ }, "dependencies": { "@aws-cdk/aws-certificatemanager": "0.0.0", + "@aws-cdk/aws-ec2": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-cloudwatch": "0.0.0", @@ -88,6 +89,7 @@ "constructs": "^3.2.0" }, "peerDependencies": { + "@aws-cdk/aws-ec2": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-certificatemanager": "0.0.0", diff --git a/packages/@aws-cdk/aws-apigatewayv2/test/http/api.test.ts b/packages/@aws-cdk/aws-apigatewayv2/test/http/api.test.ts index 13ee4e120945d..bfc9c9102a011 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/test/http/api.test.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/test/http/api.test.ts @@ -1,6 +1,7 @@ import '@aws-cdk/assert/jest'; import { ABSENT } from '@aws-cdk/assert'; import { Metric } from '@aws-cdk/aws-cloudwatch'; +import * as ec2 from '@aws-cdk/aws-ec2'; import { Code, Function, Runtime } from '@aws-cdk/aws-lambda'; import { Duration, Stack } from '@aws-cdk/core'; import { HttpApi, HttpMethod, LambdaProxyIntegration } from '../../lib'; @@ -233,4 +234,43 @@ describe('HttpApi', () => { Description: 'My Api', }); }); + + test('can add a vpc links', () => { + // GIVEN + const stack = new Stack(); + const api = new HttpApi(stack, 'api'); + const vpc1 = new ec2.Vpc(stack, 'VPC-1'); + const vpc2 = new ec2.Vpc(stack, 'VPC-2'); + + // WHEN + api.addVpcLink({ vpc: vpc1, vpcLinkName: 'Link-1' }); + api.addVpcLink({ vpc: vpc2, vpcLinkName: 'Link-2' }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::VpcLink', { + Name: 'Link-1', + }); + expect(stack).toHaveResource('AWS::ApiGatewayV2::VpcLink', { + Name: 'Link-2', + }); + }); + + test('should add only one vpc link per vpc', () => { + // GIVEN + const stack = new Stack(); + const api = new HttpApi(stack, 'api'); + const vpc = new ec2.Vpc(stack, 'VPC'); + + // WHEN + api.addVpcLink({ vpc, vpcLinkName: 'Link-1' }); + api.addVpcLink({ vpc, vpcLinkName: 'Link-2' }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::VpcLink', { + Name: 'Link-1', + }); + expect(stack).not.toHaveResource('AWS::ApiGatewayV2::VpcLink', { + Name: 'Link-2', + }); + }); }); diff --git a/packages/@aws-cdk/aws-apigatewayv2/test/http/route.test.ts b/packages/@aws-cdk/aws-apigatewayv2/test/http/route.test.ts index 6d125b5eadc6e..e250ae153389d 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/test/http/route.test.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/test/http/route.test.ts @@ -1,7 +1,7 @@ import '@aws-cdk/assert/jest'; import { Stack } from '@aws-cdk/core'; import { - HttpApi, HttpIntegrationType, HttpMethod, HttpRoute, HttpRouteIntegrationConfig, HttpRouteKey, IHttpRouteIntegration, + HttpApi, HttpConnectionType, HttpIntegrationType, HttpMethod, HttpRoute, HttpRouteIntegrationConfig, HttpRouteKey, IHttpRouteIntegration, PayloadFormatVersion, } from '../../lib'; @@ -77,6 +77,42 @@ describe('HttpRoute', () => { })).toThrowError(/path must always start with a "\/" and not end with a "\/"/); }); + test('configures private integration correctly when all props are passed', () => { + // GIVEN + const stack = new Stack(); + const httpApi = new HttpApi(stack, 'HttpApi'); + + class PrivateIntegration implements IHttpRouteIntegration { + public bind(): HttpRouteIntegrationConfig { + return { + method: HttpMethod.ANY, + payloadFormatVersion: PayloadFormatVersion.VERSION_1_0, + type: HttpIntegrationType.HTTP_PROXY, + connectionId: 'some-connection-id', + connectionType: HttpConnectionType.VPC_LINK, + uri: 'some-target-arn', + }; + } + } + + // WHEN + new HttpRoute(stack, 'HttpRoute', { + httpApi, + integration: new PrivateIntegration(), + routeKey: HttpRouteKey.with('/books', HttpMethod.GET), + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::Integration', { + IntegrationType: 'HTTP_PROXY', + ConnectionId: 'some-connection-id', + ConnectionType: 'VPC_LINK', + IntegrationMethod: 'ANY', + IntegrationUri: 'some-target-arn', + PayloadFormatVersion: '1.0', + }); + expect(stack).not.toHaveResource('AWS::ApiGatewayV2::VpcLink'); + }); }); class DummyIntegration implements IHttpRouteIntegration { diff --git a/packages/@aws-cdk/aws-apigatewayv2/test/http/vpc-link.test.ts b/packages/@aws-cdk/aws-apigatewayv2/test/http/vpc-link.test.ts new file mode 100644 index 0000000000000..b5f7dc178e458 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2/test/http/vpc-link.test.ts @@ -0,0 +1,188 @@ +import '@aws-cdk/assert/jest'; +import * as ec2 from '@aws-cdk/aws-ec2'; +import { Stack } from '@aws-cdk/core'; +import { VpcLink } from '../../lib'; + +describe('VpcLink', () => { + test('default setup', () => { + // GIVEN + const stack = new Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + + // WHEN + new VpcLink(stack, 'VpcLink', { + vpcLinkName: 'MyLink', + vpc, + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::VpcLink', { + Name: 'MyLink', + SubnetIds: [ + { + Ref: 'VPCPrivateSubnet1Subnet8BCA10E0', + }, + { + Ref: 'VPCPrivateSubnet2SubnetCFCDAA7A', + }, + ], + SecurityGroupIds: [], + }); + }); + + test('subnets and security security groups in props', () => { + // GIVEN + const stack = new Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const subnet1 = new ec2.Subnet(stack, 'subnet1', { + vpcId: vpc.vpcId, + availabilityZone: vpc.availabilityZones[0], + cidrBlock: vpc.vpcCidrBlock, + }); + const subnet2 = new ec2.Subnet(stack, 'subnet2', { + vpcId: vpc.vpcId, + availabilityZone: vpc.availabilityZones[1], + cidrBlock: vpc.vpcCidrBlock, + }); + const sg1 = new ec2.SecurityGroup(stack, 'SG1', { vpc }); + const sg2 = new ec2.SecurityGroup(stack, 'SG2', { vpc }); + const sg3 = new ec2.SecurityGroup(stack, 'SG3', { vpc }); + + // WHEN + new VpcLink(stack, 'VpcLink', { + vpc, + subnets: [subnet1, subnet2], + securityGroups: [sg1, sg2, sg3], + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::VpcLink', { + Name: 'VpcLink', + SubnetIds: [ + { + Ref: 'VPCPrivateSubnet1Subnet8BCA10E0', + }, + { + Ref: 'VPCPrivateSubnet2SubnetCFCDAA7A', + }, + { + Ref: 'subnet1Subnet16A4B3BD', + }, + { + Ref: 'subnet2SubnetF9569CD3', + }, + ], + SecurityGroupIds: [ + { + 'Fn::GetAtt': [ + 'SG1BA065B6E', + 'GroupId', + ], + }, + { + 'Fn::GetAtt': [ + 'SG20CE3219C', + 'GroupId', + ], + }, + { + 'Fn::GetAtt': [ + 'SG351782A25', + 'GroupId', + ], + }, + ], + }); + }); + + test('subnets can be added using addSubnets', () => { + // GIVEN + const stack = new Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const subnet = new ec2.Subnet(stack, 'subnet', { + vpcId: vpc.vpcId, + availabilityZone: vpc.availabilityZones[0], + cidrBlock: vpc.vpcCidrBlock, + }); + + // WHEN + const vpcLink = new VpcLink(stack, 'VpcLink', { vpc }); + vpcLink.addSubnets(subnet); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::VpcLink', { + Name: 'VpcLink', + SubnetIds: [ + { + Ref: 'VPCPrivateSubnet1Subnet8BCA10E0', + }, + { + Ref: 'VPCPrivateSubnet2SubnetCFCDAA7A', + }, + { + Ref: 'subnetSubnet39D20FD5', + }, + ], + }); + }); + + test('security groups can be added using addSecurityGroups', () => { + // GIVEN + const stack = new Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const sg1 = new ec2.SecurityGroup(stack, 'SG1', { vpc }); + const sg2 = new ec2.SecurityGroup(stack, 'SG2', { vpc }); + const sg3 = new ec2.SecurityGroup(stack, 'SG3', { vpc }); + + + // WHEN + const vpcLink = new VpcLink(stack, 'VpcLink', { + vpc, + }); + vpcLink.addSecurityGroups(sg1, sg2, sg3); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::VpcLink', { + Name: 'VpcLink', + SubnetIds: [ + { + Ref: 'VPCPrivateSubnet1Subnet8BCA10E0', + }, + { + Ref: 'VPCPrivateSubnet2SubnetCFCDAA7A', + }, + ], + SecurityGroupIds: [ + { + 'Fn::GetAtt': [ + 'SG1BA065B6E', + 'GroupId', + ], + }, + { + 'Fn::GetAtt': [ + 'SG20CE3219C', + 'GroupId', + ], + }, + { + 'Fn::GetAtt': [ + 'SG351782A25', + 'GroupId', + ], + }, + ], + }); + }); + + test('importing an existing vpc link', () => { + // GIVEN + const stack = new Stack(); + + // WHEN + VpcLink.fromVpcLinkId(stack, 'ImportedVpcLink', 'vpclink-id'); + + // THEN + expect(stack).not.toHaveResource('AWS::ApiGatewayV2::VpcLink'); + }); +}); diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-listener.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-listener.ts index 17857a2ed4187..cf98f4b7cbbd4 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-listener.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-listener.ts @@ -106,7 +106,7 @@ export class NetworkListener extends BaseListener implements INetworkListener { /** * The load balancer this listener is attached to */ - private readonly loadBalancer: INetworkLoadBalancer; + public readonly loadBalancer: INetworkLoadBalancer; /** * the protocol of the listener diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index 7a1d46afdb6a2..73c843dc8c7cb 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -103,6 +103,7 @@ "@aws-cdk/aws-amplify": "0.0.0", "@aws-cdk/aws-apigateway": "0.0.0", "@aws-cdk/aws-apigatewayv2": "0.0.0", + "@aws-cdk/aws-apigatewayv2-integrations": "0.0.0", "@aws-cdk/aws-appconfig": "0.0.0", "@aws-cdk/aws-appflow": "0.0.0", "@aws-cdk/aws-applicationautoscaling": "0.0.0", diff --git a/packages/decdk/package.json b/packages/decdk/package.json index c628a56491d46..ab608bcbd2c31 100644 --- a/packages/decdk/package.json +++ b/packages/decdk/package.json @@ -36,6 +36,7 @@ "@aws-cdk/aws-amplify": "0.0.0", "@aws-cdk/aws-apigateway": "0.0.0", "@aws-cdk/aws-apigatewayv2": "0.0.0", + "@aws-cdk/aws-apigatewayv2-integrations": "0.0.0", "@aws-cdk/aws-appconfig": "0.0.0", "@aws-cdk/aws-appflow": "0.0.0", "@aws-cdk/aws-applicationautoscaling": "0.0.0", diff --git a/packages/monocdk/package.json b/packages/monocdk/package.json index 01c1daa8cf623..e34bf2fb7c82f 100644 --- a/packages/monocdk/package.json +++ b/packages/monocdk/package.json @@ -102,6 +102,7 @@ "@aws-cdk/aws-amplify": "0.0.0", "@aws-cdk/aws-apigateway": "0.0.0", "@aws-cdk/aws-apigatewayv2": "0.0.0", + "@aws-cdk/aws-apigatewayv2-integrations": "0.0.0", "@aws-cdk/aws-appconfig": "0.0.0", "@aws-cdk/aws-appflow": "0.0.0", "@aws-cdk/aws-applicationautoscaling": "0.0.0", From fe1ce73ec59fc3ad9d8b138ba2122303e77c0531 Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Fri, 30 Oct 2020 10:55:43 +0000 Subject: [PATCH 009/314] fix(secretsmanager): Secret.fromSecretName doesn't work with ECS (#11042) The ability to import and reference a Secret purely by the secret name was introduced in #10309. One of the original requests was modelled after the integration with CodeBuild, where either the secret name or the full ARN -- including the SecretsManager-provided suffix -- were accepted, but not a "partial" ARN without the suffix. To ease integrations with other services in this case, the `secretArn` was defined as returning the `secretName` for these secrets imported by name. However, other services -- like ECS -- require that an ARN format is provided, even as a partial ARN. This introduces a dual behavior where sometimes the secretName works and partial ARN fails, and other times the partial ARN works and the secretName fails. This change deprecates `fromSecretName` and introduces a new, better-behaved `fromSecretNameV2` that sets the ARN to a "partial" ARN without the Secrets Manager suffix. It also introduces a `secretFullArn` that is an optional version of `secretArn` that will be undefined for secrets imported by name. Related changes * I improved the suffix-strippiung logic of `parseSecretName` to only strip a suffix if it's exactly 6 characters long, as all SecretsManager suffixes are 6 characters. This prevents accidentally stripping the last word off of a hyphenated secret name like 'github-token'. * Updated the CodeBuild integration and added CodeBuild tests. fixes #10519 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-codebuild/lib/project.ts | 7 +- .../aws-codebuild/test/test.project.ts | 63 +++++- packages/@aws-cdk/aws-docdb/package.json | 1 + packages/@aws-cdk/aws-rds/package.json | 1 + packages/@aws-cdk/aws-redshift/package.json | 1 + .../@aws-cdk/aws-secretsmanager/README.md | 13 +- .../@aws-cdk/aws-secretsmanager/lib/secret.ts | 117 ++++++++++-- .../@aws-cdk/aws-secretsmanager/package.json | 6 + .../aws-secretsmanager/test/secret.test.ts | 179 +++++++++++++++++- 9 files changed, 359 insertions(+), 29 deletions(-) diff --git a/packages/@aws-cdk/aws-codebuild/lib/project.ts b/packages/@aws-cdk/aws-codebuild/lib/project.ts index bcbb85a9ba588..f69f817479870 100644 --- a/packages/@aws-cdk/aws-codebuild/lib/project.ts +++ b/packages/@aws-cdk/aws-codebuild/lib/project.ts @@ -956,14 +956,17 @@ export class Project extends ProjectBase { this.buildImage.secretsManagerCredentials?.grantRead(this); } + const secret = this.buildImage.secretsManagerCredentials; return { type: this.buildImage.type, image: this.buildImage.imageId, imagePullCredentialsType: imagePullPrincipalType, - registryCredential: this.buildImage.secretsManagerCredentials + registryCredential: secret ? { credentialProvider: 'SECRETS_MANAGER', - credential: this.buildImage.secretsManagerCredentials.secretArn, + // Secrets must be referenced by either the full ARN (with SecretsManager suffix), or by name. + // "Partial" ARNs (without the suffix) will fail a validation regex at deploy-time. + credential: secret.secretFullArn ?? secret.secretName, } : undefined, privilegedMode: env.privileged || false, diff --git a/packages/@aws-cdk/aws-codebuild/test/test.project.ts b/packages/@aws-cdk/aws-codebuild/test/test.project.ts index 0714a400acc25..f892f8b30eac2 100644 --- a/packages/@aws-cdk/aws-codebuild/test/test.project.ts +++ b/packages/@aws-cdk/aws-codebuild/test/test.project.ts @@ -1,7 +1,8 @@ -import { countResources, expect, haveResource, haveResourceLike, not, ResourcePart } from '@aws-cdk/assert'; +import { countResources, expect, haveResource, haveResourceLike, objectLike, not, ResourcePart } from '@aws-cdk/assert'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as iam from '@aws-cdk/aws-iam'; import * as s3 from '@aws-cdk/aws-s3'; +import * as secretsmanager from '@aws-cdk/aws-secretsmanager'; import * as cdk from '@aws-cdk/core'; import { Test } from 'nodeunit'; import * as codebuild from '../lib'; @@ -540,4 +541,64 @@ export = { test.done(); }, }, + + 'Environment': { + 'build image - can use secret to access build image'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const secret = new secretsmanager.Secret(stack, 'Secret'); + + // WHEN + new codebuild.Project(stack, 'Project', { + source: codebuild.Source.s3({ + bucket: new s3.Bucket(stack, 'Bucket'), + path: 'path', + }), + environment: { + buildImage: codebuild.LinuxBuildImage.fromDockerRegistry('myimage', { secretsManagerCredentials: secret }), + }, + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::CodeBuild::Project', { + Environment: objectLike({ + RegistryCredential: { + CredentialProvider: 'SECRETS_MANAGER', + Credential: { 'Ref': 'SecretA720EF05' }, + }, + }), + })); + + test.done(); + }, + + 'build image - can use imported secret by name'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const secret = secretsmanager.Secret.fromSecretNameV2(stack, 'Secret', 'MySecretName'); + + // WHEN + new codebuild.Project(stack, 'Project', { + source: codebuild.Source.s3({ + bucket: new s3.Bucket(stack, 'Bucket'), + path: 'path', + }), + environment: { + buildImage: codebuild.LinuxBuildImage.fromDockerRegistry('myimage', { secretsManagerCredentials: secret }), + }, + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::CodeBuild::Project', { + Environment: objectLike({ + RegistryCredential: { + CredentialProvider: 'SECRETS_MANAGER', + Credential: 'MySecretName', + }, + }), + })); + + test.done(); + }, + }, }; diff --git a/packages/@aws-cdk/aws-docdb/package.json b/packages/@aws-cdk/aws-docdb/package.json index 2e1d464346269..7cf1e49c2755d 100644 --- a/packages/@aws-cdk/aws-docdb/package.json +++ b/packages/@aws-cdk/aws-docdb/package.json @@ -101,6 +101,7 @@ }, "awslint": { "exclude": [ + "attribute-tag:@aws-cdk/aws-docdb.DatabaseSecret.secretFullArn", "attribute-tag:@aws-cdk/aws-docdb.DatabaseSecret.secretName" ] }, diff --git a/packages/@aws-cdk/aws-rds/package.json b/packages/@aws-cdk/aws-rds/package.json index fd86567318922..564ff3e89b77e 100644 --- a/packages/@aws-cdk/aws-rds/package.json +++ b/packages/@aws-cdk/aws-rds/package.json @@ -111,6 +111,7 @@ }, "awslint": { "exclude": [ + "attribute-tag:@aws-cdk/aws-rds.DatabaseSecret.secretFullArn", "attribute-tag:@aws-cdk/aws-rds.DatabaseSecret.secretName", "props-physical-name:@aws-cdk/aws-rds.ParameterGroupProps", "props-physical-name:@aws-cdk/aws-rds.DatabaseClusterProps", diff --git a/packages/@aws-cdk/aws-redshift/package.json b/packages/@aws-cdk/aws-redshift/package.json index d4bf4d3e9ad78..a7b8605445892 100644 --- a/packages/@aws-cdk/aws-redshift/package.json +++ b/packages/@aws-cdk/aws-redshift/package.json @@ -102,6 +102,7 @@ }, "awslint": { "exclude": [ + "attribute-tag:@aws-cdk/aws-redshift.DatabaseSecret.secretFullArn", "attribute-tag:@aws-cdk/aws-redshift.DatabaseSecret.secretName", "docs-public-apis:@aws-cdk/aws-redshift.ParameterGroupParameters.parameterName", "docs-public-apis:@aws-cdk/aws-redshift.ParameterGroupParameters.parameterValue", diff --git a/packages/@aws-cdk/aws-secretsmanager/README.md b/packages/@aws-cdk/aws-secretsmanager/README.md index 286e83ea37b6b..383a4ff2870c1 100644 --- a/packages/@aws-cdk/aws-secretsmanager/README.md +++ b/packages/@aws-cdk/aws-secretsmanager/README.md @@ -160,20 +160,21 @@ credentials generation and rotation is integrated. ### Importing Secrets Existing secrets can be imported by ARN, name, and other attributes (including the KMS key used to encrypt the secret). -Secrets imported by name can used the short-form of the name (without the SecretsManager-provided suffx); +Secrets imported by name should use the short-form of the name (without the SecretsManager-provided suffx); the secret name must exist in the same account and region as the stack. Importing by name makes it easier to reference secrets created in different regions, each with their own suffix and ARN. ```ts import * as kms from '@aws-cdk/aws-kms'; -const secretArn = 'arn:aws:secretsmanager:eu-west-1:111111111111:secret:MySecret-f3gDy9'; +const secretCompleteArn = 'arn:aws:secretsmanager:eu-west-1:111111111111:secret:MySecret-f3gDy9'; +const secretPartialArn = 'arn:aws:secretsmanager:eu-west-1:111111111111:secret:MySecret'; // No Secrets Manager suffix const encryptionKey = kms.Key.fromKeyArn(stack, 'MyEncKey', 'arn:aws:kms:eu-west-1:111111111111:key/21c4b39b-fde2-4273-9ac0-d9bb5c0d0030'); -const mySecretFromArn = secretsmanager.Secret.fromSecretArn(stack, 'SecretFromArn', secretArn); -const mySecretFromName = secretsmanager.Secret.fromSecretName(stack, 'SecretFromName', 'MySecret') // Note: the -f3gDy9 suffix is optional +const mySecretFromCompleteArn = secretsmanager.Secret.fromSecretCompleteArn(stack, 'SecretFromCompleteArn', secretCompleteArn); +const mySecretFromPartialArn = secretsmanager.Secret.fromSecretPartialArn(stack, 'SecretFromPartialArn', secretPartialArn); +const mySecretFromName = secretsmanager.Secret.fromSecretNameV2(stack, 'SecretFromName', 'MySecret') const mySecretFromAttrs = secretsmanager.Secret.fromSecretAttributes(stack, 'SecretFromAttributes', { - secretArn, + secretCompleteArn, encryptionKey, - secretName: 'MySecret', // Optional, will be calculated from the ARN }); ``` diff --git a/packages/@aws-cdk/aws-secretsmanager/lib/secret.ts b/packages/@aws-cdk/aws-secretsmanager/lib/secret.ts index d60a534375483..5728377f53e64 100644 --- a/packages/@aws-cdk/aws-secretsmanager/lib/secret.ts +++ b/packages/@aws-cdk/aws-secretsmanager/lib/secret.ts @@ -17,11 +17,18 @@ export interface ISecret extends IResource { readonly encryptionKey?: kms.IKey; /** - * The ARN of the secret in AWS Secrets Manager. + * The ARN of the secret in AWS Secrets Manager. Will return the full ARN if available, otherwise a partial arn. + * For secrets imported by the deprecated `fromSecretName`, it will return the `secretName`. * @attribute */ readonly secretArn: string; + /** + * The full ARN of the secret in AWS Secrets Manager, which is the ARN including the Secrets Manager-supplied 6-character suffix. + * This is equal to `secretArn` in most cases, but is undefined when a full ARN is not available (e.g., secrets imported by name). + */ + readonly secretFullArn?: string; + /** * The name of the secret */ @@ -127,6 +134,7 @@ export interface SecretProps { /** * Attributes required to import an existing secret into the Stack. + * One ARN format (`secretArn`, `secretCompleteArn`, `secretPartialArn`) must be provided. */ export interface SecretAttributes { /** @@ -136,8 +144,22 @@ export interface SecretAttributes { /** * The ARN of the secret in SecretsManager. + * Cannot be used with `secretCompleteArn` or `secretPartialArn`. + * @deprecated use `secretCompleteArn` or `secretPartialArn` instead. */ - readonly secretArn: string; + readonly secretArn?: string; + + /** + * The complete ARN of the secret in SecretsManager. This is the ARN including the Secrets Manager 6-character suffix. + * Cannot be used with `secretArn` or `secretPartialArn`. + */ + readonly secretCompleteArn?: string; + + /** + * The partial ARN of the secret in SecretsManager. This is the ARN without the Secrets Manager 6-character suffix. + * Cannot be used with `secretArn` or `secretCompleteArn`. + */ + readonly secretPartialArn?: string; } /** @@ -152,6 +174,8 @@ abstract class SecretBase extends Resource implements ISecret { private policy?: ResourcePolicy; + public get secretFullArn(): string | undefined { return this.secretArn; } + public grantRead(grantee: iam.IGrantable, versionStages?: string[]): iam.Grant { // @see https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_identity-based-policies.html @@ -270,13 +294,26 @@ abstract class SecretBase extends Resource implements ISecret { */ export class Secret extends SecretBase { + /** @deprecated use `fromSecretCompleteArn` or `fromSecretPartialArn` */ public static fromSecretArn(scope: Construct, id: string, secretArn: string): ISecret { - return Secret.fromSecretAttributes(scope, id, { secretArn }); + const attrs = arnIsComplete(secretArn) ? { secretCompleteArn: secretArn } : { secretPartialArn: secretArn }; + return Secret.fromSecretAttributes(scope, id, attrs); + } + + /** Imports a secret by complete ARN. The complete ARN is the ARN with the Secrets Manager-supplied suffix. */ + public static fromSecretCompleteArn(scope: Construct, id: string, secretCompleteArn: string): ISecret { + return Secret.fromSecretAttributes(scope, id, { secretCompleteArn }); + } + + /** Imports a secret by partial ARN. The partial ARN is the ARN without the Secrets Manager-supplied suffix. */ + public static fromSecretPartialArn(scope: Construct, id: string, secretPartialArn: string): ISecret { + return Secret.fromSecretAttributes(scope, id, { secretPartialArn }); } /** * Imports a secret by secret name; the ARN of the Secret will be set to the secret name. * A secret with this name must exist in the same account & region. + * @deprecated use `fromSecretNameV2` */ public static fromSecretName(scope: Construct, id: string, secretName: string): ISecret { return new class extends SecretBase { @@ -284,6 +321,7 @@ export class Secret extends SecretBase { public readonly secretArn = secretName; public readonly secretName = secretName; protected readonly autoCreatePolicy = false; + public get secretFullArn() { return undefined; } // Overrides the secretArn for grant* methods, where the secretArn must be in ARN format. // Also adds a wildcard to the resource name to support the SecretsManager-provided suffix. protected get arnForPolicies() { @@ -297,6 +335,35 @@ export class Secret extends SecretBase { }(scope, id); } + /** + * Imports a secret by secret name. + * A secret with this name must exist in the same account & region. + * Replaces the deprecated `fromSecretName`. + */ + public static fromSecretNameV2(scope: Construct, id: string, secretName: string): ISecret { + return new class extends SecretBase { + public readonly encryptionKey = undefined; + public readonly secretName = secretName; + public readonly secretArn = this.partialArn; + protected readonly autoCreatePolicy = false; + public get secretFullArn() { return undefined; } + // Overrides the secretArn for grant* methods, where the secretArn must be in ARN format. + // Also adds a wildcard to the resource name to support the SecretsManager-provided suffix. + protected get arnForPolicies(): string { + return this.partialArn + '-??????'; + } + // Creates a "partial" ARN from the secret name. The "full" ARN would include the SecretsManager-provided suffix. + private get partialArn(): string { + return Stack.of(this).formatArn({ + service: 'secretsmanager', + resource: 'secret', + resourceName: secretName, + sep: ':', + }); + } + }(scope, id); + } + /** * Import an existing secret into the Stack. * @@ -305,14 +372,33 @@ export class Secret extends SecretBase { * @param attrs the attributes of the imported secret. */ public static fromSecretAttributes(scope: Construct, id: string, attrs: SecretAttributes): ISecret { - class Import extends SecretBase { - public readonly encryptionKey = attrs.encryptionKey; - public readonly secretArn = attrs.secretArn; - public readonly secretName = parseSecretName(scope, attrs.secretArn); - protected readonly autoCreatePolicy = false; + let secretArn: string; + let secretArnIsPartial: boolean; + + if (attrs.secretArn) { + if (attrs.secretCompleteArn || attrs.secretPartialArn) { + throw new Error('cannot use `secretArn` with `secretCompleteArn` or `secretPartialArn`'); + } + secretArn = attrs.secretArn; + secretArnIsPartial = false; + } else { + if ((attrs.secretCompleteArn && attrs.secretPartialArn) || + (!attrs.secretCompleteArn && !attrs.secretPartialArn)) { + throw new Error('must use only one of `secretCompleteArn` or `secretPartialArn`'); + } + if (attrs.secretCompleteArn && !arnIsComplete(attrs.secretCompleteArn)) { + throw new Error('`secretCompleteArn` does not appear to be complete; missing 6-character suffix'); + } + [secretArn, secretArnIsPartial] = attrs.secretCompleteArn ? [attrs.secretCompleteArn, false] : [attrs.secretPartialArn!, true]; } - return new Import(scope, id); + return new class extends SecretBase { + public readonly encryptionKey = attrs.encryptionKey; + public readonly secretArn = secretArn; + public readonly secretName = parseSecretName(scope, secretArn); + protected readonly autoCreatePolicy = false; + public get secretFullArn() { return secretArnIsPartial ? undefined : secretArn; } + }(scope, id); } public readonly encryptionKey?: kms.IKey; @@ -612,9 +698,16 @@ function parseSecretName(construct: IConstruct, secretArn: string) { return resourceName; } - // Secret resource names are in the format `${secretName}-${SecretsManager suffix}` - // If there is no hyphen, assume no suffix was provided, and return the whole name. - return resourceName.substr(0, resourceName.lastIndexOf('-')) || resourceName; + // Secret resource names are in the format `${secretName}-${6-character SecretsManager suffix}` + // If there is no hyphen (or 6-character suffix) assume no suffix was provided, and return the whole name. + const lastHyphenIndex = resourceName.lastIndexOf('-'); + const hasSecretsSuffix = lastHyphenIndex !== -1 && resourceName.substr(lastHyphenIndex + 1).length === 6; + return hasSecretsSuffix ? resourceName.substr(0, lastHyphenIndex) : resourceName; } throw new Error('invalid ARN format; no secret name provided'); } + +/** Performs a best guess if an ARN is complete, based on if it ends with a 6-character suffix. */ +function arnIsComplete(secretArn: string): boolean { + return Token.isUnresolved(secretArn) || /-[a-z0-9]{6}$/i.test(secretArn); +} diff --git a/packages/@aws-cdk/aws-secretsmanager/package.json b/packages/@aws-cdk/aws-secretsmanager/package.json index da37d7206d2a5..9cf9e71ee87e7 100644 --- a/packages/@aws-cdk/aws-secretsmanager/package.json +++ b/packages/@aws-cdk/aws-secretsmanager/package.json @@ -103,6 +103,12 @@ "awslint": { "exclude": [ "attribute-tag:@aws-cdk/aws-secretsmanager.Secret.secretName", + "attribute-tag:@aws-cdk/aws-secretsmanager.Secret.secretFullArn", + "from-signature:@aws-cdk/aws-secretsmanager.Secret.fromSecretNameV2", + "from-signature:@aws-cdk/aws-secretsmanager.Secret.fromSecretNameV2.params[2]", + "props-default-doc:@aws-cdk/aws-secretsmanager.SecretAttributes.secretArn", + "props-default-doc:@aws-cdk/aws-secretsmanager.SecretAttributes.secretCompleteArn", + "props-default-doc:@aws-cdk/aws-secretsmanager.SecretAttributes.secretPartialArn", "from-signature:@aws-cdk/aws-secretsmanager.SecretTargetAttachment.fromSecretTargetAttachmentSecretArn", "from-attributes:fromSecretTargetAttachmentAttributes", "props-physical-name:@aws-cdk/aws-secretsmanager.RotationScheduleProps", diff --git a/packages/@aws-cdk/aws-secretsmanager/test/secret.test.ts b/packages/@aws-cdk/aws-secretsmanager/test/secret.test.ts index fab017f44e609..9cca08bd36a9f 100644 --- a/packages/@aws-cdk/aws-secretsmanager/test/secret.test.ts +++ b/packages/@aws-cdk/aws-secretsmanager/test/secret.test.ts @@ -434,6 +434,7 @@ test('import by secretArn', () => { // THEN expect(secret.secretArn).toBe(secretArn); + expect(secret.secretFullArn).toBe(secretArn); expect(secret.secretName).toBe('MySecret'); expect(secret.encryptionKey).toBeUndefined(); expect(stack.resolve(secret.secretValue)).toEqual(`{{resolve:secretsmanager:${secretArn}:SecretString:::}}`); @@ -460,6 +461,18 @@ test('import by secretArn supports secret ARNs without suffixes', () => { expect(secret.secretName).toBe('MySecret'); }); +test('import by secretArn does not strip suffixes unless the suffix length is six', () => { + // GIVEN + const arnWith5CharacterSuffix = 'arn:aws:secretsmanager:eu-west-1:111111111111:secret:github-token'; + const arnWith6CharacterSuffix = 'arn:aws:secretsmanager:eu-west-1:111111111111:secret:github-token-f3gDy9'; + const arnWithMultiple6CharacterSuffix = 'arn:aws:secretsmanager:eu-west-1:111111111111:secret:github-token-f3gDy9-acb123'; + + // THEN + expect(secretsmanager.Secret.fromSecretArn(stack, 'Secret5', arnWith5CharacterSuffix).secretName).toEqual('github-token'); + expect(secretsmanager.Secret.fromSecretArn(stack, 'Secret6', arnWith6CharacterSuffix).secretName).toEqual('github-token'); + expect(secretsmanager.Secret.fromSecretArn(stack, 'Secret6Twice', arnWithMultiple6CharacterSuffix).secretName).toEqual('github-token-f3gDy9'); +}); + test('import by secretArn supports tokens for ARNs', () => { // GIVEN const app = new cdk.App(); @@ -479,22 +492,103 @@ test('import by secretArn supports tokens for ARNs', () => { }); }); -test('import by attributes', () => { +test('import by secretArn guesses at complete or partial ARN', () => { + // GIVEN + const secretArnWithSuffix = 'arn:aws:secretsmanager:eu-west-1:111111111111:secret:MySecret-f3gDy9'; + const secretArnWithoutSuffix = 'arn:aws:secretsmanager:eu-west-1:111111111111:secret:MySecret'; + + // WHEN + const secretWithCompleteArn = secretsmanager.Secret.fromSecretArn(stack, 'SecretWith', secretArnWithSuffix); + const secretWithoutCompleteArn = secretsmanager.Secret.fromSecretArn(stack, 'SecretWithout', secretArnWithoutSuffix); + + // THEN + expect(secretWithCompleteArn.secretFullArn).toEqual(secretArnWithSuffix); + expect(secretWithoutCompleteArn.secretFullArn).toBeUndefined(); +}); + +test('fromSecretCompleteArn', () => { // GIVEN - const encryptionKey = new kms.Key(stack, 'KMS'); const secretArn = 'arn:aws:secretsmanager:eu-west-1:111111111111:secret:MySecret-f3gDy9'; // WHEN - const secret = secretsmanager.Secret.fromSecretAttributes(stack, 'Secret', { - secretArn, encryptionKey, - }); + const secret = secretsmanager.Secret.fromSecretCompleteArn(stack, 'Secret', secretArn); // THEN expect(secret.secretArn).toBe(secretArn); + expect(secret.secretFullArn).toBe(secretArn); expect(secret.secretName).toBe('MySecret'); - expect(secret.encryptionKey).toBe(encryptionKey); - expect(stack.resolve(secret.secretValue)).toBe(`{{resolve:secretsmanager:${secretArn}:SecretString:::}}`); - expect(stack.resolve(secret.secretValueFromJson('password'))).toBe(`{{resolve:secretsmanager:${secretArn}:SecretString:password::}}`); + expect(secret.encryptionKey).toBeUndefined(); + expect(stack.resolve(secret.secretValue)).toEqual(`{{resolve:secretsmanager:${secretArn}:SecretString:::}}`); + expect(stack.resolve(secret.secretValueFromJson('password'))).toEqual(`{{resolve:secretsmanager:${secretArn}:SecretString:password::}}`); +}); + +test('fromSecretPartialArn', () => { + // GIVEN + const secretArn = 'arn:aws:secretsmanager:eu-west-1:111111111111:secret:MySecret'; + + // WHEN + const secret = secretsmanager.Secret.fromSecretPartialArn(stack, 'Secret', secretArn); + + // THEN + expect(secret.secretArn).toBe(secretArn); + expect(secret.secretFullArn).toBeUndefined(); + expect(secret.secretName).toBe('MySecret'); + expect(secret.encryptionKey).toBeUndefined(); + expect(stack.resolve(secret.secretValue)).toEqual(`{{resolve:secretsmanager:${secretArn}:SecretString:::}}`); + expect(stack.resolve(secret.secretValueFromJson('password'))).toEqual(`{{resolve:secretsmanager:${secretArn}:SecretString:password::}}`); +}); + +describe('fromSecretAttributes', () => { + test('import by attributes', () => { + // GIVEN + const encryptionKey = new kms.Key(stack, 'KMS'); + const secretArn = 'arn:aws:secretsmanager:eu-west-1:111111111111:secret:MySecret-f3gDy9'; + + // WHEN + const secret = secretsmanager.Secret.fromSecretAttributes(stack, 'Secret', { + secretArn, encryptionKey, + }); + + // THEN + expect(secret.secretArn).toBe(secretArn); + expect(secret.secretFullArn).toBe(secretArn); + expect(secret.secretName).toBe('MySecret'); + expect(secret.encryptionKey).toBe(encryptionKey); + expect(stack.resolve(secret.secretValue)).toBe(`{{resolve:secretsmanager:${secretArn}:SecretString:::}}`); + expect(stack.resolve(secret.secretValueFromJson('password'))).toBe(`{{resolve:secretsmanager:${secretArn}:SecretString:password::}}`); + }); + + test('throws if secretArn and either secretCompleteArn or secretPartialArn are provided', () => { + const secretArn = 'arn:aws:secretsmanager:eu-west-1:111111111111:secret:MySecret-f3gDy9'; + + const error = /cannot use `secretArn` with `secretCompleteArn` or `secretPartialArn`/; + expect(() => secretsmanager.Secret.fromSecretAttributes(stack, 'Secret', { + secretArn, + secretCompleteArn: secretArn, + })).toThrow(error); + expect(() => secretsmanager.Secret.fromSecretAttributes(stack, 'Secret', { + secretArn, + secretPartialArn: secretArn, + })).toThrow(error); + }); + + test('throws if no ARN is provided', () => { + expect(() => secretsmanager.Secret.fromSecretAttributes(stack, 'Secret', {})).toThrow(/must use only one of `secretCompleteArn` or `secretPartialArn`/); + }); + + test('throws if both complete and partial ARNs are provided', () => { + const secretArn = 'arn:aws:secretsmanager:eu-west-1:111111111111:secret:MySecret-f3gDy9'; + expect(() => secretsmanager.Secret.fromSecretAttributes(stack, 'Secret', { + secretPartialArn: secretArn, + secretCompleteArn: secretArn, + })).toThrow(/must use only one of `secretCompleteArn` or `secretPartialArn`/); + }); + + test('throws if secretCompleteArn is not complete', () => { + expect(() => secretsmanager.Secret.fromSecretAttributes(stack, 'Secret', { + secretCompleteArn: 'arn:aws:secretsmanager:eu-west-1:111111111111:secret:MySecret', + })).toThrow(/does not appear to be complete/); + }); }); test('import by secret name', () => { @@ -507,6 +601,7 @@ test('import by secret name', () => { // THEN expect(secret.secretArn).toBe(secretName); expect(secret.secretName).toBe(secretName); + expect(secret.secretFullArn).toBeUndefined(); expect(stack.resolve(secret.secretValue)).toBe(`{{resolve:secretsmanager:${secretName}:SecretString:::}}`); expect(stack.resolve(secret.secretValueFromJson('password'))).toBe(`{{resolve:secretsmanager:${secretName}:SecretString:password::}}`); }); @@ -555,6 +650,74 @@ test('import by secret name with grants', () => { }); }); +test('import by secret name v2', () => { + // GIVEN + const secretName = 'MySecret'; + + // WHEN + const secret = secretsmanager.Secret.fromSecretNameV2(stack, 'Secret', secretName); + + // THEN + expect(secret.secretArn).toBe(`arn:${stack.partition}:secretsmanager:${stack.region}:${stack.account}:secret:MySecret`); + expect(secret.secretName).toBe(secretName); + expect(secret.secretFullArn).toBeUndefined(); + expect(stack.resolve(secret.secretValue)).toEqual({ + 'Fn::Join': ['', [ + '{{resolve:secretsmanager:arn:', + { Ref: 'AWS::Partition' }, + ':secretsmanager:', + { Ref: 'AWS::Region' }, + ':', + { Ref: 'AWS::AccountId' }, + ':secret:MySecret:SecretString:::}}', + ]], + }); +}); + +test('import by secret name v2 with grants', () => { + // GIVEN + const role = new iam.Role(stack, 'Role', { assumedBy: new iam.AccountRootPrincipal() }); + const secret = secretsmanager.Secret.fromSecretNameV2(stack, 'Secret', 'MySecret'); + + // WHEN + secret.grantRead(role); + secret.grantWrite(role); + + // THEN + const expectedSecretReference = { + 'Fn::Join': ['', [ + 'arn:', + { Ref: 'AWS::Partition' }, + ':secretsmanager:', + { Ref: 'AWS::Region' }, + ':', + { Ref: 'AWS::AccountId' }, + ':secret:MySecret-??????', + ]], + }; + expect(stack).toHaveResource('AWS::IAM::Policy', { + PolicyDocument: { + Version: '2012-10-17', + Statement: [{ + Action: [ + 'secretsmanager:GetSecretValue', + 'secretsmanager:DescribeSecret', + ], + Effect: 'Allow', + Resource: expectedSecretReference, + }, + { + Action: [ + 'secretsmanager:PutSecretValue', + 'secretsmanager:UpdateSecret', + ], + Effect: 'Allow', + Resource: expectedSecretReference, + }], + }, + }); +}); + test('can attach a secret with attach()', () => { // GIVEN const secret = new secretsmanager.Secret(stack, 'Secret'); From 1097ec0fa9e4bd3c4f5b8d8a927ab620b565968d Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Fri, 30 Oct 2020 11:56:47 +0000 Subject: [PATCH 010/314] chore(pkglint): report stale attributions (#11200) pkglint will now complain if there are attributions to dependencies that are not bundled (anymore). ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- tools/pkglint/lib/rules.ts | 17 +++++++++++++--- tools/pkglint/test/rules.test.ts | 33 +++++++++++++++++++++++++++++++- 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/tools/pkglint/lib/rules.ts b/tools/pkglint/lib/rules.ts index 9a9e56980c214..23c791c4cac23 100644 --- a/tools/pkglint/lib/rules.ts +++ b/tools/pkglint/lib/rules.ts @@ -147,11 +147,22 @@ export class ThirdPartyAttributions extends ValidationRule { } const bundled = pkg.getBundledDependencies(); const lines = fs.readFileSync(path.join(pkg.packageRoot, 'NOTICE'), { encoding: 'utf8' }).split('\n'); + + const re = /^\*\* (\S+)/; + const attributions = lines.filter(l => re.test(l)).map(l => l.match(re)![1]); + for (const dep of bundled) { - const re = new RegExp(`^\\*\\* ${dep}`); - if (!lines.find(l => re.test(l))) { + if (!attributions.includes(dep)) { + pkg.report({ + message: `Missing attribution for bundled dependency '${dep}' in NOTICE file.`, + ruleName: this.name, + }); + } + } + for (const attr of attributions) { + if (!bundled.includes(attr)) { pkg.report({ - message: `Missing attribution for bundled dependency '${dep}' in NOTICE file`, + message: `Unnecessary attribution found for dependency '${attr}' in NOTICE file.`, ruleName: this.name, }); } diff --git a/tools/pkglint/test/rules.test.ts b/tools/pkglint/test/rules.test.ts index db07e312daa0b..70e8942697271 100644 --- a/tools/pkglint/test/rules.test.ts +++ b/tools/pkglint/test/rules.test.ts @@ -234,7 +234,38 @@ describe('ThirdPartyAttributions', () => { expect(pkgJson.reports.length).toEqual(2); for (const report of pkgJson.reports) { expect(report.ruleName).toEqual('license/3p-attributions'); + expect(report.message).toContain('Missing attribution'); } + expect(pkgJson.reports[0].message).toContain('dep1'); + expect(pkgJson.reports[1].message).toContain('dep2'); + }); + + test('errors when there are excessive attributions', async() => { + fakeModule = new FakeModule({ + packagejson: { + bundledDependencies: ['dep1'], + }, + notice: [ + '** dep1 - https://link-somewhere', + '** dep2 - https://link-elsewhere', + '** dep3-rev - https://link-elsewhere', + ], + }); + const dirPath = await fakeModule.tmpdir(); + + const rule = new rules.ThirdPartyAttributions(); + + const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); + rule.validate(pkgJson); + + expect(pkgJson.hasReports).toBe(true); + expect(pkgJson.reports.length).toEqual(2); + for (const report of pkgJson.reports) { + expect(report.ruleName).toEqual('license/3p-attributions'); + expect(report.message).toContain('Unnecessary attribution'); + } + expect(pkgJson.reports[0].message).toContain('dep2'); + expect(pkgJson.reports[1].message).toContain('dep3-rev'); }); test('passes when attribution is present', async() => { @@ -290,4 +321,4 @@ describe('ThirdPartyAttributions', () => { expect(pkgJson.hasReports).toBe(false); }); -}); \ No newline at end of file +}); From e21f249f7b9c78ed5948d63e7650ee7b8d5b3f8b Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Fri, 30 Oct 2020 14:47:56 +0000 Subject: [PATCH 011/314] fix(event-targets): circular dependency when the lambda target is in a different stack (#11217) The Lambda Permission resource causes a cyclic dependency when the rule is in a seprate stack from the lambda target for the rule. (a picture is worth a thousand words) ``` +-------------------+ +---------------+ |Lamda Stack | |Event Stack | | | | | | +----------+ | | +------+ | | | | | | | | | | | Function |<-----------------+ Rule | | | | | | | | | | | +----------+ | | +------+ | | ^ | | ^ | | | | | | | | +-----+------+ | | | | | | | | | | | | | Permission +--------------------+ | | | | | | | | +------------+ | | | | | | | +-------------------+ +---------------+ ``` The fix is to move the Permission resource into the event stack instead. fixes #10942 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-events-targets/lib/util.ts | 13 +- .../test/aws-api/integ.aws-api.expected.json | 78 ++++++------ .../test/lambda/integ.events.expected.json | 70 +++++------ .../test/lambda/lambda.test.ts | 43 +++++-- .../test/integ.lambda-chain.expected.json | 114 +++++++++--------- .../test/integ.instance.lit.expected.json | 56 ++++----- tools/cdk-integ-tools/bin/cdk-integ-assert.ts | 4 +- 7 files changed, 205 insertions(+), 173 deletions(-) diff --git a/packages/@aws-cdk/aws-events-targets/lib/util.ts b/packages/@aws-cdk/aws-events-targets/lib/util.ts index ddcd83adb5f1b..41a5ab110d3b9 100644 --- a/packages/@aws-cdk/aws-events-targets/lib/util.ts +++ b/packages/@aws-cdk/aws-events-targets/lib/util.ts @@ -1,7 +1,7 @@ import * as events from '@aws-cdk/aws-events'; import * as iam from '@aws-cdk/aws-iam'; import * as lambda from '@aws-cdk/aws-lambda'; -import { Construct, IConstruct } from '@aws-cdk/core'; +import { Construct, ConstructNode, IConstruct } from '@aws-cdk/core'; /** * Obtain the Role for the EventBridge event @@ -27,9 +27,18 @@ export function singletonEventRole(scope: IConstruct, policyStatements: iam.Poli * Allows a Lambda function to be called from a rule */ export function addLambdaPermission(rule: events.IRule, handler: lambda.IFunction): void { + let scope: Construct | undefined; + let node: ConstructNode = handler.permissionsNode; + if (rule instanceof Construct) { + // Place the Permission resource in the same stack as Rule rather than the Function + // This is to reduce circular dependency when the lambda handler and the rule are across stacks. + scope = rule; + node = rule.node; + } const permissionId = `AllowEventRule${rule.node.uniqueId}`; - if (!handler.permissionsNode.tryFindChild(permissionId)) { + if (!node.tryFindChild(permissionId)) { handler.addPermission(permissionId, { + scope, action: 'lambda:InvokeFunction', principal: new iam.ServicePrincipal('events.amazonaws.com'), sourceArn: rule.ruleArn, diff --git a/packages/@aws-cdk/aws-events-targets/test/aws-api/integ.aws-api.expected.json b/packages/@aws-cdk/aws-events-targets/test/aws-api/integ.aws-api.expected.json index 5d4b2eaedfcb2..031c41c4e954c 100644 --- a/packages/@aws-cdk/aws-events-targets/test/aws-api/integ.aws-api.expected.json +++ b/packages/@aws-cdk/aws-events-targets/test/aws-api/integ.aws-api.expected.json @@ -29,6 +29,25 @@ ] } }, + "ScheduleRuleAllowEventRuleawscdkawsapitargetintegScheduleRule51140722763E20C1": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "AWSb4cf1abd4e4f4bc699441af7ccd9ec371511E620", + "Arn" + ] + }, + "Principal": "events.amazonaws.com", + "SourceArn": { + "Fn::GetAtt": [ + "ScheduleRuleDA5BD877", + "Arn" + ] + } + } + }, "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRole9FFE9C50": { "Type": "AWS::IAM::Role", "Properties": { @@ -146,44 +165,6 @@ "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRole9FFE9C50" ] }, - "AWSb4cf1abd4e4f4bc699441af7ccd9ec37AllowEventRuleawscdkawsapitargetintegScheduleRule511407226CC02048": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "AWSb4cf1abd4e4f4bc699441af7ccd9ec371511E620", - "Arn" - ] - }, - "Principal": "events.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "ScheduleRuleDA5BD877", - "Arn" - ] - } - } - }, - "AWSb4cf1abd4e4f4bc699441af7ccd9ec37AllowEventRuleawscdkawsapitargetintegPatternRule3D38858113E3D24D": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "AWSb4cf1abd4e4f4bc699441af7ccd9ec371511E620", - "Arn" - ] - }, - "Principal": "events.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "PatternRule4AF6D328", - "Arn" - ] - } - } - }, "PatternRule4AF6D328": { "Type": "AWS::Events::Rule", "Properties": { @@ -216,6 +197,25 @@ } ] } + }, + "PatternRuleAllowEventRuleawscdkawsapitargetintegPatternRule3D388581AA4F776B": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "AWSb4cf1abd4e4f4bc699441af7ccd9ec371511E620", + "Arn" + ] + }, + "Principal": "events.amazonaws.com", + "SourceArn": { + "Fn::GetAtt": [ + "PatternRule4AF6D328", + "Arn" + ] + } + } } }, "Parameters": { @@ -232,4 +232,4 @@ "Description": "Artifact hash for asset \"4e52413f31cff0a335f5083fa6197a6cb61928644842d89026c42c2d2a98342e\"" } } -} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-events-targets/test/lambda/integ.events.expected.json b/packages/@aws-cdk/aws-events-targets/test/lambda/integ.events.expected.json index 320b77d6d9795..aad7c05f0bd5f 100644 --- a/packages/@aws-cdk/aws-events-targets/test/lambda/integ.events.expected.json +++ b/packages/@aws-cdk/aws-events-targets/test/lambda/integ.events.expected.json @@ -50,26 +50,25 @@ "MyFuncServiceRole54065130" ] }, - "MyFuncAllowEventRulelambdaeventsTimer0E6AB6D8E3B334A3": { - "Type": "AWS::Lambda::Permission", + "TimerBF6F831F": { + "Type": "AWS::Events::Rule", "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "MyFunc8A243A2C", - "Arn" - ] - }, - "Principal": "events.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "TimerBF6F831F", - "Arn" - ] - } + "ScheduleExpression": "rate(1 minute)", + "State": "ENABLED", + "Targets": [ + { + "Arn": { + "Fn::GetAtt": [ + "MyFunc8A243A2C", + "Arn" + ] + }, + "Id": "Target0" + } + ] } }, - "MyFuncAllowEventRulelambdaeventsTimer27F866A1E0669C645": { + "TimerAllowEventRulelambdaeventsTimer0E6AB6D890F582F4": { "Type": "AWS::Lambda::Permission", "Properties": { "Action": "lambda:InvokeFunction", @@ -82,16 +81,16 @@ "Principal": "events.amazonaws.com", "SourceArn": { "Fn::GetAtt": [ - "Timer2B6F162E9", + "TimerBF6F831F", "Arn" ] } } }, - "TimerBF6F831F": { + "Timer2B6F162E9": { "Type": "AWS::Events::Rule", "Properties": { - "ScheduleExpression": "rate(1 minute)", + "ScheduleExpression": "rate(2 minutes)", "State": "ENABLED", "Targets": [ { @@ -106,22 +105,23 @@ ] } }, - "Timer2B6F162E9": { - "Type": "AWS::Events::Rule", + "Timer2AllowEventRulelambdaeventsTimer27F866A1E50659689": { + "Type": "AWS::Lambda::Permission", "Properties": { - "ScheduleExpression": "rate(2 minutes)", - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::GetAtt": [ - "MyFunc8A243A2C", - "Arn" - ] - }, - "Id": "Target0" - } - ] + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "MyFunc8A243A2C", + "Arn" + ] + }, + "Principal": "events.amazonaws.com", + "SourceArn": { + "Fn::GetAtt": [ + "Timer2B6F162E9", + "Arn" + ] + } } } } diff --git a/packages/@aws-cdk/aws-events-targets/test/lambda/lambda.test.ts b/packages/@aws-cdk/aws-events-targets/test/lambda/lambda.test.ts index ff171b6ee5a80..28df0932c9ba4 100644 --- a/packages/@aws-cdk/aws-events-targets/test/lambda/lambda.test.ts +++ b/packages/@aws-cdk/aws-events-targets/test/lambda/lambda.test.ts @@ -1,4 +1,4 @@ -import { countResources, expect, haveResource } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import * as events from '@aws-cdk/aws-events'; import * as lambda from '@aws-cdk/aws-lambda'; import * as cdk from '@aws-cdk/core'; @@ -23,7 +23,7 @@ test('use lambda as an event rule target', () => { // THEN const lambdaId = 'MyLambdaCCE802FB'; - expect(stack).to(haveResource('AWS::Lambda::Permission', { + expect(stack).toHaveResource('AWS::Lambda::Permission', { Action: 'lambda:InvokeFunction', FunctionName: { 'Fn::GetAtt': [ @@ -33,9 +33,9 @@ test('use lambda as an event rule target', () => { }, Principal: 'events.amazonaws.com', SourceArn: { 'Fn::GetAtt': ['Rule4C995B7F', 'Arn'] }, - })); + }); - expect(stack).to(haveResource('AWS::Lambda::Permission', { + expect(stack).toHaveResource('AWS::Lambda::Permission', { Action: 'lambda:InvokeFunction', FunctionName: { 'Fn::GetAtt': [ @@ -45,17 +45,17 @@ test('use lambda as an event rule target', () => { }, Principal: 'events.amazonaws.com', SourceArn: { 'Fn::GetAtt': ['Rule270732244', 'Arn'] }, - })); + }); - expect(stack).to(countResources('AWS::Events::Rule', 2)); - expect(stack).to(haveResource('AWS::Events::Rule', { + expect(stack).toCountResources('AWS::Events::Rule', 2); + expect(stack).toHaveResource('AWS::Events::Rule', { Targets: [ { Arn: { 'Fn::GetAtt': [lambdaId, 'Arn'] }, Id: 'Target0', }, ], - })); + }); }); test('adding same lambda function as target mutiple times creates permission only once', () => { @@ -75,7 +75,7 @@ test('adding same lambda function as target mutiple times creates permission onl })); // THEN - expect(stack).to(countResources('AWS::Lambda::Permission', 1)); + expect(stack).toCountResources('AWS::Lambda::Permission', 1); }); test('adding same singleton lambda function as target mutiple times creates permission only once', () => { @@ -100,7 +100,30 @@ test('adding same singleton lambda function as target mutiple times creates perm })); // THEN - expect(stack).to(countResources('AWS::Lambda::Permission', 1)); + expect(stack).toCountResources('AWS::Lambda::Permission', 1); +}); + +test('lambda handler and cloudwatch event across stacks', () => { + // GIVEN + const app = new cdk.App(); + const lambdaStack = new cdk.Stack(app, 'LambdaStack'); + + const fn = new lambda.Function(lambdaStack, 'MyLambda', { + code: new lambda.InlineCode('foo'), + handler: 'bar', + runtime: lambda.Runtime.PYTHON_2_7, + }); + + const eventStack = new cdk.Stack(app, 'EventStack'); + new events.Rule(eventStack, 'Rule', { + schedule: events.Schedule.rate(cdk.Duration.minutes(1)), + targets: [new targets.LambdaFunction(fn)], + }); + + expect(() => app.synth()).not.toThrow(); + + // the Permission resource should be in the event stack + expect(eventStack).toCountResources('AWS::Lambda::Permission', 1); }); function newTestLambda(scope: constructs.Construct) { diff --git a/packages/@aws-cdk/aws-lambda-destinations/test/integ.lambda-chain.expected.json b/packages/@aws-cdk/aws-lambda-destinations/test/integ.lambda-chain.expected.json index 851224d90d2f4..f8f6f78713d64 100644 --- a/packages/@aws-cdk/aws-lambda-destinations/test/integ.lambda-chain.expected.json +++ b/packages/@aws-cdk/aws-lambda-destinations/test/integ.lambda-chain.expected.json @@ -114,6 +114,25 @@ ] } }, + "FirstEventInvokeConfigFailureAllowEventRuleawscdklambdachainFirstEventInvokeConfigFailure7180F42FA8F1F1F0": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "ErrorD9F0B79D", + "Arn" + ] + }, + "Principal": "events.amazonaws.com", + "SourceArn": { + "Fn::GetAtt": [ + "FirstEventInvokeConfigFailureA1E005BC", + "Arn" + ] + } + } + }, "FirstEventInvokeConfigSuccess865FF6FF": { "Type": "AWS::Events::Rule", "Properties": { @@ -156,6 +175,25 @@ ] } }, + "FirstEventInvokeConfigSuccessAllowEventRuleawscdklambdachainFirstEventInvokeConfigSuccess2DCAE39FC2495AB7": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "Second394350F9", + "Arn" + ] + }, + "Principal": "events.amazonaws.com", + "SourceArn": { + "Fn::GetAtt": [ + "FirstEventInvokeConfigSuccess865FF6FF", + "Arn" + ] + } + } + }, "FirstEventInvokeConfig7DE6209E": { "Type": "AWS::Lambda::EventInvokeConfig", "Properties": { @@ -284,25 +322,6 @@ "SecondServiceRole55940A31" ] }, - "SecondAllowEventRuleawscdklambdachainFirstEventInvokeConfigSuccess2DCAE39F08E88C92": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "Second394350F9", - "Arn" - ] - }, - "Principal": "events.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "FirstEventInvokeConfigSuccess865FF6FF", - "Arn" - ] - } - } - }, "SecondEventInvokeConfigSuccess53614893": { "Type": "AWS::Events::Rule", "Properties": { @@ -345,6 +364,25 @@ ] } }, + "SecondEventInvokeConfigSuccessAllowEventRuleawscdklambdachainSecondEventInvokeConfigSuccess2078CDC9C7FB9F61": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "Third1125870F", + "Arn" + ] + }, + "Principal": "events.amazonaws.com", + "SourceArn": { + "Fn::GetAtt": [ + "SecondEventInvokeConfigSuccess53614893", + "Arn" + ] + } + } + }, "SecondEventInvokeConfig3F9DE36C": { "Type": "AWS::Lambda::EventInvokeConfig", "Properties": { @@ -428,25 +466,6 @@ "ThirdServiceRole42701801" ] }, - "ThirdAllowEventRuleawscdklambdachainSecondEventInvokeConfigSuccess2078CDC9C6C3FA25": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "Third1125870F", - "Arn" - ] - }, - "Principal": "events.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "SecondEventInvokeConfigSuccess53614893", - "Arn" - ] - } - } - }, "ErrorServiceRoleCE484966": { "Type": "AWS::IAM::Role", "Properties": { @@ -496,25 +515,6 @@ "DependsOn": [ "ErrorServiceRoleCE484966" ] - }, - "ErrorAllowEventRuleawscdklambdachainFirstEventInvokeConfigFailure7180F42F0285281B": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "ErrorD9F0B79D", - "Arn" - ] - }, - "Principal": "events.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "FirstEventInvokeConfigFailureA1E005BC", - "Arn" - ] - } - } } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-rds/test/integ.instance.lit.expected.json b/packages/@aws-cdk/aws-rds/test/integ.instance.lit.expected.json index 27c2eed74ca17..9952517f5e00e 100644 --- a/packages/@aws-cdk/aws-rds/test/integ.instance.lit.expected.json +++ b/packages/@aws-cdk/aws-rds/test/integ.instance.lit.expected.json @@ -908,6 +908,25 @@ ] } }, + "InstanceAvailabilityAllowEventRuleawscdkrdsinstanceInstanceAvailabilityCE39A6A7B066AA0D": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "Function76856677", + "Arn" + ] + }, + "Principal": "events.amazonaws.com", + "SourceArn": { + "Fn::GetAtt": [ + "InstanceAvailabilityAD5D452C", + "Arn" + ] + } + } + }, "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB": { "Type": "AWS::IAM::Role", "Properties": { @@ -970,7 +989,7 @@ "Runtime": "nodejs10.x", "Code": { "S3Bucket": { - "Ref": "AssetParameters74a1cab76f5603c5e27101cb3809d8745c50f708b0f4b497ed0910eb533d437bS3Bucket48EF98C9" + "Ref": "AssetParameters884431e2bc651d2b61bd699a29dc9684b0f66911f06bd3ed0635f854bf18e147S3BucketAE1150B3" }, "S3Key": { "Fn::Join": [ @@ -983,7 +1002,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters74a1cab76f5603c5e27101cb3809d8745c50f708b0f4b497ed0910eb533d437bS3VersionKeyF33C73AF" + "Ref": "AssetParameters884431e2bc651d2b61bd699a29dc9684b0f66911f06bd3ed0635f854bf18e147S3VersionKeyC76660C1" } ] } @@ -996,7 +1015,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters74a1cab76f5603c5e27101cb3809d8745c50f708b0f4b497ed0910eb533d437bS3VersionKeyF33C73AF" + "Ref": "AssetParameters884431e2bc651d2b61bd699a29dc9684b0f66911f06bd3ed0635f854bf18e147S3VersionKeyC76660C1" } ] } @@ -1087,39 +1106,20 @@ "DependsOn": [ "FunctionServiceRole675BB04A" ] - }, - "FunctionAllowEventRuleawscdkrdsinstanceInstanceAvailabilityCE39A6A71E819C19": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "Function76856677", - "Arn" - ] - }, - "Principal": "events.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "InstanceAvailabilityAD5D452C", - "Arn" - ] - } - } } }, "Parameters": { - "AssetParameters74a1cab76f5603c5e27101cb3809d8745c50f708b0f4b497ed0910eb533d437bS3Bucket48EF98C9": { + "AssetParameters884431e2bc651d2b61bd699a29dc9684b0f66911f06bd3ed0635f854bf18e147S3BucketAE1150B3": { "Type": "String", - "Description": "S3 bucket for asset \"74a1cab76f5603c5e27101cb3809d8745c50f708b0f4b497ed0910eb533d437b\"" + "Description": "S3 bucket for asset \"884431e2bc651d2b61bd699a29dc9684b0f66911f06bd3ed0635f854bf18e147\"" }, - "AssetParameters74a1cab76f5603c5e27101cb3809d8745c50f708b0f4b497ed0910eb533d437bS3VersionKeyF33C73AF": { + "AssetParameters884431e2bc651d2b61bd699a29dc9684b0f66911f06bd3ed0635f854bf18e147S3VersionKeyC76660C1": { "Type": "String", - "Description": "S3 key for asset version \"74a1cab76f5603c5e27101cb3809d8745c50f708b0f4b497ed0910eb533d437b\"" + "Description": "S3 key for asset version \"884431e2bc651d2b61bd699a29dc9684b0f66911f06bd3ed0635f854bf18e147\"" }, - "AssetParameters74a1cab76f5603c5e27101cb3809d8745c50f708b0f4b497ed0910eb533d437bArtifactHash976CF1BD": { + "AssetParameters884431e2bc651d2b61bd699a29dc9684b0f66911f06bd3ed0635f854bf18e147ArtifactHash717FC602": { "Type": "String", - "Description": "Artifact hash for asset \"74a1cab76f5603c5e27101cb3809d8745c50f708b0f4b497ed0910eb533d437b\"" + "Description": "Artifact hash for asset \"884431e2bc651d2b61bd699a29dc9684b0f66911f06bd3ed0635f854bf18e147\"" } } } diff --git a/tools/cdk-integ-tools/bin/cdk-integ-assert.ts b/tools/cdk-integ-tools/bin/cdk-integ-assert.ts index 758a8288fb0d6..2fd262a933792 100644 --- a/tools/cdk-integ-tools/bin/cdk-integ-assert.ts +++ b/tools/cdk-integ-tools/bin/cdk-integ-assert.ts @@ -16,7 +16,7 @@ async function main() { process.stdout.write(`Verifying ${test.name} against ${test.expectedFileName} ... `); if (!test.hasExpected()) { - throw new Error(`No such file: ${test.expectedFileName}. Run 'npm run integ'.`); + throw new Error(`No such file: ${test.expectedFileName}. Run 'yarn integ'.`); } let expected = await test.readExpected(); @@ -40,7 +40,7 @@ async function main() { if (failures.length > 0) { // eslint-disable-next-line max-len - throw new Error(`Some stacks have changed. To verify that they still deploy successfully, run: 'npm run integ ${failures.join(' ')}'`); + throw new Error(`Some stacks have changed. To verify that they still deploy successfully, run: 'yarn integ ${failures.join(' ')}'`); } } From c20041356940c5569c00e82f9e6bee794002929b Mon Sep 17 00:00:00 2001 From: Kyle Roach Date: Fri, 30 Oct 2020 12:08:00 -0400 Subject: [PATCH 012/314] feat(apigatewayv2): http api - endpoint url (#11092) fixes #10651 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-apigatewayv2/README.md | 2 ++ packages/@aws-cdk/aws-apigatewayv2/lib/http/api.ts | 7 +++++++ packages/@aws-cdk/aws-apigatewayv2/package.json | 3 +-- packages/@aws-cdk/aws-apigatewayv2/test/http/api.test.ts | 7 +++++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-apigatewayv2/README.md b/packages/@aws-cdk/aws-apigatewayv2/README.md index 208271df2a732..c25027fc81c39 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/README.md +++ b/packages/@aws-cdk/aws-apigatewayv2/README.md @@ -59,6 +59,8 @@ integrations](https://docs.aws.amazon.com/apigateway/latest/developerguide/http- The code snippet below configures a route `GET /books` with an HTTP proxy integration and uses the `ANY` method to proxy all other HTTP method calls to `/books` to a lambda proxy. +The URL to the endpoint can be retrieved via the `apiEndpoint` attribute. + ```ts const getBooksIntegration = new HttpProxyIntegration({ url: 'https://get-books-proxy.myproxy.internal', diff --git a/packages/@aws-cdk/aws-apigatewayv2/lib/http/api.ts b/packages/@aws-cdk/aws-apigatewayv2/lib/http/api.ts index 8ea35ab4f1312..3bc5f47676339 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/lib/http/api.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/lib/http/api.ts @@ -255,6 +255,12 @@ export class HttpApi extends HttpApiBase { public readonly httpApiId: string; + /** + * The default endpoint for an API + * @attribute + */ + public readonly apiEndpoint: string; + /** * default stage of the api resource */ @@ -298,6 +304,7 @@ export class HttpApi extends HttpApiBase { const resource = new CfnApi(this, 'Resource', apiProps); this.httpApiId = resource.ref; + this.apiEndpoint = resource.attrApiEndpoint; if (props?.defaultIntegration) { new HttpRoute(this, 'DefaultRoute', { diff --git a/packages/@aws-cdk/aws-apigatewayv2/package.json b/packages/@aws-cdk/aws-apigatewayv2/package.json index c62cf72f5d918..07b768f848bdd 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/package.json +++ b/packages/@aws-cdk/aws-apigatewayv2/package.json @@ -108,8 +108,7 @@ "props-physical-name-type:@aws-cdk/aws-apigatewayv2.HttpStageProps.stageName", "props-physical-name:@aws-cdk/aws-apigatewayv2.HttpApiMappingProps", "props-physical-name:@aws-cdk/aws-apigatewayv2.HttpIntegrationProps", - "props-physical-name:@aws-cdk/aws-apigatewayv2.HttpRouteProps", - "resource-attribute:@aws-cdk/aws-apigatewayv2.HttpApi.apiEndpoint" + "props-physical-name:@aws-cdk/aws-apigatewayv2.HttpRouteProps" ] }, "stability": "experimental", diff --git a/packages/@aws-cdk/aws-apigatewayv2/test/http/api.test.ts b/packages/@aws-cdk/aws-apigatewayv2/test/http/api.test.ts index bfc9c9102a011..96c747985be04 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/test/http/api.test.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/test/http/api.test.ts @@ -273,4 +273,11 @@ describe('HttpApi', () => { Name: 'Link-2', }); }); + + test('apiEndpoint is exported', () => { + const stack = new Stack(); + const api = new HttpApi(stack, 'api'); + + expect(api.apiEndpoint).toBeDefined(); + }); }); From d69f7d33f236937ddca96c10a60fbf3ef48b883b Mon Sep 17 00:00:00 2001 From: Penghao He Date: Fri, 30 Oct 2020 10:50:18 -0700 Subject: [PATCH 013/314] chore: add @aws-cdk-containers to the list (#11206) ---- Add @aws-cdk-containers to the white list for cdk ecs extensions. *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/core/lib/private/runtime-info.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/core/lib/private/runtime-info.ts b/packages/@aws-cdk/core/lib/private/runtime-info.ts index 0cc74d3c9f8f3..cf4b1b619d6c4 100644 --- a/packages/@aws-cdk/core/lib/private/runtime-info.ts +++ b/packages/@aws-cdk/core/lib/private/runtime-info.ts @@ -3,7 +3,7 @@ import * as cxschema from '@aws-cdk/cloud-assembly-schema'; import { major as nodeMajorVersion } from './node-version'; // list of NPM scopes included in version reporting e.g. @aws-cdk and @aws-solutions-konstruk -const WHITELIST_SCOPES = ['@aws-cdk', '@aws-solutions-konstruk', '@aws-solutions-constructs', '@amzn']; +const WHITELIST_SCOPES = ['@aws-cdk', '@aws-cdk-containers', '@aws-solutions-konstruk', '@aws-solutions-constructs', '@amzn']; // list of NPM packages included in version reporting const WHITELIST_PACKAGES = ['aws-rfdk']; From eb09f608f1b42f559698e8bd70ef0fa949bf8703 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 30 Oct 2020 19:48:48 +0000 Subject: [PATCH 014/314] chore(deps-dev): bump @octokit/rest from 18.0.6 to 18.0.7 (#11213) Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 18.0.6 to 18.0.7. - [Release notes](https://github.com/octokit/rest.js/releases) - [Commits](https://github.com/octokit/rest.js/compare/v18.0.6...v18.0.7) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/aws-cdk/package.json | 2 +- yarn.lock | 102 +++------------------------------- 2 files changed, 8 insertions(+), 96 deletions(-) diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index cc67af22ad1de..646210c061b42 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -61,7 +61,7 @@ "sinon": "^9.2.1", "ts-jest": "^26.4.3", "ts-mock-imports": "^1.3.0", - "@octokit/rest": "^18.0.6", + "@octokit/rest": "^18.0.7", "make-runnable": "^1.3.8" }, "dependencies": { diff --git a/yarn.lock b/yarn.lock index fbbfb283d1dba..253bb9b954b30 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2128,10 +2128,10 @@ once "^1.4.0" universal-user-agent "^4.0.0" -"@octokit/rest@^18.0.6": - version "18.0.6" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.6.tgz#76c274f1a68f40741a131768ef483f041e7b98b6" - integrity sha512-ES4lZBKPJMX/yUoQjAZiyFjei9pJ4lTTfb9k7OtYoUzKPDLl/M8jiHqt6qeSauyU4eZGLw0sgP1WiQl9FYeM5w== +"@octokit/rest@^18.0.7": + version "18.0.7" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.7.tgz#236514417084334bc0ef62416a19f6030db3d907" + integrity sha512-ctz0cMIb3c6gO2ADto+A1r4JI+2hkUkDcD1JRunkhk1SOUrNGQcQ+9FBqZ6UekS1Z/c3xPvF0OoLtX2cQ118+A== dependencies: "@octokit/core" "^3.0.0" "@octokit/plugin-paginate-rest" "^2.2.0" @@ -3563,11 +3563,6 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" -app-root-path@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.2.1.tgz#d0df4a682ee408273583d43f6f79e9892624bc9a" - integrity sha512-91IFKeKk7FjfmezPKkwtaRvSpnUc4gDwPAjA1YZ9Gn0q0PPeW+vbeUsZuyDwjI7+QTHhcLen2v25fi/AmhvbJA== - append-transform@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab" @@ -3835,21 +3830,6 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" -aws-sdk@^2.596.0: - version "2.778.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.778.0.tgz#9304d1b2a1f94bfd8a56169f1da20ff40f417f40" - integrity sha512-sIJRO7tMaztLs+gvHF/Wo+iek/rhH99+2OzharQJMS0HATPl5/EdhKgWGv1n/bNpVH+kD3n0QMQgdFu0FNUt0Q== - dependencies: - buffer "4.9.2" - events "1.1.1" - ieee754 "1.1.13" - jmespath "0.15.0" - querystring "0.2.0" - sax "1.2.1" - url "0.10.3" - uuid "3.3.2" - xml2js "0.4.19" - aws-sdk@^2.637.0, aws-sdk@^2.781.0: version "2.781.0" resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.781.0.tgz#e9df63e9b69c22ac939ab675c8771592ae89105a" @@ -5815,21 +5795,11 @@ dotenv-expand@^5.1.0: resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-5.1.0.tgz#3fbaf020bfd794884072ea26b1e9791d45a629f0" integrity sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA== -dotenv-json@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/dotenv-json/-/dotenv-json-1.0.0.tgz#fc7f672aafea04bed33818733b9f94662332815c" - integrity sha512-jAssr+6r4nKhKRudQ0HOzMskOFFi9+ubXWwmrSGJFgTvpjyPXCXsCsYbjif6mXp7uxA7xY3/LGaiTQukZzSbOQ== - dotenv@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-7.0.0.tgz#a2be3cd52736673206e8a85fb5210eea29628e7c" integrity sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g== -dotenv@^8.0.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" - integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== - dotgitignore@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/dotgitignore/-/dotgitignore-2.1.0.tgz#a4b15a4e4ef3cf383598aaf1dfa4a04bcc089b7b" @@ -6099,11 +6069,6 @@ escodegen@^1.11.0, escodegen@^1.14.1, escodegen@^1.8.1: optionalDependencies: source-map "~0.6.1" -eslint-config-standard@^14.1.1: - version "14.1.1" - resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz#830a8e44e7aef7de67464979ad06b406026c56ea" - integrity sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg== - eslint-import-resolver-node@^0.3.4: version "0.3.4" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" @@ -6131,14 +6096,6 @@ eslint-module-utils@^2.6.0: debug "^2.6.9" pkg-dir "^2.0.0" -eslint-plugin-es@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893" - integrity sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ== - dependencies: - eslint-utils "^2.0.0" - regexpp "^3.0.0" - eslint-plugin-import@^2.22.1: version "2.22.1" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz#0896c7e6a0cf44109a2d97b95903c2bb689d7702" @@ -6158,33 +6115,11 @@ eslint-plugin-import@^2.22.1: resolve "^1.17.0" tsconfig-paths "^3.9.0" -eslint-plugin-node@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d" - integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g== - dependencies: - eslint-plugin-es "^3.0.0" - eslint-utils "^2.0.0" - ignore "^5.1.1" - minimatch "^3.0.4" - resolve "^1.10.1" - semver "^6.1.0" - -eslint-plugin-promise@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz#845fd8b2260ad8f82564c1222fce44ad71d9418a" - integrity sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw== - eslint-plugin-rulesdir@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/eslint-plugin-rulesdir/-/eslint-plugin-rulesdir-0.1.0.tgz#ad144d7e98464fda82963eff3fab331aecb2bf08" integrity sha1-rRRNfphGT9qClj7/P6szGuyyvwg= -eslint-plugin-standard@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.0.2.tgz#021211a9f077e63a6847e7bb9ab4247327ac8e0c" - integrity sha512-nKptN8l7jksXkwFk++PhJB3cCDTcXOEyhISIN86Ue2feJ1LFyY3PrY3/xT2keXlJSY5bpmbiTG0f885/YKAvTA== - eslint-scope@^5.0.0, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -7481,7 +7416,7 @@ ignore@^4.0.3, ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.1.1, ignore@^5.1.4: +ignore@^5.1.4: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== @@ -8888,24 +8823,6 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== -lambda-leak@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lambda-leak/-/lambda-leak-2.0.0.tgz#771985d3628487f6e885afae2b54510dcfb2cd7e" - integrity sha1-dxmF02KEh/boha+uK1RRDc+yzX4= - -lambda-tester@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/lambda-tester/-/lambda-tester-3.6.0.tgz#ceb7d4f4f0da768487a05cff37dcd088508b5247" - integrity sha512-F2ZTGWCLyIR95o/jWK46V/WnOCFAEUG/m/V7/CLhPJ7PCM+pror1rZ6ujP3TkItSGxUfpJi0kqwidw+M/nEqWw== - dependencies: - app-root-path "^2.2.1" - dotenv "^8.0.0" - dotenv-json "^1.0.0" - lambda-leak "^2.0.0" - semver "^6.1.1" - uuid "^3.3.2" - vandium-utils "^1.1.1" - lazystream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" @@ -11817,7 +11734,7 @@ resolve@^1.1.6, resolve@^1.10.0, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.13 dependencies: path-parse "^1.0.6" -resolve@^1.10.1, resolve@^1.18.1: +resolve@^1.18.1: version "1.18.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.18.1.tgz#018fcb2c5b207d2a6424aee361c5a266da8f4130" integrity sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA== @@ -12017,7 +11934,7 @@ semver@7.x, semver@^7.1.1, semver@^7.2.1, semver@^7.3.2: resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== -semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.2.0, semver@^6.3.0: +semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -13624,11 +13541,6 @@ validate-npm-package-name@^3.0.0: dependencies: builtins "^1.0.3" -vandium-utils@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/vandium-utils/-/vandium-utils-1.2.0.tgz#44735de4b7641a05de59ebe945f174e582db4f59" - integrity sha1-RHNd5LdkGgXeWevpRfF05YLbT1k= - vendors@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.4.tgz#e2b800a53e7a29b93506c3cf41100d16c4c4ad8e" From 1dfeee43651f77c635bd6f2da153539e432eff4d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 30 Oct 2020 21:20:58 +0000 Subject: [PATCH 015/314] chore(deps-dev): bump parcel from 2.0.0-nightly.432 to 2.0.0-nightly.435 (#11212) Bumps [parcel](https://github.com/parcel-bundler/parcel) from 2.0.0-nightly.432 to 2.0.0-nightly.435. - [Release notes](https://github.com/parcel-bundler/parcel/releases) - [Changelog](https://github.com/parcel-bundler/parcel/blob/v2/CHANGELOG.md) - [Commits](https://github.com/parcel-bundler/parcel/commits) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- .../@aws-cdk/aws-lambda-nodejs/package.json | 2 +- yarn.lock | 920 +++++++++--------- 2 files changed, 461 insertions(+), 461 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda-nodejs/package.json b/packages/@aws-cdk/aws-lambda-nodejs/package.json index ec0edd7833c78..d22b016411365 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/package.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/package.json @@ -67,7 +67,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "delay": "4.4.0", - "parcel": "2.0.0-nightly.432", + "parcel": "2.0.0-nightly.435", "pkglint": "0.0.0" }, "dependencies": { diff --git a/yarn.lock b/yarn.lock index 253bb9b954b30..9e6bda2db3ddd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2152,128 +2152,128 @@ dependencies: "@types/node" ">= 8" -"@parcel/babel-ast-utils@2.0.0-nightly.2056+146cffb6": - version "2.0.0-nightly.2056" - resolved "https://registry.yarnpkg.com/@parcel/babel-ast-utils/-/babel-ast-utils-2.0.0-nightly.2056.tgz#c05216883ee9a53477f3890e978ff39bb4687d19" - integrity sha512-eH5rskkMGdoVHCw5t7tuJdfDChl3mXFwl6MFA83SfGEsfOAdrLreQDGN+Z5jV6chZ+cq6gtGje2ckOSs6zzSfg== +"@parcel/babel-ast-utils@2.0.0-nightly.2059+a2dc60f2": + version "2.0.0-nightly.2059" + resolved "https://registry.yarnpkg.com/@parcel/babel-ast-utils/-/babel-ast-utils-2.0.0-nightly.2059.tgz#2726e28f00695471c44b1daa79aff9e479b6184f" + integrity sha512-ype+8xLFvWteWkMvPRrBrSs/Cmt0k0pVUVfQ8KYZEG9nDtrFnqkO8TDcWTEQep5kReEjrcc2PiUp4GV1v28ztw== dependencies: "@babel/generator" "^7.0.0" "@babel/parser" "^7.0.0" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" -"@parcel/babel-preset-env@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/babel-preset-env/-/babel-preset-env-2.0.0-nightly.434.tgz#400a4cbf7c36bf5a25a446b79ff833e50292949d" - integrity sha512-C9dsU6WHw4+k3MxHyf55HTlIJ6jBeOsVJAvTZfGPC2wmMNmbWBjpzzwN08FXUbH46I1myl8EJeUcePyi+J6aMw== +"@parcel/babel-preset-env@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/babel-preset-env/-/babel-preset-env-2.0.0-nightly.437.tgz#046ebd15d1751fa7ad9e4aaf4e2c3897e53325d5" + integrity sha512-HK1EiJxFI6xJNmH0Wdm+sHwqBnwUcEaNqH0MZtfWzkYMl9nHBkP41sdJ1BbMaJN/SfR6Ldk54LtVxGqbs3MbyA== dependencies: "@babel/preset-env" "^7.4.0" semver "^5.4.1" -"@parcel/babylon-walk@2.0.0-nightly.2056+146cffb6": - version "2.0.0-nightly.2056" - resolved "https://registry.yarnpkg.com/@parcel/babylon-walk/-/babylon-walk-2.0.0-nightly.2056.tgz#e7ed28ca5eac5f49c6ddc5813305b75a22b2497d" - integrity sha512-zoEnlXO6xNgsg96ItuSVqqwtaqrcDBmMNP9NTHdwX0iHWO2fWE3v16CJAXoI8E8py9nnbtvbCczfKpEW9c2YQg== +"@parcel/babylon-walk@2.0.0-nightly.2059+a2dc60f2": + version "2.0.0-nightly.2059" + resolved "https://registry.yarnpkg.com/@parcel/babylon-walk/-/babylon-walk-2.0.0-nightly.2059.tgz#ee63be4c6bb7970dce9ef0362a6ea9009fece958" + integrity sha512-WVynv571iFBV7SoBAd+rodYVgf5k8Io2un3isyBLf3+RLz4NZ6dWof5pyNvvdW4Fag3UHDVY4CbIvL6GXPNrOg== dependencies: "@babel/types" "^7.0.0" lodash.clone "^4.5.0" -"@parcel/bundler-default@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.0.0-nightly.434.tgz#94e2d8d04509926cce04263bb2b1b7a73869a88f" - integrity sha512-cwSGZJreoJXInzRM3tzvEDMZh9tv2Hrze1N5QscTRuRQFOTY31S/l8OROXI6yfqjHfbZo33Uvglif3hiJsikjg== +"@parcel/bundler-default@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.0.0-nightly.437.tgz#65cdeb8428476c649e3b0a3cf4e79c6741951a6e" + integrity sha512-WVTHF9aIcOPiK3qc9WVGFr5ac4DwvxGV+Oh5Nz1kfl9zBG6ugf/XD0l+l+RBO9AwIeyXD2JxbKgh9axItys25w== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.434+146cffb6" - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/diagnostic" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" nullthrows "^1.1.1" -"@parcel/cache@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/cache/-/cache-2.0.0-nightly.434.tgz#34171b2bfe8047e8bd9890f4a43c28ec5085547f" - integrity sha512-Dr5P/gOKDvmYZEPrYuWmJHyJ3F2RBSlNGsI1UYFWH8ViCj/yuKKzEiRqBmwjoI7Nx5IRAURrWM7ki77t4VF1Lg== +"@parcel/cache@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/cache/-/cache-2.0.0-nightly.437.tgz#539a455c16da5d353fa71c4b7f76ca84c4d76f89" + integrity sha512-zz2wuXNbLzV0K3I0T8Drx0+3oUUySyQAr4Z8jeYfCO6cxhfZgFTOhVXUR6Fzg9kr/VHY5xGJ2ixHBtMUDTYvKg== dependencies: - "@parcel/logger" "2.0.0-nightly.434+146cffb6" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/logger" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" -"@parcel/codeframe@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/codeframe/-/codeframe-2.0.0-nightly.434.tgz#a8d9794dec02f26550dbdcadff54872c3e560c7c" - integrity sha512-WClnfIwSbfw0l+ANBeqiPpd2oObFefX8wgb5JlTPrMgiymDgCy+g3k5YiCuNPZ6WY0GD5whFEV4PkddUHC1P5A== +"@parcel/codeframe@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/codeframe/-/codeframe-2.0.0-nightly.437.tgz#f7b709abf484767954545f7a78eb1bff3510d242" + integrity sha512-y1WFlGGDgoVEYdz0Ew5thPhN2r7HdR1hRVjWSpINvBrJp8zDVA6bBdY7Obk1lxpk0R0OxaFGbgUtdddaSQ4T/g== dependencies: chalk "^2.4.2" emphasize "^2.1.0" slice-ansi "^4.0.0" string-width "^4.2.0" -"@parcel/config-default@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/config-default/-/config-default-2.0.0-nightly.434.tgz#6b830e65252caa1c5bb7aedb248ff61fa90c326a" - integrity sha512-aGYSfV+MM8qC+mrNGSh0+ZXBa0IGCyyiM9kReD/L7KgwTWgO59RXqg7B37j5uV5e8p5l9nc+CC/fjX1zRDu8Ig== - dependencies: - "@parcel/bundler-default" "2.0.0-nightly.434+146cffb6" - "@parcel/namer-default" "2.0.0-nightly.434+146cffb6" - "@parcel/optimizer-cssnano" "2.0.0-nightly.434+146cffb6" - "@parcel/optimizer-data-url" "2.0.0-nightly.434+146cffb6" - "@parcel/optimizer-htmlnano" "2.0.0-nightly.434+146cffb6" - "@parcel/optimizer-terser" "2.0.0-nightly.434+146cffb6" - "@parcel/packager-css" "2.0.0-nightly.434+146cffb6" - "@parcel/packager-html" "2.0.0-nightly.434+146cffb6" - "@parcel/packager-js" "2.0.0-nightly.434+146cffb6" - "@parcel/packager-raw" "2.0.0-nightly.434+146cffb6" - "@parcel/packager-raw-url" "2.0.0-nightly.2056+146cffb6" - "@parcel/packager-ts" "2.0.0-nightly.434+146cffb6" - "@parcel/reporter-bundle-analyzer" "2.0.0-nightly.2056+146cffb6" - "@parcel/reporter-bundle-buddy" "2.0.0-nightly.2056+146cffb6" - "@parcel/reporter-cli" "2.0.0-nightly.434+146cffb6" - "@parcel/reporter-dev-server" "2.0.0-nightly.434+146cffb6" - "@parcel/resolver-default" "2.0.0-nightly.434+146cffb6" - "@parcel/runtime-browser-hmr" "2.0.0-nightly.434+146cffb6" - "@parcel/runtime-js" "2.0.0-nightly.434+146cffb6" - "@parcel/runtime-react-refresh" "2.0.0-nightly.434+146cffb6" - "@parcel/transformer-babel" "2.0.0-nightly.434+146cffb6" - "@parcel/transformer-coffeescript" "2.0.0-nightly.434+146cffb6" - "@parcel/transformer-css" "2.0.0-nightly.434+146cffb6" - "@parcel/transformer-glsl" "2.0.0-nightly.2056+146cffb6" - "@parcel/transformer-graphql" "2.0.0-nightly.434+146cffb6" - "@parcel/transformer-html" "2.0.0-nightly.434+146cffb6" - "@parcel/transformer-image" "2.0.0-nightly.2056+146cffb6" - "@parcel/transformer-inline-string" "2.0.0-nightly.434+146cffb6" - "@parcel/transformer-js" "2.0.0-nightly.434+146cffb6" - "@parcel/transformer-json" "2.0.0-nightly.434+146cffb6" - "@parcel/transformer-jsonld" "2.0.0-nightly.2056+146cffb6" - "@parcel/transformer-less" "2.0.0-nightly.434+146cffb6" - "@parcel/transformer-mdx" "2.0.0-nightly.2056+146cffb6" - "@parcel/transformer-postcss" "2.0.0-nightly.434+146cffb6" - "@parcel/transformer-posthtml" "2.0.0-nightly.434+146cffb6" - "@parcel/transformer-pug" "2.0.0-nightly.434+146cffb6" - "@parcel/transformer-raw" "2.0.0-nightly.434+146cffb6" - "@parcel/transformer-react-refresh-babel" "2.0.0-nightly.434+146cffb6" - "@parcel/transformer-react-refresh-wrap" "2.0.0-nightly.434+146cffb6" - "@parcel/transformer-sass" "2.0.0-nightly.434+146cffb6" - "@parcel/transformer-stylus" "2.0.0-nightly.434+146cffb6" - "@parcel/transformer-sugarss" "2.0.0-nightly.434+146cffb6" - "@parcel/transformer-toml" "2.0.0-nightly.434+146cffb6" - "@parcel/transformer-typescript-types" "2.0.0-nightly.434+146cffb6" - "@parcel/transformer-vue" "2.0.0-nightly.2056+146cffb6" - "@parcel/transformer-yaml" "2.0.0-nightly.434+146cffb6" - -"@parcel/core@2.0.0-nightly.432+146cffb6": - version "2.0.0-nightly.432" - resolved "https://registry.yarnpkg.com/@parcel/core/-/core-2.0.0-nightly.432.tgz#fd230c0349532530f18b0b865c3803557a327dec" - integrity sha512-pM7PKWmyzf6l+zXI1mUbpDx1KfSLcEMl6jyOuZL7gHSBKFiKCT+DzW8hkmR+Hr2g/sCzlGFey0pN49yYPOGKqQ== - dependencies: - "@parcel/cache" "2.0.0-nightly.434+146cffb6" - "@parcel/diagnostic" "2.0.0-nightly.434+146cffb6" - "@parcel/events" "2.0.0-nightly.434+146cffb6" - "@parcel/fs" "2.0.0-nightly.434+146cffb6" - "@parcel/logger" "2.0.0-nightly.434+146cffb6" - "@parcel/package-manager" "2.0.0-nightly.434+146cffb6" - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" +"@parcel/config-default@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/config-default/-/config-default-2.0.0-nightly.437.tgz#46d8e3315d71d11db6ad0b9a32b55c55b66d9474" + integrity sha512-tUyOsZ5GzVW/9YbNfa0hrNZa+LWpt+YWrXOTQBk/evrt19ywZYzYMSKE1OWbOhpi9G9r2T4uBHlcQndVCxlkwQ== + dependencies: + "@parcel/bundler-default" "2.0.0-nightly.437+a2dc60f2" + "@parcel/namer-default" "2.0.0-nightly.437+a2dc60f2" + "@parcel/optimizer-cssnano" "2.0.0-nightly.437+a2dc60f2" + "@parcel/optimizer-data-url" "2.0.0-nightly.437+a2dc60f2" + "@parcel/optimizer-htmlnano" "2.0.0-nightly.437+a2dc60f2" + "@parcel/optimizer-terser" "2.0.0-nightly.437+a2dc60f2" + "@parcel/packager-css" "2.0.0-nightly.437+a2dc60f2" + "@parcel/packager-html" "2.0.0-nightly.437+a2dc60f2" + "@parcel/packager-js" "2.0.0-nightly.437+a2dc60f2" + "@parcel/packager-raw" "2.0.0-nightly.437+a2dc60f2" + "@parcel/packager-raw-url" "2.0.0-nightly.2059+a2dc60f2" + "@parcel/packager-ts" "2.0.0-nightly.437+a2dc60f2" + "@parcel/reporter-bundle-analyzer" "2.0.0-nightly.2059+a2dc60f2" + "@parcel/reporter-bundle-buddy" "2.0.0-nightly.2059+a2dc60f2" + "@parcel/reporter-cli" "2.0.0-nightly.437+a2dc60f2" + "@parcel/reporter-dev-server" "2.0.0-nightly.437+a2dc60f2" + "@parcel/resolver-default" "2.0.0-nightly.437+a2dc60f2" + "@parcel/runtime-browser-hmr" "2.0.0-nightly.437+a2dc60f2" + "@parcel/runtime-js" "2.0.0-nightly.437+a2dc60f2" + "@parcel/runtime-react-refresh" "2.0.0-nightly.437+a2dc60f2" + "@parcel/transformer-babel" "2.0.0-nightly.437+a2dc60f2" + "@parcel/transformer-coffeescript" "2.0.0-nightly.437+a2dc60f2" + "@parcel/transformer-css" "2.0.0-nightly.437+a2dc60f2" + "@parcel/transformer-glsl" "2.0.0-nightly.2059+a2dc60f2" + "@parcel/transformer-graphql" "2.0.0-nightly.437+a2dc60f2" + "@parcel/transformer-html" "2.0.0-nightly.437+a2dc60f2" + "@parcel/transformer-image" "2.0.0-nightly.2059+a2dc60f2" + "@parcel/transformer-inline-string" "2.0.0-nightly.437+a2dc60f2" + "@parcel/transformer-js" "2.0.0-nightly.437+a2dc60f2" + "@parcel/transformer-json" "2.0.0-nightly.437+a2dc60f2" + "@parcel/transformer-jsonld" "2.0.0-nightly.2059+a2dc60f2" + "@parcel/transformer-less" "2.0.0-nightly.437+a2dc60f2" + "@parcel/transformer-mdx" "2.0.0-nightly.2059+a2dc60f2" + "@parcel/transformer-postcss" "2.0.0-nightly.437+a2dc60f2" + "@parcel/transformer-posthtml" "2.0.0-nightly.437+a2dc60f2" + "@parcel/transformer-pug" "2.0.0-nightly.437+a2dc60f2" + "@parcel/transformer-raw" "2.0.0-nightly.437+a2dc60f2" + "@parcel/transformer-react-refresh-babel" "2.0.0-nightly.437+a2dc60f2" + "@parcel/transformer-react-refresh-wrap" "2.0.0-nightly.437+a2dc60f2" + "@parcel/transformer-sass" "2.0.0-nightly.437+a2dc60f2" + "@parcel/transformer-stylus" "2.0.0-nightly.437+a2dc60f2" + "@parcel/transformer-sugarss" "2.0.0-nightly.437+a2dc60f2" + "@parcel/transformer-toml" "2.0.0-nightly.437+a2dc60f2" + "@parcel/transformer-typescript-types" "2.0.0-nightly.437+a2dc60f2" + "@parcel/transformer-vue" "2.0.0-nightly.2059+a2dc60f2" + "@parcel/transformer-yaml" "2.0.0-nightly.437+a2dc60f2" + +"@parcel/core@2.0.0-nightly.435+a2dc60f2": + version "2.0.0-nightly.435" + resolved "https://registry.yarnpkg.com/@parcel/core/-/core-2.0.0-nightly.435.tgz#0be8537452188200dce60d1e1bf6e47a16a811b7" + integrity sha512-1CuYm90OXJlDsXf9xNBSvgpREyhuOXaOkDzJvRCwn26ZcGbnBspFJ9vSTxg32b20QLdsPRPEr1Plq9ZpQyfcPQ== + dependencies: + "@parcel/cache" "2.0.0-nightly.437+a2dc60f2" + "@parcel/diagnostic" "2.0.0-nightly.437+a2dc60f2" + "@parcel/events" "2.0.0-nightly.437+a2dc60f2" + "@parcel/fs" "2.0.0-nightly.437+a2dc60f2" + "@parcel/logger" "2.0.0-nightly.437+a2dc60f2" + "@parcel/package-manager" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/types" "2.0.0-nightly.434+146cffb6" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" - "@parcel/workers" "2.0.0-nightly.434+146cffb6" + "@parcel/types" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/workers" "2.0.0-nightly.437+a2dc60f2" abortcontroller-polyfill "^1.1.9" base-x "^3.0.8" browserslist "^4.6.6" @@ -2287,72 +2287,72 @@ querystring "^0.2.0" semver "^5.4.1" -"@parcel/diagnostic@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/diagnostic/-/diagnostic-2.0.0-nightly.434.tgz#40a08090cd88d498fae13d7d8c53ce0518a6d824" - integrity sha512-4a54sXQUs9LjreNSH5piZgHbXQDhOv7hb6s1PSD0BEf3h7uxIJttu2R13WcY2OxfTEdGwabbB5HzuSObJpsvaw== +"@parcel/diagnostic@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/diagnostic/-/diagnostic-2.0.0-nightly.437.tgz#81c5edf13612b1cc63e9e1ca7cdf196852094590" + integrity sha512-hMToMmBtoGu8AYcr6KWaUcZUdw2G4J1vgthG1rxvD8BMhZdZ2e0CyVdFa8Iu1uyjwG7n+SzucIhqEs1TeT/R6A== dependencies: json-source-map "^0.6.1" nullthrows "^1.1.1" -"@parcel/events@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/events/-/events-2.0.0-nightly.434.tgz#944e69e93292a3cbc84d4991b20bcd13207cb682" - integrity sha512-zI8rtX8x8Z5BrqHH1MhNJVWIfmJA/ihrLEWC4xjqm0R6+hnx51wvpFG1Nt059cSq7M9TTrrWB63xT8YWnPR91w== +"@parcel/events@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/events/-/events-2.0.0-nightly.437.tgz#4c15acda218d59b1a6b7a8cc9caf3a12abb9a81e" + integrity sha512-ErUy81jc69YWFyr4JIUXNHp3JP+gsvgjt4ZO/vioA2b6sYJZPkdXCIx33aVrxuX+dDO1SMXfe9FjmOvETcKmZw== -"@parcel/fs-write-stream-atomic@2.0.0-nightly.2056+146cffb6": - version "2.0.0-nightly.2056" - resolved "https://registry.yarnpkg.com/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.0-nightly.2056.tgz#a25e56fae139d8a3f69d7cbcf039029b9b8c81be" - integrity sha512-pVVxzPdUvF+ZK/FPld+TYzME+5O6kmcaY4QTyhBoSpiikYcKrvg87pAH4L/Y9JGMokYpS8QizYGwSRf3gqN8AA== +"@parcel/fs-write-stream-atomic@2.0.0-nightly.2059+a2dc60f2": + version "2.0.0-nightly.2059" + resolved "https://registry.yarnpkg.com/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.0-nightly.2059.tgz#b35ddf71a17812e2108bd84412210b2fca77320d" + integrity sha512-tFaviSLTF9qi5do7Uw1QmcJn4l8t5LTtszBITSdHUsDMvvCwvZwhvIK/R1kmtsgCR7u81D8h4rxVRA8Iib8HOg== dependencies: graceful-fs "^4.1.2" iferr "^1.0.2" imurmurhash "^0.1.4" readable-stream "1 || 2" -"@parcel/fs@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-2.0.0-nightly.434.tgz#966ea521886ef556fb85368e4e0f789ac0287f10" - integrity sha512-S/ChW/OOLk93TPH3axORIXJYb4o1p/OOg/juRD+fluu/a46S0rHXAvfX4U/SIw07xEO5nIZbGFiijdtcmgVP7Q== +"@parcel/fs@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-2.0.0-nightly.437.tgz#576080a91953077b2d5e7c154a71c9902d9f1cee" + integrity sha512-F2P4GbJAAVTDpB8f/WdcmAVzxXrv69ONQqh3udk8OIVHwT9uymG+zdpexppI1z9DuEObpJ9nxoR/3/7XzZt5rg== dependencies: - "@parcel/fs-write-stream-atomic" "2.0.0-nightly.2056+146cffb6" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/fs-write-stream-atomic" "2.0.0-nightly.2059+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" "@parcel/watcher" "2.0.0-alpha.8" - "@parcel/workers" "2.0.0-nightly.434+146cffb6" + "@parcel/workers" "2.0.0-nightly.437+a2dc60f2" graceful-fs "^4.2.4" mkdirp "^0.5.1" ncp "^2.0.0" nullthrows "^1.1.1" rimraf "^2.6.2" -"@parcel/logger@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-2.0.0-nightly.434.tgz#06a84f8c6ae8ab16c00eaf62df253dcb4ed9d19c" - integrity sha512-JQqvlYVT6AHnWowpAB0iRRdcQKqfCkgtE2D6IAgC0DyRX5fkn5IfkcUgapdOPf1eEmE24g0y4Iao6Scyz1nEkw== +"@parcel/logger@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-2.0.0-nightly.437.tgz#b64529087e6376be60436888ee827e061be1e584" + integrity sha512-k6NnQHiPeT0r17MNUh3Jfx0fLV3dwrwsjnrnjqSwigaOXYip/sBevVyAz5+KICBj7/rhiriDXlraRttgYfIOlw== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.434+146cffb6" - "@parcel/events" "2.0.0-nightly.434+146cffb6" + "@parcel/diagnostic" "2.0.0-nightly.437+a2dc60f2" + "@parcel/events" "2.0.0-nightly.437+a2dc60f2" -"@parcel/markdown-ansi@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/markdown-ansi/-/markdown-ansi-2.0.0-nightly.434.tgz#3f731c66b65178e9b945afa30847c81da91734e7" - integrity sha512-Ab+4CDD/a15vrogld1Q6xD8c5aFLIrwhXriPjSfcLqs9xopNKXWuQ9C/wJki41/tdTohqILYqXfIR/ZOYNZdeA== +"@parcel/markdown-ansi@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/markdown-ansi/-/markdown-ansi-2.0.0-nightly.437.tgz#80d8d836b759dc08b43cfd098f908b83e8013d1b" + integrity sha512-897o2it44qycP0mbmPfTaMevRGstbaXwn2LHfyPxhoob/H5VJbJ8JQNZSg0elJNx7S9cC5g57o9AlKV+S93d1Q== dependencies: chalk "^2.4.2" -"@parcel/namer-default@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/namer-default/-/namer-default-2.0.0-nightly.434.tgz#adba98ed883ba9b7111c9dc756b41e062725daa9" - integrity sha512-TqDlaWHH/eg4158qlXm+MC0OxrFTN5x83L9PWRiCRHRi5Wk0Ax2GKYu0q4RtOOGoSIS0X145CRpzmQVLP2HkAw== +"@parcel/namer-default@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/namer-default/-/namer-default-2.0.0-nightly.437.tgz#b4638e8b57a13bd19b939bce6f415919a947de5a" + integrity sha512-8VfEtpptTwmJXAoON80pE++Fgd+3ExcmAhXXasNuNhAfd+Ex0Ta5i36sN6YY0iWUcj8izVPJXfwftfb5H9Ir6A== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.434+146cffb6" - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" + "@parcel/diagnostic" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" nullthrows "^1.1.1" -"@parcel/node-libs-browser@2.0.0-nightly.2056+146cffb6": - version "2.0.0-nightly.2056" - resolved "https://registry.yarnpkg.com/@parcel/node-libs-browser/-/node-libs-browser-2.0.0-nightly.2056.tgz#f9fa82ba72e04b97c30f3d5c41da0e600859e449" - integrity sha512-7GCMoMPEqh5lWRAdibuvT6UfPZbIhWutI/3mHLpMJQjggpkZAe9nx/pXqEwe+MKQH6aj7bXUsSuf/i57O9qONQ== +"@parcel/node-libs-browser@2.0.0-nightly.2059+a2dc60f2": + version "2.0.0-nightly.2059" + resolved "https://registry.yarnpkg.com/@parcel/node-libs-browser/-/node-libs-browser-2.0.0-nightly.2059.tgz#a7c1da35f59650c236929310a1c9d5870c588a47" + integrity sha512-kGsder3Cg8EtT3+aoQxgvnPL1RsQJYbm2qNtyUzh1LKwHdm7hchSVrvvQya81ryHJPfVo+AaJzouMi6S+iAYfg== dependencies: assert "^2.0.0" browserify-zlib "^0.2.0" @@ -2377,71 +2377,71 @@ util "^0.12.3" vm-browserify "^1.1.2" -"@parcel/node-resolver-core@2.0.0-nightly.2056+146cffb6": - version "2.0.0-nightly.2056" - resolved "https://registry.yarnpkg.com/@parcel/node-resolver-core/-/node-resolver-core-2.0.0-nightly.2056.tgz#9f2604b7d082ef644308fff0035e590d965125d5" - integrity sha512-RKl0offRQPO345exJ6kfK4k+cFMQqHKdj5JCGpKtxkpe/T5pL2/wryhXNkpYfqboFd6oH5i+cHxWRisOxQzcnQ== +"@parcel/node-resolver-core@2.0.0-nightly.2059+a2dc60f2": + version "2.0.0-nightly.2059" + resolved "https://registry.yarnpkg.com/@parcel/node-resolver-core/-/node-resolver-core-2.0.0-nightly.2059.tgz#2ec173607a8633eb4dd8ac87086df09b877e1ba0" + integrity sha512-vaRsHeLhjpFtp5I8FgqkPYePpemmmfE4X7MKa8VJE93TEv8A+R9YtiFQLkOyC5xxVF2I8c4YG0zEHOb4AtjDpA== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.434+146cffb6" - "@parcel/node-libs-browser" "2.0.0-nightly.2056+146cffb6" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/diagnostic" "2.0.0-nightly.437+a2dc60f2" + "@parcel/node-libs-browser" "2.0.0-nightly.2059+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" micromatch "^3.0.4" nullthrows "^1.1.1" querystring "^0.2.0" -"@parcel/optimizer-cssnano@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.0.0-nightly.434.tgz#3c5822c1c2f4a91150edf9658dd90beb8b393437" - integrity sha512-CDkGSTpu8vNZt7s15jmSusXFu97/e43eaFPdLWWirTjCeOWetzVUxhnE34spE/0lLWsetUNogQ4Jx9w09wy+bg== +"@parcel/optimizer-cssnano@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.0.0-nightly.437.tgz#bcb7a90a1b75c2e2e05ac5c2dcbde398aba4fadb" + integrity sha512-PyXlV5wvWqeBVE/NEratnnRunv7RvVv9immjHE0DAB0GAmDmGYE5IidUP6Sjzq91m+eUPlUetbV41bh8SmkqUQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" "@parcel/source-map" "2.0.0-alpha.4.16" cssnano "^4.1.10" postcss "^8.0.5" -"@parcel/optimizer-data-url@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-data-url/-/optimizer-data-url-2.0.0-nightly.434.tgz#d6c68ec93414bf9e794e09374b66722f94cef39d" - integrity sha512-A5bOEW8VdVO5PU53tWyKQkIEjplO9SIia0bWAnsEilZahzYO2jG29WdNDta7VNc8XM4/Ovy0Z/sxUxT9lZNMFA== +"@parcel/optimizer-data-url@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-data-url/-/optimizer-data-url-2.0.0-nightly.437.tgz#60f8d4c6f8b6762b7f91b466c18c0f84b05f62fc" + integrity sha512-F8svJFeSHvRoiw4DdI7iwNyeeuH8D+M2w74utLEZ+thBIbX6S9VpbVlUVZz0eGaj8Ucf8Q8ftzfwWxEZTIBOZg== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" isbinaryfile "^4.0.2" mime "^2.4.4" -"@parcel/optimizer-htmlnano@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.0.0-nightly.434.tgz#eca364a376dc164df970f73e2ae7889a0585b930" - integrity sha512-JcwRgceO1QVzekre4M/nE2SYmsrjkP7k7tC8aZY26phry/CcdaNXpSyfoMkJ2xag/1U8ZP8DGotln+iJrO8AHw== +"@parcel/optimizer-htmlnano@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.0.0-nightly.437.tgz#fcc26bd129bb44358950b07b7a2652359b7bd232" + integrity sha512-F9qCZRO6DcieSr3jQO5ew6SxWzydRNoGeVtE1hr8LxABCVk0H2bhSMBMiYSXRB7YcPHaTHtpPMajd1lD6wYFCg== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" htmlnano "^0.2.2" nullthrows "^1.1.1" posthtml "^0.11.3" -"@parcel/optimizer-terser@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-terser/-/optimizer-terser-2.0.0-nightly.434.tgz#f277e6a6fdc56d8e7d00d2694b29aa614c605615" - integrity sha512-IFg+6pOwNmMKcuZd8AVG0xdZsg0ndERUFimD+XROq5hadv/QRUY+Xs/sFpJs8LG33h0PDcTFqvtoxKA/VYTkhg== +"@parcel/optimizer-terser@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-terser/-/optimizer-terser-2.0.0-nightly.437.tgz#9d07662402e6d77c739be6a1684ca0f36e1e1132" + integrity sha512-xspBCK/cr1OmVMYCFTYqMkoItNdqmSfkBX50UwmxjO3oapKeet4Vr7PKwru7uGazp5ef+y+xXoNlN3rP7/LOFw== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.434+146cffb6" - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" + "@parcel/diagnostic" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" nullthrows "^1.1.1" terser "^5.2.0" -"@parcel/package-manager@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/package-manager/-/package-manager-2.0.0-nightly.434.tgz#c10023364890c1407c8bc61304c6c473fbd26187" - integrity sha512-He9F62ZWZOnb7l4Oe6xV+afLsZv/5yR8On0lQY4Cuy7LO0Aemud4SS192gS0i8Ns+l5CHDap/M6tpYEKmQ1Urg== +"@parcel/package-manager@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/package-manager/-/package-manager-2.0.0-nightly.437.tgz#58bc2763f907028e20d135657067386570552980" + integrity sha512-SbBciBOMKMubL6XfOEjSneRYE5nAy9jXk+O2loHDBBlnGhCwB2ulZa4qXUt+TsNT0EO8VIQUddJysS/K/5kflQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.434+146cffb6" - "@parcel/fs" "2.0.0-nightly.434+146cffb6" - "@parcel/logger" "2.0.0-nightly.434+146cffb6" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" - "@parcel/workers" "2.0.0-nightly.434+146cffb6" + "@parcel/diagnostic" "2.0.0-nightly.437+a2dc60f2" + "@parcel/fs" "2.0.0-nightly.437+a2dc60f2" + "@parcel/logger" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/workers" "2.0.0-nightly.437+a2dc60f2" command-exists "^1.2.6" cross-spawn "^6.0.4" nullthrows "^1.1.1" @@ -2449,91 +2449,91 @@ semver "^5.4.1" split2 "^3.1.1" -"@parcel/packager-css@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/packager-css/-/packager-css-2.0.0-nightly.434.tgz#c4c8d96bdef390f23e3caffa5b441ab58c944ec0" - integrity sha512-vcAelclqSXoG5mXJeD3LG1l/Pi/VX1ULp8QmSQ/4dh3bwa7YvEC/1XHQHqUwFxMcOtVQHu7GLQBjpPb/vBxHJg== +"@parcel/packager-css@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/packager-css/-/packager-css-2.0.0-nightly.437.tgz#e9c99df0450d61cd7e289a563d33ff87853211ee" + integrity sha512-Z7VEITchZJ2n0TLCslsY7cIxmLPHJ8BapdgRZ1iXUefTDwYNIjnGJWbjbWtQbhBy5C43k291pmoMzJFOfRQd8Q== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" -"@parcel/packager-html@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/packager-html/-/packager-html-2.0.0-nightly.434.tgz#fba28b8bb027d07ddc36c63d9f575c5812be7eb1" - integrity sha512-G5lHBn7xfRDr5cNp558CFk46Ivnk4N7G+az58mSTS6byB3k1ZQEldnxYUMtUBpPxZXp8FRMw0FkntoHo/H1p/w== +"@parcel/packager-html@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/packager-html/-/packager-html-2.0.0-nightly.437.tgz#bb38c4c548acb115ed063b355d5e8a957b2f14a1" + integrity sha512-XuL6vNPPAV1HHyqSDhm4LBA3yR+mkJoab9MyoZhQn6rwSd/nJEr6LLzR9aaA7FbTMQsDtsknWLVQOU2yA/iXXg== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" - "@parcel/types" "2.0.0-nightly.434+146cffb6" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/types" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" nullthrows "^1.1.1" posthtml "^0.11.3" -"@parcel/packager-js@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/packager-js/-/packager-js-2.0.0-nightly.434.tgz#7ae693501d7497171562ab9b2599170e4e5ca3d1" - integrity sha512-FuKEGO9XlaPDBeGDMMeMPFtrHE5t9kE1iM2Xx/x4wu+4zBopSZTi3XRaqbQ2QCldpss53x/5OclgDUww6Qd1zA== +"@parcel/packager-js@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/packager-js/-/packager-js-2.0.0-nightly.437.tgz#cedde51cbfa54f25613e86004e935355dc770380" + integrity sha512-tBzcPFThpwpadD1cUU1hmUz0OkMvdVJG1yo9R/F/0mzhKlfUWb/niyurGHSRiisbdYfFZPwvIcMZHgX4gT1HlQ== dependencies: "@babel/traverse" "^7.2.3" - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" - "@parcel/scope-hoisting" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/scope-hoisting" "2.0.0-nightly.437+a2dc60f2" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" nullthrows "^1.1.1" -"@parcel/packager-raw-url@2.0.0-nightly.2056+146cffb6": - version "2.0.0-nightly.2056" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw-url/-/packager-raw-url-2.0.0-nightly.2056.tgz#b5c8603f9c690a86635272f86ae16f9466b94fa6" - integrity sha512-zbzebs44fDhJjkyx+RYUwy6Lnil+XkEJVy7UbFy0E+HVD9yiyZRA+8p+4H4+0HgCtdeJBRWx8vBjyfh4ehMN6Q== +"@parcel/packager-raw-url@2.0.0-nightly.2059+a2dc60f2": + version "2.0.0-nightly.2059" + resolved "https://registry.yarnpkg.com/@parcel/packager-raw-url/-/packager-raw-url-2.0.0-nightly.2059.tgz#c4770126488bf3e79ee15ebc5dbf7c869b465e5c" + integrity sha512-PUMTM7Lrh+VjvLMIjF0gc5ORNzPwuFSZBwygqdIzJ4AC3cjHVyk9R0nOpE0XxABwuzEWU3TdRsL8ZPkm0R1RVg== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" -"@parcel/packager-raw@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw/-/packager-raw-2.0.0-nightly.434.tgz#de4357d51ab4edfa252f4dda2f3973d3583d6783" - integrity sha512-8xy6j64me3C7LIs7ldoOjhnb/BSeElXFd0na3hKijUXLAm8lOfxmPjyhW6CNO0cE0SzhDQ0pc5OTnW3uBlWzvA== +"@parcel/packager-raw@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/packager-raw/-/packager-raw-2.0.0-nightly.437.tgz#475d2e3b971ae04aa23cabb160dc737125dc650d" + integrity sha512-6PLYAI6RzYcFbxRc7yYsxfoA/e9Fu+slMoLPDlqSB/dlof0vNIUU974uapDoHqmoyOMPSlkds8oH0yfA4BklSA== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" -"@parcel/packager-ts@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/packager-ts/-/packager-ts-2.0.0-nightly.434.tgz#6d383753051ea32b264df6abfb45eefebbf1138c" - integrity sha512-180o4rKA+1L1z/k2YQyErXnhVXNyVSqwLDb/6gBkQD6t1I6nEIXv/y4U7OW1mBRFKOBHcay/oQF3qUZdo3gpCA== +"@parcel/packager-ts@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/packager-ts/-/packager-ts-2.0.0-nightly.437.tgz#ef3cc15b03b779c08acfafa7ce6377ec4d24af67" + integrity sha512-1c8HREfUEN0mIAmzjOwfxyl+iUEGMKy/knYGxOgYEFWfHb7S06JBAzsmeB5eieUzgnad5wg6iJJzRyhHASgplA== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" -"@parcel/plugin@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/plugin/-/plugin-2.0.0-nightly.434.tgz#e7134b0d4719b080f9d015c8390f5f9285d605ff" - integrity sha512-F6XERkc4Y7NeJiys6f5gMeu33suciEaQmLvnyt4ShYeX1ZWKjoze0kt1A1AQf3U3h7wZE4JpzAqjFm7ojdsJPg== +"@parcel/plugin@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/plugin/-/plugin-2.0.0-nightly.437.tgz#3ef8ae2b3bbecb5f709144befe17c31a7c876193" + integrity sha512-G5u1b2894LtD6b5Xvzw7xMRUmpL/6xY3Why7re2m8cn18yEYHvUSC+H8GbjN+I+l6kMZXci9a5gHg6n7ezTvHg== dependencies: - "@parcel/types" "2.0.0-nightly.434+146cffb6" + "@parcel/types" "2.0.0-nightly.437+a2dc60f2" -"@parcel/reporter-bundle-analyzer@2.0.0-nightly.2056+146cffb6": - version "2.0.0-nightly.2056" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.0.0-nightly.2056.tgz#de8265f5e142d71e21fcb65fb935251887f9fcfe" - integrity sha512-3HdVmrE0zb6NyVgttG+8T0cnLXSfqpgYrZUIMm7IS13iZVsL5yY3aPf5XLoFzo+9ZHlzY+ViPo5f5kqR2ilPqw== +"@parcel/reporter-bundle-analyzer@2.0.0-nightly.2059+a2dc60f2": + version "2.0.0-nightly.2059" + resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.0.0-nightly.2059.tgz#f48df7d56e11e6612ee3b32f40e5b419aa0b1dde" + integrity sha512-w5sWJA0tXCEkJDGIwECKCBX86SmldkIVnsIvjHznhsPBEys/gESH6NVTs6A6jQD4qnIhm+EpyTTJN6iPGqzGAQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" nullthrows "^1.1.1" -"@parcel/reporter-bundle-buddy@2.0.0-nightly.2056+146cffb6": - version "2.0.0-nightly.2056" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-buddy/-/reporter-bundle-buddy-2.0.0-nightly.2056.tgz#39c2bac29bfd2034140e391daa365ddf8dd3f285" - integrity sha512-rUhKqzPVHRNEILF6wtoHXqvV+XduQqLBOtyBcCYN0C6jEwh51teDu+1GoP5OhdPRAIY2kkQoMadkO/Q6LKk8qQ== +"@parcel/reporter-bundle-buddy@2.0.0-nightly.2059+a2dc60f2": + version "2.0.0-nightly.2059" + resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-buddy/-/reporter-bundle-buddy-2.0.0-nightly.2059.tgz#f08e6b1d163e63b2a916a2f78c33f141ce5d7edc" + integrity sha512-AyDZeIazIy3KpzPBUMRt42aWonIAUd6oIYreGG9gPbnUmCFSoGPFC4+IZ6kSFabJqqr7HzF3OxF99z8vBwBR+g== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" -"@parcel/reporter-cli@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/reporter-cli/-/reporter-cli-2.0.0-nightly.434.tgz#5fe891d0ec692bf80200a9bd5a8dd250ebfda246" - integrity sha512-7p4cV9nXqWC0M3P4NrJZ9IecIVEE0HGBb3k34bLHlrvL4bRoaHpoe2+T1QvyrNYesUf+CUBlRXohe4h3QEw4yQ== +"@parcel/reporter-cli@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/reporter-cli/-/reporter-cli-2.0.0-nightly.437.tgz#cd3db9d6cbfb2f98b0c3151a7e3156157033d2c4" + integrity sha512-PSQbjO9hi7r47Ti9Fqfb1O8Q3k3nrE3fFL3yE/nusQ+zN8QVMzVrUhR2TkTqplGN3wV0q8n6D7w9H9uaYRVfzw== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" - "@parcel/types" "2.0.0-nightly.434+146cffb6" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/types" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" chalk "^3.0.0" filesize "^3.6.0" nullthrows "^1.1.1" @@ -2542,13 +2542,13 @@ strip-ansi "^6.0.0" term-size "^2.1.1" -"@parcel/reporter-dev-server@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/reporter-dev-server/-/reporter-dev-server-2.0.0-nightly.434.tgz#6637e29703b225cfedb43f5145936df5257430b6" - integrity sha512-ZloWZBo1DqMKaQBqs5hPMblySCDd76l4oY8vpmPYvdtO1skWY6VDL7aoVp4qkPPbXmECnvxdys9e2uIqtH/8rw== +"@parcel/reporter-dev-server@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/reporter-dev-server/-/reporter-dev-server-2.0.0-nightly.437.tgz#7596edfa365d1bbe7097337b7b71dff535f714e9" + integrity sha512-H/n/XWOK78mnJeRqGZBQmTaa5EsX3Wd0lYCSyM4pRoL7nQqThpdF5BCe/pwme5PtmA4RIgogvOvl5H54xnoYfQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" connect "^3.7.0" ejs "^2.6.1" http-proxy-middleware "^1.0.0" @@ -2556,54 +2556,54 @@ serve-handler "^6.0.0" ws "^6.2.0" -"@parcel/resolver-default@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/resolver-default/-/resolver-default-2.0.0-nightly.434.tgz#5e9ca29004097580bf3c40fe7f18571ec40550fb" - integrity sha512-Zy2wSAwRgZcW8Wug/yFFhI/FNOh9ElMcl96nJhY1YFK6wjwfRDj84vx3fSWJmWofHUOwe9eLmTgaL0Rn+83pEQ== +"@parcel/resolver-default@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/resolver-default/-/resolver-default-2.0.0-nightly.437.tgz#9d204dd421dcf1c1f0cd95947f16d135a16c22fa" + integrity sha512-ZXEODensgtWIcTHwSa8HQpBI3hWzmcTfbux5ApZlhL+etfwTwV7M/ombxP7b8XAfM+874NztDZzkr1OKZ0Fy+g== dependencies: - "@parcel/node-resolver-core" "2.0.0-nightly.2056+146cffb6" - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" + "@parcel/node-resolver-core" "2.0.0-nightly.2059+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" -"@parcel/runtime-browser-hmr@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.0.0-nightly.434.tgz#ec49a1df9def8c206dc401b28806ad12656785e4" - integrity sha512-xCDn17bRGHvWd8ygPmUo3yJX9lRngX5WeMwbF5DwvdxTjsg26y+MI8tF2wlHjdOl472ESgv1ZXnBIblDFO3wJw== +"@parcel/runtime-browser-hmr@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.0.0-nightly.437.tgz#fa3252504d04640bd42f68b5f29c85602e78a483" + integrity sha512-vIo5/6AxV8Oi/fi3Ahl1lwPsISZINoMjEJbC+AoALacrqMuowzNNc131VoQ7CWnT4QXHKSDWkVntLHvwfI/snA== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" -"@parcel/runtime-js@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/runtime-js/-/runtime-js-2.0.0-nightly.434.tgz#cadb98b1968950d606cdf96a97b178af121adc68" - integrity sha512-z2B+Sb3ObKoDnqrQU5jrL+Fg5Woy/csW3QtOX4lSmyoZp1NpaTQaB5KpBPe4WrusWMBEXPLea3b8MWAmlrx1rQ== +"@parcel/runtime-js@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/runtime-js/-/runtime-js-2.0.0-nightly.437.tgz#e469df9a2d052a1734f7af51fbe19dbc79fa5be9" + integrity sha512-6v9zoCFxCOmkMJPgKhslS1bKEdHkOr+NTt3LtY7UeHuXu4csaQEBQCbdQkOFOOWkG33WSylrHv6YLPss0hOVCA== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" nullthrows "^1.1.1" -"@parcel/runtime-react-refresh@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.0.0-nightly.434.tgz#28df595c871aeca0ad0fe571328a1803de4f3119" - integrity sha512-KjNDA+z45DIPGybXIiyV2aVxCDYjZAq/nEZc07mVzuQ1jNm0rCR0ndgHQT71rAGUdkAqdOnCSdnN0sVuv2nNXQ== +"@parcel/runtime-react-refresh@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.0.0-nightly.437.tgz#33f67db0897799fb60ecaa5755c983565546220c" + integrity sha512-lvsYIOSbQEntpbLbhXY2UfiupPscEzjM+3f/nG975fycN1uQEurhptOrWWbwQxx2kUSLNuTVHObCquZMwIKBbA== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" react-refresh "^0.6.0" -"@parcel/scope-hoisting@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/scope-hoisting/-/scope-hoisting-2.0.0-nightly.434.tgz#145ebc92ca90f956b1c6b50cc38aade4d5ffb7b7" - integrity sha512-YUxBMSGWPPxmjTjD/1YA5twcBDWKYmo1p1CNUZKp6Toa0R0tiyTrzy3EQEZKzFR0AVMsLUd4wcjBLodnl5/SKQ== +"@parcel/scope-hoisting@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/scope-hoisting/-/scope-hoisting-2.0.0-nightly.437.tgz#caddc4780f612e8aff53aae766bacb5b32f74e64" + integrity sha512-0dXnnc5W7AnoCTPmBJ0/4Mm2RAQSlgGCWf20V1Mjd6ByuqR1GD0SjxRw6Ys5vUgXgohH98kkJeopo1mA64IJeg== dependencies: "@babel/generator" "^7.3.3" "@babel/parser" "^7.0.0" "@babel/template" "^7.4.0" "@babel/traverse" "^7.2.3" "@babel/types" "^7.3.3" - "@parcel/babel-ast-utils" "2.0.0-nightly.2056+146cffb6" - "@parcel/babylon-walk" "2.0.0-nightly.2056+146cffb6" - "@parcel/diagnostic" "2.0.0-nightly.434+146cffb6" + "@parcel/babel-ast-utils" "2.0.0-nightly.2059+a2dc60f2" + "@parcel/babylon-walk" "2.0.0-nightly.2059+a2dc60f2" + "@parcel/diagnostic" "2.0.0-nightly.437+a2dc60f2" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" nullthrows "^1.1.1" "@parcel/source-map@2.0.0-alpha.4.16": @@ -2614,10 +2614,10 @@ node-addon-api "^3.0.0" node-gyp-build "^4.2.2" -"@parcel/transformer-babel@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/transformer-babel/-/transformer-babel-2.0.0-nightly.434.tgz#9f6a998743d222444d0571865e8850cf577371c8" - integrity sha512-stlpy8s4cmRXwf1qS7tBNwGV1wcyNjirRwFN78/DTldEH6Is2cIyD7oNWjEULggwfLQCYi95Vw0dNFqPsxXdxw== +"@parcel/transformer-babel@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/transformer-babel/-/transformer-babel-2.0.0-nightly.437.tgz#f04384a4362c92228e6f5f946969813614e12e6e" + integrity sha512-nFJtdfQBsw5X27RWm98SLu/cF//FeSGvgSG+flVbHaBIqq7MDjjyPgGGyNNMLrdbYSpzicDX7sp9BK2199C+GQ== dependencies: "@babel/core" "^7.0.0" "@babel/generator" "^7.0.0" @@ -2627,85 +2627,85 @@ "@babel/preset-env" "^7.0.0" "@babel/preset-react" "^7.0.0" "@babel/traverse" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2056+146cffb6" - "@parcel/babel-preset-env" "2.0.0-nightly.434+146cffb6" - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/babel-ast-utils" "2.0.0-nightly.2059+a2dc60f2" + "@parcel/babel-preset-env" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" browserslist "^4.6.6" core-js "^3.2.1" nullthrows "^1.1.1" semver "^5.7.0" -"@parcel/transformer-coffeescript@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/transformer-coffeescript/-/transformer-coffeescript-2.0.0-nightly.434.tgz#e294131fc679f50a9ad99e547ae8f6f48930d457" - integrity sha512-uDJfJx/Q3PSZ9K5dQPi4xBM3z+1R5QCaAe9FxMbAVkoD2e2/RifalyMbvVrricz8jbGopRDFDacjW7XM3GeKgA== +"@parcel/transformer-coffeescript@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/transformer-coffeescript/-/transformer-coffeescript-2.0.0-nightly.437.tgz#1022198b96569b49a133b34b159eaa7c14c431ae" + integrity sha512-8XfTJY+wxqkLZh0KP/ihypIdp330+eFgaGSvD/jEHdEzuyCbgqbRF1AVhQaDggXfZnIZGMstLIt1u3BFj10Zjw== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" coffeescript "^2.0.3" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-css@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/transformer-css/-/transformer-css-2.0.0-nightly.434.tgz#f9610bca5f8ca1b754672159cd8d009b9d4cc5af" - integrity sha512-Te0QQ1tzs18LEODXX9rpAYpnN+3+MOmGnLSRdR3K1cHc4kdaN76jUKSiCC47UnJMm29I2DQ8aNfdnW/G6U9/tQ== +"@parcel/transformer-css@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/transformer-css/-/transformer-css-2.0.0-nightly.437.tgz#aee0e410f1b8d0f0a4405a4149332c5d4b5692ce" + integrity sha512-0B76lBlNY3A+i9ZVma5gzKOyyPf+RmUwROV7884ryn/bapWtW5W91WX2a24y9IktWQAxxK1CSlxwn7PFZUhHzw== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" postcss "^8.0.5" postcss-value-parser "^4.1.0" semver "^5.4.1" -"@parcel/transformer-glsl@2.0.0-nightly.2056+146cffb6": - version "2.0.0-nightly.2056" - resolved "https://registry.yarnpkg.com/@parcel/transformer-glsl/-/transformer-glsl-2.0.0-nightly.2056.tgz#7615de1278d9d227b942ead9342ca3989c913260" - integrity sha512-FoO/POuYmahss2NewubSXNm1WLLgAREQMAOwkpIuHCY/zxu2cGADAZFX9OS7BlZugL/CJQ4jvPN561QC6SX0yw== +"@parcel/transformer-glsl@2.0.0-nightly.2059+a2dc60f2": + version "2.0.0-nightly.2059" + resolved "https://registry.yarnpkg.com/@parcel/transformer-glsl/-/transformer-glsl-2.0.0-nightly.2059.tgz#b100a6a127e1cb71133bf4d95d9c3f6272c23c09" + integrity sha512-q4kEeOcqlbs/8oB8TIFQV0yJCw85nXcKDKLNqOvrUYKMrmWYXzoXNcZKrMhPZPCYJTf7Ic42HZ6VCiB7k7mY7Q== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" -"@parcel/transformer-graphql@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/transformer-graphql/-/transformer-graphql-2.0.0-nightly.434.tgz#83a75180fc0f1abe1df31c961290d6732128a55f" - integrity sha512-YBYp2FRfSBrQKAkh1dkonHE6InWsES0EZkSeKm3fJEITfLeka6AlHeUeWdrVNcQOeiyJOhMcR+ebhWCAlk/o1w== +"@parcel/transformer-graphql@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/transformer-graphql/-/transformer-graphql-2.0.0-nightly.437.tgz#c22c5ec99454b79bedd453db8abc08a0a73d5756" + integrity sha512-96Q2hai857mOx5PRknuZg3wL987Lpm+4RuYmJft2ONUdEuyudYdmVxthiMtVVGngFE/GGeAddU+4fbF2L+KhKA== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" -"@parcel/transformer-html@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/transformer-html/-/transformer-html-2.0.0-nightly.434.tgz#d340120036eaa0e13624949c3d721d00083be2ca" - integrity sha512-UJiTIL6lC8PtHbS77yceECunySZczto0yUE0fxwoL7pzibEbs8BC1HNTm4PgngglG8GD2zLeb/9/N3tquA5mEw== +"@parcel/transformer-html@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/transformer-html/-/transformer-html-2.0.0-nightly.437.tgz#1513f560e2555c33c65436ddc754bb45481e67f2" + integrity sha512-SQynn9L4b60nM3KDtkhiOY0oVRmvkNP65Z2B8F1LMfbybMAzT5iSoYNFlDh2tX9BuBWAxXnDSv3gvL5ZyoVSrA== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" nullthrows "^1.1.1" posthtml "^0.11.3" posthtml-parser "^0.4.1" posthtml-render "^1.1.5" semver "^5.4.1" -"@parcel/transformer-image@2.0.0-nightly.2056+146cffb6": - version "2.0.0-nightly.2056" - resolved "https://registry.yarnpkg.com/@parcel/transformer-image/-/transformer-image-2.0.0-nightly.2056.tgz#3871a636039daf8b7c4b07ce642f9922ef0611b3" - integrity sha512-e3FguqR0HbyxeLpAxaKre2mNVhdoRDLCVEg05nNpaztROKzbqV6ASEj7S87FWgvm1FwJfAv70XMLRNRQOzFJZQ== +"@parcel/transformer-image@2.0.0-nightly.2059+a2dc60f2": + version "2.0.0-nightly.2059" + resolved "https://registry.yarnpkg.com/@parcel/transformer-image/-/transformer-image-2.0.0-nightly.2059.tgz#eb756fef1bb9177ff210341131641e815ed4f8b3" + integrity sha512-8063BdGcHElpnY1Ptcvc7sGlSXCod1aeTPw4ms/Mpk4Ccv4kBwLuNbIZyJX+hU3hw0W9o++C46m19kze3K8MZQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" -"@parcel/transformer-inline-string@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.0.0-nightly.434.tgz#69d29c6e53f8e49a8dade7f63f44777c9d0fb0f4" - integrity sha512-wD92e82sbAqKDis0iGR/QjgEgCQDSt8DrBqLoEdeQO3i63uNt3k5OBoBBz37C3D3GI0gPxBmIxBAloj7XGnVlw== +"@parcel/transformer-inline-string@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.0.0-nightly.437.tgz#55555533876f7dcc1df7ed657e1ba3a42718600e" + integrity sha512-PhU5x0OxMJnQl2TivtyskjFaJXKlFGfSJ4SclMAFIQO3G0HLtDfjSDvdQgVuMe5PN4uzyecTiKR9X5GZOI2e4Q== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" -"@parcel/transformer-js@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.0.0-nightly.434.tgz#5d600e49719ba9c65f34f9b9eb87352dafadb751" - integrity sha512-2qFWzhQmJUrSk+5WS1M5osSIe8umN503foLeS/tWYopAM+SJzRJewqRpDRUgP4L3JtAvWRRLy7eOcb+VkiY38w== +"@parcel/transformer-js@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.0.0-nightly.437.tgz#5b605a19dd19c826a5d0885f5b54d159771e1d1d" + integrity sha512-t+/bLrqdVkoQ3VopkDnRcMxPs4v3tFz3Q4/5S6dbF9JG9v62fadK5fLcoRxJGn1qx2sElQycSJMwlzCXhWv8AA== dependencies: "@babel/core" "^7.0.0" "@babel/generator" "^7.0.0" @@ -2714,193 +2714,193 @@ "@babel/template" "^7.4.0" "@babel/traverse" "^7.0.0" "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2056+146cffb6" - "@parcel/babylon-walk" "2.0.0-nightly.2056+146cffb6" - "@parcel/diagnostic" "2.0.0-nightly.434+146cffb6" - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" - "@parcel/scope-hoisting" "2.0.0-nightly.434+146cffb6" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/babel-ast-utils" "2.0.0-nightly.2059+a2dc60f2" + "@parcel/babylon-walk" "2.0.0-nightly.2059+a2dc60f2" + "@parcel/diagnostic" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/scope-hoisting" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" micromatch "^4.0.2" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-json@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/transformer-json/-/transformer-json-2.0.0-nightly.434.tgz#b432b6f43c07f9e869ebe3f836f35ba0d38ef826" - integrity sha512-CeaFtEEyTNC1c8JObEBIo2EI6PBxGhjV6XUGuXOAbNXrBsFdyRq8+M5kp0z1CZXQxuKuB8qpd+5YEE7te9m+KQ== +"@parcel/transformer-json@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/transformer-json/-/transformer-json-2.0.0-nightly.437.tgz#0ff0f3cb9e36edb24d0fa68b254fc1d6add4fa8b" + integrity sha512-dvruurCigqgbVvsOuV0PIYi8MsR4ni+z2VYgMaO7HcLpImQ8fDAFhUzYpKVJVHLPaMs6rjPed6MeQWavkzArBg== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" json5 "^2.1.0" -"@parcel/transformer-jsonld@2.0.0-nightly.2056+146cffb6": - version "2.0.0-nightly.2056" - resolved "https://registry.yarnpkg.com/@parcel/transformer-jsonld/-/transformer-jsonld-2.0.0-nightly.2056.tgz#103a7d2d1f8bd9fac1fa448dbda21ba84bbc1d12" - integrity sha512-DpiJtFfKXHtOxdP6Gdq7vAzHxssFb9Hq9bNqqxtDCtiKgHGNtpl9Zr34n16efG0T/uYqqiU3cfOWFmnm+AjZUg== +"@parcel/transformer-jsonld@2.0.0-nightly.2059+a2dc60f2": + version "2.0.0-nightly.2059" + resolved "https://registry.yarnpkg.com/@parcel/transformer-jsonld/-/transformer-jsonld-2.0.0-nightly.2059.tgz#eac61cfd4189c2be67f8d120c9450eb03aafeadc" + integrity sha512-NCcbzj5It8rIAvFU3Sfg+gwL0pKuRXX4ShDz8EMriHIEVrZpsa56eNV2Tda+NzGYQQf5UwUnvtuNRaoG//JhCA== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" - "@parcel/types" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/types" "2.0.0-nightly.437+a2dc60f2" json5 "^2.1.2" -"@parcel/transformer-less@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/transformer-less/-/transformer-less-2.0.0-nightly.434.tgz#3320a4c295996fdafaa8e9bd468e22e1534b14f1" - integrity sha512-56D81BeWFMi5hsR8qoP1dzqmX2pU0rII1EIOjzeRn06yu0ScOdQkFlNvkN6b/u+KKzM/JSosbEJyKMZToTfpeA== +"@parcel/transformer-less@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/transformer-less/-/transformer-less-2.0.0-nightly.437.tgz#ba31e6a40dc901fa1cddc5edc22b64072d667be1" + integrity sha512-M98uJ8B48VTTYfTDtfrFLC6xDHvnA1OloVCLunV552e/xwmedOkTtztn06KX1oc7BEAGSW1h6IOjoDw0Q+mnoA== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" "@parcel/source-map" "2.0.0-alpha.4.16" -"@parcel/transformer-mdx@2.0.0-nightly.2056+146cffb6": - version "2.0.0-nightly.2056" - resolved "https://registry.yarnpkg.com/@parcel/transformer-mdx/-/transformer-mdx-2.0.0-nightly.2056.tgz#321492eeb92410c3102710e6810ba62b672ecf7e" - integrity sha512-ypivteof3yhLH5aqEUFF5vF+g9a8VomLd7WFEhir0YPAUJmgyhWouT6pwaNsqJz94X1LDfVAD91LM76LXn4mjg== +"@parcel/transformer-mdx@2.0.0-nightly.2059+a2dc60f2": + version "2.0.0-nightly.2059" + resolved "https://registry.yarnpkg.com/@parcel/transformer-mdx/-/transformer-mdx-2.0.0-nightly.2059.tgz#df4b3d3ab32f64431182cb47610591087a0f1ce6" + integrity sha512-2PUY3qNAMMCr4DveW0KMIbmSlohNt9OlLMngYJ8BfiYjwBuFeQYbxjXvpyMmmDND9OSSMB6OBxPySxbvnffNmQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" -"@parcel/transformer-postcss@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/transformer-postcss/-/transformer-postcss-2.0.0-nightly.434.tgz#740915497ba6d64eec75f906591ece20beceb118" - integrity sha512-1qGookpv/S0gT3f7RzgwHmvIGxExMoeKqR3kKVx6dD2mp/OnFd6q/apJqLdDSn8zmBUJh19W8Vxo0TIhTsCTeA== +"@parcel/transformer-postcss@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/transformer-postcss/-/transformer-postcss-2.0.0-nightly.437.tgz#92aca266bf45af546fdf786c6820485eac8b1c0a" + integrity sha512-EsAyjpeBskPdSWZ7pxQmf3PJHLNO+ryFJk7RRy2rMrjfVds7pb7t6tqSy7M8ArptS8L763Si/+EqYhDzlyVrQQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" css-modules-loader-core "^1.1.0" nullthrows "^1.1.1" postcss-value-parser "^4.1.0" semver "^5.4.1" -"@parcel/transformer-posthtml@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/transformer-posthtml/-/transformer-posthtml-2.0.0-nightly.434.tgz#d0e9c37beae66ca520c1c84724b164cb973f58b6" - integrity sha512-+/QBFXKsSil5CAU2+IW1mCEvxrUib370BYxj61z2OvLl+vIERHp9NM1/wiVQgn4vlqL/u7ikycBzGdgtqHsCww== +"@parcel/transformer-posthtml@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/transformer-posthtml/-/transformer-posthtml-2.0.0-nightly.437.tgz#404423552f3aeacde9abe70344df5dc260a6e93c" + integrity sha512-iY2+2GUd38kvpSMLR9yE0vKuvKnvw1WUFQmuHAOMSJqfu4GovT54KPjqSGpVme4XwfcBCt/wAQv2oQiqOig/oQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" nullthrows "^1.1.1" posthtml "^0.11.3" posthtml-parser "^0.4.1" posthtml-render "^1.1.5" semver "^5.4.1" -"@parcel/transformer-pug@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/transformer-pug/-/transformer-pug-2.0.0-nightly.434.tgz#b425f2f9961fa4bfa7c43e6fc02ef51709e55774" - integrity sha512-nhvItcQCOZaK1Bd70/SfRpPbTCYdxdjcaGJN5xvCmI1datH36mbeQCyVNmf05BRYCD6UTJ+MVrrESUsYjnhQhg== +"@parcel/transformer-pug@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/transformer-pug/-/transformer-pug-2.0.0-nightly.437.tgz#86982b30ad6d3553ab48382de8ecd1f3e944c4b8" + integrity sha512-PzqxXjsB33SVhd/xd8V4BREwWbpVh6tutmYKVRY+/ZNqyjxoMnjWWP+5UuDNOzXbaOBZ1LFq9h2paWY4IdiVFQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" -"@parcel/transformer-raw@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/transformer-raw/-/transformer-raw-2.0.0-nightly.434.tgz#0fbcc96fc722fa35b61ac1765b681de0ea009fca" - integrity sha512-F9KIct14mo89ehEPRo9oa+U+LHxVn9aXvjUbDnIGArj0O+mI6NcSKfhnGDfH0tTdh/i1jMtkT1tilW6PK3Yejw== +"@parcel/transformer-raw@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/transformer-raw/-/transformer-raw-2.0.0-nightly.437.tgz#9c2470b6f542ea04a8b30bf588fb9a4d3bd5da4a" + integrity sha512-FjTep7wZ6bemo2jK+rtlKn/0P+Yc5UJfA7d98Aq1AJUmkLyIVOvlcI8pUyXE7Q8z0ZQL0Jmg0dmdF37hdRObKg== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" -"@parcel/transformer-react-refresh-babel@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-babel/-/transformer-react-refresh-babel-2.0.0-nightly.434.tgz#44aa1adf7a4516d88379012cca4f2c95ddfc2ed2" - integrity sha512-PCDMQsCTapoiM3W4FE8C6x/g4DA8nW8cs6UGAmKZZGQ0QqjqxnfvQoJ73uGSpgkRKmyuuxPU483fwA8xMDGqcQ== +"@parcel/transformer-react-refresh-babel@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-babel/-/transformer-react-refresh-babel-2.0.0-nightly.437.tgz#2ff670e307c982520a471ea88a6cd90c96dc6553" + integrity sha512-SYBl3eSlj2rqLj13DP5OtkKPPCJSf5fJwsmU2mn+0IiO7BIlqvFt9qNR5MULkqyUYdVH0kqQqqB3rsxjYXDRzQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" react-refresh "^0.6.0" -"@parcel/transformer-react-refresh-wrap@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.0.0-nightly.434.tgz#95f1feb950a4c079f05286b355e5ead66abb6438" - integrity sha512-hWEfYqpv0PH8a78i2UoFCir7icPufm5xSiL9R7YegLTh2WMjiYWl890ao2dfPoCYCdRp1rhYEjXEwVPvEerYDQ== +"@parcel/transformer-react-refresh-wrap@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.0.0-nightly.437.tgz#699a7de06f4add805b72edd641d74eda2497f42d" + integrity sha512-fJcWxeLkcdnuiRXp0Q2rMsWNX6RXhdn2HtLAAdHV3O5KsIUBhhvAq2v1RSPCI+jZ/6T3JhPxjY8syGH1y2o6RQ== dependencies: "@babel/generator" "^7.0.0" "@babel/parser" "^7.0.0" "@babel/template" "^7.4.0" "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2056+146cffb6" - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/babel-ast-utils" "2.0.0-nightly.2059+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" react-refresh "^0.6.0" semver "^5.4.1" -"@parcel/transformer-sass@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sass/-/transformer-sass-2.0.0-nightly.434.tgz#62a11f9bb78651034a59e7fab4b8dd2d253eccdf" - integrity sha512-6T+HuwYXHt+06ms2fdWAMvlG/a3k30vZ8njiRn542BhNaeCaQ8hSS3BzQG1TPhvqLCAosIZi9YqETBAsriVhug== +"@parcel/transformer-sass@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/transformer-sass/-/transformer-sass-2.0.0-nightly.437.tgz#24b2975d325da79d98d439d7bb3737ad50e41e37" + integrity sha512-S92pgGg08B5BOGh0+n4S7l/Oib5ckvyqAM5371NWg10uw6lXdyLc88CChKoobKeQRRY8wQA1SJtg9f2fja75zQ== dependencies: - "@parcel/fs" "2.0.0-nightly.434+146cffb6" - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" + "@parcel/fs" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" -"@parcel/transformer-stylus@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/transformer-stylus/-/transformer-stylus-2.0.0-nightly.434.tgz#a1584bb84b652b22e4afefece38ca195d799dec3" - integrity sha512-06brKPO894GOs/8k5UxXayIhg2xYG6l/4WKArnCehN2If0ZLpgLlRMPxOEFdW4RROmFwnX3ye7EvLwTEKFROAg== +"@parcel/transformer-stylus@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/transformer-stylus/-/transformer-stylus-2.0.0-nightly.437.tgz#c37381ea6f48f3f74f591f214cbb2bb5060d7675" + integrity sha512-ExTBezhNPcMQIEU+T8RIfy6EG36H5acgiW6ufFwXngNzBrFD0BTKyt5l10+Jxz1eTX5V/0Z1pGXd1n8olho45w== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" -"@parcel/transformer-sugarss@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sugarss/-/transformer-sugarss-2.0.0-nightly.434.tgz#6ca9fc6b7997b06082f09df6a627967265d3ab4d" - integrity sha512-poGDU4z5LwSmqnI05SILlamj+x2qGqd05WKNaxKyOH9TaGhAN4qZ8yjCfnCocEf+Kiw5dWfIUubVqHgs1tVBzg== +"@parcel/transformer-sugarss@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/transformer-sugarss/-/transformer-sugarss-2.0.0-nightly.437.tgz#388e092e45caf9b44c6bab8aa92278678fe252d6" + integrity sha512-JuItzQLvvTzH6eYQ0RvqNPwNcswRsiE1XY5j/mbTIg2pjK74fxsRH/CKr8p1RioxNDLVJInBP36NiE8fq7+WAQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" postcss "^8.0.5" -"@parcel/transformer-toml@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/transformer-toml/-/transformer-toml-2.0.0-nightly.434.tgz#7cf42bd6fc483dca0db9de313ec98ffc3fb50268" - integrity sha512-XviVqL6ldpzZhwJJgsWi54BMVxA8uPgQPNaMUW+8vv0wYpSsqN4ulJxh2n8jTPheLQiqmENpRO+CFWKd44piMw== +"@parcel/transformer-toml@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/transformer-toml/-/transformer-toml-2.0.0-nightly.437.tgz#aae299f921c33f2fba0484bf5bbb16892ea8d4ab" + integrity sha512-sykFL+j+AhCxAn6nui4hAHS4ogiNUj9RPQh1VusOYBTTd4VfWmyBf68LQljj/9Nk+9CTb3q/1sh+YrnPydwcDg== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" -"@parcel/transformer-typescript-types@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.0.0-nightly.434.tgz#350d086de67943c87327de68b05396c43c830743" - integrity sha512-hMtIFXFWkbtW5Vo+bMu/zlbtw9gN+op+RoSLbvcGxI4HtGNZf/KPeGWoPVKqCepoAuWBn8xgWTf65ojmXvDyfA== +"@parcel/transformer-typescript-types@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.0.0-nightly.437.tgz#e73f762b6970a10af1eba755abbdcfe9385d9360" + integrity sha512-/CxXOvd7SVWxrVw4FxeP4SnvwNV6G6FnIKE58I9Ck6t+/CSn5vJa0A1ehDxMD6TyQ6VH4b5xK/RWM1uQXmivsA== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/ts-utils" "2.0.0-nightly.434+146cffb6" + "@parcel/ts-utils" "2.0.0-nightly.437+a2dc60f2" nullthrows "^1.1.1" -"@parcel/transformer-vue@2.0.0-nightly.2056+146cffb6": - version "2.0.0-nightly.2056" - resolved "https://registry.yarnpkg.com/@parcel/transformer-vue/-/transformer-vue-2.0.0-nightly.2056.tgz#ffdcaea0b9b891dc42c1e03469e2805c6fdec491" - integrity sha512-EJhqBDLQ7qbq5Tq6JEr4YnRPI4ngK06L5b1jEVBaBv/OCk5O7kdyoItPzzgkAyE5Bwucj8p7ZeGScVD2vNZQpA== +"@parcel/transformer-vue@2.0.0-nightly.2059+a2dc60f2": + version "2.0.0-nightly.2059" + resolved "https://registry.yarnpkg.com/@parcel/transformer-vue/-/transformer-vue-2.0.0-nightly.2059.tgz#f9484090d242fd021fd5add95b1d959ca2548f1e" + integrity sha512-5qLbBhGmof1faHueJqvzaViUQiKdQCWO5c2+pLDRu2S10JvQzE2TB9PlBoajThainsOTLjiX7gdludH6PIRbXw== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.434+146cffb6" - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" + "@parcel/diagnostic" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-yaml@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/transformer-yaml/-/transformer-yaml-2.0.0-nightly.434.tgz#e379a0f854f13a5bf2427a01a4f7606696d1c010" - integrity sha512-QdYl7vH7KRYr94kf500IQjybkjYfQldUN9HviZZmJ+ABH5C8mlPVC3LU/XuJQ0W+BOBVbP3aoqsRPAmKb2D1Zg== +"@parcel/transformer-yaml@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/transformer-yaml/-/transformer-yaml-2.0.0-nightly.437.tgz#ecccebcf84c920d732bb655922c459c32cf59f70" + integrity sha512-uLoEY2PqKySXs/HTED1zh/VmQLUhYY51i4n9ZmMc1M7Ix+6CAsXhX2GvucfDz3P1PrhGdPBEQs/oY2iW1ROJmA== dependencies: - "@parcel/plugin" "2.0.0-nightly.434+146cffb6" + "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" -"@parcel/ts-utils@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/ts-utils/-/ts-utils-2.0.0-nightly.434.tgz#69a5766e40cdff353e9d2791c36fcaaa3e16123b" - integrity sha512-uYrLacAUQLb2nmEQ31iJ+VvoruVtgI4C+f+prhRyKwiq4/VIncGrWA1Z6t/tcSh8VsDYBA1GvTLQAijl4CGyIQ== +"@parcel/ts-utils@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/ts-utils/-/ts-utils-2.0.0-nightly.437.tgz#c4ee3cc16eabccc938f570b3ac0099cb88a733b7" + integrity sha512-ube0mSDkSOP/O/pjnuoTbGgatlJrxrg0sF+bdrUEzeAEYDREOTp+M0QfSfgCx2fICMDSLohK+YzTWV3djz4GVg== dependencies: nullthrows "^1.1.1" -"@parcel/types@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/types/-/types-2.0.0-nightly.434.tgz#34ea8af62584bfb42b1154a340acd00f704bb124" - integrity sha512-jRZEjGRsjHw2NhnZUtD1feo55076JQ09y64Fl8pWUWc+P3VK3sqX07nSy4LEbRJtApU7hxHL1ccnl+P56CsJsw== +"@parcel/types@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/types/-/types-2.0.0-nightly.437.tgz#270de41b9db67099d4e2339f6ebb4adf40595fae" + integrity sha512-Cq9CGZSEkadJt+xQSv8znCFnhwBsms4OaaqvhIp5H9OfYQGNAtocczG0YQRQKewXmkwHHlTO7qOjHIt0xfsVwQ== -"@parcel/utils@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-2.0.0-nightly.434.tgz#efe2dbe9345a81cbe364f695abc26239ed187de2" - integrity sha512-0lSVXshLl3tXD4YpSaNwvXnBOiRWpDTD0buOBY7qG38zzTpQCSgN+/kGM9T7wrXRtzjxfFOy35tvYTHDtsePnw== +"@parcel/utils@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-2.0.0-nightly.437.tgz#4905a6b912cb10e6b0ab2565c272e96a76cd7469" + integrity sha512-0wzYGxj/90m3zHEGd5szGLyHiTKI13ccI8jH1kvArWJvqlssgy+ajfQiaHQIrJ7YR/OgxFKdxYuaPRe6s4gcpA== dependencies: "@iarna/toml" "^2.2.0" - "@parcel/codeframe" "2.0.0-nightly.434+146cffb6" - "@parcel/diagnostic" "2.0.0-nightly.434+146cffb6" - "@parcel/logger" "2.0.0-nightly.434+146cffb6" - "@parcel/markdown-ansi" "2.0.0-nightly.434+146cffb6" + "@parcel/codeframe" "2.0.0-nightly.437+a2dc60f2" + "@parcel/diagnostic" "2.0.0-nightly.437+a2dc60f2" + "@parcel/logger" "2.0.0-nightly.437+a2dc60f2" + "@parcel/markdown-ansi" "2.0.0-nightly.437+a2dc60f2" "@parcel/source-map" "2.0.0-alpha.4.16" ansi-html "^0.0.7" chalk "^2.4.2" @@ -2925,14 +2925,14 @@ node-addon-api "^3.0.0" node-gyp-build "^4.2.1" -"@parcel/workers@2.0.0-nightly.434+146cffb6": - version "2.0.0-nightly.434" - resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-2.0.0-nightly.434.tgz#a314590bd4e54afc62e863c6d570c9d681b36d94" - integrity sha512-9kwyj18idFgbMTzt2e4nNYf6SY7+R9OEE1yY4kjj97unl3oxMEOMZ1CN+RHMbmWKwVjmqTp0x2Etep1+u8z5zA== +"@parcel/workers@2.0.0-nightly.437+a2dc60f2": + version "2.0.0-nightly.437" + resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-2.0.0-nightly.437.tgz#4c5d096d9102cbbd9b5b379edc5e3ee35f8bc275" + integrity sha512-bcJMAkiD4PthVbbuY59zmdQo48GI6bFBdJLUcrsp4DCoxrhHwcFx7tcljXRIGzZCRoUa4tqqdSZn6GmF43qnMg== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.434+146cffb6" - "@parcel/logger" "2.0.0-nightly.434+146cffb6" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" + "@parcel/diagnostic" "2.0.0-nightly.437+a2dc60f2" + "@parcel/logger" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" chrome-trace-event "^1.0.2" nullthrows "^1.1.1" @@ -10372,19 +10372,19 @@ parallel-transform@^1.1.0: inherits "^2.0.3" readable-stream "^2.1.5" -parcel@2.0.0-nightly.432: - version "2.0.0-nightly.432" - resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.0.0-nightly.432.tgz#97df939b3808bd96000150892be0004b237d13ee" - integrity sha512-N0PAnhXgtBVC3cJZxqD33yw3T5Njdb6+nqzZ7SXaVfgrxmhBw1JjOHeCqovkNEwUypMDISN/+5DAnTDuvaviCA== - dependencies: - "@parcel/config-default" "2.0.0-nightly.434+146cffb6" - "@parcel/core" "2.0.0-nightly.432+146cffb6" - "@parcel/diagnostic" "2.0.0-nightly.434+146cffb6" - "@parcel/events" "2.0.0-nightly.434+146cffb6" - "@parcel/fs" "2.0.0-nightly.434+146cffb6" - "@parcel/logger" "2.0.0-nightly.434+146cffb6" - "@parcel/package-manager" "2.0.0-nightly.434+146cffb6" - "@parcel/utils" "2.0.0-nightly.434+146cffb6" +parcel@2.0.0-nightly.435: + version "2.0.0-nightly.435" + resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.0.0-nightly.435.tgz#a77df8a3c7663ba08c7861d8152da3b107740c2c" + integrity sha512-9p4bRUw14F0zHvAE8hNRPOsbu4SJIvzScQiV979TsZ83u7C1BBNkhgJV9M52h9Z/KxN2EDPfVj1anS1rQVxxWQ== + dependencies: + "@parcel/config-default" "2.0.0-nightly.437+a2dc60f2" + "@parcel/core" "2.0.0-nightly.435+a2dc60f2" + "@parcel/diagnostic" "2.0.0-nightly.437+a2dc60f2" + "@parcel/events" "2.0.0-nightly.437+a2dc60f2" + "@parcel/fs" "2.0.0-nightly.437+a2dc60f2" + "@parcel/logger" "2.0.0-nightly.437+a2dc60f2" + "@parcel/package-manager" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" chalk "^2.1.0" commander "^2.19.0" get-port "^4.2.0" From d15e9d05bd508bec1617090ebd28c9e624a787fe Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 30 Oct 2020 22:01:12 +0000 Subject: [PATCH 016/314] chore(deps): bump aws-sdk from 2.781.0 to 2.783.0 (#11226) Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.781.0 to 2.783.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.781.0...v2.783.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- .../@aws-cdk/aws-cloudfront-origins/package.json | 2 +- packages/@aws-cdk/aws-cloudfront/package.json | 2 +- packages/@aws-cdk/aws-cloudtrail/package.json | 2 +- packages/@aws-cdk/aws-codebuild/package.json | 2 +- packages/@aws-cdk/aws-codecommit/package.json | 2 +- packages/@aws-cdk/aws-dynamodb/package.json | 2 +- packages/@aws-cdk/aws-eks/package.json | 2 +- packages/@aws-cdk/aws-events-targets/package.json | 2 +- packages/@aws-cdk/aws-logs/package.json | 2 +- packages/@aws-cdk/aws-route53/package.json | 2 +- packages/@aws-cdk/aws-sqs/package.json | 2 +- packages/@aws-cdk/custom-resources/package.json | 2 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- yarn.lock | 15 +++++---------- 15 files changed, 19 insertions(+), 24 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudfront-origins/package.json b/packages/@aws-cdk/aws-cloudfront-origins/package.json index 11b4fe7c62c40..20a2e540b5074 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/package.json +++ b/packages/@aws-cdk/aws-cloudfront-origins/package.json @@ -72,7 +72,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", - "aws-sdk": "^2.781.0", + "aws-sdk": "^2.783.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "pkglint": "0.0.0" diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index 5094429042dbd..d1883b8e01538 100644 --- a/packages/@aws-cdk/aws-cloudfront/package.json +++ b/packages/@aws-cdk/aws-cloudfront/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.781.0", + "aws-sdk": "^2.783.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index fd4627f69bf53..4fcc0dbc2bfab 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.781.0", + "aws-sdk": "^2.783.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codebuild/package.json b/packages/@aws-cdk/aws-codebuild/package.json index 6ce66c00f98b9..0db105dfcb6f6 100644 --- a/packages/@aws-cdk/aws-codebuild/package.json +++ b/packages/@aws-cdk/aws-codebuild/package.json @@ -79,7 +79,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.781.0", + "aws-sdk": "^2.783.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codecommit/package.json b/packages/@aws-cdk/aws-codecommit/package.json index 475decd1ad916..8d0fc5b603e8d 100644 --- a/packages/@aws-cdk/aws-codecommit/package.json +++ b/packages/@aws-cdk/aws-codecommit/package.json @@ -79,7 +79,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.781.0", + "aws-sdk": "^2.783.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index a634e0435fd3e..5628ff5fdac9a 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -74,7 +74,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/jest": "^26.0.15", - "aws-sdk": "^2.781.0", + "aws-sdk": "^2.783.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index 428c5681a732a..f474b1923ae94 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", "@types/yaml": "1.9.6", - "aws-sdk": "^2.781.0", + "aws-sdk": "^2.783.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index f8bc74d7a47f1..1cc1e2b88e5f0 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -75,7 +75,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-codecommit": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", - "aws-sdk": "^2.781.0", + "aws-sdk": "^2.783.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index d529831126b85..79ab5fb0ff301 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.781.0", + "aws-sdk": "^2.783.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-route53/package.json b/packages/@aws-cdk/aws-route53/package.json index ea055e83cb8d0..78eae80f17fca 100644 --- a/packages/@aws-cdk/aws-route53/package.json +++ b/packages/@aws-cdk/aws-route53/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.781.0", + "aws-sdk": "^2.783.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-sqs/package.json b/packages/@aws-cdk/aws-sqs/package.json index da13a61049b03..f6a4945436561 100644 --- a/packages/@aws-cdk/aws-sqs/package.json +++ b/packages/@aws-cdk/aws-sqs/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.781.0", + "aws-sdk": "^2.783.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index 8472edf850213..e2e108a42a04f 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -79,7 +79,7 @@ "@types/aws-lambda": "^8.10.64", "@types/fs-extra": "^8.1.1", "@types/sinon": "^9.0.8", - "aws-sdk": "^2.781.0", + "aws-sdk": "^2.783.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 646210c061b42..4023ba9646d0b 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -71,7 +71,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.781.0", + "aws-sdk": "^2.783.0", "camelcase": "^6.2.0", "cdk-assets": "0.0.0", "colors": "^1.4.0", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index b570b0bf71728..25edd52c7943d 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -47,7 +47,7 @@ "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.781.0", + "aws-sdk": "^2.783.0", "glob": "^7.1.6", "yargs": "^16.1.0" }, diff --git a/yarn.lock b/yarn.lock index 9e6bda2db3ddd..c20e63d92844a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3830,10 +3830,10 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" -aws-sdk@^2.637.0, aws-sdk@^2.781.0: - version "2.781.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.781.0.tgz#e9df63e9b69c22ac939ab675c8771592ae89105a" - integrity sha512-y+Xd+DJJyNgZdPLZytJA8LRR79spD/zXOt0G9Uk68UC9tRDEB8aQysuxWKYEybYCexRqJtTZLCrR3ikYwU099g== +aws-sdk@^2.637.0, aws-sdk@^2.783.0: + version "2.783.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.783.0.tgz#f6a2fb2d1af2e7c5a6ec2959436499ff5b6c705b" + integrity sha512-u3/ZvY/ag1hEkPpgBJxypWRGf8930prIDOWk221pgH0WhlRA9qp3IE8D0j/BKFei0giqlxbN/AB05RITp/XlwQ== dependencies: buffer "4.9.2" events "1.1.1" @@ -13502,12 +13502,7 @@ uuid@^3.0.1, uuid@^3.3.2, uuid@^3.3.3: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -uuid@^8.3.0: - version "8.3.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.0.tgz#ab738085ca22dc9a8c92725e459b1d507df5d6ea" - integrity sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ== - -uuid@^8.3.1: +uuid@^8.3.0, uuid@^8.3.1: version "8.3.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.1.tgz#2ba2e6ca000da60fce5a196954ab241131e05a31" integrity sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg== From 55e6130503d2e7346eec81d01ef37098708d0196 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 31 Oct 2020 02:18:20 +0000 Subject: [PATCH 017/314] chore(deps-dev): bump parcel from 2.0.0-nightly.435 to 2.0.0-nightly.438 (#11231) Bumps [parcel](https://github.com/parcel-bundler/parcel) from 2.0.0-nightly.435 to 2.0.0-nightly.438. - [Release notes](https://github.com/parcel-bundler/parcel/releases) - [Changelog](https://github.com/parcel-bundler/parcel/blob/v2/CHANGELOG.md) - [Commits](https://github.com/parcel-bundler/parcel/commits) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- .../@aws-cdk/aws-lambda-nodejs/package.json | 2 +- yarn.lock | 920 +++++++++--------- 2 files changed, 461 insertions(+), 461 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda-nodejs/package.json b/packages/@aws-cdk/aws-lambda-nodejs/package.json index d22b016411365..7b03475c7d8f3 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/package.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/package.json @@ -67,7 +67,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "delay": "4.4.0", - "parcel": "2.0.0-nightly.435", + "parcel": "2.0.0-nightly.438", "pkglint": "0.0.0" }, "dependencies": { diff --git a/yarn.lock b/yarn.lock index c20e63d92844a..6d1ff3772530f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2152,128 +2152,128 @@ dependencies: "@types/node" ">= 8" -"@parcel/babel-ast-utils@2.0.0-nightly.2059+a2dc60f2": - version "2.0.0-nightly.2059" - resolved "https://registry.yarnpkg.com/@parcel/babel-ast-utils/-/babel-ast-utils-2.0.0-nightly.2059.tgz#2726e28f00695471c44b1daa79aff9e479b6184f" - integrity sha512-ype+8xLFvWteWkMvPRrBrSs/Cmt0k0pVUVfQ8KYZEG9nDtrFnqkO8TDcWTEQep5kReEjrcc2PiUp4GV1v28ztw== +"@parcel/babel-ast-utils@2.0.0-nightly.2062+a5e23487": + version "2.0.0-nightly.2062" + resolved "https://registry.yarnpkg.com/@parcel/babel-ast-utils/-/babel-ast-utils-2.0.0-nightly.2062.tgz#dd01b86d3cd56d93c4c27f3eb92dd5f6fdbfcdba" + integrity sha512-cKCzKl0wXEdhPyGxBqrUtNulmCLi1b6aMth6L2Lg1KcdcnN/zdpXB405KTKYWUuMULLZOjatarhEV/WMGYCEjg== dependencies: "@babel/generator" "^7.0.0" "@babel/parser" "^7.0.0" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" -"@parcel/babel-preset-env@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/babel-preset-env/-/babel-preset-env-2.0.0-nightly.437.tgz#046ebd15d1751fa7ad9e4aaf4e2c3897e53325d5" - integrity sha512-HK1EiJxFI6xJNmH0Wdm+sHwqBnwUcEaNqH0MZtfWzkYMl9nHBkP41sdJ1BbMaJN/SfR6Ldk54LtVxGqbs3MbyA== +"@parcel/babel-preset-env@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/babel-preset-env/-/babel-preset-env-2.0.0-nightly.440.tgz#947d0f579717f1caf0bcc20bd612fbe3aacc4e35" + integrity sha512-ovsArQ7jdsDDD6Q8cT0RqgZ9iNIShStzNUTy/cR9C5MoA2EeMqhmguTFbKNujNPXhrsyJ0M86EEijWA+MLKNlw== dependencies: "@babel/preset-env" "^7.4.0" semver "^5.4.1" -"@parcel/babylon-walk@2.0.0-nightly.2059+a2dc60f2": - version "2.0.0-nightly.2059" - resolved "https://registry.yarnpkg.com/@parcel/babylon-walk/-/babylon-walk-2.0.0-nightly.2059.tgz#ee63be4c6bb7970dce9ef0362a6ea9009fece958" - integrity sha512-WVynv571iFBV7SoBAd+rodYVgf5k8Io2un3isyBLf3+RLz4NZ6dWof5pyNvvdW4Fag3UHDVY4CbIvL6GXPNrOg== +"@parcel/babylon-walk@2.0.0-nightly.2062+a5e23487": + version "2.0.0-nightly.2062" + resolved "https://registry.yarnpkg.com/@parcel/babylon-walk/-/babylon-walk-2.0.0-nightly.2062.tgz#a55418911851c7c4015622b579c4ca01ef921630" + integrity sha512-7BEK1BPSGnHcudrghUZBK9tM//Zu9Bs7n5OijYX2gTQ9re/qy7NLu4NIV03eJx6cvxg7k/nE/ZpV2lrzFgkcDg== dependencies: "@babel/types" "^7.0.0" lodash.clone "^4.5.0" -"@parcel/bundler-default@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.0.0-nightly.437.tgz#65cdeb8428476c649e3b0a3cf4e79c6741951a6e" - integrity sha512-WVTHF9aIcOPiK3qc9WVGFr5ac4DwvxGV+Oh5Nz1kfl9zBG6ugf/XD0l+l+RBO9AwIeyXD2JxbKgh9axItys25w== +"@parcel/bundler-default@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.0.0-nightly.440.tgz#38edbaa9ecf4992e19ab8c151c6d54b29157a287" + integrity sha512-6dMnmGDSHKM6cTWNq56txQkgbLRgQLctd8KrrWnSbnfKeMKQIAdJQVhg4Y5ku680NGZlxd+8/kpXS21SYG0sHQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.437+a2dc60f2" - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/diagnostic" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" nullthrows "^1.1.1" -"@parcel/cache@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/cache/-/cache-2.0.0-nightly.437.tgz#539a455c16da5d353fa71c4b7f76ca84c4d76f89" - integrity sha512-zz2wuXNbLzV0K3I0T8Drx0+3oUUySyQAr4Z8jeYfCO6cxhfZgFTOhVXUR6Fzg9kr/VHY5xGJ2ixHBtMUDTYvKg== +"@parcel/cache@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/cache/-/cache-2.0.0-nightly.440.tgz#283088d2c74b59f7bd2dc4f317abc3dff477a798" + integrity sha512-NCQqYw9fkevvnSkV0u4EpwqswkMRqikNvMr7R/6qxuB39anVyOaygaQ1CTeAPzCs+LoExdMl4g+Q83uAMRSwbw== dependencies: - "@parcel/logger" "2.0.0-nightly.437+a2dc60f2" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/logger" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" -"@parcel/codeframe@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/codeframe/-/codeframe-2.0.0-nightly.437.tgz#f7b709abf484767954545f7a78eb1bff3510d242" - integrity sha512-y1WFlGGDgoVEYdz0Ew5thPhN2r7HdR1hRVjWSpINvBrJp8zDVA6bBdY7Obk1lxpk0R0OxaFGbgUtdddaSQ4T/g== +"@parcel/codeframe@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/codeframe/-/codeframe-2.0.0-nightly.440.tgz#ee426a7d61c43040b0c1c814a0094c0020983482" + integrity sha512-WDnyEu+10SPCK9XM19LzNL1L5vVVMak0m3088yddzc+bOdR75Pezg3bXsNdEVh2Xd8Xbz+LpWWrB9eGc/hbRdA== dependencies: chalk "^2.4.2" emphasize "^2.1.0" slice-ansi "^4.0.0" string-width "^4.2.0" -"@parcel/config-default@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/config-default/-/config-default-2.0.0-nightly.437.tgz#46d8e3315d71d11db6ad0b9a32b55c55b66d9474" - integrity sha512-tUyOsZ5GzVW/9YbNfa0hrNZa+LWpt+YWrXOTQBk/evrt19ywZYzYMSKE1OWbOhpi9G9r2T4uBHlcQndVCxlkwQ== - dependencies: - "@parcel/bundler-default" "2.0.0-nightly.437+a2dc60f2" - "@parcel/namer-default" "2.0.0-nightly.437+a2dc60f2" - "@parcel/optimizer-cssnano" "2.0.0-nightly.437+a2dc60f2" - "@parcel/optimizer-data-url" "2.0.0-nightly.437+a2dc60f2" - "@parcel/optimizer-htmlnano" "2.0.0-nightly.437+a2dc60f2" - "@parcel/optimizer-terser" "2.0.0-nightly.437+a2dc60f2" - "@parcel/packager-css" "2.0.0-nightly.437+a2dc60f2" - "@parcel/packager-html" "2.0.0-nightly.437+a2dc60f2" - "@parcel/packager-js" "2.0.0-nightly.437+a2dc60f2" - "@parcel/packager-raw" "2.0.0-nightly.437+a2dc60f2" - "@parcel/packager-raw-url" "2.0.0-nightly.2059+a2dc60f2" - "@parcel/packager-ts" "2.0.0-nightly.437+a2dc60f2" - "@parcel/reporter-bundle-analyzer" "2.0.0-nightly.2059+a2dc60f2" - "@parcel/reporter-bundle-buddy" "2.0.0-nightly.2059+a2dc60f2" - "@parcel/reporter-cli" "2.0.0-nightly.437+a2dc60f2" - "@parcel/reporter-dev-server" "2.0.0-nightly.437+a2dc60f2" - "@parcel/resolver-default" "2.0.0-nightly.437+a2dc60f2" - "@parcel/runtime-browser-hmr" "2.0.0-nightly.437+a2dc60f2" - "@parcel/runtime-js" "2.0.0-nightly.437+a2dc60f2" - "@parcel/runtime-react-refresh" "2.0.0-nightly.437+a2dc60f2" - "@parcel/transformer-babel" "2.0.0-nightly.437+a2dc60f2" - "@parcel/transformer-coffeescript" "2.0.0-nightly.437+a2dc60f2" - "@parcel/transformer-css" "2.0.0-nightly.437+a2dc60f2" - "@parcel/transformer-glsl" "2.0.0-nightly.2059+a2dc60f2" - "@parcel/transformer-graphql" "2.0.0-nightly.437+a2dc60f2" - "@parcel/transformer-html" "2.0.0-nightly.437+a2dc60f2" - "@parcel/transformer-image" "2.0.0-nightly.2059+a2dc60f2" - "@parcel/transformer-inline-string" "2.0.0-nightly.437+a2dc60f2" - "@parcel/transformer-js" "2.0.0-nightly.437+a2dc60f2" - "@parcel/transformer-json" "2.0.0-nightly.437+a2dc60f2" - "@parcel/transformer-jsonld" "2.0.0-nightly.2059+a2dc60f2" - "@parcel/transformer-less" "2.0.0-nightly.437+a2dc60f2" - "@parcel/transformer-mdx" "2.0.0-nightly.2059+a2dc60f2" - "@parcel/transformer-postcss" "2.0.0-nightly.437+a2dc60f2" - "@parcel/transformer-posthtml" "2.0.0-nightly.437+a2dc60f2" - "@parcel/transformer-pug" "2.0.0-nightly.437+a2dc60f2" - "@parcel/transformer-raw" "2.0.0-nightly.437+a2dc60f2" - "@parcel/transformer-react-refresh-babel" "2.0.0-nightly.437+a2dc60f2" - "@parcel/transformer-react-refresh-wrap" "2.0.0-nightly.437+a2dc60f2" - "@parcel/transformer-sass" "2.0.0-nightly.437+a2dc60f2" - "@parcel/transformer-stylus" "2.0.0-nightly.437+a2dc60f2" - "@parcel/transformer-sugarss" "2.0.0-nightly.437+a2dc60f2" - "@parcel/transformer-toml" "2.0.0-nightly.437+a2dc60f2" - "@parcel/transformer-typescript-types" "2.0.0-nightly.437+a2dc60f2" - "@parcel/transformer-vue" "2.0.0-nightly.2059+a2dc60f2" - "@parcel/transformer-yaml" "2.0.0-nightly.437+a2dc60f2" - -"@parcel/core@2.0.0-nightly.435+a2dc60f2": - version "2.0.0-nightly.435" - resolved "https://registry.yarnpkg.com/@parcel/core/-/core-2.0.0-nightly.435.tgz#0be8537452188200dce60d1e1bf6e47a16a811b7" - integrity sha512-1CuYm90OXJlDsXf9xNBSvgpREyhuOXaOkDzJvRCwn26ZcGbnBspFJ9vSTxg32b20QLdsPRPEr1Plq9ZpQyfcPQ== - dependencies: - "@parcel/cache" "2.0.0-nightly.437+a2dc60f2" - "@parcel/diagnostic" "2.0.0-nightly.437+a2dc60f2" - "@parcel/events" "2.0.0-nightly.437+a2dc60f2" - "@parcel/fs" "2.0.0-nightly.437+a2dc60f2" - "@parcel/logger" "2.0.0-nightly.437+a2dc60f2" - "@parcel/package-manager" "2.0.0-nightly.437+a2dc60f2" - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" +"@parcel/config-default@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/config-default/-/config-default-2.0.0-nightly.440.tgz#69e53a1c8ca9860e7f64cf382119c7902cdb9a45" + integrity sha512-mGzxsPT2cyShfTa16Mgo9shjfyEVP+qbZ0R4xKiokhRkek9Wxhyb4FOka8qltxuMSsCyGsBk6kfCR0WTmzffaA== + dependencies: + "@parcel/bundler-default" "2.0.0-nightly.440+a5e23487" + "@parcel/namer-default" "2.0.0-nightly.440+a5e23487" + "@parcel/optimizer-cssnano" "2.0.0-nightly.440+a5e23487" + "@parcel/optimizer-data-url" "2.0.0-nightly.440+a5e23487" + "@parcel/optimizer-htmlnano" "2.0.0-nightly.440+a5e23487" + "@parcel/optimizer-terser" "2.0.0-nightly.440+a5e23487" + "@parcel/packager-css" "2.0.0-nightly.440+a5e23487" + "@parcel/packager-html" "2.0.0-nightly.440+a5e23487" + "@parcel/packager-js" "2.0.0-nightly.440+a5e23487" + "@parcel/packager-raw" "2.0.0-nightly.440+a5e23487" + "@parcel/packager-raw-url" "2.0.0-nightly.2062+a5e23487" + "@parcel/packager-ts" "2.0.0-nightly.440+a5e23487" + "@parcel/reporter-bundle-analyzer" "2.0.0-nightly.2062+a5e23487" + "@parcel/reporter-bundle-buddy" "2.0.0-nightly.2062+a5e23487" + "@parcel/reporter-cli" "2.0.0-nightly.440+a5e23487" + "@parcel/reporter-dev-server" "2.0.0-nightly.440+a5e23487" + "@parcel/resolver-default" "2.0.0-nightly.440+a5e23487" + "@parcel/runtime-browser-hmr" "2.0.0-nightly.440+a5e23487" + "@parcel/runtime-js" "2.0.0-nightly.440+a5e23487" + "@parcel/runtime-react-refresh" "2.0.0-nightly.440+a5e23487" + "@parcel/transformer-babel" "2.0.0-nightly.440+a5e23487" + "@parcel/transformer-coffeescript" "2.0.0-nightly.440+a5e23487" + "@parcel/transformer-css" "2.0.0-nightly.440+a5e23487" + "@parcel/transformer-glsl" "2.0.0-nightly.2062+a5e23487" + "@parcel/transformer-graphql" "2.0.0-nightly.440+a5e23487" + "@parcel/transformer-html" "2.0.0-nightly.440+a5e23487" + "@parcel/transformer-image" "2.0.0-nightly.2062+a5e23487" + "@parcel/transformer-inline-string" "2.0.0-nightly.440+a5e23487" + "@parcel/transformer-js" "2.0.0-nightly.440+a5e23487" + "@parcel/transformer-json" "2.0.0-nightly.440+a5e23487" + "@parcel/transformer-jsonld" "2.0.0-nightly.2062+a5e23487" + "@parcel/transformer-less" "2.0.0-nightly.440+a5e23487" + "@parcel/transformer-mdx" "2.0.0-nightly.2062+a5e23487" + "@parcel/transformer-postcss" "2.0.0-nightly.440+a5e23487" + "@parcel/transformer-posthtml" "2.0.0-nightly.440+a5e23487" + "@parcel/transformer-pug" "2.0.0-nightly.440+a5e23487" + "@parcel/transformer-raw" "2.0.0-nightly.440+a5e23487" + "@parcel/transformer-react-refresh-babel" "2.0.0-nightly.440+a5e23487" + "@parcel/transformer-react-refresh-wrap" "2.0.0-nightly.440+a5e23487" + "@parcel/transformer-sass" "2.0.0-nightly.440+a5e23487" + "@parcel/transformer-stylus" "2.0.0-nightly.440+a5e23487" + "@parcel/transformer-sugarss" "2.0.0-nightly.440+a5e23487" + "@parcel/transformer-toml" "2.0.0-nightly.440+a5e23487" + "@parcel/transformer-typescript-types" "2.0.0-nightly.440+a5e23487" + "@parcel/transformer-vue" "2.0.0-nightly.2062+a5e23487" + "@parcel/transformer-yaml" "2.0.0-nightly.440+a5e23487" + +"@parcel/core@2.0.0-nightly.438+a5e23487": + version "2.0.0-nightly.438" + resolved "https://registry.yarnpkg.com/@parcel/core/-/core-2.0.0-nightly.438.tgz#a7dc93eb86c3028ea3d75edf5a0e60628022cec5" + integrity sha512-3GS62SRVjmde+VO1YJ+Jft5PvwMh+LeTe1qp/FKQDAE8gKz/IJmtKvRgFC/FdLVQhwA3efXyGT1h+IZuJJdn4A== + dependencies: + "@parcel/cache" "2.0.0-nightly.440+a5e23487" + "@parcel/diagnostic" "2.0.0-nightly.440+a5e23487" + "@parcel/events" "2.0.0-nightly.440+a5e23487" + "@parcel/fs" "2.0.0-nightly.440+a5e23487" + "@parcel/logger" "2.0.0-nightly.440+a5e23487" + "@parcel/package-manager" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/types" "2.0.0-nightly.437+a2dc60f2" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" - "@parcel/workers" "2.0.0-nightly.437+a2dc60f2" + "@parcel/types" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/workers" "2.0.0-nightly.440+a5e23487" abortcontroller-polyfill "^1.1.9" base-x "^3.0.8" browserslist "^4.6.6" @@ -2287,72 +2287,72 @@ querystring "^0.2.0" semver "^5.4.1" -"@parcel/diagnostic@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/diagnostic/-/diagnostic-2.0.0-nightly.437.tgz#81c5edf13612b1cc63e9e1ca7cdf196852094590" - integrity sha512-hMToMmBtoGu8AYcr6KWaUcZUdw2G4J1vgthG1rxvD8BMhZdZ2e0CyVdFa8Iu1uyjwG7n+SzucIhqEs1TeT/R6A== +"@parcel/diagnostic@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/diagnostic/-/diagnostic-2.0.0-nightly.440.tgz#ccb5f1719dc458fc707a8df8cd5034cafd7c7ff0" + integrity sha512-vAgSjhj0nbHIZq6cjc7PdU3wDw9PwTo0g/kr24FXDy4DZuwAPG0vm4cWQk9u6mwlAT6OiUFbtBjQQ7/jEc+vgw== dependencies: json-source-map "^0.6.1" nullthrows "^1.1.1" -"@parcel/events@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/events/-/events-2.0.0-nightly.437.tgz#4c15acda218d59b1a6b7a8cc9caf3a12abb9a81e" - integrity sha512-ErUy81jc69YWFyr4JIUXNHp3JP+gsvgjt4ZO/vioA2b6sYJZPkdXCIx33aVrxuX+dDO1SMXfe9FjmOvETcKmZw== +"@parcel/events@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/events/-/events-2.0.0-nightly.440.tgz#7103afc255f8bba7d4a942fc1a662898d9eef621" + integrity sha512-0/ZF1hL1EIKoFJ8fJzcCqIZocibijUFACmZR4epHAwMc0ydI8BQ5xFfFjHdL6nPc6tIEXwAVSDf6i8nj1xqMKg== -"@parcel/fs-write-stream-atomic@2.0.0-nightly.2059+a2dc60f2": - version "2.0.0-nightly.2059" - resolved "https://registry.yarnpkg.com/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.0-nightly.2059.tgz#b35ddf71a17812e2108bd84412210b2fca77320d" - integrity sha512-tFaviSLTF9qi5do7Uw1QmcJn4l8t5LTtszBITSdHUsDMvvCwvZwhvIK/R1kmtsgCR7u81D8h4rxVRA8Iib8HOg== +"@parcel/fs-write-stream-atomic@2.0.0-nightly.2062+a5e23487": + version "2.0.0-nightly.2062" + resolved "https://registry.yarnpkg.com/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.0-nightly.2062.tgz#27a53d16479f5a15bbc4d4bc0c851165eff366b7" + integrity sha512-ypcpWHrhgvApLu0aqfPlOqh5/YLSXr+Pv2BpwAT8J6WpkW0Cpogs1xmGExKpHvqOZWvXQ+nDqoz+xFF+hBMO8w== dependencies: graceful-fs "^4.1.2" iferr "^1.0.2" imurmurhash "^0.1.4" readable-stream "1 || 2" -"@parcel/fs@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-2.0.0-nightly.437.tgz#576080a91953077b2d5e7c154a71c9902d9f1cee" - integrity sha512-F2P4GbJAAVTDpB8f/WdcmAVzxXrv69ONQqh3udk8OIVHwT9uymG+zdpexppI1z9DuEObpJ9nxoR/3/7XzZt5rg== +"@parcel/fs@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-2.0.0-nightly.440.tgz#a7b5eb878f8e352a4e05c36246cbfa0c5738d3fd" + integrity sha512-+8g5PNSx7HpswGKjDxhElTaC91OmKXNUE13uZGGkpxUupCBu5vBnWjg0FLM3RS4wKi2qa3/nDmCncbUW+qwJoA== dependencies: - "@parcel/fs-write-stream-atomic" "2.0.0-nightly.2059+a2dc60f2" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/fs-write-stream-atomic" "2.0.0-nightly.2062+a5e23487" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" "@parcel/watcher" "2.0.0-alpha.8" - "@parcel/workers" "2.0.0-nightly.437+a2dc60f2" + "@parcel/workers" "2.0.0-nightly.440+a5e23487" graceful-fs "^4.2.4" mkdirp "^0.5.1" ncp "^2.0.0" nullthrows "^1.1.1" rimraf "^2.6.2" -"@parcel/logger@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-2.0.0-nightly.437.tgz#b64529087e6376be60436888ee827e061be1e584" - integrity sha512-k6NnQHiPeT0r17MNUh3Jfx0fLV3dwrwsjnrnjqSwigaOXYip/sBevVyAz5+KICBj7/rhiriDXlraRttgYfIOlw== +"@parcel/logger@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-2.0.0-nightly.440.tgz#5287e17dddf12f8298ab99708d86ba59a54fc641" + integrity sha512-SEVWgo7tno1UeqF2mJovHMQqycAJNNh5iN1ux4Ld5HzCLldG0+E+AVK7OYIaGHIGiMabrEco0CC1OwR4qXJnvQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.437+a2dc60f2" - "@parcel/events" "2.0.0-nightly.437+a2dc60f2" + "@parcel/diagnostic" "2.0.0-nightly.440+a5e23487" + "@parcel/events" "2.0.0-nightly.440+a5e23487" -"@parcel/markdown-ansi@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/markdown-ansi/-/markdown-ansi-2.0.0-nightly.437.tgz#80d8d836b759dc08b43cfd098f908b83e8013d1b" - integrity sha512-897o2it44qycP0mbmPfTaMevRGstbaXwn2LHfyPxhoob/H5VJbJ8JQNZSg0elJNx7S9cC5g57o9AlKV+S93d1Q== +"@parcel/markdown-ansi@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/markdown-ansi/-/markdown-ansi-2.0.0-nightly.440.tgz#d621a2110d32b8aaaf79a5356a2c308b0f8b1b19" + integrity sha512-oo/4Oz3o43LsDO224GmCkTgXzF8+8hvzF9oC3WUWV3ancNZ2qQoWjwAGRa8QB4UE+5ijBpoSb/wIv5HfEmIipQ== dependencies: chalk "^2.4.2" -"@parcel/namer-default@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/namer-default/-/namer-default-2.0.0-nightly.437.tgz#b4638e8b57a13bd19b939bce6f415919a947de5a" - integrity sha512-8VfEtpptTwmJXAoON80pE++Fgd+3ExcmAhXXasNuNhAfd+Ex0Ta5i36sN6YY0iWUcj8izVPJXfwftfb5H9Ir6A== +"@parcel/namer-default@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/namer-default/-/namer-default-2.0.0-nightly.440.tgz#b8628109633f077ce5764bf54eb6dfc9a7950db4" + integrity sha512-o4jyL/6DixMCSSV5bXpLB1p9XLM/fwl0RIQ1IbZMfEOmh/T/ycratgAXRliri8/fjkbjlCg3zRyZqpBcoMWozQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.437+a2dc60f2" - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/diagnostic" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" nullthrows "^1.1.1" -"@parcel/node-libs-browser@2.0.0-nightly.2059+a2dc60f2": - version "2.0.0-nightly.2059" - resolved "https://registry.yarnpkg.com/@parcel/node-libs-browser/-/node-libs-browser-2.0.0-nightly.2059.tgz#a7c1da35f59650c236929310a1c9d5870c588a47" - integrity sha512-kGsder3Cg8EtT3+aoQxgvnPL1RsQJYbm2qNtyUzh1LKwHdm7hchSVrvvQya81ryHJPfVo+AaJzouMi6S+iAYfg== +"@parcel/node-libs-browser@2.0.0-nightly.2062+a5e23487": + version "2.0.0-nightly.2062" + resolved "https://registry.yarnpkg.com/@parcel/node-libs-browser/-/node-libs-browser-2.0.0-nightly.2062.tgz#830b5b63cb1ebf07d0c31afa08c64b4d1d016a7b" + integrity sha512-TouswHMPuDz8KhqtjKjU4VUJjcStRaAj3poBe31Rb474xSp1xLG4CBpul+idgKkip5yTA1Qr10ondIizuEnRrg== dependencies: assert "^2.0.0" browserify-zlib "^0.2.0" @@ -2377,71 +2377,71 @@ util "^0.12.3" vm-browserify "^1.1.2" -"@parcel/node-resolver-core@2.0.0-nightly.2059+a2dc60f2": - version "2.0.0-nightly.2059" - resolved "https://registry.yarnpkg.com/@parcel/node-resolver-core/-/node-resolver-core-2.0.0-nightly.2059.tgz#2ec173607a8633eb4dd8ac87086df09b877e1ba0" - integrity sha512-vaRsHeLhjpFtp5I8FgqkPYePpemmmfE4X7MKa8VJE93TEv8A+R9YtiFQLkOyC5xxVF2I8c4YG0zEHOb4AtjDpA== +"@parcel/node-resolver-core@2.0.0-nightly.2062+a5e23487": + version "2.0.0-nightly.2062" + resolved "https://registry.yarnpkg.com/@parcel/node-resolver-core/-/node-resolver-core-2.0.0-nightly.2062.tgz#82bf32f3a1555a7bf6eca7820d00615ddb1d206a" + integrity sha512-66nVYW6LPn1uGqL6Dk8a6onQm+Ggh6wldv0t238bnc8wUvZR7MU/paMpSeFsb1dTTKQZDk8ak35JsAsu+wQuHg== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.437+a2dc60f2" - "@parcel/node-libs-browser" "2.0.0-nightly.2059+a2dc60f2" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/diagnostic" "2.0.0-nightly.440+a5e23487" + "@parcel/node-libs-browser" "2.0.0-nightly.2062+a5e23487" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" micromatch "^3.0.4" nullthrows "^1.1.1" querystring "^0.2.0" -"@parcel/optimizer-cssnano@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.0.0-nightly.437.tgz#bcb7a90a1b75c2e2e05ac5c2dcbde398aba4fadb" - integrity sha512-PyXlV5wvWqeBVE/NEratnnRunv7RvVv9immjHE0DAB0GAmDmGYE5IidUP6Sjzq91m+eUPlUetbV41bh8SmkqUQ== +"@parcel/optimizer-cssnano@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.0.0-nightly.440.tgz#e2941af9cc127f25ac3e23b8c61079158e9d3336" + integrity sha512-10DlbQWW2M8Pp/Ixy6SPPSfxGe8ZPqCMwgkt8KTdccq6VlGF84innCnEv5USOu3o5xKHtlOgQmlpOi9T8gh4TA== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" "@parcel/source-map" "2.0.0-alpha.4.16" cssnano "^4.1.10" postcss "^8.0.5" -"@parcel/optimizer-data-url@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-data-url/-/optimizer-data-url-2.0.0-nightly.437.tgz#60f8d4c6f8b6762b7f91b466c18c0f84b05f62fc" - integrity sha512-F8svJFeSHvRoiw4DdI7iwNyeeuH8D+M2w74utLEZ+thBIbX6S9VpbVlUVZz0eGaj8Ucf8Q8ftzfwWxEZTIBOZg== +"@parcel/optimizer-data-url@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-data-url/-/optimizer-data-url-2.0.0-nightly.440.tgz#4e9a7ed5484adc85cc2e052b291e51b22b12d46d" + integrity sha512-yEIJm4wr8n5hQ2T0AQHeb5hCAdcPYySn4plodd4tyPWr93ITkrKqilkmnyyGi9JyM64wK1WqQtA3GjeA/+HjXg== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" isbinaryfile "^4.0.2" mime "^2.4.4" -"@parcel/optimizer-htmlnano@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.0.0-nightly.437.tgz#fcc26bd129bb44358950b07b7a2652359b7bd232" - integrity sha512-F9qCZRO6DcieSr3jQO5ew6SxWzydRNoGeVtE1hr8LxABCVk0H2bhSMBMiYSXRB7YcPHaTHtpPMajd1lD6wYFCg== +"@parcel/optimizer-htmlnano@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.0.0-nightly.440.tgz#f8cafa8063cc97fdf5437ac7bbde32aa1e21239c" + integrity sha512-LWTxTOmnf1CuCkytg1sCcIUAuqfxQH2khb21bf4Ib5mgqkKDDRcd4eAyBbal9/ht94GdyRYqbZ1JzRTo37MgJw== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" htmlnano "^0.2.2" nullthrows "^1.1.1" posthtml "^0.11.3" -"@parcel/optimizer-terser@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-terser/-/optimizer-terser-2.0.0-nightly.437.tgz#9d07662402e6d77c739be6a1684ca0f36e1e1132" - integrity sha512-xspBCK/cr1OmVMYCFTYqMkoItNdqmSfkBX50UwmxjO3oapKeet4Vr7PKwru7uGazp5ef+y+xXoNlN3rP7/LOFw== +"@parcel/optimizer-terser@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-terser/-/optimizer-terser-2.0.0-nightly.440.tgz#b16733244384f65db74c492c6968f6520735dcb3" + integrity sha512-2kLxL2CBaX7YZKXHRmlzKiLJeWAfgk21pIsCGzfRiGWr2fPIWiWpSLQCZQnEI1v0urUAmM+ZAvU0yZ2DLasMkA== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.437+a2dc60f2" - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/diagnostic" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" nullthrows "^1.1.1" terser "^5.2.0" -"@parcel/package-manager@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/package-manager/-/package-manager-2.0.0-nightly.437.tgz#58bc2763f907028e20d135657067386570552980" - integrity sha512-SbBciBOMKMubL6XfOEjSneRYE5nAy9jXk+O2loHDBBlnGhCwB2ulZa4qXUt+TsNT0EO8VIQUddJysS/K/5kflQ== +"@parcel/package-manager@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/package-manager/-/package-manager-2.0.0-nightly.440.tgz#470bb6716450faf4b133f4832fc6664830d83585" + integrity sha512-BXmjrpKwCabhIhcHmgNiWLzJzlrtFalE3zEVB9drAxWI1OHP4W4Q4awDnn7b3ap1JCvW8q85qrTKNxPDxRWq+g== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.437+a2dc60f2" - "@parcel/fs" "2.0.0-nightly.437+a2dc60f2" - "@parcel/logger" "2.0.0-nightly.437+a2dc60f2" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" - "@parcel/workers" "2.0.0-nightly.437+a2dc60f2" + "@parcel/diagnostic" "2.0.0-nightly.440+a5e23487" + "@parcel/fs" "2.0.0-nightly.440+a5e23487" + "@parcel/logger" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/workers" "2.0.0-nightly.440+a5e23487" command-exists "^1.2.6" cross-spawn "^6.0.4" nullthrows "^1.1.1" @@ -2449,91 +2449,91 @@ semver "^5.4.1" split2 "^3.1.1" -"@parcel/packager-css@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/packager-css/-/packager-css-2.0.0-nightly.437.tgz#e9c99df0450d61cd7e289a563d33ff87853211ee" - integrity sha512-Z7VEITchZJ2n0TLCslsY7cIxmLPHJ8BapdgRZ1iXUefTDwYNIjnGJWbjbWtQbhBy5C43k291pmoMzJFOfRQd8Q== +"@parcel/packager-css@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/packager-css/-/packager-css-2.0.0-nightly.440.tgz#d1890a207f8ed7173bacd5a0cfbc8dacb463a2c1" + integrity sha512-QXIflpM+Tqkhhkjdw06i6Y4PgUVsMAusBMP4TJa+NVdTg+vL4nItd1dRw2jeANxDwGhaQJChA2vTW2PIxwvK1g== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" -"@parcel/packager-html@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/packager-html/-/packager-html-2.0.0-nightly.437.tgz#bb38c4c548acb115ed063b355d5e8a957b2f14a1" - integrity sha512-XuL6vNPPAV1HHyqSDhm4LBA3yR+mkJoab9MyoZhQn6rwSd/nJEr6LLzR9aaA7FbTMQsDtsknWLVQOU2yA/iXXg== +"@parcel/packager-html@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/packager-html/-/packager-html-2.0.0-nightly.440.tgz#47701156f2644af01666fb321268f89ffae07d61" + integrity sha512-U8riNMZrs8wZt90fz3I3KLq08GJS2jNuldx4CM7qZWNRcFc/WK4MSPB9Ag5TTkq4WibXvGYhwnnMf3hfDbzlvw== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" - "@parcel/types" "2.0.0-nightly.437+a2dc60f2" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/types" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" nullthrows "^1.1.1" posthtml "^0.11.3" -"@parcel/packager-js@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/packager-js/-/packager-js-2.0.0-nightly.437.tgz#cedde51cbfa54f25613e86004e935355dc770380" - integrity sha512-tBzcPFThpwpadD1cUU1hmUz0OkMvdVJG1yo9R/F/0mzhKlfUWb/niyurGHSRiisbdYfFZPwvIcMZHgX4gT1HlQ== +"@parcel/packager-js@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/packager-js/-/packager-js-2.0.0-nightly.440.tgz#cf2a6c90294de497cbe0404537263e88d88992ca" + integrity sha512-iofUUOXbZrIowoaaoTGOguRx5a8mOytjQFkQDVq/VgcI3Pi7MU8tHQsQfUN8dpSWaMgMNFZALHrASoXUL4mcdQ== dependencies: "@babel/traverse" "^7.2.3" - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" - "@parcel/scope-hoisting" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/scope-hoisting" "2.0.0-nightly.440+a5e23487" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" nullthrows "^1.1.1" -"@parcel/packager-raw-url@2.0.0-nightly.2059+a2dc60f2": - version "2.0.0-nightly.2059" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw-url/-/packager-raw-url-2.0.0-nightly.2059.tgz#c4770126488bf3e79ee15ebc5dbf7c869b465e5c" - integrity sha512-PUMTM7Lrh+VjvLMIjF0gc5ORNzPwuFSZBwygqdIzJ4AC3cjHVyk9R0nOpE0XxABwuzEWU3TdRsL8ZPkm0R1RVg== +"@parcel/packager-raw-url@2.0.0-nightly.2062+a5e23487": + version "2.0.0-nightly.2062" + resolved "https://registry.yarnpkg.com/@parcel/packager-raw-url/-/packager-raw-url-2.0.0-nightly.2062.tgz#e0c602f11a0cdd8c46896d6db66b213428e946e7" + integrity sha512-iZD+Pxg4CS2FgkMBGSW4FIsWaLaJlP6/W3IbJt8nUbAoMRgOZMi+fi6Mi/53mseMITT+Pb6/CvViubqT+8uMBQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" -"@parcel/packager-raw@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw/-/packager-raw-2.0.0-nightly.437.tgz#475d2e3b971ae04aa23cabb160dc737125dc650d" - integrity sha512-6PLYAI6RzYcFbxRc7yYsxfoA/e9Fu+slMoLPDlqSB/dlof0vNIUU974uapDoHqmoyOMPSlkds8oH0yfA4BklSA== +"@parcel/packager-raw@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/packager-raw/-/packager-raw-2.0.0-nightly.440.tgz#30ed36e97b719b2a14ccfb4a9f4136ce75a985ee" + integrity sha512-dL+jAvNkeYkjEmz+V/Os2Q+tyqjaVzazRh8NOLt4pzDC0cIDqWpzokvBDXUrsHhX+vHx1pYNBfKrNIpeXSR8Wg== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" -"@parcel/packager-ts@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/packager-ts/-/packager-ts-2.0.0-nightly.437.tgz#ef3cc15b03b779c08acfafa7ce6377ec4d24af67" - integrity sha512-1c8HREfUEN0mIAmzjOwfxyl+iUEGMKy/knYGxOgYEFWfHb7S06JBAzsmeB5eieUzgnad5wg6iJJzRyhHASgplA== +"@parcel/packager-ts@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/packager-ts/-/packager-ts-2.0.0-nightly.440.tgz#09cbe1e491c62cfdfe83f3fd024a56f3c2e7b11b" + integrity sha512-XmolyZzytwEStt49Nrf9m/MEbk5oqEkT0AOE7Ardmav2AmpANZsgMn1QZeBn7qaMN4VAmPtwZJdTyvXaLaX/5w== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" -"@parcel/plugin@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/plugin/-/plugin-2.0.0-nightly.437.tgz#3ef8ae2b3bbecb5f709144befe17c31a7c876193" - integrity sha512-G5u1b2894LtD6b5Xvzw7xMRUmpL/6xY3Why7re2m8cn18yEYHvUSC+H8GbjN+I+l6kMZXci9a5gHg6n7ezTvHg== +"@parcel/plugin@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/plugin/-/plugin-2.0.0-nightly.440.tgz#ec56ea50eda7a243ef553cc2d1cd2c77c5b4954a" + integrity sha512-+3GtynjGoIqtkl83XCy2iZ+HFOb9NOHTKao26jl7HftuGXUObJ4q/t+ODEa6iWc/zgFNZMDOO7v99ngtN+iP9g== dependencies: - "@parcel/types" "2.0.0-nightly.437+a2dc60f2" + "@parcel/types" "2.0.0-nightly.440+a5e23487" -"@parcel/reporter-bundle-analyzer@2.0.0-nightly.2059+a2dc60f2": - version "2.0.0-nightly.2059" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.0.0-nightly.2059.tgz#f48df7d56e11e6612ee3b32f40e5b419aa0b1dde" - integrity sha512-w5sWJA0tXCEkJDGIwECKCBX86SmldkIVnsIvjHznhsPBEys/gESH6NVTs6A6jQD4qnIhm+EpyTTJN6iPGqzGAQ== +"@parcel/reporter-bundle-analyzer@2.0.0-nightly.2062+a5e23487": + version "2.0.0-nightly.2062" + resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.0.0-nightly.2062.tgz#2377d3110c8434032290972bca01c254355b7dd4" + integrity sha512-euvJsCP4hykNmx6Re1SKTMKcmkuNLCjN+pdbPU8BDriqo1+6zZguvfBrfUPAirQlfs9sfgPekSI3E26fUHqg7g== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" nullthrows "^1.1.1" -"@parcel/reporter-bundle-buddy@2.0.0-nightly.2059+a2dc60f2": - version "2.0.0-nightly.2059" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-buddy/-/reporter-bundle-buddy-2.0.0-nightly.2059.tgz#f08e6b1d163e63b2a916a2f78c33f141ce5d7edc" - integrity sha512-AyDZeIazIy3KpzPBUMRt42aWonIAUd6oIYreGG9gPbnUmCFSoGPFC4+IZ6kSFabJqqr7HzF3OxF99z8vBwBR+g== +"@parcel/reporter-bundle-buddy@2.0.0-nightly.2062+a5e23487": + version "2.0.0-nightly.2062" + resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-buddy/-/reporter-bundle-buddy-2.0.0-nightly.2062.tgz#7ec94b12594f475053a2b194f3ef06d24b71059f" + integrity sha512-1R8tC+xYAglYrzrP9lLwt0gcCJCTnGs6Aq3LRBjAAQaTRe5Skvp/PgAx0SjijxbTsfNwU8GrXgvFT3a2CtMH+g== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" -"@parcel/reporter-cli@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/reporter-cli/-/reporter-cli-2.0.0-nightly.437.tgz#cd3db9d6cbfb2f98b0c3151a7e3156157033d2c4" - integrity sha512-PSQbjO9hi7r47Ti9Fqfb1O8Q3k3nrE3fFL3yE/nusQ+zN8QVMzVrUhR2TkTqplGN3wV0q8n6D7w9H9uaYRVfzw== +"@parcel/reporter-cli@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/reporter-cli/-/reporter-cli-2.0.0-nightly.440.tgz#9cff5dd88351936b24e6fcdfa6743318137b7544" + integrity sha512-xOblD0sz4ZmDPMtYW7nyfbJMCbo4CBWNdan6F2Gdntq8QDQdgvpxDzThzhk/tYe8VvRb3L0I7NiC/gJCmwdewA== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" - "@parcel/types" "2.0.0-nightly.437+a2dc60f2" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/types" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" chalk "^3.0.0" filesize "^3.6.0" nullthrows "^1.1.1" @@ -2542,13 +2542,13 @@ strip-ansi "^6.0.0" term-size "^2.1.1" -"@parcel/reporter-dev-server@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/reporter-dev-server/-/reporter-dev-server-2.0.0-nightly.437.tgz#7596edfa365d1bbe7097337b7b71dff535f714e9" - integrity sha512-H/n/XWOK78mnJeRqGZBQmTaa5EsX3Wd0lYCSyM4pRoL7nQqThpdF5BCe/pwme5PtmA4RIgogvOvl5H54xnoYfQ== +"@parcel/reporter-dev-server@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/reporter-dev-server/-/reporter-dev-server-2.0.0-nightly.440.tgz#ff32fb950a185c596e166c0e0b4e7c3cd3d5bb48" + integrity sha512-dq3IUKeQVtgvPQkY7XyyYFF0rP+z+yQD9Esti4agTQTDnwKFj9NpFiKPCogC4jUkCX6g/sPA6pWgBNYp+nxSbg== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" connect "^3.7.0" ejs "^2.6.1" http-proxy-middleware "^1.0.0" @@ -2556,54 +2556,54 @@ serve-handler "^6.0.0" ws "^6.2.0" -"@parcel/resolver-default@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/resolver-default/-/resolver-default-2.0.0-nightly.437.tgz#9d204dd421dcf1c1f0cd95947f16d135a16c22fa" - integrity sha512-ZXEODensgtWIcTHwSa8HQpBI3hWzmcTfbux5ApZlhL+etfwTwV7M/ombxP7b8XAfM+874NztDZzkr1OKZ0Fy+g== +"@parcel/resolver-default@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/resolver-default/-/resolver-default-2.0.0-nightly.440.tgz#0ff18d91f4fd981d03f00ecf90bebd6c6df24934" + integrity sha512-a/6mnGlvP7fbFeadz+/4RvUIQ7xx57eDPv0cEvYTMjNtYEJen6yurOMmHFRTT2ODF8a5begDMjyMgmseuAvFRA== dependencies: - "@parcel/node-resolver-core" "2.0.0-nightly.2059+a2dc60f2" - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/node-resolver-core" "2.0.0-nightly.2062+a5e23487" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" -"@parcel/runtime-browser-hmr@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.0.0-nightly.437.tgz#fa3252504d04640bd42f68b5f29c85602e78a483" - integrity sha512-vIo5/6AxV8Oi/fi3Ahl1lwPsISZINoMjEJbC+AoALacrqMuowzNNc131VoQ7CWnT4QXHKSDWkVntLHvwfI/snA== +"@parcel/runtime-browser-hmr@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.0.0-nightly.440.tgz#f1786fdd958d92933b39a79760adf2398615d1fe" + integrity sha512-i6q4KRU77AUfQnujdRluEemPaHdyf0vQjFjV8lWx4ETuFJZPF02tbHuAA+EWu6OdFk1jXYSW9H4SoYatFC3zEw== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" -"@parcel/runtime-js@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/runtime-js/-/runtime-js-2.0.0-nightly.437.tgz#e469df9a2d052a1734f7af51fbe19dbc79fa5be9" - integrity sha512-6v9zoCFxCOmkMJPgKhslS1bKEdHkOr+NTt3LtY7UeHuXu4csaQEBQCbdQkOFOOWkG33WSylrHv6YLPss0hOVCA== +"@parcel/runtime-js@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/runtime-js/-/runtime-js-2.0.0-nightly.440.tgz#a0f141f3cfc4dcc529a9f029200395116ca66790" + integrity sha512-ZFULRKR+So/n+AwCKX1sTJm2exZ9VfZh9ZGQ0hnzJuRlrwDTVlegVeZ/Z+O1TtBGpJMwrK+oaS+sf1clDePIvg== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" nullthrows "^1.1.1" -"@parcel/runtime-react-refresh@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.0.0-nightly.437.tgz#33f67db0897799fb60ecaa5755c983565546220c" - integrity sha512-lvsYIOSbQEntpbLbhXY2UfiupPscEzjM+3f/nG975fycN1uQEurhptOrWWbwQxx2kUSLNuTVHObCquZMwIKBbA== +"@parcel/runtime-react-refresh@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.0.0-nightly.440.tgz#4a9f43dda44b8084ea0bcb4a28d78c99e3c4ac2d" + integrity sha512-SVzyhPdj6qc4CXLHCxLD/eI2Hg6NEv0M90E3rYz6dr1flA9XMlknaSMABHJ/53xAlyHHBnawMr28OoKkyc3GDA== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" react-refresh "^0.6.0" -"@parcel/scope-hoisting@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/scope-hoisting/-/scope-hoisting-2.0.0-nightly.437.tgz#caddc4780f612e8aff53aae766bacb5b32f74e64" - integrity sha512-0dXnnc5W7AnoCTPmBJ0/4Mm2RAQSlgGCWf20V1Mjd6ByuqR1GD0SjxRw6Ys5vUgXgohH98kkJeopo1mA64IJeg== +"@parcel/scope-hoisting@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/scope-hoisting/-/scope-hoisting-2.0.0-nightly.440.tgz#4a0c48c460d592bc1bfff6c17546a8ea732a13fd" + integrity sha512-GC+OLI/aLNxFINw2Dp/laTx1qKsIrBCP7i2IRjne3iuUTrqF8sGCnm6zFM/SJjVGOH9Ayu3i35aPo8wZl/IOqA== dependencies: "@babel/generator" "^7.3.3" "@babel/parser" "^7.0.0" "@babel/template" "^7.4.0" "@babel/traverse" "^7.2.3" "@babel/types" "^7.3.3" - "@parcel/babel-ast-utils" "2.0.0-nightly.2059+a2dc60f2" - "@parcel/babylon-walk" "2.0.0-nightly.2059+a2dc60f2" - "@parcel/diagnostic" "2.0.0-nightly.437+a2dc60f2" + "@parcel/babel-ast-utils" "2.0.0-nightly.2062+a5e23487" + "@parcel/babylon-walk" "2.0.0-nightly.2062+a5e23487" + "@parcel/diagnostic" "2.0.0-nightly.440+a5e23487" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" nullthrows "^1.1.1" "@parcel/source-map@2.0.0-alpha.4.16": @@ -2614,10 +2614,10 @@ node-addon-api "^3.0.0" node-gyp-build "^4.2.2" -"@parcel/transformer-babel@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/transformer-babel/-/transformer-babel-2.0.0-nightly.437.tgz#f04384a4362c92228e6f5f946969813614e12e6e" - integrity sha512-nFJtdfQBsw5X27RWm98SLu/cF//FeSGvgSG+flVbHaBIqq7MDjjyPgGGyNNMLrdbYSpzicDX7sp9BK2199C+GQ== +"@parcel/transformer-babel@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/transformer-babel/-/transformer-babel-2.0.0-nightly.440.tgz#a437e7b153800ab1daea29c9b3335abf535341bf" + integrity sha512-NhS172zvaCROhPHk8jmAlmyBN7nuPPkGwbCx6SfDdl1+ZaDbbtDQlwDwpzrEdQRHCjoZ8va4IyM9CltT3K8S7Q== dependencies: "@babel/core" "^7.0.0" "@babel/generator" "^7.0.0" @@ -2627,85 +2627,85 @@ "@babel/preset-env" "^7.0.0" "@babel/preset-react" "^7.0.0" "@babel/traverse" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2059+a2dc60f2" - "@parcel/babel-preset-env" "2.0.0-nightly.437+a2dc60f2" - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/babel-ast-utils" "2.0.0-nightly.2062+a5e23487" + "@parcel/babel-preset-env" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" browserslist "^4.6.6" core-js "^3.2.1" nullthrows "^1.1.1" semver "^5.7.0" -"@parcel/transformer-coffeescript@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/transformer-coffeescript/-/transformer-coffeescript-2.0.0-nightly.437.tgz#1022198b96569b49a133b34b159eaa7c14c431ae" - integrity sha512-8XfTJY+wxqkLZh0KP/ihypIdp330+eFgaGSvD/jEHdEzuyCbgqbRF1AVhQaDggXfZnIZGMstLIt1u3BFj10Zjw== +"@parcel/transformer-coffeescript@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/transformer-coffeescript/-/transformer-coffeescript-2.0.0-nightly.440.tgz#e88e53ee0d59a84db241ab4c0b6f4e776d3990aa" + integrity sha512-narQTJm1hMFKfc8R+JXtEsVl+L3OgcywfjAFXrzNe/S25j9RDLXiF1ZTRNzvbxvYdhUkMq+V2+SNuOjcuWk3Qw== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" coffeescript "^2.0.3" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-css@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/transformer-css/-/transformer-css-2.0.0-nightly.437.tgz#aee0e410f1b8d0f0a4405a4149332c5d4b5692ce" - integrity sha512-0B76lBlNY3A+i9ZVma5gzKOyyPf+RmUwROV7884ryn/bapWtW5W91WX2a24y9IktWQAxxK1CSlxwn7PFZUhHzw== +"@parcel/transformer-css@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/transformer-css/-/transformer-css-2.0.0-nightly.440.tgz#5f655d41b4a70ea1cbd0b71fb559964993165ca7" + integrity sha512-0L3TS0AnW2mkBtXa+63jb/n6h7HLzEizJ+hCoiGwCbFe7mCU6qVSJIaRPyrUHlJmsFkoSVVBxNHSKTiqPfywSg== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" postcss "^8.0.5" postcss-value-parser "^4.1.0" semver "^5.4.1" -"@parcel/transformer-glsl@2.0.0-nightly.2059+a2dc60f2": - version "2.0.0-nightly.2059" - resolved "https://registry.yarnpkg.com/@parcel/transformer-glsl/-/transformer-glsl-2.0.0-nightly.2059.tgz#b100a6a127e1cb71133bf4d95d9c3f6272c23c09" - integrity sha512-q4kEeOcqlbs/8oB8TIFQV0yJCw85nXcKDKLNqOvrUYKMrmWYXzoXNcZKrMhPZPCYJTf7Ic42HZ6VCiB7k7mY7Q== +"@parcel/transformer-glsl@2.0.0-nightly.2062+a5e23487": + version "2.0.0-nightly.2062" + resolved "https://registry.yarnpkg.com/@parcel/transformer-glsl/-/transformer-glsl-2.0.0-nightly.2062.tgz#8f11885359facf2242b1b7166b76d1477815dcbf" + integrity sha512-52FWirL/F1fCC7rvgMKhs7N0O/Um3AEFX87dXQvCJ2oYPkUj0fplt5KJWY9VN8wF196goNJdpQ8OqcybCpPzOA== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" -"@parcel/transformer-graphql@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/transformer-graphql/-/transformer-graphql-2.0.0-nightly.437.tgz#c22c5ec99454b79bedd453db8abc08a0a73d5756" - integrity sha512-96Q2hai857mOx5PRknuZg3wL987Lpm+4RuYmJft2ONUdEuyudYdmVxthiMtVVGngFE/GGeAddU+4fbF2L+KhKA== +"@parcel/transformer-graphql@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/transformer-graphql/-/transformer-graphql-2.0.0-nightly.440.tgz#03784310a8aecb738c7a9929169c1f2991158335" + integrity sha512-dIZzR/cF+w6Lb3LU8Ew3ksmJv03uzxUWV7o4F4RvpCPQtKXUY0SxilPnfkSfIEtpBWGK87ajgOt8nLRZwkOvKQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" -"@parcel/transformer-html@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/transformer-html/-/transformer-html-2.0.0-nightly.437.tgz#1513f560e2555c33c65436ddc754bb45481e67f2" - integrity sha512-SQynn9L4b60nM3KDtkhiOY0oVRmvkNP65Z2B8F1LMfbybMAzT5iSoYNFlDh2tX9BuBWAxXnDSv3gvL5ZyoVSrA== +"@parcel/transformer-html@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/transformer-html/-/transformer-html-2.0.0-nightly.440.tgz#223b0f5bb24ade59f636a2f57da16f8b1da7549f" + integrity sha512-UI7DmN5NIItasrg2v2Jyxx5HDTA4AmxJqFI232KBOUQmso6HJNF8Fjzmb3T8v2ETujjKzTWhZXOpnlHCP+Ok7w== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" nullthrows "^1.1.1" posthtml "^0.11.3" posthtml-parser "^0.4.1" posthtml-render "^1.1.5" semver "^5.4.1" -"@parcel/transformer-image@2.0.0-nightly.2059+a2dc60f2": - version "2.0.0-nightly.2059" - resolved "https://registry.yarnpkg.com/@parcel/transformer-image/-/transformer-image-2.0.0-nightly.2059.tgz#eb756fef1bb9177ff210341131641e815ed4f8b3" - integrity sha512-8063BdGcHElpnY1Ptcvc7sGlSXCod1aeTPw4ms/Mpk4Ccv4kBwLuNbIZyJX+hU3hw0W9o++C46m19kze3K8MZQ== +"@parcel/transformer-image@2.0.0-nightly.2062+a5e23487": + version "2.0.0-nightly.2062" + resolved "https://registry.yarnpkg.com/@parcel/transformer-image/-/transformer-image-2.0.0-nightly.2062.tgz#722150c5669e7828645e486299fab5fc2325db40" + integrity sha512-ZCow9ILc369itY1Y6dh4ghXv3jHL5HBC76wsc/e0wGOtmPT9vPoiol6WpfX2B3B5QMF8tDl9oK3ss7iaPyCoeA== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" -"@parcel/transformer-inline-string@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.0.0-nightly.437.tgz#55555533876f7dcc1df7ed657e1ba3a42718600e" - integrity sha512-PhU5x0OxMJnQl2TivtyskjFaJXKlFGfSJ4SclMAFIQO3G0HLtDfjSDvdQgVuMe5PN4uzyecTiKR9X5GZOI2e4Q== +"@parcel/transformer-inline-string@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.0.0-nightly.440.tgz#6b7e8ec3080fd7946d12a63178677d6c88dab127" + integrity sha512-dcPTHtFfrtP5i8f4T/wg9ABzPgR848yx0M1SpDnCWPMKcwCrBVPr9cGqxACGeOJs4Ul1sVfsG7SvhH/G0RQfVw== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" -"@parcel/transformer-js@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.0.0-nightly.437.tgz#5b605a19dd19c826a5d0885f5b54d159771e1d1d" - integrity sha512-t+/bLrqdVkoQ3VopkDnRcMxPs4v3tFz3Q4/5S6dbF9JG9v62fadK5fLcoRxJGn1qx2sElQycSJMwlzCXhWv8AA== +"@parcel/transformer-js@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.0.0-nightly.440.tgz#147b2371f3a94c6db1fed164e5836a85127f2f4c" + integrity sha512-ofpSlc3ab8ymJ0P7rC527Vda7c11QhYWDydmuhXfsQqybJ8MR58tUfG3Kt6krt3UUglIRsio/X54/ZOJ0CuyYw== dependencies: "@babel/core" "^7.0.0" "@babel/generator" "^7.0.0" @@ -2714,193 +2714,193 @@ "@babel/template" "^7.4.0" "@babel/traverse" "^7.0.0" "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2059+a2dc60f2" - "@parcel/babylon-walk" "2.0.0-nightly.2059+a2dc60f2" - "@parcel/diagnostic" "2.0.0-nightly.437+a2dc60f2" - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" - "@parcel/scope-hoisting" "2.0.0-nightly.437+a2dc60f2" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/babel-ast-utils" "2.0.0-nightly.2062+a5e23487" + "@parcel/babylon-walk" "2.0.0-nightly.2062+a5e23487" + "@parcel/diagnostic" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/scope-hoisting" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" micromatch "^4.0.2" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-json@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/transformer-json/-/transformer-json-2.0.0-nightly.437.tgz#0ff0f3cb9e36edb24d0fa68b254fc1d6add4fa8b" - integrity sha512-dvruurCigqgbVvsOuV0PIYi8MsR4ni+z2VYgMaO7HcLpImQ8fDAFhUzYpKVJVHLPaMs6rjPed6MeQWavkzArBg== +"@parcel/transformer-json@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/transformer-json/-/transformer-json-2.0.0-nightly.440.tgz#933ffd167e43d16bb828a11d3cca8f8f97f8c084" + integrity sha512-h9+LLqy/IKG1Xb8pcF6pAVRiwQfQ8S6nNvoVQI2ksXftYfmJLMY62swy3jxe2jX1oumR5TEs7oQYB32w3hQJQg== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" json5 "^2.1.0" -"@parcel/transformer-jsonld@2.0.0-nightly.2059+a2dc60f2": - version "2.0.0-nightly.2059" - resolved "https://registry.yarnpkg.com/@parcel/transformer-jsonld/-/transformer-jsonld-2.0.0-nightly.2059.tgz#eac61cfd4189c2be67f8d120c9450eb03aafeadc" - integrity sha512-NCcbzj5It8rIAvFU3Sfg+gwL0pKuRXX4ShDz8EMriHIEVrZpsa56eNV2Tda+NzGYQQf5UwUnvtuNRaoG//JhCA== +"@parcel/transformer-jsonld@2.0.0-nightly.2062+a5e23487": + version "2.0.0-nightly.2062" + resolved "https://registry.yarnpkg.com/@parcel/transformer-jsonld/-/transformer-jsonld-2.0.0-nightly.2062.tgz#f9a099541e5395dc70a353b4f5401478fc25c23d" + integrity sha512-PlFxPPuo65bkji6PNa3xwSbURvnD4eOuWemyN8tHfnK5A/AprdYgOscC4/NspxiQATQshVwq9DDQ4aAQEZCd0w== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" - "@parcel/types" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/types" "2.0.0-nightly.440+a5e23487" json5 "^2.1.2" -"@parcel/transformer-less@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/transformer-less/-/transformer-less-2.0.0-nightly.437.tgz#ba31e6a40dc901fa1cddc5edc22b64072d667be1" - integrity sha512-M98uJ8B48VTTYfTDtfrFLC6xDHvnA1OloVCLunV552e/xwmedOkTtztn06KX1oc7BEAGSW1h6IOjoDw0Q+mnoA== +"@parcel/transformer-less@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/transformer-less/-/transformer-less-2.0.0-nightly.440.tgz#2bfb6d1c4099c2e022565778d62178bfa3954fc2" + integrity sha512-2HPCT1uyvMLBvYq+YQJrQ6iLaceDOYzr+nuzyyXg4eThvDKU1T9QvW+3qSKCsdGy+C7Tuj0g2m2LIQChwMjjeQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" "@parcel/source-map" "2.0.0-alpha.4.16" -"@parcel/transformer-mdx@2.0.0-nightly.2059+a2dc60f2": - version "2.0.0-nightly.2059" - resolved "https://registry.yarnpkg.com/@parcel/transformer-mdx/-/transformer-mdx-2.0.0-nightly.2059.tgz#df4b3d3ab32f64431182cb47610591087a0f1ce6" - integrity sha512-2PUY3qNAMMCr4DveW0KMIbmSlohNt9OlLMngYJ8BfiYjwBuFeQYbxjXvpyMmmDND9OSSMB6OBxPySxbvnffNmQ== +"@parcel/transformer-mdx@2.0.0-nightly.2062+a5e23487": + version "2.0.0-nightly.2062" + resolved "https://registry.yarnpkg.com/@parcel/transformer-mdx/-/transformer-mdx-2.0.0-nightly.2062.tgz#7b7f56c0feb5ed4cefc3fdd61d8b6f77786ff249" + integrity sha512-iJERfvegil8HBiLcAatMRpFh6U/eciuul2wjQPhQcRt9L2njtLY6RwDOeJPXqx8vdZ0TQpV6xmv5MwRXsZ/+xA== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" -"@parcel/transformer-postcss@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/transformer-postcss/-/transformer-postcss-2.0.0-nightly.437.tgz#92aca266bf45af546fdf786c6820485eac8b1c0a" - integrity sha512-EsAyjpeBskPdSWZ7pxQmf3PJHLNO+ryFJk7RRy2rMrjfVds7pb7t6tqSy7M8ArptS8L763Si/+EqYhDzlyVrQQ== +"@parcel/transformer-postcss@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/transformer-postcss/-/transformer-postcss-2.0.0-nightly.440.tgz#6aedb45b121ec15059850d4de71868548ebd6b98" + integrity sha512-+DzWXPrB7b4wIwGT5TMeMIg7IKP+OToV+6SvW6XE5SW43NFGvGl2RQ9vKozVHfxMODHrCkP2VRgHGqO2lCEV3w== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" css-modules-loader-core "^1.1.0" nullthrows "^1.1.1" postcss-value-parser "^4.1.0" semver "^5.4.1" -"@parcel/transformer-posthtml@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/transformer-posthtml/-/transformer-posthtml-2.0.0-nightly.437.tgz#404423552f3aeacde9abe70344df5dc260a6e93c" - integrity sha512-iY2+2GUd38kvpSMLR9yE0vKuvKnvw1WUFQmuHAOMSJqfu4GovT54KPjqSGpVme4XwfcBCt/wAQv2oQiqOig/oQ== +"@parcel/transformer-posthtml@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/transformer-posthtml/-/transformer-posthtml-2.0.0-nightly.440.tgz#e6a5d16599670abb26008e25310305a46975d785" + integrity sha512-8AzRmxae2YeZBb7G8eGUun4gohS2pfKrDBOkAgby1CGz9H2n/2ux+ETKb212QD6vD06ekfDf0lxMrO4Ngu42lg== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" nullthrows "^1.1.1" posthtml "^0.11.3" posthtml-parser "^0.4.1" posthtml-render "^1.1.5" semver "^5.4.1" -"@parcel/transformer-pug@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/transformer-pug/-/transformer-pug-2.0.0-nightly.437.tgz#86982b30ad6d3553ab48382de8ecd1f3e944c4b8" - integrity sha512-PzqxXjsB33SVhd/xd8V4BREwWbpVh6tutmYKVRY+/ZNqyjxoMnjWWP+5UuDNOzXbaOBZ1LFq9h2paWY4IdiVFQ== +"@parcel/transformer-pug@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/transformer-pug/-/transformer-pug-2.0.0-nightly.440.tgz#dc22bac479e5eb46fe440ab63ad654f0f84a4686" + integrity sha512-q+fOQG3FhBP2r3oRvUicarZEVsqLGUQZj7BB/Ouu+El3Pv8/Da+qBqA+YRZcAgemXy+Z+coxWYFsND61T2eZ2Q== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" -"@parcel/transformer-raw@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/transformer-raw/-/transformer-raw-2.0.0-nightly.437.tgz#9c2470b6f542ea04a8b30bf588fb9a4d3bd5da4a" - integrity sha512-FjTep7wZ6bemo2jK+rtlKn/0P+Yc5UJfA7d98Aq1AJUmkLyIVOvlcI8pUyXE7Q8z0ZQL0Jmg0dmdF37hdRObKg== +"@parcel/transformer-raw@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/transformer-raw/-/transformer-raw-2.0.0-nightly.440.tgz#662f9c80dcf25d9aa3ccd2d16e3a93fff5d7b62b" + integrity sha512-qPpRk6Qa9izCDjtmXDcIcb8p0pNdMygxwQESTHdp/O7YARiB2qMtI7122u7N7cB8+/r+Hsnuqh74kjyLkEvBDQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" -"@parcel/transformer-react-refresh-babel@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-babel/-/transformer-react-refresh-babel-2.0.0-nightly.437.tgz#2ff670e307c982520a471ea88a6cd90c96dc6553" - integrity sha512-SYBl3eSlj2rqLj13DP5OtkKPPCJSf5fJwsmU2mn+0IiO7BIlqvFt9qNR5MULkqyUYdVH0kqQqqB3rsxjYXDRzQ== +"@parcel/transformer-react-refresh-babel@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-babel/-/transformer-react-refresh-babel-2.0.0-nightly.440.tgz#5ffaca93d0168e57b3393ac9afcda09069efe236" + integrity sha512-7W4WXPnoU9TxagjNUAO6b7JPVjcyMZbtc8xRY80pfOuLYXircdoVBN1RZn7tXSZjxPNVDbeoehF7Qu/uyCM6vA== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" react-refresh "^0.6.0" -"@parcel/transformer-react-refresh-wrap@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.0.0-nightly.437.tgz#699a7de06f4add805b72edd641d74eda2497f42d" - integrity sha512-fJcWxeLkcdnuiRXp0Q2rMsWNX6RXhdn2HtLAAdHV3O5KsIUBhhvAq2v1RSPCI+jZ/6T3JhPxjY8syGH1y2o6RQ== +"@parcel/transformer-react-refresh-wrap@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.0.0-nightly.440.tgz#87b47b164964bdb4e8ad71ff34d12117ee5c551b" + integrity sha512-BlzhB8shNGuj3pr/EeR30IJT63VE0kZnF/3kEJ1YEmIR2PyraqQdGRGpyde9aG8QliOCDgp+R9hxSfu1KIDTgQ== dependencies: "@babel/generator" "^7.0.0" "@babel/parser" "^7.0.0" "@babel/template" "^7.4.0" "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2059+a2dc60f2" - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/babel-ast-utils" "2.0.0-nightly.2062+a5e23487" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" react-refresh "^0.6.0" semver "^5.4.1" -"@parcel/transformer-sass@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sass/-/transformer-sass-2.0.0-nightly.437.tgz#24b2975d325da79d98d439d7bb3737ad50e41e37" - integrity sha512-S92pgGg08B5BOGh0+n4S7l/Oib5ckvyqAM5371NWg10uw6lXdyLc88CChKoobKeQRRY8wQA1SJtg9f2fja75zQ== +"@parcel/transformer-sass@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/transformer-sass/-/transformer-sass-2.0.0-nightly.440.tgz#11dbf48337189a300b20a1477dfe5525a820f0bb" + integrity sha512-4G9B+ygvmDbUV5VJNlIFBZ5sjXrvccmhv3jiusD7tZHHE2/oI3FjJkbix88cekE+aFH5RnQVcPfRxGExVboNIw== dependencies: - "@parcel/fs" "2.0.0-nightly.437+a2dc60f2" - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/fs" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" -"@parcel/transformer-stylus@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/transformer-stylus/-/transformer-stylus-2.0.0-nightly.437.tgz#c37381ea6f48f3f74f591f214cbb2bb5060d7675" - integrity sha512-ExTBezhNPcMQIEU+T8RIfy6EG36H5acgiW6ufFwXngNzBrFD0BTKyt5l10+Jxz1eTX5V/0Z1pGXd1n8olho45w== +"@parcel/transformer-stylus@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/transformer-stylus/-/transformer-stylus-2.0.0-nightly.440.tgz#954323ad2445327363f9d0189a974200fcb4618c" + integrity sha512-MfEL8cbH5ytJ55rlol2UEjsNqko83iD+iR6GSbH0aVceNwhq2iI8T7SGOr8aWtJxcT6F90eLINn/BR/T3Lwmjg== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" -"@parcel/transformer-sugarss@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sugarss/-/transformer-sugarss-2.0.0-nightly.437.tgz#388e092e45caf9b44c6bab8aa92278678fe252d6" - integrity sha512-JuItzQLvvTzH6eYQ0RvqNPwNcswRsiE1XY5j/mbTIg2pjK74fxsRH/CKr8p1RioxNDLVJInBP36NiE8fq7+WAQ== +"@parcel/transformer-sugarss@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/transformer-sugarss/-/transformer-sugarss-2.0.0-nightly.440.tgz#c74009bc383a5765df5f7eee7496b69509e8a352" + integrity sha512-QljfI2ApR3ebN/G2cVZaTbekAQKQXrr17JXexQhy/BsQaR1wwlh/wWlOKRZBK5/h40hpRfr/cfNmmcJ9ytQ/2g== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" postcss "^8.0.5" -"@parcel/transformer-toml@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/transformer-toml/-/transformer-toml-2.0.0-nightly.437.tgz#aae299f921c33f2fba0484bf5bbb16892ea8d4ab" - integrity sha512-sykFL+j+AhCxAn6nui4hAHS4ogiNUj9RPQh1VusOYBTTd4VfWmyBf68LQljj/9Nk+9CTb3q/1sh+YrnPydwcDg== +"@parcel/transformer-toml@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/transformer-toml/-/transformer-toml-2.0.0-nightly.440.tgz#9cfadcb93c449574f57923a7a43835bb2138a38a" + integrity sha512-xkL3RcUNs2PDuXFQUSN3qHvRmD2YjeoG/XhQnTBzO26ZjrkpqGQuklLXmfYfQMmenYDjnoVtCALGd6enbil17A== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" -"@parcel/transformer-typescript-types@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.0.0-nightly.437.tgz#e73f762b6970a10af1eba755abbdcfe9385d9360" - integrity sha512-/CxXOvd7SVWxrVw4FxeP4SnvwNV6G6FnIKE58I9Ck6t+/CSn5vJa0A1ehDxMD6TyQ6VH4b5xK/RWM1uQXmivsA== +"@parcel/transformer-typescript-types@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.0.0-nightly.440.tgz#0c2736fc88f3ca16008cf04ce0f2f1f35c9071ba" + integrity sha512-WmfINC+yLPA7/unlyYuxIrIdyQmSHkc3i8Mvib3GjCkllZv8sv5USzADV6FdXnH24N8kS/g0vyD+cquXLGiSpg== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/ts-utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/ts-utils" "2.0.0-nightly.440+a5e23487" nullthrows "^1.1.1" -"@parcel/transformer-vue@2.0.0-nightly.2059+a2dc60f2": - version "2.0.0-nightly.2059" - resolved "https://registry.yarnpkg.com/@parcel/transformer-vue/-/transformer-vue-2.0.0-nightly.2059.tgz#f9484090d242fd021fd5add95b1d959ca2548f1e" - integrity sha512-5qLbBhGmof1faHueJqvzaViUQiKdQCWO5c2+pLDRu2S10JvQzE2TB9PlBoajThainsOTLjiX7gdludH6PIRbXw== +"@parcel/transformer-vue@2.0.0-nightly.2062+a5e23487": + version "2.0.0-nightly.2062" + resolved "https://registry.yarnpkg.com/@parcel/transformer-vue/-/transformer-vue-2.0.0-nightly.2062.tgz#2d81f4b55e7048387dc07317f1aa55178f48fe6c" + integrity sha512-munBdg0a+6mUKkKkRg5gQXGfLUbweIZRW9GuZlJ2cY3VfRgtv5ry3924POr4ISS9d5rS4fcc91s4zKcsgf68Qg== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.437+a2dc60f2" - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/diagnostic" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-yaml@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/transformer-yaml/-/transformer-yaml-2.0.0-nightly.437.tgz#ecccebcf84c920d732bb655922c459c32cf59f70" - integrity sha512-uLoEY2PqKySXs/HTED1zh/VmQLUhYY51i4n9ZmMc1M7Ix+6CAsXhX2GvucfDz3P1PrhGdPBEQs/oY2iW1ROJmA== +"@parcel/transformer-yaml@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/transformer-yaml/-/transformer-yaml-2.0.0-nightly.440.tgz#5595e05d437a0f0da427a056640d829f02bf8119" + integrity sha512-wlQTG8BVdWLpOXmrNs0rtI4DH3TVlU4jYPs/FNVyewieIPJeMSNMzFbbqyZo7H1kS4rsOar8Zs16n6hhI94Uug== dependencies: - "@parcel/plugin" "2.0.0-nightly.437+a2dc60f2" + "@parcel/plugin" "2.0.0-nightly.440+a5e23487" -"@parcel/ts-utils@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/ts-utils/-/ts-utils-2.0.0-nightly.437.tgz#c4ee3cc16eabccc938f570b3ac0099cb88a733b7" - integrity sha512-ube0mSDkSOP/O/pjnuoTbGgatlJrxrg0sF+bdrUEzeAEYDREOTp+M0QfSfgCx2fICMDSLohK+YzTWV3djz4GVg== +"@parcel/ts-utils@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/ts-utils/-/ts-utils-2.0.0-nightly.440.tgz#abfd9ea86cafc209b919142f57d9f435170a3721" + integrity sha512-8fgEwSMdZncLLmqQ46pBkATp0E1tZUOT/uNcpUd1l2ziCW5FLalpvs3EallnvnxmD1rX/ZmJdKVhqk1kg4gngw== dependencies: nullthrows "^1.1.1" -"@parcel/types@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/types/-/types-2.0.0-nightly.437.tgz#270de41b9db67099d4e2339f6ebb4adf40595fae" - integrity sha512-Cq9CGZSEkadJt+xQSv8znCFnhwBsms4OaaqvhIp5H9OfYQGNAtocczG0YQRQKewXmkwHHlTO7qOjHIt0xfsVwQ== +"@parcel/types@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/types/-/types-2.0.0-nightly.440.tgz#122fe1eb81741f18710e4622cbbd24316be634e4" + integrity sha512-kzKcR0uOerd9w70bt8oq5i+gK7aJ1uA+TFesvGpNO6657HQxGJ94tGWTCFw6deSjG+6+z6movXEL+FCzEyR77A== -"@parcel/utils@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-2.0.0-nightly.437.tgz#4905a6b912cb10e6b0ab2565c272e96a76cd7469" - integrity sha512-0wzYGxj/90m3zHEGd5szGLyHiTKI13ccI8jH1kvArWJvqlssgy+ajfQiaHQIrJ7YR/OgxFKdxYuaPRe6s4gcpA== +"@parcel/utils@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-2.0.0-nightly.440.tgz#34b549e565460eaddc90174728d27c9959b4f402" + integrity sha512-VKPXrPmzggVNCmwICs9FCBdMSeB0vfJRZNNrzyDhYBA4wkTNFGui8GFdVFI8a3zVgit9LxqxMeNOQ18d1nNbMw== dependencies: "@iarna/toml" "^2.2.0" - "@parcel/codeframe" "2.0.0-nightly.437+a2dc60f2" - "@parcel/diagnostic" "2.0.0-nightly.437+a2dc60f2" - "@parcel/logger" "2.0.0-nightly.437+a2dc60f2" - "@parcel/markdown-ansi" "2.0.0-nightly.437+a2dc60f2" + "@parcel/codeframe" "2.0.0-nightly.440+a5e23487" + "@parcel/diagnostic" "2.0.0-nightly.440+a5e23487" + "@parcel/logger" "2.0.0-nightly.440+a5e23487" + "@parcel/markdown-ansi" "2.0.0-nightly.440+a5e23487" "@parcel/source-map" "2.0.0-alpha.4.16" ansi-html "^0.0.7" chalk "^2.4.2" @@ -2925,14 +2925,14 @@ node-addon-api "^3.0.0" node-gyp-build "^4.2.1" -"@parcel/workers@2.0.0-nightly.437+a2dc60f2": - version "2.0.0-nightly.437" - resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-2.0.0-nightly.437.tgz#4c5d096d9102cbbd9b5b379edc5e3ee35f8bc275" - integrity sha512-bcJMAkiD4PthVbbuY59zmdQo48GI6bFBdJLUcrsp4DCoxrhHwcFx7tcljXRIGzZCRoUa4tqqdSZn6GmF43qnMg== +"@parcel/workers@2.0.0-nightly.440+a5e23487": + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-2.0.0-nightly.440.tgz#dac36d9ba2f18c632c56e8271d878048fd3b955d" + integrity sha512-DvuB8TZXsYJ7hOpKxTnzeV/kWTnvo1wjJEPboOzfzfIl4seZjr6gVHC70T+06Aip1MnxUBVFPtHLsZkYN8AIjg== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.437+a2dc60f2" - "@parcel/logger" "2.0.0-nightly.437+a2dc60f2" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" + "@parcel/diagnostic" "2.0.0-nightly.440+a5e23487" + "@parcel/logger" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" chrome-trace-event "^1.0.2" nullthrows "^1.1.1" @@ -10372,19 +10372,19 @@ parallel-transform@^1.1.0: inherits "^2.0.3" readable-stream "^2.1.5" -parcel@2.0.0-nightly.435: - version "2.0.0-nightly.435" - resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.0.0-nightly.435.tgz#a77df8a3c7663ba08c7861d8152da3b107740c2c" - integrity sha512-9p4bRUw14F0zHvAE8hNRPOsbu4SJIvzScQiV979TsZ83u7C1BBNkhgJV9M52h9Z/KxN2EDPfVj1anS1rQVxxWQ== - dependencies: - "@parcel/config-default" "2.0.0-nightly.437+a2dc60f2" - "@parcel/core" "2.0.0-nightly.435+a2dc60f2" - "@parcel/diagnostic" "2.0.0-nightly.437+a2dc60f2" - "@parcel/events" "2.0.0-nightly.437+a2dc60f2" - "@parcel/fs" "2.0.0-nightly.437+a2dc60f2" - "@parcel/logger" "2.0.0-nightly.437+a2dc60f2" - "@parcel/package-manager" "2.0.0-nightly.437+a2dc60f2" - "@parcel/utils" "2.0.0-nightly.437+a2dc60f2" +parcel@2.0.0-nightly.438: + version "2.0.0-nightly.438" + resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.0.0-nightly.438.tgz#0a0b1c818a4227aa40bcdf2f8262abd6e883b2ef" + integrity sha512-m21vpFeKibMX+ssXsAWQnkqgfMd0yeJhFGd03SyaM7oJEk8+lGwI4ibAuYISLh0M6FzBvVzQaFIe0m5Xz1yfvA== + dependencies: + "@parcel/config-default" "2.0.0-nightly.440+a5e23487" + "@parcel/core" "2.0.0-nightly.438+a5e23487" + "@parcel/diagnostic" "2.0.0-nightly.440+a5e23487" + "@parcel/events" "2.0.0-nightly.440+a5e23487" + "@parcel/fs" "2.0.0-nightly.440+a5e23487" + "@parcel/logger" "2.0.0-nightly.440+a5e23487" + "@parcel/package-manager" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.440+a5e23487" chalk "^2.1.0" commander "^2.19.0" get-port "^4.2.0" From d5e3871b994623011128ec19e1841d0741be8861 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 1 Nov 2020 18:38:40 +0000 Subject: [PATCH 018/314] chore(deps-dev): bump @octokit/rest from 18.0.7 to 18.0.8 (#11240) Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 18.0.7 to 18.0.8. - [Release notes](https://github.com/octokit/rest.js/releases) - [Commits](https://github.com/octokit/rest.js/compare/v18.0.7...v18.0.8) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/aws-cdk/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 4023ba9646d0b..5ea0d235f312e 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -61,7 +61,7 @@ "sinon": "^9.2.1", "ts-jest": "^26.4.3", "ts-mock-imports": "^1.3.0", - "@octokit/rest": "^18.0.7", + "@octokit/rest": "^18.0.8", "make-runnable": "^1.3.8" }, "dependencies": { diff --git a/yarn.lock b/yarn.lock index 6d1ff3772530f..114d3f66313f6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2128,10 +2128,10 @@ once "^1.4.0" universal-user-agent "^4.0.0" -"@octokit/rest@^18.0.7": - version "18.0.7" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.7.tgz#236514417084334bc0ef62416a19f6030db3d907" - integrity sha512-ctz0cMIb3c6gO2ADto+A1r4JI+2hkUkDcD1JRunkhk1SOUrNGQcQ+9FBqZ6UekS1Z/c3xPvF0OoLtX2cQ118+A== +"@octokit/rest@^18.0.8": + version "18.0.8" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.8.tgz#c49792e4f02fea6510216d1cecc98075add7db53" + integrity sha512-crYqQWFS/75o+FSE2Ejpt0Tk9FgkQ4aGvToptqbnvlfViE/C4hVAtmn/X0emQ8Q3wg1tYXYNIcuG1XXSOEeARg== dependencies: "@octokit/core" "^3.0.0" "@octokit/plugin-paginate-rest" "^2.2.0" From 014619ea98aee02caaf5c423434f565d835471b7 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 2 Nov 2020 14:03:07 +0000 Subject: [PATCH 019/314] chore(deps): bump jest from 26.6.1 to 26.6.2 (#11251) Bumps [jest](https://github.com/facebook/jest) from 26.6.1 to 26.6.2. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/compare/v26.6.1...v26.6.2) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- .../ecs-service-extensions/package.json | 2 +- packages/@aws-cdk/assert/package.json | 4 +- packages/@aws-cdk/aws-appsync/package.json | 2 +- .../aws-autoscaling-hooktargets/package.json | 2 +- packages/@aws-cdk/aws-batch/package.json | 2 +- packages/@aws-cdk/aws-cloudtrail/package.json | 2 +- .../aws-cloudwatch-actions/package.json | 2 +- packages/@aws-cdk/aws-cognito/package.json | 2 +- packages/@aws-cdk/aws-dynamodb/package.json | 2 +- .../@aws-cdk/aws-ecs-patterns/package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../@aws-cdk/aws-events-targets/package.json | 2 +- packages/@aws-cdk/aws-glue/package.json | 2 +- packages/@aws-cdk/aws-iam/package.json | 2 +- .../aws-lambda-destinations/package.json | 2 +- packages/@aws-cdk/aws-lambda/package.json | 2 +- .../aws-logs-destinations/package.json | 2 +- packages/@aws-cdk/aws-redshift/package.json | 2 +- .../aws-route53-patterns/package.json | 2 +- .../@aws-cdk/aws-route53-targets/package.json | 2 +- .../@aws-cdk/aws-s3-deployment/package.json | 2 +- .../aws-s3-notifications/package.json | 2 +- packages/@aws-cdk/aws-sam/package.json | 2 +- .../@aws-cdk/aws-ses-actions/package.json | 2 +- .../aws-sns-subscriptions/package.json | 2 +- .../aws-stepfunctions-tasks/package.json | 2 +- .../@aws-cdk/cdk-assets-schema/package.json | 2 +- .../cloud-assembly-schema/package.json | 2 +- .../@aws-cdk/cloudformation-diff/package.json | 2 +- .../cloudformation-include/package.json | 2 +- packages/@aws-cdk/cx-api/package.json | 2 +- .../example-construct-library/package.json | 2 +- packages/@aws-cdk/yaml-cfn/package.json | 2 +- .../@monocdk-experiment/assert/package.json | 4 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- packages/cdk-dasm/package.json | 2 +- packages/decdk/package.json | 2 +- tools/cdk-build-tools/package.json | 2 +- tools/cfn2ts/package.json | 2 +- tools/eslint-plugin-cdk/package.json | 2 +- tools/nodeunit-shim/package.json | 2 +- tools/pkglint/package.json | 2 +- tools/yarn-cling/package.json | 2 +- yarn.lock | 685 +++++++++--------- 46 files changed, 408 insertions(+), 371 deletions(-) diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/package.json b/packages/@aws-cdk-containers/ecs-service-extensions/package.json index 6969fcd980fb1..717f7d866ecaa 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/package.json +++ b/packages/@aws-cdk-containers/ecs-service-extensions/package.json @@ -40,7 +40,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "nodeunit": "^0.11.3", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/assert/package.json b/packages/@aws-cdk/assert/package.json index 5e320f5b393de..69b4b33f6dc31 100644 --- a/packages/@aws-cdk/assert/package.json +++ b/packages/@aws-cdk/assert/package.json @@ -23,7 +23,7 @@ "devDependencies": { "@types/jest": "^26.0.15", "cdk-build-tools": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0", "ts-jest": "^26.4.3" }, @@ -37,7 +37,7 @@ "peerDependencies": { "@aws-cdk/core": "0.0.0", "constructs": "^3.2.0", - "jest": "^26.6.1" + "jest": "^26.6.2" }, "repository": { "url": "https://github.com/aws/aws-cdk.git", diff --git a/packages/@aws-cdk/aws-appsync/package.json b/packages/@aws-cdk/aws-appsync/package.json index adbec0f587e77..e581f2571e319 100644 --- a/packages/@aws-cdk/aws-appsync/package.json +++ b/packages/@aws-cdk/aws-appsync/package.json @@ -76,7 +76,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json b/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json index 7321dff3ad7f3..0186188607c1f 100644 --- a/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json +++ b/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json @@ -68,7 +68,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-batch/package.json b/packages/@aws-cdk/aws-batch/package.json index da76870a75613..29cef75395c80 100644 --- a/packages/@aws-cdk/aws-batch/package.json +++ b/packages/@aws-cdk/aws-batch/package.json @@ -76,7 +76,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index 4fcc0dbc2bfab..948366ccdd40b 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -78,7 +78,7 @@ "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", "colors": "^1.4.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-cloudwatch-actions/package.json b/packages/@aws-cdk/aws-cloudwatch-actions/package.json index f831bf93c58b1..db92190779c89 100644 --- a/packages/@aws-cdk/aws-cloudwatch-actions/package.json +++ b/packages/@aws-cdk/aws-cloudwatch-actions/package.json @@ -68,7 +68,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-cognito/package.json b/packages/@aws-cdk/aws-cognito/package.json index 3d554308d1bff..65b323b314f49 100644 --- a/packages/@aws-cdk/aws-cognito/package.json +++ b/packages/@aws-cdk/aws-cognito/package.json @@ -76,7 +76,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index 5628ff5fdac9a..8865f499cac7d 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -79,7 +79,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0", "sinon": "^9.2.1", "ts-jest": "^26.4.3" diff --git a/packages/@aws-cdk/aws-ecs-patterns/package.json b/packages/@aws-cdk/aws-ecs-patterns/package.json index 0e560b1bc890e..0346f7d8249c5 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/package.json +++ b/packages/@aws-cdk/aws-ecs-patterns/package.json @@ -69,7 +69,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "nodeunit": "^0.11.3", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json index 0f40a2524d758..9c9f761877c58 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json @@ -67,7 +67,7 @@ "@aws-cdk/assert": "0.0.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json b/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json index ed0c1fc557364..4ea10b411db4a 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json @@ -67,7 +67,7 @@ "@aws-cdk/assert": "0.0.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index 1cc1e2b88e5f0..0e69893108203 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -79,7 +79,7 @@ "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-glue/package.json b/packages/@aws-cdk/aws-glue/package.json index ceea68cd2e99f..159b8b34e4d90 100644 --- a/packages/@aws-cdk/aws-glue/package.json +++ b/packages/@aws-cdk/aws-glue/package.json @@ -77,7 +77,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-iam/package.json b/packages/@aws-cdk/aws-iam/package.json index afa2349dbafca..6fc9916bf6931 100644 --- a/packages/@aws-cdk/aws-iam/package.json +++ b/packages/@aws-cdk/aws-iam/package.json @@ -76,7 +76,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0", "sinon": "^9.2.1" }, diff --git a/packages/@aws-cdk/aws-lambda-destinations/package.json b/packages/@aws-cdk/aws-lambda-destinations/package.json index 1aa2a9d9ae0d0..24fee477a20fd 100644 --- a/packages/@aws-cdk/aws-lambda-destinations/package.json +++ b/packages/@aws-cdk/aws-lambda-destinations/package.json @@ -67,7 +67,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-lambda/package.json b/packages/@aws-cdk/aws-lambda/package.json index 8288e16cab85e..7758804cc8576 100644 --- a/packages/@aws-cdk/aws-lambda/package.json +++ b/packages/@aws-cdk/aws-lambda/package.json @@ -82,7 +82,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "lodash": "^4.17.20", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/aws-logs-destinations/package.json b/packages/@aws-cdk/aws-logs-destinations/package.json index e930eefe55fe9..71d97a7819a1e 100644 --- a/packages/@aws-cdk/aws-logs-destinations/package.json +++ b/packages/@aws-cdk/aws-logs-destinations/package.json @@ -67,7 +67,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-redshift/package.json b/packages/@aws-cdk/aws-redshift/package.json index a7b8605445892..3f447e2adb6f3 100644 --- a/packages/@aws-cdk/aws-redshift/package.json +++ b/packages/@aws-cdk/aws-redshift/package.json @@ -75,7 +75,7 @@ "@aws-cdk/assert": "0.0.0", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-route53-patterns/package.json b/packages/@aws-cdk/aws-route53-patterns/package.json index 93b1f67430a73..1f238f9748525 100644 --- a/packages/@aws-cdk/aws-route53-patterns/package.json +++ b/packages/@aws-cdk/aws-route53-patterns/package.json @@ -68,7 +68,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-route53-targets/package.json b/packages/@aws-cdk/aws-route53-targets/package.json index 159a9cfd85ff3..d5d2fe006a2ba 100644 --- a/packages/@aws-cdk/aws-route53-targets/package.json +++ b/packages/@aws-cdk/aws-route53-targets/package.json @@ -69,7 +69,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-s3-deployment/package.json b/packages/@aws-cdk/aws-s3-deployment/package.json index 26305003000cf..f9433f28219aa 100644 --- a/packages/@aws-cdk/aws-s3-deployment/package.json +++ b/packages/@aws-cdk/aws-s3-deployment/package.json @@ -87,7 +87,7 @@ "@types/jest": "^26.0.15", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-s3-notifications/package.json b/packages/@aws-cdk/aws-s3-notifications/package.json index 0c4238fb948c5..82ca306725db4 100644 --- a/packages/@aws-cdk/aws-s3-notifications/package.json +++ b/packages/@aws-cdk/aws-s3-notifications/package.json @@ -66,7 +66,7 @@ "@aws-cdk/assert": "0.0.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-sam/package.json b/packages/@aws-cdk/aws-sam/package.json index 32f18719db68f..55628df0a22b8 100644 --- a/packages/@aws-cdk/aws-sam/package.json +++ b/packages/@aws-cdk/aws-sam/package.json @@ -77,7 +77,7 @@ "@types/jest": "^26.0.15", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0", "ts-jest": "^26.4.3" }, diff --git a/packages/@aws-cdk/aws-ses-actions/package.json b/packages/@aws-cdk/aws-ses-actions/package.json index f06d590aed053..195987a744c20 100644 --- a/packages/@aws-cdk/aws-ses-actions/package.json +++ b/packages/@aws-cdk/aws-ses-actions/package.json @@ -68,7 +68,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-sns-subscriptions/package.json b/packages/@aws-cdk/aws-sns-subscriptions/package.json index 6b912736592ca..5748d2b2e7ff8 100644 --- a/packages/@aws-cdk/aws-sns-subscriptions/package.json +++ b/packages/@aws-cdk/aws-sns-subscriptions/package.json @@ -67,7 +67,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/package.json b/packages/@aws-cdk/aws-stepfunctions-tasks/package.json index a4324e74a0106..89e7ccff64834 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/package.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/package.json @@ -69,7 +69,7 @@ "@aws-cdk/aws-sns-subscriptions": "0.0.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/cdk-assets-schema/package.json b/packages/@aws-cdk/cdk-assets-schema/package.json index ddf0543214beb..e4e13bcbcbe65 100644 --- a/packages/@aws-cdk/cdk-assets-schema/package.json +++ b/packages/@aws-cdk/cdk-assets-schema/package.json @@ -53,7 +53,7 @@ "devDependencies": { "@types/jest": "^26.0.15", "cdk-build-tools": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0" }, "repository": { diff --git a/packages/@aws-cdk/cloud-assembly-schema/package.json b/packages/@aws-cdk/cloud-assembly-schema/package.json index 41bc7dc316754..52ea52791b921 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/package.json +++ b/packages/@aws-cdk/cloud-assembly-schema/package.json @@ -55,7 +55,7 @@ "@types/jest": "^26.0.15", "@types/mock-fs": "^4.13.0", "cdk-build-tools": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "mock-fs": "^4.13.0", "pkglint": "0.0.0", "typescript-json-schema": "^0.43.0" diff --git a/packages/@aws-cdk/cloudformation-diff/package.json b/packages/@aws-cdk/cloudformation-diff/package.json index c2e716a807586..0a925994900e6 100644 --- a/packages/@aws-cdk/cloudformation-diff/package.json +++ b/packages/@aws-cdk/cloudformation-diff/package.json @@ -34,7 +34,7 @@ "@types/table": "^5.0.0", "cdk-build-tools": "0.0.0", "fast-check": "^2.6.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0", "ts-jest": "^26.4.3" }, diff --git a/packages/@aws-cdk/cloudformation-include/package.json b/packages/@aws-cdk/cloudformation-include/package.json index 92fb2d7adf0a6..6a127362a69fe 100644 --- a/packages/@aws-cdk/cloudformation-include/package.json +++ b/packages/@aws-cdk/cloudformation-include/package.json @@ -330,7 +330,7 @@ "@types/jest": "^26.0.15", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0", "ts-jest": "^26.4.3" }, diff --git a/packages/@aws-cdk/cx-api/package.json b/packages/@aws-cdk/cx-api/package.json index a1fa098f13738..3e76aaf9338a3 100644 --- a/packages/@aws-cdk/cx-api/package.json +++ b/packages/@aws-cdk/cx-api/package.json @@ -62,7 +62,7 @@ "@types/mock-fs": "^4.13.0", "@types/semver": "^7.3.4", "cdk-build-tools": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "mock-fs": "^4.13.0", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/example-construct-library/package.json b/packages/@aws-cdk/example-construct-library/package.json index 98b5f8f67b509..cbb9c4454bf4c 100644 --- a/packages/@aws-cdk/example-construct-library/package.json +++ b/packages/@aws-cdk/example-construct-library/package.json @@ -68,7 +68,7 @@ "@aws-cdk/assert": "0.0.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/yaml-cfn/package.json b/packages/@aws-cdk/yaml-cfn/package.json index f7a89fbf1aa84..222dca7bbbe97 100644 --- a/packages/@aws-cdk/yaml-cfn/package.json +++ b/packages/@aws-cdk/yaml-cfn/package.json @@ -71,7 +71,7 @@ "@types/jest": "^26.0.15", "@types/yaml": "^1.9.7", "cdk-build-tools": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0" }, "bundledDependencies": [ diff --git a/packages/@monocdk-experiment/assert/package.json b/packages/@monocdk-experiment/assert/package.json index 00310c9815af3..d977569089e34 100644 --- a/packages/@monocdk-experiment/assert/package.json +++ b/packages/@monocdk-experiment/assert/package.json @@ -38,7 +38,7 @@ "@types/node": "^10.17.44", "cdk-build-tools": "0.0.0", "constructs": "^3.2.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "monocdk": "0.0.0", "pkglint": "0.0.0", "ts-jest": "^26.4.3" @@ -48,7 +48,7 @@ }, "peerDependencies": { "constructs": "^3.0.4", - "jest": "^26.6.1", + "jest": "^26.6.2", "monocdk": "^0.0.0" }, "repository": { diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 5ea0d235f312e..8256d338fdadb 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -55,7 +55,7 @@ "@types/yargs": "^15.0.9", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "mockery": "^2.1.0", "pkglint": "0.0.0", "sinon": "^9.2.1", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index 25edd52c7943d..b64e7cf36a5be 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -38,7 +38,7 @@ "@types/node": "^10.17.44", "@types/yargs": "^15.0.9", "cdk-build-tools": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "jszip": "^3.5.0", "mock-fs": "^4.13.0", "pkglint": "0.0.0" diff --git a/packages/cdk-dasm/package.json b/packages/cdk-dasm/package.json index 22917b59c1fcc..48da1c3c4d5c1 100644 --- a/packages/cdk-dasm/package.json +++ b/packages/cdk-dasm/package.json @@ -32,7 +32,7 @@ "devDependencies": { "@types/jest": "^26.0.15", "@types/yaml": "1.9.7", - "jest": "^26.6.1" + "jest": "^26.6.2" }, "keywords": [ "aws", diff --git a/packages/decdk/package.json b/packages/decdk/package.json index ab608bcbd2c31..f060b0c39e82c 100644 --- a/packages/decdk/package.json +++ b/packages/decdk/package.json @@ -200,7 +200,7 @@ "@types/jest": "^26.0.15", "@types/yaml": "1.9.7", "@types/yargs": "^15.0.9", - "jest": "^26.6.1", + "jest": "^26.6.2", "jsii": "^1.14.0" }, "keywords": [ diff --git a/tools/cdk-build-tools/package.json b/tools/cdk-build-tools/package.json index 53e2c7198fc50..3e7b7e18110ac 100644 --- a/tools/cdk-build-tools/package.json +++ b/tools/cdk-build-tools/package.json @@ -49,7 +49,7 @@ "eslint-import-resolver-typescript": "^2.3.0", "eslint-plugin-import": "^2.22.1", "fs-extra": "^9.0.1", - "jest": "^26.6.1", + "jest": "^26.6.2", "jsii": "^1.14.0", "jsii-pacmak": "^1.14.0", "nodeunit": "^0.11.3", diff --git a/tools/cfn2ts/package.json b/tools/cfn2ts/package.json index d1aedf2f03824..c23b7947f9613 100644 --- a/tools/cfn2ts/package.json +++ b/tools/cfn2ts/package.json @@ -40,7 +40,7 @@ "@types/jest": "^26.0.15", "@types/yargs": "^15.0.9", "cdk-build-tools": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0" }, "keywords": [ diff --git a/tools/eslint-plugin-cdk/package.json b/tools/eslint-plugin-cdk/package.json index 840b5b578a2ce..14d4ae0cc7c19 100644 --- a/tools/eslint-plugin-cdk/package.json +++ b/tools/eslint-plugin-cdk/package.json @@ -17,7 +17,7 @@ "@types/jest": "^26.0.15", "@types/node": "^10.17.44", "eslint-plugin-rulesdir": "^0.1.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "typescript": "~3.9.7" }, "dependencies": { diff --git a/tools/nodeunit-shim/package.json b/tools/nodeunit-shim/package.json index 4d1981eaed8d1..e252d5a964ceb 100644 --- a/tools/nodeunit-shim/package.json +++ b/tools/nodeunit-shim/package.json @@ -17,7 +17,7 @@ "typescript": "~3.9.7" }, "dependencies": { - "jest": "^26.6.1" + "jest": "^26.6.2" }, "keywords": [], "author": "", diff --git a/tools/pkglint/package.json b/tools/pkglint/package.json index cbddea940b58f..a1c12bec5eb9f 100644 --- a/tools/pkglint/package.json +++ b/tools/pkglint/package.json @@ -39,7 +39,7 @@ "@types/semver": "^7.3.4", "@types/yargs": "^15.0.9", "eslint-plugin-cdk": "0.0.0", - "jest": "^26.6.1", + "jest": "^26.6.2", "typescript": "~3.9.7" }, "dependencies": { diff --git a/tools/yarn-cling/package.json b/tools/yarn-cling/package.json index 9ab91dbd1b5bd..7d15368a5a6f8 100644 --- a/tools/yarn-cling/package.json +++ b/tools/yarn-cling/package.json @@ -41,7 +41,7 @@ "@types/jest": "^26.0.15", "@types/node": "^10.17.44", "@types/yarnpkg__lockfile": "^1.1.4", - "jest": "^26.6.1", + "jest": "^26.6.2", "pkglint": "0.0.0", "typescript": "~3.9.7" }, diff --git a/yarn.lock b/yarn.lock index 114d3f66313f6..b7dac7e1b88df 100644 --- a/yarn.lock +++ b/yarn.lock @@ -497,6 +497,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-syntax-top-level-await@^7.8.3": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.1.tgz#dd6c0b357ac1bb142d98537450a319625d13d2a0" + integrity sha512-i7ooMZFS+a/Om0crxZodrTzNEPJHZrlMVGMTEpFAj6rYY/bKCddB0Dk/YxfPuYXOopuhKk/e1jV6h+WUU9XN3A== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-typescript@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.10.4.tgz#2f55e770d3501e83af217d782cb7517d7bb34d25" @@ -1084,46 +1091,46 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== -"@jest/console@^26.6.1": - version "26.6.1" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-26.6.1.tgz#6a19eaac4aa8687b4db9130495817c65aec3d34e" - integrity sha512-cjqcXepwC5M+VeIhwT6Xpi/tT4AiNzlIx8SMJ9IihduHnsSrnWNvTBfKIpmqOOCNOPqtbBx6w2JqfoLOJguo8g== +"@jest/console@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-26.6.2.tgz#4e04bc464014358b03ab4937805ee36a0aeb98f2" + integrity sha512-IY1R2i2aLsLr7Id3S6p2BA82GNWryt4oSvEXLAKc+L2zdi89dSkE8xC1C+0kpATG4JhBJREnQOH7/zmccM2B0g== dependencies: - "@jest/types" "^26.6.1" + "@jest/types" "^26.6.2" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^26.6.1" - jest-util "^26.6.1" + jest-message-util "^26.6.2" + jest-util "^26.6.2" slash "^3.0.0" -"@jest/core@^26.6.1": - version "26.6.1" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-26.6.1.tgz#77426822f667a2cda82bf917cee11cc8ba71f9ac" - integrity sha512-p4F0pgK3rKnoS9olXXXOkbus1Bsu6fd8pcvLMPsUy4CVXZ8WSeiwQ1lK5hwkCIqJ+amZOYPd778sbPha/S8Srw== +"@jest/core@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-26.6.2.tgz#6d669385c3fda0e2271464de890da4122e61548e" + integrity sha512-x0v0LVlEslGYGYk4StT90NUp7vbFBrh0K7KDyAg3hMhG0drrxOIQHsY05uC7XVlKHXFgGI+HdnU35qewMZOLFQ== dependencies: - "@jest/console" "^26.6.1" - "@jest/reporters" "^26.6.1" - "@jest/test-result" "^26.6.1" - "@jest/transform" "^26.6.1" - "@jest/types" "^26.6.1" + "@jest/console" "^26.6.2" + "@jest/reporters" "^26.6.2" + "@jest/test-result" "^26.6.2" + "@jest/transform" "^26.6.2" + "@jest/types" "^26.6.2" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" - jest-changed-files "^26.6.1" - jest-config "^26.6.1" - jest-haste-map "^26.6.1" - jest-message-util "^26.6.1" + jest-changed-files "^26.6.2" + jest-config "^26.6.2" + jest-haste-map "^26.6.2" + jest-message-util "^26.6.2" jest-regex-util "^26.0.0" - jest-resolve "^26.6.1" - jest-resolve-dependencies "^26.6.1" - jest-runner "^26.6.1" - jest-runtime "^26.6.1" - jest-snapshot "^26.6.1" - jest-util "^26.6.1" - jest-validate "^26.6.1" - jest-watcher "^26.6.1" + jest-resolve "^26.6.2" + jest-resolve-dependencies "^26.6.2" + jest-runner "^26.6.2" + jest-runtime "^26.6.2" + jest-snapshot "^26.6.2" + jest-util "^26.6.2" + jest-validate "^26.6.2" + jest-watcher "^26.6.2" micromatch "^4.0.2" p-each-series "^2.1.0" rimraf "^3.0.0" @@ -1135,47 +1142,47 @@ resolved "https://registry.yarnpkg.com/@jest/create-cache-key-function/-/create-cache-key-function-26.5.0.tgz#1d07947adc51ea17766d9f0ccf5a8d6ea94c47dc" integrity sha512-DJ+pEBUIqarrbv1W/C39f9YH0rJ4wsXZ/VC6JafJPlHW2HOucKceeaqTOQj9MEDQZjySxMLkOq5mfXZXNZcmWw== -"@jest/environment@^26.6.1": - version "26.6.1" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-26.6.1.tgz#38a56f1cc66f96bf53befcc5ebeaf1c2dce90e9a" - integrity sha512-GNvHwkOFJtNgSwdzH9flUPzF9AYAZhUg124CBoQcwcZCM9s5TLz8Y3fMtiaWt4ffbigoetjGk5PU2Dd8nLrSEw== +"@jest/environment@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-26.6.2.tgz#ba364cc72e221e79cc8f0a99555bf5d7577cf92c" + integrity sha512-nFy+fHl28zUrRsCeMB61VDThV1pVTtlEokBRgqPrcT1JNq4yRNIyTHfyht6PqtUvY9IsuLGTrbG8kPXjSZIZwA== dependencies: - "@jest/fake-timers" "^26.6.1" - "@jest/types" "^26.6.1" + "@jest/fake-timers" "^26.6.2" + "@jest/types" "^26.6.2" "@types/node" "*" - jest-mock "^26.6.1" + jest-mock "^26.6.2" -"@jest/fake-timers@^26.6.1": - version "26.6.1" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-26.6.1.tgz#5aafba1822075b7142e702b906094bea15f51acf" - integrity sha512-T/SkMLgOquenw/nIisBRD6XAYpFir0kNuclYLkse5BpzeDUukyBr+K31xgAo9M0hgjU9ORlekAYPSzc0DKfmKg== +"@jest/fake-timers@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-26.6.2.tgz#459c329bcf70cee4af4d7e3f3e67848123535aad" + integrity sha512-14Uleatt7jdzefLPYM3KLcnUl1ZNikaKq34enpb5XG9i81JpppDb5muZvonvKyrl7ftEHkKS5L5/eB/kxJ+bvA== dependencies: - "@jest/types" "^26.6.1" + "@jest/types" "^26.6.2" "@sinonjs/fake-timers" "^6.0.1" "@types/node" "*" - jest-message-util "^26.6.1" - jest-mock "^26.6.1" - jest-util "^26.6.1" + jest-message-util "^26.6.2" + jest-mock "^26.6.2" + jest-util "^26.6.2" -"@jest/globals@^26.6.1": - version "26.6.1" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-26.6.1.tgz#b232c7611d8a2de62b4bf9eb9a007138322916f4" - integrity sha512-acxXsSguuLV/CeMYmBseefw6apO7NuXqpE+v5r3yD9ye2PY7h1nS20vY7Obk2w6S7eJO4OIAJeDnoGcLC/McEQ== +"@jest/globals@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-26.6.2.tgz#5b613b78a1aa2655ae908eba638cc96a20df720a" + integrity sha512-85Ltnm7HlB/KesBUuALwQ68YTU72w9H2xW9FjZ1eL1U3lhtefjjl5c2MiUbpXt/i6LaPRvoOFJ22yCBSfQ0JIA== dependencies: - "@jest/environment" "^26.6.1" - "@jest/types" "^26.6.1" - expect "^26.6.1" + "@jest/environment" "^26.6.2" + "@jest/types" "^26.6.2" + expect "^26.6.2" -"@jest/reporters@^26.6.1": - version "26.6.1" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-26.6.1.tgz#582ede05278cf5eeffe58bc519f4a35f54fbcb0d" - integrity sha512-J6OlXVFY3q1SXWJhjme5i7qT/BAZSikdOK2t8Ht5OS32BDo6KfG5CzIzzIFnAVd82/WWbc9Hb7SJ/jwSvVH9YA== +"@jest/reporters@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-26.6.2.tgz#1f518b99637a5f18307bd3ecf9275f6882a667f6" + integrity sha512-h2bW53APG4HvkOnVMo8q3QXa6pcaNt1HkwVsOPMBV6LD/q9oSpxNSYZQYkAnjdMjrJ86UuYeLo+aEZClV6opnw== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^26.6.1" - "@jest/test-result" "^26.6.1" - "@jest/transform" "^26.6.1" - "@jest/types" "^26.6.1" + "@jest/console" "^26.6.2" + "@jest/test-result" "^26.6.2" + "@jest/transform" "^26.6.2" + "@jest/types" "^26.6.2" chalk "^4.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" @@ -1186,63 +1193,63 @@ istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.0.2" - jest-haste-map "^26.6.1" - jest-resolve "^26.6.1" - jest-util "^26.6.1" - jest-worker "^26.6.1" + jest-haste-map "^26.6.2" + jest-resolve "^26.6.2" + jest-util "^26.6.2" + jest-worker "^26.6.2" slash "^3.0.0" source-map "^0.6.0" string-length "^4.0.1" terminal-link "^2.0.0" - v8-to-istanbul "^6.0.1" + v8-to-istanbul "^7.0.0" optionalDependencies: node-notifier "^8.0.0" -"@jest/source-map@^26.5.0": - version "26.5.0" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-26.5.0.tgz#98792457c85bdd902365cd2847b58fff05d96367" - integrity sha512-jWAw9ZwYHJMe9eZq/WrsHlwF8E3hM9gynlcDpOyCb9bR8wEd9ZNBZCi7/jZyzHxC7t3thZ10gO2IDhu0bPKS5g== +"@jest/source-map@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-26.6.2.tgz#29af5e1e2e324cafccc936f218309f54ab69d535" + integrity sha512-YwYcCwAnNmOVsZ8mr3GfnzdXDAl4LaenZP5z+G0c8bzC9/dugL8zRmxZzdoTl4IaS3CryS1uWnROLPFmb6lVvA== dependencies: callsites "^3.0.0" graceful-fs "^4.2.4" source-map "^0.6.0" -"@jest/test-result@^26.6.1": - version "26.6.1" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-26.6.1.tgz#d75698d8a06aa663e8936663778c831512330cc1" - integrity sha512-wqAgIerIN2gSdT2A8WeA5+AFh9XQBqYGf8etK143yng3qYd0mF0ie2W5PVmgnjw4VDU6ammI9NdXrKgNhreawg== +"@jest/test-result@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-26.6.2.tgz#55da58b62df134576cc95476efa5f7949e3f5f18" + integrity sha512-5O7H5c/7YlojphYNrK02LlDIV2GNPYisKwHm2QTKjNZeEzezCbwYs9swJySv2UfPMyZ0VdsmMv7jIlD/IKYQpQ== dependencies: - "@jest/console" "^26.6.1" - "@jest/types" "^26.6.1" + "@jest/console" "^26.6.2" + "@jest/types" "^26.6.2" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^26.6.1": - version "26.6.1" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-26.6.1.tgz#34216ac2c194b0eeebde30d25424d1134703fd2e" - integrity sha512-0csqA/XApZiNeTIPYh6koIDCACSoR6hi29T61tKJMtCZdEC+tF3PoNt7MS0oK/zKC6daBgCbqXxia5ztr/NyCQ== +"@jest/test-sequencer@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-26.6.2.tgz#4f9a705d0368f61a820bd9a281c8ce83a1facaf3" + integrity sha512-iHiEXLMP69Ohe6kFMOVz6geADRxwK+OkLGg0VIGfZrUdkJGiCpghkMb2946FLh7jvzOwwZGyQoMi+kaHiOdM5g== dependencies: - "@jest/test-result" "^26.6.1" + "@jest/test-result" "^26.6.2" graceful-fs "^4.2.4" - jest-haste-map "^26.6.1" - jest-runner "^26.6.1" - jest-runtime "^26.6.1" + jest-haste-map "^26.6.2" + jest-runner "^26.6.2" + jest-runtime "^26.6.2" -"@jest/transform@^26.6.1": - version "26.6.1" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-26.6.1.tgz#f70786f96e0f765947b4fb4f54ffcfb7bd783711" - integrity sha512-oNFAqVtqRxZRx6vXL3I4bPKUK0BIlEeaalkwxyQGGI8oXDQBtYQBpiMe5F7qPs4QdvvFYB42gPGIMMcxXaBBxQ== +"@jest/transform@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-26.6.2.tgz#5ac57c5fa1ad17b2aae83e73e45813894dcf2e4b" + integrity sha512-E9JjhUgNzvuQ+vVAL21vlyfy12gP0GhazGgJC4h6qUt1jSdUXGWJ1wfu/X7Sd8etSgxV4ovT1pb9v5D6QW4XgA== dependencies: "@babel/core" "^7.1.0" - "@jest/types" "^26.6.1" + "@jest/types" "^26.6.2" babel-plugin-istanbul "^6.0.0" chalk "^4.0.0" convert-source-map "^1.4.0" fast-json-stable-stringify "^2.0.0" graceful-fs "^4.2.4" - jest-haste-map "^26.6.1" + jest-haste-map "^26.6.2" jest-regex-util "^26.0.0" - jest-util "^26.6.1" + jest-util "^26.6.2" micromatch "^4.0.2" pirates "^4.0.1" slash "^3.0.0" @@ -1271,6 +1278,17 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" +"@jest/types@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" + integrity sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^15.0.0" + chalk "^4.0.0" + "@jsii/spec@^1.14.0": version "1.14.0" resolved "https://registry.yarnpkg.com/@jsii/spec/-/spec-1.14.0.tgz#79ef7626616e3cd6eaf503f8f4c0c9640c220a5b" @@ -3862,16 +3880,16 @@ axios@^0.19.0: dependencies: follow-redirects "1.5.10" -babel-jest@^26.6.1: - version "26.6.1" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.6.1.tgz#07bd7bec14de47fe0f2c9a139741329f1f41788b" - integrity sha512-duMWEOKrSBYRVTTNpL2SipNIWnZOjP77auOBMPQ3zXAdnDbyZQWU8r/RxNWpUf9N6cgPFecQYelYLytTVXVDtA== +babel-jest@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.6.2.tgz#ca84659b1683e6e5bf16609bc88f3f2f086fe443" + integrity sha512-pysyz/mZ7T5sozKnvSa1n7QEf22W9yc+dUmn2zNuQTN0saG51q8A/8k9wbED9X4YNxmwjuhIwf4JRXXQGzui3Q== dependencies: - "@jest/transform" "^26.6.1" - "@jest/types" "^26.6.1" + "@jest/transform" "^26.6.2" + "@jest/types" "^26.6.2" "@types/babel__core" "^7.1.7" babel-plugin-istanbul "^6.0.0" - babel-preset-jest "^26.5.0" + babel-preset-jest "^26.6.2" chalk "^4.0.0" graceful-fs "^4.2.4" slash "^3.0.0" @@ -3894,20 +3912,20 @@ babel-plugin-istanbul@^6.0.0: istanbul-lib-instrument "^4.0.0" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.5.0.tgz#3916b3a28129c29528de91e5784a44680db46385" - integrity sha512-ck17uZFD3CDfuwCLATWZxkkuGGFhMij8quP8CNhwj8ek1mqFgbFzRJ30xwC04LLscj/aKsVFfRST+b5PT7rSuw== +babel-plugin-jest-hoist@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.6.2.tgz#8185bd030348d254c6d7dd974355e6a28b21e62d" + integrity sha512-PO9t0697lNTmcEHH69mdtYiOIkkOlj9fySqfO3K1eCcdISevLAE0xY59VLLUj0SoiPiTX/JU2CYFpILydUa5Lw== dependencies: "@babel/template" "^7.3.3" "@babel/types" "^7.3.3" "@types/babel__core" "^7.0.0" "@types/babel__traverse" "^7.0.6" -babel-preset-current-node-syntax@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-0.1.3.tgz#b4b547acddbf963cba555ba9f9cbbb70bfd044da" - integrity sha512-uyexu1sVwcdFnyq9o8UQYsXwXflIh8LvrF5+cKrYam93ned1CStffB3+BEcsxGSgagoA3GEyjDqO4a/58hyPYQ== +babel-preset-current-node-syntax@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.0.tgz#cf5feef29551253471cfa82fc8e0f5063df07a77" + integrity sha512-mGkvkpocWJes1CmMKtgGUwCeeq0pOhALyymozzDWYomHTbDLwueDYG6p4TK1YOeYHCzBzYPsWkgTto10JubI1Q== dependencies: "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-syntax-bigint" "^7.8.3" @@ -3920,14 +3938,15 @@ babel-preset-current-node-syntax@^0.1.3: "@babel/plugin-syntax-object-rest-spread" "^7.8.3" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-syntax-top-level-await" "^7.8.3" -babel-preset-jest@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-26.5.0.tgz#f1b166045cd21437d1188d29f7fba470d5bdb0e7" - integrity sha512-F2vTluljhqkiGSJGBg/jOruA8vIIIL11YrxRcO7nviNTMbbofPSHwnm8mgP7d/wS7wRSexRoI6X1A6T74d4LQA== +babel-preset-jest@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-26.6.2.tgz#747872b1171df032252426586881d62d31798fee" + integrity sha512-YvdtlVm9t3k777c5NPQIv6cxFFFapys25HiUmuSgHwIZhfifweR5c5Sf5nwE3MAbfu327CYSvps8Yx6ANLyleQ== dependencies: - babel-plugin-jest-hoist "^26.5.0" - babel-preset-current-node-syntax "^0.1.3" + babel-plugin-jest-hoist "^26.6.2" + babel-preset-current-node-syntax "^1.0.0" balanced-match@^1.0.0: version "1.0.0" @@ -4463,10 +4482,10 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: inherits "^2.0.1" safe-buffer "^5.0.1" -cjs-module-lexer@^0.4.2: - version "0.4.3" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-0.4.3.tgz#9e31f7fe701f5fcee5793f77ab4e58fa8dcde8bc" - integrity sha512-5RLK0Qfs0PNDpEyBXIr3bIT1Muw3ojSlvpw6dAmkUcO0+uTrsBn7GuEIgx40u+OzbCBLDta7nvmud85P4EmTsQ== +cjs-module-lexer@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-0.6.0.tgz#4186fcca0eae175970aee870b9fe2d6cf8d5655f" + integrity sha512-uc2Vix1frTfnuzxxu1Hp4ktSvM3QaI4oXl4ZUqL1wjTu/BGki9TrCWoqLTg/drR1KwAEarXuRFCG2Svr1GxPFw== class-utils@^0.3.5: version "0.3.6" @@ -5669,6 +5688,11 @@ diff-sequences@^26.5.0: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.5.0.tgz#ef766cf09d43ed40406611f11c6d8d9dd8b2fefd" integrity sha512-ZXx86srb/iYy6jG71k++wBN9P9J05UNQ5hQHQd9MtMPvcqXPx/vKU69jfHV637D00Q2gSgPk2D+jSx3l1lDW/Q== +diff-sequences@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.6.2.tgz#48ba99157de1923412eed41db6b6d4aa9ca7c0b1" + integrity sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q== + diff@^4.0.1, diff@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" @@ -6320,16 +6344,16 @@ expand-brackets@^2.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" -expect@^26.6.1: - version "26.6.1" - resolved "https://registry.yarnpkg.com/expect/-/expect-26.6.1.tgz#e1e053cdc43b21a452b36fc7cc9401e4603949c1" - integrity sha512-BRfxIBHagghMmr1D2MRY0Qv5d3Nc8HCqgbDwNXw/9izmM5eBb42a2YjLKSbsqle76ozGkAEPELQX4IdNHAKRNA== +expect@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/expect/-/expect-26.6.2.tgz#c6b996bf26bf3fe18b67b2d0f51fc981ba934417" + integrity sha512-9/hlOBkQl2l/PLHJx6JjoDF6xPKcJEsUlWKb23rKE7KzeDqUZKXKNMW27KIue5JMdBV9HgmoJPcc8HtO85t9IA== dependencies: - "@jest/types" "^26.6.1" + "@jest/types" "^26.6.2" ansi-styles "^4.0.0" jest-get-type "^26.3.0" - jest-matcher-utils "^26.6.1" - jest-message-util "^26.6.1" + jest-matcher-utils "^26.6.2" + jest-message-util "^26.6.2" jest-regex-util "^26.0.0" extend-shallow@^2.0.1: @@ -8108,57 +8132,57 @@ istanbul-reports@^3.0.2: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -jest-changed-files@^26.6.1: - version "26.6.1" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-26.6.1.tgz#2fac3dc51297977ee883347948d8e3d37c417fba" - integrity sha512-NhSdZ5F6b/rIN5V46x1l31vrmukD/bJUXgYAY8VtP1SknYdJwjYDRxuLt7Z8QryIdqCjMIn2C0Cd98EZ4umo8Q== +jest-changed-files@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-26.6.2.tgz#f6198479e1cc66f22f9ae1e22acaa0b429c042d0" + integrity sha512-fDS7szLcY9sCtIip8Fjry9oGf3I2ht/QT21bAHm5Dmf0mD4X3ReNUf17y+bO6fR8WgbIZTlbyG1ak/53cbRzKQ== dependencies: - "@jest/types" "^26.6.1" + "@jest/types" "^26.6.2" execa "^4.0.0" throat "^5.0.0" -jest-cli@^26.6.1: - version "26.6.1" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-26.6.1.tgz#8952242fa812c05bd129abf7c022424045b7fd67" - integrity sha512-aPLoEjlwFrCWhiPpW5NUxQA1X1kWsAnQcQ0SO/fHsCvczL3W75iVAcH9kP6NN+BNqZcHNEvkhxT5cDmBfEAh+w== +jest-cli@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-26.6.2.tgz#6f42b002c2f0a0902eed7fa55fafdb528b39e764" + integrity sha512-5SBxa0bXc43fTHgxMfonDFDWTmQTiC6RSS4GpKhVekWkwpaeMHWt/FvGIy5GlTHMbCpzULWV++N3v93OdlFfQA== dependencies: - "@jest/core" "^26.6.1" - "@jest/test-result" "^26.6.1" - "@jest/types" "^26.6.1" + "@jest/core" "^26.6.2" + "@jest/test-result" "^26.6.2" + "@jest/types" "^26.6.2" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" import-local "^3.0.2" is-ci "^2.0.0" - jest-config "^26.6.1" - jest-util "^26.6.1" - jest-validate "^26.6.1" + jest-config "^26.6.2" + jest-util "^26.6.2" + jest-validate "^26.6.2" prompts "^2.0.1" yargs "^15.4.1" -jest-config@^26.6.1: - version "26.6.1" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-26.6.1.tgz#8c343fbdd9c24ad003e261f73583c3c020f32b42" - integrity sha512-mtJzIynIwW1d1nMlKCNCQiSgWaqFn8cH/fOSNY97xG7Y9tBCZbCSuW2GTX0RPmceSJGO7l27JgwC18LEg0Vg+g== +jest-config@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-26.6.2.tgz#f5d2667e71b5b5fbb910cf1898446f3d48a6a0ab" + integrity sha512-0ApZqPd+L/BUWvNj1GHcptb5jwF23lo+BskjgJV/Blht1hgpu6eIwaYRgHPrS6I6HrxwRfJvlGbzoZZVb3VHTA== dependencies: "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^26.6.1" - "@jest/types" "^26.6.1" - babel-jest "^26.6.1" + "@jest/test-sequencer" "^26.6.2" + "@jest/types" "^26.6.2" + babel-jest "^26.6.2" chalk "^4.0.0" deepmerge "^4.2.2" glob "^7.1.1" graceful-fs "^4.2.4" - jest-environment-jsdom "^26.6.1" - jest-environment-node "^26.6.1" + jest-environment-jsdom "^26.6.2" + jest-environment-node "^26.6.2" jest-get-type "^26.3.0" - jest-jasmine2 "^26.6.1" + jest-jasmine2 "^26.6.2" jest-regex-util "^26.0.0" - jest-resolve "^26.6.1" - jest-util "^26.6.1" - jest-validate "^26.6.1" + jest-resolve "^26.6.2" + jest-util "^26.6.2" + jest-validate "^26.6.2" micromatch "^4.0.2" - pretty-format "^26.6.1" + pretty-format "^26.6.2" jest-diff@^26.0.0: version "26.6.0" @@ -8170,15 +8194,15 @@ jest-diff@^26.0.0: jest-get-type "^26.3.0" pretty-format "^26.6.0" -jest-diff@^26.6.1: - version "26.6.1" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.6.1.tgz#38aa194979f454619bb39bdee299fb64ede5300c" - integrity sha512-BBNy/zin2m4kG5In126O8chOBxLLS/XMTuuM2+YhgyHk87ewPzKTuTJcqj3lOWOi03NNgrl+DkMeV/exdvG9gg== +jest-diff@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.6.2.tgz#1aa7468b52c3a68d7d5c5fdcdfcd5e49bd164394" + integrity sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA== dependencies: chalk "^4.0.0" - diff-sequences "^26.5.0" + diff-sequences "^26.6.2" jest-get-type "^26.3.0" - pretty-format "^26.6.1" + pretty-format "^26.6.2" jest-docblock@^26.0.0: version "26.0.0" @@ -8187,90 +8211,90 @@ jest-docblock@^26.0.0: dependencies: detect-newline "^3.0.0" -jest-each@^26.6.1: - version "26.6.1" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-26.6.1.tgz#e968e88309a3e2ae9648634af8f89d8ee5acfddd" - integrity sha512-gSn8eB3buchuq45SU7pLB7qmCGax1ZSxfaWuEFblCyNMtyokYaKFh9dRhYPujK6xYL57dLIPhLKatjmB5XWzGA== +jest-each@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-26.6.2.tgz#02526438a77a67401c8a6382dfe5999952c167cb" + integrity sha512-Mer/f0KaATbjl8MCJ+0GEpNdqmnVmDYqCTJYTvoo7rqmRiDllmp2AYN+06F93nXcY3ur9ShIjS+CO/uD+BbH4A== dependencies: - "@jest/types" "^26.6.1" + "@jest/types" "^26.6.2" chalk "^4.0.0" jest-get-type "^26.3.0" - jest-util "^26.6.1" - pretty-format "^26.6.1" + jest-util "^26.6.2" + pretty-format "^26.6.2" -jest-environment-jsdom@^26.6.1: - version "26.6.1" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-26.6.1.tgz#63093bf89daee6139616568a43633b84cf7aac21" - integrity sha512-A17RiXuHYNVlkM+3QNcQ6n5EZyAc6eld8ra9TW26luounGWpku4tj03uqRgHJCI1d4uHr5rJiuCH5JFRtdmrcA== +jest-environment-jsdom@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-26.6.2.tgz#78d09fe9cf019a357009b9b7e1f101d23bd1da3e" + integrity sha512-jgPqCruTlt3Kwqg5/WVFyHIOJHsiAvhcp2qiR2QQstuG9yWox5+iHpU3ZrcBxW14T4fe5Z68jAfLRh7joCSP2Q== dependencies: - "@jest/environment" "^26.6.1" - "@jest/fake-timers" "^26.6.1" - "@jest/types" "^26.6.1" + "@jest/environment" "^26.6.2" + "@jest/fake-timers" "^26.6.2" + "@jest/types" "^26.6.2" "@types/node" "*" - jest-mock "^26.6.1" - jest-util "^26.6.1" + jest-mock "^26.6.2" + jest-util "^26.6.2" jsdom "^16.4.0" -jest-environment-node@^26.6.1: - version "26.6.1" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-26.6.1.tgz#4d73d8b33c26989a92a0ed3ad0bfd6f7a196d9bd" - integrity sha512-YffaCp6h0j1kbcf1NVZ7umC6CPgD67YS+G1BeornfuSkx5s3xdhuwG0DCxSiHPXyT81FfJzA1L7nXvhq50OWIg== +jest-environment-node@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-26.6.2.tgz#824e4c7fb4944646356f11ac75b229b0035f2b0c" + integrity sha512-zhtMio3Exty18dy8ee8eJ9kjnRyZC1N4C1Nt/VShN1apyXc8rWGtJ9lI7vqiWcyyXS4BVSEn9lxAM2D+07/Tag== dependencies: - "@jest/environment" "^26.6.1" - "@jest/fake-timers" "^26.6.1" - "@jest/types" "^26.6.1" + "@jest/environment" "^26.6.2" + "@jest/fake-timers" "^26.6.2" + "@jest/types" "^26.6.2" "@types/node" "*" - jest-mock "^26.6.1" - jest-util "^26.6.1" + jest-mock "^26.6.2" + jest-util "^26.6.2" jest-get-type@^26.3.0: version "26.3.0" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-26.3.0.tgz#e97dc3c3f53c2b406ca7afaed4493b1d099199e0" integrity sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig== -jest-haste-map@^26.6.1: - version "26.6.1" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.6.1.tgz#97e96f5fd7576d980307fbe6160b10c016b543d4" - integrity sha512-9kPafkv0nX6ta1PrshnkiyhhoQoFWncrU/uUBt3/AP1r78WSCU5iLceYRTwDvJl67H3RrXqSlSVDDa/AsUB7OQ== +jest-haste-map@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.6.2.tgz#dd7e60fe7dc0e9f911a23d79c5ff7fb5c2cafeaa" + integrity sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w== dependencies: - "@jest/types" "^26.6.1" + "@jest/types" "^26.6.2" "@types/graceful-fs" "^4.1.2" "@types/node" "*" anymatch "^3.0.3" fb-watchman "^2.0.0" graceful-fs "^4.2.4" jest-regex-util "^26.0.0" - jest-serializer "^26.5.0" - jest-util "^26.6.1" - jest-worker "^26.6.1" + jest-serializer "^26.6.2" + jest-util "^26.6.2" + jest-worker "^26.6.2" micromatch "^4.0.2" sane "^4.0.3" walker "^1.0.7" optionalDependencies: fsevents "^2.1.2" -jest-jasmine2@^26.6.1: - version "26.6.1" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.6.1.tgz#11c92603d1fa97e3c33404359e69d6cec7e57017" - integrity sha512-2uYdT32o/ZzSxYAPduAgokO8OlAL1YdG/9oxcEY138EDNpIK5XRRJDaGzTZdIBWSxk0aR8XxN44FvfXtHB+Fiw== +jest-jasmine2@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.6.2.tgz#81bc3eabc367aa65cb9e63ec7129f8831cc345fc" + integrity sha512-Om6q632kogggOBGjSr34jErXGOQy0+IkxouGUbyzB0lQmufu8nm1AcxLIKpB/FN36I43f2T3YajeNlxwJZ94PQ== dependencies: "@babel/traverse" "^7.1.0" - "@jest/environment" "^26.6.1" - "@jest/source-map" "^26.5.0" - "@jest/test-result" "^26.6.1" - "@jest/types" "^26.6.1" + "@jest/environment" "^26.6.2" + "@jest/source-map" "^26.6.2" + "@jest/test-result" "^26.6.2" + "@jest/types" "^26.6.2" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" - expect "^26.6.1" + expect "^26.6.2" is-generator-fn "^2.0.0" - jest-each "^26.6.1" - jest-matcher-utils "^26.6.1" - jest-message-util "^26.6.1" - jest-runtime "^26.6.1" - jest-snapshot "^26.6.1" - jest-util "^26.6.1" - pretty-format "^26.6.1" + jest-each "^26.6.2" + jest-matcher-utils "^26.6.2" + jest-message-util "^26.6.2" + jest-runtime "^26.6.2" + jest-snapshot "^26.6.2" + jest-util "^26.6.2" + pretty-format "^26.6.2" throat "^5.0.0" jest-junit@^12.0.0: @@ -8283,44 +8307,45 @@ jest-junit@^12.0.0: uuid "^3.3.3" xml "^1.0.1" -jest-leak-detector@^26.6.1: - version "26.6.1" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-26.6.1.tgz#f63e46dc4e3aa30d29b40ae49966a15730d25bbe" - integrity sha512-j9ZOtJSJKlHjrs4aIxWjiQUjyrffPdiAQn2Iw0916w7qZE5Lk0T2KhIH6E9vfhzP6sw0Q0jtnLLb4vQ71o1HlA== +jest-leak-detector@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-26.6.2.tgz#7717cf118b92238f2eba65054c8a0c9c653a91af" + integrity sha512-i4xlXpsVSMeKvg2cEKdfhh0H39qlJlP5Ex1yQxwF9ubahboQYMgTtz5oML35AVA3B4Eu+YsmwaiKVev9KCvLxg== dependencies: jest-get-type "^26.3.0" - pretty-format "^26.6.1" + pretty-format "^26.6.2" -jest-matcher-utils@^26.6.1: - version "26.6.1" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-26.6.1.tgz#bc90822d352c91c2ec1814731327691d06598400" - integrity sha512-9iu3zrsYlUnl8pByhREF9rr5eYoiEb1F7ymNKg6lJr/0qD37LWS5FSW/JcoDl8UdMX2+zAzabDs7sTO+QFKjCg== +jest-matcher-utils@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-26.6.2.tgz#8e6fd6e863c8b2d31ac6472eeb237bc595e53e7a" + integrity sha512-llnc8vQgYcNqDrqRDXWwMr9i7rS5XFiCwvh6DTP7Jqa2mqpcCBBlpCbn+trkG0KNhPu/h8rzyBkriOtBstvWhw== dependencies: chalk "^4.0.0" - jest-diff "^26.6.1" + jest-diff "^26.6.2" jest-get-type "^26.3.0" - pretty-format "^26.6.1" + pretty-format "^26.6.2" -jest-message-util@^26.6.1: - version "26.6.1" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-26.6.1.tgz#d62c20c0fe7be10bfd6020b675abb9b5fa933ff3" - integrity sha512-cqM4HnqncIebBNdTKrBoWR/4ufHTll0pK/FWwX0YasK+TlBQEMqw3IEdynuuOTjDPFO3ONlFn37280X48beByw== +jest-message-util@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-26.6.2.tgz#58173744ad6fc0506b5d21150b9be56ef001ca07" + integrity sha512-rGiLePzQ3AzwUshu2+Rn+UMFk0pHN58sOG+IaJbk5Jxuqo3NYO1U2/MIR4S1sKgsoYSXSzdtSa0TgrmtUwEbmA== dependencies: "@babel/code-frame" "^7.0.0" - "@jest/types" "^26.6.1" + "@jest/types" "^26.6.2" "@types/stack-utils" "^2.0.0" chalk "^4.0.0" graceful-fs "^4.2.4" micromatch "^4.0.2" + pretty-format "^26.6.2" slash "^3.0.0" stack-utils "^2.0.2" -jest-mock@^26.6.1: - version "26.6.1" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-26.6.1.tgz#6c12a92a82fc833f81a5b6de6b67d78386e276a3" - integrity sha512-my0lPTBu1awY8iVG62sB2sx9qf8zxNDVX+5aFgoB8Vbqjb6LqIOsfyFA8P1z6H2IsqMbvOX9oCJnK67Y3yUIMA== +jest-mock@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-26.6.2.tgz#d6cb712b041ed47fe0d9b6fc3474bc6543feb302" + integrity sha512-YyFjePHHp1LzpzYcmgqkJ0nm0gg/lJx2aZFzFy1S6eUqNjXsOqTK10zNRff2dNfssgokjkG65OlWNcIlgd3zew== dependencies: - "@jest/types" "^26.6.1" + "@jest/types" "^26.6.2" "@types/node" "*" jest-pnp-resolver@^1.2.2: @@ -8333,119 +8358,119 @@ jest-regex-util@^26.0.0: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-26.0.0.tgz#d25e7184b36e39fd466c3bc41be0971e821fee28" integrity sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A== -jest-resolve-dependencies@^26.6.1: - version "26.6.1" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-26.6.1.tgz#e9d091a159ad198c029279737a8b4c507791d75c" - integrity sha512-MN6lufbZJ3RBfTnJesZtHu3hUCBqPdHRe2+FhIt0yiqJ3fMgzWRqMRQyN/d/QwOE7KXwAG2ekZutbPhuD7s51A== +jest-resolve-dependencies@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-26.6.2.tgz#82b5456bfa9544bb6e376397c8de334d5deba0ce" + integrity sha512-lXXQqBLlKlnOPyCfJZnrYydd7lZzWux9sMwKJxOmjsuVmoSlnmTOJ8kW1FYxotTyMzqoNtBuSF6qE+iXuAr6qQ== dependencies: - "@jest/types" "^26.6.1" + "@jest/types" "^26.6.2" jest-regex-util "^26.0.0" - jest-snapshot "^26.6.1" + jest-snapshot "^26.6.2" -jest-resolve@^26.6.1: - version "26.6.1" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-26.6.1.tgz#e9a9130cc069620d5aeeb87043dd9e130b68c6a1" - integrity sha512-hiHfQH6rrcpAmw9xCQ0vD66SDuU+7ZulOuKwc4jpbmFFsz0bQG/Ib92K+9/489u5rVw0btr/ZhiHqBpmkbCvuQ== +jest-resolve@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-26.6.2.tgz#a3ab1517217f469b504f1b56603c5bb541fbb507" + integrity sha512-sOxsZOq25mT1wRsfHcbtkInS+Ek7Q8jCHUB0ZUTP0tc/c41QHriU/NunqMfCUWsL4H3MHpvQD4QR9kSYhS7UvQ== dependencies: - "@jest/types" "^26.6.1" + "@jest/types" "^26.6.2" chalk "^4.0.0" graceful-fs "^4.2.4" jest-pnp-resolver "^1.2.2" - jest-util "^26.6.1" + jest-util "^26.6.2" read-pkg-up "^7.0.1" resolve "^1.18.1" slash "^3.0.0" -jest-runner@^26.6.1: - version "26.6.1" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-26.6.1.tgz#a945971b5a23740c1fe20e372a38de668b7c76bf" - integrity sha512-DmpNGdgsbl5s0FGkmsInmqnmqCtliCSnjWA2TFAJS1m1mL5atwfPsf+uoZ8uYQ2X0uDj4NM+nPcDnUpbNTRMBA== +jest-runner@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-26.6.2.tgz#eaa7a2ef38e043054ab8c84c045a09873893d364" + integrity sha512-OsWTIGx/MHSuPqjYwap1LAxT0qvlqmwTYSFOwc+G14AtyZlL7ngrrDes7moLRqFkDVpCHL2RT0i317jogyw81Q== dependencies: - "@jest/console" "^26.6.1" - "@jest/environment" "^26.6.1" - "@jest/test-result" "^26.6.1" - "@jest/types" "^26.6.1" + "@jest/console" "^26.6.2" + "@jest/environment" "^26.6.2" + "@jest/test-result" "^26.6.2" + "@jest/types" "^26.6.2" "@types/node" "*" chalk "^4.0.0" emittery "^0.7.1" exit "^0.1.2" graceful-fs "^4.2.4" - jest-config "^26.6.1" + jest-config "^26.6.2" jest-docblock "^26.0.0" - jest-haste-map "^26.6.1" - jest-leak-detector "^26.6.1" - jest-message-util "^26.6.1" - jest-resolve "^26.6.1" - jest-runtime "^26.6.1" - jest-util "^26.6.1" - jest-worker "^26.6.1" + jest-haste-map "^26.6.2" + jest-leak-detector "^26.6.2" + jest-message-util "^26.6.2" + jest-resolve "^26.6.2" + jest-runtime "^26.6.2" + jest-util "^26.6.2" + jest-worker "^26.6.2" source-map-support "^0.5.6" throat "^5.0.0" -jest-runtime@^26.6.1: - version "26.6.1" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-26.6.1.tgz#9a131e7b4f0bc6beefd62e7443f757c1d5fa9dec" - integrity sha512-7uOCNeezXDWgjEyzYbRN2ViY7xNZzusNVGAMmU0UHRUNXuY4j4GBHKGMqPo/cBPZA9bSYp+lwK2DRRBU5Dv6YQ== - dependencies: - "@jest/console" "^26.6.1" - "@jest/environment" "^26.6.1" - "@jest/fake-timers" "^26.6.1" - "@jest/globals" "^26.6.1" - "@jest/source-map" "^26.5.0" - "@jest/test-result" "^26.6.1" - "@jest/transform" "^26.6.1" - "@jest/types" "^26.6.1" +jest-runtime@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-26.6.2.tgz#c0989ea9c55f0cab0ab5a403b7a0af56c72f3c9a" + integrity sha512-VEjfoim4tkvq8Gh8z7wMXlKva3DnIlgvmGR1AajiRK1nEHuXtuaR17jnVYOi+wW0i1dS3NH4jVdUQl08GodgZQ== + dependencies: + "@jest/console" "^26.6.2" + "@jest/environment" "^26.6.2" + "@jest/fake-timers" "^26.6.2" + "@jest/globals" "^26.6.2" + "@jest/source-map" "^26.6.2" + "@jest/test-result" "^26.6.2" + "@jest/transform" "^26.6.2" + "@jest/types" "^26.6.2" "@types/yargs" "^15.0.0" chalk "^4.0.0" - cjs-module-lexer "^0.4.2" + cjs-module-lexer "^0.6.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" glob "^7.1.3" graceful-fs "^4.2.4" - jest-config "^26.6.1" - jest-haste-map "^26.6.1" - jest-message-util "^26.6.1" - jest-mock "^26.6.1" + jest-config "^26.6.2" + jest-haste-map "^26.6.2" + jest-message-util "^26.6.2" + jest-mock "^26.6.2" jest-regex-util "^26.0.0" - jest-resolve "^26.6.1" - jest-snapshot "^26.6.1" - jest-util "^26.6.1" - jest-validate "^26.6.1" + jest-resolve "^26.6.2" + jest-snapshot "^26.6.2" + jest-util "^26.6.2" + jest-validate "^26.6.2" slash "^3.0.0" strip-bom "^4.0.0" yargs "^15.4.1" -jest-serializer@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-26.5.0.tgz#f5425cc4c5f6b4b355f854b5f0f23ec6b962bc13" - integrity sha512-+h3Gf5CDRlSLdgTv7y0vPIAoLgX/SI7T4v6hy+TEXMgYbv+ztzbg5PSN6mUXAT/hXYHvZRWm+MaObVfqkhCGxA== +jest-serializer@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-26.6.2.tgz#d139aafd46957d3a448f3a6cdabe2919ba0742d1" + integrity sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g== dependencies: "@types/node" "*" graceful-fs "^4.2.4" -jest-snapshot@^26.6.1: - version "26.6.1" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-26.6.1.tgz#469e9d0b749496aea7dad0d7e5e5c88b91cdb4cc" - integrity sha512-JA7bZp7HRTIJYAi85pJ/OZ2eur2dqmwIToA5/6d7Mn90isGEfeF9FvuhDLLEczgKP1ihreBzrJ6Vr7zteP5JNA== +jest-snapshot@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-26.6.2.tgz#f3b0af1acb223316850bd14e1beea9837fb39c84" + integrity sha512-OLhxz05EzUtsAmOMzuupt1lHYXCNib0ECyuZ/PZOx9TrZcC8vL0x+DUG3TL+GLX3yHG45e6YGjIm0XwDc3q3og== dependencies: "@babel/types" "^7.0.0" - "@jest/types" "^26.6.1" + "@jest/types" "^26.6.2" "@types/babel__traverse" "^7.0.4" "@types/prettier" "^2.0.0" chalk "^4.0.0" - expect "^26.6.1" + expect "^26.6.2" graceful-fs "^4.2.4" - jest-diff "^26.6.1" + jest-diff "^26.6.2" jest-get-type "^26.3.0" - jest-haste-map "^26.6.1" - jest-matcher-utils "^26.6.1" - jest-message-util "^26.6.1" - jest-resolve "^26.6.1" + jest-haste-map "^26.6.2" + jest-matcher-utils "^26.6.2" + jest-message-util "^26.6.2" + jest-resolve "^26.6.2" natural-compare "^1.4.0" - pretty-format "^26.6.1" + pretty-format "^26.6.2" semver "^7.3.2" -jest-util@^26.1.0, jest-util@^26.6.1: +jest-util@^26.1.0: version "26.6.1" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.1.tgz#4cc0d09ec57f28d12d053887eec5dc976a352e9b" integrity sha512-xCLZUqVoqhquyPLuDXmH7ogceGctbW8SMyQVjD9o+1+NPWI7t0vO08udcFLVPLgKWcvc+zotaUv/RuaR6l8HIA== @@ -8457,48 +8482,60 @@ jest-util@^26.1.0, jest-util@^26.6.1: is-ci "^2.0.0" micromatch "^4.0.2" -jest-validate@^26.6.1: - version "26.6.1" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-26.6.1.tgz#28730eb8570d60968d9d06f1a8c94d922167bd2a" - integrity sha512-BEFpGbylKocnNPZULcnk+TGaz1oFZQH/wcaXlaXABbu0zBwkOGczuWgdLucUouuQqn7VadHZZeTvo8VSFDLMOA== +jest-util@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.2.tgz#907535dbe4d5a6cb4c47ac9b926f6af29576cbc1" + integrity sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q== dependencies: - "@jest/types" "^26.6.1" + "@jest/types" "^26.6.2" + "@types/node" "*" + chalk "^4.0.0" + graceful-fs "^4.2.4" + is-ci "^2.0.0" + micromatch "^4.0.2" + +jest-validate@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-26.6.2.tgz#23d380971587150467342911c3d7b4ac57ab20ec" + integrity sha512-NEYZ9Aeyj0i5rQqbq+tpIOom0YS1u2MVu6+euBsvpgIme+FOfRmoC4R5p0JiAUpaFvFy24xgrpMknarR/93XjQ== + dependencies: + "@jest/types" "^26.6.2" camelcase "^6.0.0" chalk "^4.0.0" jest-get-type "^26.3.0" leven "^3.1.0" - pretty-format "^26.6.1" + pretty-format "^26.6.2" -jest-watcher@^26.6.1: - version "26.6.1" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-26.6.1.tgz#debfa34e9c5c3e735593403794fe53d2955bfabc" - integrity sha512-0LBIPPncNi9CaLKK15bnxyd2E8OMl4kJg0PTiNOI+MXztXw1zVdtX/x9Pr6pXaQYps+eS/ts43O4+HByZ7yJSw== +jest-watcher@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-26.6.2.tgz#a5b683b8f9d68dbcb1d7dae32172d2cca0592975" + integrity sha512-WKJob0P/Em2csiVthsI68p6aGKTIcsfjH9Gsx1f0A3Italz43e3ho0geSAVsmj09RWOELP1AZ/DXyJgOgDKxXQ== dependencies: - "@jest/test-result" "^26.6.1" - "@jest/types" "^26.6.1" + "@jest/test-result" "^26.6.2" + "@jest/types" "^26.6.2" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - jest-util "^26.6.1" + jest-util "^26.6.2" string-length "^4.0.1" -jest-worker@^26.6.1: - version "26.6.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.1.tgz#c2ae8cde6802cc14056043f997469ec170d9c32a" - integrity sha512-R5IE3qSGz+QynJx8y+ICEkdI2OJ3RJjRQVEyCcFAd3yVhQSEtquziPO29Mlzgn07LOVE8u8jhJ1FqcwegiXWOw== +jest-worker@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" + integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== dependencies: "@types/node" "*" merge-stream "^2.0.0" supports-color "^7.0.0" -jest@^26.6.1: - version "26.6.1" - resolved "https://registry.yarnpkg.com/jest/-/jest-26.6.1.tgz#821e8280d2bdeeed40ac7bc43941dceff0f1b650" - integrity sha512-f+ahfqw3Ffy+9vA7sWFGpTmhtKEMsNAZiWBVXDkrpIO73zIz22iimjirnV78kh/eWlylmvLh/0WxHN6fZraZdA== +jest@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest/-/jest-26.6.2.tgz#d116f55438129360f523c22b5cf010f88740272d" + integrity sha512-lL0hW7mh/2hhQmpo/1fDWQji/BUB3Xcxxj7r0fAOa3t56OAnwbE0HEl2bZ7XjAwV5TXOt8UpCgaa/WBJBB0CYw== dependencies: - "@jest/core" "^26.6.1" + "@jest/core" "^26.6.2" import-local "^3.0.2" - jest-cli "^26.6.1" + jest-cli "^26.6.2" jmespath@0.15.0: version "0.15.0" @@ -11078,12 +11115,12 @@ pretty-format@^26.0.0, pretty-format@^26.6.0: ansi-styles "^4.0.0" react-is "^16.12.0" -pretty-format@^26.6.1: - version "26.6.1" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.1.tgz#af9a2f63493a856acddeeb11ba6bcf61989660a8" - integrity sha512-MeqqsP5PYcRBbGMvwzsyBdmAJ4EFX7pWFyl7x4+dMVg5pE0ZDdBIvEH2ergvIO+Gvwv1wh64YuOY9y5LuyY/GA== +pretty-format@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93" + integrity sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg== dependencies: - "@jest/types" "^26.6.1" + "@jest/types" "^26.6.2" ansi-regex "^5.0.0" ansi-styles "^4.0.0" react-is "^17.0.1" @@ -13512,10 +13549,10 @@ v8-compile-cache@^2.0.0, v8-compile-cache@^2.0.3: resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz#54bc3cdd43317bca91e35dcaf305b1a7237de745" integrity sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ== -v8-to-istanbul@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-6.0.1.tgz#7ef0e32faa10f841fe4c1b0f8de96ed067c0be1e" - integrity sha512-PzM1WlqquhBvsV+Gco6WSFeg1AGdD53ccMRkFeyHRE/KRZaVacPOmQYP3EeVgDBtKD2BJ8kgynBQ5OtKiHCH+w== +v8-to-istanbul@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-7.0.0.tgz#b4fe00e35649ef7785a9b7fcebcea05f37c332fc" + integrity sha512-fLL2rFuQpMtm9r8hrAV2apXX/WqHJ6+IC4/eQVdMDGBUgH/YMV4Gv3duk3kjmyg6uiQWBAA9nJwue4iJUOkHeA== dependencies: "@types/istanbul-lib-coverage" "^2.0.1" convert-source-map "^1.6.0" From e0d3839aaeb4f755eee664671bfe69899fccbc88 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 2 Nov 2020 14:36:29 +0000 Subject: [PATCH 020/314] chore(deps-dev): bump @types/lodash from 4.14.163 to 4.14.164 (#11252) Bumps [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) from 4.14.163 to 4.14.164. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/aws-codepipeline-actions/package.json | 2 +- packages/@aws-cdk/aws-lambda/package.json | 2 +- packages/@aws-cdk/core/package.json | 2 +- yarn.lock | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/@aws-cdk/aws-codepipeline-actions/package.json b/packages/@aws-cdk/aws-codepipeline-actions/package.json index fde49ea10ae3f..d0e82f14df40c 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/package.json +++ b/packages/@aws-cdk/aws-codepipeline-actions/package.json @@ -69,7 +69,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-cloudtrail": "0.0.0", - "@types/lodash": "^4.14.163", + "@types/lodash": "^4.14.164", "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-lambda/package.json b/packages/@aws-cdk/aws-lambda/package.json index 7758804cc8576..525b8bc4c44b0 100644 --- a/packages/@aws-cdk/aws-lambda/package.json +++ b/packages/@aws-cdk/aws-lambda/package.json @@ -78,7 +78,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/aws-lambda": "^8.10.64", - "@types/lodash": "^4.14.163", + "@types/lodash": "^4.14.164", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json index d181a3f8ce75a..4876aa73918f8 100644 --- a/packages/@aws-cdk/core/package.json +++ b/packages/@aws-cdk/core/package.json @@ -168,7 +168,7 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/lodash": "^4.14.163", + "@types/lodash": "^4.14.164", "@types/minimatch": "^3.0.3", "@types/node": "^10.17.44", "@types/sinon": "^9.0.8", diff --git a/yarn.lock b/yarn.lock index b7dac7e1b88df..619dd0402d688 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3131,10 +3131,10 @@ dependencies: jszip "*" -"@types/lodash@^4.14.163": - version "4.14.163" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.163.tgz#6026f73c8267a0b7d41c7c8aadacfa2a5255774f" - integrity sha512-BeZM/FZaV53emqyHxn9L39Oz6XbHMBRLA1b1quROku48J/1kYYxPmVOJ/qSQheb81on4BI7H6QDo6bkUuRaDNQ== +"@types/lodash@^4.14.164": + version "4.14.164" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.164.tgz#52348bcf909ac7b4c1bcbeda5c23135176e5dfa0" + integrity sha512-fXCEmONnrtbYUc5014avwBeMdhHHO8YJCkOBflUL9EoJBSKZ1dei+VO74fA7JkTHZ1GvZack2TyIw5U+1lT8jg== "@types/md5@^2.2.1": version "2.2.1" From fcfed39e3524eef66d3638896bf4ca86697f1718 Mon Sep 17 00:00:00 2001 From: Momo Kornher Date: Mon, 2 Nov 2020 15:07:54 +0000 Subject: [PATCH 021/314] fix(core): multiple library copies lead to 'Assets must be defined within Stage or App' error (#11113) A recent change surfaces an issue where Stage objects from different code copies don't recognize each other as a Stage. This paht aligns the way how a Stage determines if something is a Stage to the same mechanism that App and Stack use. Thanks to @Shogan and @jogold for narrowing the issue down fixes #10314 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/core/lib/stage.ts | 6 ++++- packages/@aws-cdk/core/test/stage.test.ts | 29 +++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/core/lib/stage.ts b/packages/@aws-cdk/core/lib/stage.ts index 072a4b9cc34c3..8dfa18834604c 100644 --- a/packages/@aws-cdk/core/lib/stage.ts +++ b/packages/@aws-cdk/core/lib/stage.ts @@ -7,6 +7,8 @@ import { synthesize } from './private/synthesis'; // eslint-disable-next-line import { Construct as CoreConstruct } from './construct-compat'; +const STAGE_SYMBOL = Symbol.for('@aws-cdk/core.Stage'); + /** * Initialization props for a stage. */ @@ -85,7 +87,7 @@ export class Stage extends CoreConstruct { * @experimental */ public static isStage(x: any ): x is Stage { - return x !== null && x instanceof Stage; + return x !== null && typeof(x) === 'object' && STAGE_SYMBOL in x; } /** @@ -137,6 +139,8 @@ export class Stage extends CoreConstruct { throw new Error(`invalid stage name "${id}". Stage name must start with a letter and contain only alphanumeric characters, hypens ('-'), underscores ('_') and periods ('.')`); } + Object.defineProperty(this, STAGE_SYMBOL, { value: true }); + this.parentStage = Stage.of(this); this.region = props.env?.region ?? this.parentStage?.region; diff --git a/packages/@aws-cdk/core/test/stage.test.ts b/packages/@aws-cdk/core/test/stage.test.ts index c878c1485d6ce..8a4b27a4d412a 100644 --- a/packages/@aws-cdk/core/test/stage.test.ts +++ b/packages/@aws-cdk/core/test/stage.test.ts @@ -280,6 +280,35 @@ nodeunitShim({ test.throws(() => new Stage(app, 'mystage', { outdir: '/tmp/foo/bar' }), /"outdir" cannot be specified for nested stages/); test.done(); }, + + 'Stage.isStage indicates that a construct is a stage'(test: Test) { + // WHEN + const app = new App(); + const stack = new Stack(); + const stage = new Stage(app, 'Stage'); + + // THEN + test.ok(Stage.isStage(stage)); + test.ok(Stage.isStage(app)); + test.ok(!Stage.isStage(stack)); + test.done(); + }, + + 'Stage.isStage indicates that a construct is a stage based on symbol'(test: Test) { + // WHEN + const app = new App(); + const stage = new Stage(app, 'Stage'); + + const externalStage = {}; + const STAGE_SYMBOL = Symbol.for('@aws-cdk/core.Stage'); + Object.defineProperty(externalStage, STAGE_SYMBOL, { value: true }); + + // THEN + test.ok(Stage.isStage(stage)); + test.ok(Stage.isStage(app)); + test.ok(Stage.isStage(externalStage)); + test.done(); + }, }); class TouchingAspect implements IAspect { From d395b5e618fc423c46c65b9be40d0c1423e2b578 Mon Sep 17 00:00:00 2001 From: Josh Kellendonk Date: Mon, 2 Nov 2020 09:47:54 -0700 Subject: [PATCH 022/314] feat(ecs-service-extensions): create an `Environment` from attributes (#10932) This PR introduces `Environment.fromEnvironmentAttributes()` so that a user can import a pre-existing cluster. Closes #10931 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../ecs-service-extensions/README.md | 17 + .../ecs-service-extensions/lib/environment.ts | 82 +++- .../lib/extensions/appmesh.ts | 2 +- .../ecs-service-extensions/lib/service.ts | 8 +- .../integ.imported-environment.expected.json | 372 ++++++++++++++++++ .../test/integ.imported-environment.ts | 99 +++++ .../test/test.environment.ts | 26 +- 7 files changed, 599 insertions(+), 7 deletions(-) create mode 100644 packages/@aws-cdk-containers/ecs-service-extensions/test/integ.imported-environment.expected.json create mode 100644 packages/@aws-cdk-containers/ecs-service-extensions/test/integ.imported-environment.ts diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/README.md b/packages/@aws-cdk-containers/ecs-service-extensions/README.md index 4de08fec00b23..b3c50e828c29b 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/README.md +++ b/packages/@aws-cdk-containers/ecs-service-extensions/README.md @@ -283,3 +283,20 @@ The above code uses the well known service discovery name for each service, and passes it as an environment variable to the container so that the container knows what address to use when communicating to the other service. + +## Importing a pre-existing cluster + +To create an environment with a pre-existing cluster, you must import the cluster first, then use `Environment.fromEnvironmentAttributes()`. When a cluster is imported into an environment, the cluster is treated as immutable. As a result, no extension may modify the cluster to change a setting. + +```ts + +const cluster = ecs.Cluster.fromClusterAttributes(stack, 'Cluster', { + ... +}); + +const environment = Environment.fromEnvironmentAttributes(stack, 'Environment', { + capacityType: EnvironmentCapacityType.EC2, // or `FARGATE` + cluster, +}); + +``` diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/lib/environment.ts b/packages/@aws-cdk-containers/ecs-service-extensions/lib/environment.ts index 2a5e215d7571e..dcff0d28960b4 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/lib/environment.ts +++ b/packages/@aws-cdk-containers/ecs-service-extensions/lib/environment.ts @@ -28,13 +28,50 @@ export interface EnvironmentProps { readonly capacityType?: EnvironmentCapacityType } +/** + * An environment into which to deploy a service. + */ +export interface IEnvironment { + /** + * The name of this environment. + */ + readonly id: string; + + /** + * The VPC into which environment services should be placed. + */ + readonly vpc: ec2.IVpc; + + /** + * The cluster that is providing capacity for this service. + */ + readonly cluster: ecs.ICluster; + + /** + * The capacity type used by the service's cluster. + */ + readonly capacityType: EnvironmentCapacityType; + + /** + * Add a default cloudmap namespace to the environment's cluster. + */ + addDefaultCloudMapNamespace(options: ecs.CloudMapNamespaceOptions): void; +} + /** * An environment into which to deploy a service. This environment * can either be instantiated with a preexisting AWS VPC and ECS cluster, * or it can create it's own VPC and cluster. By default it will create * a cluster with Fargate capacity. */ -export class Environment extends cdk.Construct { +export class Environment extends cdk.Construct implements IEnvironment { + /** + * Import an existing environment from its attributes. + */ + public static fromEnvironmentAttributes(scope: cdk.Construct, id: string, attrs: EnvironmentAttributes): IEnvironment { + return new ImportedEnvironment(scope, id, attrs); + } + /** * The name of this environment. */ @@ -81,4 +118,47 @@ export class Environment extends cdk.Construct { this.capacityType = EnvironmentCapacityType.FARGATE; } } + + /** + * Add a default cloudmap namespace to the environment's cluster. + */ + addDefaultCloudMapNamespace(options: ecs.CloudMapNamespaceOptions) { + this.cluster.addDefaultCloudMapNamespace(options); + } +} + +export interface EnvironmentAttributes { + /** + * The capacity type used by the service's cluster. + */ + capacityType: EnvironmentCapacityType; + + /** + * The cluster that is providing capacity for this service. + */ + cluster: ecs.ICluster; } + +export class ImportedEnvironment extends cdk.Construct implements IEnvironment { + public readonly capacityType: EnvironmentCapacityType; + public readonly cluster: ecs.ICluster; + public readonly id: string; + public readonly vpc: ec2.IVpc; + + constructor(scope: cdk.Construct, id: string, props: EnvironmentAttributes) { + super(scope, id); + + this.id = id; + this.capacityType = props.capacityType; + this.cluster = props.cluster; + this.vpc = props.cluster.vpc; + } + + /** + * Refuses to add a default cloudmap namespace to the cluster as we don't + * own it. + */ + addDefaultCloudMapNamespace(_options: ecs.CloudMapNamespaceOptions) { + throw new Error('the cluster environment is immutable when imported'); + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts index dcf3f7ac73e56..9a4973cd89d8f 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts +++ b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts @@ -70,7 +70,7 @@ export class AppMeshExtension extends ServiceExtension { // Make sure that the parent cluster for this service has // a namespace attached. if (!this.parentService.cluster.defaultCloudMapNamespace) { - this.parentService.cluster.addDefaultCloudMapNamespace({ + this.parentService.environment.addDefaultCloudMapNamespace({ // Name the namespace after the environment name. // Service DNS will be like . name: this.parentService.environment.id, diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/lib/service.ts b/packages/@aws-cdk-containers/ecs-service-extensions/lib/service.ts index 0b46f782a64d8..29134a8c83260 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/lib/service.ts +++ b/packages/@aws-cdk-containers/ecs-service-extensions/lib/service.ts @@ -1,7 +1,7 @@ import * as ec2 from '@aws-cdk/aws-ec2'; import * as ecs from '@aws-cdk/aws-ecs'; import * as cdk from '@aws-cdk/core'; -import { Environment } from './environment'; +import { IEnvironment } from './environment'; import { EnvironmentCapacityType, ServiceBuild } from './extensions/extension-interfaces'; import { ServiceDescription } from './service-description'; @@ -17,7 +17,7 @@ export interface ServiceProps { /** * The environment to launch the service in */ - readonly environment: Environment + readonly environment: IEnvironment } /** @@ -44,7 +44,7 @@ export class Service extends cdk.Construct { * The cluster that is providing capacity for this service * [disable-awslint:ref-via-interface] */ - public readonly cluster: ecs.Cluster; + public readonly cluster: ecs.ICluster; /** * The capacity type that this service will use @@ -59,7 +59,7 @@ export class Service extends cdk.Construct { /** * The environment this service was launched in */ - public readonly environment: Environment; + public readonly environment: IEnvironment; /** * The generated task definition for this service, is only diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/test/integ.imported-environment.expected.json b/packages/@aws-cdk-containers/ecs-service-extensions/test/integ.imported-environment.expected.json new file mode 100644 index 0000000000000..80156c0ed0d2d --- /dev/null +++ b/packages/@aws-cdk-containers/ecs-service-extensions/test/integ.imported-environment.expected.json @@ -0,0 +1,372 @@ +{ + "Resources": { + "ResourcesNestedStackResourcesNestedStackResourceCDA26E60": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "AssetParametersb537a3d3462b62d59d4661ff456403d270823b5c9974ea4f4264ff95683a8ba8S3Bucket60C7B412" + }, + "/", + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParametersb537a3d3462b62d59d4661ff456403d270823b5c9974ea4f4264ff95683a8ba8S3VersionKey6900DC52" + } + ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParametersb537a3d3462b62d59d4661ff456403d270823b5c9974ea4f4264ff95683a8ba8S3VersionKey6900DC52" + } + ] + } + ] + } + ] + ] + } + } + }, + "ServiceloadbalancerD5D60894": { + "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", + "Properties": { + "LoadBalancerAttributes": [ + { + "Key": "deletion_protection.enabled", + "Value": "false" + } + ], + "Scheme": "internet-facing", + "SecurityGroups": [ + { + "Fn::GetAtt": [ + "ServiceloadbalancerSecurityGroup2DA3E8D6", + "GroupId" + ] + } + ], + "Subnets": [ + { + "Fn::GetAtt": [ + "ResourcesNestedStackResourcesNestedStackResourceCDA26E60", + "Outputs.importedenvironmentintegResourcesEnvironmentenvironmentvpcPublicSubnet1Subnet0D15D382Ref" + ] + }, + { + "Fn::GetAtt": [ + "ResourcesNestedStackResourcesNestedStackResourceCDA26E60", + "Outputs.importedenvironmentintegResourcesEnvironmentenvironmentvpcPublicSubnet2Subnet68645ACARef" + ] + }, + { + "Fn::GetAtt": [ + "ResourcesNestedStackResourcesNestedStackResourceCDA26E60", + "Outputs.importedenvironmentintegResourcesEnvironmentenvironmentvpcPublicSubnet3Subnet408F449FRef" + ] + } + ], + "Type": "application" + } + }, + "ServiceloadbalancerSecurityGroup2DA3E8D6": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "Automatically created Security Group for ELB importedenvironmentintegServiceloadbalancerFAE8A5FA", + "SecurityGroupIngress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow from anyone on port 80", + "FromPort": 80, + "IpProtocol": "tcp", + "ToPort": 80 + } + ], + "VpcId": { + "Fn::GetAtt": [ + "ResourcesNestedStackResourcesNestedStackResourceCDA26E60", + "Outputs.importedenvironmentintegResourcesEnvironmentenvironmentvpcDC34D4D3Ref" + ] + } + } + }, + "ServiceloadbalancerSecurityGrouptoimportedenvironmentintegServiceserviceSecurityGroup2BE90F7480B17EB7CA": { + "Type": "AWS::EC2::SecurityGroupEgress", + "Properties": { + "GroupId": { + "Fn::GetAtt": [ + "ServiceloadbalancerSecurityGroup2DA3E8D6", + "GroupId" + ] + }, + "IpProtocol": "tcp", + "Description": "Load balancer to target", + "DestinationSecurityGroupId": { + "Fn::GetAtt": [ + "ServiceserviceSecurityGroup1915660F", + "GroupId" + ] + }, + "FromPort": 80, + "ToPort": 80 + } + }, + "ServiceloadbalancerServicelistenerC862F722": { + "Type": "AWS::ElasticLoadBalancingV2::Listener", + "Properties": { + "DefaultActions": [ + { + "TargetGroupArn": { + "Ref": "ServiceloadbalancerServicelistenerServiceGroup844B51E6" + }, + "Type": "forward" + } + ], + "LoadBalancerArn": { + "Ref": "ServiceloadbalancerD5D60894" + }, + "Port": 80, + "Protocol": "HTTP" + } + }, + "ServiceloadbalancerServicelistenerServiceGroup844B51E6": { + "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", + "Properties": { + "Port": 80, + "Protocol": "HTTP", + "TargetGroupAttributes": [ + { + "Key": "deregistration_delay.timeout_seconds", + "Value": "10" + } + ], + "TargetType": "ip", + "VpcId": { + "Fn::GetAtt": [ + "ResourcesNestedStackResourcesNestedStackResourceCDA26E60", + "Outputs.importedenvironmentintegResourcesEnvironmentenvironmentvpcDC34D4D3Ref" + ] + } + } + }, + "ServicetaskdefinitionTaskRole5B4B60A4": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ecs-tasks.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "Servicetaskdefinition0CEAD834": { + "Type": "AWS::ECS::TaskDefinition", + "Properties": { + "ContainerDefinitions": [ + { + "Cpu": 256, + "Environment": [ + { + "Name": "PORT", + "Value": "80" + } + ], + "Essential": true, + "Image": "nathanpeck/name", + "Memory": 512, + "Name": "app", + "PortMappings": [ + { + "ContainerPort": 80, + "Protocol": "tcp" + } + ], + "Ulimits": [ + { + "HardLimit": 1024000, + "Name": "nofile", + "SoftLimit": 1024000 + } + ] + } + ], + "Cpu": "256", + "Family": "importedenvironmentintegServicetaskdefinition63936B87", + "Memory": "512", + "NetworkMode": "awsvpc", + "RequiresCompatibilities": [ + "EC2", + "FARGATE" + ], + "TaskRoleArn": { + "Fn::GetAtt": [ + "ServicetaskdefinitionTaskRole5B4B60A4", + "Arn" + ] + } + } + }, + "ServiceserviceService6A153CB8": { + "Type": "AWS::ECS::Service", + "Properties": { + "Cluster": { + "Fn::GetAtt": [ + "ResourcesNestedStackResourcesNestedStackResourceCDA26E60", + "Outputs.importedenvironmentintegResourcesEnvironmentenvironmentcluster594A3DCARef" + ] + }, + "DeploymentConfiguration": { + "MaximumPercent": 200, + "MinimumHealthyPercent": 100 + }, + "DesiredCount": 1, + "EnableECSManagedTags": false, + "HealthCheckGracePeriodSeconds": 60, + "LaunchType": "FARGATE", + "LoadBalancers": [ + { + "ContainerName": "app", + "ContainerPort": 80, + "TargetGroupArn": { + "Ref": "ServiceloadbalancerServicelistenerServiceGroup844B51E6" + } + } + ], + "NetworkConfiguration": { + "AwsvpcConfiguration": { + "AssignPublicIp": "DISABLED", + "SecurityGroups": [ + { + "Fn::GetAtt": [ + "ServiceserviceSecurityGroup1915660F", + "GroupId" + ] + } + ], + "Subnets": [ + { + "Fn::GetAtt": [ + "ResourcesNestedStackResourcesNestedStackResourceCDA26E60", + "Outputs.importedenvironmentintegResourcesEnvironmentenvironmentvpcPrivateSubnet1Subnet7309E967Ref" + ] + }, + { + "Fn::GetAtt": [ + "ResourcesNestedStackResourcesNestedStackResourceCDA26E60", + "Outputs.importedenvironmentintegResourcesEnvironmentenvironmentvpcPrivateSubnet2Subnet55014443Ref" + ] + }, + { + "Fn::GetAtt": [ + "ResourcesNestedStackResourcesNestedStackResourceCDA26E60", + "Outputs.importedenvironmentintegResourcesEnvironmentenvironmentvpcPrivateSubnet3Subnet6CF08327Ref" + ] + } + ] + } + }, + "TaskDefinition": { + "Ref": "Servicetaskdefinition0CEAD834" + } + }, + "DependsOn": [ + "ServiceloadbalancerServicelistenerC862F722", + "ServiceloadbalancerServicelistenerServiceGroup844B51E6" + ] + }, + "ServiceserviceSecurityGroup1915660F": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "imported-environment-integ/Service-service/SecurityGroup", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": { + "Fn::GetAtt": [ + "ResourcesNestedStackResourcesNestedStackResourceCDA26E60", + "Outputs.importedenvironmentintegResourcesEnvironmentenvironmentvpcDC34D4D3Ref" + ] + } + } + }, + "ServiceserviceSecurityGroupfromimportedenvironmentintegServiceloadbalancerSecurityGroup68EE533C8070FCF629": { + "Type": "AWS::EC2::SecurityGroupIngress", + "Properties": { + "IpProtocol": "tcp", + "Description": "Load balancer to target", + "FromPort": 80, + "GroupId": { + "Fn::GetAtt": [ + "ServiceserviceSecurityGroup1915660F", + "GroupId" + ] + }, + "SourceSecurityGroupId": { + "Fn::GetAtt": [ + "ServiceloadbalancerSecurityGroup2DA3E8D6", + "GroupId" + ] + }, + "ToPort": 80 + } + } + }, + "Outputs": { + "Serviceloadbalancerdnsoutput": { + "Value": { + "Fn::GetAtt": [ + "ServiceloadbalancerD5D60894", + "DNSName" + ] + } + } + }, + "Parameters": { + "AssetParametersb537a3d3462b62d59d4661ff456403d270823b5c9974ea4f4264ff95683a8ba8S3Bucket60C7B412": { + "Type": "String", + "Description": "S3 bucket for asset \"b537a3d3462b62d59d4661ff456403d270823b5c9974ea4f4264ff95683a8ba8\"" + }, + "AssetParametersb537a3d3462b62d59d4661ff456403d270823b5c9974ea4f4264ff95683a8ba8S3VersionKey6900DC52": { + "Type": "String", + "Description": "S3 key for asset version \"b537a3d3462b62d59d4661ff456403d270823b5c9974ea4f4264ff95683a8ba8\"" + }, + "AssetParametersb537a3d3462b62d59d4661ff456403d270823b5c9974ea4f4264ff95683a8ba8ArtifactHash5EEB924C": { + "Type": "String", + "Description": "Artifact hash for asset \"b537a3d3462b62d59d4661ff456403d270823b5c9974ea4f4264ff95683a8ba8\"" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/test/integ.imported-environment.ts b/packages/@aws-cdk-containers/ecs-service-extensions/test/integ.imported-environment.ts new file mode 100644 index 0000000000000..899d9e4a4f7c4 --- /dev/null +++ b/packages/@aws-cdk-containers/ecs-service-extensions/test/integ.imported-environment.ts @@ -0,0 +1,99 @@ +import { Vpc } from '@aws-cdk/aws-ec2'; +import { Cluster, ContainerImage } from '@aws-cdk/aws-ecs'; +import { App, NestedStack, Stack } from '@aws-cdk/core'; +import { Construct } from 'constructs'; +import { + Container, + Environment, + EnvironmentCapacityType, + HttpLoadBalancerExtension, + Service, + ServiceDescription, +} from '../lib'; + +class ResourceStack extends NestedStack { + public readonly clusterName: string; + public readonly vpcId: string; + public readonly publicSubnetIds: string[]; + public readonly privateSubnetIds: string[]; + + constructor(scope: Construct, id: string) { + super(scope, id); + + const environment = new Environment(this, 'Environment'); + + this.clusterName = environment.cluster.clusterName; + this.vpcId = environment.vpc.vpcId; + this.privateSubnetIds = environment.vpc.privateSubnets.map(m => m.subnetId); + this.publicSubnetIds = environment.vpc.publicSubnets.map(m => m.subnetId); + } +} + +class TestStack extends Stack { + constructor(scope: Construct, id: string) { + super(scope, id); + // Create a nested stack with the shared resources + const resourceStack = new ResourceStack(this, 'Resources'); + + // Import the vpc from the nested stack + const vpc = Vpc.fromVpcAttributes(this, 'Vpc', { + availabilityZones: resourceStack.availabilityZones, + vpcId: resourceStack.vpcId, + privateSubnetIds: resourceStack.privateSubnetIds, + publicSubnetIds: resourceStack.publicSubnetIds, + }); + + // Import the cluster from the nested stack + const cluster = Cluster.fromClusterAttributes(this, 'Cluster', { + clusterName: resourceStack.clusterName, + securityGroups: [], + vpc: vpc, + }); + + // Create the environment from attributes. + const environment = Environment.fromEnvironmentAttributes(this, 'Environment', { + cluster, + capacityType: EnvironmentCapacityType.FARGATE, + }); + + // Add a workload. + const serviceDescription = new ServiceDescription(); + serviceDescription.add(new Container({ + cpu: 256, + memoryMiB: 512, + trafficPort: 80, + image: ContainerImage.fromRegistry('nathanpeck/name'), + environment: { + PORT: '80', + }, + })); + serviceDescription.add(new HttpLoadBalancerExtension()); + + new Service(this, 'Service', { + environment, + serviceDescription, + }); + } +} + +const app = new App(); +new TestStack(app, 'imported-environment-integ'); + +/** + * Expect this stack to deploy and show a load balancer DNS address. When you + * request the address with curl, you should see the name container's output. + * The load balancer may response 503 Service Temporarily Unavailable for a + * short while, before you can see the container output. + * + * Example: + * ``` + * $ cdk --app 'node integ.imported-environment.js' deploy + * ... + * Outputs: + * shared-cluster-integ.Serviceloadbalancerdnsoutput = share-Servi-6JALU1FDE36L-2093347098.us-east-1.elb.amazonaws.com + * ... + * + * $ curl share-Servi-6JALU1FDE36L-2093347098.us-east-1.elb.amazonaws.com + * Keira (ip-10-0-153-44.ec2.internal) + * ``` + */ diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/test/test.environment.ts b/packages/@aws-cdk-containers/ecs-service-extensions/test/test.environment.ts index cb19e71de1d82..d029f81e34bc6 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/test/test.environment.ts +++ b/packages/@aws-cdk-containers/ecs-service-extensions/test/test.environment.ts @@ -217,4 +217,28 @@ export = { test.done(); }, -}; \ No newline at end of file + 'should be able to create an environment from attributes'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + + const vpc = new ec2.Vpc(stack, 'VPC'); + const cluster = new ecs.Cluster(stack, 'Cluster', { vpc }); + cluster.addCapacity('DefaultAutoScalingGroup', { + instanceType: new ec2.InstanceType('t2.micro'), + }); + + // WHEN + const environment = Environment.fromEnvironmentAttributes(stack, 'Environment', { + capacityType: EnvironmentCapacityType.EC2, + cluster: cluster, + }); + + // THEN + test.equal(environment.capacityType, EnvironmentCapacityType.EC2); + test.equal(environment.cluster, cluster); + test.equal(environment.vpc, vpc); + test.equal(environment.id, 'Environment'); + + test.done(); + }, +}; From bed89a5d0aabe7d9a25ad7fac74a38f03b92e4c9 Mon Sep 17 00:00:00 2001 From: Alvyn Duy-Khoi Le Date: Mon, 2 Nov 2020 12:40:09 -0500 Subject: [PATCH 023/314] feat(appsync): support custom cloudWatchLogsRoleArn for GraphqlApi (#10357) - A custom/existing CW Logs Role ARN can now be specified in GraphqlApi configuration - Revert to newly created ApiLogsRole if not specified - fixes #9441 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-appsync/lib/graphqlapi.ts | 18 ++++--- .../@aws-cdk/aws-appsync/test/appsync.test.ts | 50 +++++++++++++++++++ 2 files changed, 62 insertions(+), 6 deletions(-) diff --git a/packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts b/packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts index 7ec0a8b555686..2d9addb93cf24 100644 --- a/packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts +++ b/packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts @@ -1,5 +1,5 @@ import { IUserPool } from '@aws-cdk/aws-cognito'; -import { ManagedPolicy, Role, ServicePrincipal, Grant, IGrantable } from '@aws-cdk/aws-iam'; +import { ManagedPolicy, Role, IRole, ServicePrincipal, Grant, IGrantable } from '@aws-cdk/aws-iam'; import { CfnResource, Duration, Expiration, IResolvable, Stack } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnApiKey, CfnGraphQLApi, CfnGraphQLSchema } from './appsync.generated'; @@ -203,6 +203,13 @@ export interface LogConfig { * @default - Use AppSync default */ readonly fieldLogLevel?: FieldLogLevel; + + /** + * The role for CloudWatch Logs + * + * @default - None + */ + readonly role?: IRole; } /** @@ -512,15 +519,14 @@ export class GraphqlApi extends GraphqlApiBase { private setupLogConfig(config?: LogConfig) { if (!config) return undefined; - const role = new Role(this, 'ApiLogsRole', { + const logsRoleArn: string = config.role?.roleArn ?? new Role(this, 'ApiLogsRole', { assumedBy: new ServicePrincipal('appsync.amazonaws.com'), managedPolicies: [ - ManagedPolicy.fromAwsManagedPolicyName( - 'service-role/AWSAppSyncPushToCloudWatchLogs'), + ManagedPolicy.fromAwsManagedPolicyName('service-role/AWSAppSyncPushToCloudWatchLogs'), ], - }); + }).roleArn; return { - cloudWatchLogsRoleArn: role.roleArn, + cloudWatchLogsRoleArn: logsRoleArn, excludeVerboseContent: config.excludeVerboseContent, fieldLogLevel: config.fieldLogLevel, }; diff --git a/packages/@aws-cdk/aws-appsync/test/appsync.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync.test.ts index debdfa71ce4f0..252051de6f0c6 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync.test.ts @@ -1,5 +1,6 @@ import * as path from 'path'; import '@aws-cdk/assert/jest'; +import * as iam from '@aws-cdk/aws-iam'; import * as cdk from '@aws-cdk/core'; import * as appsync from '../lib'; @@ -11,6 +12,7 @@ beforeEach(() => { authorizationConfig: {}, name: 'api', schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), + logConfig: {}, }); }); @@ -73,3 +75,51 @@ test('when xray is enabled should not throw an Error', () => { XrayEnabled: true, }); }); + +test('appsync GraphqlApi should be configured with custom CloudWatch Logs role when specified', () => { + // GIVEN + const cloudWatchLogRole: iam.Role = new iam.Role(stack, 'CloudWatchLogRole', { + assumedBy: new iam.ServicePrincipal('appsync.amazonaws.com'), + managedPolicies: [ + iam.ManagedPolicy.fromAwsManagedPolicyName('service-role/AWSAppSyncPushToCloudWatchLogs'), + ], + }); + + // WHEN + new appsync.GraphqlApi(stack, 'api-custom-cw-logs-role', { + authorizationConfig: {}, + name: 'apiWithCustomRole', + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), + logConfig: { + role: cloudWatchLogRole, + }, + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLApi', { + Name: 'apiWithCustomRole', + LogConfig: { + CloudWatchLogsRoleArn: { + 'Fn::GetAtt': [ + 'CloudWatchLogRoleE3242F1C', + 'Arn', + ], + }, + }, + }); +}); + +test('appsync GraphqlApi should not use custom role for CW Logs when not specified', () => { + // EXPECT + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLApi', { + Name: 'api', + LogConfig: { + CloudWatchLogsRoleArn: { + 'Fn::GetAtt': [ + 'apiApiLogsRole56BEE3F1', + 'Arn', + ], + }, + }, + }); +}); From 23d0943216df76bea395b319deb21282e4c57a7c Mon Sep 17 00:00:00 2001 From: Robert Koch Date: Tue, 3 Nov 2020 05:10:00 +1100 Subject: [PATCH 024/314] feat(appsync): add RDS datasource (#9258) ~~Very, ***very*** preliminary attempt at adding RDS data source to AppSync.~~ ~~Still need to fix tests and lint.~~ This PR adds support for RDS as a datasource for AppSync. There are several examples included in the README, integration tests, and documentation. Fixes #9152 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-appsync/README.md | 65 +++++- .../@aws-cdk/aws-appsync/lib/data-source.ts | 58 ++++- .../aws-appsync/lib/graphqlapi-base.ts | 41 +++- packages/@aws-cdk/aws-appsync/package.json | 6 + .../aws-appsync/test/appsync-rds.test.ts | 206 ++++++++++++++++++ 5 files changed, 372 insertions(+), 4 deletions(-) create mode 100644 packages/@aws-cdk/aws-appsync/test/appsync-rds.test.ts diff --git a/packages/@aws-cdk/aws-appsync/README.md b/packages/@aws-cdk/aws-appsync/README.md index 6095e3657ef9d..56c4cf6e0504a 100644 --- a/packages/@aws-cdk/aws-appsync/README.md +++ b/packages/@aws-cdk/aws-appsync/README.md @@ -31,7 +31,7 @@ type demo { version: String! } type Query { - getDemos: [ test! ] + getDemos: [ demo! ] } input DemoInput { version: String! @@ -84,6 +84,69 @@ demoDS.createResolver({ }); ``` +## Aurora Serverless + +AppSync provides a data source for executing SQL commands against Amazon Aurora +Serverless clusters. You can use AppSync resolvers to execute SQL statements +against the Data API with GraphQL queries, mutations, and subscriptions. + +```ts +// Create username and password secret for DB Cluster +const secret = new rds.DatabaseSecret(stack, 'AuroraSecret', { + username: 'clusteradmin', +}); + +// Create the DB cluster, provide all values needed to customise the database. +const cluster = new rds.DatabaseCluster(stack, 'AuroraCluster', { + engine: rds.DatabaseClusterEngine.auroraMysql({ version: rds.AuroraMysqlEngineVersion.VER_2_07_1 }), + credentials: { username: 'clusteradmin' }, + clusterIdentifier: 'db-endpoint-test', + defaultDatabaseName: 'demos', +}); + +// Build a data source for AppSync to access the database. +const rdsDS = api.addRdsDataSource('rds', 'The rds data source', cluster, secret); + +// Set up a resolver for an RDS query. +rdsDS.createResolver({ + typeName: 'Query', + fieldName: 'getDemosRds', + requestMappingTemplate: MappingTemplate.fromString(` + { + "version": "2018-05-29", + "statements": [ + "SELECT * FROM demos" + ] + } + `), + responseMappingTemplate: MappingTemplate.fromString(` + $util.rds.toJsonObject($ctx.result) + `), +}); + +// Set up a resolver for an RDS mutation. +rdsDS.createResolver({ + typeName: 'Mutation', + fieldName: 'addDemoRds', + requestMappingTemplate: MappingTemplate.fromString(` + { + "version": "2018-05-29", + "statements": [ + "INSERT INTO demos VALUES (:id, :version)", + "SELECT * WHERE id = :id" + ], + "variableMap": { + ":id": $util.toJson($util.autoId()), + ":version": $util.toJson($ctx.args.version) + } + } + `), + responseMappingTemplate: MappingTemplate.fromString(` + $util.rds.toJsonObject($ctx.result) + `), +}); +``` + #### HTTP Endpoints GraphQL schema file `schema.graphql`: diff --git a/packages/@aws-cdk/aws-appsync/lib/data-source.ts b/packages/@aws-cdk/aws-appsync/lib/data-source.ts index babde4be0a3fb..e13136090b56c 100644 --- a/packages/@aws-cdk/aws-appsync/lib/data-source.ts +++ b/packages/@aws-cdk/aws-appsync/lib/data-source.ts @@ -1,7 +1,9 @@ import { ITable } from '@aws-cdk/aws-dynamodb'; -import { IGrantable, IPrincipal, IRole, Role, ServicePrincipal } from '@aws-cdk/aws-iam'; +import { Grant, IGrantable, IPrincipal, IRole, Role, ServicePrincipal } from '@aws-cdk/aws-iam'; import { IFunction } from '@aws-cdk/aws-lambda'; -import { IResolvable } from '@aws-cdk/core'; +import { IDatabaseCluster } from '@aws-cdk/aws-rds'; +import { ISecret } from '@aws-cdk/aws-secretsmanager'; +import { IResolvable, Stack } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnDataSource } from './appsync.generated'; import { IGraphqlApi } from './graphqlapi-base'; @@ -283,4 +285,56 @@ export class LambdaDataSource extends BackedDataSource { }); props.lambdaFunction.grantInvoke(this); } +} + +/** + * Properties for an AppSync RDS datasource + */ +export interface RdsDataSourceProps extends BackedDataSourceProps { + /** + * The database cluster to call to interact with this data source + */ + readonly databaseCluster: IDatabaseCluster; + /** + * The secret containing the credentials for the database + */ + readonly secretStore: ISecret; +} + +/** + * An AppSync datasource backed by RDS + */ +export class RdsDataSource extends BackedDataSource { + constructor(scope: Construct, id: string, props: RdsDataSourceProps) { + super(scope, id, props, { + type: 'RELATIONAL_DATABASE', + relationalDatabaseConfig: { + rdsHttpEndpointConfig: { + awsRegion: props.databaseCluster.stack.region, + dbClusterIdentifier: props.databaseCluster.clusterIdentifier, + awsSecretStoreArn: props.secretStore.secretArn, + }, + relationalDatabaseSourceType: 'RDS_HTTP_ENDPOINT', + }, + }); + props.secretStore.grantRead(this); + const clusterArn = Stack.of(this).formatArn({ + service: 'rds', + resource: `cluster:${props.databaseCluster.clusterIdentifier}`, + }); + // Change to grant with RDS grant becomes implemented + Grant.addToPrincipal({ + grantee: this, + actions: [ + 'rds-data:DeleteItems', + 'rds-data:ExecuteSql', + 'rds-data:ExecuteStatement', + 'rds-data:GetItems', + 'rds-data:InsertItems', + 'rds-data:UpdateItems', + ], + resourceArns: [clusterArn, `${clusterArn}:*`], + scope: this, + }); + } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/lib/graphqlapi-base.ts b/packages/@aws-cdk/aws-appsync/lib/graphqlapi-base.ts index 0525b51340fcd..288384c6454a5 100644 --- a/packages/@aws-cdk/aws-appsync/lib/graphqlapi-base.ts +++ b/packages/@aws-cdk/aws-appsync/lib/graphqlapi-base.ts @@ -1,7 +1,9 @@ import { ITable } from '@aws-cdk/aws-dynamodb'; import { IFunction } from '@aws-cdk/aws-lambda'; +import { IDatabaseCluster } from '@aws-cdk/aws-rds'; +import { ISecret } from '@aws-cdk/aws-secretsmanager'; import { CfnResource, IResource, Resource } from '@aws-cdk/core'; -import { DynamoDbDataSource, HttpDataSource, LambdaDataSource, NoneDataSource, AwsIamConfig } from './data-source'; +import { DynamoDbDataSource, HttpDataSource, LambdaDataSource, NoneDataSource, RdsDataSource, AwsIamConfig } from './data-source'; /** * Optional configuration for data sources @@ -90,6 +92,21 @@ export interface IGraphqlApi extends IResource { */ addLambdaDataSource(id: string, lambdaFunction: IFunction, options?: DataSourceOptions): LambdaDataSource; + /** + * add a new Rds data source to this API + * + * @param id The data source's id + * @param databaseCluster The database cluster to interact with this data source + * @param secretStore The secret store that contains the username and password for the database cluster + * @param options The optional configuration for this data source + */ + addRdsDataSource( + id: string, + databaseCluster: IDatabaseCluster, + secretStore: ISecret, + options?: DataSourceOptions + ): RdsDataSource; + /** * Add schema dependency if not imported * @@ -178,6 +195,28 @@ export abstract class GraphqlApiBase extends Resource implements IGraphqlApi { }); } + /** + * add a new Rds data source to this API + * @param id The data source's id + * @param databaseCluster The database cluster to interact with this data source + * @param secretStore The secret store that contains the username and password for the database cluster + * @param options The optional configuration for this data source + */ + public addRdsDataSource( + id: string, + databaseCluster: IDatabaseCluster, + secretStore: ISecret, + options?: DataSourceOptions, + ): RdsDataSource { + return new RdsDataSource(this, id, { + api: this, + name: options?.name, + description: options?.description, + databaseCluster, + secretStore, + }); + } + /** * Add schema dependency if not imported * diff --git a/packages/@aws-cdk/aws-appsync/package.json b/packages/@aws-cdk/aws-appsync/package.json index e581f2571e319..5c946b4afcd17 100644 --- a/packages/@aws-cdk/aws-appsync/package.json +++ b/packages/@aws-cdk/aws-appsync/package.json @@ -82,7 +82,10 @@ "dependencies": { "@aws-cdk/aws-cognito": "0.0.0", "@aws-cdk/aws-dynamodb": "0.0.0", + "@aws-cdk/aws-ec2": "0.0.0", + "@aws-cdk/aws-rds": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", + "@aws-cdk/aws-secretsmanager": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-s3-assets": "0.0.0", "@aws-cdk/core": "0.0.0", @@ -92,10 +95,13 @@ "peerDependencies": { "@aws-cdk/aws-cognito": "0.0.0", "@aws-cdk/aws-dynamodb": "0.0.0", + "@aws-cdk/aws-ec2": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-s3-assets": "0.0.0", "@aws-cdk/core": "0.0.0", + "@aws-cdk/aws-rds": "0.0.0", + "@aws-cdk/aws-secretsmanager": "0.0.0", "constructs": "^3.2.0" }, "engines": { diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-rds.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-rds.test.ts new file mode 100644 index 0000000000000..ba0d80d00037b --- /dev/null +++ b/packages/@aws-cdk/aws-appsync/test/appsync-rds.test.ts @@ -0,0 +1,206 @@ +import '@aws-cdk/assert/jest'; +import * as path from 'path'; +import { Vpc, SecurityGroup, SubnetType, InstanceType, InstanceClass, InstanceSize } from '@aws-cdk/aws-ec2'; +import { DatabaseSecret, DatabaseCluster, DatabaseClusterEngine, AuroraMysqlEngineVersion } from '@aws-cdk/aws-rds'; +import * as cdk from '@aws-cdk/core'; +import * as appsync from '../lib'; + +// GLOBAL GIVEN +let stack: cdk.Stack; +let api: appsync.GraphqlApi; +beforeEach(() => { + stack = new cdk.Stack(); + api = new appsync.GraphqlApi(stack, 'baseApi', { + name: 'api', + schema: new appsync.Schema({ + filePath: path.join(__dirname, 'appsync.test.graphql'), + }), + }); +}); + +describe('Rds Data Source configuration', () => { + // GIVEN + let secret: DatabaseSecret; + let cluster: DatabaseCluster; + beforeEach(() => { + const vpc = new Vpc(stack, 'Vpc', { maxAzs: 2 }); + const securityGroup = new SecurityGroup(stack, 'AuroraSecurityGroup', { + vpc, + allowAllOutbound: true, + }); + secret = new DatabaseSecret(stack, 'AuroraSecret', { + username: 'clusteradmin', + }); + cluster = new DatabaseCluster(stack, 'AuroraCluster', { + engine: DatabaseClusterEngine.auroraMysql({ version: AuroraMysqlEngineVersion.VER_2_07_1 }), + credentials: { username: 'clusteradmin' }, + clusterIdentifier: 'db-endpoint-test', + instanceProps: { + instanceType: InstanceType.of(InstanceClass.BURSTABLE2, InstanceSize.SMALL), + vpcSubnets: { subnetType: SubnetType.PRIVATE }, + vpc, + securityGroups: [securityGroup], + }, + defaultDatabaseName: 'Animals', + }); + }); + + test('appsync creates correct policy', () => { + // WHEN + api.addRdsDataSource('ds', cluster, secret); + + // THEN + expect(stack).toHaveResourceLike('AWS::IAM::Policy', { + PolicyDocument: { + Version: '2012-10-17', + Statement: [{ + Action: [ + 'secretsmanager:GetSecretValue', + 'secretsmanager:DescribeSecret', + ], + Effect: 'Allow', + Resource: { Ref: 'AuroraSecret41E6E877' }, + }, + { + Action: [ + 'rds-data:DeleteItems', + 'rds-data:ExecuteSql', + 'rds-data:ExecuteStatement', + 'rds-data:GetItems', + 'rds-data:InsertItems', + 'rds-data:UpdateItems', + ], + Effect: 'Allow', + Resource: [{ + 'Fn::Join': ['', ['arn:', + { Ref: 'AWS::Partition' }, + ':rds:', + { Ref: 'AWS::Region' }, + ':', + { Ref: 'AWS::AccountId' }, + ':cluster:', + { Ref: 'AuroraCluster23D869C0' }]], + }, + { + 'Fn::Join': ['', ['arn:', + { Ref: 'AWS::Partition' }, + ':rds:', + { Ref: 'AWS::Region' }, + ':', + { Ref: 'AWS::AccountId' }, + ':cluster:', + { Ref: 'AuroraCluster23D869C0' }, + ':*']], + }], + }], + }, + }); + }); + + test('default configuration produces name identical to the id', () => { + // WHEN + api.addRdsDataSource('ds', cluster, secret); + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::DataSource', { + Type: 'RELATIONAL_DATABASE', + Name: 'ds', + }); + }); + + test('appsync configures name correctly', () => { + // WHEN + api.addRdsDataSource('ds', cluster, secret, { + name: 'custom', + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::DataSource', { + Type: 'RELATIONAL_DATABASE', + Name: 'custom', + }); + }); + + test('appsync configures name and description correctly', () => { + // WHEN + api.addRdsDataSource('ds', cluster, secret, { + name: 'custom', + description: 'custom description', + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::DataSource', { + Type: 'RELATIONAL_DATABASE', + Name: 'custom', + Description: 'custom description', + }); + }); + + test('appsync errors when creating multiple rds data sources with no configuration', () => { + // WHEN + const when = () => { + api.addRdsDataSource('ds', cluster, secret); + api.addRdsDataSource('ds', cluster, secret); + }; + + // THEN + expect(when).toThrow('There is already a Construct with name \'ds\' in GraphqlApi [baseApi]'); + }); +}); + +describe('adding rds data source from imported api', () => { + // GIVEN + let secret: DatabaseSecret; + let cluster: DatabaseCluster; + beforeEach(() => { + const vpc = new Vpc(stack, 'Vpc', { maxAzs: 2 }); + const securityGroup = new SecurityGroup(stack, 'AuroraSecurityGroup', { + vpc, + allowAllOutbound: true, + }); + secret = new DatabaseSecret(stack, 'AuroraSecret', { + username: 'clusteradmin', + }); + cluster = new DatabaseCluster(stack, 'AuroraCluster', { + engine: DatabaseClusterEngine.auroraMysql({ version: AuroraMysqlEngineVersion.VER_2_07_1 }), + credentials: { username: 'clusteradmin' }, + clusterIdentifier: 'db-endpoint-test', + instanceProps: { + instanceType: InstanceType.of(InstanceClass.BURSTABLE2, InstanceSize.SMALL), + vpcSubnets: { subnetType: SubnetType.PRIVATE }, + vpc, + securityGroups: [securityGroup], + }, + defaultDatabaseName: 'Animals', + }); + }); + + test('imported api can add RdsDbDataSource from id', () => { + // WHEN + const importedApi = appsync.GraphqlApi.fromGraphqlApiAttributes(stack, 'importedApi', { + graphqlApiId: api.apiId, + }); + importedApi.addRdsDataSource('ds', cluster, secret); + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::DataSource', { + Type: 'RELATIONAL_DATABASE', + ApiId: { 'Fn::GetAtt': ['baseApiCDA4D43A', 'ApiId'] }, + }); + }); + + test('imported api can add RdsDataSource from attributes', () => { + // WHEN + const importedApi = appsync.GraphqlApi.fromGraphqlApiAttributes(stack, 'importedApi', { + graphqlApiId: api.apiId, + graphqlApiArn: api.arn, + }); + importedApi.addRdsDataSource('ds', cluster, secret); + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::DataSource', { + Type: 'RELATIONAL_DATABASE', + ApiId: { 'Fn::GetAtt': ['baseApiCDA4D43A', 'ApiId'] }, + }); + }); +}); \ No newline at end of file From 122c68c89838a9f5c4755d909635d8407f9a8019 Mon Sep 17 00:00:00 2001 From: Shiv Lakshminarayan Date: Mon, 2 Nov 2020 10:39:11 -0800 Subject: [PATCH 025/314] chore(pipelines): remove unused dependency on nodeunit (#11257) this module's tests are written in jest ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/pipelines/package.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/@aws-cdk/pipelines/package.json b/packages/@aws-cdk/pipelines/package.json index db990d5b0c366..845da0c6be1f5 100644 --- a/packages/@aws-cdk/pipelines/package.json +++ b/packages/@aws-cdk/pipelines/package.json @@ -30,11 +30,9 @@ }, "devDependencies": { "@aws-cdk/assert": "0.0.0", - "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "nodeunit": "^0.11.3", "pkglint": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/aws-ecr": "0.0.0", From 0f6683394fa6f96d6839b2c107f3dab8045509b4 Mon Sep 17 00:00:00 2001 From: Takumi Akiyama Date: Tue, 3 Nov 2020 04:08:36 +0900 Subject: [PATCH 026/314] fix(stepfunctions-tasks): Athena* APIs have incorrect supported integration patterns (#11188) The changes made by #11045 seem to support `WAIT_FOR_TASK_TOKEN (.waitForTaskToken)` but according to the documentation, only `Request Response` and `Run a job (.sync)` are supported: https://docs.aws.amazon.com/step-functions/latest/dg/connect-athena.html closes #11246 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../lib/athena/get-query-execution.ts | 1 - .../lib/athena/get-query-results.ts | 1 - .../lib/athena/start-query-execution.ts | 6 +-- .../lib/athena/stop-query-execution.ts | 1 - .../integ.get-query-execution.expected.json | 3 +- .../integ.get-query-results.expected.json | 3 +- .../integ.start-query-execution.expected.json | 3 +- .../integ.stop-query-execution.expected.json | 3 +- .../test/athena/start-query-execution.test.ts | 47 ++++++++++++++++++- 9 files changed, 57 insertions(+), 11 deletions(-) diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/get-query-execution.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/get-query-execution.ts index 2f7ea7f53d556..555a42f107cd8 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/get-query-execution.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/get-query-execution.ts @@ -26,7 +26,6 @@ export class AthenaGetQueryExecution extends sfn.TaskStateBase { private static readonly SUPPORTED_INTEGRATION_PATTERNS: sfn.IntegrationPattern[] = [ sfn.IntegrationPattern.REQUEST_RESPONSE, - sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN, ]; protected readonly taskMetrics?: sfn.TaskMetricsConfig; diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/get-query-results.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/get-query-results.ts index 781ed8da2d557..4adc8cd4ce379 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/get-query-results.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/get-query-results.ts @@ -40,7 +40,6 @@ export class AthenaGetQueryResults extends sfn.TaskStateBase { private static readonly SUPPORTED_INTEGRATION_PATTERNS: sfn.IntegrationPattern[] = [ sfn.IntegrationPattern.REQUEST_RESPONSE, - sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN, ]; protected readonly taskMetrics?: sfn.TaskMetricsConfig; diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts index 17328e7e97648..9450800fb6d0b 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts @@ -54,7 +54,7 @@ export class AthenaStartQueryExecution extends sfn.TaskStateBase { private static readonly SUPPORTED_INTEGRATION_PATTERNS: sfn.IntegrationPattern[] = [ sfn.IntegrationPattern.REQUEST_RESPONSE, - sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN, + sfn.IntegrationPattern.RUN_JOB, ]; protected readonly taskMetrics?: sfn.TaskMetricsConfig; @@ -87,7 +87,7 @@ export class AthenaStartQueryExecution extends sfn.TaskStateBase { }), ], - actions: ['athena:getDataCatalog', 'athena:startQueryExecution'], + actions: ['athena:getDataCatalog', 'athena:startQueryExecution', 'athena:getQueryExecution'], }), ]; @@ -286,4 +286,4 @@ export interface QueryExecutionContext { * @default - No database */ readonly databaseName?: string; -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/stop-query-execution.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/stop-query-execution.ts index 27c5c606949fc..7a51559a79631 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/stop-query-execution.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/stop-query-execution.ts @@ -24,7 +24,6 @@ export class AthenaStopQueryExecution extends sfn.TaskStateBase { private static readonly SUPPORTED_INTEGRATION_PATTERNS: sfn.IntegrationPattern[] = [ sfn.IntegrationPattern.REQUEST_RESPONSE, - sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN, ]; protected readonly taskMetrics?: sfn.TaskMetricsConfig; diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.expected.json index de3041464cf88..b83da65e87a2d 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.expected.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.expected.json @@ -36,7 +36,8 @@ { "Action": [ "athena:getDataCatalog", - "athena:startQueryExecution" + "athena:startQueryExecution", + "athena:getQueryExecution" ], "Effect": "Allow", "Resource": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.expected.json index f593dc785feab..9718e2fa79df9 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.expected.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.expected.json @@ -36,7 +36,8 @@ { "Action": [ "athena:getDataCatalog", - "athena:startQueryExecution" + "athena:startQueryExecution", + "athena:getQueryExecution" ], "Effect": "Allow", "Resource": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.expected.json index 4cff9888545d8..1f5ad33266295 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.expected.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.expected.json @@ -36,7 +36,8 @@ { "Action": [ "athena:getDataCatalog", - "athena:startQueryExecution" + "athena:startQueryExecution", + "athena:getQueryExecution" ], "Effect": "Allow", "Resource": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.expected.json index 28aaf5d4ab243..a797335db041c 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.expected.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.expected.json @@ -36,7 +36,8 @@ { "Action": [ "athena:getDataCatalog", - "athena:startQueryExecution" + "athena:startQueryExecution", + "athena:getQueryExecution" ], "Effect": "Allow", "Resource": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/start-query-execution.test.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/start-query-execution.test.ts index 3ab4c0e3202ff..5606f067167b6 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/start-query-execution.test.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/start-query-execution.test.ts @@ -1,3 +1,4 @@ +import * as sfn from '@aws-cdk/aws-stepfunctions'; import * as cdk from '@aws-cdk/core'; import { AthenaStartQueryExecution, EncryptionOption } from '../../lib/athena/start-query-execution'; @@ -53,4 +54,48 @@ describe('Start Query Execution', () => { }, }); }); -}); \ No newline at end of file + + test('sync integrationPattern', () => { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + const task = new AthenaStartQueryExecution(stack, 'Query', { + integrationPattern: sfn.IntegrationPattern.RUN_JOB, + queryString: 'CREATE DATABASE database', + queryExecutionContext: { + databaseName: 'mydatabase', + }, + resultConfiguration: { + encryptionConfiguration: { encryptionOption: EncryptionOption.S3_MANAGED }, + }, + }); + + // THEN + expect(stack.resolve(task.toStateJson())).toEqual({ + Type: 'Task', + Resource: { + 'Fn::Join': [ + '', + [ + 'arn:', + { + Ref: 'AWS::Partition', + }, + ':states:::athena:startQueryExecution.sync', + ], + ], + }, + End: true, + Parameters: { + QueryString: 'CREATE DATABASE database', + QueryExecutionContext: { + Database: 'mydatabase', + }, + ResultConfiguration: { + EncryptionConfiguration: { EncryptionOption: EncryptionOption.S3_MANAGED }, + }, + }, + }); + }); +}); From 8c9321b833c1dc9eed1c2e33fe3715cb0b181630 Mon Sep 17 00:00:00 2001 From: Matt Simpson Date: Tue, 3 Nov 2020 10:55:36 +1300 Subject: [PATCH 027/314] docs(lamba-event-sources): Fix code example in README.md (#11241) Fix missing parenthesis in SQS code example ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-lambda-event-sources/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda-event-sources/README.md b/packages/@aws-cdk/aws-lambda-event-sources/README.md index 9f33fb689b54d..b1fec3c4c78a7 100644 --- a/packages/@aws-cdk/aws-lambda-event-sources/README.md +++ b/packages/@aws-cdk/aws-lambda-event-sources/README.md @@ -64,8 +64,8 @@ const queue = new sqs.Queue(this, 'MyQueue', { }); lambda.addEventSource(new SqsEventSource(queue, { - batchSize: 10 // default -}); + batchSize: 10, // default +})); ``` ### S3 From b35c423644fbd8f20705c16c0809a9fb93e6d6f3 Mon Sep 17 00:00:00 2001 From: Sumeet Badyal Date: Mon, 2 Nov 2020 19:48:00 -0800 Subject: [PATCH 028/314] fix(stepfunctions-tasks): incorrect S3 permissions for AthenaStartQueryExecution (#11203) The changes made by https://github.com/aws/aws-cdk/pull/11045 grant S3 scoped permissions if the optional parameter output location is passed. The output location is not parsed correctly to be attached as a resource. When the output location is correctly parsed, state machines with a valid definition and a valid S3 bucket still fail due to an `Unable to verify/create output bucket` error. The exact same state machine and S3 bucket pass with wildcard permissions as such the resource for Start Query Execution must be changed to `*`. BREAKING CHANGE: type of `outputLocation` in the experimental Athena `StartQueryExecution` has been changed to `s3.Location` from `string` ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../lib/athena/start-query-execution.ts | 78 +++++++++++++------ .../integ.get-query-execution.expected.json | 12 ++- .../integ.get-query-results.expected.json | 12 ++- .../integ.start-query-execution.expected.json | 12 ++- .../integ.stop-query-execution.expected.json | 12 ++- .../test/athena/start-query-execution.test.ts | 7 +- 6 files changed, 94 insertions(+), 39 deletions(-) diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts index 9450800fb6d0b..50dc1b03a24bc 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts @@ -1,5 +1,6 @@ import * as iam from '@aws-cdk/aws-iam'; import * as kms from '@aws-cdk/aws-kms'; +import * as s3 from '@aws-cdk/aws-s3'; import * as sfn from '@aws-cdk/aws-stepfunctions'; import * as cdk from '@aws-cdk/core'; import { Construct } from 'constructs'; @@ -93,22 +94,28 @@ export class AthenaStartQueryExecution extends sfn.TaskStateBase { policyStatements.push( new iam.PolicyStatement({ - actions: ['s3:AbortMultipartUpload', - 's3:CreateBucket', - 's3:GetBucketLocation', - 's3:GetObject', + actions: ['s3:CreateBucket', 's3:ListBucket', + 's3:GetBucketLocation', + 's3:GetObject'], + resources: ['*'], // Need * permissions to create new output location https://docs.aws.amazon.com/athena/latest/ug/security-iam-athena.html + }), + ); + + policyStatements.push( + new iam.PolicyStatement({ + actions: ['s3:AbortMultipartUpload', 's3:ListBucketMultipartUploads', 's3:ListMultipartUploadParts', 's3:PutObject'], - resources: [this.props.resultConfiguration?.outputLocation ?? '*'], // Need S3 location where data is stored https://docs.aws.amazon.com/athena/latest/ug/security-iam-athena.html + resources: [this.props.resultConfiguration?.outputLocation?.bucketName ? `arn:aws:s3:::${this.props.resultConfiguration?.outputLocation?.bucketName}/${this.props.resultConfiguration?.outputLocation?.objectKey}/*` : '*'], // Need S3 location where data is stored or Athena throws an Unable to verify/create output bucket https://docs.aws.amazon.com/athena/latest/ug/security-iam-athena.html }), ); policyStatements.push( new iam.PolicyStatement({ actions: ['lakeformation:GetDataAccess'], - resources: [this.props.resultConfiguration?.outputLocation ?? '*'], // Workflow role permissions https://docs.aws.amazon.com/lake-formation/latest/dg/permissions-reference.html + resources: ['*'], // State machines scoped to output location fail and * permissions are required as per documentation https://docs.aws.amazon.com/lake-formation/latest/dg/permissions-reference.html }), ); @@ -167,25 +174,46 @@ export class AthenaStartQueryExecution extends sfn.TaskStateBase { * @internal */ protected _renderTask(): any { - return { - Resource: integrationResourceArn('athena', 'startQueryExecution', this.integrationPattern), - Parameters: sfn.FieldUtils.renderObject({ - QueryString: this.props.queryString, - ClientRequestToken: this.props.clientRequestToken, - QueryExecutionContext: { - Catalog: this.props.queryExecutionContext?.catalogName, - Database: this.props.queryExecutionContext?.databaseName, - }, - ResultConfiguration: { - EncryptionConfiguration: { - EncryptionOption: this.props.resultConfiguration?.encryptionConfiguration?.encryptionOption, - KmsKey: this.props.resultConfiguration?.encryptionConfiguration?.encryptionKey, + if (this.props.resultConfiguration?.outputLocation) { + return { + Resource: integrationResourceArn('athena', 'startQueryExecution', this.integrationPattern), + Parameters: sfn.FieldUtils.renderObject({ + QueryString: this.props.queryString, + ClientRequestToken: this.props.clientRequestToken, + QueryExecutionContext: { + Catalog: this.props.queryExecutionContext?.catalogName, + Database: this.props.queryExecutionContext?.databaseName, }, - OutputLocation: this.props.resultConfiguration?.outputLocation, - }, - WorkGroup: this.props.workGroup, - }), - }; + ResultConfiguration: { + EncryptionConfiguration: { + EncryptionOption: this.props.resultConfiguration?.encryptionConfiguration?.encryptionOption, + KmsKey: this.props.resultConfiguration?.encryptionConfiguration?.encryptionKey, + }, + OutputLocation: `s3://${this.props.resultConfiguration?.outputLocation?.bucketName}/${this.props.resultConfiguration?.outputLocation?.objectKey}/`, + }, + WorkGroup: this.props.workGroup, + }), + }; + } else { + return { + Resource: integrationResourceArn('athena', 'startQueryExecution', this.integrationPattern), + Parameters: sfn.FieldUtils.renderObject({ + QueryString: this.props.queryString, + ClientRequestToken: this.props.clientRequestToken, + QueryExecutionContext: { + Catalog: this.props.queryExecutionContext?.catalogName, + Database: this.props.queryExecutionContext?.databaseName, + }, + ResultConfiguration: { + EncryptionConfiguration: { + EncryptionOption: this.props.resultConfiguration?.encryptionConfiguration?.encryptionOption, + KmsKey: this.props.resultConfiguration?.encryptionConfiguration?.encryptionKey, + }, + }, + WorkGroup: this.props.workGroup, + }), + }; + } } } @@ -203,7 +231,7 @@ export interface ResultConfiguration { * @default - Query Result Location set in Athena settings for this workgroup * @example s3://query-results-bucket/folder/ */ - readonly outputLocation?: string; + readonly outputLocation?: s3.Location; /** * Encryption option used if enabled in S3 diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.expected.json index b83da65e87a2d..07442708a7080 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.expected.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.expected.json @@ -85,11 +85,17 @@ }, { "Action": [ - "s3:AbortMultipartUpload", "s3:CreateBucket", - "s3:GetBucketLocation", - "s3:GetObject", "s3:ListBucket", + "s3:GetBucketLocation", + "s3:GetObject" + ], + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": [ + "s3:AbortMultipartUpload", "s3:ListBucketMultipartUploads", "s3:ListMultipartUploadParts", "s3:PutObject" diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.expected.json index 9718e2fa79df9..b11ec6cee2c3a 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.expected.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.expected.json @@ -85,11 +85,17 @@ }, { "Action": [ - "s3:AbortMultipartUpload", "s3:CreateBucket", - "s3:GetBucketLocation", - "s3:GetObject", "s3:ListBucket", + "s3:GetBucketLocation", + "s3:GetObject" + ], + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": [ + "s3:AbortMultipartUpload", "s3:ListBucketMultipartUploads", "s3:ListMultipartUploadParts", "s3:PutObject" diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.expected.json index 1f5ad33266295..200fc56302b66 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.expected.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.expected.json @@ -85,11 +85,17 @@ }, { "Action": [ - "s3:AbortMultipartUpload", "s3:CreateBucket", - "s3:GetBucketLocation", - "s3:GetObject", "s3:ListBucket", + "s3:GetBucketLocation", + "s3:GetObject" + ], + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": [ + "s3:AbortMultipartUpload", "s3:ListBucketMultipartUploads", "s3:ListMultipartUploadParts", "s3:PutObject" diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.expected.json index a797335db041c..a25e8d93b5bba 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.expected.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.expected.json @@ -85,11 +85,17 @@ }, { "Action": [ - "s3:AbortMultipartUpload", "s3:CreateBucket", - "s3:GetBucketLocation", - "s3:GetObject", "s3:ListBucket", + "s3:GetBucketLocation", + "s3:GetObject" + ], + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": [ + "s3:AbortMultipartUpload", "s3:ListBucketMultipartUploads", "s3:ListMultipartUploadParts", "s3:PutObject" diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/start-query-execution.test.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/start-query-execution.test.ts index 5606f067167b6..c96e4356c7a11 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/start-query-execution.test.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/start-query-execution.test.ts @@ -18,7 +18,10 @@ describe('Start Query Execution', () => { }, resultConfiguration: { encryptionConfiguration: { encryptionOption: EncryptionOption.S3_MANAGED }, - outputLocation: 'https://s3.Region.amazonaws.com/bucket-name/key-name', + outputLocation: { + bucketName: 'query-results-bucket', + objectKey: 'folder', + }, }, workGroup: 'primary', }); @@ -48,7 +51,7 @@ describe('Start Query Execution', () => { }, ResultConfiguration: { EncryptionConfiguration: { EncryptionOption: EncryptionOption.S3_MANAGED }, - OutputLocation: 'https://s3.Region.amazonaws.com/bucket-name/key-name', + OutputLocation: 's3://query-results-bucket/folder/', }, WorkGroup: 'primary', }, From 9d0c935fc62f325105598473e39b47b247437146 Mon Sep 17 00:00:00 2001 From: Sean Myers Date: Mon, 2 Nov 2020 23:44:04 -0800 Subject: [PATCH 029/314] feat(ec2): Add Lambda interface endpoint (#11260) Lambda is missing from InterfaceVpcEndpointAwsService, this adds it. closes: #11259 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts | 1 + packages/@aws-cdk/aws-ec2/package.json | 1 + .../@aws-cdk/aws-ec2/test/integ.instance-init.expected.json | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts b/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts index d612641eaa929..f66045e9ffd3c 100644 --- a/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts +++ b/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts @@ -300,6 +300,7 @@ export class InterfaceVpcEndpointAwsService implements IInterfaceVpcEndpointServ public static readonly REKOGNITION = new InterfaceVpcEndpointAwsService('rekognition'); public static readonly REKOGNITION_FIPS = new InterfaceVpcEndpointAwsService('rekognition-fips'); public static readonly STEP_FUNCTIONS = new InterfaceVpcEndpointAwsService('states'); + public static readonly LAMBDA = new InterfaceVpcEndpointAwsService('lambda'); /** * The name of the service. diff --git a/packages/@aws-cdk/aws-ec2/package.json b/packages/@aws-cdk/aws-ec2/package.json index de96c387e2f37..c12df7e9f0688 100644 --- a/packages/@aws-cdk/aws-ec2/package.json +++ b/packages/@aws-cdk/aws-ec2/package.json @@ -248,6 +248,7 @@ "docs-public-apis:@aws-cdk/aws-ec2.InterfaceVpcEndpointAwsService.REKOGNITION", "docs-public-apis:@aws-cdk/aws-ec2.InterfaceVpcEndpointAwsService.REKOGNITION_FIPS", "docs-public-apis:@aws-cdk/aws-ec2.InterfaceVpcEndpointAwsService.STEP_FUNCTIONS", + "docs-public-apis:@aws-cdk/aws-ec2.InterfaceVpcEndpointAwsService.LAMBDA", "docs-public-apis:@aws-cdk/aws-ec2.Port.toString", "docs-public-apis:@aws-cdk/aws-ec2.PrivateSubnet.fromPrivateSubnetAttributes", "docs-public-apis:@aws-cdk/aws-ec2.PublicSubnet.fromPublicSubnetAttributes", diff --git a/packages/@aws-cdk/aws-ec2/test/integ.instance-init.expected.json b/packages/@aws-cdk/aws-ec2/test/integ.instance-init.expected.json index e9f87b528f4b1..e9be6df6f6c76 100644 --- a/packages/@aws-cdk/aws-ec2/test/integ.instance-init.expected.json +++ b/packages/@aws-cdk/aws-ec2/test/integ.instance-init.expected.json @@ -130,7 +130,7 @@ ] } }, - "Instance255F352658b696f54f846988d": { + "Instance255F352658ec7e53daf15a1c6": { "Type": "AWS::EC2::Instance", "Properties": { "AvailabilityZone": "us-east-1a", @@ -169,7 +169,7 @@ { "Ref": "AWS::StackName" }, - " --resource Instance255F352658b696f54f846988d -c default\n /opt/aws/bin/cfn-signal -e $? --region ", + " --resource Instance255F352658ec7e53daf15a1c6 -c default\n /opt/aws/bin/cfn-signal -e $? --region ", { "Ref": "AWS::Region" }, @@ -177,7 +177,7 @@ { "Ref": "AWS::StackName" }, - " --resource Instance255F352658b696f54f846988d\n cat /var/log/cfn-init.log >&2\n)" + " --resource Instance255F352658ec7e53daf15a1c6\n cat /var/log/cfn-init.log >&2\n)" ] ] } From 5f32b58d4e40e516a5a0bde4c2aea1653acbfbcb Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 3 Nov 2020 08:17:58 +0000 Subject: [PATCH 030/314] chore(deps): bump @typescript-eslint/eslint-plugin from 4.6.0 to 4.6.1 (#11258) Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.6.0 to 4.6.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.6.1/packages/eslint-plugin) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- tools/cdk-build-tools/package.json | 2 +- yarn.lock | 61 +++++++++++++++++++++++------- 2 files changed, 49 insertions(+), 14 deletions(-) diff --git a/tools/cdk-build-tools/package.json b/tools/cdk-build-tools/package.json index 3e7b7e18110ac..688c18f092fea 100644 --- a/tools/cdk-build-tools/package.json +++ b/tools/cdk-build-tools/package.json @@ -39,7 +39,7 @@ "pkglint": "0.0.0" }, "dependencies": { - "@typescript-eslint/eslint-plugin": "^4.6.0", + "@typescript-eslint/eslint-plugin": "^4.6.1", "@typescript-eslint/parser": "^4.6.0", "eslint-plugin-cdk": "0.0.0", "awslint": "0.0.0", diff --git a/yarn.lock b/yarn.lock index 619dd0402d688..8ad0fda8b7813 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3294,28 +3294,28 @@ resolved "https://registry.yarnpkg.com/@types/yarnpkg__lockfile/-/yarnpkg__lockfile-1.1.4.tgz#445251eb00bd9c1e751f82c7c6bf4f714edfd464" integrity sha512-/emrKCfQMQmFCqRqqBJ0JueHBT06jBRM3e8OgnvDUcvuExONujIk2hFA5dNsN9Nt41ljGVDdChvCydATZ+KOZw== -"@typescript-eslint/eslint-plugin@^4.6.0": - version "4.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.6.0.tgz#210cd538bb703f883aff81d3996961f5dba31fdb" - integrity sha512-1+419X+Ynijytr1iWI+/IcX/kJryc78YNpdaXR1aRO1sU3bC0vZrIAF1tIX7rudVI84W7o7M4zo5p1aVt70fAg== +"@typescript-eslint/eslint-plugin@^4.6.1": + version "4.6.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.6.1.tgz#99d77eb7a016fd5a5e749d2c44a7e4c317eb7da3" + integrity sha512-SNZyflefTMK2JyrPfFFzzoy2asLmZvZJ6+/L5cIqg4HfKGiW2Gr1Go1OyEVqne/U4QwmoasuMwppoBHWBWF2nA== dependencies: - "@typescript-eslint/experimental-utils" "4.6.0" - "@typescript-eslint/scope-manager" "4.6.0" + "@typescript-eslint/experimental-utils" "4.6.1" + "@typescript-eslint/scope-manager" "4.6.1" debug "^4.1.1" functional-red-black-tree "^1.0.1" regexpp "^3.0.0" semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@4.6.0": - version "4.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.6.0.tgz#f750aef4dd8e5970b5c36084f0a5ca2f0db309a4" - integrity sha512-pnh6Beh2/4xjJVNL+keP49DFHk3orDHHFylSp3WEjtgW3y1U+6l+jNnJrGlbs6qhAz5z96aFmmbUyKhunXKvKw== +"@typescript-eslint/experimental-utils@4.6.1": + version "4.6.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.6.1.tgz#a9c691dfd530a9570274fe68907c24c07a06c4aa" + integrity sha512-qyPqCFWlHZXkEBoV56UxHSoXW2qnTr4JrWVXOh3soBP3q0o7p4pUEMfInDwIa0dB/ypdtm7gLOS0hg0a73ijfg== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/scope-manager" "4.6.0" - "@typescript-eslint/types" "4.6.0" - "@typescript-eslint/typescript-estree" "4.6.0" + "@typescript-eslint/scope-manager" "4.6.1" + "@typescript-eslint/types" "4.6.1" + "@typescript-eslint/typescript-estree" "4.6.1" eslint-scope "^5.0.0" eslint-utils "^2.0.0" @@ -3337,11 +3337,24 @@ "@typescript-eslint/types" "4.6.0" "@typescript-eslint/visitor-keys" "4.6.0" +"@typescript-eslint/scope-manager@4.6.1": + version "4.6.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.6.1.tgz#21872b91cbf7adfc7083f17b8041149148baf992" + integrity sha512-f95+80r6VdINYscJY1KDUEDcxZ3prAWHulL4qRDfNVD0I5QAVSGqFkwHERDoLYJJWmEAkUMdQVvx7/c2Hp+Bjg== + dependencies: + "@typescript-eslint/types" "4.6.1" + "@typescript-eslint/visitor-keys" "4.6.1" + "@typescript-eslint/types@4.6.0": version "4.6.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.6.0.tgz#157ca925637fd53c193c6bf226a6c02b752dde2f" integrity sha512-5FAgjqH68SfFG4UTtIFv+rqYJg0nLjfkjD0iv+5O27a0xEeNZ5rZNDvFGZDizlCD1Ifj7MAbSW2DPMrf0E9zjA== +"@typescript-eslint/types@4.6.1": + version "4.6.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.6.1.tgz#d3ad7478f53f22e7339dc006ab61aac131231552" + integrity sha512-k2ZCHhJ96YZyPIsykickez+OMHkz06xppVLfJ+DY90i532/Cx2Z+HiRMH8YZQo7a4zVd/TwNBuRCdXlGK4yo8w== + "@typescript-eslint/typescript-estree@4.6.0": version "4.6.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.6.0.tgz#85bd98dcc8280511cfc5b2ce7b03a9ffa1732b08" @@ -3356,6 +3369,20 @@ semver "^7.3.2" tsutils "^3.17.1" +"@typescript-eslint/typescript-estree@4.6.1": + version "4.6.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.6.1.tgz#6025cce724329413f57e4959b2d676fceeca246f" + integrity sha512-/J/kxiyjQQKqEr5kuKLNQ1Finpfb8gf/NpbwqFFYEBjxOsZ621r9AqwS9UDRA1Rrr/eneX/YsbPAIhU2rFLjXQ== + dependencies: + "@typescript-eslint/types" "4.6.1" + "@typescript-eslint/visitor-keys" "4.6.1" + debug "^4.1.1" + globby "^11.0.1" + is-glob "^4.0.1" + lodash "^4.17.15" + semver "^7.3.2" + tsutils "^3.17.1" + "@typescript-eslint/visitor-keys@4.6.0": version "4.6.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.6.0.tgz#fb05d6393891b0a089b243fc8f9fb8039383d5da" @@ -3364,6 +3391,14 @@ "@typescript-eslint/types" "4.6.0" eslint-visitor-keys "^2.0.0" +"@typescript-eslint/visitor-keys@4.6.1": + version "4.6.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.6.1.tgz#6b125883402d8939df7b54528d879e88f7ba3614" + integrity sha512-owABze4toX7QXwOLT3/D5a8NecZEjEWU1srqxENTfqsY3bwVnl3YYbOh6s1rp2wQKO9RTHFGjKes08FgE7SVMw== + dependencies: + "@typescript-eslint/types" "4.6.1" + eslint-visitor-keys "^2.0.0" + "@yarnpkg/lockfile@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" From db205daef46599e3bccade4342130facfe04ce3c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 3 Nov 2020 08:50:32 +0000 Subject: [PATCH 031/314] chore(deps-dev): bump @octokit/rest from 18.0.8 to 18.0.9 (#11256) Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 18.0.8 to 18.0.9. - [Release notes](https://github.com/octokit/rest.js/releases) - [Commits](https://github.com/octokit/rest.js/compare/v18.0.8...v18.0.9) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/aws-cdk/package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 8256d338fdadb..e860cb48f3e01 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -61,7 +61,7 @@ "sinon": "^9.2.1", "ts-jest": "^26.4.3", "ts-mock-imports": "^1.3.0", - "@octokit/rest": "^18.0.8", + "@octokit/rest": "^18.0.9", "make-runnable": "^1.3.8" }, "dependencies": { diff --git a/yarn.lock b/yarn.lock index 8ad0fda8b7813..d90c26a81985d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2084,10 +2084,10 @@ "@octokit/types" "^2.0.1" deprecation "^2.3.1" -"@octokit/plugin-rest-endpoint-methods@4.2.0": - version "4.2.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.2.0.tgz#c5a0691b3aba5d8b4ef5dffd6af3649608f167ba" - integrity sha512-1/qn1q1C1hGz6W/iEDm9DoyNoG/xdFDt78E3eZ5hHeUfJTLJgyAMdj9chL/cNBHjcjd+FH5aO1x0VCqR2RE0mw== +"@octokit/plugin-rest-endpoint-methods@4.2.1": + version "4.2.1" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.2.1.tgz#8224833a45c3394836dc6e86f1e6c49269a2c350" + integrity sha512-QyFr4Bv807Pt1DXZOC5a7L5aFdrwz71UHTYoHVajYV5hsqffWm8FUl9+O7nxRu5PDMtB/IKrhFqTmdBTK5cx+A== dependencies: "@octokit/types" "^5.5.0" deprecation "^2.3.1" @@ -2146,15 +2146,15 @@ once "^1.4.0" universal-user-agent "^4.0.0" -"@octokit/rest@^18.0.8": - version "18.0.8" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.8.tgz#c49792e4f02fea6510216d1cecc98075add7db53" - integrity sha512-crYqQWFS/75o+FSE2Ejpt0Tk9FgkQ4aGvToptqbnvlfViE/C4hVAtmn/X0emQ8Q3wg1tYXYNIcuG1XXSOEeARg== +"@octokit/rest@^18.0.9": + version "18.0.9" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.9.tgz#964d707d914eb34b1787895fdcacff96de47844d" + integrity sha512-CC5+cIx974Ygx9lQNfUn7/oXDQ9kqGiKUC6j1A9bAVZZ7aoTF8K6yxu0pQhQrLBwSl92J6Z3iVDhGhGFgISCZg== dependencies: "@octokit/core" "^3.0.0" "@octokit/plugin-paginate-rest" "^2.2.0" "@octokit/plugin-request-log" "^1.0.0" - "@octokit/plugin-rest-endpoint-methods" "4.2.0" + "@octokit/plugin-rest-endpoint-methods" "4.2.1" "@octokit/types@^2.0.0", "@octokit/types@^2.0.1": version "2.16.2" From c124886fbcabea166f34250cad84f7526e05b1bf Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Tue, 3 Nov 2020 16:14:29 +0100 Subject: [PATCH 032/314] fix(core): many nested stacks make NodeJS run out of memory (#11250) Because of a confluence of factors (but principally the poor design behind how cross-stack references are detected and rendered), having a lot of nested stacks leads to a wasteful amount of work being done and the NodeJS program running out of memory. An internal project has 26 nested stacks, and was taking `2m20` to synth and ran out of the default NodeJS heap (having to increase it to `8G`). The reason is because the entire construct tree is being resynthesized for every nested stack, and because this particular application was using CloudWatch Dashboards, a lot of temporary tokens were being created (and retained in the global encoded token map) on each of the 26 synthesis operations. With the current patch applied, that same project synthesizes in `51s` and takes `~1G` of memory (this can be brought down further to about 60% of this number by caching of `Lazy`s, but that change will be introduced in a different PR). The problem ----------- (Legacy) assets work by exploiting cross-stack references: they add `CfnParameter`s at the top-level, and then reference them inside a nested template. Cross-stack reference detection picks this up and adds `CfnParameters` and `AWS::CloudFormation::Stack` parameters to all stacks on the root path to "transport" the values to the right nested stack. To define a nested stack asset, we need to know the template hash, so we must have already resolved stack references to their final form. However, the process of defining the nested stack assets may add new references (as mentioned before) which need to be resolved, leading to our existing implementation of calling `resolveReferences()` once for every nested stack in the application. Calling `resolveReferences()` leads to all Tokens being resolved. It happens that the Tokens are `Lazy`s that resolve to other `Lazy`s, perhaps indirectly in the following form: ```ts Lazy.stringValue({ produce: () => someFunction() }) function someFunction() { return Lazy.stringValue({ produce: () => /* something else */ }); } ``` For every resolution for every nested stack, the *inner* `Lazy` would be reconstructed anew, and subsequently registered in the global token map (along with its stack trace). A wasteful amount of temporary Token objects are created and infinitely retained in this process. The fix ------- We resolve references twice, instead of once per nested stack. Once at the start, to resolve all cross-stack references put there by the user to their final form. Then we add nested stack assets in the right order, and then we finally do one more "resolve references" to make sure the stack asset parameters are forwarded to the right nested stacks. The nested stack asset hash will now be calculated over a template that is not yet the final template, but the hash still includes the user-mutable parts and will change if the user introduces changes (compare it to a `sourceHash` we use for other assets). ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../test/integ.nested-stacks-multi-refs.ts | 3 +- .../test/integ.nested-stacks-multi.ts | 1 + .../test/test.nested-stack.ts | 41 +++++++++++++++++-- .../test/nested-stacks.test.ts | 34 ++++++++------- .../@aws-cdk/core/lib/private/prepare-app.ts | 27 ++++++++---- 5 files changed, 80 insertions(+), 26 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-multi-refs.ts b/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-multi-refs.ts index f133d07bea8c9..b64a4d488e956 100644 --- a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-multi-refs.ts +++ b/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-multi-refs.ts @@ -1,3 +1,4 @@ +/// !cdk-integ pragma:ignore-assets import * as sns from '@aws-cdk/aws-sns'; import { App, Fn, Stack } from '@aws-cdk/core'; import { NestedStack } from '../lib'; @@ -28,4 +29,4 @@ app.synth(); // Stack1-NestedUnderStack1NestedStackNestedUnderStack1NestedStackResourceF616305B-EM64TEGA04J9-TopicInNestedUnderStack115E329C4-HEO7NLYC1AFL function shortName(topicName: string) { return Fn.select(1, Fn.split('-', topicName)); -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-multi.ts b/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-multi.ts index b3e51a8c049f1..109b151138b19 100644 --- a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-multi.ts +++ b/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-multi.ts @@ -1,3 +1,4 @@ +/// !cdk-integ pragma:ignore-assets import * as sns from '@aws-cdk/aws-sns'; import { App, Construct, Stack } from '@aws-cdk/core'; import * as cfn from '../lib'; diff --git a/packages/@aws-cdk/aws-cloudformation/test/test.nested-stack.ts b/packages/@aws-cdk/aws-cloudformation/test/test.nested-stack.ts index de102b4b1cf51..5f809e7e544bf 100644 --- a/packages/@aws-cdk/aws-cloudformation/test/test.nested-stack.ts +++ b/packages/@aws-cdk/aws-cloudformation/test/test.nested-stack.ts @@ -3,7 +3,7 @@ import * as path from 'path'; import { expect, haveResource, matchTemplate, SynthUtils } from '@aws-cdk/assert'; import * as s3_assets from '@aws-cdk/aws-s3-assets'; import * as sns from '@aws-cdk/aws-sns'; -import { App, CfnParameter, CfnResource, Construct, ContextProvider, Stack } from '@aws-cdk/core'; +import { App, CfnParameter, CfnResource, Construct, ContextProvider, LegacyStackSynthesizer, Stack } from '@aws-cdk/core'; import { Test } from 'nodeunit'; import { NestedStack } from '../lib/nested-stack'; @@ -714,6 +714,8 @@ export = { }, }); + const middleStackHash = 'b2670b4c0c3fdf1d8fd9b9272bb8bf8173d18c0f67a888ba165cc569a248a84f'; + // nested1 wires the nested2 template through parameters, so we expect those expect(nested1).to(haveResource('Resource::1')); const nested2Template = SynthUtils.toCloudFormation(nested1); @@ -729,9 +731,9 @@ export = { AssetParameters8169c6f8aaeaf5e2e8620f5f895ffe2099202ccb4b6889df48fe0967a894235cS3BucketDE3B88D6: { Type: 'String', Description: 'S3 bucket for asset "8169c6f8aaeaf5e2e8620f5f895ffe2099202ccb4b6889df48fe0967a894235c"' }, AssetParameters8169c6f8aaeaf5e2e8620f5f895ffe2099202ccb4b6889df48fe0967a894235cS3VersionKey3A62EFEA: { Type: 'String', Description: 'S3 key for asset version "8169c6f8aaeaf5e2e8620f5f895ffe2099202ccb4b6889df48fe0967a894235c"' }, AssetParameters8169c6f8aaeaf5e2e8620f5f895ffe2099202ccb4b6889df48fe0967a894235cArtifactHash7DC546E0: { Type: 'String', Description: 'Artifact hash for asset "8169c6f8aaeaf5e2e8620f5f895ffe2099202ccb4b6889df48fe0967a894235c"' }, - AssetParameters8b50795a950cca6b01352f162c45d9d274dee6bc409f2f2b2ed029ad6828b3bfS3Bucket76ACFB38: { Type: 'String', Description: 'S3 bucket for asset "8b50795a950cca6b01352f162c45d9d274dee6bc409f2f2b2ed029ad6828b3bf"' }, - AssetParameters8b50795a950cca6b01352f162c45d9d274dee6bc409f2f2b2ed029ad6828b3bfS3VersionKey04162EF1: { Type: 'String', Description: 'S3 key for asset version "8b50795a950cca6b01352f162c45d9d274dee6bc409f2f2b2ed029ad6828b3bf"' }, - AssetParameters8b50795a950cca6b01352f162c45d9d274dee6bc409f2f2b2ed029ad6828b3bfArtifactHashF227ADD3: { Type: 'String', Description: 'Artifact hash for asset "8b50795a950cca6b01352f162c45d9d274dee6bc409f2f2b2ed029ad6828b3bf"' }, + [`AssetParameters${middleStackHash}S3Bucket3DB431CB`]: { Type: 'String', Description: `S3 bucket for asset "${middleStackHash}"` }, + [`AssetParameters${middleStackHash}S3VersionKeyBFFDABE9`]: { Type: 'String', Description: `S3 key for asset version "${middleStackHash}"` }, + [`AssetParameters${middleStackHash}ArtifactHash8EA52875`]: { Type: 'String', Description: `Artifact hash for asset "${middleStackHash}"` }, }); // proxy asset params to nested stack @@ -935,6 +937,37 @@ export = { test.done(); }, + '3-level stacks: legacy synthesizer parameters are added to the middle-level stack'(test: Test) { + // GIVEN + const app = new App(); + const top = new Stack(app, 'stack', { + synthesizer: new LegacyStackSynthesizer(), + }); + const middle = new NestedStack(top, 'nested1'); + const bottom = new NestedStack(middle, 'nested2'); + + // WHEN + new CfnResource(bottom, 'Something', { + type: 'BottomLevel', + }); + + // THEN + const asm = app.synth(); + const middleTemplate = JSON.parse(fs.readFileSync(path.join(asm.directory, middle.templateFile), { encoding: 'utf-8' })); + + const hash = 'bc3c51e4d3545ee0a0069401e5a32c37b66d044b983f12de416ba1576ecaf0a4'; + test.deepEqual(middleTemplate.Parameters ?? {}, { + [`referencetostackAssetParameters${hash}S3BucketD7C30435Ref`]: { + Type: 'String', + }, + [`referencetostackAssetParameters${hash}S3VersionKeyB667DBE1Ref`]: { + Type: 'String', + }, + }); + + test.done(); + }, + 'references to a resource from a deeply nested stack'(test: Test) { // GIVEN const app = new App(); diff --git a/packages/@aws-cdk/cloudformation-include/test/nested-stacks.test.ts b/packages/@aws-cdk/cloudformation-include/test/nested-stacks.test.ts index bf729dcedd38b..0e9dcadc5ce60 100644 --- a/packages/@aws-cdk/cloudformation-include/test/nested-stacks.test.ts +++ b/packages/@aws-cdk/cloudformation-include/test/nested-stacks.test.ts @@ -444,6 +444,9 @@ describe('CDK Include for nested stacks', () => { let child: inc.IncludedNestedStack; let grandChild: inc.IncludedNestedStack; + let hash1: string; + let hash2: string; + let parentBucketParam: string; let parentKeyParam: string; let grandChildBucketParam: string; @@ -471,13 +474,16 @@ describe('CDK Include for nested stacks', () => { child = parentTemplate.getNestedStack('ChildStack'); grandChild = child.includedTemplate.getNestedStack('GrandChildStack'); - parentBucketParam = 'AssetParameters5dc7d4a99cfe2979687dc74f2db9fd75f253b5505a1912b5ceecf70c9aefba50S3BucketEAA24F0C'; - parentKeyParam = 'AssetParameters5dc7d4a99cfe2979687dc74f2db9fd75f253b5505a1912b5ceecf70c9aefba50S3VersionKey1194CAB2'; - grandChildBucketParam = 'referencetoAssetParameters5dc7d4a99cfe2979687dc74f2db9fd75f253b5505a1912b5ceecf70c9aefba50S3BucketEAA24F0CRef'; - grandChildKeyParam = 'referencetoAssetParameters5dc7d4a99cfe2979687dc74f2db9fd75f253b5505a1912b5ceecf70c9aefba50S3VersionKey1194CAB2Ref'; + hash1 = '5dc7d4a99cfe2979687dc74f2db9fd75f253b5505a1912b5ceecf70c9aefba50'; + hash2 = '7775730164edb5faae717ac1d2e90d9c0d0fdbeafe48763e5c1b7fb5e39e00a5'; + + parentBucketParam = `AssetParameters${hash1}S3BucketEAA24F0C`; + parentKeyParam = `AssetParameters${hash1}S3VersionKey1194CAB2`; + grandChildBucketParam = `referencetoAssetParameters${hash1}S3BucketEAA24F0CRef`; + grandChildKeyParam = `referencetoAssetParameters${hash1}S3VersionKey1194CAB2Ref`; - childBucketParam = 'AssetParameters891fd3ec75dc881b0fe40dc9fd1b433672637585c015265a5f0dab6bf79818d5S3Bucket23278F13'; - childKeyParam = 'AssetParameters891fd3ec75dc881b0fe40dc9fd1b433672637585c015265a5f0dab6bf79818d5S3VersionKey7316205A'; + childBucketParam = `AssetParameters${hash2}S3BucketDEB194C6`; + childKeyParam = `AssetParameters${hash2}S3VersionKey8B342ED1`; }); test('correctly creates parameters in the parent stack, and passes them to the child stack', () => { @@ -485,27 +491,27 @@ describe('CDK Include for nested stacks', () => { "Parameters": { [parentBucketParam]: { "Type": "String", - "Description": "S3 bucket for asset \"5dc7d4a99cfe2979687dc74f2db9fd75f253b5505a1912b5ceecf70c9aefba50\"", + "Description": `S3 bucket for asset \"${hash1}\"`, }, [parentKeyParam]: { "Type": "String", - "Description": "S3 key for asset version \"5dc7d4a99cfe2979687dc74f2db9fd75f253b5505a1912b5ceecf70c9aefba50\"", + "Description": `S3 key for asset version \"${hash1}\"`, }, - "AssetParameters5dc7d4a99cfe2979687dc74f2db9fd75f253b5505a1912b5ceecf70c9aefba50ArtifactHash9C417847": { + [`AssetParameters${hash1}ArtifactHash9C417847`]: { "Type": "String", - "Description": "Artifact hash for asset \"5dc7d4a99cfe2979687dc74f2db9fd75f253b5505a1912b5ceecf70c9aefba50\"", + "Description": `Artifact hash for asset \"${hash1}\"`, }, [childBucketParam]: { "Type": "String", - "Description": "S3 bucket for asset \"891fd3ec75dc881b0fe40dc9fd1b433672637585c015265a5f0dab6bf79818d5\"", + "Description": `S3 bucket for asset \"${hash2}\"`, }, [childKeyParam]: { "Type": "String", - "Description": "S3 key for asset version \"891fd3ec75dc881b0fe40dc9fd1b433672637585c015265a5f0dab6bf79818d5\"", + "Description": `S3 key for asset version \"${hash2}\"`, }, - "AssetParameters891fd3ec75dc881b0fe40dc9fd1b433672637585c015265a5f0dab6bf79818d5ArtifactHashA1DE5198": { + [`AssetParameters${hash2}ArtifactHashAA82D4CC`]: { "Type": "String", - "Description": "Artifact hash for asset \"891fd3ec75dc881b0fe40dc9fd1b433672637585c015265a5f0dab6bf79818d5\"", + "Description": `Artifact hash for asset \"${hash2}\"`, }, }, "Resources": { diff --git a/packages/@aws-cdk/core/lib/private/prepare-app.ts b/packages/@aws-cdk/core/lib/private/prepare-app.ts index ad900acf803c0..e90a40ff211f8 100644 --- a/packages/@aws-cdk/core/lib/private/prepare-app.ts +++ b/packages/@aws-cdk/core/lib/private/prepare-app.ts @@ -28,19 +28,32 @@ export function prepareApp(root: IConstruct) { } } + resolveReferences(root); + // depth-first (children first) queue of nested stacks. We will pop a stack // from the head of this queue to prepare its template asset. + // + // Depth-first since the a nested stack's template hash will be reflected in + // its parent's template, which then changes the parent's hash, etc. const queue = findAllNestedStacks(root); - while (true) { - resolveReferences(root); - - const nested = queue.shift(); - if (!nested) { - break; + if (queue.length > 0) { + while (queue.length > 0) { + const nested = queue.shift()!; + defineNestedStackAsset(nested); } - defineNestedStackAsset(nested); + // ▷[ Given the legacy synthesizer and a 3-or-deeper nesting of nested stacks ] + // + // Adding nested stack assets may haved added CfnParameters to the top-level + // stack which are referenced in a deeper-level stack. The values of these + // parameters need to be carried through to the right location via Nested + // Stack parameters, which `resolveReferences()` will do. + // + // Yes, this may add `Parameter` elements to a template whose hash has + // already been calculated, but the invariant that if the functional part + // of the template changes its hash will change is still upheld. + resolveReferences(root); } } From 5e433b1d52470c3ecf5a460f79e4b8103542c35c Mon Sep 17 00:00:00 2001 From: Elad Ben-Israel Date: Tue, 3 Nov 2020 18:54:46 +0200 Subject: [PATCH 033/314] feat: intro "Names.uniqueId()" instead of the deprecated "node.uniqueId" (#11166) The property `node.uniqueId` is used throughout our codebase to generate unique names. We are planning to deprecate this API in constructs 10.x (and CDK 2.0) in favor of a `node.addr` (see aws/constructs#314). In most cases, these generated names cannot be changed because they will incur breaking changes to deployments. So we have to continue to use the "legacy" unique ID in those cases (new cases should use `addr`). To that end, we introduce a utility `Legacy.uniqueId()` which uses the legacy algorithm and the code base was migrated to use it instead of `node.uniqueId` which will go away soon. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-apigateway/lib/authorizers/lambda.ts | 10 ++--- .../aws-apigateway/lib/domain-name.ts | 4 +- .../aws-apigateway/lib/integrations/lambda.ts | 4 +- .../@aws-cdk/aws-apigateway/lib/usage-plan.ts | 4 +- .../@aws-cdk/aws-apigateway/lib/vpc-link.ts | 4 +- .../package.json | 2 +- .../lib/http/integrations/lambda.ts | 4 +- .../lib/step-scaling-action.ts | 2 +- .../lib/target-tracking-scaling-policy.ts | 2 +- packages/@aws-cdk/aws-appmesh/lib/mesh.ts | 2 +- packages/@aws-cdk/aws-appmesh/lib/route.ts | 2 +- .../@aws-cdk/aws-appmesh/lib/virtual-node.ts | 2 +- .../aws-appmesh/lib/virtual-router.ts | 2 +- .../aws-appmesh/lib/virtual-service.ts | 2 +- packages/@aws-cdk/aws-backup/lib/vault.ts | 4 +- .../test/compute-environment.test.ts | 6 +-- .../test/test.nested-stack.ts | 4 +- .../aws-cloudfront-origins/lib/s3-origin.ts | 2 +- .../aws-cloudfront/lib/cache-policy.ts | 4 +- .../aws-cloudfront/lib/distribution.ts | 8 ++-- .../lib/origin-request-policy.ts | 4 +- .../aws-cloudwatch/lib/composite-alarm.ts | 4 +- .../@aws-cdk/aws-codebuild/lib/project.ts | 4 +- .../lib/lambda/custom-deployment-config.ts | 4 +- .../lib/profiling-group.ts | 4 +- .../lib/cloudformation/pipeline-actions.ts | 2 +- .../lib/codecommit/source-action.ts | 4 +- .../lib/ecr/source-action.ts | 4 +- .../lib/s3/source-action.ts | 4 +- .../@aws-cdk/aws-codepipeline/lib/pipeline.ts | 6 +-- .../@aws-cdk/aws-cognito/lib/user-pool.ts | 4 +- packages/@aws-cdk/aws-dynamodb/lib/table.ts | 4 +- .../@aws-cdk/aws-ec2/lib/security-group.ts | 4 +- packages/@aws-cdk/aws-ec2/lib/volume.ts | 6 +-- packages/@aws-cdk/aws-ec2/lib/vpc.ts | 6 +-- .../aws-ecs/lib/base/task-definition.ts | 4 +- packages/@aws-cdk/aws-eks-legacy/README.md | 8 ++-- .../@aws-cdk/aws-eks-legacy/lib/helm-chart.ts | 4 +- packages/@aws-cdk/aws-eks/README.md | 36 +++++++++-------- packages/@aws-cdk/aws-eks/lib/aws-auth.ts | 2 +- packages/@aws-cdk/aws-eks/lib/helm-chart.ts | 4 +- .../@aws-cdk/aws-eks/lib/kubectl-provider.ts | 4 +- .../@aws-cdk/aws-eks/lib/service-account.ts | 4 +- .../@aws-cdk/aws-eks/test/test.awsauth.ts | 4 +- .../@aws-cdk/aws-eks/test/test.cluster.ts | 2 +- .../@aws-cdk/aws-eks/test/test.k8s-patch.ts | 4 +- .../lib/alb/application-load-balancer.ts | 4 +- .../@aws-cdk/aws-events-targets/lib/batch.ts | 3 +- .../@aws-cdk/aws-events-targets/lib/util.ts | 4 +- packages/@aws-cdk/aws-events/lib/event-bus.ts | 4 +- packages/@aws-cdk/aws-events/lib/rule.ts | 4 +- .../@aws-cdk/aws-events/test/test.rule.ts | 4 +- .../aws-lambda-event-sources/lib/api.ts | 4 +- .../aws-lambda-event-sources/lib/dynamodb.ts | 3 +- .../aws-lambda-event-sources/lib/kinesis.ts | 2 +- .../aws-lambda-event-sources/lib/sqs.ts | 3 +- packages/@aws-cdk/aws-lambda/lib/function.ts | 4 +- .../aws-s3-notifications/lib/lambda.ts | 6 +-- .../aws-secretsmanager/lib/secret-rotation.ts | 4 +- .../lib/alias-target-instance.ts | 3 +- .../aws-servicediscovery/lib/instance.ts | 4 +- .../aws-sns-subscriptions/lib/lambda.ts | 4 +- .../@aws-cdk/aws-sns-subscriptions/lib/sqs.ts | 4 +- .../aws-stepfunctions/lib/activity.ts | 4 +- .../@aws-cdk/aws-synthetics/lib/canary.ts | 2 +- packages/@aws-cdk/core/lib/index.ts | 1 + packages/@aws-cdk/core/lib/names.ts | 40 +++++++++++++++++++ packages/@aws-cdk/core/lib/nested-stack.ts | 3 +- .../lib/private/physical-name-generator.ts | 3 +- packages/@aws-cdk/core/lib/private/refs.ts | 5 ++- packages/@aws-cdk/core/lib/stack.ts | 5 ++- .../test/example-resource.test.ts | 2 +- 72 files changed, 197 insertions(+), 146 deletions(-) create mode 100644 packages/@aws-cdk/core/lib/names.ts diff --git a/packages/@aws-cdk/aws-apigateway/lib/authorizers/lambda.ts b/packages/@aws-cdk/aws-apigateway/lib/authorizers/lambda.ts index 1235b3e0e32fb..82f7696fe2fa2 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/authorizers/lambda.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/authorizers/lambda.ts @@ -1,6 +1,6 @@ import * as iam from '@aws-cdk/aws-iam'; import * as lambda from '@aws-cdk/aws-lambda'; -import { Duration, Lazy, Stack } from '@aws-cdk/core'; +import { Duration, Lazy, Names, Stack } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnAuthorizer } from '../apigateway.generated'; import { Authorizer, IAuthorizer } from '../authorizer'; @@ -13,7 +13,7 @@ export interface LambdaAuthorizerProps { /** * An optional human friendly name for the authorizer. Note that, this is not the primary identifier of the authorizer. * - * @default this.node.uniqueId + * @default - the unique construcrt ID */ readonly authorizerName?: string; @@ -97,7 +97,7 @@ abstract class LambdaAuthorizer extends Authorizer implements IAuthorizer { */ protected setupPermissions() { if (!this.role) { - this.handler.addPermission(`${this.node.uniqueId}:Permissions`, { + this.handler.addPermission(`${Names.uniqueId(this)}:Permissions`, { principal: new iam.ServicePrincipal('apigateway.amazonaws.com'), sourceArn: this.authorizerArn, }); @@ -168,7 +168,7 @@ export class TokenAuthorizer extends LambdaAuthorizer { const restApiId = this.lazyRestApiId(); const resource = new CfnAuthorizer(this, 'Resource', { - name: props.authorizerName ?? this.node.uniqueId, + name: props.authorizerName ?? Names.uniqueId(this), restApiId, type: 'TOKEN', authorizerUri: lambdaAuthorizerArn(props.handler), @@ -230,7 +230,7 @@ export class RequestAuthorizer extends LambdaAuthorizer { const restApiId = this.lazyRestApiId(); const resource = new CfnAuthorizer(this, 'Resource', { - name: props.authorizerName ?? this.node.uniqueId, + name: props.authorizerName ?? Names.uniqueId(this), restApiId, type: 'REQUEST', authorizerUri: lambdaAuthorizerArn(props.handler), diff --git a/packages/@aws-cdk/aws-apigateway/lib/domain-name.ts b/packages/@aws-cdk/aws-apigateway/lib/domain-name.ts index 3252bb1691307..0437b986fdc74 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/domain-name.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/domain-name.ts @@ -1,6 +1,6 @@ import * as acm from '@aws-cdk/aws-certificatemanager'; import { IBucket } from '@aws-cdk/aws-s3'; -import { IResource, Resource, Token } from '@aws-cdk/core'; +import { IResource, Names, Resource, Token } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnDomainName } from './apigateway.generated'; import { BasePathMapping, BasePathMappingOptions } from './base-path-mapping'; @@ -147,7 +147,7 @@ export class DomainName extends Resource implements IDomainName { */ public addBasePathMapping(targetApi: IRestApi, options: BasePathMappingOptions = { }) { const basePath = options.basePath || '/'; - const id = `Map:${basePath}=>${targetApi.node.uniqueId}`; + const id = `Map:${basePath}=>${Names.nodeUniqueId(targetApi.node)}`; return new BasePathMapping(this, id, { domainName: this, restApi: targetApi, diff --git a/packages/@aws-cdk/aws-apigateway/lib/integrations/lambda.ts b/packages/@aws-cdk/aws-apigateway/lib/integrations/lambda.ts index 91c1c9da97d64..e0d6953707e82 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/integrations/lambda.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/integrations/lambda.ts @@ -1,6 +1,6 @@ import * as iam from '@aws-cdk/aws-iam'; import * as lambda from '@aws-cdk/aws-lambda'; -import { Lazy, Token } from '@aws-cdk/core'; +import { Lazy, Names, Token } from '@aws-cdk/core'; import { IntegrationConfig, IntegrationOptions } from '../integration'; import { Method } from '../method'; import { AwsIntegration } from './aws'; @@ -56,7 +56,7 @@ export class LambdaIntegration extends AwsIntegration { const bindResult = super.bind(method); const principal = new iam.ServicePrincipal('apigateway.amazonaws.com'); - const desc = `${method.api.node.uniqueId}.${method.httpMethod}.${method.resource.path.replace(/\//g, '.')}`; + const desc = `${Names.nodeUniqueId(method.api.node)}.${method.httpMethod}.${method.resource.path.replace(/\//g, '.')}`; this.handler.addPermission(`ApiPermission.${desc}`, { principal, diff --git a/packages/@aws-cdk/aws-apigateway/lib/usage-plan.ts b/packages/@aws-cdk/aws-apigateway/lib/usage-plan.ts index 6e1c5a4266a9e..e39efd410fe80 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/usage-plan.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/usage-plan.ts @@ -1,4 +1,4 @@ -import { Lazy, Resource, Token } from '@aws-cdk/core'; +import { Lazy, Names, Resource, Token } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { IApiKey } from './api-key'; import { CfnUsagePlan, CfnUsagePlanKey } from './apigateway.generated'; @@ -182,7 +182,7 @@ export class UsagePlan extends Resource { const prefix = 'UsagePlanKeyResource'; // Postfixing apikey id only from the 2nd child, to keep physicalIds of UsagePlanKey for existing CDK apps unmodifed. - const id = this.node.tryFindChild(prefix) ? `${prefix}:${apiKey.node.uniqueId}` : prefix; + const id = this.node.tryFindChild(prefix) ? `${prefix}:${Names.nodeUniqueId(apiKey.node)}` : prefix; new CfnUsagePlanKey(this, id, { keyId: apiKey.keyId, diff --git a/packages/@aws-cdk/aws-apigateway/lib/vpc-link.ts b/packages/@aws-cdk/aws-apigateway/lib/vpc-link.ts index 700d22c137cc1..dc7576b22961c 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/vpc-link.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/vpc-link.ts @@ -1,5 +1,5 @@ import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; -import { IResource, Lazy, Resource } from '@aws-cdk/core'; +import { IResource, Lazy, Names, Resource } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnVpcLink } from './apigateway.generated'; @@ -66,7 +66,7 @@ export class VpcLink extends Resource implements IVpcLink { constructor(scope: Construct, id: string, props: VpcLinkProps = {}) { super(scope, id, { physicalName: props.vpcLinkName || - Lazy.stringValue({ produce: () => this.node.uniqueId }), + Lazy.stringValue({ produce: () => Names.nodeUniqueId(this.node) }), }); const cfnResource = new CfnVpcLink(this, 'Resource', { diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json index 06d7c8376c1ba..3cca63ba579e2 100644 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json @@ -91,7 +91,7 @@ "@aws-cdk/aws-elasticloadbalancingv2": "0.0.0", "@aws-cdk/aws-servicediscovery": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.4" + "constructs": "^3.2.0" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-apigatewayv2/lib/http/integrations/lambda.ts b/packages/@aws-cdk/aws-apigatewayv2/lib/http/integrations/lambda.ts index 30973a10b2ca0..9f0d4f89ee6f6 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/lib/http/integrations/lambda.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/lib/http/integrations/lambda.ts @@ -1,6 +1,6 @@ import { ServicePrincipal } from '@aws-cdk/aws-iam'; import { IFunction } from '@aws-cdk/aws-lambda'; -import { Stack } from '@aws-cdk/core'; +import { Names, Stack } from '@aws-cdk/core'; import { HttpIntegrationType, HttpRouteIntegrationBindOptions, HttpRouteIntegrationConfig, IHttpRouteIntegration, PayloadFormatVersion } from '../integration'; /** @@ -30,7 +30,7 @@ export class LambdaProxyIntegration implements IHttpRouteIntegration { public bind(options: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig { const route = options.route; - this.props.handler.addPermission(`${route.node.uniqueId}-Permission`, { + this.props.handler.addPermission(`${Names.nodeUniqueId(route.node)}-Permission`, { scope: options.scope, principal: new ServicePrincipal('apigateway.amazonaws.com'), sourceArn: Stack.of(route).formatArn({ diff --git a/packages/@aws-cdk/aws-applicationautoscaling/lib/step-scaling-action.ts b/packages/@aws-cdk/aws-applicationautoscaling/lib/step-scaling-action.ts index 44eb88e9475a5..95242ed9e8cdf 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/lib/step-scaling-action.ts +++ b/packages/@aws-cdk/aws-applicationautoscaling/lib/step-scaling-action.ts @@ -82,7 +82,7 @@ export class StepScalingAction extends cdk.Construct { // properties, or the ScalingTargetId property, but not both. // https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationautoscaling-scalingpolicy.html const resource = new CfnScalingPolicy(this, 'Resource', { - policyName: props.policyName || this.node.uniqueId, + policyName: props.policyName || cdk.Names.uniqueId(this), policyType: 'StepScaling', scalingTargetId: props.scalingTarget.scalableTargetId, stepScalingPolicyConfiguration: { diff --git a/packages/@aws-cdk/aws-applicationautoscaling/lib/target-tracking-scaling-policy.ts b/packages/@aws-cdk/aws-applicationautoscaling/lib/target-tracking-scaling-policy.ts index 5270177629f2e..65146b754757b 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/lib/target-tracking-scaling-policy.ts +++ b/packages/@aws-cdk/aws-applicationautoscaling/lib/target-tracking-scaling-policy.ts @@ -133,7 +133,7 @@ export class TargetTrackingScalingPolicy extends cdk.Construct { super(scope, id); const resource = new CfnScalingPolicy(this, 'Resource', { - policyName: props.policyName || this.node.uniqueId, + policyName: props.policyName || cdk.Names.uniqueId(this), policyType: 'TargetTrackingScaling', scalingTargetId: props.scalingTarget.scalableTargetId, targetTrackingScalingPolicyConfiguration: { diff --git a/packages/@aws-cdk/aws-appmesh/lib/mesh.ts b/packages/@aws-cdk/aws-appmesh/lib/mesh.ts index 961128151b537..869d2198fdd0c 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/mesh.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/mesh.ts @@ -186,7 +186,7 @@ export class Mesh extends MeshBase { constructor(scope: Construct, id: string, props: MeshProps = {}) { super(scope, id, { - physicalName: props.meshName || cdk.Lazy.stringValue({ produce: () => this.node.uniqueId }), + physicalName: props.meshName || cdk.Lazy.stringValue({ produce: () => cdk.Names.uniqueId(this) }), }); const mesh = new CfnMesh(this, 'Resource', { diff --git a/packages/@aws-cdk/aws-appmesh/lib/route.ts b/packages/@aws-cdk/aws-appmesh/lib/route.ts index 0dfeac897375a..696908abc40a6 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/route.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/route.ts @@ -145,7 +145,7 @@ export class Route extends cdk.Resource implements IRoute { constructor(scope: Construct, id: string, props: RouteProps) { super(scope, id, { - physicalName: props.routeName || cdk.Lazy.stringValue({ produce: () => this.node.uniqueId }), + physicalName: props.routeName || cdk.Lazy.stringValue({ produce: () => cdk.Names.uniqueId(this) }), }); this.virtualRouter = props.virtualRouter; diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts index bfad388fa91ee..c3226a61e3813 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts @@ -227,7 +227,7 @@ export class VirtualNode extends VirtualNodeBase { constructor(scope: Construct, id: string, props: VirtualNodeProps) { super(scope, id, { - physicalName: props.virtualNodeName || cdk.Lazy.stringValue({ produce: () => this.node.uniqueId }), + physicalName: props.virtualNodeName || cdk.Lazy.stringValue({ produce: () => cdk.Names.uniqueId(this) }), }); this.mesh = props.mesh; diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-router.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-router.ts index 05fcbb29d5f71..f08b223ec23ed 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/virtual-router.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-router.ts @@ -145,7 +145,7 @@ export class VirtualRouter extends VirtualRouterBase { constructor(scope: Construct, id: string, props: VirtualRouterProps) { super(scope, id, { - physicalName: props.virtualRouterName || cdk.Lazy.stringValue({ produce: () => this.node.uniqueId }), + physicalName: props.virtualRouterName || cdk.Lazy.stringValue({ produce: () => cdk.Names.uniqueId(this) }), }); this.mesh = props.mesh; diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-service.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-service.ts index 00b48f2d39d80..9b920ea36c9b5 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/virtual-service.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-service.ts @@ -106,7 +106,7 @@ export class VirtualService extends cdk.Resource implements IVirtualService { constructor(scope: Construct, id: string, props: VirtualServiceProps) { super(scope, id, { - physicalName: props.virtualServiceName || cdk.Lazy.stringValue({ produce: () => this.node.uniqueId }), + physicalName: props.virtualServiceName || cdk.Lazy.stringValue({ produce: () => cdk.Names.uniqueId(this) }), }); if (props.virtualNode && props.virtualRouter) { diff --git a/packages/@aws-cdk/aws-backup/lib/vault.ts b/packages/@aws-cdk/aws-backup/lib/vault.ts index e74b73b13d453..cfee7f4c6ffa7 100644 --- a/packages/@aws-cdk/aws-backup/lib/vault.ts +++ b/packages/@aws-cdk/aws-backup/lib/vault.ts @@ -1,7 +1,7 @@ import * as iam from '@aws-cdk/aws-iam'; import * as kms from '@aws-cdk/aws-kms'; import * as sns from '@aws-cdk/aws-sns'; -import { IResource, RemovalPolicy, Resource } from '@aws-cdk/core'; +import { IResource, Names, RemovalPolicy, Resource } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnBackupVault } from './backup.generated'; @@ -161,7 +161,7 @@ export class BackupVault extends Resource implements IBackupVault { private uniqueVaultName() { // Max length of 50 chars, get the last 50 chars - const id = this.node.uniqueId; + const id = Names.uniqueId(this); return id.substring(Math.max(id.length - 50, 0), id.length); } } diff --git a/packages/@aws-cdk/aws-batch/test/compute-environment.test.ts b/packages/@aws-cdk/aws-batch/test/compute-environment.test.ts index 42c958473f1c3..f069ab3a5a080 100644 --- a/packages/@aws-cdk/aws-batch/test/compute-environment.test.ts +++ b/packages/@aws-cdk/aws-batch/test/compute-environment.test.ts @@ -1,10 +1,10 @@ +import { throws } from 'assert'; import { expect, haveResource, haveResourceLike, ResourcePart } from '@aws-cdk/assert'; import '@aws-cdk/assert/jest'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as ecs from '@aws-cdk/aws-ecs'; import * as iam from '@aws-cdk/aws-iam'; import * as cdk from '@aws-cdk/core'; -import { throws } from 'assert'; import * as batch from '../lib'; describe('Batch Compute Evironment', () => { @@ -240,10 +240,10 @@ describe('Batch Compute Evironment', () => { ], Subnets: [ { - Ref: `${vpc.node.uniqueId}PrivateSubnet1Subnet865FB50A`, + Ref: `${cdk.Names.uniqueId(vpc)}PrivateSubnet1Subnet865FB50A`, }, { - Ref: `${vpc.node.uniqueId}PrivateSubnet2Subnet23D3396F`, + Ref: `${cdk.Names.uniqueId(vpc)}PrivateSubnet2Subnet23D3396F`, }, ], Tags: { diff --git a/packages/@aws-cdk/aws-cloudformation/test/test.nested-stack.ts b/packages/@aws-cdk/aws-cloudformation/test/test.nested-stack.ts index 5f809e7e544bf..056849c1dc12b 100644 --- a/packages/@aws-cdk/aws-cloudformation/test/test.nested-stack.ts +++ b/packages/@aws-cdk/aws-cloudformation/test/test.nested-stack.ts @@ -3,7 +3,7 @@ import * as path from 'path'; import { expect, haveResource, matchTemplate, SynthUtils } from '@aws-cdk/assert'; import * as s3_assets from '@aws-cdk/aws-s3-assets'; import * as sns from '@aws-cdk/aws-sns'; -import { App, CfnParameter, CfnResource, Construct, ContextProvider, LegacyStackSynthesizer, Stack } from '@aws-cdk/core'; +import { App, CfnParameter, CfnResource, Construct, ContextProvider, LegacyStackSynthesizer, Names, Stack } from '@aws-cdk/core'; import { Test } from 'nodeunit'; import { NestedStack } from '../lib/nested-stack'; @@ -63,7 +63,7 @@ export = { const assembly = app.synth(); // THEN - const template = JSON.parse(fs.readFileSync(path.join(assembly.directory, `${nested.node.uniqueId}.nested.template.json`), 'utf-8')); + const template = JSON.parse(fs.readFileSync(path.join(assembly.directory, `${Names.uniqueId(nested)}.nested.template.json`), 'utf-8')); test.deepEqual(template, { Resources: { ResourceInNestedStack: { diff --git a/packages/@aws-cdk/aws-cloudfront-origins/lib/s3-origin.ts b/packages/@aws-cdk/aws-cloudfront-origins/lib/s3-origin.ts index c6e0f83d0c15a..50fe044d3a484 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/lib/s3-origin.ts +++ b/packages/@aws-cdk/aws-cloudfront-origins/lib/s3-origin.ts @@ -74,7 +74,7 @@ class S3BucketOrigin extends cloudfront.OriginBase { const bucketStack = cdk.Stack.of(this.bucket); const bucketInDifferentStack = bucketStack !== cdk.Stack.of(scope); const oaiScope = bucketInDifferentStack ? bucketStack : scope; - const oaiId = bucketInDifferentStack ? `${scope.node.uniqueId}S3Origin` : 'S3Origin'; + const oaiId = bucketInDifferentStack ? `${cdk.Names.uniqueId(scope)}S3Origin` : 'S3Origin'; this.originAccessIdentity = new cloudfront.OriginAccessIdentity(oaiScope, oaiId, { comment: `Identity for ${options.originId}`, diff --git a/packages/@aws-cdk/aws-cloudfront/lib/cache-policy.ts b/packages/@aws-cdk/aws-cloudfront/lib/cache-policy.ts index ac3075d5f9aa4..30d3e6b97db74 100644 --- a/packages/@aws-cdk/aws-cloudfront/lib/cache-policy.ts +++ b/packages/@aws-cdk/aws-cloudfront/lib/cache-policy.ts @@ -1,4 +1,4 @@ -import { Duration, Resource, Token } from '@aws-cdk/core'; +import { Duration, Names, Resource, Token } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnCachePolicy } from './cloudfront.generated'; @@ -128,7 +128,7 @@ export class CachePolicy extends Resource implements ICachePolicy { physicalName: props.cachePolicyName, }); - const cachePolicyName = props.cachePolicyName ?? this.node.uniqueId; + const cachePolicyName = props.cachePolicyName ?? Names.uniqueId(this); if (!Token.isUnresolved(cachePolicyName) && !cachePolicyName.match(/^[\w-]+$/i)) { throw new Error(`'cachePolicyName' can only include '-', '_', and alphanumeric characters, got: '${props.cachePolicyName}'`); } diff --git a/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts b/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts index 806bf2a36c44b..43be41d7ae6bc 100644 --- a/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts +++ b/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts @@ -1,8 +1,8 @@ import * as acm from '@aws-cdk/aws-certificatemanager'; import * as lambda from '@aws-cdk/aws-lambda'; import * as s3 from '@aws-cdk/aws-s3'; -import { IResource, Lazy, Resource, Stack, Token, Duration } from '@aws-cdk/core'; -import { Construct, Node } from 'constructs'; +import { IResource, Lazy, Resource, Stack, Token, Duration, Names } from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { ICachePolicy } from './cache-policy'; import { CfnDistribution } from './cloudfront.generated'; import { GeoRestriction } from './geo-restriction'; @@ -322,7 +322,7 @@ export class Distribution extends Resource implements IDistribution { } else { const originIndex = this.boundOrigins.length + 1; const scope = new CoreConstruct(this, `Origin${originIndex}`); - const originId = Node.of(scope).uniqueId; + const originId = Names.uniqueId(scope); const originBindConfig = origin.bind(scope, { originId }); if (!originBindConfig.failoverConfig) { this.boundOrigins.push({ origin, originId, ...originBindConfig }); @@ -331,7 +331,7 @@ export class Distribution extends Resource implements IDistribution { throw new Error('An Origin cannot use an Origin with its own failover configuration as its fallback origin!'); } const groupIndex = this.originGroups.length + 1; - const originGroupId = Node.of(new CoreConstruct(this, `OriginGroup${groupIndex}`)).uniqueId; + const originGroupId = Names.uniqueId(new CoreConstruct(this, `OriginGroup${groupIndex}`)); this.boundOrigins.push({ origin, originId, originGroupId, ...originBindConfig }); const failoverOriginId = this.addOrigin(originBindConfig.failoverConfig.failoverOrigin, true); diff --git a/packages/@aws-cdk/aws-cloudfront/lib/origin-request-policy.ts b/packages/@aws-cdk/aws-cloudfront/lib/origin-request-policy.ts index 225de62cb12ec..8f279c7ddb213 100644 --- a/packages/@aws-cdk/aws-cloudfront/lib/origin-request-policy.ts +++ b/packages/@aws-cdk/aws-cloudfront/lib/origin-request-policy.ts @@ -1,4 +1,4 @@ -import { Resource, Token } from '@aws-cdk/core'; +import { Names, Resource, Token } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnOriginRequestPolicy } from './cloudfront.generated'; @@ -91,7 +91,7 @@ export class OriginRequestPolicy extends Resource implements IOriginRequestPolic physicalName: props.originRequestPolicyName, }); - const originRequestPolicyName = props.originRequestPolicyName ?? this.node.uniqueId; + const originRequestPolicyName = props.originRequestPolicyName ?? Names.uniqueId(this); if (!Token.isUnresolved(originRequestPolicyName) && !originRequestPolicyName.match(/^[\w-]+$/i)) { throw new Error(`'originRequestPolicyName' can only include '-', '_', and alphanumeric characters, got: '${props.originRequestPolicyName}'`); } diff --git a/packages/@aws-cdk/aws-cloudwatch/lib/composite-alarm.ts b/packages/@aws-cdk/aws-cloudwatch/lib/composite-alarm.ts index 6f889b5762b58..e8f8b95db3850 100644 --- a/packages/@aws-cdk/aws-cloudwatch/lib/composite-alarm.ts +++ b/packages/@aws-cdk/aws-cloudwatch/lib/composite-alarm.ts @@ -1,4 +1,4 @@ -import { Lazy, Stack } from '@aws-cdk/core'; +import { Lazy, Names, Stack } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { AlarmBase, IAlarm, IAlarmRule } from './alarm-base'; import { CfnCompositeAlarm } from './cloudwatch.generated'; @@ -120,7 +120,7 @@ export class CompositeAlarm extends AlarmBase { } private generateUniqueId(): string { - const name = this.node.uniqueId; + const name = Names.uniqueId(this); if (name.length > 240) { return name.substring(0, 120) + name.substring(name.length - 120); } diff --git a/packages/@aws-cdk/aws-codebuild/lib/project.ts b/packages/@aws-cdk/aws-codebuild/lib/project.ts index f69f817479870..452cbe9f0153f 100644 --- a/packages/@aws-cdk/aws-codebuild/lib/project.ts +++ b/packages/@aws-cdk/aws-codebuild/lib/project.ts @@ -7,7 +7,7 @@ import * as iam from '@aws-cdk/aws-iam'; import * as kms from '@aws-cdk/aws-kms'; import * as s3 from '@aws-cdk/aws-s3'; import * as secretsmanager from '@aws-cdk/aws-secretsmanager'; -import { Aws, Duration, IResource, Lazy, PhysicalName, Resource, Stack } from '@aws-cdk/core'; +import { Aws, Duration, IResource, Lazy, Names, PhysicalName, Resource, Stack } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { IArtifacts } from './artifacts'; import { BuildSpec } from './build-spec'; @@ -1022,7 +1022,7 @@ export class Project extends ProjectBase { } else { const securityGroup = new ec2.SecurityGroup(this, 'SecurityGroup', { vpc: props.vpc, - description: 'Automatic generated security group for CodeBuild ' + this.node.uniqueId, + description: 'Automatic generated security group for CodeBuild ' + Names.uniqueId(this), allowAllOutbound: props.allowAllOutbound, }); securityGroups = [securityGroup]; diff --git a/packages/@aws-cdk/aws-codedeploy/lib/lambda/custom-deployment-config.ts b/packages/@aws-cdk/aws-codedeploy/lib/lambda/custom-deployment-config.ts index 870937f046c32..20822a0d2356b 100644 --- a/packages/@aws-cdk/aws-codedeploy/lib/lambda/custom-deployment-config.ts +++ b/packages/@aws-cdk/aws-codedeploy/lib/lambda/custom-deployment-config.ts @@ -1,4 +1,4 @@ -import { Duration, Resource } from '@aws-cdk/core'; +import { Duration, Names, Resource } from '@aws-cdk/core'; import { AwsCustomResource, AwsCustomResourcePolicy, PhysicalResourceId } from '@aws-cdk/custom-resources'; import { Construct } from 'constructs'; import { arnForDeploymentConfig } from '../utils'; @@ -101,7 +101,7 @@ export class CustomLambdaDeploymentConfig extends Resource implements ILambdaDep // Unless the user provides an explicit name this.deploymentConfigName = props.deploymentConfigName !== undefined ? props.deploymentConfigName - : `${this.node.uniqueId}.Lambda${props.type}${props.percentage}Percent${props.type === CustomLambdaDeploymentConfigType.LINEAR + : `${Names.uniqueId(this)}.Lambda${props.type}${props.percentage}Percent${props.type === CustomLambdaDeploymentConfigType.LINEAR ? 'Every' : ''}${props.interval.toMinutes()}Minutes`; this.deploymentConfigArn = arnForDeploymentConfig(this.deploymentConfigName); diff --git a/packages/@aws-cdk/aws-codeguruprofiler/lib/profiling-group.ts b/packages/@aws-cdk/aws-codeguruprofiler/lib/profiling-group.ts index 70d159fe6fd8c..d47c994c283e4 100644 --- a/packages/@aws-cdk/aws-codeguruprofiler/lib/profiling-group.ts +++ b/packages/@aws-cdk/aws-codeguruprofiler/lib/profiling-group.ts @@ -1,5 +1,5 @@ import { Grant, IGrantable } from '@aws-cdk/aws-iam'; -import { IResource, Lazy, Resource, Stack } from '@aws-cdk/core'; +import { IResource, Lazy, Names, Resource, Stack } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnProfilingGroup } from './codeguruprofiler.generated'; @@ -195,7 +195,7 @@ export class ProfilingGroup extends ProfilingGroupBase { } private generateUniqueId(): string { - const name = this.node.uniqueId; + const name = Names.uniqueId(this); if (name.length > 240) { return name.substring(0, 120) + name.substring(name.length - 120); } diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/cloudformation/pipeline-actions.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/cloudformation/pipeline-actions.ts index 1982b0b8336bf..1ba14d469120d 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/cloudformation/pipeline-actions.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/cloudformation/pipeline-actions.ts @@ -270,7 +270,7 @@ abstract class CloudFormationDeployAction extends CloudFormationAction { // pass role is not allowed for cross-account access - so, // create the deployment Role in the other account! this._deploymentRole = new iam.Role(roleStack, - `${stage.pipeline.node.uniqueId}-${stage.stageName}-${this.actionProperties.actionName}-DeploymentRole`, { + `${cdk.Names.nodeUniqueId(stage.pipeline.node)}-${stage.stageName}-${this.actionProperties.actionName}-DeploymentRole`, { assumedBy: new iam.ServicePrincipal('cloudformation.amazonaws.com'), roleName: cdk.PhysicalName.GENERATE_IF_NEEDED, }); diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/codecommit/source-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/codecommit/source-action.ts index 8abca963a1943..9935bcb5be4d7 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/codecommit/source-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/codecommit/source-action.ts @@ -2,7 +2,7 @@ import * as codecommit from '@aws-cdk/aws-codecommit'; import * as codepipeline from '@aws-cdk/aws-codepipeline'; import * as targets from '@aws-cdk/aws-events-targets'; import * as iam from '@aws-cdk/aws-iam'; -import { Construct, Token } from '@aws-cdk/core'; +import { Construct, Names, Token } from '@aws-cdk/core'; import { Action } from '../action'; import { sourceArtifactBounds } from '../common'; @@ -165,7 +165,7 @@ export class CodeCommitSourceAction extends Action { } private generateEventId(stage: codepipeline.IStage): string { - const baseId = stage.pipeline.node.uniqueId; + const baseId = Names.nodeUniqueId(stage.pipeline.node); if (Token.isUnresolved(this.branch)) { let candidate = ''; let counter = 0; diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/ecr/source-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/ecr/source-action.ts index b9261cf34d878..f788c60d6aeea 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/ecr/source-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/ecr/source-action.ts @@ -2,7 +2,7 @@ import * as codepipeline from '@aws-cdk/aws-codepipeline'; import * as ecr from '@aws-cdk/aws-ecr'; import * as targets from '@aws-cdk/aws-events-targets'; import * as iam from '@aws-cdk/aws-iam'; -import { Construct } from '@aws-cdk/core'; +import { Construct, Names } from '@aws-cdk/core'; import { Action } from '../action'; import { sourceArtifactBounds } from '../common'; @@ -89,7 +89,7 @@ export class EcrSourceAction extends Action { resources: [this.props.repository.repositoryArn], })); - this.props.repository.onCloudTrailImagePushed(stage.pipeline.node.uniqueId + 'SourceEventRule', { + this.props.repository.onCloudTrailImagePushed(Names.nodeUniqueId(stage.pipeline.node) + 'SourceEventRule', { target: new targets.CodePipeline(stage.pipeline), imageTag: this.props.imageTag, }); diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/s3/source-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/s3/source-action.ts index 0d80b576227d9..2470ea6cca25f 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/s3/source-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/s3/source-action.ts @@ -1,7 +1,7 @@ import * as codepipeline from '@aws-cdk/aws-codepipeline'; import * as targets from '@aws-cdk/aws-events-targets'; import * as s3 from '@aws-cdk/aws-s3'; -import { Construct, Token } from '@aws-cdk/core'; +import { Construct, Names, Token } from '@aws-cdk/core'; import { Action } from '../action'; import { sourceArtifactBounds } from '../common'; @@ -134,7 +134,7 @@ export class S3SourceAction extends Action { private generateEventId(stage: codepipeline.IStage): string { let ret: string; - const baseId = stage.pipeline.node.uniqueId + 'SourceEventRule'; + const baseId = Names.nodeUniqueId(stage.pipeline.node) + 'SourceEventRule'; if (Token.isUnresolved(this.props.bucketKey)) { // If bucketKey is a Token, don't include it in the ID. diff --git a/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts b/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts index b3d18091322b1..e59de17b454b3 100644 --- a/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts +++ b/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts @@ -4,7 +4,7 @@ import * as kms from '@aws-cdk/aws-kms'; import * as s3 from '@aws-cdk/aws-s3'; import { App, BootstraplessSynthesizer, Construct as CoreConstruct, DefaultStackSynthesizer, - IStackSynthesizer, Lazy, PhysicalName, RemovalPolicy, Resource, Stack, Token, + IStackSynthesizer, Lazy, Names, PhysicalName, RemovalPolicy, Resource, Stack, Token, } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { ActionCategory, IAction, IPipeline, IStage } from './action'; @@ -552,7 +552,7 @@ export class Pipeline extends PipelineBase { private generateNameForDefaultBucketKeyAlias(): string { const prefix = 'alias/codepipeline-'; const maxAliasLength = 256; - const uniqueId = this.node.uniqueId; + const uniqueId = Names.uniqueId(this); // take the last 256 - (prefix length) characters of uniqueId const startIndex = Math.max(0, uniqueId.length - (maxAliasLength - prefix.length)); return prefix + uniqueId.substring(startIndex).toLowerCase(); @@ -639,7 +639,7 @@ export class Pipeline extends PipelineBase { // generate a role in the other stack, that the Pipeline will assume for executing this action const ret = new iam.Role(otherAccountStack, - `${this.node.uniqueId}-${stage.stageName}-${action.actionProperties.actionName}-ActionRole`, { + `${Names.uniqueId(this)}-${stage.stageName}-${action.actionProperties.actionName}-ActionRole`, { assumedBy: new iam.AccountPrincipal(pipelineStack.account), roleName: PhysicalName.GENERATE_IF_NEEDED, }); diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool.ts index 1f3feba34c669..91d62af406489 100644 --- a/packages/@aws-cdk/aws-cognito/lib/user-pool.ts +++ b/packages/@aws-cdk/aws-cognito/lib/user-pool.ts @@ -1,6 +1,6 @@ import { IRole, PolicyDocument, PolicyStatement, Role, ServicePrincipal } from '@aws-cdk/aws-iam'; import * as lambda from '@aws-cdk/aws-lambda'; -import { Duration, IResource, Lazy, Resource, Stack, Token } from '@aws-cdk/core'; +import { Duration, IResource, Lazy, Names, Resource, Stack, Token } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnUserPool } from './cognito.generated'; import { StandardAttributeNames } from './private/attr-names'; @@ -866,7 +866,7 @@ export class UserPool extends UserPoolBase { return undefined; } - const smsRoleExternalId = this.node.uniqueId.substr(0, 1223); // sts:ExternalId max length of 1224 + const smsRoleExternalId = Names.uniqueId(this).substr(0, 1223); // sts:ExternalId max length of 1224 const smsRole = props.smsRole ?? new Role(this, 'smsRole', { assumedBy: new ServicePrincipal('cognito-idp.amazonaws.com', { conditions: { diff --git a/packages/@aws-cdk/aws-dynamodb/lib/table.ts b/packages/@aws-cdk/aws-dynamodb/lib/table.ts index d1c6836acd133..7358c248d4ba1 100644 --- a/packages/@aws-cdk/aws-dynamodb/lib/table.ts +++ b/packages/@aws-cdk/aws-dynamodb/lib/table.ts @@ -4,7 +4,7 @@ import * as iam from '@aws-cdk/aws-iam'; import * as kms from '@aws-cdk/aws-kms'; import { Aws, CfnCondition, CfnCustomResource, Construct as CoreConstruct, CustomResource, Fn, - IResource, Lazy, RemovalPolicy, Resource, Stack, Token, + IResource, Lazy, Names, RemovalPolicy, Resource, Stack, Token, } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnTable, CfnTableProps } from './dynamodb.generated'; @@ -1454,7 +1454,7 @@ class SourceTableAttachedPolicy extends CoreConstruct implements iam.IGrantable public readonly policy: iam.IPolicy; public constructor(sourceTable: Table, role: iam.IRole) { - super(sourceTable, `SourceTableAttachedPolicy-${role.node.uniqueId}`); + super(sourceTable, `SourceTableAttachedPolicy-${Names.nodeUniqueId(role.node)}`); const policy = new iam.Policy(this, 'Resource', { roles: [role] }); this.policy = policy; diff --git a/packages/@aws-cdk/aws-ec2/lib/security-group.ts b/packages/@aws-cdk/aws-ec2/lib/security-group.ts index 3681c61f686dc..be52a3aa637cd 100644 --- a/packages/@aws-cdk/aws-ec2/lib/security-group.ts +++ b/packages/@aws-cdk/aws-ec2/lib/security-group.ts @@ -1,4 +1,4 @@ -import { Annotations, IResource, Lazy, Resource, ResourceProps, Stack, Token } from '@aws-cdk/core'; +import { Annotations, IResource, Lazy, Names, Resource, ResourceProps, Stack, Token } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { Connections } from './connections'; import { CfnSecurityGroup, CfnSecurityGroupEgress, CfnSecurityGroupIngress } from './ec2.generated'; @@ -71,7 +71,7 @@ abstract class SecurityGroupBase extends Resource implements ISecurityGroup { } public get uniqueId() { - return this.node.uniqueId; + return Names.nodeUniqueId(this.node); } public addIngressRule(peer: IPeer, connection: Port, description?: string, remoteRule?: boolean) { diff --git a/packages/@aws-cdk/aws-ec2/lib/volume.ts b/packages/@aws-cdk/aws-ec2/lib/volume.ts index 9270f6d81addb..3f9c8f3cac0dd 100644 --- a/packages/@aws-cdk/aws-ec2/lib/volume.ts +++ b/packages/@aws-cdk/aws-ec2/lib/volume.ts @@ -2,8 +2,8 @@ import * as crypto from 'crypto'; import { AccountRootPrincipal, Grant, IGrantable } from '@aws-cdk/aws-iam'; import { IKey, ViaServicePrincipal } from '@aws-cdk/aws-kms'; -import { Annotations, IResource, Resource, Size, SizeRoundingBehavior, Stack, Token, Tags } from '@aws-cdk/core'; -import { Construct, Node } from 'constructs'; +import { Annotations, IResource, Resource, Size, SizeRoundingBehavior, Stack, Token, Tags, Names } from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { CfnInstance, CfnVolume } from './ec2.generated'; import { IInstance } from './instance'; @@ -564,7 +564,7 @@ abstract class VolumeBase extends Resource implements IVolume { private calculateResourceTagValue(constructs: Construct[]): string { const md5 = crypto.createHash('md5'); - constructs.forEach(construct => md5.update(Node.of(construct).uniqueId)); + constructs.forEach(construct => md5.update(Names.uniqueId(construct))); return md5.digest('hex'); } } diff --git a/packages/@aws-cdk/aws-ec2/lib/vpc.ts b/packages/@aws-cdk/aws-ec2/lib/vpc.ts index 3e6d5731d8baa..f73a3b4c08c2a 100644 --- a/packages/@aws-cdk/aws-ec2/lib/vpc.ts +++ b/packages/@aws-cdk/aws-ec2/lib/vpc.ts @@ -1,7 +1,7 @@ import * as cxschema from '@aws-cdk/cloud-assembly-schema'; import { Annotations, ConcreteDependable, ContextProvider, DependableTrait, IConstruct, - IDependable, IResource, Lazy, Resource, Stack, Token, Tags, + IDependable, IResource, Lazy, Resource, Stack, Token, Tags, Names, } from '@aws-cdk/core'; import * as cxapi from '@aws-cdk/cx-api'; import { Construct, Node } from 'constructs'; @@ -1617,7 +1617,7 @@ export class Subnet extends Resource implements ISubnet { const scope = CoreConstruct.isConstruct(networkAcl) ? networkAcl : this; const other = CoreConstruct.isConstruct(networkAcl) ? this : networkAcl; - new SubnetNetworkAclAssociation(scope, id + other.node.uniqueId, { + new SubnetNetworkAclAssociation(scope, id + Names.nodeUniqueId(other.node), { networkAcl, subnet: this, }); @@ -1955,7 +1955,7 @@ class ImportedSubnet extends Resource implements ISubnet, IPublicSubnet, IPrivat public associateNetworkAcl(id: string, networkAcl: INetworkAcl): void { const scope = CoreConstruct.isConstruct(networkAcl) ? networkAcl : this; const other = CoreConstruct.isConstruct(networkAcl) ? this : networkAcl; - new SubnetNetworkAclAssociation(scope, id + other.node.uniqueId, { + new SubnetNetworkAclAssociation(scope, id + Names.nodeUniqueId(other.node), { networkAcl, subnet: this, }); diff --git a/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts b/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts index 6cdafa2c65ee4..948ce4ea8ae90 100644 --- a/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts +++ b/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts @@ -1,6 +1,6 @@ import * as ec2 from '@aws-cdk/aws-ec2'; import * as iam from '@aws-cdk/aws-iam'; -import { IResource, Lazy, Resource } from '@aws-cdk/core'; +import { IResource, Lazy, Names, Resource } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { ContainerDefinition, ContainerDefinitionOptions, PortMapping, Protocol } from '../container-definition'; import { CfnTaskDefinition } from '../ecs.generated'; @@ -267,7 +267,7 @@ export class TaskDefinition extends TaskDefinitionBase { constructor(scope: Construct, id: string, props: TaskDefinitionProps) { super(scope, id); - this.family = props.family || this.node.uniqueId; + this.family = props.family || Names.uniqueId(this); this.compatibility = props.compatibility; if (props.volumes) { diff --git a/packages/@aws-cdk/aws-eks-legacy/README.md b/packages/@aws-cdk/aws-eks-legacy/README.md index bb839de949c7e..73d34d7a9b624 100644 --- a/packages/@aws-cdk/aws-eks-legacy/README.md +++ b/packages/@aws-cdk/aws-eks-legacy/README.md @@ -1,4 +1,5 @@ ## Amazon EKS Construct Library + --- @@ -11,7 +12,7 @@ **This module is available for backwards compatibility purposes only ([details](https://github.com/aws/aws-cdk/pull/5540)). It will no longer be released with the CDK starting March 1st, 2020. See [issue -#5544](https://github.com/aws/aws-cdk/issues/5544) for upgrade instructions.** +# 5544](https://github.com/aws/aws-cdk/issues/5544) for upgrade instructions.** --- @@ -120,7 +121,6 @@ When adding capacity, you can specify options for which is responsible for associating the node to the EKS cluster. For example, you can use `kubeletExtraArgs` to add custom node labels or taints. - ```ts // up to ten spot instances cluster.addCapacity('spot', { @@ -417,8 +417,8 @@ This means that if the chart is deleted from your code (or the stack is deleted), the next `cdk deploy` will issue a `helm uninstall` command and the Helm chart will be deleted. -When there is no `release` defined, the chart will be installed using the `node.uniqueId`, -which will be lower cassed and truncated to the last 63 characters. +When there is no `release` defined, the chart will be installed with a unique name allocated +based on the construct path. ### Roadmap diff --git a/packages/@aws-cdk/aws-eks-legacy/lib/helm-chart.ts b/packages/@aws-cdk/aws-eks-legacy/lib/helm-chart.ts index 23db12ce9aa55..9be42e435123c 100644 --- a/packages/@aws-cdk/aws-eks-legacy/lib/helm-chart.ts +++ b/packages/@aws-cdk/aws-eks-legacy/lib/helm-chart.ts @@ -1,7 +1,7 @@ import * as path from 'path'; import { CustomResource, CustomResourceProvider } from '@aws-cdk/aws-cloudformation'; import * as lambda from '@aws-cdk/aws-lambda'; -import { Construct, Duration, Stack } from '@aws-cdk/core'; +import { Construct, Duration, Names, Stack } from '@aws-cdk/core'; import { Cluster } from './cluster'; import { KubectlLayer } from './kubectl-layer'; @@ -84,7 +84,7 @@ export class HelmChart extends Construct { provider: CustomResourceProvider.lambda(handler), resourceType: HelmChart.RESOURCE_TYPE, properties: { - Release: props.release || this.node.uniqueId.slice(-63).toLowerCase(), // Helm has a 63 character limit for the name + Release: props.release || Names.uniqueId(this).slice(-63).toLowerCase(), // Helm has a 63 character limit for the name Chart: props.chart, Version: props.version, Values: (props.values ? stack.toJsonString(props.values) : undefined), diff --git a/packages/@aws-cdk/aws-eks/README.md b/packages/@aws-cdk/aws-eks/README.md index 895c954a9b692..de599ac1614ec 100644 --- a/packages/@aws-cdk/aws-eks/README.md +++ b/packages/@aws-cdk/aws-eks/README.md @@ -1,4 +1,5 @@ ## Amazon EKS Construct Library + --- @@ -23,20 +24,20 @@ Table Of Contents * [API Reference](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-eks-readme.html) * [Architectural Overview](#architectural-overview) * [Provisioning clusters](#provisioning-clusters) - * [Managed node groups](#managed-node-groups) - * [Fargate Profiles](#fargate-profiles) - * [Self-managed nodes](#self-managed-nodes) - * [Endpoint Access](#endpoint-access) - * [VPC Support](#vpc-support) - * [Kubectl Support](#kubectl-support) - * [ARM64 Support](#arm64-support) - * [Masters Role](#masters-role) - * [Encryption](#encryption) + * [Managed node groups](#managed-node-groups) + * [Fargate Profiles](#fargate-profiles) + * [Self-managed nodes](#self-managed-nodes) + * [Endpoint Access](#endpoint-access) + * [VPC Support](#vpc-support) + * [Kubectl Support](#kubectl-support) + * [ARM64 Support](#arm64-support) + * [Masters Role](#masters-role) + * [Encryption](#encryption) * [Permissions and Security](#permissions-and-security) * [Applying Kubernetes Resources](#applying-kubernetes-resources) - * [Kubernetes Manifests](#kubernetes-manifests) - * [Helm Charts](#helm-charts) - * [CDK8s Charts](#cdk8s-charts) + * [Kubernetes Manifests](#kubernetes-manifests) + * [Helm Charts](#helm-charts) + * [CDK8s Charts](#cdk8s-charts) * [Patching Kuberentes Resources](#patching-kubernetes-resources) * [Querying Kubernetes Resources](#querying-kubernetes-resources) * [Using existing clusters](#using-existing-clusters) @@ -80,7 +81,7 @@ Outputs: ClusterConfigCommand43AAE40F = aws eks update-kubeconfig --name cluster-xxxxx --role-arn arn:aws:iam::112233445566:role/yyyyy ``` -Execute the `aws eks update-kubeconfig ... ` command in your terminal to create or update a local kubeconfig context: +Execute the `aws eks update-kubeconfig ...` command in your terminal to create or update a local kubeconfig context: ```console $ aws eks update-kubeconfig --name cluster-xxxxx --role-arn arn:aws:iam::112233445566:role/yyyyy @@ -157,7 +158,7 @@ new eks.FargateCluster(this, 'HelloEKS', { }); ``` -> **NOTE: Only 1 cluster per stack is supported.** If you have a use-case for multiple clusters per stack, or would like to understand more about this limitation, see https://github.com/aws/aws-cdk/issues/10073. +> **NOTE: Only 1 cluster per stack is supported.** If you have a use-case for multiple clusters per stack, or would like to understand more about this limitation, see . Below you'll find a few important cluster configuration options. First of which is Capacity. Capacity is the amount and the type of worker nodes that are available to the cluster for deploying resources. Amazon EKS offers 3 ways of configuring capacity, which you can combine as you like: @@ -640,7 +641,7 @@ new cdk.CfnOutput(this, 'ServiceAccountIamRole', { value: sa.role.roleArn }) ``` Note that using `sa.serviceAccountName` above **does not** translate into a resource dependency. -This is why an explicit dependency is needed. See https://github.com/aws/aws-cdk/issues/9910 for more details. +This is why an explicit dependency is needed. See for more details. ## Applying Kubernetes Resources @@ -798,8 +799,8 @@ This means that if the chart is deleted from your code (or the stack is deleted), the next `cdk deploy` will issue a `helm uninstall` command and the Helm chart will be deleted. -When there is no `release` defined, the chart will be installed using the `node.uniqueId`, -which will be lower cased and truncated to the last 63 characters. +When there is no `release` defined, a unique ID will be allocated for the release based +on the construct path. By default, all Helm charts will be installed concurrently. In some cases, this could cause race conditions where two Helm charts attempt to deploy the same @@ -846,6 +847,7 @@ Notice that the chart must accept a `constructs.Construct` type as its scope, no For this reason, to avoid possible confusion, we will create the chart in a separate file: `+ my-chart.ts` + ```ts import * as s3 from '@aws-cdk/aws-s3'; import * as constructs from 'constructs'; diff --git a/packages/@aws-cdk/aws-eks/lib/aws-auth.ts b/packages/@aws-cdk/aws-eks/lib/aws-auth.ts index bc3adfee6442f..1d0317758f705 100644 --- a/packages/@aws-cdk/aws-eks/lib/aws-auth.ts +++ b/packages/@aws-cdk/aws-eks/lib/aws-auth.ts @@ -110,7 +110,7 @@ export class AwsAuth extends CoreConstruct { // a dependency on the cluster, allowing those resources to be in a different stack, // will create a circular dependency. granted, it won't always be the case, // but we opted for the more causious and restrictive approach for now. - throw new Error(`${construct.node.uniqueId} should be defined in the scope of the ${thisStack.stackName} stack to prevent circular dependencies`); + throw new Error(`${construct.node.path} should be defined in the scope of the ${thisStack.stackName} stack to prevent circular dependencies`); } } diff --git a/packages/@aws-cdk/aws-eks/lib/helm-chart.ts b/packages/@aws-cdk/aws-eks/lib/helm-chart.ts index 83ed8fc652780..9e981bf449793 100644 --- a/packages/@aws-cdk/aws-eks/lib/helm-chart.ts +++ b/packages/@aws-cdk/aws-eks/lib/helm-chart.ts @@ -1,4 +1,4 @@ -import { CustomResource, Duration, Stack } from '@aws-cdk/core'; +import { CustomResource, Duration, Names, Stack } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { ICluster } from './cluster'; import { KubectlProvider } from './kubectl-provider'; @@ -113,7 +113,7 @@ export class HelmChart extends CoreConstruct { properties: { ClusterName: props.cluster.clusterName, RoleArn: provider.roleArn, // TODO: bake into the provider's environment - Release: props.release ?? this.node.uniqueId.slice(-53).toLowerCase(), // Helm has a 53 character limit for the name + Release: props.release ?? Names.uniqueId(this).slice(-53).toLowerCase(), // Helm has a 53 character limit for the name Chart: props.chart, Version: props.version, Wait: wait || undefined, // props are stringified so we encode “false” as undefined diff --git a/packages/@aws-cdk/aws-eks/lib/kubectl-provider.ts b/packages/@aws-cdk/aws-eks/lib/kubectl-provider.ts index 15f8229d325ca..be23ac355c42e 100644 --- a/packages/@aws-cdk/aws-eks/lib/kubectl-provider.ts +++ b/packages/@aws-cdk/aws-eks/lib/kubectl-provider.ts @@ -1,7 +1,7 @@ import * as path from 'path'; import * as iam from '@aws-cdk/aws-iam'; import * as lambda from '@aws-cdk/aws-lambda'; -import { Duration, Stack, NestedStack } from '@aws-cdk/core'; +import { Duration, Stack, NestedStack, Names } from '@aws-cdk/core'; import * as cr from '@aws-cdk/custom-resources'; import { Construct } from 'constructs'; import { ICluster, Cluster } from './cluster'; @@ -28,7 +28,7 @@ export class KubectlProvider extends NestedStack { // if this is an imported cluster, we need to provision a custom resource provider in this stack // we will define one per stack for each cluster based on the cluster uniqueid - const uid = `${cluster.node.uniqueId}-KubectlProvider`; + const uid = `${Names.nodeUniqueId(cluster.node)}-KubectlProvider`; const stack = Stack.of(scope); let provider = stack.node.tryFindChild(uid) as KubectlProvider; if (!provider) { diff --git a/packages/@aws-cdk/aws-eks/lib/service-account.ts b/packages/@aws-cdk/aws-eks/lib/service-account.ts index e6a0e3489204f..17907d7f1685a 100644 --- a/packages/@aws-cdk/aws-eks/lib/service-account.ts +++ b/packages/@aws-cdk/aws-eks/lib/service-account.ts @@ -1,5 +1,5 @@ import { AddToPrincipalPolicyResult, IPrincipal, IRole, OpenIdConnectPrincipal, PolicyStatement, PrincipalPolicyFragment, Role } from '@aws-cdk/aws-iam'; -import { CfnJson } from '@aws-cdk/core'; +import { CfnJson, Names } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { Cluster } from './cluster'; import { KubernetesManifest } from './k8s-manifest'; @@ -63,7 +63,7 @@ export class ServiceAccount extends CoreConstruct implements IPrincipal { super(scope, id); const { cluster } = props; - this.serviceAccountName = props.name ?? this.node.uniqueId.toLowerCase(); + this.serviceAccountName = props.name ?? Names.uniqueId(this).toLowerCase(); this.serviceAccountNamespace = props.namespace ?? 'default'; /* Add conditions to the role to improve security. This prevents other pods in the same namespace to assume the role. diff --git a/packages/@aws-cdk/aws-eks/test/test.awsauth.ts b/packages/@aws-cdk/aws-eks/test/test.awsauth.ts index 519f2c1415b06..631622aedc836 100644 --- a/packages/@aws-cdk/aws-eks/test/test.awsauth.ts +++ b/packages/@aws-cdk/aws-eks/test/test.awsauth.ts @@ -26,7 +26,7 @@ export = { awsAuth.addRoleMapping(role, { groups: ['group'] }); test.ok(false, 'expected error'); } catch (err) { - test.equal(err.message, 'RoleStackRole6729D0A7 should be defined in the scope of the ClusterStack stack to prevent circular dependencies'); + test.equal(err.message, 'RoleStack/Role should be defined in the scope of the ClusterStack stack to prevent circular dependencies'); } test.done(); @@ -47,7 +47,7 @@ export = { awsAuth.addUserMapping(user, { groups: ['group'] }); test.ok(false, 'expected error'); } catch (err) { - test.equal(err.message, 'UserStackUser0406F94E should be defined in the scope of the ClusterStack stack to prevent circular dependencies'); + test.equal(err.message, 'UserStack/User should be defined in the scope of the ClusterStack stack to prevent circular dependencies'); } test.done(); diff --git a/packages/@aws-cdk/aws-eks/test/test.cluster.ts b/packages/@aws-cdk/aws-eks/test/test.cluster.ts index 10909690f99af..170273d0485fe 100644 --- a/packages/@aws-cdk/aws-eks/test/test.cluster.ts +++ b/packages/@aws-cdk/aws-eks/test/test.cluster.ts @@ -319,7 +319,7 @@ export = { clusterStack.eksCluster.connectAutoScalingGroupCapacity(capacityStack.group, {}); test.ok(false, 'expected error'); } catch (err) { - test.equal(err.message, 'CapacityStackautoScalingInstanceRoleF041EB53 should be defined in the scope of the ClusterStack stack to prevent circular dependencies'); + test.equal(err.message, 'CapacityStack/autoScaling/InstanceRole should be defined in the scope of the ClusterStack stack to prevent circular dependencies'); } test.done(); diff --git a/packages/@aws-cdk/aws-eks/test/test.k8s-patch.ts b/packages/@aws-cdk/aws-eks/test/test.k8s-patch.ts index c4defdf107606..24dabbbf0c1a2 100644 --- a/packages/@aws-cdk/aws-eks/test/test.k8s-patch.ts +++ b/packages/@aws-cdk/aws-eks/test/test.k8s-patch.ts @@ -1,5 +1,5 @@ import { expect, haveResource } from '@aws-cdk/assert'; -import { Stack } from '@aws-cdk/core'; +import { Names, Stack } from '@aws-cdk/core'; import { Test } from 'nodeunit'; import * as eks from '../lib'; import { KubernetesPatch, PatchType } from '../lib/k8s-patch'; @@ -44,7 +44,7 @@ export = { })); // also make sure a dependency on the barrier is added to the patch construct. - test.deepEqual(patch.node.dependencies.map(d => d.target.node.uniqueId), ['MyClusterKubectlReadyBarrier7547948A']); + test.deepEqual(patch.node.dependencies.map(d => Names.nodeUniqueId(d.target.node)), ['MyClusterKubectlReadyBarrier7547948A']); test.done(); }, diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts index 278cd8a5fbc44..780282071a18c 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts @@ -1,6 +1,6 @@ import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; import * as ec2 from '@aws-cdk/aws-ec2'; -import { Duration, Lazy, Resource } from '@aws-cdk/core'; +import { Duration, Lazy, Names, Resource } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { BaseLoadBalancer, BaseLoadBalancerProps, ILoadBalancerV2 } from '../shared/base-load-balancer'; import { IpAddressType, ApplicationProtocol } from '../shared/enums'; @@ -70,7 +70,7 @@ export class ApplicationLoadBalancer extends BaseLoadBalancer implements IApplic this.ipAddressType = props.ipAddressType ?? IpAddressType.IPV4; const securityGroups = [props.securityGroup || new ec2.SecurityGroup(this, 'SecurityGroup', { vpc: props.vpc, - description: `Automatically created Security Group for ELB ${this.node.uniqueId}`, + description: `Automatically created Security Group for ELB ${Names.uniqueId(this)}`, allowAllOutbound: false, })]; this.connections = new ec2.Connections({ securityGroups }); diff --git a/packages/@aws-cdk/aws-events-targets/lib/batch.ts b/packages/@aws-cdk/aws-events-targets/lib/batch.ts index 69f9a52fdbb35..19ade67f17d48 100644 --- a/packages/@aws-cdk/aws-events-targets/lib/batch.ts +++ b/packages/@aws-cdk/aws-events-targets/lib/batch.ts @@ -1,6 +1,7 @@ import * as batch from '@aws-cdk/aws-batch'; import * as events from '@aws-cdk/aws-events'; import * as iam from '@aws-cdk/aws-iam'; +import { Names } from '@aws-cdk/core'; import { singletonEventRole } from './util'; /** @@ -59,7 +60,7 @@ export class BatchJob implements events.IRuleTarget { public bind(rule: events.IRule, _id?: string): events.RuleTargetConfig { const batchParameters: events.CfnRule.BatchParametersProperty = { jobDefinition: this.jobDefinition.jobDefinitionArn, - jobName: this.props.jobName ?? rule.node.uniqueId, + jobName: this.props.jobName ?? Names.nodeUniqueId(rule.node), arrayProperties: this.props.size ? { size: this.props.size } : undefined, retryStrategy: this.props.attempts ? { attempts: this.props.attempts } : undefined, }; diff --git a/packages/@aws-cdk/aws-events-targets/lib/util.ts b/packages/@aws-cdk/aws-events-targets/lib/util.ts index 41a5ab110d3b9..fe41154b6037c 100644 --- a/packages/@aws-cdk/aws-events-targets/lib/util.ts +++ b/packages/@aws-cdk/aws-events-targets/lib/util.ts @@ -1,7 +1,7 @@ import * as events from '@aws-cdk/aws-events'; import * as iam from '@aws-cdk/aws-iam'; import * as lambda from '@aws-cdk/aws-lambda'; -import { Construct, ConstructNode, IConstruct } from '@aws-cdk/core'; +import { Construct, ConstructNode, IConstruct, Names } from '@aws-cdk/core'; /** * Obtain the Role for the EventBridge event @@ -35,7 +35,7 @@ export function addLambdaPermission(rule: events.IRule, handler: lambda.IFunctio scope = rule; node = rule.node; } - const permissionId = `AllowEventRule${rule.node.uniqueId}`; + const permissionId = `AllowEventRule${Names.nodeUniqueId(rule.node)}`; if (!node.tryFindChild(permissionId)) { handler.addPermission(permissionId, { scope, diff --git a/packages/@aws-cdk/aws-events/lib/event-bus.ts b/packages/@aws-cdk/aws-events/lib/event-bus.ts index 2dc1c35c9cded..6101b44f680f4 100644 --- a/packages/@aws-cdk/aws-events/lib/event-bus.ts +++ b/packages/@aws-cdk/aws-events/lib/event-bus.ts @@ -1,5 +1,5 @@ import * as iam from '@aws-cdk/aws-iam'; -import { IResource, Lazy, Resource, Stack, Token } from '@aws-cdk/core'; +import { IResource, Lazy, Names, Resource, Stack, Token } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnEventBus } from './events.generated'; @@ -219,7 +219,7 @@ export class EventBus extends Resource implements IEventBus { constructor(scope: Construct, id: string, props?: EventBusProps) { const { eventBusName, eventSourceName } = EventBus.eventBusProps( - Lazy.stringValue({ produce: () => this.node.uniqueId }), + Lazy.stringValue({ produce: () => Names.uniqueId(this) }), props, ); diff --git a/packages/@aws-cdk/aws-events/lib/rule.ts b/packages/@aws-cdk/aws-events/lib/rule.ts index ca0dcd24bf45e..98e629874e382 100644 --- a/packages/@aws-cdk/aws-events/lib/rule.ts +++ b/packages/@aws-cdk/aws-events/lib/rule.ts @@ -1,4 +1,4 @@ -import { App, Lazy, Resource, Stack, Token } from '@aws-cdk/core'; +import { App, Lazy, Names, Resource, Stack, Token } from '@aws-cdk/core'; import { Construct, Node } from 'constructs'; import { IEventBus } from './event-bus'; import { EventPattern } from './event-pattern'; @@ -276,7 +276,7 @@ export class Rule extends Resource implements IRule { } } - new CopyRule(targetStack, `${this.node.uniqueId}-${id}`, { + new CopyRule(targetStack, `${Names.uniqueId(this)}-${id}`, { targets: [target], eventPattern: this.eventPattern, schedule: this.scheduleExpression ? Schedule.expression(this.scheduleExpression) : undefined, diff --git a/packages/@aws-cdk/aws-events/test/test.rule.ts b/packages/@aws-cdk/aws-events/test/test.rule.ts index be9d4b86ff5e4..991d2e83d0249 100644 --- a/packages/@aws-cdk/aws-events/test/test.rule.ts +++ b/packages/@aws-cdk/aws-events/test/test.rule.ts @@ -362,7 +362,7 @@ export = { const t1: IRuleTarget = { bind: (eventRule: IRule) => { receivedRuleArn = eventRule.ruleArn; - receivedRuleId = eventRule.node.uniqueId; + receivedRuleId = cdk.Names.nodeUniqueId(eventRule.node); return { id: '', @@ -376,7 +376,7 @@ export = { rule.addTarget(t1); test.deepEqual(stack.resolve(receivedRuleArn), stack.resolve(rule.ruleArn)); - test.deepEqual(receivedRuleId, rule.node.uniqueId); + test.deepEqual(receivedRuleId, cdk.Names.uniqueId(rule)); test.done(); }, diff --git a/packages/@aws-cdk/aws-lambda-event-sources/lib/api.ts b/packages/@aws-cdk/aws-lambda-event-sources/lib/api.ts index 2f3f3bcdc15fb..d8430d96b0f87 100644 --- a/packages/@aws-cdk/aws-lambda-event-sources/lib/api.ts +++ b/packages/@aws-cdk/aws-lambda-event-sources/lib/api.ts @@ -1,6 +1,6 @@ import * as apigw from '@aws-cdk/aws-apigateway'; import * as lambda from '@aws-cdk/aws-lambda'; -import { Stack } from '@aws-cdk/core'; +import { Names, Stack } from '@aws-cdk/core'; export class ApiEventSource implements lambda.IEventSource { constructor(private readonly method: string, private readonly path: string, private readonly options?: apigw.MethodOptions) { @@ -10,7 +10,7 @@ export class ApiEventSource implements lambda.IEventSource { } public bind(target: lambda.IFunction): void { - const id = `${target.node.uniqueId}:ApiEventSourceA7A86A4F`; + const id = `${Names.nodeUniqueId(target.node)}:ApiEventSourceA7A86A4F`; const stack = Stack.of(target); let api = stack.node.tryFindChild(id) as apigw.RestApi; if (!api) { diff --git a/packages/@aws-cdk/aws-lambda-event-sources/lib/dynamodb.ts b/packages/@aws-cdk/aws-lambda-event-sources/lib/dynamodb.ts index 43b2a99076d2f..f316ba69cf9ed 100644 --- a/packages/@aws-cdk/aws-lambda-event-sources/lib/dynamodb.ts +++ b/packages/@aws-cdk/aws-lambda-event-sources/lib/dynamodb.ts @@ -1,5 +1,6 @@ import * as dynamodb from '@aws-cdk/aws-dynamodb'; import * as lambda from '@aws-cdk/aws-lambda'; +import { Names } from '@aws-cdk/core'; import { StreamEventSource, StreamEventSourceProps } from './stream'; export interface DynamoEventSourceProps extends StreamEventSourceProps { @@ -24,7 +25,7 @@ export class DynamoEventSource extends StreamEventSource { throw new Error(`DynamoDB Streams must be enabled on the table ${this.table.node.path}`); } - const eventSourceMapping = target.addEventSourceMapping(`DynamoDBEventSource:${this.table.node.uniqueId}`, + const eventSourceMapping = target.addEventSourceMapping(`DynamoDBEventSource:${Names.nodeUniqueId(this.table.node)}`, this.enrichMappingOptions({ eventSourceArn: this.table.tableStreamArn }), ); this._eventSourceMappingId = eventSourceMapping.eventSourceMappingId; diff --git a/packages/@aws-cdk/aws-lambda-event-sources/lib/kinesis.ts b/packages/@aws-cdk/aws-lambda-event-sources/lib/kinesis.ts index a72d2db989d32..f0847429c5a45 100644 --- a/packages/@aws-cdk/aws-lambda-event-sources/lib/kinesis.ts +++ b/packages/@aws-cdk/aws-lambda-event-sources/lib/kinesis.ts @@ -23,7 +23,7 @@ export class KinesisEventSource extends StreamEventSource { } public bind(target: lambda.IFunction) { - const eventSourceMapping = target.addEventSourceMapping(`KinesisEventSource:${this.stream.node.uniqueId}`, + const eventSourceMapping = target.addEventSourceMapping(`KinesisEventSource:${cdk.Names.nodeUniqueId(this.stream.node)}`, this.enrichMappingOptions({ eventSourceArn: this.stream.streamArn }), ); this._eventSourceMappingId = eventSourceMapping.eventSourceMappingId; diff --git a/packages/@aws-cdk/aws-lambda-event-sources/lib/sqs.ts b/packages/@aws-cdk/aws-lambda-event-sources/lib/sqs.ts index 2c379e128541c..88cc1682f2be5 100644 --- a/packages/@aws-cdk/aws-lambda-event-sources/lib/sqs.ts +++ b/packages/@aws-cdk/aws-lambda-event-sources/lib/sqs.ts @@ -1,5 +1,6 @@ import * as lambda from '@aws-cdk/aws-lambda'; import * as sqs from '@aws-cdk/aws-sqs'; +import { Names } from '@aws-cdk/core'; export interface SqsEventSourceProps { /** @@ -34,7 +35,7 @@ export class SqsEventSource implements lambda.IEventSource { } public bind(target: lambda.IFunction) { - const eventSourceMapping = target.addEventSourceMapping(`SqsEventSource:${this.queue.node.uniqueId}`, { + const eventSourceMapping = target.addEventSourceMapping(`SqsEventSource:${Names.nodeUniqueId(this.queue.node)}`, { batchSize: this.props.batchSize, enabled: this.props.enabled, eventSourceArn: this.queue.queueArn, diff --git a/packages/@aws-cdk/aws-lambda/lib/function.ts b/packages/@aws-cdk/aws-lambda/lib/function.ts index dd16d89b54db8..d44a14a3aa4f1 100644 --- a/packages/@aws-cdk/aws-lambda/lib/function.ts +++ b/packages/@aws-cdk/aws-lambda/lib/function.ts @@ -4,7 +4,7 @@ import * as ec2 from '@aws-cdk/aws-ec2'; import * as iam from '@aws-cdk/aws-iam'; import * as logs from '@aws-cdk/aws-logs'; import * as sqs from '@aws-cdk/aws-sqs'; -import { Annotations, CfnResource, Duration, Fn, Lazy, Stack } from '@aws-cdk/core'; +import { Annotations, CfnResource, Duration, Fn, Lazy, Names, Stack } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { Code, CodeConfig } from './code'; import { EventInvokeConfigOptions } from './event-invoke-config'; @@ -839,7 +839,7 @@ Environment variables can be marked for removal when used in Lambda@Edge by sett } else { const securityGroup = props.securityGroup || new ec2.SecurityGroup(this, 'SecurityGroup', { vpc: props.vpc, - description: 'Automatic security group for Lambda Function ' + this.node.uniqueId, + description: 'Automatic security group for Lambda Function ' + Names.uniqueId(this), allowAllOutbound: props.allowAllOutbound, }); securityGroups = [securityGroup]; diff --git a/packages/@aws-cdk/aws-s3-notifications/lib/lambda.ts b/packages/@aws-cdk/aws-s3-notifications/lib/lambda.ts index a0bd0acaeaee6..36ad917ec4ec4 100644 --- a/packages/@aws-cdk/aws-s3-notifications/lib/lambda.ts +++ b/packages/@aws-cdk/aws-s3-notifications/lib/lambda.ts @@ -1,7 +1,7 @@ import * as iam from '@aws-cdk/aws-iam'; import * as lambda from '@aws-cdk/aws-lambda'; import * as s3 from '@aws-cdk/aws-s3'; -import { CfnResource, Construct, Stack } from '@aws-cdk/core'; +import { CfnResource, Construct, Names, Stack } from '@aws-cdk/core'; /** * Use a Lambda function as a bucket notification destination @@ -11,10 +11,10 @@ export class LambdaDestination implements s3.IBucketNotificationDestination { } public bind(_scope: Construct, bucket: s3.IBucket): s3.BucketNotificationDestinationConfig { - const permissionId = `AllowBucketNotificationsTo${this.fn.permissionsNode.uniqueId}`; + const permissionId = `AllowBucketNotificationsTo${Names.nodeUniqueId(this.fn.permissionsNode)}`; if (!Construct.isConstruct(bucket)) { - throw new Error(`LambdaDestination for function ${this.fn.permissionsNode.uniqueId} can only be configured on a + throw new Error(`LambdaDestination for function ${Names.nodeUniqueId(this.fn.permissionsNode)} can only be configured on a bucket construct (Bucket ${bucket.bucketName})`); } diff --git a/packages/@aws-cdk/aws-secretsmanager/lib/secret-rotation.ts b/packages/@aws-cdk/aws-secretsmanager/lib/secret-rotation.ts index 388933895af51..0d0ed6e75c348 100644 --- a/packages/@aws-cdk/aws-secretsmanager/lib/secret-rotation.ts +++ b/packages/@aws-cdk/aws-secretsmanager/lib/secret-rotation.ts @@ -1,7 +1,7 @@ import * as ec2 from '@aws-cdk/aws-ec2'; import * as lambda from '@aws-cdk/aws-lambda'; import * as serverless from '@aws-cdk/aws-sam'; -import { Duration, Stack, Token } from '@aws-cdk/core'; +import { Duration, Names, Stack, Token } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { ISecret } from './secret'; @@ -224,7 +224,7 @@ export class SecretRotation extends CoreConstruct { } // Max length of 64 chars, get the last 64 chars - const uniqueId = this.node.uniqueId; + const uniqueId = Names.uniqueId(this); const rotationFunctionName = uniqueId.substring(Math.max(uniqueId.length - 64, 0), uniqueId.length); const securityGroup = props.securityGroup || new ec2.SecurityGroup(this, 'SecurityGroup', { diff --git a/packages/@aws-cdk/aws-servicediscovery/lib/alias-target-instance.ts b/packages/@aws-cdk/aws-servicediscovery/lib/alias-target-instance.ts index a8302b5e1dbc9..271b386963cab 100644 --- a/packages/@aws-cdk/aws-servicediscovery/lib/alias-target-instance.ts +++ b/packages/@aws-cdk/aws-servicediscovery/lib/alias-target-instance.ts @@ -1,3 +1,4 @@ +import { Names } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { BaseInstanceProps, InstanceBase } from './instance'; import { NamespaceType } from './namespace'; @@ -65,7 +66,7 @@ export class AliasTargetInstance extends InstanceBase { AWS_ALIAS_DNS_NAME: props.dnsName, ...props.customAttributes, }, - instanceId: props.instanceId || this.node.uniqueId, + instanceId: props.instanceId || Names.uniqueId(this), serviceId: props.service.serviceId, }); diff --git a/packages/@aws-cdk/aws-servicediscovery/lib/instance.ts b/packages/@aws-cdk/aws-servicediscovery/lib/instance.ts index 00e7d6a126934..76cbf171f8ae9 100644 --- a/packages/@aws-cdk/aws-servicediscovery/lib/instance.ts +++ b/packages/@aws-cdk/aws-servicediscovery/lib/instance.ts @@ -1,4 +1,4 @@ -import { IResource, Resource } from '@aws-cdk/core'; +import { IResource, Names, Resource } from '@aws-cdk/core'; import { IService } from './service'; export interface IInstance extends IResource { @@ -50,7 +50,7 @@ export abstract class InstanceBase extends Resource implements IInstance { */ protected uniqueInstanceId() { // Max length of 64 chars, get the last 64 chars - const id = this.node.uniqueId; + const id = Names.uniqueId(this); return id.substring(Math.max(id.length - 64, 0), id.length); } } diff --git a/packages/@aws-cdk/aws-sns-subscriptions/lib/lambda.ts b/packages/@aws-cdk/aws-sns-subscriptions/lib/lambda.ts index 943813184ed1f..3ecab463d2c2c 100644 --- a/packages/@aws-cdk/aws-sns-subscriptions/lib/lambda.ts +++ b/packages/@aws-cdk/aws-sns-subscriptions/lib/lambda.ts @@ -1,7 +1,7 @@ import * as iam from '@aws-cdk/aws-iam'; import * as lambda from '@aws-cdk/aws-lambda'; import * as sns from '@aws-cdk/aws-sns'; -import { Construct, Stack } from '@aws-cdk/core'; +import { Construct, Names, Stack } from '@aws-cdk/core'; import { SubscriptionProps } from './subscription'; /** @@ -27,7 +27,7 @@ export class LambdaSubscription implements sns.ITopicSubscription { throw new Error('The supplied lambda Function object must be an instance of Construct'); } - this.fn.addPermission(`AllowInvoke:${topic.node.uniqueId}`, { + this.fn.addPermission(`AllowInvoke:${Names.nodeUniqueId(topic.node)}`, { sourceArn: topic.topicArn, principal: new iam.ServicePrincipal('sns.amazonaws.com'), }); diff --git a/packages/@aws-cdk/aws-sns-subscriptions/lib/sqs.ts b/packages/@aws-cdk/aws-sns-subscriptions/lib/sqs.ts index 39c8362d60c4f..bac6a13859d9c 100644 --- a/packages/@aws-cdk/aws-sns-subscriptions/lib/sqs.ts +++ b/packages/@aws-cdk/aws-sns-subscriptions/lib/sqs.ts @@ -1,7 +1,7 @@ import * as iam from '@aws-cdk/aws-iam'; import * as sns from '@aws-cdk/aws-sns'; import * as sqs from '@aws-cdk/aws-sqs'; -import { Construct, Stack } from '@aws-cdk/core'; +import { Construct, Names, Stack } from '@aws-cdk/core'; import { SubscriptionProps } from './subscription'; /** @@ -48,7 +48,7 @@ export class SqsSubscription implements sns.ITopicSubscription { return { subscriberScope: this.queue, - subscriberId: topic.node.uniqueId, + subscriberId: Names.nodeUniqueId(topic.node), endpoint: this.queue.queueArn, protocol: sns.SubscriptionProtocol.SQS, rawMessageDelivery: this.props.rawMessageDelivery, diff --git a/packages/@aws-cdk/aws-stepfunctions/lib/activity.ts b/packages/@aws-cdk/aws-stepfunctions/lib/activity.ts index e40673730b1cf..601479fbed0e4 100644 --- a/packages/@aws-cdk/aws-stepfunctions/lib/activity.ts +++ b/packages/@aws-cdk/aws-stepfunctions/lib/activity.ts @@ -1,6 +1,6 @@ import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; import * as iam from '@aws-cdk/aws-iam'; -import { IResource, Lazy, Resource, Stack } from '@aws-cdk/core'; +import { IResource, Lazy, Names, Resource, Stack } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnActivity } from './stepfunctions.generated'; @@ -186,7 +186,7 @@ export class Activity extends Resource implements IActivity { } private generateName(): string { - const name = this.node.uniqueId; + const name = Names.uniqueId(this); if (name.length > 80) { return name.substring(0, 40) + name.substring(name.length - 40); } diff --git a/packages/@aws-cdk/aws-synthetics/lib/canary.ts b/packages/@aws-cdk/aws-synthetics/lib/canary.ts index 7d46e3f6a896f..f2bbb1407d76a 100644 --- a/packages/@aws-cdk/aws-synthetics/lib/canary.ts +++ b/packages/@aws-cdk/aws-synthetics/lib/canary.ts @@ -388,7 +388,7 @@ export class Canary extends cdk.Resource { * Creates a unique name for the canary. The generated name is the physical ID of the canary. */ private generateUniqueName(): string { - const name = this.node.uniqueId.toLowerCase().replace(' ', '-'); + const name = cdk.Names.uniqueId(this).toLowerCase().replace(' ', '-'); if (name.length <= 21) { return name; } else { diff --git a/packages/@aws-cdk/core/lib/index.ts b/packages/@aws-cdk/core/lib/index.ts index d63f847fe2687..4aa0cda188201 100644 --- a/packages/@aws-cdk/core/lib/index.ts +++ b/packages/@aws-cdk/core/lib/index.ts @@ -66,3 +66,4 @@ export * from './feature-flags'; // WARNING: Should not be exported, but currently is because of a bug. See the // class description for more information. export * from './private/intrinsic'; +export * from './names'; \ No newline at end of file diff --git a/packages/@aws-cdk/core/lib/names.ts b/packages/@aws-cdk/core/lib/names.ts new file mode 100644 index 0000000000000..03998fcebe902 --- /dev/null +++ b/packages/@aws-cdk/core/lib/names.ts @@ -0,0 +1,40 @@ +import { Construct, Node } from 'constructs'; +import { ConstructNode } from './construct-compat'; +import { makeUniqueId } from './private/uniqueid'; + +/** + * Functions for devising unique names for constructs. For example, those can be + * used to allocate unique physical names for resources. + */ +export class Names { + /** + * Returns a CloudFormation-compatible unique identifier for a construct based + * on its path. The identifier includes a human readable porition rendered + * from the path components and a hash suffix. + * + * @param construct The construct + * @returns a unique id based on the construct path + */ + public static uniqueId(construct: Construct): string { + const node = Node.of(construct); + const components = node.scopes.slice(1).map(c => Node.of(c).id); + return components.length > 0 ? makeUniqueId(components) : ''; + } + + /** + * Returns a CloudFormation-compatible unique identifier for a construct based + * on its path. The identifier includes a human readable porition rendered + * from the path components and a hash suffix. + * + * TODO (v2): replace with API to use `constructs.Node`. + * + * @param node The construct node + * @returns a unique id based on the construct path + */ + public static nodeUniqueId(node: ConstructNode): string { + const components = node.scopes.slice(1).map(c => c.node.id); + return components.length > 0 ? makeUniqueId(components) : ''; + } + + private constructor() {} +} diff --git a/packages/@aws-cdk/core/lib/nested-stack.ts b/packages/@aws-cdk/core/lib/nested-stack.ts index 395d3bd63c8c5..cca4b827b57cf 100644 --- a/packages/@aws-cdk/core/lib/nested-stack.ts +++ b/packages/@aws-cdk/core/lib/nested-stack.ts @@ -7,6 +7,7 @@ import { CfnResource } from './cfn-resource'; import { CfnStack } from './cloudformation.generated'; import { Duration } from './duration'; import { Lazy } from './lazy'; +import { Names } from './names'; import { IResolveContext } from './resolvable'; import { Stack } from './stack'; import { NestedStackSynthesizer } from './stack-synthesizers'; @@ -114,7 +115,7 @@ export class NestedStack extends Stack { Object.defineProperty(this, NESTED_STACK_SYMBOL, { value: true }); // this is the file name of the synthesized template file within the cloud assembly - this.templateFile = `${this.node.uniqueId}.nested.template.json`; + this.templateFile = `${Names.uniqueId(this)}.nested.template.json`; this.parameters = props.parameters || {}; diff --git a/packages/@aws-cdk/core/lib/private/physical-name-generator.ts b/packages/@aws-cdk/core/lib/private/physical-name-generator.ts index 7c9fae2ab15da..1671e0c5bf2ef 100644 --- a/packages/@aws-cdk/core/lib/private/physical-name-generator.ts +++ b/packages/@aws-cdk/core/lib/private/physical-name-generator.ts @@ -1,5 +1,6 @@ import * as crypto from 'crypto'; import { Node } from 'constructs'; +import { Names } from '../names'; import { IResolvable, IResolveContext } from '../resolvable'; import { IResource } from '../resource'; import { Stack } from '../stack'; @@ -9,7 +10,7 @@ import { TokenMap } from './token-map'; export function generatePhysicalName(resource: IResource): string { const stack = Stack.of(resource); const stackPart = new PrefixNamePart(stack.stackName, 25); - const idPart = new SuffixNamePart(Node.of(resource).uniqueId, 24); + const idPart = new SuffixNamePart(Names.nodeUniqueId(resource.node), 24); const region: string = stack.region; if (Token.isUnresolved(region) || !region) { diff --git a/packages/@aws-cdk/core/lib/private/refs.ts b/packages/@aws-cdk/core/lib/private/refs.ts index 0fdc5e1bed40f..05bb7930bc34f 100644 --- a/packages/@aws-cdk/core/lib/private/refs.ts +++ b/packages/@aws-cdk/core/lib/private/refs.ts @@ -8,6 +8,7 @@ import { CfnOutput } from '../cfn-output'; import { CfnParameter } from '../cfn-parameter'; import { Construct, IConstruct } from '../construct-compat'; import { FeatureFlags } from '../feature-flags'; +import { Names } from '../names'; import { Reference } from '../reference'; import { IResolvable } from '../resolvable'; import { Stack } from '../stack'; @@ -226,7 +227,7 @@ function generateExportName(stackExports: Construct, id: string) { */ function createNestedStackParameter(nested: Stack, reference: CfnReference, value: IResolvable) { // we call "this.resolve" to ensure that tokens do not creep in (for example, if the reference display name includes tokens) - const paramId = nested.resolve(`reference-to-${reference.target.node.uniqueId}.${reference.displayName}`); + const paramId = nested.resolve(`reference-to-${ Names.nodeUniqueId(reference.target.node)}.${reference.displayName}`); let param = nested.node.tryFindChild(paramId) as CfnParameter; if (!param) { param = new CfnParameter(nested, paramId, { type: 'String' }); @@ -247,7 +248,7 @@ function createNestedStackParameter(nested: Stack, reference: CfnReference, valu * intrinsic that can be used to reference this output in the parent stack. */ function createNestedStackOutput(producer: Stack, reference: Reference): CfnReference { - const outputId = `${reference.target.node.uniqueId}${reference.displayName}`; + const outputId = `${Names.nodeUniqueId(reference.target.node)}${reference.displayName}`; let output = producer.node.tryFindChild(outputId) as CfnOutput; if (!output) { output = new CfnOutput(producer, outputId, { value: Token.asString(reference) }); diff --git a/packages/@aws-cdk/core/lib/stack.ts b/packages/@aws-cdk/core/lib/stack.ts index 88f407ef01839..3c254ea803e88 100644 --- a/packages/@aws-cdk/core/lib/stack.ts +++ b/packages/@aws-cdk/core/lib/stack.ts @@ -718,9 +718,9 @@ export class Stack extends CoreConstruct implements ITaggable { throw new Error(`'${target.node.path}' depends on '${this.node.path}' (${cycle.join(', ')}). Adding this dependency (${reason}) would create a cyclic reference.`); } - let dep = this._stackDependencies[target.node.uniqueId]; + let dep = this._stackDependencies[Names.uniqueId(target)]; if (!dep) { - dep = this._stackDependencies[target.node.uniqueId] = { + dep = this._stackDependencies[Names.uniqueId(target)] = { stack: target, reasons: [], }; @@ -1125,6 +1125,7 @@ import { Stage } from './stage'; import { ITaggable, TagManager } from './tag-manager'; import { Token } from './token'; import { FileSystem } from './fs'; +import { Names } from './names'; interface StackDependency { stack: Stack; diff --git a/packages/@aws-cdk/example-construct-library/test/example-resource.test.ts b/packages/@aws-cdk/example-construct-library/test/example-resource.test.ts index 4d73c8be33973..e9f56d52769a6 100644 --- a/packages/@aws-cdk/example-construct-library/test/example-resource.test.ts +++ b/packages/@aws-cdk/example-construct-library/test/example-resource.test.ts @@ -1,7 +1,7 @@ /* * We write unit tests using the Jest framework * (some modules might still use NodeUnit, - * but it's considered legacy, and we want to migrate to Jest). + * but it's considered Names, and we want to migrate to Jest). */ // import the various CDK assertion helpers From f14d823279e4dbb6ac90ab21d219257b22b81278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B5nis?= Date: Tue, 3 Nov 2020 20:17:04 +0200 Subject: [PATCH 034/314] fix(stepfunctions): stack overflow when referenced json path finding encounters a circular object graph (#11225) This change fixes #9319 where if an EcsRunTask step was used with the WAIT_FOR_TASK_TOKEN integration pattern, the logic for finding all referenced JSONPath elements in container overrides would encounter a circular reference and terminate with a stack overflow. With this change, `JsonPath.recurseObject` and `JsonPath.recurseArray` would maintain a list of already visited objects and use it to prune circular references back to an already visited object. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-stepfunctions/lib/json-path.ts | 15 ++++++++----- .../aws-stepfunctions/test/fields.test.ts | 22 +++++++++++++++++++ 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/packages/@aws-cdk/aws-stepfunctions/lib/json-path.ts b/packages/@aws-cdk/aws-stepfunctions/lib/json-path.ts index c72d1ced22d4f..b172ed94de411 100644 --- a/packages/@aws-cdk/aws-stepfunctions/lib/json-path.ts +++ b/packages/@aws-cdk/aws-stepfunctions/lib/json-path.ts @@ -81,8 +81,13 @@ interface FieldHandlers { handleBoolean(key: string, x: boolean): {[key: string]: boolean}; } -export function recurseObject(obj: object | undefined, handlers: FieldHandlers): object | undefined { +export function recurseObject(obj: object | undefined, handlers: FieldHandlers, visited: object[] = []): object | undefined { if (obj === undefined) { return undefined; } + if (visited.includes(obj)) { + return {}; + } else { + visited.push(obj); + } const ret: any = {}; for (const [key, value] of Object.entries(obj)) { @@ -91,13 +96,13 @@ export function recurseObject(obj: object | undefined, handlers: FieldHandlers): } else if (typeof value === 'number') { Object.assign(ret, handlers.handleNumber(key, value)); } else if (Array.isArray(value)) { - Object.assign(ret, recurseArray(key, value, handlers)); + Object.assign(ret, recurseArray(key, value, handlers, visited)); } else if (typeof value === 'boolean') { Object.assign(ret, handlers.handleBoolean(key, value)); } else if (value === null || value === undefined) { // Nothing } else if (typeof value === 'object') { - ret[key] = recurseObject(value, handlers); + ret[key] = recurseObject(value, handlers, visited); } } @@ -107,7 +112,7 @@ export function recurseObject(obj: object | undefined, handlers: FieldHandlers): /** * Render an array that may or may not contain a string list token */ -function recurseArray(key: string, arr: any[], handlers: FieldHandlers): {[key: string]: any[] | string} { +function recurseArray(key: string, arr: any[], handlers: FieldHandlers, visited: object[] = []): {[key: string]: any[] | string} { if (isStringArray(arr)) { const path = jsonPathStringList(arr); if (path !== undefined) { @@ -126,7 +131,7 @@ function recurseArray(key: string, arr: any[], handlers: FieldHandlers): {[key: throw new Error('Cannot use JsonPath fields in an array, they must be used in objects'); } if (typeof value === 'object' && value !== null) { - return recurseObject(value, handlers); + return recurseObject(value, handlers, visited); } return value; }), diff --git a/packages/@aws-cdk/aws-stepfunctions/test/fields.test.ts b/packages/@aws-cdk/aws-stepfunctions/test/fields.test.ts index 1235dc9e5d526..a919912bf7c30 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/fields.test.ts +++ b/packages/@aws-cdk/aws-stepfunctions/test/fields.test.ts @@ -130,4 +130,26 @@ describe('Fields', () => { field: `contains ${JsonPath.stringAt('$.hello')}`, })).toThrowError(/Field references must be the entire string/); }); + test('infinitely recursive object graphs do not break referenced path finding', () => { + const deepObject = { + field: JsonPath.stringAt('$.stringField'), + deepField: JsonPath.numberAt('$.numField'), + recursiveField: undefined as any, + }; + const paths = { + bool: false, + literal: 'literal', + field: JsonPath.stringAt('$.stringField'), + listField: JsonPath.listAt('$.listField'), + recursiveField: undefined as any, + deep: [ + 'literal', + deepObject, + ], + }; + paths.recursiveField = paths; + deepObject.recursiveField = paths; + expect(FieldUtils.findReferencedPaths(paths)) + .toStrictEqual(['$.listField', '$.numField', '$.stringField']); + }); }); From 213186e71ea5baba3a3419d62b64936a332969b9 Mon Sep 17 00:00:00 2001 From: Jerry Kindall <52084730+Jerry-AWS@users.noreply.github.com> Date: Tue, 3 Nov 2020 11:05:22 -0800 Subject: [PATCH 035/314] docs(lambda): typo hwich -> which (#11262) fixes https://github.com/aws/aws-cdk/issues/10855 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-lambda/lib/layers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-lambda/lib/layers.ts b/packages/@aws-cdk/aws-lambda/lib/layers.ts index 4a58d5ce501ef..92de56f57e7a8 100644 --- a/packages/@aws-cdk/aws-lambda/lib/layers.ts +++ b/packages/@aws-cdk/aws-lambda/lib/layers.ts @@ -106,7 +106,7 @@ export interface LayerVersionPermission { readonly accountId: string; /** - * The ID of the AWS Organization to hwich the grant is restricted. + * The ID of the AWS Organization to which the grant is restricted. * * Can only be specified if ``accountId`` is ``'*'`` */ From cc590e63ae6ba7dcf26e992c47afb8c6bf79e940 Mon Sep 17 00:00:00 2001 From: Romain Marcadier Date: Tue, 3 Nov 2020 20:33:55 +0100 Subject: [PATCH 036/314] chore: build ubergen as part of bump-cfnspec.sh (#11191) This is transitively required when creating missing libraries in the mono-repository. Use a manual `lerna` invocation instead of `buildup` in order to avoid possibly re-building some dependencies. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- scripts/bump-cfnspec.sh | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/scripts/bump-cfnspec.sh b/scripts/bump-cfnspec.sh index 38b0033650170..bceb02897e0a2 100755 --- a/scripts/bump-cfnspec.sh +++ b/scripts/bump-cfnspec.sh @@ -10,18 +10,28 @@ pwd=$(pwd) ${pwd}/install.sh -# cfn2ts is invoked by cfnspec when a new module is created. -# However, cfnspec module is a dependency of the cfn2ts module. -# 'Building up' cfn2ts will build both cfnspec and cfn2ts -cd tools/cfn2ts -${pwd}/scripts/buildup +# Running the `@aws-cdk/cfnspec` update script requires both `cfn2ts` and +# `ubergen` to be readily available. The dependency can however not be modeled +# cleanly without introducing dependency cycles... This is due to how these +# dependencies are in fact involved in the building of new construct libraries +# created upon their introduction in the CFN Specification (they incur the +# dependency, not `@aws-cdk/cfnspec` itself). +lerna run build --stream \ + --scope=@aws-cdk/cfnspec \ + --scope=cfn2ts \ + --scope=ubergen \ + --include-dependencies # Run the cfnspec update -cd ${pwd}/packages/@aws-cdk/cfnspec -yarn update -version=$(cat cfn.version) +( + cd ${pwd}/packages/@aws-cdk/cfnspec + yarn update + version=$(cat cfn.version) +) # Come back to root, add all files to git and commit -cd ${pwd} -git add . -git commit -a -m "feat: cloudformation spec v${version}" || true # don't fail if there are no updates +( + cd ${pwd} + git add . + git commit -a -m "feat: cloudformation spec v${version}" || true # don't fail if there are no updates +) From ed6e7ed9ebee7dc8932c35885698fc72e2052085 Mon Sep 17 00:00:00 2001 From: Thorsten Hoeger Date: Tue, 3 Nov 2020 21:02:02 +0100 Subject: [PATCH 037/314] fix(ecs): redirect config should honor openListener flag (#11115) The redirectHTTP feature should honor the settings of the openListener option. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../lib/base/application-load-balanced-service-base.ts | 2 +- packages/@aws-cdk/aws-ecs-patterns/test/ec2/test.l3s.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-ecs-patterns/lib/base/application-load-balanced-service-base.ts b/packages/@aws-cdk/aws-ecs-patterns/lib/base/application-load-balanced-service-base.ts index cc509d5e6b932..942a9afb32673 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/lib/base/application-load-balanced-service-base.ts +++ b/packages/@aws-cdk/aws-ecs-patterns/lib/base/application-load-balanced-service-base.ts @@ -375,7 +375,7 @@ export abstract class ApplicationLoadBalancedServiceBase extends cdk.Construct { this.redirectListener = loadBalancer.addListener('PublicRedirectListener', { protocol: ApplicationProtocol.HTTP, port: 80, - open: true, + open: props.openListener ?? true, defaultAction: ListenerAction.redirect({ port: props.listenerPort?.toString() || '443', protocol: ApplicationProtocol.HTTPS, diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/ec2/test.l3s.ts b/packages/@aws-cdk/aws-ecs-patterns/test/ec2/test.l3s.ts index 82dff62e0700c..16ace6a20c4a0 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/test/ec2/test.l3s.ts +++ b/packages/@aws-cdk/aws-ecs-patterns/test/ec2/test.l3s.ts @@ -1127,6 +1127,7 @@ export = { const vpc = new ec2.Vpc(stack, 'VPC'); const cluster = new ecs.Cluster(stack, 'Cluster', { vpc }); cluster.addCapacity('DefaultAutoScalingGroup', { instanceType: new ec2.InstanceType('t2.micro') }); + const zone = new PublicHostedZone(stack, 'HostedZone', { zoneName: 'example.com' }); // WHEN new ecsPatterns.ApplicationLoadBalancedEc2Service(stack, 'Service', { @@ -1135,7 +1136,11 @@ export = { taskImageOptions: { image: ecs.ContainerImage.fromRegistry('test'), }, + domainName: 'api.example.com', + domainZone: zone, + certificate: Certificate.fromCertificateArn(stack, 'Cert', 'helloworld'), openListener: false, + redirectHTTP: true, }); // THEN - Stack contains no ingress security group rules From 29aa223f05b5f012b42b662e7a9fcc8fe82167a7 Mon Sep 17 00:00:00 2001 From: Meng Xin Zhu Date: Wed, 4 Nov 2020 04:31:22 +0800 Subject: [PATCH 038/314] fix: explicitly set the 'ImagePullPrincipalType' of image (#11264) closes #10569 as workaround for the violation of CloudFormation of CodeBuild ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-codebuild/lib/project.ts | 2 +- .../@aws-cdk/aws-codebuild/test/integ.caching.expected.json | 1 + .../aws-codebuild/test/integ.defaults.lit.expected.json | 1 + .../@aws-cdk/aws-codebuild/test/integ.github.expected.json | 1 + .../aws-codebuild/test/integ.project-bucket.expected.json | 1 + .../test/integ.project-buildspec-artifacts.expected.json | 1 + .../test/integ.project-file-system-location.expected.json | 1 + .../integ.project-secondary-sources-artifacts.expected.json | 1 + .../aws-codebuild/test/integ.project-vpc.expected.json | 1 + packages/@aws-cdk/aws-codebuild/test/test.codebuild.ts | 5 +++++ ...eg.lambda-deployed-through-codepipeline.lit.expected.json | 2 ++ ...pipeline-code-build-multiple-inputs-outputs.expected.json | 1 + .../test/integ.pipeline-code-commit-build.expected.json | 1 + .../test/integ.pipeline-ecs-deploy.expected.json | 1 + .../test/integ.pipeline-events.expected.json | 1 + .../test/codebuild/integ.project-events.expected.json | 1 + .../test/codebuild/integ.start-build.expected.json | 1 + .../pipelines/test/integ.pipeline-with-assets.expected.json | 5 +++++ .../@aws-cdk/pipelines/test/integ.pipeline.expected.json | 3 +++ packages/decdk/test/__snapshots__/synth.test.js.snap | 1 + 20 files changed, 31 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-codebuild/lib/project.ts b/packages/@aws-cdk/aws-codebuild/lib/project.ts index 452cbe9f0153f..8bfc8f38e09cf 100644 --- a/packages/@aws-cdk/aws-codebuild/lib/project.ts +++ b/packages/@aws-cdk/aws-codebuild/lib/project.ts @@ -938,7 +938,7 @@ export class Project extends ProjectBase { } const imagePullPrincipalType = this.buildImage.imagePullPrincipalType === ImagePullPrincipalType.CODEBUILD - ? undefined + ? ImagePullPrincipalType.CODEBUILD : ImagePullPrincipalType.SERVICE_ROLE; if (this.buildImage.repository) { if (imagePullPrincipalType === ImagePullPrincipalType.SERVICE_ROLE) { diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.caching.expected.json b/packages/@aws-cdk/aws-codebuild/test/integ.caching.expected.json index 79f9c50c2e5a7..248d2e31c9ac8 100644 --- a/packages/@aws-cdk/aws-codebuild/test/integ.caching.expected.json +++ b/packages/@aws-cdk/aws-codebuild/test/integ.caching.expected.json @@ -137,6 +137,7 @@ "Environment": { "ComputeType": "BUILD_GENERAL1_SMALL", "Image": "aws/codebuild/standard:1.0", + "ImagePullCredentialsType": "CODEBUILD", "PrivilegedMode": false, "Type": "LINUX_CONTAINER" }, diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.defaults.lit.expected.json b/packages/@aws-cdk/aws-codebuild/test/integ.defaults.lit.expected.json index 75491ab8fa653..d9e429b2d694c 100644 --- a/packages/@aws-cdk/aws-codebuild/test/integ.defaults.lit.expected.json +++ b/packages/@aws-cdk/aws-codebuild/test/integ.defaults.lit.expected.json @@ -133,6 +133,7 @@ "Environment": { "ComputeType": "BUILD_GENERAL1_SMALL", "Image": "aws/codebuild/standard:1.0", + "ImagePullCredentialsType": "CODEBUILD", "PrivilegedMode": false, "Type": "LINUX_CONTAINER" }, diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.github.expected.json b/packages/@aws-cdk/aws-codebuild/test/integ.github.expected.json index 222a29feeeb8a..12c37d9da5b3b 100644 --- a/packages/@aws-cdk/aws-codebuild/test/integ.github.expected.json +++ b/packages/@aws-cdk/aws-codebuild/test/integ.github.expected.json @@ -99,6 +99,7 @@ "Environment": { "ComputeType": "BUILD_GENERAL1_SMALL", "Image": "aws/codebuild/standard:1.0", + "ImagePullCredentialsType": "CODEBUILD", "PrivilegedMode": false, "Type": "LINUX_CONTAINER" }, diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.project-bucket.expected.json b/packages/@aws-cdk/aws-codebuild/test/integ.project-bucket.expected.json index 0ba33dae84b91..f8f5aa2e67aad 100644 --- a/packages/@aws-cdk/aws-codebuild/test/integ.project-bucket.expected.json +++ b/packages/@aws-cdk/aws-codebuild/test/integ.project-bucket.expected.json @@ -134,6 +134,7 @@ "Environment": { "ComputeType": "BUILD_GENERAL1_LARGE", "Image": "aws/codebuild/standard:1.0", + "ImagePullCredentialsType": "CODEBUILD", "PrivilegedMode": false, "Type": "LINUX_CONTAINER" }, diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.project-buildspec-artifacts.expected.json b/packages/@aws-cdk/aws-codebuild/test/integ.project-buildspec-artifacts.expected.json index 13ff8f1e054c0..b2101c7135f2f 100644 --- a/packages/@aws-cdk/aws-codebuild/test/integ.project-buildspec-artifacts.expected.json +++ b/packages/@aws-cdk/aws-codebuild/test/integ.project-buildspec-artifacts.expected.json @@ -145,6 +145,7 @@ "Environment": { "ComputeType": "BUILD_GENERAL1_SMALL", "Image": "aws/codebuild/standard:1.0", + "ImagePullCredentialsType": "CODEBUILD", "PrivilegedMode": false, "Type": "LINUX_CONTAINER" }, diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.project-file-system-location.expected.json b/packages/@aws-cdk/aws-codebuild/test/integ.project-file-system-location.expected.json index 696a9b7b065ee..492e78820dc47 100644 --- a/packages/@aws-cdk/aws-codebuild/test/integ.project-file-system-location.expected.json +++ b/packages/@aws-cdk/aws-codebuild/test/integ.project-file-system-location.expected.json @@ -366,6 +366,7 @@ "Environment": { "ComputeType": "BUILD_GENERAL1_SMALL", "Image": "aws/codebuild/standard:1.0", + "ImagePullCredentialsType": "CODEBUILD", "PrivilegedMode": true, "Type": "LINUX_CONTAINER" }, diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.project-secondary-sources-artifacts.expected.json b/packages/@aws-cdk/aws-codebuild/test/integ.project-secondary-sources-artifacts.expected.json index f7261ca4b21ae..7d6a3f783c899 100644 --- a/packages/@aws-cdk/aws-codebuild/test/integ.project-secondary-sources-artifacts.expected.json +++ b/packages/@aws-cdk/aws-codebuild/test/integ.project-secondary-sources-artifacts.expected.json @@ -167,6 +167,7 @@ "Environment": { "ComputeType": "BUILD_GENERAL1_SMALL", "Image": "aws/codebuild/standard:1.0", + "ImagePullCredentialsType": "CODEBUILD", "PrivilegedMode": false, "Type": "LINUX_CONTAINER" }, diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.project-vpc.expected.json b/packages/@aws-cdk/aws-codebuild/test/integ.project-vpc.expected.json index a5d874bf04830..cb3561326a2a4 100644 --- a/packages/@aws-cdk/aws-codebuild/test/integ.project-vpc.expected.json +++ b/packages/@aws-cdk/aws-codebuild/test/integ.project-vpc.expected.json @@ -366,6 +366,7 @@ "Environment": { "ComputeType": "BUILD_GENERAL1_SMALL", "Image": "aws/codebuild/standard:1.0", + "ImagePullCredentialsType": "CODEBUILD", "PrivilegedMode": false, "Type": "LINUX_CONTAINER" }, diff --git a/packages/@aws-cdk/aws-codebuild/test/test.codebuild.ts b/packages/@aws-cdk/aws-codebuild/test/test.codebuild.ts index ea1c8eb87b021..66a4ccd09e8db 100644 --- a/packages/@aws-cdk/aws-codebuild/test/test.codebuild.ts +++ b/packages/@aws-cdk/aws-codebuild/test/test.codebuild.ts @@ -152,6 +152,7 @@ export = { 'Type': 'LINUX_CONTAINER', 'PrivilegedMode': false, 'Image': 'aws/codebuild/standard:1.0', + 'ImagePullCredentialsType': 'CODEBUILD', 'ComputeType': 'BUILD_GENERAL1_SMALL', }, 'EncryptionKey': 'alias/aws/s3', @@ -315,6 +316,7 @@ export = { 'Environment': { 'ComputeType': 'BUILD_GENERAL1_SMALL', 'Image': 'aws/codebuild/standard:1.0', + 'ImagePullCredentialsType': 'CODEBUILD', 'PrivilegedMode': false, 'Type': 'LINUX_CONTAINER', }, @@ -514,6 +516,7 @@ export = { 'Environment': { 'ComputeType': 'BUILD_GENERAL1_MEDIUM', 'Image': 'aws/codebuild/windows-base:2.0', + 'ImagePullCredentialsType': 'CODEBUILD', 'PrivilegedMode': false, 'Type': 'WINDOWS_CONTAINER', }, @@ -1205,6 +1208,7 @@ export = { 'Type': 'LINUX_CONTAINER', 'PrivilegedMode': false, 'Image': 'aws/codebuild/standard:1.0', + 'ImagePullCredentialsType': 'CODEBUILD', 'ComputeType': 'BUILD_GENERAL1_SMALL', }, })); @@ -1449,6 +1453,7 @@ export = { ], 'PrivilegedMode': false, 'Image': 'aws/codebuild/standard:1.0', + 'ImagePullCredentialsType': 'CODEBUILD', 'ComputeType': 'BUILD_GENERAL1_SMALL', }, })); diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.expected.json index 2e48bb1667495..023573c87412f 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.expected.json +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.expected.json @@ -1559,6 +1559,7 @@ "Environment": { "ComputeType": "BUILD_GENERAL1_SMALL", "Image": "aws/codebuild/nodejs:10.1.0", + "ImagePullCredentialsType": "CODEBUILD", "PrivilegedMode": false, "Type": "LINUX_CONTAINER" }, @@ -1777,6 +1778,7 @@ "Environment": { "ComputeType": "BUILD_GENERAL1_SMALL", "Image": "aws/codebuild/nodejs:10.1.0", + "ImagePullCredentialsType": "CODEBUILD", "PrivilegedMode": false, "Type": "LINUX_CONTAINER" }, diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.expected.json index d2d59b1fe8884..ce11844d4a671 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.expected.json +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.expected.json @@ -603,6 +603,7 @@ "Environment": { "ComputeType": "BUILD_GENERAL1_SMALL", "Image": "aws/codebuild/standard:1.0", + "ImagePullCredentialsType": "CODEBUILD", "PrivilegedMode": false, "Type": "LINUX_CONTAINER" }, diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.expected.json index d5b7c25c88505..7fe649e0c2f8c 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.expected.json +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.expected.json @@ -212,6 +212,7 @@ "Environment": { "ComputeType": "BUILD_GENERAL1_SMALL", "Image": "aws/codebuild/standard:1.0", + "ImagePullCredentialsType": "CODEBUILD", "PrivilegedMode": false, "Type": "LINUX_CONTAINER" }, diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.expected.json index 5570acefe6336..2d6b137036065 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.expected.json +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.expected.json @@ -528,6 +528,7 @@ } ], "Image": "aws/codebuild/docker:17.09.0", + "ImagePullCredentialsType": "CODEBUILD", "PrivilegedMode": true, "Type": "LINUX_CONTAINER" }, diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-events.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-events.expected.json index ba0872c38c31b..d2031a00a8252 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-events.expected.json +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-events.expected.json @@ -882,6 +882,7 @@ "Environment": { "ComputeType": "BUILD_GENERAL1_SMALL", "Image": "aws/codebuild/standard:1.0", + "ImagePullCredentialsType": "CODEBUILD", "PrivilegedMode": false, "Type": "LINUX_CONTAINER" }, diff --git a/packages/@aws-cdk/aws-events-targets/test/codebuild/integ.project-events.expected.json b/packages/@aws-cdk/aws-events-targets/test/codebuild/integ.project-events.expected.json index 472583a9f36ca..c9efaffc51134 100644 --- a/packages/@aws-cdk/aws-events-targets/test/codebuild/integ.project-events.expected.json +++ b/packages/@aws-cdk/aws-events-targets/test/codebuild/integ.project-events.expected.json @@ -210,6 +210,7 @@ "Environment": { "ComputeType": "BUILD_GENERAL1_SMALL", "Image": "aws/codebuild/standard:1.0", + "ImagePullCredentialsType": "CODEBUILD", "PrivilegedMode": false, "Type": "LINUX_CONTAINER" }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.expected.json index 326a551cf89bd..ad853ea6241c3 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.expected.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.expected.json @@ -140,6 +140,7 @@ } ], "Image": "aws/codebuild/standard:1.0", + "ImagePullCredentialsType": "CODEBUILD", "PrivilegedMode": false, "Type": "LINUX_CONTAINER" }, diff --git a/packages/@aws-cdk/pipelines/test/integ.pipeline-with-assets.expected.json b/packages/@aws-cdk/pipelines/test/integ.pipeline-with-assets.expected.json index 80159b7a0e368..365e0fa9d06ee 100644 --- a/packages/@aws-cdk/pipelines/test/integ.pipeline-with-assets.expected.json +++ b/packages/@aws-cdk/pipelines/test/integ.pipeline-with-assets.expected.json @@ -962,6 +962,7 @@ "Environment": { "ComputeType": "BUILD_GENERAL1_SMALL", "Image": "aws/codebuild/standard:4.0", + "ImagePullCredentialsType": "CODEBUILD", "PrivilegedMode": false, "Type": "LINUX_CONTAINER" }, @@ -1267,6 +1268,7 @@ "Environment": { "ComputeType": "BUILD_GENERAL1_SMALL", "Image": "aws/codebuild/standard:4.0", + "ImagePullCredentialsType": "CODEBUILD", "PrivilegedMode": false, "Type": "LINUX_CONTAINER" }, @@ -1473,6 +1475,7 @@ "Environment": { "ComputeType": "BUILD_GENERAL1_SMALL", "Image": "aws/codebuild/standard:4.0", + "ImagePullCredentialsType": "CODEBUILD", "PrivilegedMode": false, "Type": "LINUX_CONTAINER" }, @@ -1647,6 +1650,7 @@ "Environment": { "ComputeType": "BUILD_GENERAL1_SMALL", "Image": "aws/codebuild/standard:4.0", + "ImagePullCredentialsType": "CODEBUILD", "PrivilegedMode": false, "Type": "LINUX_CONTAINER" }, @@ -1677,6 +1681,7 @@ "Environment": { "ComputeType": "BUILD_GENERAL1_SMALL", "Image": "aws/codebuild/standard:4.0", + "ImagePullCredentialsType": "CODEBUILD", "PrivilegedMode": false, "Type": "LINUX_CONTAINER" }, diff --git a/packages/@aws-cdk/pipelines/test/integ.pipeline.expected.json b/packages/@aws-cdk/pipelines/test/integ.pipeline.expected.json index 2531bf13bc642..9e0541be1e17d 100644 --- a/packages/@aws-cdk/pipelines/test/integ.pipeline.expected.json +++ b/packages/@aws-cdk/pipelines/test/integ.pipeline.expected.json @@ -861,6 +861,7 @@ "Environment": { "ComputeType": "BUILD_GENERAL1_SMALL", "Image": "aws/codebuild/standard:4.0", + "ImagePullCredentialsType": "CODEBUILD", "PrivilegedMode": false, "Type": "LINUX_CONTAINER" }, @@ -1166,6 +1167,7 @@ "Environment": { "ComputeType": "BUILD_GENERAL1_SMALL", "Image": "aws/codebuild/standard:4.0", + "ImagePullCredentialsType": "CODEBUILD", "PrivilegedMode": false, "Type": "LINUX_CONTAINER" }, @@ -1372,6 +1374,7 @@ "Environment": { "ComputeType": "BUILD_GENERAL1_SMALL", "Image": "aws/codebuild/standard:4.0", + "ImagePullCredentialsType": "CODEBUILD", "PrivilegedMode": false, "Type": "LINUX_CONTAINER" }, diff --git a/packages/decdk/test/__snapshots__/synth.test.js.snap b/packages/decdk/test/__snapshots__/synth.test.js.snap index 2147d4a000dcf..80ee75c27a559 100644 --- a/packages/decdk/test/__snapshots__/synth.test.js.snap +++ b/packages/decdk/test/__snapshots__/synth.test.js.snap @@ -1638,6 +1638,7 @@ Object { "Environment": Object { "ComputeType": "BUILD_GENERAL1_SMALL", "Image": "aws/codebuild/standard:1.0", + "ImagePullCredentialsType": "CODEBUILD", "PrivilegedMode": false, "Type": "LINUX_CONTAINER", }, From f3c8b5034eb7ad1ccd9eecb4a929c8f11a2336d0 Mon Sep 17 00:00:00 2001 From: Shiv Lakshminarayan Date: Wed, 4 Nov 2020 00:11:48 -0800 Subject: [PATCH 039/314] fix(cfnspec): incorrect Route 53 health check configuration properties in CloudFormation specification (#11280) The Resource specification import v18.3.0 included unintended specification changes which modified the type of the health check config property and removed the previously modeled HealthCheckConfig type. This patch adds the fix mentioned in to restore the resource specification for Route 53 health checks: https://github.com/aws/aws-cdk/issues/11096#issuecomment-717435271 closes #11096 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../660_Route53_HealthCheck_patch.json | 152 ++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 packages/@aws-cdk/cfnspec/spec-source/660_Route53_HealthCheck_patch.json diff --git a/packages/@aws-cdk/cfnspec/spec-source/660_Route53_HealthCheck_patch.json b/packages/@aws-cdk/cfnspec/spec-source/660_Route53_HealthCheck_patch.json new file mode 100644 index 0000000000000..ea429331a6c42 --- /dev/null +++ b/packages/@aws-cdk/cfnspec/spec-source/660_Route53_HealthCheck_patch.json @@ -0,0 +1,152 @@ +{ + "patch": { + "description": "Patch Route 53 HealthCheck casing regression - mirrors cfn-lint (https://github.com/aws-cloudformation/cfn-python-lint/blob/master/src/cfnlint/data/ExtendedSpecs/all/01_spec_patch.json) ", + "operations": [ + { + "op": "add", + "path": "/ResourceTypes/AWS::Route53::HealthCheck/Properties/HealthCheckConfig/Type", + "value": "HealthCheckConfig" + }, + { + "op": "remove", + "path": "/ResourceTypes/AWS::Route53::HealthCheck/Properties/HealthCheckConfig/PrimitiveType" + }, + { + "op": "add", + "path": "/PropertyTypes/AWS::Route53::HealthCheck.AlarmIdentifier", + "value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-alarmidentifier.html", + "Properties": { + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-alarmidentifier.html#cfn-route53-healthcheck-alarmidentifier-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Region": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-alarmidentifier.html#cfn-route53-healthcheck-alarmidentifier-region", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + } + }, + { + "op": "add", + "path": "/PropertyTypes/AWS::Route53::HealthCheck.HealthCheckConfig", + "value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html", + "Properties": { + "AlarmIdentifier": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-alarmidentifier", + "Required": false, + "Type": "AlarmIdentifier", + "UpdateType": "Mutable" + }, + "ChildHealthChecks": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-childhealthchecks", + "DuplicatesAllowed": false, + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "EnableSNI": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-enablesni", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "FailureThreshold": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-failurethreshold", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "FullyQualifiedDomainName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-fullyqualifieddomainname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "HealthThreshold": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-healththreshold", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "IPAddress": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-ipaddress", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "InsufficientDataHealthStatus": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-insufficientdatahealthstatus", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable", + "Value": { + "ValueType": "Route53HealthCheckConfigHealthStatus" + } + }, + "Inverted": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-inverted", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "MeasureLatency": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-measurelatency", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Immutable" + }, + "Port": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-port", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "Regions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-regions", + "DuplicatesAllowed": false, + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "RequestInterval": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-requestinterval", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Immutable" + }, + "ResourcePath": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-resourcepath", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "SearchString": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-searchstring", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Type": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-type", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable", + "Value": { + "ValueType": "Route53HealthCheckConfigType" + } + } + } + } + } + ] + } +} \ No newline at end of file From 1bfc64948b6ac63f93f030c5a2064b3ac4376289 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Wed, 4 Nov 2020 17:18:12 +0100 Subject: [PATCH 040/314] fix(cli): `--no-previous-parameters` incorrectly skips updates (#11288) The CLI skips performing a CloudFormation deployment when it determines that the deployment will be a no-op (the CLI does this itself instead of deferring to CloudFormation because CloudFormation cannot accurately determine whether a changeset is going to be a no-op if Nested Stacks are involved, and we are looking to improve performance here). One of the aspects the CLI considers (after checking whether the templates are the same) is whether any Parameter values have changed. When `--no-previous-parameters` was passed, the code incorrectly completely ignored the existing Parameter values, which effectively led to it assuming that the "current values" on the stack were the same as the "default values" of the parameters. That meant that if a stack that was previously deployed with specific Parameter values, but then wanted to revert them to the defaults, this analysis would conclude that since the parameter values were equal to the defaults, there was "no change". In hindsight, this is obviously incorrect. The previous values should have been ignored for the purposes of determining the final paramater values and the CloudFormation API call parameters, but *not* for determining whether there is a change in parameter values between the current state of the stack and the new state of the stack. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../test/integ.function.pipenv-inline.ts | 1 + .../test/integ.function.pipenv.py27.ts | 1 + .../test/integ.function.pipenv.py38.ts | 1 + .../test/integ.function.project.ts | 1 + .../test/integ.function.py38.ts | 1 + .../integ.function.requirements.removed.ts | 1 + .../test/integ.function.vpc.ts | 1 + packages/aws-cdk/lib/api/deploy-stack.ts | 12 +-- .../aws-cdk/lib/api/util/cloudformation.ts | 85 ++++++++++++------- .../aws-cdk/test/util/cloudformation.test.ts | 35 ++++++-- 10 files changed, 95 insertions(+), 44 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv-inline.ts b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv-inline.ts index 17b17070e56e8..ad5db171f719a 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv-inline.ts +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv-inline.ts @@ -1,3 +1,4 @@ +/// !cdk-integ pragma:ignore-assets import * as path from 'path'; import { Runtime } from '@aws-cdk/aws-lambda'; import { App, CfnOutput, Stack, StackProps } from '@aws-cdk/core'; diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.py27.ts b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.py27.ts index 68f2b2f18f4b4..e97ca65f8d035 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.py27.ts +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.py27.ts @@ -1,3 +1,4 @@ +/// !cdk-integ pragma:ignore-assets import * as path from 'path'; import { Runtime } from '@aws-cdk/aws-lambda'; import { App, CfnOutput, Stack, StackProps } from '@aws-cdk/core'; diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.py38.ts b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.py38.ts index 619dd270ec206..75538599ca463 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.py38.ts +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.py38.ts @@ -1,3 +1,4 @@ +/// !cdk-integ pragma:ignore-assets import * as path from 'path'; import { Runtime } from '@aws-cdk/aws-lambda'; import { App, CfnOutput, Stack, StackProps } from '@aws-cdk/core'; diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.project.ts b/packages/@aws-cdk/aws-lambda-python/test/integ.function.project.ts index 1259ba09bdfe1..352c4d8db45c9 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.project.ts +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.project.ts @@ -1,3 +1,4 @@ +/// !cdk-integ pragma:ignore-assets import * as path from 'path'; import { Runtime } from '@aws-cdk/aws-lambda'; import { App, CfnOutput, Stack, StackProps } from '@aws-cdk/core'; diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.py38.ts b/packages/@aws-cdk/aws-lambda-python/test/integ.function.py38.ts index 22bcba46a270f..6788d56060967 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.py38.ts +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.py38.ts @@ -1,3 +1,4 @@ +/// !cdk-integ pragma:ignore-assets import * as path from 'path'; import { Runtime } from '@aws-cdk/aws-lambda'; import { App, CfnOutput, Stack, StackProps } from '@aws-cdk/core'; diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.requirements.removed.ts b/packages/@aws-cdk/aws-lambda-python/test/integ.function.requirements.removed.ts index f9588e313e39e..b53754a003778 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.requirements.removed.ts +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.requirements.removed.ts @@ -1,3 +1,4 @@ +/// !cdk-integ pragma:ignore-assets import * as fs from 'fs'; import * as os from 'os'; import * as path from 'path'; diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.vpc.ts b/packages/@aws-cdk/aws-lambda-python/test/integ.function.vpc.ts index f89fa07dc19c7..ca75399cb3b3f 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.vpc.ts +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.vpc.ts @@ -1,3 +1,4 @@ +/// !cdk-integ pragma:ignore-assets import * as path from 'path'; import { Vpc, SubnetType } from '@aws-cdk/aws-ec2'; import { Runtime } from '@aws-cdk/aws-lambda'; diff --git a/packages/aws-cdk/lib/api/deploy-stack.ts b/packages/aws-cdk/lib/api/deploy-stack.ts index 626dcce5c57e7..64ccd3dd77352 100644 --- a/packages/aws-cdk/lib/api/deploy-stack.ts +++ b/packages/aws-cdk/lib/api/deploy-stack.ts @@ -10,7 +10,7 @@ import { publishAssets } from '../util/asset-publishing'; import { contentHash } from '../util/content-hash'; import { ISDK, SdkProvider } from './aws-auth'; import { ToolkitInfo } from './toolkit-info'; -import { changeSetHasNoChanges, CloudFormationStack, StackParameters, TemplateParameters, waitForChangeSet, waitForStackDeploy, waitForStackDelete } from './util/cloudformation'; +import { changeSetHasNoChanges, CloudFormationStack, TemplateParameters, waitForChangeSet, waitForStackDeploy, waitForStackDelete } from './util/cloudformation'; import { StackActivityMonitor, StackActivityProgress } from './util/cloudformation/stack-activity-monitor'; // We need to map regions to domain suffixes, and the SDK already has a function to do this. @@ -210,10 +210,10 @@ export async function deployStack(options: DeployStackOptions): Promise { + parameterChanges: boolean): Promise { const deployName = deployStackOptions.deployName || deployStackOptions.stack.stackName; debug(`${deployName}: checking if we can skip deploy`); @@ -435,7 +435,7 @@ async function canSkipDeploy( } // Parameters have changed - if (params.changed) { + if (parameterChanges) { debug(`${deployName}: parameters have changed`); return false; } diff --git a/packages/aws-cdk/lib/api/util/cloudformation.ts b/packages/aws-cdk/lib/api/util/cloudformation.ts index 63f4558d32bcd..19db988fdc15e 100644 --- a/packages/aws-cdk/lib/api/util/cloudformation.ts +++ b/packages/aws-cdk/lib/api/util/cloudformation.ts @@ -331,6 +331,9 @@ export async function stabilizeStack(cfn: CloudFormation, stackName: string) { }); } +/** + * The set of (formal) parameters that have been declared in a template + */ export class TemplateParameters { public static fromTemplate(template: Template) { return new TemplateParameters(template.Parameters || {}); @@ -345,8 +348,8 @@ export class TemplateParameters { * Will throw if parameters without a Default value or a Previous value are not * supplied. */ - public toStackParameters(updates: Record): StackParameters { - return new StackParameters(this.params, updates); + public supplyAll(updates: Record): ParameterValues { + return new ParameterValues(this.params, updates); } /** @@ -357,44 +360,50 @@ export class TemplateParameters { * throw if parameters without a Default value or a Previous value are not * supplied. */ - public diff(updates: Record, previousValues: Record): StackParameters { - return new StackParameters(this.params, updates, previousValues); + public updateExisting(updates: Record, previousValues: Record): ParameterValues { + return new ParameterValues(this.params, updates, previousValues); } } -export class StackParameters { - /** - * The CloudFormation parameters to pass to the CreateStack or UpdateStack API - */ +/** + * The set of parameters we're going to pass to a Stack + */ +export class ParameterValues { + public readonly values: Record = {}; public readonly apiParameters: CloudFormation.Parameter[] = []; - private _changes = false; - constructor( - private readonly params: Record, + private readonly formalParams: Record, updates: Record, previousValues: Record = {}) { const missingRequired = new Array(); - for (const [key, param] of Object.entries(this.params)) { - // If any of the parameters are SSM parameters, they will always lead to a change - if (param.Type.startsWith('AWS::SSM::Parameter::')) { - this._changes = true; - } - - if (key in updates && updates[key] !== undefined) { + for (const [key, formalParam] of Object.entries(this.formalParams)) { + // Check updates first, then use the previous value (if available), then use + // the default (if available). + // + // If we don't find a parameter value using any of these methods, then that's an error. + const updatedValue = updates[key]; + if (updatedValue !== undefined) { + this.values[key] = updatedValue; this.apiParameters.push({ ParameterKey: key, ParameterValue: updates[key] }); + continue; + } - // If the updated value is different than the current value, this will lead to a change - if (!(key in previousValues) || updates[key] !== previousValues[key]) { - this._changes = true; - } - } else if (key in previousValues) { + if (key in previousValues) { + this.values[key] = previousValues[key]; this.apiParameters.push({ ParameterKey: key, UsePreviousValue: true }); - } else if (param.Default === undefined) { - missingRequired.push(key); + continue; } + + if (formalParam.Default !== undefined) { + this.values[key] = formalParam.Default; + continue; + } + + // Oh no + missingRequired.push(key); } if (missingRequired.length > 0) { @@ -404,9 +413,10 @@ export class StackParameters { // Just append all supplied overrides that aren't really expected (this // will fail CFN but maybe people made typos that they want to be notified // of) - const unknownParam = ([key, _]: [string, any]) => this.params[key] === undefined; + const unknownParam = ([key, _]: [string, any]) => this.formalParams[key] === undefined; const hasValue = ([_, value]: [string, any]) => !!value; for (const [key, value] of Object.entries(updates).filter(unknownParam).filter(hasValue)) { + this.values[key] = value!; this.apiParameters.push({ ParameterKey: key, ParameterValue: value }); } } @@ -414,7 +424,24 @@ export class StackParameters { /** * Whether this set of parameter updates will change the actual stack values */ - public get changed() { - return this._changes; + public hasChanges(currentValues: Record): boolean { + // If any of the parameters are SSM parameters, deploying must always happen + // because we can't predict what the values will be. + if (Object.values(this.formalParams).some(p => p.Type.startsWith('AWS::SSM::Parameter::'))) { + return true; + } + + // Otherwise we're dirty if: + // - any of the existing values are removed, or changed + if (Object.entries(currentValues).some(([key, value]) => !(key in this.values) || value !== this.values[key])) { + return true; + } + + // - any of the values we're setting are new + if (Object.keys(this.values).some(key => !(key in currentValues))) { + return true; + } + + return false; } -} \ No newline at end of file +} diff --git a/packages/aws-cdk/test/util/cloudformation.test.ts b/packages/aws-cdk/test/util/cloudformation.test.ts index ca7b2afc570ca..c8c034ba23f67 100644 --- a/packages/aws-cdk/test/util/cloudformation.test.ts +++ b/packages/aws-cdk/test/util/cloudformation.test.ts @@ -55,10 +55,10 @@ test('no default, yes prev, no override => use previous', () => { }); }); -test('default, no prev, no override => empty param set', () => { +test('default, no prev, no override => empty param set (and obviously changes to be applied)', () => { expect(makeParams(true, false, false)).toEqual({ apiParameters: [], - changed: false, + changed: true, }); }); @@ -78,12 +78,13 @@ test('if a parameter is retrieved from SSM, the parameters always count as chang }, }, }); + const oldValues = { Foo: '/Some/Key' }; // If we don't pass a new value - expect(params.diff({}, { Foo: '/Some/Key' }).changed).toEqual(true); + expect(params.updateExisting({}, oldValues).hasChanges(oldValues)).toEqual(true); // If we do pass a new value but it's the same as the old one - expect(params.diff({ Foo: '/Some/Key' }, { Foo: '/Some/Key' }).changed).toEqual(true); + expect(params.updateExisting({ Foo: '/Some/Key' }, oldValues).hasChanges(oldValues)).toEqual(true); }); test('empty string is a valid update value', () => { @@ -93,7 +94,7 @@ test('empty string is a valid update value', () => { }, }); - expect(params.diff({ Foo: '' }, { Foo: 'ThisIsOld' }).apiParameters).toEqual([ + expect(params.updateExisting({ Foo: '' }, { Foo: 'ThisIsOld' }).apiParameters).toEqual([ { ParameterKey: 'Foo', ParameterValue: '' }, ]); }); @@ -108,11 +109,27 @@ test('unknown parameter in overrides, pass it anyway', () => { }, }); - expect(params.diff({ Bar: 'Bar' }, {}).apiParameters).toEqual([ + expect(params.updateExisting({ Bar: 'Bar' }, {}).apiParameters).toEqual([ { ParameterKey: 'Bar', ParameterValue: 'Bar' }, ]); }); +test('if an unsupplied parameter reverts to its default, it can still be dirty', () => { + // GIVEN + const templateParams = TemplateParameters.fromTemplate({ + Parameters: { + Foo: { Type: 'String', Default: 'Foo' }, + }, + }); + + // WHEN + const stackParams = templateParams.supplyAll({}); + + // THEN + expect(stackParams.hasChanges({ Foo: 'NonStandard' })).toEqual(true); + expect(stackParams.hasChanges({ Foo: 'Foo' })).toEqual(false); +}); + function makeParams(defaultValue: boolean, hasPrevValue: boolean, override: boolean) { const params = TemplateParameters.fromTemplate({ Parameters: { @@ -123,7 +140,7 @@ function makeParams(defaultValue: boolean, hasPrevValue: boolean, override: bool }, }); const prevParams: Record = hasPrevValue ? { [PARAM]: 'Foo' } : {}; - const stackParams = params.diff({ [PARAM]: override ? OVERRIDE : undefined }, prevParams); + const stackParams = params.updateExisting({ [PARAM]: override ? OVERRIDE : undefined }, prevParams); - return { apiParameters: stackParams.apiParameters, changed: stackParams.changed }; -} \ No newline at end of file + return { apiParameters: stackParams.apiParameters, changed: stackParams.hasChanges(prevParams) }; +} From 5db8e8018d2b8304025b7e61178c7a747c778a78 Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Wed, 4 Nov 2020 16:49:07 +0000 Subject: [PATCH 041/314] fix(pipelines): asset stage can't support more than 50 assets (#11284) CodePipelines has a hard limit of 50 actions per stage. Currently, all asset publishing actions are assigned to a single stage, limiting pipelines to 50 total assets. This change dynamically creates new stages as necessary to allow expansion beyond 50 assets. This should allow for hundreds (or thousands) of assets before hitting the 50 stages per pipeline hard limit. fixes #9353 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/pipelines/lib/pipeline.ts | 56 ++++---- .../pipelines/test/pipeline-assets.test.ts | 133 +++++++++++++++++- 2 files changed, 159 insertions(+), 30 deletions(-) diff --git a/packages/@aws-cdk/pipelines/lib/pipeline.ts b/packages/@aws-cdk/pipelines/lib/pipeline.ts index cf9445681d200..6e39f92b7582d 100644 --- a/packages/@aws-cdk/pipelines/lib/pipeline.ts +++ b/packages/@aws-cdk/pipelines/lib/pipeline.ts @@ -2,7 +2,7 @@ import * as path from 'path'; import * as codepipeline from '@aws-cdk/aws-codepipeline'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as iam from '@aws-cdk/aws-iam'; -import { Annotations, App, CfnOutput, PhysicalName, Stack, Stage, Aspects } from '@aws-cdk/core'; +import { Annotations, App, CfnOutput, PhysicalName, Stack, Stage } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { AssetType, DeployCdkStackAction, PublishAssetsAction, UpdatePipelineAction } from './actions'; import { appOf, assemblyBuilderOf } from './private/construct-internals'; @@ -212,8 +212,6 @@ export class CdkPipeline extends CoreConstruct { vpc: props.vpc, subnetSelection: props.subnetSelection, }); - - Aspects.of(this).add({ visit: () => this._assets.removeAssetsStageIfEmpty() }); } /** @@ -325,10 +323,10 @@ export class CdkPipeline extends CoreConstruct { if (depAction === undefined) { Annotations.of(this).addWarning(`Stack '${stackAction.stackName}' depends on stack ` + - `'${depId}', but that dependency is not deployed through the pipeline!`); + `'${depId}', but that dependency is not deployed through the pipeline!`); } else if (!(depAction.executeRunOrder < stackAction.prepareRunOrder)) { yield `Stack '${stackAction.stackName}' depends on stack ` + - `'${depAction.stackName}', but is deployed before it in the pipeline!`; + `'${depAction.stackName}', but is deployed before it in the pipeline!`; } } } @@ -366,23 +364,29 @@ interface AssetPublishingProps { * Add appropriate publishing actions to the asset publishing stage */ class AssetPublishing extends CoreConstruct { + // CodePipelines has a hard limit of 50 actions per stage. See https://github.com/aws/aws-cdk/issues/9353 + private readonly MAX_PUBLISHERS_PER_STAGE = 50; + private readonly publishers: Record = {}; private readonly assetRoles: Record = {}; private readonly myCxAsmRoot: string; - private readonly stage: codepipeline.IStage; + private readonly lastStageBeforePublishing?: codepipeline.IStage; + private readonly stages: codepipeline.IStage[] = []; private readonly pipeline: codepipeline.Pipeline; - private _fileAssetCtr = 1; - private _dockerAssetCtr = 1; + + private _fileAssetCtr = 0; + private _dockerAssetCtr = 0; constructor(scope: Construct, id: string, private readonly props: AssetPublishingProps) { super(scope, id); this.myCxAsmRoot = path.resolve(assemblyBuilderOf(appOf(this)).outdir); - // We MUST add the Stage immediately here, otherwise it will be in the wrong place - // in the pipeline! - this.stage = this.props.pipeline.addStage({ stageName: 'Assets' }); this.pipeline = this.props.pipeline; + // Hacks to get access to the innards of Pipeline + const stages: codepipeline.IStage[] = (this.props.pipeline as any)._stages; + // Any asset publishing stages will be added directly after the last stage that currently exists. + this.lastStageBeforePublishing = stages.slice(-1)[0]; } /** @@ -410,13 +414,23 @@ class AssetPublishing extends CoreConstruct { let action = this.publishers[command.assetId]; if (!action) { + // Dynamically create new stages as needed, with `MAX_PUBLISHERS_PER_STAGE` assets per stage. + const stageIndex = Math.floor((this._fileAssetCtr + this._dockerAssetCtr) / this.MAX_PUBLISHERS_PER_STAGE); + if (stageIndex >= this.stages.length) { + const previousStage = this.stages.slice(-1)[0] ?? this.lastStageBeforePublishing; + this.stages.push(this.pipeline.addStage({ + stageName: `Assets${stageIndex > 0 ? stageIndex + 1 : ''}`, + placement: { justAfter: previousStage }, + })); + } + // The asset ID would be a logical candidate for the construct path and project names, but if the asset // changes it leads to recreation of a number of Role/Policy/Project resources which is slower than // necessary. Number sequentially instead. // // FIXME: The ultimate best solution is probably to generate a single Project per asset type // and reuse that for all assets. - const id = command.assetType === AssetType.FILE ? `FileAsset${this._fileAssetCtr++}` : `DockerAsset${this._dockerAssetCtr++}`; + const id = command.assetType === AssetType.FILE ? `FileAsset${++this._fileAssetCtr}` : `DockerAsset${++this._dockerAssetCtr}`; // NOTE: It's important that asset changes don't force a pipeline self-mutation. // This can cause an infinite loop of updates (see https://github.com/aws/aws-cdk/issues/9080). @@ -430,28 +444,12 @@ class AssetPublishing extends CoreConstruct { vpc: this.props.vpc, subnetSelection: this.props.subnetSelection, }); - this.stage.addAction(action); + this.stages[stageIndex].addAction(action); } action.addPublishCommand(relativePath, command.assetSelector); } - /** - * Remove the Assets stage if it turns out we didn't add any Assets to publish - */ - public removeAssetsStageIfEmpty() { - if (Object.keys(this.publishers).length === 0) { - // Hacks to get access to innards of Pipeline - // Modify 'stages' array in-place to remove Assets stage if empty - const stages: codepipeline.IStage[] = (this.props.pipeline as any)._stages; - - const ix = stages.indexOf(this.stage); - if (ix > -1) { - stages.splice(ix, 1); - } - } - } - /** * This role is used by both the CodePipeline build action and related CodeBuild project. Consolidating these two * roles into one, and re-using across all assets, saves significant size of the final synthesized output. diff --git a/packages/@aws-cdk/pipelines/test/pipeline-assets.test.ts b/packages/@aws-cdk/pipelines/test/pipeline-assets.test.ts index 2b4facf654fc6..c10906e7ad7bb 100644 --- a/packages/@aws-cdk/pipelines/test/pipeline-assets.test.ts +++ b/packages/@aws-cdk/pipelines/test/pipeline-assets.test.ts @@ -1,12 +1,13 @@ import * as path from 'path'; import { arrayWith, deepObjectLike, encodedJson, notMatching, objectLike, stringLike } from '@aws-cdk/assert'; import '@aws-cdk/assert/jest'; +import * as cp from '@aws-cdk/aws-codepipeline'; import * as ecr_assets from '@aws-cdk/aws-ecr-assets'; import * as s3_assets from '@aws-cdk/aws-s3-assets'; import { Stack, Stage, StageProps } from '@aws-cdk/core'; import { Construct } from 'constructs'; import * as cdkp from '../lib'; -import { BucketStack, PIPELINE_ENV, TestApp, TestGitHubNpmPipeline } from './testutil'; +import { BucketStack, PIPELINE_ENV, TestApp, TestGitHubAction, TestGitHubNpmPipeline } from './testutil'; const FILE_ASSET_SOURCE_HASH = '8289faf53c7da377bb2b90615999171adef5e1d8f6b88810e5fef75e6ca09ba5'; @@ -36,6 +37,110 @@ test('no assets stage if the application has no assets', () => { }); }); +describe('asset stage placement', () => { + test('assets stage comes before any user-defined stages', () => { + // WHEN + pipeline.addApplicationStage(new FileAssetApp(app, 'App')); + + // THEN + expect(pipelineStack).toHaveResourceLike('AWS::CodePipeline::Pipeline', { + Stages: [ + objectLike({ Name: 'Source' }), + objectLike({ Name: 'Build' }), + objectLike({ Name: 'UpdatePipeline' }), + objectLike({ Name: 'Assets' }), + objectLike({ Name: 'App' }), + ], + }); + }); + + test('assets stage inserted after existing pipeline actions', () => { + // WHEN + const sourceArtifact = new cp.Artifact(); + const cloudAssemblyArtifact = new cp.Artifact(); + const existingCodePipeline = new cp.Pipeline(pipelineStack, 'CodePipeline', { + stages: [ + { + stageName: 'CustomSource', + actions: [new TestGitHubAction(sourceArtifact)], + }, + { + stageName: 'CustomBuild', + actions: [cdkp.SimpleSynthAction.standardNpmSynth({ sourceArtifact, cloudAssemblyArtifact })], + }, + ], + }); + pipeline = new cdkp.CdkPipeline(pipelineStack, 'CdkEmptyPipeline', { + cloudAssemblyArtifact: cloudAssemblyArtifact, + selfMutating: false, + codePipeline: existingCodePipeline, + // No source/build actions + }); + pipeline.addApplicationStage(new FileAssetApp(app, 'App')); + + // THEN + expect(pipelineStack).toHaveResourceLike('AWS::CodePipeline::Pipeline', { + Stages: [ + objectLike({ Name: 'CustomSource' }), + objectLike({ Name: 'CustomBuild' }), + objectLike({ Name: 'Assets' }), + objectLike({ Name: 'App' }), + ], + }); + }); + + test('up to 50 assets fit in a single stage', () => { + // WHEN + pipeline.addApplicationStage(new MegaAssetsApp(app, 'App', { numAssets: 50 })); + + // THEN + expect(pipelineStack).toHaveResourceLike('AWS::CodePipeline::Pipeline', { + Stages: [ + objectLike({ Name: 'Source' }), + objectLike({ Name: 'Build' }), + objectLike({ Name: 'UpdatePipeline' }), + objectLike({ Name: 'Assets' }), + objectLike({ Name: 'App' }), + ], + }); + }); + + test('51 assets triggers a second stage', () => { + // WHEN + pipeline.addApplicationStage(new MegaAssetsApp(app, 'App', { numAssets: 51 })); + + // THEN + expect(pipelineStack).toHaveResourceLike('AWS::CodePipeline::Pipeline', { + Stages: [ + objectLike({ Name: 'Source' }), + objectLike({ Name: 'Build' }), + objectLike({ Name: 'UpdatePipeline' }), + objectLike({ Name: 'Assets' }), + objectLike({ Name: 'Assets2' }), + objectLike({ Name: 'App' }), + ], + }); + }); + + test('101 assets triggers a third stage', () => { + // WHEN + pipeline.addApplicationStage(new MegaAssetsApp(app, 'App', { numAssets: 101 })); + + // THEN + expect(pipelineStack).toHaveResourceLike('AWS::CodePipeline::Pipeline', { + Stages: [ + objectLike({ Name: 'Source' }), + objectLike({ Name: 'Build' }), + objectLike({ Name: 'UpdatePipeline' }), + objectLike({ Name: 'Assets' }), + objectLike({ Name: 'Assets2' }), + objectLike({ Name: 'Assets3' }), + objectLike({ Name: 'App' }), + ], + }); + }); +}); + test('command line properly locates assets in subassembly', () => { // WHEN pipeline.addApplicationStage(new FileAssetApp(app, 'FileAssetApp')); @@ -313,6 +418,32 @@ class DockerAssetApp extends Stage { } } +interface MegaAssetsAppProps extends StageProps { + readonly numAssets: number; +} + +// Creates a mix of file and image assets, up to a specified count +class MegaAssetsApp extends Stage { + constructor(scope: Construct, id: string, props: MegaAssetsAppProps) { + super(scope, id, props); + const stack = new Stack(this, 'Stack'); + + let assetCount = 0; + for (; assetCount < props.numAssets / 2; assetCount++) { + new s3_assets.Asset(stack, `Asset${assetCount}`, { + path: path.join(__dirname, 'test-file-asset.txt'), + assetHash: `FileAsset${assetCount}`, + }); + } + for (; assetCount < props.numAssets; assetCount++) { + new ecr_assets.DockerImageAsset(stack, `Asset${assetCount}`, { + directory: path.join(__dirname, 'test-docker-asset'), + extraHash: `FileAsset${assetCount}`, + }); + } + } +} + function expectedAssetRolePolicy(assumeRolePattern: string, attachedRole: string) { return { PolicyDocument: { From 85915a4eff6c2dc40d8989dd8c7b7f52d43a711c Mon Sep 17 00:00:00 2001 From: Elad Ben-Israel Date: Wed, 4 Nov 2020 21:55:32 +0200 Subject: [PATCH 042/314] chore: multiple release branches without merge conflicts (#11287) As we prepare for 2.0, we need to release the CDK concurrently in multiple version lines (1.x and 2.0.0-alpha.x). In order to avoid merge conflicts of `lerna.json` and `CHANGELOG.md` between the v1 and v2 branches, we extracted the version number from `lerna.json` to `version.vNNN.json` and changelog to `CHANGELOG.vNNN.json` (1.0 is still CHANGELOG.md because it is tracked externally). A new file called `release.json` has been introduced and includes *static* information about which version line this branch serves. This allows us to avoid merge conflicts caused by version bumps between release branches. This change also cleans up some of the scripts related to versioning and bumps. The main bump script is now implemented in `scripts/bump.js` and interacts with `standard-version` as a library instead of through the CLI. To that end, the `.versionrc.json` file was also removed. See CONTRIBUTING for more details about how this works. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .gitignore | 2 + .versionrc.json | 5 - CONTRIBUTING.md | 71 +++++++--- bump.sh | 19 +-- lerna.json | 5 +- pack.sh | 17 +-- package.json | 3 +- packages/aws-cdk/CONTRIBUTING.md | 6 +- release.json | 4 + scripts/align-version.js | 5 +- scripts/align-version.sh | 2 +- scripts/bump-candidate.sh | 11 +- scripts/bump.js | 49 +++++++ scripts/changelog-experimental-fix.sh | 11 ++ scripts/get-version-marker.js | 13 -- scripts/get-version.js | 18 --- scripts/resolve-version-lib.js | 76 +++++++++++ scripts/resolve-version.js | 4 + scripts/script-tests/.gitignore | 8 ++ scripts/script-tests/README.md | 3 + scripts/script-tests/package.json | 15 +++ scripts/script-tests/resolve-version.test.js | 132 +++++++++++++++++++ tools/pkglint/lib/rules.ts | 11 +- version.v1.json | 3 + 24 files changed, 391 insertions(+), 102 deletions(-) delete mode 100644 .versionrc.json create mode 100644 release.json create mode 100755 scripts/bump.js create mode 100755 scripts/changelog-experimental-fix.sh delete mode 100644 scripts/get-version-marker.js delete mode 100644 scripts/get-version.js create mode 100755 scripts/resolve-version-lib.js create mode 100755 scripts/resolve-version.js create mode 100644 scripts/script-tests/.gitignore create mode 100644 scripts/script-tests/README.md create mode 100644 scripts/script-tests/package.json create mode 100644 scripts/script-tests/resolve-version.test.js create mode 100644 version.v1.json diff --git a/.gitignore b/.gitignore index 28ed33d0064b2..03b7512a00c05 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,5 @@ yarn-error.log # Cloud9 .c9 + +/.versionrc.json diff --git a/.versionrc.json b/.versionrc.json deleted file mode 100644 index 3178955551057..0000000000000 --- a/.versionrc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "skip": { "tag": true }, - "packageFiles": [ { "filename": "lerna.json", "type": "json" } ], - "bumpFiles": [ { "filename": "lerna.json", "type": "json" } ] -} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0c5137c77a4a5..7ff39118418be 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -779,24 +779,59 @@ CDK](https://github.com/aws/aws-cdk/issues/3398) we will either remove the legacy behavior or flip the logic for all these features and then reset the `FEATURE_FLAGS` map for the next cycle. -### Versioning - -All `package.json` files in this repo use a stable marker version of `0.0.0`. -This means that when you declare dependencies, you should always use `0.0.0`. -This makes it easier for us to bump a new version (the `bump.sh` script will -just update the central version and create a CHANGELOG entry) and also reduces -the chance of merge conflicts after a new version is released. - -Additional scripts that take part in the versioning mechanism: - -- `scripts/get-version.js` can be used to obtain the actual version of the repo. - You can use either from JavaScript code by `require('./scripts/get-version')` - or from a shell script `node -p "require('./scripts/get-version')"`. -- `scripts/get-version-marker.js` returns `0.0.0` and used to DRY the version - marker. -- `scripts/align-version.sh` and `scripts/align-version.js` are used to align - all package.json files in the repo to the official version. This script is - invoked in CI builds and should not be used inside a development environment. +### Versioning and Release + +The `release.json` file at the root of the repo determines which release line +this branch belongs to. + +```js +{ + "majorVersion": "1" | "2", + "releaseType": "stable" | "alpha" | "rc" +} +``` + +To reduce merge conflicts in automatic merges between version branches, the +current version number is stored under `version.vNN.json` (where `NN` is +`majorVersion`) and changelogs are stored under `CHANGELOG.NN.md` (for +historical reasons, the changelog for 1.x is under `CHANGELOG.md`). When we +fork to a new release branch (e.g. `main-v2`), we will update `release.json` in +this branch to reflect the new version line, and this information will be used +to determine how releases are cut. + +The actual `version` field in all `package.json` files should always be `0.0.0`. +This means that local development builds will use version `0.0.0` instead of the +official version from the version file. + +#### `./bump.sh` + +This script uses [standard-version] to update the version in `version.vNN.json` +to the next version. By default it will perform a **minor** bump, but `./bump.sh +patch` can be used to perform a patch release if that's needed. + +This script will also update the relevant changelog file. + +[standard-version]: https://github.com/conventional-changelog/standard-version + +#### `scripts/resolve-version.js` + +The script evaluates evaluates the configuration in `release.json` exports an +object like this: + +```js +{ + version: '2.0.0-alpha.1', // the current version + versionFile: 'version.v2.json', // the version file + changelogFile: 'CHANGELOG.v2.md', // changelog file name + prerelease: 'alpha', // prerelease tag (undefined for stable) + marker: '0.0.0' // version marker in package.json files +} +``` + +#### scripts/align-version.sh + +In official builds, the `scripts/align-version.sh` is used to update all +`package.json` files based on the version from `version.vNN.json`. ## Troubleshooting diff --git a/bump.sh b/bump.sh index 028779e5a748d..750d452da496d 100755 --- a/bump.sh +++ b/bump.sh @@ -13,21 +13,4 @@ # # -------------------------------------------------------------------------------------------------- set -euo pipefail -version=${1:-minor} - -echo "Starting ${version} version bump" - -# /bin/bash ./install.sh - -# Generate CHANGELOG and create a commit (see .versionrc.json) -npx standard-version --release-as ${version} - -# I am sorry. -# -# I've gone diving through the code of `conventional-changelog` to see if there -# was a way to configure the string and ultimately I decided that a 'sed' was the simpler -# way to go. -sed -i.tmp -e 's/BREAKING CHANGES$/BREAKING CHANGES TO EXPERIMENTAL FEATURES/' CHANGELOG.md -rm CHANGELOG.md.tmp -git add CHANGELOG.md -git commit --amend --no-edit +./scripts/bump.js ${1:-minor} diff --git a/lerna.json b/lerna.json index 16f32cc984c13..0fcae573a32ae 100644 --- a/lerna.json +++ b/lerna.json @@ -8,8 +8,9 @@ "packages/@aws-cdk-containers/*", "packages/@monocdk-experiment/*", "packages/@aws-cdk/*/lambda-packages/*", - "tools/*" + "tools/*", + "scripts/script-tests" ], "rejectCycles": "true", - "version": "1.71.0" + "version": "0.0.0" } diff --git a/pack.sh b/pack.sh index 02b901f141273..a61a461ce9f3e 100755 --- a/pack.sh +++ b/pack.sh @@ -7,6 +7,11 @@ export PATH=$PWD/node_modules/.bin:$PATH export NODE_OPTIONS="--max-old-space-size=4096 ${NODE_OPTIONS:-}" root=$PWD +# Get version and changelog file name (these require that .versionrc.json would have been generated) +version=$(node -p "require('./scripts/resolve-version').version") +changelog_file=$(node -p "require('./scripts/resolve-version').changelogFile") +marker=$(node -p "require('./scripts/resolve-version').marker") + PACMAK=${PACMAK:-jsii-pacmak} ROSETTA=${ROSETTA:-jsii-rosetta} TMPDIR=${TMPDIR:-$(dirname $(mktemp -u))} @@ -57,15 +62,6 @@ done # Remove a JSII aggregate POM that may have snuk past rm -rf dist/java/software/amazon/jsii -# Get version -version="$(node -p "require('./scripts/get-version')")" - -# Ensure we don't publish anything beyond 1.x for now -if [[ ! "${version}" == "1."* ]]; then - echo "ERROR: accidentally releasing a major version? Expecting repo version to start with '1.' but got '${version}'" - exit 1 -fi - # Get commit from CodePipeline (or git, if we are in CodeBuild) # If CODEBUILD_RESOLVED_SOURCE_VERSION is not defined (i.e. local # build or CodePipeline build), use the HEAD commit hash). @@ -83,12 +79,11 @@ cat > ${distdir}/build.json < { + console.error(err.stack); + process.exit(1); +}); \ No newline at end of file diff --git a/scripts/changelog-experimental-fix.sh b/scripts/changelog-experimental-fix.sh new file mode 100755 index 0000000000000..15284ac0c69bc --- /dev/null +++ b/scripts/changelog-experimental-fix.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -euo pipefail +changelog="${1:-}" + +if [ -z "${changelog}" ]; then + echo "Usage: $0 CHANGELOG.md" + exit 1 +fi + +sed -i.tmp -e 's/BREAKING CHANGES$/BREAKING CHANGES TO EXPERIMENTAL FEATURES/' ${changelog} +rm ${changelog}.tmp diff --git a/scripts/get-version-marker.js b/scripts/get-version-marker.js deleted file mode 100644 index e5f8c49806a67..0000000000000 --- a/scripts/get-version-marker.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Returns the version marker used to indicate this is a local dependency. - * - * Usage: - * - * const version = require('./get-version-marker'); - * - * Or from the command line: - * - * node -p require('./get-version-marker') - * - */ -module.exports = '0.0.0'; diff --git a/scripts/get-version.js b/scripts/get-version.js deleted file mode 100644 index 9e6972582c427..0000000000000 --- a/scripts/get-version.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Returns the current repo version. - * - * Usage: - * - * const version = require('./get-version'); - * - * Or from the command line: - * - * node -p require('./get-version') - * - */ -const versionFile = require('../.versionrc.json').packageFiles[0].filename; -if (!versionFile) { - throw new Error(`unable to determine version filename from .versionrc.json at the root of the repo`); -} - -module.exports = require(`../${versionFile}`).version; diff --git a/scripts/resolve-version-lib.js b/scripts/resolve-version-lib.js new file mode 100755 index 0000000000000..bc14d278d1a5e --- /dev/null +++ b/scripts/resolve-version-lib.js @@ -0,0 +1,76 @@ +#!/usr/bin/env node +const path = require('path'); +const fs = require('fs'); + +//============================================================= +// UNIT TESTS: tools/script-tests/test/resolve-version.test.js +//============================================================= + +function resolveVersion(rootdir) { + const ALLOWED_RELEASE_TYPES = [ 'alpha', 'rc', 'stable' ]; + const MIN_MAJOR = 1, MAX_MAJOR = 2; // extra safety: update to allow new major versions + + // + // parse release.json + // + const releaseFile = path.join(rootdir, 'release.json'); + const releaseConfig = require(releaseFile); + const majorVersion = releaseConfig.majorVersion; + const releaseType = releaseConfig.releaseType; + if (!majorVersion) { throw new Error(`"majorVersion"" must be defined in ${releaseFile}`); } + if (!releaseType) { throw new Error(`"releaseType" must be defined in ${releaseFile}`); } + if (typeof(majorVersion) !== 'number') { throw new Error(`majorVersion=${majorVersion} must be a number`); } + if (majorVersion < MIN_MAJOR || majorVersion > MAX_MAJOR) { throw new Error(`majorVersion=${majorVersion} is an unsupported major version (should be between ${MIN_MAJOR} and ${MAX_MAJOR})`); } + if (!ALLOWED_RELEASE_TYPES.includes(releaseType)) { throw new Error(`releaseType=${releaseType} is not allowed. Allowed values: ${ALLOWED_RELEASE_TYPES.join(',')}`); } + + // + // resolve and check that we have a version file + // + + const versionFile = `version.v${majorVersion}.json`; + const versionFilePath = path.join(rootdir, versionFile); + if (!fs.existsSync(versionFilePath)) { + throw new Error(`unable to find version file ${versionFile} for major version ${majorVersion}`); + } + + // + // validate that current version matches the requirements + // + + const currentVersion = require(versionFilePath).version; + console.error(`current version: ${currentVersion}`); + if (!currentVersion.startsWith(`${majorVersion}.`)) { + throw new Error(`current version "${currentVersion}" does not use the expected major version ${majorVersion}`); + } + if (releaseType === 'stable') { + if (currentVersion.includes('-')) { + throw new Error(`found pre-release tag in version specified in ${versionFile} is ${currentVersion} but "releaseType"" is set to "stable"`); + } + } else { + if (!currentVersion.includes(`-${releaseType}.`)) { + throw new Error(`could not find pre-release tag "${releaseType}" in current version "${currentVersion}" defined in ${versionFile}`); + } + } + + // + // determine changelog file name + // + + const changelogFile = majorVersion === '1' + ? 'CHANGELOG.md' + : `CHANGELOG.v${majorVersion}.md`; + + // + // export all of it + // + + return { + version: currentVersion, + versionFile: versionFile, + changelogFile: changelogFile, + prerelease: releaseType !== 'stable' ? releaseType : undefined, + marker: '0.0.0', + }; +} + +module.exports = resolveVersion; \ No newline at end of file diff --git a/scripts/resolve-version.js b/scripts/resolve-version.js new file mode 100755 index 0000000000000..0f101333d95be --- /dev/null +++ b/scripts/resolve-version.js @@ -0,0 +1,4 @@ +#!/usr/bin/env node +const ROOTDIR = path.resolve(__dirname, '..'); +const resolveVersion = require('./resolve-version-lib'); +module.exports = resolveVersion(ROOTDIR); diff --git a/scripts/script-tests/.gitignore b/scripts/script-tests/.gitignore new file mode 100644 index 0000000000000..dfd5365951031 --- /dev/null +++ b/scripts/script-tests/.gitignore @@ -0,0 +1,8 @@ + +.LAST_BUILD +*.snk +junit.xml +.nyc_output +coverage +nyc.config.js +!.eslintrc.js \ No newline at end of file diff --git a/scripts/script-tests/README.md b/scripts/script-tests/README.md new file mode 100644 index 0000000000000..a819fff580b1e --- /dev/null +++ b/scripts/script-tests/README.md @@ -0,0 +1,3 @@ +# script tests + +This directory includes tests for scripts under `./scripts`. \ No newline at end of file diff --git a/scripts/script-tests/package.json b/scripts/script-tests/package.json new file mode 100644 index 0000000000000..2c6d0ff48e94a --- /dev/null +++ b/scripts/script-tests/package.json @@ -0,0 +1,15 @@ +{ + "name": "script-tests", + "private": true, + "version": "0.0.0", + "description": "various tests for development and build scripts", + "scripts": { + "build": "echo ok", + "test": "jest", + "build+test": "npm run build && npm test", + "build+test+package": "npm run build+test" + }, + "devDependencies": { + "jest": "^26.6.2" + } +} diff --git a/scripts/script-tests/resolve-version.test.js b/scripts/script-tests/resolve-version.test.js new file mode 100644 index 0000000000000..075f768fe6801 --- /dev/null +++ b/scripts/script-tests/resolve-version.test.js @@ -0,0 +1,132 @@ +const fs = require('fs'); +const os = require('os'); +const path = require('path'); +const resolveVersion = require('../resolve-version-lib'); + +beforeAll(() => spyOn(console, 'error')); + +happy({ + name: 'stable release', + inputs: { + 'release.json': { majorVersion: 2, releaseType: 'stable' }, + 'version.v2.json': { version: '2.1.0' }, + }, + expected: { + changelogFile: 'CHANGELOG.v2.md', + marker: '0.0.0', + prerelease: undefined, + version: '2.1.0', + versionFile: 'version.v2.json' + } +}); + +happy({ + name: 'alpha releases', + inputs: { + 'release.json': { majorVersion: 2, releaseType: 'alpha' }, + 'version.v2.json': { version: '2.1.0-alpha.0' }, + }, + expected: { + changelogFile: 'CHANGELOG.v2.md', + marker: '0.0.0', + prerelease: 'alpha', + version: '2.1.0-alpha.0', + versionFile: 'version.v2.json' + } +}); + +happy({ + name: 'rc releases', + inputs: { + 'release.json': { majorVersion: 2, releaseType: 'rc' }, + 'version.v2.json': { version: '2.1.0-rc.0' }, + }, + expected: { + changelogFile: 'CHANGELOG.v2.md', + marker: '0.0.0', + prerelease: 'rc', + version: '2.1.0-rc.0', + versionFile: 'version.v2.json' + } +}); + +failure({ + name: 'invalid release type', + inputs: { 'release.json': { majorVersion: 2, releaseType: 'build' } }, + expected: 'releaseType=build is not allowed. Allowed values: alpha,rc,stable' +}); + +failure({ + name: 'invalid major version (less then min)', + inputs: { 'release.json': { majorVersion: -1, releaseType: 'rc' } }, + expected: 'majorVersion=-1 is an unsupported major version (should be between 1 and 2)' +}); + +failure({ + name: 'invalid major version (over max)', + inputs: { 'release.json': { majorVersion: 3, releaseType: 'rc' } }, + expected: 'majorVersion=3 is an unsupported major version (should be between 1 and 2)' +}); + +failure({ + name: 'invalid major version (non-number)', + inputs: { 'release.json': { majorVersion: '2', releaseType: 'rc' } }, + expected: 'majorVersion=2 must be a number' +}); + +failure({ + name: 'no version file', + inputs: { 'release.json': { majorVersion: 2, releaseType: 'alpha' } }, + expected: 'unable to find version file version.v2.json for major version 2' +}); + +failure({ + name: 'actual version not the right major', + inputs: { + 'release.json': { majorVersion: 1, releaseType: 'stable' }, + 'version.v1.json': { version: '2.0.0' } + }, + expected: 'current version "2.0.0" does not use the expected major version 1' +}); + +failure({ + name: 'actual version not the right pre-release', + inputs: { + 'release.json': { majorVersion: 2, releaseType: 'alpha' }, + 'version.v2.json': { version: '2.0.0-rc.0' } + }, + expected: 'could not find pre-release tag "alpha" in current version "2.0.0-rc.0" defined in version.v2.json' +}); + +failure({ + name: 'actual version not the right pre-release (stable)', + inputs: { + 'release.json': { majorVersion: 2, releaseType: 'stable' }, + 'version.v2.json': { version: '2.0.0-alpha.0' } + }, + expected: 'found pre-release tag in version specified in version.v2.json is 2.0.0-alpha.0 but "releaseType"" is set to "stable"' +}); + +function happy({ name, inputs, expected } = opts) { + test(name, () => { + const tmpdir = stage(inputs); + const actual = resolveVersion(tmpdir); + expect(actual).toStrictEqual(expected); + }); +} + +function failure({ name, inputs, expected } = opts) { + test(name, () => { + const tmpdir = stage(inputs); + expect(() => resolveVersion(tmpdir)).toThrow(expected); + }); +} + +function stage(inputs) { + const tmpdir = fs.mkdtempSync(path.join(os.tmpdir(), 'resolve-version-')); + for (const [ name, contents ] of Object.entries(inputs)) { + const data = typeof(contents) === 'string' ? contents : JSON.stringify(contents); + fs.writeFileSync(path.join(tmpdir, name), data); + } + return tmpdir; +} diff --git a/tools/pkglint/lib/rules.ts b/tools/pkglint/lib/rules.ts index 23c791c4cac23..9c35dc39ca0f0 100644 --- a/tools/pkglint/lib/rules.ts +++ b/tools/pkglint/lib/rules.ts @@ -1499,9 +1499,14 @@ function hasIntegTests(pkg: PackageJson) { * Return whether this package should use CDK build tools */ function shouldUseCDKBuildTools(pkg: PackageJson) { - // The packages that DON'T use CDKBuildTools are the package itself - // and the packages used by it. - return pkg.packageName !== 'cdk-build-tools' && pkg.packageName !== 'merkle-build' && pkg.packageName !== 'awslint'; + const exclude = [ + 'cdk-build-tools', + 'merkle-build', + 'awslint', + 'script-tests', + ]; + + return !exclude.includes(pkg.packageName); } function repoRoot(dir: string) { diff --git a/version.v1.json b/version.v1.json new file mode 100644 index 0000000000000..003975241dcee --- /dev/null +++ b/version.v1.json @@ -0,0 +1,3 @@ +{ + "version": "1.71.0" +} \ No newline at end of file From 98599726a035bff4947a0db5313a729bb6a0acfd Mon Sep 17 00:00:00 2001 From: Elad Ben-Israel Date: Wed, 4 Nov 2020 22:44:29 +0200 Subject: [PATCH 043/314] chore: revert "multiple release branches without merge conflicts" (#11287) (#11292) * Revert "chore: multiple release branches without merge conflicts (#11287)" This reverts commit 85915a4eff6c2dc40d8989dd8c7b7f52d43a711c. * Update .gitignore --- .gitignore | 1 - .versionrc.json | 5 + CONTRIBUTING.md | 71 +++------- bump.sh | 19 ++- lerna.json | 5 +- pack.sh | 17 ++- package.json | 3 +- packages/aws-cdk/CONTRIBUTING.md | 6 +- release.json | 4 - scripts/align-version.js | 5 +- scripts/align-version.sh | 2 +- scripts/bump-candidate.sh | 11 +- scripts/bump.js | 49 ------- scripts/changelog-experimental-fix.sh | 11 -- scripts/get-version-marker.js | 13 ++ scripts/get-version.js | 18 +++ scripts/resolve-version-lib.js | 76 ----------- scripts/resolve-version.js | 4 - scripts/script-tests/.gitignore | 8 -- scripts/script-tests/README.md | 3 - scripts/script-tests/package.json | 15 --- scripts/script-tests/resolve-version.test.js | 132 ------------------- tools/pkglint/lib/rules.ts | 11 +- version.v1.json | 3 - 24 files changed, 102 insertions(+), 390 deletions(-) create mode 100644 .versionrc.json delete mode 100644 release.json delete mode 100755 scripts/bump.js delete mode 100755 scripts/changelog-experimental-fix.sh create mode 100644 scripts/get-version-marker.js create mode 100644 scripts/get-version.js delete mode 100755 scripts/resolve-version-lib.js delete mode 100755 scripts/resolve-version.js delete mode 100644 scripts/script-tests/.gitignore delete mode 100644 scripts/script-tests/README.md delete mode 100644 scripts/script-tests/package.json delete mode 100644 scripts/script-tests/resolve-version.test.js delete mode 100644 version.v1.json diff --git a/.gitignore b/.gitignore index 03b7512a00c05..96e153ea6e266 100644 --- a/.gitignore +++ b/.gitignore @@ -46,4 +46,3 @@ yarn-error.log # Cloud9 .c9 -/.versionrc.json diff --git a/.versionrc.json b/.versionrc.json new file mode 100644 index 0000000000000..3178955551057 --- /dev/null +++ b/.versionrc.json @@ -0,0 +1,5 @@ +{ + "skip": { "tag": true }, + "packageFiles": [ { "filename": "lerna.json", "type": "json" } ], + "bumpFiles": [ { "filename": "lerna.json", "type": "json" } ] +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7ff39118418be..0c5137c77a4a5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -779,59 +779,24 @@ CDK](https://github.com/aws/aws-cdk/issues/3398) we will either remove the legacy behavior or flip the logic for all these features and then reset the `FEATURE_FLAGS` map for the next cycle. -### Versioning and Release - -The `release.json` file at the root of the repo determines which release line -this branch belongs to. - -```js -{ - "majorVersion": "1" | "2", - "releaseType": "stable" | "alpha" | "rc" -} -``` - -To reduce merge conflicts in automatic merges between version branches, the -current version number is stored under `version.vNN.json` (where `NN` is -`majorVersion`) and changelogs are stored under `CHANGELOG.NN.md` (for -historical reasons, the changelog for 1.x is under `CHANGELOG.md`). When we -fork to a new release branch (e.g. `main-v2`), we will update `release.json` in -this branch to reflect the new version line, and this information will be used -to determine how releases are cut. - -The actual `version` field in all `package.json` files should always be `0.0.0`. -This means that local development builds will use version `0.0.0` instead of the -official version from the version file. - -#### `./bump.sh` - -This script uses [standard-version] to update the version in `version.vNN.json` -to the next version. By default it will perform a **minor** bump, but `./bump.sh -patch` can be used to perform a patch release if that's needed. - -This script will also update the relevant changelog file. - -[standard-version]: https://github.com/conventional-changelog/standard-version - -#### `scripts/resolve-version.js` - -The script evaluates evaluates the configuration in `release.json` exports an -object like this: - -```js -{ - version: '2.0.0-alpha.1', // the current version - versionFile: 'version.v2.json', // the version file - changelogFile: 'CHANGELOG.v2.md', // changelog file name - prerelease: 'alpha', // prerelease tag (undefined for stable) - marker: '0.0.0' // version marker in package.json files -} -``` - -#### scripts/align-version.sh - -In official builds, the `scripts/align-version.sh` is used to update all -`package.json` files based on the version from `version.vNN.json`. +### Versioning + +All `package.json` files in this repo use a stable marker version of `0.0.0`. +This means that when you declare dependencies, you should always use `0.0.0`. +This makes it easier for us to bump a new version (the `bump.sh` script will +just update the central version and create a CHANGELOG entry) and also reduces +the chance of merge conflicts after a new version is released. + +Additional scripts that take part in the versioning mechanism: + +- `scripts/get-version.js` can be used to obtain the actual version of the repo. + You can use either from JavaScript code by `require('./scripts/get-version')` + or from a shell script `node -p "require('./scripts/get-version')"`. +- `scripts/get-version-marker.js` returns `0.0.0` and used to DRY the version + marker. +- `scripts/align-version.sh` and `scripts/align-version.js` are used to align + all package.json files in the repo to the official version. This script is + invoked in CI builds and should not be used inside a development environment. ## Troubleshooting diff --git a/bump.sh b/bump.sh index 750d452da496d..028779e5a748d 100755 --- a/bump.sh +++ b/bump.sh @@ -13,4 +13,21 @@ # # -------------------------------------------------------------------------------------------------- set -euo pipefail -./scripts/bump.js ${1:-minor} +version=${1:-minor} + +echo "Starting ${version} version bump" + +# /bin/bash ./install.sh + +# Generate CHANGELOG and create a commit (see .versionrc.json) +npx standard-version --release-as ${version} + +# I am sorry. +# +# I've gone diving through the code of `conventional-changelog` to see if there +# was a way to configure the string and ultimately I decided that a 'sed' was the simpler +# way to go. +sed -i.tmp -e 's/BREAKING CHANGES$/BREAKING CHANGES TO EXPERIMENTAL FEATURES/' CHANGELOG.md +rm CHANGELOG.md.tmp +git add CHANGELOG.md +git commit --amend --no-edit diff --git a/lerna.json b/lerna.json index 0fcae573a32ae..16f32cc984c13 100644 --- a/lerna.json +++ b/lerna.json @@ -8,9 +8,8 @@ "packages/@aws-cdk-containers/*", "packages/@monocdk-experiment/*", "packages/@aws-cdk/*/lambda-packages/*", - "tools/*", - "scripts/script-tests" + "tools/*" ], "rejectCycles": "true", - "version": "0.0.0" + "version": "1.71.0" } diff --git a/pack.sh b/pack.sh index a61a461ce9f3e..02b901f141273 100755 --- a/pack.sh +++ b/pack.sh @@ -7,11 +7,6 @@ export PATH=$PWD/node_modules/.bin:$PATH export NODE_OPTIONS="--max-old-space-size=4096 ${NODE_OPTIONS:-}" root=$PWD -# Get version and changelog file name (these require that .versionrc.json would have been generated) -version=$(node -p "require('./scripts/resolve-version').version") -changelog_file=$(node -p "require('./scripts/resolve-version').changelogFile") -marker=$(node -p "require('./scripts/resolve-version').marker") - PACMAK=${PACMAK:-jsii-pacmak} ROSETTA=${ROSETTA:-jsii-rosetta} TMPDIR=${TMPDIR:-$(dirname $(mktemp -u))} @@ -62,6 +57,15 @@ done # Remove a JSII aggregate POM that may have snuk past rm -rf dist/java/software/amazon/jsii +# Get version +version="$(node -p "require('./scripts/get-version')")" + +# Ensure we don't publish anything beyond 1.x for now +if [[ ! "${version}" == "1."* ]]; then + echo "ERROR: accidentally releasing a major version? Expecting repo version to start with '1.' but got '${version}'" + exit 1 +fi + # Get commit from CodePipeline (or git, if we are in CodeBuild) # If CODEBUILD_RESOLVED_SOURCE_VERSION is not defined (i.e. local # build or CodePipeline build), use the HEAD commit hash). @@ -79,11 +83,12 @@ cat > ${distdir}/build.json < { - console.error(err.stack); - process.exit(1); -}); \ No newline at end of file diff --git a/scripts/changelog-experimental-fix.sh b/scripts/changelog-experimental-fix.sh deleted file mode 100755 index 15284ac0c69bc..0000000000000 --- a/scripts/changelog-experimental-fix.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -set -euo pipefail -changelog="${1:-}" - -if [ -z "${changelog}" ]; then - echo "Usage: $0 CHANGELOG.md" - exit 1 -fi - -sed -i.tmp -e 's/BREAKING CHANGES$/BREAKING CHANGES TO EXPERIMENTAL FEATURES/' ${changelog} -rm ${changelog}.tmp diff --git a/scripts/get-version-marker.js b/scripts/get-version-marker.js new file mode 100644 index 0000000000000..e5f8c49806a67 --- /dev/null +++ b/scripts/get-version-marker.js @@ -0,0 +1,13 @@ +/** + * Returns the version marker used to indicate this is a local dependency. + * + * Usage: + * + * const version = require('./get-version-marker'); + * + * Or from the command line: + * + * node -p require('./get-version-marker') + * + */ +module.exports = '0.0.0'; diff --git a/scripts/get-version.js b/scripts/get-version.js new file mode 100644 index 0000000000000..9e6972582c427 --- /dev/null +++ b/scripts/get-version.js @@ -0,0 +1,18 @@ +/** + * Returns the current repo version. + * + * Usage: + * + * const version = require('./get-version'); + * + * Or from the command line: + * + * node -p require('./get-version') + * + */ +const versionFile = require('../.versionrc.json').packageFiles[0].filename; +if (!versionFile) { + throw new Error(`unable to determine version filename from .versionrc.json at the root of the repo`); +} + +module.exports = require(`../${versionFile}`).version; diff --git a/scripts/resolve-version-lib.js b/scripts/resolve-version-lib.js deleted file mode 100755 index bc14d278d1a5e..0000000000000 --- a/scripts/resolve-version-lib.js +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env node -const path = require('path'); -const fs = require('fs'); - -//============================================================= -// UNIT TESTS: tools/script-tests/test/resolve-version.test.js -//============================================================= - -function resolveVersion(rootdir) { - const ALLOWED_RELEASE_TYPES = [ 'alpha', 'rc', 'stable' ]; - const MIN_MAJOR = 1, MAX_MAJOR = 2; // extra safety: update to allow new major versions - - // - // parse release.json - // - const releaseFile = path.join(rootdir, 'release.json'); - const releaseConfig = require(releaseFile); - const majorVersion = releaseConfig.majorVersion; - const releaseType = releaseConfig.releaseType; - if (!majorVersion) { throw new Error(`"majorVersion"" must be defined in ${releaseFile}`); } - if (!releaseType) { throw new Error(`"releaseType" must be defined in ${releaseFile}`); } - if (typeof(majorVersion) !== 'number') { throw new Error(`majorVersion=${majorVersion} must be a number`); } - if (majorVersion < MIN_MAJOR || majorVersion > MAX_MAJOR) { throw new Error(`majorVersion=${majorVersion} is an unsupported major version (should be between ${MIN_MAJOR} and ${MAX_MAJOR})`); } - if (!ALLOWED_RELEASE_TYPES.includes(releaseType)) { throw new Error(`releaseType=${releaseType} is not allowed. Allowed values: ${ALLOWED_RELEASE_TYPES.join(',')}`); } - - // - // resolve and check that we have a version file - // - - const versionFile = `version.v${majorVersion}.json`; - const versionFilePath = path.join(rootdir, versionFile); - if (!fs.existsSync(versionFilePath)) { - throw new Error(`unable to find version file ${versionFile} for major version ${majorVersion}`); - } - - // - // validate that current version matches the requirements - // - - const currentVersion = require(versionFilePath).version; - console.error(`current version: ${currentVersion}`); - if (!currentVersion.startsWith(`${majorVersion}.`)) { - throw new Error(`current version "${currentVersion}" does not use the expected major version ${majorVersion}`); - } - if (releaseType === 'stable') { - if (currentVersion.includes('-')) { - throw new Error(`found pre-release tag in version specified in ${versionFile} is ${currentVersion} but "releaseType"" is set to "stable"`); - } - } else { - if (!currentVersion.includes(`-${releaseType}.`)) { - throw new Error(`could not find pre-release tag "${releaseType}" in current version "${currentVersion}" defined in ${versionFile}`); - } - } - - // - // determine changelog file name - // - - const changelogFile = majorVersion === '1' - ? 'CHANGELOG.md' - : `CHANGELOG.v${majorVersion}.md`; - - // - // export all of it - // - - return { - version: currentVersion, - versionFile: versionFile, - changelogFile: changelogFile, - prerelease: releaseType !== 'stable' ? releaseType : undefined, - marker: '0.0.0', - }; -} - -module.exports = resolveVersion; \ No newline at end of file diff --git a/scripts/resolve-version.js b/scripts/resolve-version.js deleted file mode 100755 index 0f101333d95be..0000000000000 --- a/scripts/resolve-version.js +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env node -const ROOTDIR = path.resolve(__dirname, '..'); -const resolveVersion = require('./resolve-version-lib'); -module.exports = resolveVersion(ROOTDIR); diff --git a/scripts/script-tests/.gitignore b/scripts/script-tests/.gitignore deleted file mode 100644 index dfd5365951031..0000000000000 --- a/scripts/script-tests/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ - -.LAST_BUILD -*.snk -junit.xml -.nyc_output -coverage -nyc.config.js -!.eslintrc.js \ No newline at end of file diff --git a/scripts/script-tests/README.md b/scripts/script-tests/README.md deleted file mode 100644 index a819fff580b1e..0000000000000 --- a/scripts/script-tests/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# script tests - -This directory includes tests for scripts under `./scripts`. \ No newline at end of file diff --git a/scripts/script-tests/package.json b/scripts/script-tests/package.json deleted file mode 100644 index 2c6d0ff48e94a..0000000000000 --- a/scripts/script-tests/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "script-tests", - "private": true, - "version": "0.0.0", - "description": "various tests for development and build scripts", - "scripts": { - "build": "echo ok", - "test": "jest", - "build+test": "npm run build && npm test", - "build+test+package": "npm run build+test" - }, - "devDependencies": { - "jest": "^26.6.2" - } -} diff --git a/scripts/script-tests/resolve-version.test.js b/scripts/script-tests/resolve-version.test.js deleted file mode 100644 index 075f768fe6801..0000000000000 --- a/scripts/script-tests/resolve-version.test.js +++ /dev/null @@ -1,132 +0,0 @@ -const fs = require('fs'); -const os = require('os'); -const path = require('path'); -const resolveVersion = require('../resolve-version-lib'); - -beforeAll(() => spyOn(console, 'error')); - -happy({ - name: 'stable release', - inputs: { - 'release.json': { majorVersion: 2, releaseType: 'stable' }, - 'version.v2.json': { version: '2.1.0' }, - }, - expected: { - changelogFile: 'CHANGELOG.v2.md', - marker: '0.0.0', - prerelease: undefined, - version: '2.1.0', - versionFile: 'version.v2.json' - } -}); - -happy({ - name: 'alpha releases', - inputs: { - 'release.json': { majorVersion: 2, releaseType: 'alpha' }, - 'version.v2.json': { version: '2.1.0-alpha.0' }, - }, - expected: { - changelogFile: 'CHANGELOG.v2.md', - marker: '0.0.0', - prerelease: 'alpha', - version: '2.1.0-alpha.0', - versionFile: 'version.v2.json' - } -}); - -happy({ - name: 'rc releases', - inputs: { - 'release.json': { majorVersion: 2, releaseType: 'rc' }, - 'version.v2.json': { version: '2.1.0-rc.0' }, - }, - expected: { - changelogFile: 'CHANGELOG.v2.md', - marker: '0.0.0', - prerelease: 'rc', - version: '2.1.0-rc.0', - versionFile: 'version.v2.json' - } -}); - -failure({ - name: 'invalid release type', - inputs: { 'release.json': { majorVersion: 2, releaseType: 'build' } }, - expected: 'releaseType=build is not allowed. Allowed values: alpha,rc,stable' -}); - -failure({ - name: 'invalid major version (less then min)', - inputs: { 'release.json': { majorVersion: -1, releaseType: 'rc' } }, - expected: 'majorVersion=-1 is an unsupported major version (should be between 1 and 2)' -}); - -failure({ - name: 'invalid major version (over max)', - inputs: { 'release.json': { majorVersion: 3, releaseType: 'rc' } }, - expected: 'majorVersion=3 is an unsupported major version (should be between 1 and 2)' -}); - -failure({ - name: 'invalid major version (non-number)', - inputs: { 'release.json': { majorVersion: '2', releaseType: 'rc' } }, - expected: 'majorVersion=2 must be a number' -}); - -failure({ - name: 'no version file', - inputs: { 'release.json': { majorVersion: 2, releaseType: 'alpha' } }, - expected: 'unable to find version file version.v2.json for major version 2' -}); - -failure({ - name: 'actual version not the right major', - inputs: { - 'release.json': { majorVersion: 1, releaseType: 'stable' }, - 'version.v1.json': { version: '2.0.0' } - }, - expected: 'current version "2.0.0" does not use the expected major version 1' -}); - -failure({ - name: 'actual version not the right pre-release', - inputs: { - 'release.json': { majorVersion: 2, releaseType: 'alpha' }, - 'version.v2.json': { version: '2.0.0-rc.0' } - }, - expected: 'could not find pre-release tag "alpha" in current version "2.0.0-rc.0" defined in version.v2.json' -}); - -failure({ - name: 'actual version not the right pre-release (stable)', - inputs: { - 'release.json': { majorVersion: 2, releaseType: 'stable' }, - 'version.v2.json': { version: '2.0.0-alpha.0' } - }, - expected: 'found pre-release tag in version specified in version.v2.json is 2.0.0-alpha.0 but "releaseType"" is set to "stable"' -}); - -function happy({ name, inputs, expected } = opts) { - test(name, () => { - const tmpdir = stage(inputs); - const actual = resolveVersion(tmpdir); - expect(actual).toStrictEqual(expected); - }); -} - -function failure({ name, inputs, expected } = opts) { - test(name, () => { - const tmpdir = stage(inputs); - expect(() => resolveVersion(tmpdir)).toThrow(expected); - }); -} - -function stage(inputs) { - const tmpdir = fs.mkdtempSync(path.join(os.tmpdir(), 'resolve-version-')); - for (const [ name, contents ] of Object.entries(inputs)) { - const data = typeof(contents) === 'string' ? contents : JSON.stringify(contents); - fs.writeFileSync(path.join(tmpdir, name), data); - } - return tmpdir; -} diff --git a/tools/pkglint/lib/rules.ts b/tools/pkglint/lib/rules.ts index 9c35dc39ca0f0..23c791c4cac23 100644 --- a/tools/pkglint/lib/rules.ts +++ b/tools/pkglint/lib/rules.ts @@ -1499,14 +1499,9 @@ function hasIntegTests(pkg: PackageJson) { * Return whether this package should use CDK build tools */ function shouldUseCDKBuildTools(pkg: PackageJson) { - const exclude = [ - 'cdk-build-tools', - 'merkle-build', - 'awslint', - 'script-tests', - ]; - - return !exclude.includes(pkg.packageName); + // The packages that DON'T use CDKBuildTools are the package itself + // and the packages used by it. + return pkg.packageName !== 'cdk-build-tools' && pkg.packageName !== 'merkle-build' && pkg.packageName !== 'awslint'; } function repoRoot(dir: string) { diff --git a/version.v1.json b/version.v1.json deleted file mode 100644 index 003975241dcee..0000000000000 --- a/version.v1.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "version": "1.71.0" -} \ No newline at end of file From 9f6a56758949b783b7b75554947c5b61c72a95a3 Mon Sep 17 00:00:00 2001 From: AWS CDK Automation <43080478+aws-cdk-automation@users.noreply.github.com> Date: Wed, 4 Nov 2020 22:13:02 +0100 Subject: [PATCH 044/314] chore: npm-check-updates && yarn upgrade (#11285) Ran npm-check-updates and yarn upgrade to keep the `yarn.lock` file up-to-date. --- package.json | 6 +- .../ecs-service-extensions/package.json | 2 +- packages/@aws-cdk/assert/package.json | 4 +- packages/@aws-cdk/aws-appsync/package.json | 2 +- .../aws-autoscaling-hooktargets/package.json | 2 +- packages/@aws-cdk/aws-batch/package.json | 2 +- .../package.json | 2 +- packages/@aws-cdk/aws-cloudtrail/package.json | 2 +- .../aws-cloudwatch-actions/package.json | 2 +- packages/@aws-cdk/aws-cognito/package.json | 2 +- .../aws-global-table-coordinator/package.json | 2 +- packages/@aws-cdk/aws-dynamodb/package.json | 2 +- .../@aws-cdk/aws-ecs-patterns/package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../@aws-cdk/aws-events-targets/package.json | 2 +- packages/@aws-cdk/aws-glue/package.json | 2 +- packages/@aws-cdk/aws-iam/package.json | 2 +- .../aws-lambda-destinations/package.json | 2 +- packages/@aws-cdk/aws-lambda/package.json | 2 +- .../aws-logs-destinations/package.json | 2 +- packages/@aws-cdk/aws-redshift/package.json | 2 +- .../aws-route53-patterns/package.json | 2 +- .../@aws-cdk/aws-route53-targets/package.json | 2 +- .../@aws-cdk/aws-s3-deployment/package.json | 2 +- .../aws-s3-notifications/package.json | 2 +- packages/@aws-cdk/aws-sam/package.json | 2 +- .../@aws-cdk/aws-ses-actions/package.json | 2 +- .../aws-sns-subscriptions/package.json | 2 +- .../aws-stepfunctions-tasks/package.json | 2 +- .../@aws-cdk/cdk-assets-schema/package.json | 2 +- .../cloud-assembly-schema/package.json | 2 +- .../@aws-cdk/cloudformation-diff/package.json | 2 +- .../cloudformation-include/package.json | 2 +- packages/@aws-cdk/cx-api/package.json | 2 +- .../example-construct-library/package.json | 2 +- packages/@aws-cdk/yaml-cfn/package.json | 2 +- .../@monocdk-experiment/assert/package.json | 4 +- packages/aws-cdk/package.json | 2 +- packages/awslint/package.json | 4 +- packages/cdk-assets/package.json | 2 +- packages/cdk-dasm/package.json | 4 +- packages/decdk/package.json | 6 +- tools/cdk-build-tools/package.json | 8 +- tools/cfn2ts/package.json | 4 +- tools/eslint-plugin-cdk/package.json | 4 +- tools/nodeunit-shim/package.json | 2 +- tools/pkglint/package.json | 2 +- tools/yarn-cling/package.json | 2 +- yarn.lock | 341 ++++++++++-------- 50 files changed, 259 insertions(+), 206 deletions(-) diff --git a/package.json b/package.json index 97f1691cbe9b0..1f3799a2605e5 100644 --- a/package.json +++ b/package.json @@ -18,9 +18,9 @@ "fs-extra": "^9.0.1", "graceful-fs": "^4.2.4", "jest-junit": "^12.0.0", - "jsii-diff": "^1.14.0", - "jsii-pacmak": "^1.14.0", - "jsii-rosetta": "^1.14.0", + "jsii-diff": "^1.14.1", + "jsii-pacmak": "^1.14.1", + "jsii-rosetta": "^1.14.1", "lerna": "^3.22.1", "standard-version": "^9.0.0", "typescript": "~3.9.7" diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/package.json b/packages/@aws-cdk-containers/ecs-service-extensions/package.json index 717f7d866ecaa..4b1da71dd86fe 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/package.json +++ b/packages/@aws-cdk-containers/ecs-service-extensions/package.json @@ -40,7 +40,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "nodeunit": "^0.11.3", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/assert/package.json b/packages/@aws-cdk/assert/package.json index 69b4b33f6dc31..a1e007b5733cf 100644 --- a/packages/@aws-cdk/assert/package.json +++ b/packages/@aws-cdk/assert/package.json @@ -23,7 +23,7 @@ "devDependencies": { "@types/jest": "^26.0.15", "cdk-build-tools": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0", "ts-jest": "^26.4.3" }, @@ -37,7 +37,7 @@ "peerDependencies": { "@aws-cdk/core": "0.0.0", "constructs": "^3.2.0", - "jest": "^26.6.2" + "jest": "^26.6.3" }, "repository": { "url": "https://github.com/aws/aws-cdk.git", diff --git a/packages/@aws-cdk/aws-appsync/package.json b/packages/@aws-cdk/aws-appsync/package.json index 5c946b4afcd17..699aec7a504c5 100644 --- a/packages/@aws-cdk/aws-appsync/package.json +++ b/packages/@aws-cdk/aws-appsync/package.json @@ -76,7 +76,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json b/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json index 0186188607c1f..fa2b3589acd92 100644 --- a/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json +++ b/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json @@ -68,7 +68,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-batch/package.json b/packages/@aws-cdk/aws-batch/package.json index 29cef75395c80..e9a73189f0716 100644 --- a/packages/@aws-cdk/aws-batch/package.json +++ b/packages/@aws-cdk/aws-batch/package.json @@ -76,7 +76,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json b/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json index 9e4e9abd7f9ce..9f25bfc9d6683 100644 --- a/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json +++ b/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json @@ -35,7 +35,7 @@ "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^4.2.1", "eslint-plugin-standard": "^4.0.2", - "jest": "^26.6.1", + "jest": "^26.6.3", "lambda-tester": "^3.6.0", "nock": "^13.0.4", "ts-jest": "^26.4.3" diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index 948366ccdd40b..6226cf909f77e 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -78,7 +78,7 @@ "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", "colors": "^1.4.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-cloudwatch-actions/package.json b/packages/@aws-cdk/aws-cloudwatch-actions/package.json index db92190779c89..8d845afd8eff9 100644 --- a/packages/@aws-cdk/aws-cloudwatch-actions/package.json +++ b/packages/@aws-cdk/aws-cloudwatch-actions/package.json @@ -68,7 +68,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-cognito/package.json b/packages/@aws-cdk/aws-cognito/package.json index 65b323b314f49..82884c63ec340 100644 --- a/packages/@aws-cdk/aws-cognito/package.json +++ b/packages/@aws-cdk/aws-cognito/package.json @@ -76,7 +76,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json b/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json index fcfbb22fdcc06..e19b1fe502b2d 100644 --- a/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json +++ b/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json @@ -35,7 +35,7 @@ "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^4.2.1", "eslint-plugin-standard": "^4.0.2", - "jest": "^26.6.1", + "jest": "^26.6.3", "lambda-tester": "^3.6.0", "nock": "^13.0.4" } diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index 8865f499cac7d..bc1c792465f78 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -79,7 +79,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0", "sinon": "^9.2.1", "ts-jest": "^26.4.3" diff --git a/packages/@aws-cdk/aws-ecs-patterns/package.json b/packages/@aws-cdk/aws-ecs-patterns/package.json index 0346f7d8249c5..c18883a851c19 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/package.json +++ b/packages/@aws-cdk/aws-ecs-patterns/package.json @@ -69,7 +69,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "nodeunit": "^0.11.3", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json index 9c9f761877c58..3d2ad11bd8a9f 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json @@ -67,7 +67,7 @@ "@aws-cdk/assert": "0.0.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json b/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json index 4ea10b411db4a..242f294ad02f1 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json @@ -67,7 +67,7 @@ "@aws-cdk/assert": "0.0.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index 0e69893108203..29e75985de8ed 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -79,7 +79,7 @@ "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-glue/package.json b/packages/@aws-cdk/aws-glue/package.json index 159b8b34e4d90..f8d190cad4a41 100644 --- a/packages/@aws-cdk/aws-glue/package.json +++ b/packages/@aws-cdk/aws-glue/package.json @@ -77,7 +77,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-iam/package.json b/packages/@aws-cdk/aws-iam/package.json index 6fc9916bf6931..5f8eb193f2539 100644 --- a/packages/@aws-cdk/aws-iam/package.json +++ b/packages/@aws-cdk/aws-iam/package.json @@ -76,7 +76,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0", "sinon": "^9.2.1" }, diff --git a/packages/@aws-cdk/aws-lambda-destinations/package.json b/packages/@aws-cdk/aws-lambda-destinations/package.json index 24fee477a20fd..3f073267b5d75 100644 --- a/packages/@aws-cdk/aws-lambda-destinations/package.json +++ b/packages/@aws-cdk/aws-lambda-destinations/package.json @@ -67,7 +67,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-lambda/package.json b/packages/@aws-cdk/aws-lambda/package.json index 525b8bc4c44b0..c812d75c51879 100644 --- a/packages/@aws-cdk/aws-lambda/package.json +++ b/packages/@aws-cdk/aws-lambda/package.json @@ -82,7 +82,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "lodash": "^4.17.20", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/aws-logs-destinations/package.json b/packages/@aws-cdk/aws-logs-destinations/package.json index 71d97a7819a1e..088d42b51feeb 100644 --- a/packages/@aws-cdk/aws-logs-destinations/package.json +++ b/packages/@aws-cdk/aws-logs-destinations/package.json @@ -67,7 +67,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-redshift/package.json b/packages/@aws-cdk/aws-redshift/package.json index 3f447e2adb6f3..dbdc8994c5894 100644 --- a/packages/@aws-cdk/aws-redshift/package.json +++ b/packages/@aws-cdk/aws-redshift/package.json @@ -75,7 +75,7 @@ "@aws-cdk/assert": "0.0.0", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-route53-patterns/package.json b/packages/@aws-cdk/aws-route53-patterns/package.json index 1f238f9748525..e5db2082593d0 100644 --- a/packages/@aws-cdk/aws-route53-patterns/package.json +++ b/packages/@aws-cdk/aws-route53-patterns/package.json @@ -68,7 +68,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-route53-targets/package.json b/packages/@aws-cdk/aws-route53-targets/package.json index d5d2fe006a2ba..87dd1a8969ad8 100644 --- a/packages/@aws-cdk/aws-route53-targets/package.json +++ b/packages/@aws-cdk/aws-route53-targets/package.json @@ -69,7 +69,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-s3-deployment/package.json b/packages/@aws-cdk/aws-s3-deployment/package.json index f9433f28219aa..fa62ca2e0f789 100644 --- a/packages/@aws-cdk/aws-s3-deployment/package.json +++ b/packages/@aws-cdk/aws-s3-deployment/package.json @@ -87,7 +87,7 @@ "@types/jest": "^26.0.15", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-s3-notifications/package.json b/packages/@aws-cdk/aws-s3-notifications/package.json index 82ca306725db4..e78e96ff53d62 100644 --- a/packages/@aws-cdk/aws-s3-notifications/package.json +++ b/packages/@aws-cdk/aws-s3-notifications/package.json @@ -66,7 +66,7 @@ "@aws-cdk/assert": "0.0.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-sam/package.json b/packages/@aws-cdk/aws-sam/package.json index 55628df0a22b8..8d8c5e608d0cc 100644 --- a/packages/@aws-cdk/aws-sam/package.json +++ b/packages/@aws-cdk/aws-sam/package.json @@ -77,7 +77,7 @@ "@types/jest": "^26.0.15", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0", "ts-jest": "^26.4.3" }, diff --git a/packages/@aws-cdk/aws-ses-actions/package.json b/packages/@aws-cdk/aws-ses-actions/package.json index 195987a744c20..ea8d76c7cd66a 100644 --- a/packages/@aws-cdk/aws-ses-actions/package.json +++ b/packages/@aws-cdk/aws-ses-actions/package.json @@ -68,7 +68,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-sns-subscriptions/package.json b/packages/@aws-cdk/aws-sns-subscriptions/package.json index 5748d2b2e7ff8..59c95c7d06c43 100644 --- a/packages/@aws-cdk/aws-sns-subscriptions/package.json +++ b/packages/@aws-cdk/aws-sns-subscriptions/package.json @@ -67,7 +67,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/package.json b/packages/@aws-cdk/aws-stepfunctions-tasks/package.json index 89e7ccff64834..9d7dca5eee6fd 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/package.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/package.json @@ -69,7 +69,7 @@ "@aws-cdk/aws-sns-subscriptions": "0.0.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/cdk-assets-schema/package.json b/packages/@aws-cdk/cdk-assets-schema/package.json index e4e13bcbcbe65..c8b0b1988e21a 100644 --- a/packages/@aws-cdk/cdk-assets-schema/package.json +++ b/packages/@aws-cdk/cdk-assets-schema/package.json @@ -53,7 +53,7 @@ "devDependencies": { "@types/jest": "^26.0.15", "cdk-build-tools": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0" }, "repository": { diff --git a/packages/@aws-cdk/cloud-assembly-schema/package.json b/packages/@aws-cdk/cloud-assembly-schema/package.json index 52ea52791b921..c9258888b3c6d 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/package.json +++ b/packages/@aws-cdk/cloud-assembly-schema/package.json @@ -55,7 +55,7 @@ "@types/jest": "^26.0.15", "@types/mock-fs": "^4.13.0", "cdk-build-tools": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "mock-fs": "^4.13.0", "pkglint": "0.0.0", "typescript-json-schema": "^0.43.0" diff --git a/packages/@aws-cdk/cloudformation-diff/package.json b/packages/@aws-cdk/cloudformation-diff/package.json index 0a925994900e6..038bd3dd3b370 100644 --- a/packages/@aws-cdk/cloudformation-diff/package.json +++ b/packages/@aws-cdk/cloudformation-diff/package.json @@ -34,7 +34,7 @@ "@types/table": "^5.0.0", "cdk-build-tools": "0.0.0", "fast-check": "^2.6.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0", "ts-jest": "^26.4.3" }, diff --git a/packages/@aws-cdk/cloudformation-include/package.json b/packages/@aws-cdk/cloudformation-include/package.json index 6a127362a69fe..9e67e7dda3901 100644 --- a/packages/@aws-cdk/cloudformation-include/package.json +++ b/packages/@aws-cdk/cloudformation-include/package.json @@ -330,7 +330,7 @@ "@types/jest": "^26.0.15", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0", "ts-jest": "^26.4.3" }, diff --git a/packages/@aws-cdk/cx-api/package.json b/packages/@aws-cdk/cx-api/package.json index 3e76aaf9338a3..ea8aa01a47345 100644 --- a/packages/@aws-cdk/cx-api/package.json +++ b/packages/@aws-cdk/cx-api/package.json @@ -62,7 +62,7 @@ "@types/mock-fs": "^4.13.0", "@types/semver": "^7.3.4", "cdk-build-tools": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "mock-fs": "^4.13.0", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/example-construct-library/package.json b/packages/@aws-cdk/example-construct-library/package.json index cbb9c4454bf4c..5874fd037829d 100644 --- a/packages/@aws-cdk/example-construct-library/package.json +++ b/packages/@aws-cdk/example-construct-library/package.json @@ -68,7 +68,7 @@ "@aws-cdk/assert": "0.0.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/yaml-cfn/package.json b/packages/@aws-cdk/yaml-cfn/package.json index 222dca7bbbe97..b3b63cbf69e38 100644 --- a/packages/@aws-cdk/yaml-cfn/package.json +++ b/packages/@aws-cdk/yaml-cfn/package.json @@ -71,7 +71,7 @@ "@types/jest": "^26.0.15", "@types/yaml": "^1.9.7", "cdk-build-tools": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0" }, "bundledDependencies": [ diff --git a/packages/@monocdk-experiment/assert/package.json b/packages/@monocdk-experiment/assert/package.json index d977569089e34..89cb3fbce95ba 100644 --- a/packages/@monocdk-experiment/assert/package.json +++ b/packages/@monocdk-experiment/assert/package.json @@ -38,7 +38,7 @@ "@types/node": "^10.17.44", "cdk-build-tools": "0.0.0", "constructs": "^3.2.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "monocdk": "0.0.0", "pkglint": "0.0.0", "ts-jest": "^26.4.3" @@ -48,7 +48,7 @@ }, "peerDependencies": { "constructs": "^3.0.4", - "jest": "^26.6.2", + "jest": "^26.6.3", "monocdk": "^0.0.0" }, "repository": { diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index e860cb48f3e01..a8b7e9e25a7b9 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -55,7 +55,7 @@ "@types/yargs": "^15.0.9", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "mockery": "^2.1.0", "pkglint": "0.0.0", "sinon": "^9.2.1", diff --git a/packages/awslint/package.json b/packages/awslint/package.json index e47c9135317d9..abe3c5a357ca1 100644 --- a/packages/awslint/package.json +++ b/packages/awslint/package.json @@ -16,11 +16,11 @@ "awslint": "bin/awslint" }, "dependencies": { - "@jsii/spec": "^1.14.0", + "@jsii/spec": "^1.14.1", "camelcase": "^6.2.0", "colors": "^1.4.0", "fs-extra": "^9.0.1", - "jsii-reflect": "^1.14.0", + "jsii-reflect": "^1.14.1", "yargs": "^16.1.0" }, "devDependencies": { diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index b64e7cf36a5be..992927183ac57 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -38,7 +38,7 @@ "@types/node": "^10.17.44", "@types/yargs": "^15.0.9", "cdk-build-tools": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "jszip": "^3.5.0", "mock-fs": "^4.13.0", "pkglint": "0.0.0" diff --git a/packages/cdk-dasm/package.json b/packages/cdk-dasm/package.json index 48da1c3c4d5c1..276016f4c2794 100644 --- a/packages/cdk-dasm/package.json +++ b/packages/cdk-dasm/package.json @@ -26,13 +26,13 @@ }, "license": "Apache-2.0", "dependencies": { - "codemaker": "^1.14.0", + "codemaker": "^1.14.1", "yaml": "1.10.0" }, "devDependencies": { "@types/jest": "^26.0.15", "@types/yaml": "1.9.7", - "jest": "^26.6.2" + "jest": "^26.6.3" }, "keywords": [ "aws", diff --git a/packages/decdk/package.json b/packages/decdk/package.json index f060b0c39e82c..0871274f0b016 100644 --- a/packages/decdk/package.json +++ b/packages/decdk/package.json @@ -190,7 +190,7 @@ "@aws-cdk/yaml-cfn": "0.0.0", "constructs": "^3.2.0", "fs-extra": "^9.0.1", - "jsii-reflect": "^1.14.0", + "jsii-reflect": "^1.14.1", "jsonschema": "^1.4.0", "yaml": "1.10.0", "yargs": "^16.1.0" @@ -200,8 +200,8 @@ "@types/jest": "^26.0.15", "@types/yaml": "1.9.7", "@types/yargs": "^15.0.9", - "jest": "^26.6.2", - "jsii": "^1.14.0" + "jest": "^26.6.3", + "jsii": "^1.14.1" }, "keywords": [ "aws", diff --git a/tools/cdk-build-tools/package.json b/tools/cdk-build-tools/package.json index 688c18f092fea..09246c5f04f4c 100644 --- a/tools/cdk-build-tools/package.json +++ b/tools/cdk-build-tools/package.json @@ -40,7 +40,7 @@ }, "dependencies": { "@typescript-eslint/eslint-plugin": "^4.6.1", - "@typescript-eslint/parser": "^4.6.0", + "@typescript-eslint/parser": "^4.6.1", "eslint-plugin-cdk": "0.0.0", "awslint": "0.0.0", "colors": "^1.4.0", @@ -49,9 +49,9 @@ "eslint-import-resolver-typescript": "^2.3.0", "eslint-plugin-import": "^2.22.1", "fs-extra": "^9.0.1", - "jest": "^26.6.2", - "jsii": "^1.14.0", - "jsii-pacmak": "^1.14.0", + "jest": "^26.6.3", + "jsii": "^1.14.1", + "jsii-pacmak": "^1.14.1", "nodeunit": "^0.11.3", "nyc": "^15.1.0", "ts-jest": "^26.4.3", diff --git a/tools/cfn2ts/package.json b/tools/cfn2ts/package.json index c23b7947f9613..76ff69dc0f04a 100644 --- a/tools/cfn2ts/package.json +++ b/tools/cfn2ts/package.json @@ -30,7 +30,7 @@ "license": "Apache-2.0", "dependencies": { "@aws-cdk/cfnspec": "0.0.0", - "codemaker": "^1.14.0", + "codemaker": "^1.14.1", "fast-json-patch": "^3.0.0-1", "fs-extra": "^9.0.1", "yargs": "^16.1.0" @@ -40,7 +40,7 @@ "@types/jest": "^26.0.15", "@types/yargs": "^15.0.9", "cdk-build-tools": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0" }, "keywords": [ diff --git a/tools/eslint-plugin-cdk/package.json b/tools/eslint-plugin-cdk/package.json index 14d4ae0cc7c19..24c0c14813522 100644 --- a/tools/eslint-plugin-cdk/package.json +++ b/tools/eslint-plugin-cdk/package.json @@ -17,11 +17,11 @@ "@types/jest": "^26.0.15", "@types/node": "^10.17.44", "eslint-plugin-rulesdir": "^0.1.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "typescript": "~3.9.7" }, "dependencies": { - "@typescript-eslint/parser": "^4.6.0", + "@typescript-eslint/parser": "^4.6.1", "eslint": "^7.12.1", "fs-extra": "^9.0.1" }, diff --git a/tools/nodeunit-shim/package.json b/tools/nodeunit-shim/package.json index e252d5a964ceb..9019561be7df6 100644 --- a/tools/nodeunit-shim/package.json +++ b/tools/nodeunit-shim/package.json @@ -17,7 +17,7 @@ "typescript": "~3.9.7" }, "dependencies": { - "jest": "^26.6.2" + "jest": "^26.6.3" }, "keywords": [], "author": "", diff --git a/tools/pkglint/package.json b/tools/pkglint/package.json index a1c12bec5eb9f..3f6a213c666ab 100644 --- a/tools/pkglint/package.json +++ b/tools/pkglint/package.json @@ -39,7 +39,7 @@ "@types/semver": "^7.3.4", "@types/yargs": "^15.0.9", "eslint-plugin-cdk": "0.0.0", - "jest": "^26.6.2", + "jest": "^26.6.3", "typescript": "~3.9.7" }, "dependencies": { diff --git a/tools/yarn-cling/package.json b/tools/yarn-cling/package.json index 7d15368a5a6f8..448e2cc950c2e 100644 --- a/tools/yarn-cling/package.json +++ b/tools/yarn-cling/package.json @@ -41,7 +41,7 @@ "@types/jest": "^26.0.15", "@types/node": "^10.17.44", "@types/yarnpkg__lockfile": "^1.1.4", - "jest": "^26.6.2", + "jest": "^26.6.3", "pkglint": "0.0.0", "typescript": "~3.9.7" }, diff --git a/yarn.lock b/yarn.lock index d90c26a81985d..3ddbf6e310a5e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1103,10 +1103,10 @@ jest-util "^26.6.2" slash "^3.0.0" -"@jest/core@^26.6.2": - version "26.6.2" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-26.6.2.tgz#6d669385c3fda0e2271464de890da4122e61548e" - integrity sha512-x0v0LVlEslGYGYk4StT90NUp7vbFBrh0K7KDyAg3hMhG0drrxOIQHsY05uC7XVlKHXFgGI+HdnU35qewMZOLFQ== +"@jest/core@^26.6.3": + version "26.6.3" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-26.6.3.tgz#7639fcb3833d748a4656ada54bde193051e45fad" + integrity sha512-xvV1kKbhfUqFVuZ8Cyo+JPpipAHHAV3kcDBftiduK8EICXmTFddryy3P7NfZt8Pv37rA9nEJBKCCkglCPt/Xjw== dependencies: "@jest/console" "^26.6.2" "@jest/reporters" "^26.6.2" @@ -1119,14 +1119,14 @@ exit "^0.1.2" graceful-fs "^4.2.4" jest-changed-files "^26.6.2" - jest-config "^26.6.2" + jest-config "^26.6.3" jest-haste-map "^26.6.2" jest-message-util "^26.6.2" jest-regex-util "^26.0.0" jest-resolve "^26.6.2" - jest-resolve-dependencies "^26.6.2" - jest-runner "^26.6.2" - jest-runtime "^26.6.2" + jest-resolve-dependencies "^26.6.3" + jest-runner "^26.6.3" + jest-runtime "^26.6.3" jest-snapshot "^26.6.2" jest-util "^26.6.2" jest-validate "^26.6.2" @@ -1224,16 +1224,16 @@ "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^26.6.2": - version "26.6.2" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-26.6.2.tgz#4f9a705d0368f61a820bd9a281c8ce83a1facaf3" - integrity sha512-iHiEXLMP69Ohe6kFMOVz6geADRxwK+OkLGg0VIGfZrUdkJGiCpghkMb2946FLh7jvzOwwZGyQoMi+kaHiOdM5g== +"@jest/test-sequencer@^26.6.3": + version "26.6.3" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-26.6.3.tgz#98e8a45100863886d074205e8ffdc5a7eb582b17" + integrity sha512-YHlVIjP5nfEyjlrSr8t/YdNfU/1XEt7c5b4OxcXCjyRhjzLYu/rO69/WHPuYcbCWkz8kAeZVZp2N2+IOLLEPGw== dependencies: "@jest/test-result" "^26.6.2" graceful-fs "^4.2.4" jest-haste-map "^26.6.2" - jest-runner "^26.6.2" - jest-runtime "^26.6.2" + jest-runner "^26.6.3" + jest-runtime "^26.6.3" "@jest/transform@^26.6.2": version "26.6.2" @@ -1289,10 +1289,10 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" -"@jsii/spec@^1.14.0": - version "1.14.0" - resolved "https://registry.yarnpkg.com/@jsii/spec/-/spec-1.14.0.tgz#79ef7626616e3cd6eaf503f8f4c0c9640c220a5b" - integrity sha512-hgJG0d1W+VgXZD8TeXt4wlFwdkT9izUN5fY+yzKkh+zZUNebEayXDP6LXOFD4iJZ83nUGjEVayzaZt4rAhwt5A== +"@jsii/spec@^1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@jsii/spec/-/spec-1.14.1.tgz#9544e94e590dafd37d46f91ae3da925f39ca73de" + integrity sha512-h+HXPYD+k8zbkQRXzR9zWxXoSyBTBQL2N+t+iTgMuHpWvnrd6ZUegpWh/M1voMpmT5JHS7MftwIRjnp7yP92KQ== dependencies: jsonschema "^1.4.0" @@ -3319,24 +3319,16 @@ eslint-scope "^5.0.0" eslint-utils "^2.0.0" -"@typescript-eslint/parser@^4.6.0": - version "4.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.6.0.tgz#7e9ff7df2f21d5c8f65f17add3b99eeeec33199d" - integrity sha512-Dj6NJxBhbdbPSZ5DYsQqpR32MwujF772F2H3VojWU6iT4AqL4BKuoNWOPFCoSZvCcADDvQjDpa6OLDAaiZPz2Q== +"@typescript-eslint/parser@^4.6.1": + version "4.6.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.6.1.tgz#b801bff67b536ecc4a840ac9289ba2be57e02428" + integrity sha512-lScKRPt1wM9UwyKkGKyQDqf0bh6jm8DQ5iN37urRIXDm16GEv+HGEmum2Fc423xlk5NUOkOpfTnKZc/tqKZkDQ== dependencies: - "@typescript-eslint/scope-manager" "4.6.0" - "@typescript-eslint/types" "4.6.0" - "@typescript-eslint/typescript-estree" "4.6.0" + "@typescript-eslint/scope-manager" "4.6.1" + "@typescript-eslint/types" "4.6.1" + "@typescript-eslint/typescript-estree" "4.6.1" debug "^4.1.1" -"@typescript-eslint/scope-manager@4.6.0": - version "4.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.6.0.tgz#b7d8b57fe354047a72dfb31881d9643092838662" - integrity sha512-uZx5KvStXP/lwrMrfQQwDNvh2ppiXzz5TmyTVHb+5TfZ3sUP7U1onlz3pjoWrK9konRyFe1czyxObWTly27Ang== - dependencies: - "@typescript-eslint/types" "4.6.0" - "@typescript-eslint/visitor-keys" "4.6.0" - "@typescript-eslint/scope-manager@4.6.1": version "4.6.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.6.1.tgz#21872b91cbf7adfc7083f17b8041149148baf992" @@ -3345,30 +3337,11 @@ "@typescript-eslint/types" "4.6.1" "@typescript-eslint/visitor-keys" "4.6.1" -"@typescript-eslint/types@4.6.0": - version "4.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.6.0.tgz#157ca925637fd53c193c6bf226a6c02b752dde2f" - integrity sha512-5FAgjqH68SfFG4UTtIFv+rqYJg0nLjfkjD0iv+5O27a0xEeNZ5rZNDvFGZDizlCD1Ifj7MAbSW2DPMrf0E9zjA== - "@typescript-eslint/types@4.6.1": version "4.6.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.6.1.tgz#d3ad7478f53f22e7339dc006ab61aac131231552" integrity sha512-k2ZCHhJ96YZyPIsykickez+OMHkz06xppVLfJ+DY90i532/Cx2Z+HiRMH8YZQo7a4zVd/TwNBuRCdXlGK4yo8w== -"@typescript-eslint/typescript-estree@4.6.0": - version "4.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.6.0.tgz#85bd98dcc8280511cfc5b2ce7b03a9ffa1732b08" - integrity sha512-s4Z9qubMrAo/tw0CbN0IN4AtfwuehGXVZM0CHNMdfYMGBDhPdwTEpBrecwhP7dRJu6d9tT9ECYNaWDHvlFSngA== - dependencies: - "@typescript-eslint/types" "4.6.0" - "@typescript-eslint/visitor-keys" "4.6.0" - debug "^4.1.1" - globby "^11.0.1" - is-glob "^4.0.1" - lodash "^4.17.15" - semver "^7.3.2" - tsutils "^3.17.1" - "@typescript-eslint/typescript-estree@4.6.1": version "4.6.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.6.1.tgz#6025cce724329413f57e4959b2d676fceeca246f" @@ -3383,14 +3356,6 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/visitor-keys@4.6.0": - version "4.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.6.0.tgz#fb05d6393891b0a089b243fc8f9fb8039383d5da" - integrity sha512-38Aa9Ztl0XyFPVzmutHXqDMCu15Xx8yKvUo38Gu3GhsuckCh3StPI5t2WIO9LHEsOH7MLmlGfKUisU8eW1Sjhg== - dependencies: - "@typescript-eslint/types" "4.6.0" - eslint-visitor-keys "^2.0.0" - "@typescript-eslint/visitor-keys@4.6.1": version "4.6.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.6.1.tgz#6b125883402d8939df7b54528d879e88f7ba3614" @@ -3616,6 +3581,11 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" +app-root-path@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.2.1.tgz#d0df4a682ee408273583d43f6f79e9892624bc9a" + integrity sha512-91IFKeKk7FjfmezPKkwtaRvSpnUc4gDwPAjA1YZ9Gn0q0PPeW+vbeUsZuyDwjI7+QTHhcLen2v25fi/AmhvbJA== + append-transform@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab" @@ -3883,6 +3853,21 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" +aws-sdk@^2.596.0: + version "2.784.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.784.0.tgz#70136a537d5c977a9e9a2e8b6a234b45ec2da0a1" + integrity sha512-+KBkqH7t/XE91Fqn8eyJeNIWsnhSWL8bSUqFD7TfE3FN07MTlC0nprGYp+2WfcYNz5i8Bus1vY2DHNVhtTImnw== + dependencies: + buffer "4.9.2" + events "1.1.1" + ieee754 "1.1.13" + jmespath "0.15.0" + querystring "0.2.0" + sax "1.2.1" + url "0.10.3" + uuid "3.3.2" + xml2js "0.4.19" + aws-sdk@^2.637.0, aws-sdk@^2.783.0: version "2.783.0" resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.783.0.tgz#f6a2fb2d1af2e7c5a6ec2959436499ff5b6c705b" @@ -3915,10 +3900,10 @@ axios@^0.19.0: dependencies: follow-redirects "1.5.10" -babel-jest@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.6.2.tgz#ca84659b1683e6e5bf16609bc88f3f2f086fe443" - integrity sha512-pysyz/mZ7T5sozKnvSa1n7QEf22W9yc+dUmn2zNuQTN0saG51q8A/8k9wbED9X4YNxmwjuhIwf4JRXXQGzui3Q== +babel-jest@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.6.3.tgz#d87d25cb0037577a0c89f82e5755c5d293c01056" + integrity sha512-pl4Q+GAVOHwvjrck6jKjvmGhnO3jHX/xuB9d27f+EJZ/6k+6nMuPjorrYp7s++bKKdANwzElBWnLWaObvTnaZA== dependencies: "@jest/transform" "^26.6.2" "@jest/types" "^26.6.2" @@ -4646,10 +4631,10 @@ code-point-at@^1.0.0: resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= -codemaker@^1.14.0: - version "1.14.0" - resolved "https://registry.yarnpkg.com/codemaker/-/codemaker-1.14.0.tgz#b49e73d75dc26aa7cbffdfc81e7baa0bd2e4c244" - integrity sha512-QVHiMU6adGEhD6zxilR60OycWyiDFXfRYQceLtwp3qYoZkxJI7bpSr6T1cWiyNH3GpeLNZ8HucY1WreFqx3xhA== +codemaker@^1.14.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/codemaker/-/codemaker-1.14.1.tgz#c2938d5fb76ca0cce306990c82b5fe0e934feb96" + integrity sha512-km8Aqf1ZioiM9Xm4Tj9pbIyFLoRV9l3ssw073C1AePt76TDqWFmJ83LrXkm+dSgdysoKVqY3Svn3BoPnN5bFKQ== dependencies: camelcase "^6.2.0" decamelize "^4.0.0" @@ -5854,11 +5839,21 @@ dotenv-expand@^5.1.0: resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-5.1.0.tgz#3fbaf020bfd794884072ea26b1e9791d45a629f0" integrity sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA== +dotenv-json@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/dotenv-json/-/dotenv-json-1.0.0.tgz#fc7f672aafea04bed33818733b9f94662332815c" + integrity sha512-jAssr+6r4nKhKRudQ0HOzMskOFFi9+ubXWwmrSGJFgTvpjyPXCXsCsYbjif6mXp7uxA7xY3/LGaiTQukZzSbOQ== + dotenv@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-7.0.0.tgz#a2be3cd52736673206e8a85fb5210eea29628e7c" integrity sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g== +dotenv@^8.0.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" + integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== + dotgitignore@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/dotgitignore/-/dotgitignore-2.1.0.tgz#a4b15a4e4ef3cf383598aaf1dfa4a04bcc089b7b" @@ -6128,6 +6123,11 @@ escodegen@^1.11.0, escodegen@^1.14.1, escodegen@^1.8.1: optionalDependencies: source-map "~0.6.1" +eslint-config-standard@^14.1.1: + version "14.1.1" + resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz#830a8e44e7aef7de67464979ad06b406026c56ea" + integrity sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg== + eslint-import-resolver-node@^0.3.4: version "0.3.4" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" @@ -6155,6 +6155,14 @@ eslint-module-utils@^2.6.0: debug "^2.6.9" pkg-dir "^2.0.0" +eslint-plugin-es@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893" + integrity sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ== + dependencies: + eslint-utils "^2.0.0" + regexpp "^3.0.0" + eslint-plugin-import@^2.22.1: version "2.22.1" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz#0896c7e6a0cf44109a2d97b95903c2bb689d7702" @@ -6174,11 +6182,33 @@ eslint-plugin-import@^2.22.1: resolve "^1.17.0" tsconfig-paths "^3.9.0" +eslint-plugin-node@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d" + integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g== + dependencies: + eslint-plugin-es "^3.0.0" + eslint-utils "^2.0.0" + ignore "^5.1.1" + minimatch "^3.0.4" + resolve "^1.10.1" + semver "^6.1.0" + +eslint-plugin-promise@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz#845fd8b2260ad8f82564c1222fce44ad71d9418a" + integrity sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw== + eslint-plugin-rulesdir@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/eslint-plugin-rulesdir/-/eslint-plugin-rulesdir-0.1.0.tgz#ad144d7e98464fda82963eff3fab331aecb2bf08" integrity sha1-rRRNfphGT9qClj7/P6szGuyyvwg= +eslint-plugin-standard@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.0.2.tgz#021211a9f077e63a6847e7bb9ab4247327ac8e0c" + integrity sha512-nKptN8l7jksXkwFk++PhJB3cCDTcXOEyhISIN86Ue2feJ1LFyY3PrY3/xT2keXlJSY5bpmbiTG0f885/YKAvTA== + eslint-scope@^5.0.0, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -7475,7 +7505,7 @@ ignore@^4.0.3, ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.1.4: +ignore@^5.1.1, ignore@^5.1.4: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== @@ -8176,12 +8206,12 @@ jest-changed-files@^26.6.2: execa "^4.0.0" throat "^5.0.0" -jest-cli@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-26.6.2.tgz#6f42b002c2f0a0902eed7fa55fafdb528b39e764" - integrity sha512-5SBxa0bXc43fTHgxMfonDFDWTmQTiC6RSS4GpKhVekWkwpaeMHWt/FvGIy5GlTHMbCpzULWV++N3v93OdlFfQA== +jest-cli@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-26.6.3.tgz#43117cfef24bc4cd691a174a8796a532e135e92a" + integrity sha512-GF9noBSa9t08pSyl3CY4frMrqp+aQXFGFkf5hEPbh/pIUFYWMK6ZLTfbmadxJVcJrdRoChlWQsA2VkJcDFK8hg== dependencies: - "@jest/core" "^26.6.2" + "@jest/core" "^26.6.3" "@jest/test-result" "^26.6.2" "@jest/types" "^26.6.2" chalk "^4.0.0" @@ -8189,21 +8219,21 @@ jest-cli@^26.6.2: graceful-fs "^4.2.4" import-local "^3.0.2" is-ci "^2.0.0" - jest-config "^26.6.2" + jest-config "^26.6.3" jest-util "^26.6.2" jest-validate "^26.6.2" prompts "^2.0.1" yargs "^15.4.1" -jest-config@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-26.6.2.tgz#f5d2667e71b5b5fbb910cf1898446f3d48a6a0ab" - integrity sha512-0ApZqPd+L/BUWvNj1GHcptb5jwF23lo+BskjgJV/Blht1hgpu6eIwaYRgHPrS6I6HrxwRfJvlGbzoZZVb3VHTA== +jest-config@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-26.6.3.tgz#64f41444eef9eb03dc51d5c53b75c8c71f645349" + integrity sha512-t5qdIj/bCj2j7NFVHb2nFB4aUdfucDn3JRKgrZnplb8nieAirAzRSHP8uDEd+qV6ygzg9Pz4YG7UTJf94LPSyg== dependencies: "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^26.6.2" + "@jest/test-sequencer" "^26.6.3" "@jest/types" "^26.6.2" - babel-jest "^26.6.2" + babel-jest "^26.6.3" chalk "^4.0.0" deepmerge "^4.2.2" glob "^7.1.1" @@ -8211,7 +8241,7 @@ jest-config@^26.6.2: jest-environment-jsdom "^26.6.2" jest-environment-node "^26.6.2" jest-get-type "^26.3.0" - jest-jasmine2 "^26.6.2" + jest-jasmine2 "^26.6.3" jest-regex-util "^26.0.0" jest-resolve "^26.6.2" jest-util "^26.6.2" @@ -8308,10 +8338,10 @@ jest-haste-map@^26.6.2: optionalDependencies: fsevents "^2.1.2" -jest-jasmine2@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.6.2.tgz#81bc3eabc367aa65cb9e63ec7129f8831cc345fc" - integrity sha512-Om6q632kogggOBGjSr34jErXGOQy0+IkxouGUbyzB0lQmufu8nm1AcxLIKpB/FN36I43f2T3YajeNlxwJZ94PQ== +jest-jasmine2@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.6.3.tgz#adc3cf915deacb5212c93b9f3547cd12958f2edd" + integrity sha512-kPKUrQtc8aYwBV7CqBg5pu+tmYXlvFlSFYn18ev4gPFtrRzB15N2gW/Roew3187q2w2eHuu0MU9TJz6w0/nPEg== dependencies: "@babel/traverse" "^7.1.0" "@jest/environment" "^26.6.2" @@ -8326,7 +8356,7 @@ jest-jasmine2@^26.6.2: jest-each "^26.6.2" jest-matcher-utils "^26.6.2" jest-message-util "^26.6.2" - jest-runtime "^26.6.2" + jest-runtime "^26.6.3" jest-snapshot "^26.6.2" jest-util "^26.6.2" pretty-format "^26.6.2" @@ -8393,10 +8423,10 @@ jest-regex-util@^26.0.0: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-26.0.0.tgz#d25e7184b36e39fd466c3bc41be0971e821fee28" integrity sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A== -jest-resolve-dependencies@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-26.6.2.tgz#82b5456bfa9544bb6e376397c8de334d5deba0ce" - integrity sha512-lXXQqBLlKlnOPyCfJZnrYydd7lZzWux9sMwKJxOmjsuVmoSlnmTOJ8kW1FYxotTyMzqoNtBuSF6qE+iXuAr6qQ== +jest-resolve-dependencies@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-26.6.3.tgz#6680859ee5d22ee5dcd961fe4871f59f4c784fb6" + integrity sha512-pVwUjJkxbhe4RY8QEWzN3vns2kqyuldKpxlxJlzEYfKSvY6/bMvxoFrYYzUO1Gx28yKWN37qyV7rIoIp2h8fTg== dependencies: "@jest/types" "^26.6.2" jest-regex-util "^26.0.0" @@ -8416,10 +8446,10 @@ jest-resolve@^26.6.2: resolve "^1.18.1" slash "^3.0.0" -jest-runner@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-26.6.2.tgz#eaa7a2ef38e043054ab8c84c045a09873893d364" - integrity sha512-OsWTIGx/MHSuPqjYwap1LAxT0qvlqmwTYSFOwc+G14AtyZlL7ngrrDes7moLRqFkDVpCHL2RT0i317jogyw81Q== +jest-runner@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-26.6.3.tgz#2d1fed3d46e10f233fd1dbd3bfaa3fe8924be159" + integrity sha512-atgKpRHnaA2OvByG/HpGA4g6CSPS/1LK0jK3gATJAoptC1ojltpmVlYC3TYgdmGp+GLuhzpH30Gvs36szSL2JQ== dependencies: "@jest/console" "^26.6.2" "@jest/environment" "^26.6.2" @@ -8430,22 +8460,22 @@ jest-runner@^26.6.2: emittery "^0.7.1" exit "^0.1.2" graceful-fs "^4.2.4" - jest-config "^26.6.2" + jest-config "^26.6.3" jest-docblock "^26.0.0" jest-haste-map "^26.6.2" jest-leak-detector "^26.6.2" jest-message-util "^26.6.2" jest-resolve "^26.6.2" - jest-runtime "^26.6.2" + jest-runtime "^26.6.3" jest-util "^26.6.2" jest-worker "^26.6.2" source-map-support "^0.5.6" throat "^5.0.0" -jest-runtime@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-26.6.2.tgz#c0989ea9c55f0cab0ab5a403b7a0af56c72f3c9a" - integrity sha512-VEjfoim4tkvq8Gh8z7wMXlKva3DnIlgvmGR1AajiRK1nEHuXtuaR17jnVYOi+wW0i1dS3NH4jVdUQl08GodgZQ== +jest-runtime@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-26.6.3.tgz#4f64efbcfac398331b74b4b3c82d27d401b8fa2b" + integrity sha512-lrzyR3N8sacTAMeonbqpnSka1dHNux2uk0qqDXVkMv2c/A3wYnvQ4EXuI013Y6+gSKSCxdaczvf4HF0mVXHRdw== dependencies: "@jest/console" "^26.6.2" "@jest/environment" "^26.6.2" @@ -8462,7 +8492,7 @@ jest-runtime@^26.6.2: exit "^0.1.2" glob "^7.1.3" graceful-fs "^4.2.4" - jest-config "^26.6.2" + jest-config "^26.6.3" jest-haste-map "^26.6.2" jest-message-util "^26.6.2" jest-mock "^26.6.2" @@ -8563,14 +8593,14 @@ jest-worker@^26.6.2: merge-stream "^2.0.0" supports-color "^7.0.0" -jest@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest/-/jest-26.6.2.tgz#d116f55438129360f523c22b5cf010f88740272d" - integrity sha512-lL0hW7mh/2hhQmpo/1fDWQji/BUB3Xcxxj7r0fAOa3t56OAnwbE0HEl2bZ7XjAwV5TXOt8UpCgaa/WBJBB0CYw== +jest@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest/-/jest-26.6.3.tgz#40e8fdbe48f00dfa1f0ce8121ca74b88ac9148ef" + integrity sha512-lGS5PXGAzR4RF7V5+XObhqz2KZIDUA1yD0DG6pBVmy10eh0ZIXQImRuzocsI/N2XZ1GrLFwTS27In2i2jlpq1Q== dependencies: - "@jest/core" "^26.6.2" + "@jest/core" "^26.6.3" import-local "^3.0.2" - jest-cli "^26.6.2" + jest-cli "^26.6.3" jmespath@0.15.0: version "0.15.0" @@ -8674,65 +8704,65 @@ jsesc@~0.5.0: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= -jsii-diff@^1.14.0: - version "1.14.0" - resolved "https://registry.yarnpkg.com/jsii-diff/-/jsii-diff-1.14.0.tgz#d9bc6c3df853f52659fb798392280483c9c557b8" - integrity sha512-/8M8C+Qah4U6Dn6Jm4GtGQyjHyn8djSnyzQ+eVG90FbUHRbmNAN/r643AcbqipyFDqim4IjYUnX56EMtR6Xc+Q== +jsii-diff@^1.14.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/jsii-diff/-/jsii-diff-1.14.1.tgz#6ee1b6de68675a8cf8ad45b98474cbc7148c1aca" + integrity sha512-4lUf7++fply4tEW+HmhExjOCTz2zCihOdcn+bYvssG+2ztuFh+uyhUtcBaxXM49Mz8+RP3ymu3ArLr9BVmSfrg== dependencies: - "@jsii/spec" "^1.14.0" + "@jsii/spec" "^1.14.1" fs-extra "^9.0.1" - jsii-reflect "^1.14.0" + jsii-reflect "^1.14.1" log4js "^6.3.0" typescript "~3.9.7" yargs "^16.1.0" -jsii-pacmak@^1.14.0: - version "1.14.0" - resolved "https://registry.yarnpkg.com/jsii-pacmak/-/jsii-pacmak-1.14.0.tgz#febb8c2bad45a06380613fa077c0aca829842fb8" - integrity sha512-6PibxOriIhsiPBxdMBvv+xwDD6JJewooZwWEHbJO6JYT2JzZ4EXxmxZ0PCZk1aIynv39vnaULkoYtjzO4XT4CA== +jsii-pacmak@^1.14.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/jsii-pacmak/-/jsii-pacmak-1.14.1.tgz#1296cb926df803fef407b2cbbe2e2658a524c371" + integrity sha512-BRASls0wizqS4mxOmC2eoC7DgDb3tyS1UtFQeok0kfhhyi+GDs/9JPJ+VKlhU1kGLmsQswYxkPrZhV9VcXoiIw== dependencies: - "@jsii/spec" "^1.14.0" + "@jsii/spec" "^1.14.1" clone "^2.1.2" - codemaker "^1.14.0" + codemaker "^1.14.1" commonmark "^0.29.2" escape-string-regexp "^4.0.0" fs-extra "^9.0.1" - jsii-reflect "^1.14.0" - jsii-rosetta "^1.14.0" + jsii-reflect "^1.14.1" + jsii-rosetta "^1.14.1" semver "^7.3.2" spdx-license-list "^6.3.0" xmlbuilder "^15.1.1" yargs "^16.1.0" -jsii-reflect@^1.14.0: - version "1.14.0" - resolved "https://registry.yarnpkg.com/jsii-reflect/-/jsii-reflect-1.14.0.tgz#c8c1f1026b45b0cd9022677868d8548b8562ee43" - integrity sha512-LOImMIFu/DgRNdgXloA5OVGOtEOZsm1UQ2qQHQ3O0MHWgqGvyBRYPh7wwgytucB37lGEz8KgphiJ/gmTAcA1oA== +jsii-reflect@^1.14.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/jsii-reflect/-/jsii-reflect-1.14.1.tgz#e0073b4fbfcc977f7546675c427d7ca0eae8d699" + integrity sha512-otKxvnNn2kAMMygBiw8fGnmJFhQ0EcPTJZH4y/Yn1rZg/nGLAk/G8lCQYfh3xm2/GwSpjh/w6ZEPsq/RUuPR1A== dependencies: - "@jsii/spec" "^1.14.0" + "@jsii/spec" "^1.14.1" colors "^1.4.0" fs-extra "^9.0.1" - oo-ascii-tree "^1.14.0" + oo-ascii-tree "^1.14.1" yargs "^16.1.0" -jsii-rosetta@^1.14.0: - version "1.14.0" - resolved "https://registry.yarnpkg.com/jsii-rosetta/-/jsii-rosetta-1.14.0.tgz#a31b76720292360acd5009883903c0332772ba5c" - integrity sha512-6giv6Bo4zyC4eIw0vUO2/VRvxavdiASH/YzlRdPFWFDecvkyhGSzFTd+kQ2+y+JrQUSiGnUfduF6S/daLTCVIA== +jsii-rosetta@^1.14.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/jsii-rosetta/-/jsii-rosetta-1.14.1.tgz#797c433d9b353d360de4c9c71d0913b9b33fcb1c" + integrity sha512-HfM1IO7eIQ8qyDxTRRdV3TraBhnCivq3N3qMdJuPEJ3O2lprx0TS6pvIXzv9DgDWJwLVDaxI1ecTZhSl9poGeQ== dependencies: - "@jsii/spec" "^1.14.0" + "@jsii/spec" "^1.14.1" commonmark "^0.29.2" fs-extra "^9.0.1" typescript "~3.9.7" xmldom "^0.4.0" yargs "^16.1.0" -jsii@^1.14.0: - version "1.14.0" - resolved "https://registry.yarnpkg.com/jsii/-/jsii-1.14.0.tgz#75fc3b2aa2645926a7e432df8d94c1fecdd9d6c9" - integrity sha512-6vW8sdVu3S5t3kVVI7d9hzxhZ8wqz4J3mHBMArbL/qJpUVB3ruF2W0RVPKwi16u4hnYNqE29TbSq+H5qdepKqg== +jsii@^1.14.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/jsii/-/jsii-1.14.1.tgz#4b478b5f682ae140fbfdd49c171b0cff7f7e01bd" + integrity sha512-uDVBl8bvSnraJpKYyY22dOoERpQv/sEAHEj3L5b00qkBi6FsFr2KWfQOdUg9fMWdYrmMVuXWOWXJ186Fn7XF+A== dependencies: - "@jsii/spec" "^1.14.0" + "@jsii/spec" "^1.14.1" case "^1.6.3" colors "^1.4.0" deep-equal "^2.0.4" @@ -8895,6 +8925,24 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== +lambda-leak@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lambda-leak/-/lambda-leak-2.0.0.tgz#771985d3628487f6e885afae2b54510dcfb2cd7e" + integrity sha1-dxmF02KEh/boha+uK1RRDc+yzX4= + +lambda-tester@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/lambda-tester/-/lambda-tester-3.6.0.tgz#ceb7d4f4f0da768487a05cff37dcd088508b5247" + integrity sha512-F2ZTGWCLyIR95o/jWK46V/WnOCFAEUG/m/V7/CLhPJ7PCM+pror1rZ6ujP3TkItSGxUfpJi0kqwidw+M/nEqWw== + dependencies: + app-root-path "^2.2.1" + dotenv "^8.0.0" + dotenv-json "^1.0.0" + lambda-leak "^2.0.0" + semver "^6.1.1" + uuid "^3.3.2" + vandium-utils "^1.1.1" + lazystream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" @@ -10182,10 +10230,10 @@ onetime@^5.1.0: dependencies: mimic-fn "^2.1.0" -oo-ascii-tree@^1.14.0: - version "1.14.0" - resolved "https://registry.yarnpkg.com/oo-ascii-tree/-/oo-ascii-tree-1.14.0.tgz#156f285161a13c5c44cb96fd5e40f1cf3b036661" - integrity sha512-G9MFFuZa8rXMVo4Za8cy9a3uUEsRY7Ru2JZmi/YElM3mqPvYVQqmhGtD2WUzB5q/E3iaGOrT2rI8iFtPImoOCw== +oo-ascii-tree@^1.14.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/oo-ascii-tree/-/oo-ascii-tree-1.14.1.tgz#cf3da9d7c9c944d3258b274e06aa0192aca20d6e" + integrity sha512-dW0RFnYqUj8WQpvuYXVvjfA3ABoNQnScgSxnKa9lPPCvfcO4CBPshifk9M6hU3ksttcNGbQkFq6k2di2E23SVA== open@^7.0.3: version "7.3.0" @@ -11806,7 +11854,7 @@ resolve@^1.1.6, resolve@^1.10.0, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.13 dependencies: path-parse "^1.0.6" -resolve@^1.18.1: +resolve@^1.10.1, resolve@^1.18.1: version "1.18.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.18.1.tgz#018fcb2c5b207d2a6424aee361c5a266da8f4130" integrity sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA== @@ -12006,7 +12054,7 @@ semver@7.x, semver@^7.1.1, semver@^7.2.1, semver@^7.3.2: resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== -semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: +semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -13608,6 +13656,11 @@ validate-npm-package-name@^3.0.0: dependencies: builtins "^1.0.3" +vandium-utils@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/vandium-utils/-/vandium-utils-1.2.0.tgz#44735de4b7641a05de59ebe945f174e582db4f59" + integrity sha1-RHNd5LdkGgXeWevpRfF05YLbT1k= + vendors@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.4.tgz#e2b800a53e7a29b93506c3cf41100d16c4c4ad8e" From bc6056168ad35bbf6e76df1af009ada2d254c625 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 4 Nov 2020 21:52:59 +0000 Subject: [PATCH 045/314] chore(deps): bump aws-sdk from 2.783.0 to 2.785.0 (#11293) Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.783.0 to 2.785.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.783.0...v2.785.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- .../aws-cloudfront-origins/package.json | 2 +- packages/@aws-cdk/aws-cloudfront/package.json | 2 +- packages/@aws-cdk/aws-cloudtrail/package.json | 2 +- packages/@aws-cdk/aws-codebuild/package.json | 2 +- packages/@aws-cdk/aws-codecommit/package.json | 2 +- packages/@aws-cdk/aws-dynamodb/package.json | 2 +- packages/@aws-cdk/aws-eks/package.json | 2 +- .../@aws-cdk/aws-events-targets/package.json | 2 +- packages/@aws-cdk/aws-logs/package.json | 2 +- packages/@aws-cdk/aws-route53/package.json | 2 +- packages/@aws-cdk/aws-sqs/package.json | 2 +- .../@aws-cdk/custom-resources/package.json | 2 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- yarn.lock | 102 ++---------------- 15 files changed, 21 insertions(+), 109 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudfront-origins/package.json b/packages/@aws-cdk/aws-cloudfront-origins/package.json index 20a2e540b5074..818b0dc43d7f3 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/package.json +++ b/packages/@aws-cdk/aws-cloudfront-origins/package.json @@ -72,7 +72,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", - "aws-sdk": "^2.783.0", + "aws-sdk": "^2.785.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "pkglint": "0.0.0" diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index d1883b8e01538..134526a33cbd7 100644 --- a/packages/@aws-cdk/aws-cloudfront/package.json +++ b/packages/@aws-cdk/aws-cloudfront/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.783.0", + "aws-sdk": "^2.785.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index 6226cf909f77e..a4f02bda2c372 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.783.0", + "aws-sdk": "^2.785.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codebuild/package.json b/packages/@aws-cdk/aws-codebuild/package.json index 0db105dfcb6f6..096bc6fee0a0b 100644 --- a/packages/@aws-cdk/aws-codebuild/package.json +++ b/packages/@aws-cdk/aws-codebuild/package.json @@ -79,7 +79,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.783.0", + "aws-sdk": "^2.785.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codecommit/package.json b/packages/@aws-cdk/aws-codecommit/package.json index 8d0fc5b603e8d..b19b07d18450a 100644 --- a/packages/@aws-cdk/aws-codecommit/package.json +++ b/packages/@aws-cdk/aws-codecommit/package.json @@ -79,7 +79,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.783.0", + "aws-sdk": "^2.785.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index bc1c792465f78..fe1381716a194 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -74,7 +74,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/jest": "^26.0.15", - "aws-sdk": "^2.783.0", + "aws-sdk": "^2.785.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index f474b1923ae94..f5e8120bf29c5 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", "@types/yaml": "1.9.6", - "aws-sdk": "^2.783.0", + "aws-sdk": "^2.785.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index 29e75985de8ed..a16ac63dae9e2 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -75,7 +75,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-codecommit": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", - "aws-sdk": "^2.783.0", + "aws-sdk": "^2.785.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index 79ab5fb0ff301..628b9fe43c66e 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.783.0", + "aws-sdk": "^2.785.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-route53/package.json b/packages/@aws-cdk/aws-route53/package.json index 78eae80f17fca..9b65bb4b6c327 100644 --- a/packages/@aws-cdk/aws-route53/package.json +++ b/packages/@aws-cdk/aws-route53/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.783.0", + "aws-sdk": "^2.785.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-sqs/package.json b/packages/@aws-cdk/aws-sqs/package.json index f6a4945436561..2a8644ed6b5a5 100644 --- a/packages/@aws-cdk/aws-sqs/package.json +++ b/packages/@aws-cdk/aws-sqs/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.783.0", + "aws-sdk": "^2.785.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index e2e108a42a04f..acbbf1680983f 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -79,7 +79,7 @@ "@types/aws-lambda": "^8.10.64", "@types/fs-extra": "^8.1.1", "@types/sinon": "^9.0.8", - "aws-sdk": "^2.783.0", + "aws-sdk": "^2.785.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index a8b7e9e25a7b9..51414409969d9 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -71,7 +71,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.783.0", + "aws-sdk": "^2.785.0", "camelcase": "^6.2.0", "cdk-assets": "0.0.0", "colors": "^1.4.0", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index 992927183ac57..f917654e43d08 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -47,7 +47,7 @@ "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.783.0", + "aws-sdk": "^2.785.0", "glob": "^7.1.6", "yargs": "^16.1.0" }, diff --git a/yarn.lock b/yarn.lock index 3ddbf6e310a5e..d263423de110e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3581,11 +3581,6 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" -app-root-path@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.2.1.tgz#d0df4a682ee408273583d43f6f79e9892624bc9a" - integrity sha512-91IFKeKk7FjfmezPKkwtaRvSpnUc4gDwPAjA1YZ9Gn0q0PPeW+vbeUsZuyDwjI7+QTHhcLen2v25fi/AmhvbJA== - append-transform@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab" @@ -3853,25 +3848,10 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" -aws-sdk@^2.596.0: - version "2.784.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.784.0.tgz#70136a537d5c977a9e9a2e8b6a234b45ec2da0a1" - integrity sha512-+KBkqH7t/XE91Fqn8eyJeNIWsnhSWL8bSUqFD7TfE3FN07MTlC0nprGYp+2WfcYNz5i8Bus1vY2DHNVhtTImnw== - dependencies: - buffer "4.9.2" - events "1.1.1" - ieee754 "1.1.13" - jmespath "0.15.0" - querystring "0.2.0" - sax "1.2.1" - url "0.10.3" - uuid "3.3.2" - xml2js "0.4.19" - -aws-sdk@^2.637.0, aws-sdk@^2.783.0: - version "2.783.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.783.0.tgz#f6a2fb2d1af2e7c5a6ec2959436499ff5b6c705b" - integrity sha512-u3/ZvY/ag1hEkPpgBJxypWRGf8930prIDOWk221pgH0WhlRA9qp3IE8D0j/BKFei0giqlxbN/AB05RITp/XlwQ== +aws-sdk@^2.637.0, aws-sdk@^2.785.0: + version "2.785.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.785.0.tgz#e403dc92c87c00c9eda86b4214870d874ea69251" + integrity sha512-B8KOd9pg+ofT++O0D8rfm30VDdCzBWCFl43rvXBEWbH6lq/fQcLYLTbhKEufqjqnpwzT+prlpNszdNqKYME34g== dependencies: buffer "4.9.2" events "1.1.1" @@ -5839,21 +5819,11 @@ dotenv-expand@^5.1.0: resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-5.1.0.tgz#3fbaf020bfd794884072ea26b1e9791d45a629f0" integrity sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA== -dotenv-json@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/dotenv-json/-/dotenv-json-1.0.0.tgz#fc7f672aafea04bed33818733b9f94662332815c" - integrity sha512-jAssr+6r4nKhKRudQ0HOzMskOFFi9+ubXWwmrSGJFgTvpjyPXCXsCsYbjif6mXp7uxA7xY3/LGaiTQukZzSbOQ== - dotenv@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-7.0.0.tgz#a2be3cd52736673206e8a85fb5210eea29628e7c" integrity sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g== -dotenv@^8.0.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" - integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== - dotgitignore@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/dotgitignore/-/dotgitignore-2.1.0.tgz#a4b15a4e4ef3cf383598aaf1dfa4a04bcc089b7b" @@ -6123,11 +6093,6 @@ escodegen@^1.11.0, escodegen@^1.14.1, escodegen@^1.8.1: optionalDependencies: source-map "~0.6.1" -eslint-config-standard@^14.1.1: - version "14.1.1" - resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz#830a8e44e7aef7de67464979ad06b406026c56ea" - integrity sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg== - eslint-import-resolver-node@^0.3.4: version "0.3.4" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" @@ -6155,14 +6120,6 @@ eslint-module-utils@^2.6.0: debug "^2.6.9" pkg-dir "^2.0.0" -eslint-plugin-es@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893" - integrity sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ== - dependencies: - eslint-utils "^2.0.0" - regexpp "^3.0.0" - eslint-plugin-import@^2.22.1: version "2.22.1" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz#0896c7e6a0cf44109a2d97b95903c2bb689d7702" @@ -6182,33 +6139,11 @@ eslint-plugin-import@^2.22.1: resolve "^1.17.0" tsconfig-paths "^3.9.0" -eslint-plugin-node@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d" - integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g== - dependencies: - eslint-plugin-es "^3.0.0" - eslint-utils "^2.0.0" - ignore "^5.1.1" - minimatch "^3.0.4" - resolve "^1.10.1" - semver "^6.1.0" - -eslint-plugin-promise@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz#845fd8b2260ad8f82564c1222fce44ad71d9418a" - integrity sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw== - eslint-plugin-rulesdir@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/eslint-plugin-rulesdir/-/eslint-plugin-rulesdir-0.1.0.tgz#ad144d7e98464fda82963eff3fab331aecb2bf08" integrity sha1-rRRNfphGT9qClj7/P6szGuyyvwg= -eslint-plugin-standard@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.0.2.tgz#021211a9f077e63a6847e7bb9ab4247327ac8e0c" - integrity sha512-nKptN8l7jksXkwFk++PhJB3cCDTcXOEyhISIN86Ue2feJ1LFyY3PrY3/xT2keXlJSY5bpmbiTG0f885/YKAvTA== - eslint-scope@^5.0.0, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -7505,7 +7440,7 @@ ignore@^4.0.3, ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.1.1, ignore@^5.1.4: +ignore@^5.1.4: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== @@ -8925,24 +8860,6 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== -lambda-leak@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lambda-leak/-/lambda-leak-2.0.0.tgz#771985d3628487f6e885afae2b54510dcfb2cd7e" - integrity sha1-dxmF02KEh/boha+uK1RRDc+yzX4= - -lambda-tester@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/lambda-tester/-/lambda-tester-3.6.0.tgz#ceb7d4f4f0da768487a05cff37dcd088508b5247" - integrity sha512-F2ZTGWCLyIR95o/jWK46V/WnOCFAEUG/m/V7/CLhPJ7PCM+pror1rZ6ujP3TkItSGxUfpJi0kqwidw+M/nEqWw== - dependencies: - app-root-path "^2.2.1" - dotenv "^8.0.0" - dotenv-json "^1.0.0" - lambda-leak "^2.0.0" - semver "^6.1.1" - uuid "^3.3.2" - vandium-utils "^1.1.1" - lazystream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" @@ -11854,7 +11771,7 @@ resolve@^1.1.6, resolve@^1.10.0, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.13 dependencies: path-parse "^1.0.6" -resolve@^1.10.1, resolve@^1.18.1: +resolve@^1.18.1: version "1.18.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.18.1.tgz#018fcb2c5b207d2a6424aee361c5a266da8f4130" integrity sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA== @@ -12054,7 +11971,7 @@ semver@7.x, semver@^7.1.1, semver@^7.2.1, semver@^7.3.2: resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== -semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.2.0, semver@^6.3.0: +semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -13656,11 +13573,6 @@ validate-npm-package-name@^3.0.0: dependencies: builtins "^1.0.3" -vandium-utils@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/vandium-utils/-/vandium-utils-1.2.0.tgz#44735de4b7641a05de59ebe945f174e582db4f59" - integrity sha1-RHNd5LdkGgXeWevpRfF05YLbT1k= - vendors@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.4.tgz#e2b800a53e7a29b93506c3cf41100d16c4c4ad8e" From 7a07fbd3fec03ebea33a8f1910baa0336b82d337 Mon Sep 17 00:00:00 2001 From: Shiv Lakshminarayan Date: Wed, 4 Nov 2020 17:04:26 -0800 Subject: [PATCH 046/314] chore: fix cfnspec bump script usage of lerna command (#11291) the bump spec currently errors with `lerna: command not found` switching it to use `yarn` instead as the install script runs ahead of the usage site of the lerna command. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- scripts/bump-cfnspec.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bump-cfnspec.sh b/scripts/bump-cfnspec.sh index bceb02897e0a2..cadcc401f3dbb 100755 --- a/scripts/bump-cfnspec.sh +++ b/scripts/bump-cfnspec.sh @@ -16,7 +16,7 @@ ${pwd}/install.sh # dependencies are in fact involved in the building of new construct libraries # created upon their introduction in the CFN Specification (they incur the # dependency, not `@aws-cdk/cfnspec` itself). -lerna run build --stream \ +yarn lerna run build --stream \ --scope=@aws-cdk/cfnspec \ --scope=cfn2ts \ --scope=ubergen \ From 0e0755c997849927b26197dacace47de14b7a783 Mon Sep 17 00:00:00 2001 From: Josh Kellendonk Date: Wed, 4 Nov 2020 19:01:43 -0700 Subject: [PATCH 047/314] docs(ecs-service-extensions): add community modules with first module (#11263) Introduces a Community Extensions list to the ecs-service-extensions README as briefly discussed in #10938 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../ecs-service-extensions/README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/README.md b/packages/@aws-cdk-containers/ecs-service-extensions/README.md index b3c50e828c29b..9302b90e5d9a3 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/README.md +++ b/packages/@aws-cdk-containers/ecs-service-extensions/README.md @@ -16,9 +16,10 @@ The `Service` construct provided by this module can be extended with optional `S - [AWS X-Ray](https://aws.amazon.com/xray/) for tracing your application - [Amazon CloudWatch Agent](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Install-CloudWatch-Agent.html) for capturing per task stats -- [AWS AppMesh f](https://aws.amazon.com/app-mesh/)or adding your application to a service mesh +- [AWS AppMesh](https://aws.amazon.com/app-mesh/) for adding your application to a service mesh - [Application Load Balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html), for exposing your service to the public - [AWS FireLens](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html), for filtering and routing application logs +- [Community Extensions](#community-extensions), providing support for advanced use cases The `ServiceExtension` class is an abstract class which you can also implement in order to build your own custom service extensions for modifying your service, or @@ -300,3 +301,13 @@ const environment = Environment.fromEnvironmentAttributes(stack, 'Environment', }); ``` + +## Community Extensions + +We encourage the development of Community Service Extensions that support +advanced features. Here are some useful extensions that we have reviewed: + +* [ListenerRulesExtension](https://www.npmjs.com/package/@wheatstalk/ecs-service-extension-listener-rules) for more precise control over Application Load Balancer rules + +> Please submit a pull request so that we can review your service extension and +> list it here. From 5dcdecb2c5d6ce19517af66090cfacabed88025b Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Thu, 5 Nov 2020 09:11:42 +0000 Subject: [PATCH 048/314] fix(secretsmanager): can't export secret name from Secret (#11202) For owned Secrets, `secretName` was set to the physical name, which was set to the provided `secretName` if given, or a Token otherwise. However, the Token was never resolved, as the `secretName` isn't actually a return vaue / attribute. The fix explicitly sets the `secretName` either to the inputted name or the parsed name from the ARN. Note that this means the secret name will be the partial/"friendly" name (e.g., 'MySecret') if the secret name was passed in, and the full name (e.g., 'MySecret-123abc') otherwise. fixes #10914 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-secretsmanager/lib/secret.ts | 2 +- .../aws-secretsmanager/test/secret.test.ts | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-secretsmanager/lib/secret.ts b/packages/@aws-cdk/aws-secretsmanager/lib/secret.ts index 5728377f53e64..33bc8a709efcf 100644 --- a/packages/@aws-cdk/aws-secretsmanager/lib/secret.ts +++ b/packages/@aws-cdk/aws-secretsmanager/lib/secret.ts @@ -437,7 +437,7 @@ export class Secret extends SecretBase { }); this.encryptionKey = props.encryptionKey; - this.secretName = this.physicalName; + this.secretName = parseSecretName(this, this.secretArn); // @see https://docs.aws.amazon.com/kms/latest/developerguide/services-secrets-manager.html#asm-authz const principal = diff --git a/packages/@aws-cdk/aws-secretsmanager/test/secret.test.ts b/packages/@aws-cdk/aws-secretsmanager/test/secret.test.ts index 9cca08bd36a9f..0e56a72bc3c54 100644 --- a/packages/@aws-cdk/aws-secretsmanager/test/secret.test.ts +++ b/packages/@aws-cdk/aws-secretsmanager/test/secret.test.ts @@ -425,6 +425,23 @@ test('secretValue', () => { }); }); +describe('secretName', () => { + test.each([undefined, 'mySecret'])('when secretName is %s', (secretName) => { + const secret = new secretsmanager.Secret(stack, 'Secret', { + secretName, + }); + new cdk.CfnOutput(stack, 'MySecretName', { + value: secret.secretName, + }); + + // Creates secret name by parsing ARN. + expect(stack).toHaveOutput({ + outputName: 'MySecretName', + outputValue: { 'Fn::Select': [6, { 'Fn::Split': [':', { Ref: 'SecretA720EF05' }] }] }, + }); + }); +}); + test('import by secretArn', () => { // GIVEN const secretArn = 'arn:aws:secretsmanager:eu-west-1:111111111111:secret:MySecret-f3gDy9'; From c378f8611fac2bf86b8bc799405939ba73038b0d Mon Sep 17 00:00:00 2001 From: Shiv Lakshminarayan Date: Thu, 5 Nov 2020 02:32:51 -0800 Subject: [PATCH 049/314] chore: fix update bump cfnspec script (#11302) In #11191, we split up the running of the cfnspec update and the adding files to git/commit step into sub-shells However, variable assignments do not remain in effect after the subshell completes. Currently, the `version` variable is not accessible when we try to commit to Git. Removed the execution of these steps in sub-shells as the separation is not likely to provide a ton of benefit. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- scripts/bump-cfnspec.sh | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/scripts/bump-cfnspec.sh b/scripts/bump-cfnspec.sh index cadcc401f3dbb..dd9d182ef3ee8 100755 --- a/scripts/bump-cfnspec.sh +++ b/scripts/bump-cfnspec.sh @@ -23,15 +23,11 @@ yarn lerna run build --stream \ --include-dependencies # Run the cfnspec update -( - cd ${pwd}/packages/@aws-cdk/cfnspec - yarn update - version=$(cat cfn.version) -) +cd ${pwd}/packages/@aws-cdk/cfnspec +yarn update +version=$(cat cfn.version) # Come back to root, add all files to git and commit -( - cd ${pwd} - git add . - git commit -a -m "feat: cloudformation spec v${version}" || true # don't fail if there are no updates -) +cd ${pwd} +git add . +git commit -a -m "feat: cloudformation spec v${version}" || true # don't fail if there are no updates \ No newline at end of file From 884539b231245c893c456b2c619fe661cd39960f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20M=C3=BCller?= Date: Thu, 5 Nov 2020 13:00:36 +0100 Subject: [PATCH 050/314] feat(rds): add grant method for Data API (#10748) This PR adds a `grantDataApi` method to `IServerlessCluster` to grant access to the Data API. The "minimum required permissions" to access the Data API are listed [here](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html#data-api.access). This PR further restricts the IAM policy statement to the specific cluster (in favor of wildcarding). Read access to the cluster secret must be granted separately via the secrets `grantRead` method. TBH, the `secretmanager` actions included in the two IAM policy statements in the [official documentation](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html#data-api.access). are rather confusing to me: * I don't know why the resource name of the resource listed in "SecretsManagerDbCredentialsAccess" statement has a `rds-db-credentials` prefix. That prefix is not present in * I don't know what the `secretmanager` actions in the "RDSDataServiceAccess" statement are for closes #10744 BREAKING CHANGE: Serverless cluster `enableHttpEndpoint` renamed to `enableDataApi` ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-rds/README.md | 47 +++++- packages/@aws-cdk/aws-rds/lib/perms.ts | 8 + .../aws-rds/lib/serverless-cluster.ts | 66 +++++++- .../aws-rds/test/test.serverless-cluster.ts | 154 +++++++++++++++++- 4 files changed, 259 insertions(+), 16 deletions(-) create mode 100644 packages/@aws-cdk/aws-rds/lib/perms.ts diff --git a/packages/@aws-cdk/aws-rds/README.md b/packages/@aws-cdk/aws-rds/README.md index 5ca811eabe8c7..6efbdb42c8ac1 100644 --- a/packages/@aws-cdk/aws-rds/README.md +++ b/packages/@aws-cdk/aws-rds/README.md @@ -229,7 +229,7 @@ See also [@aws-cdk/aws-secretsmanager](https://github.com/aws/aws-cdk/blob/maste ### IAM Authentication You can also authenticate to a database instance using AWS Identity and Access Management (IAM) database authentication; -See https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html for more information +See for more information and a list of supported versions and limitations. The following example shows enabling IAM authentication for a database instance and granting connection access to an IAM role. @@ -245,12 +245,12 @@ instance.grantConnect(role); // Grant the role connection access to the DB. ``` **Note**: In addition to the setup above, a database user will need to be created to support IAM auth. -See https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.DBAccounts.html for setup instructions. +See for setup instructions. ### Kerberos Authentication You can also authenticate using Kerberos to a database instance using AWS Managed Microsoft AD for authentication; -See https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/kerberos-authentication.html for more information +See for more information and a list of supported versions and limitations. The following example shows enabling domain support for a database instance and creating an IAM role to access @@ -274,7 +274,7 @@ const instance = new rds.DatabaseInstance(stack, 'Instance', { **Note**: In addition to the setup above, you need to make sure that the database instance has network connectivity to the domain controllers. This includes enabling cross-VPC traffic if in a different VPC and setting up the appropriate security groups/network ACL to allow traffic between the database instance and domain controllers. -Once configured, see https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/kerberos-authentication.html for details +Once configured, see for details on configuring users for each available database engine. ### Metrics @@ -412,7 +412,7 @@ in the cloud without managing any database instances. The following example initializes an Aurora Serverless PostgreSql cluster. Aurora Serverless clusters can specify scaling properties which will be used to -automatically scale the database cluster seamlessly based on the workload. +automatically scale the database cluster seamlessly based on the workload. ```ts import * as ec2 from '@aws-cdk/aws-ec2'; @@ -431,7 +431,9 @@ const cluster = new rds.ServerlessCluster(this, 'AnotherCluster', { } }); ``` + Aurora Serverless Clusters do not support the following features: + * Loading data from an Amazon S3 bucket * Saving data to an Amazon S3 bucket * Invoking an AWS Lambda function with an Aurora MySQL native function @@ -448,3 +450,38 @@ Aurora Serverless Clusters do not support the following features: Read more about the [limitations of Aurora Serverless](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html#aurora-serverless.limitations) Learn more about using Amazon Aurora Serverless by reading the [documentation](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html) + +#### Data API + +You can access your Aurora Serverless DB cluster using the built-in Data API. The Data API doesn't require a persistent connection to the DB cluster. Instead, it provides a secure HTTP endpoint and integration with AWS SDKs. + +The following example shows granting Data API access to a Lamba function. + +```ts +import * as ec2 from '@aws-cdk/aws-ec2'; +import * as lambda from '@aws-cdk/aws-lambda'; +import * as rds from '@aws-cdk/aws-rds'; + +const vpc = new ec2.Vpc(this, 'MyVPC'); + +const cluster = new rds.ServerlessCluster(this, 'AnotherCluster', { + engine: rds.DatabaseClusterEngine.AURORA_MYSQL, + vpc, + enableDataApi: true, // Optional - will be automatically set if you call grantDataApiAccess() +}); + +const fn = new lambda.Function(this, 'MyFunction', { + runtime: lambda.Runtime.NODEJS_10_X, + handler: 'index.handler', + code: lambda.Code.fromAsset(path.join(__dirname, 'lambda-handler')), + environment: { + CLUSTER_ARN: cluster.clusterArn, + SECRET_ARN: cluster.secret.secretArn, + }, +}); +cluster.grantDataApiAccess(fn) +``` + +**Note**: To invoke the Data API, the resource will need to read the secret associated with the cluster. + +To learn more about using the Data API, see the [documentation](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html). diff --git a/packages/@aws-cdk/aws-rds/lib/perms.ts b/packages/@aws-cdk/aws-rds/lib/perms.ts new file mode 100644 index 0000000000000..247ec53d987eb --- /dev/null +++ b/packages/@aws-cdk/aws-rds/lib/perms.ts @@ -0,0 +1,8 @@ +// minimal set of permissions based on https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html#data-api.access +export const DATA_API_ACTIONS = [ + 'rds-data:BatchExecuteStatement', + 'rds-data:BeginTransaction', + 'rds-data:CommitTransaction', + 'rds-data:ExecuteStatement', + 'rds-data:RollbackTransaction', +]; \ No newline at end of file diff --git a/packages/@aws-cdk/aws-rds/lib/serverless-cluster.ts b/packages/@aws-cdk/aws-rds/lib/serverless-cluster.ts index 43305ac2d6e26..c6b1d7edc514a 100644 --- a/packages/@aws-cdk/aws-rds/lib/serverless-cluster.ts +++ b/packages/@aws-cdk/aws-rds/lib/serverless-cluster.ts @@ -1,12 +1,14 @@ import * as ec2 from '@aws-cdk/aws-ec2'; +import * as iam from '@aws-cdk/aws-iam'; import * as kms from '@aws-cdk/aws-kms'; import * as secretsmanager from '@aws-cdk/aws-secretsmanager'; -import { Resource, Duration, Token, Annotations, RemovalPolicy, IResource, Stack } from '@aws-cdk/core'; +import { Resource, Duration, Token, Annotations, RemovalPolicy, IResource, Stack, Lazy } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { IClusterEngine } from './cluster-engine'; import { DatabaseSecret } from './database-secret'; import { Endpoint } from './endpoint'; import { IParameterGroup } from './parameter-group'; +import { DATA_API_ACTIONS } from './perms'; import { applyRemovalPolicy, defaultDeletionProtection, DEFAULT_PASSWORD_EXCLUDE_CHARS } from './private/util'; import { Credentials, RotationMultiUserOptions, RotationSingleUserOptions } from './props'; import { CfnDBCluster } from './rds.generated'; @@ -39,6 +41,13 @@ export interface IServerlessCluster extends IResource, ec2.IConnectable, secrets * @attribute ReadEndpointAddress */ readonly clusterReadEndpoint: Endpoint; + + /** + * Grant the given identity to access to the Data API. + * + * @param grantee The principal to grant access to + */ + grantDataApiAccess(grantee: iam.IGrantable): iam.Grant } /** * Properties to configure an Aurora Serverless Cluster @@ -89,14 +98,13 @@ export interface ServerlessClusterProps { readonly deletionProtection?: boolean; /** - * Whether to enable the HTTP endpoint for an Aurora Serverless database cluster. - * The HTTP endpoint must be explicitly enabled to enable the Data API. + * Whether to enable the Data API. * * @see https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html * * @default false */ - readonly enableHttpEndpoint?: boolean; + readonly enableDataApi?: boolean; /** * The VPC that this Aurora Serverless cluster has been created in. @@ -194,6 +202,13 @@ export interface ServerlessClusterAttributes { * @default - no reader address */ readonly readerEndpointAddress?: string; + + /** + * The secret attached to the database cluster + * + * @default - no secret + */ + readonly secret?: secretsmanager.ISecret; } /** @@ -288,6 +303,13 @@ abstract class ServerlessClusterBase extends Resource implements IServerlessClus */ public abstract readonly connections: ec2.Connections; + /** + * The secret attached to this cluster + */ + public abstract readonly secret?: secretsmanager.ISecret + + protected abstract enableDataApi?: boolean; + /** * The ARN of the cluster */ @@ -300,6 +322,27 @@ abstract class ServerlessClusterBase extends Resource implements IServerlessClus }); } + /** + * Grant the given identity to access to the Data API, including read access to the secret attached to the cluster if present + * + * @param grantee The principal to grant access to + */ + public grantDataApiAccess(grantee: iam.IGrantable): iam.Grant { + if (this.enableDataApi === false) { + throw new Error('Cannot grant Data API access when the Data API is disabled'); + } + + this.enableDataApi = true; + const ret = iam.Grant.addToPrincipal({ + grantee, + actions: DATA_API_ACTIONS, + resourceArns: ['*'], + scope: this, + }); + this.secret?.grantRead(grantee); + return ret; + } + /** * Renders the secret attachment target specifications. */ @@ -334,11 +377,10 @@ export class ServerlessCluster extends ServerlessClusterBase { public readonly clusterReadEndpoint: Endpoint; public readonly connections: ec2.Connections; - /** - * The secret attached to this cluster - */ public readonly secret?: secretsmanager.ISecret; + protected enableDataApi?: boolean + private readonly subnetGroup: ISubnetGroup; private readonly vpc: ec2.IVpc; private readonly vpcSubnets?: ec2.SubnetSelection; @@ -355,6 +397,8 @@ export class ServerlessCluster extends ServerlessClusterBase { this.singleUserRotationApplication = props.engine.singleUserRotationApplication; this.multiUserRotationApplication = props.engine.multiUserRotationApplication; + this.enableDataApi = props.enableDataApi; + const { subnetIds } = this.vpc.selectSubnets(this.vpcSubnets); // Cannot test whether the subnets are in different AZs, but at least we can test the amount. @@ -410,7 +454,7 @@ export class ServerlessCluster extends ServerlessClusterBase { engine: props.engine.engineType, engineVersion: props.engine.engineVersion?.fullVersion, engineMode: 'serverless', - enableHttpEndpoint: props.enableHttpEndpoint, + enableHttpEndpoint: Lazy.anyValue({ produce: () => this.enableDataApi }), kmsKeyId: props.storageEncryptionKey?.keyArn, masterUsername: credentials.username, masterUserPassword: credentials.password?.toString(), @@ -509,6 +553,10 @@ class ImportedServerlessCluster extends ServerlessClusterBase implements IServer public readonly clusterIdentifier: string; public readonly connections: ec2.Connections; + public readonly secret?: secretsmanager.ISecret; + + protected readonly enableDataApi = true + private readonly _clusterEndpoint?: Endpoint; private readonly _clusterReadEndpoint?: Endpoint; @@ -523,6 +571,8 @@ class ImportedServerlessCluster extends ServerlessClusterBase implements IServer defaultPort, }); + this.secret = attrs.secret; + this._clusterEndpoint = (attrs.clusterEndpointAddress && attrs.port) ? new Endpoint(attrs.clusterEndpointAddress, attrs.port) : undefined; this._clusterReadEndpoint = (attrs.readerEndpointAddress && attrs.port) ? new Endpoint(attrs.readerEndpointAddress, attrs.port) : undefined; } diff --git a/packages/@aws-cdk/aws-rds/test/test.serverless-cluster.ts b/packages/@aws-cdk/aws-rds/test/test.serverless-cluster.ts index e3bc737ba9963..de3c8a0018beb 100644 --- a/packages/@aws-cdk/aws-rds/test/test.serverless-cluster.ts +++ b/packages/@aws-cdk/aws-rds/test/test.serverless-cluster.ts @@ -1,9 +1,10 @@ import { ABSENT, expect, haveResource, haveResourceLike, ResourcePart, SynthUtils } from '@aws-cdk/assert'; import * as ec2 from '@aws-cdk/aws-ec2'; +import * as iam from '@aws-cdk/aws-iam'; import * as kms from '@aws-cdk/aws-kms'; import * as cdk from '@aws-cdk/core'; import { Test } from 'nodeunit'; -import { AuroraPostgresEngineVersion, ServerlessCluster, DatabaseClusterEngine, ParameterGroup, AuroraCapacityUnit } from '../lib'; +import { AuroraPostgresEngineVersion, ServerlessCluster, DatabaseClusterEngine, ParameterGroup, AuroraCapacityUnit, DatabaseSecret } from '../lib'; export = { 'can create a Serverless Cluster with Aurora Postgres database engine'(test: Test) { @@ -506,7 +507,7 @@ export = { test.done(); }, - 'can enable http endpoint'(test: Test) { + 'can enable Data API'(test: Test) { // GIVEN const stack = testStack(); const vpc = ec2.Vpc.fromLookup(stack, 'VPC', { isDefault: true }); @@ -515,7 +516,7 @@ export = { new ServerlessCluster(stack, 'Database', { engine: DatabaseClusterEngine.AURORA_MYSQL, vpc, - enableHttpEndpoint: true, + enableDataApi: true, }); //THEN @@ -671,8 +672,155 @@ export = { }); test.done(); }, + + 'can grant Data API access'(test: Test) { + // GIVEN + const stack = testStack(); + const vpc = ec2.Vpc.fromLookup(stack, 'VPC', { isDefault: true }); + const cluster = new ServerlessCluster(stack, 'Database', { + engine: DatabaseClusterEngine.AURORA_MYSQL, + vpc, + enableDataApi: true, + }); + const user = new iam.User(stack, 'User'); + + // WHEN + cluster.grantDataApiAccess(user); + + // THEN + expect(stack).to(haveResource('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ + { + Action: [ + 'rds-data:BatchExecuteStatement', + 'rds-data:BeginTransaction', + 'rds-data:CommitTransaction', + 'rds-data:ExecuteStatement', + 'rds-data:RollbackTransaction', + ], + Effect: 'Allow', + Resource: '*', + }, + { + Action: [ + 'secretsmanager:GetSecretValue', + 'secretsmanager:DescribeSecret', + ], + Effect: 'Allow', + Resource: { + Ref: 'DatabaseSecretAttachmentE5D1B020', + }, + }, + ], + Version: '2012-10-17', + }, + PolicyName: 'UserDefaultPolicy1F97781E', + Users: [ + { + Ref: 'User00B015A1', + }, + ], + })); + + test.done(); + }, + + 'can grant Data API access on imported cluster with given secret'(test: Test) { + // GIVEN + const stack = testStack(); + const secret = new DatabaseSecret(stack, 'Secret', { + username: 'admin', + }); + const cluster = ServerlessCluster.fromServerlessClusterAttributes(stack, 'Cluster', { + clusterIdentifier: 'ImportedDatabase', + secret, + }); + const user = new iam.User(stack, 'User'); + + + // WHEN + cluster.grantDataApiAccess(user); + + // THEN + expect(stack).to(haveResource('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ + { + Action: [ + 'rds-data:BatchExecuteStatement', + 'rds-data:BeginTransaction', + 'rds-data:CommitTransaction', + 'rds-data:ExecuteStatement', + 'rds-data:RollbackTransaction', + ], + Effect: 'Allow', + Resource: '*', + }, + { + Action: [ + 'secretsmanager:GetSecretValue', + 'secretsmanager:DescribeSecret', + ], + Effect: 'Allow', + Resource: { + Ref: 'SecretA720EF05', + }, + }, + ], + Version: '2012-10-17', + }, + PolicyName: 'UserDefaultPolicy1F97781E', + Users: [ + { + Ref: 'User00B015A1', + }, + ], + })); + + test.done(); + }, + + 'grant Data API access enables the Data API'(test: Test) { + // GIVEN + const stack = testStack(); + const vpc = ec2.Vpc.fromLookup(stack, 'VPC', { isDefault: true }); + const cluster = new ServerlessCluster(stack, 'Database', { + engine: DatabaseClusterEngine.AURORA_MYSQL, + vpc, + }); + const user = new iam.User(stack, 'User'); + + // WHEN + cluster.grantDataApiAccess(user); + + //THEN + expect(stack).to(haveResource('AWS::RDS::DBCluster', { + EnableHttpEndpoint: true, + })); + + test.done(); + }, + + 'grant Data API access throws if the Data API is disabled'(test: Test) { + // GIVEN + const stack = testStack(); + const vpc = ec2.Vpc.fromLookup(stack, 'VPC', { isDefault: true }); + const cluster = new ServerlessCluster(stack, 'Database', { + engine: DatabaseClusterEngine.AURORA_MYSQL, + vpc, + enableDataApi: false, + }); + const user = new iam.User(stack, 'User'); + + // WHEN + test.throws(() => cluster.grantDataApiAccess(user), /Cannot grant Data API access when the Data API is disabled/); + + test.done(); + }, }; + function testStack() { const stack = new cdk.Stack(undefined, undefined, { env: { account: '12345', region: 'us-test-1' } }); stack.node.setContext('availability-zones:12345:us-test-1', ['us-test-1a', 'us-test-1b']); From 1ec7e62e5851ced72174a3ae77264dfba0d0ccf3 Mon Sep 17 00:00:00 2001 From: Elad Ben-Israel Date: Thu, 5 Nov 2020 16:28:31 +0200 Subject: [PATCH 051/314] chore: multiple release branches without merge conflicts (#11307) As we prepare for 2.0, we need to release the CDK concurrently in multiple version lines (1.x and 2.0.0-alpha.x). In order to avoid merge conflicts of `lerna.json` and `CHANGELOG.md` between the v1 and v2 branches, we extracted the version number from `lerna.json` to `version.vNNN.json` and changelog to `CHANGELOG.vNNN.json` (1.0 is still CHANGELOG.md because it is tracked externally). A new file called `release.json` has been introduced and includes *static* information about which version line this branch serves. This allows us to avoid merge conflicts caused by version bumps between release branches. This change also cleans up some of the scripts related to versioning and bumps. The main bump script is now implemented in `scripts/bump.js` and interacts with `standard-version` as a library instead of through the CLI. To that end, the `.versionrc.json` file was also removed. See CONTRIBUTING for more details about how this works. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .gitignore | 1 + .versionrc.json | 5 - CONTRIBUTING.md | 71 ++++++--- bump.sh | 19 +-- lerna.json | 5 +- pack.sh | 17 +-- package.json | 3 +- packages/aws-cdk/CONTRIBUTING.md | 6 +- release.json | 4 + scripts/align-version.js | 5 +- scripts/align-version.sh | 2 +- scripts/bump-candidate.sh | 11 +- scripts/bump.js | 49 +++++++ scripts/changelog-experimental-fix.sh | 11 ++ scripts/get-version-marker.js | 13 -- scripts/get-version.js | 18 --- scripts/resolve-version-lib.js | 76 ++++++++++ scripts/resolve-version.js | 5 + scripts/script-tests/.gitignore | 8 + scripts/script-tests/README.md | 3 + scripts/script-tests/package.json | 15 ++ scripts/script-tests/resolve-version.test.js | 147 +++++++++++++++++++ tools/pkglint/lib/rules.ts | 11 +- version.v1.json | 3 + 24 files changed, 406 insertions(+), 102 deletions(-) delete mode 100644 .versionrc.json create mode 100644 release.json create mode 100755 scripts/bump.js create mode 100755 scripts/changelog-experimental-fix.sh delete mode 100644 scripts/get-version-marker.js delete mode 100644 scripts/get-version.js create mode 100755 scripts/resolve-version-lib.js create mode 100755 scripts/resolve-version.js create mode 100644 scripts/script-tests/.gitignore create mode 100644 scripts/script-tests/README.md create mode 100644 scripts/script-tests/package.json create mode 100644 scripts/script-tests/resolve-version.test.js create mode 100644 version.v1.json diff --git a/.gitignore b/.gitignore index 96e153ea6e266..03b7512a00c05 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,4 @@ yarn-error.log # Cloud9 .c9 +/.versionrc.json diff --git a/.versionrc.json b/.versionrc.json deleted file mode 100644 index 3178955551057..0000000000000 --- a/.versionrc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "skip": { "tag": true }, - "packageFiles": [ { "filename": "lerna.json", "type": "json" } ], - "bumpFiles": [ { "filename": "lerna.json", "type": "json" } ] -} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0c5137c77a4a5..b538f7c009ee0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -779,24 +779,59 @@ CDK](https://github.com/aws/aws-cdk/issues/3398) we will either remove the legacy behavior or flip the logic for all these features and then reset the `FEATURE_FLAGS` map for the next cycle. -### Versioning - -All `package.json` files in this repo use a stable marker version of `0.0.0`. -This means that when you declare dependencies, you should always use `0.0.0`. -This makes it easier for us to bump a new version (the `bump.sh` script will -just update the central version and create a CHANGELOG entry) and also reduces -the chance of merge conflicts after a new version is released. - -Additional scripts that take part in the versioning mechanism: - -- `scripts/get-version.js` can be used to obtain the actual version of the repo. - You can use either from JavaScript code by `require('./scripts/get-version')` - or from a shell script `node -p "require('./scripts/get-version')"`. -- `scripts/get-version-marker.js` returns `0.0.0` and used to DRY the version - marker. -- `scripts/align-version.sh` and `scripts/align-version.js` are used to align - all package.json files in the repo to the official version. This script is - invoked in CI builds and should not be used inside a development environment. +### Versioning and Release + +The `release.json` file at the root of the repo determines which release line +this branch belongs to. + +```js +{ + "majorVersion": 1 | 2, + "releaseType": "stable" | "alpha" | "rc" +} +``` + +To reduce merge conflicts in automatic merges between version branches, the +current version number is stored under `version.vNN.json` (where `NN` is +`majorVersion`) and changelogs are stored under `CHANGELOG.NN.md` (for +historical reasons, the changelog for 1.x is under `CHANGELOG.md`). When we +fork to a new release branch (e.g. `v2-main`), we will update `release.json` in +this branch to reflect the new version line, and this information will be used +to determine how releases are cut. + +The actual `version` field in all `package.json` files should always be `0.0.0`. +This means that local development builds will use version `0.0.0` instead of the +official version from the version file. + +#### `./bump.sh` + +This script uses [standard-version] to update the version in `version.vNN.json` +to the next version. By default it will perform a **minor** bump, but `./bump.sh +patch` can be used to perform a patch release if that's needed. + +This script will also update the relevant changelog file. + +[standard-version]: https://github.com/conventional-changelog/standard-version + +#### `scripts/resolve-version.js` + +The script evaluates evaluates the configuration in `release.json` and exports an +object like this: + +```js +{ + version: '2.0.0-alpha.1', // the current version + versionFile: 'version.v2.json', // the version file + changelogFile: 'CHANGELOG.v2.md', // changelog file name + prerelease: 'alpha', // prerelease tag (undefined for stable) + marker: '0.0.0' // version marker in package.json files +} +``` + +#### scripts/align-version.sh + +In official builds, the `scripts/align-version.sh` is used to update all +`package.json` files based on the version from `version.vNN.json`. ## Troubleshooting diff --git a/bump.sh b/bump.sh index 028779e5a748d..750d452da496d 100755 --- a/bump.sh +++ b/bump.sh @@ -13,21 +13,4 @@ # # -------------------------------------------------------------------------------------------------- set -euo pipefail -version=${1:-minor} - -echo "Starting ${version} version bump" - -# /bin/bash ./install.sh - -# Generate CHANGELOG and create a commit (see .versionrc.json) -npx standard-version --release-as ${version} - -# I am sorry. -# -# I've gone diving through the code of `conventional-changelog` to see if there -# was a way to configure the string and ultimately I decided that a 'sed' was the simpler -# way to go. -sed -i.tmp -e 's/BREAKING CHANGES$/BREAKING CHANGES TO EXPERIMENTAL FEATURES/' CHANGELOG.md -rm CHANGELOG.md.tmp -git add CHANGELOG.md -git commit --amend --no-edit +./scripts/bump.js ${1:-minor} diff --git a/lerna.json b/lerna.json index 16f32cc984c13..0fcae573a32ae 100644 --- a/lerna.json +++ b/lerna.json @@ -8,8 +8,9 @@ "packages/@aws-cdk-containers/*", "packages/@monocdk-experiment/*", "packages/@aws-cdk/*/lambda-packages/*", - "tools/*" + "tools/*", + "scripts/script-tests" ], "rejectCycles": "true", - "version": "1.71.0" + "version": "0.0.0" } diff --git a/pack.sh b/pack.sh index 02b901f141273..a61a461ce9f3e 100755 --- a/pack.sh +++ b/pack.sh @@ -7,6 +7,11 @@ export PATH=$PWD/node_modules/.bin:$PATH export NODE_OPTIONS="--max-old-space-size=4096 ${NODE_OPTIONS:-}" root=$PWD +# Get version and changelog file name (these require that .versionrc.json would have been generated) +version=$(node -p "require('./scripts/resolve-version').version") +changelog_file=$(node -p "require('./scripts/resolve-version').changelogFile") +marker=$(node -p "require('./scripts/resolve-version').marker") + PACMAK=${PACMAK:-jsii-pacmak} ROSETTA=${ROSETTA:-jsii-rosetta} TMPDIR=${TMPDIR:-$(dirname $(mktemp -u))} @@ -57,15 +62,6 @@ done # Remove a JSII aggregate POM that may have snuk past rm -rf dist/java/software/amazon/jsii -# Get version -version="$(node -p "require('./scripts/get-version')")" - -# Ensure we don't publish anything beyond 1.x for now -if [[ ! "${version}" == "1."* ]]; then - echo "ERROR: accidentally releasing a major version? Expecting repo version to start with '1.' but got '${version}'" - exit 1 -fi - # Get commit from CodePipeline (or git, if we are in CodeBuild) # If CODEBUILD_RESOLVED_SOURCE_VERSION is not defined (i.e. local # build or CodePipeline build), use the HEAD commit hash). @@ -83,12 +79,11 @@ cat > ${distdir}/build.json < { + console.error(err.stack); + process.exit(1); +}); diff --git a/scripts/changelog-experimental-fix.sh b/scripts/changelog-experimental-fix.sh new file mode 100755 index 0000000000000..15284ac0c69bc --- /dev/null +++ b/scripts/changelog-experimental-fix.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -euo pipefail +changelog="${1:-}" + +if [ -z "${changelog}" ]; then + echo "Usage: $0 CHANGELOG.md" + exit 1 +fi + +sed -i.tmp -e 's/BREAKING CHANGES$/BREAKING CHANGES TO EXPERIMENTAL FEATURES/' ${changelog} +rm ${changelog}.tmp diff --git a/scripts/get-version-marker.js b/scripts/get-version-marker.js deleted file mode 100644 index e5f8c49806a67..0000000000000 --- a/scripts/get-version-marker.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Returns the version marker used to indicate this is a local dependency. - * - * Usage: - * - * const version = require('./get-version-marker'); - * - * Or from the command line: - * - * node -p require('./get-version-marker') - * - */ -module.exports = '0.0.0'; diff --git a/scripts/get-version.js b/scripts/get-version.js deleted file mode 100644 index 9e6972582c427..0000000000000 --- a/scripts/get-version.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Returns the current repo version. - * - * Usage: - * - * const version = require('./get-version'); - * - * Or from the command line: - * - * node -p require('./get-version') - * - */ -const versionFile = require('../.versionrc.json').packageFiles[0].filename; -if (!versionFile) { - throw new Error(`unable to determine version filename from .versionrc.json at the root of the repo`); -} - -module.exports = require(`../${versionFile}`).version; diff --git a/scripts/resolve-version-lib.js b/scripts/resolve-version-lib.js new file mode 100755 index 0000000000000..a4b3d1d9f22b4 --- /dev/null +++ b/scripts/resolve-version-lib.js @@ -0,0 +1,76 @@ +#!/usr/bin/env node +const path = require('path'); +const fs = require('fs'); + +//============================================================= +// UNIT TESTS: tools/script-tests/test/resolve-version.test.js +//============================================================= + +function resolveVersion(rootdir) { + const ALLOWED_RELEASE_TYPES = [ 'alpha', 'rc', 'stable' ]; + const MIN_MAJOR = 1, MAX_MAJOR = 2; // extra safety: update to allow new major versions + + // + // parse release.json + // + const releaseFile = path.join(rootdir, 'release.json'); + const releaseConfig = require(releaseFile); + const majorVersion = releaseConfig.majorVersion; + const releaseType = releaseConfig.releaseType; + if (!majorVersion) { throw new Error(`"majorVersion"" must be defined in ${releaseFile}`); } + if (!releaseType) { throw new Error(`"releaseType" must be defined in ${releaseFile}`); } + if (typeof(majorVersion) !== 'number') { throw new Error(`majorVersion=${majorVersion} must be a number`); } + if (majorVersion < MIN_MAJOR || majorVersion > MAX_MAJOR) { throw new Error(`majorVersion=${majorVersion} is an unsupported major version (should be between ${MIN_MAJOR} and ${MAX_MAJOR})`); } + if (!ALLOWED_RELEASE_TYPES.includes(releaseType)) { throw new Error(`releaseType=${releaseType} is not allowed. Allowed values: ${ALLOWED_RELEASE_TYPES.join(',')}`); } + + // + // resolve and check that we have a version file + // + + const versionFile = `version.v${majorVersion}.json`; + const versionFilePath = path.join(rootdir, versionFile); + if (!fs.existsSync(versionFilePath)) { + throw new Error(`unable to find version file ${versionFile} for major version ${majorVersion}`); + } + + // + // validate that current version matches the requirements + // + + const currentVersion = require(versionFilePath).version; + console.error(`current version: ${currentVersion}`); + if (!currentVersion.startsWith(`${majorVersion}.`)) { + throw new Error(`current version "${currentVersion}" does not use the expected major version ${majorVersion}`); + } + if (releaseType === 'stable') { + if (currentVersion.includes('-')) { + throw new Error(`found pre-release tag in version specified in ${versionFile} is ${currentVersion} but "releaseType"" is set to "stable"`); + } + } else { + if (!currentVersion.includes(`-${releaseType}.`)) { + throw new Error(`could not find pre-release tag "${releaseType}" in current version "${currentVersion}" defined in ${versionFile}`); + } + } + + // + // determine changelog file name + // + + const changelogFile = majorVersion === 1 + ? 'CHANGELOG.md' + : `CHANGELOG.v${majorVersion}.md`; + + // + // export all of it + // + + return { + version: currentVersion, + versionFile: versionFile, + changelogFile: changelogFile, + prerelease: releaseType !== 'stable' ? releaseType : undefined, + marker: '0.0.0', + }; +} + +module.exports = resolveVersion; \ No newline at end of file diff --git a/scripts/resolve-version.js b/scripts/resolve-version.js new file mode 100755 index 0000000000000..60ee3a018a3fe --- /dev/null +++ b/scripts/resolve-version.js @@ -0,0 +1,5 @@ +#!/usr/bin/env node +const path = require('path'); +const ROOTDIR = path.resolve(__dirname, '..'); +const resolveVersion = require('./resolve-version-lib'); +module.exports = resolveVersion(ROOTDIR); diff --git a/scripts/script-tests/.gitignore b/scripts/script-tests/.gitignore new file mode 100644 index 0000000000000..dfd5365951031 --- /dev/null +++ b/scripts/script-tests/.gitignore @@ -0,0 +1,8 @@ + +.LAST_BUILD +*.snk +junit.xml +.nyc_output +coverage +nyc.config.js +!.eslintrc.js \ No newline at end of file diff --git a/scripts/script-tests/README.md b/scripts/script-tests/README.md new file mode 100644 index 0000000000000..a819fff580b1e --- /dev/null +++ b/scripts/script-tests/README.md @@ -0,0 +1,3 @@ +# script tests + +This directory includes tests for scripts under `./scripts`. \ No newline at end of file diff --git a/scripts/script-tests/package.json b/scripts/script-tests/package.json new file mode 100644 index 0000000000000..2c6d0ff48e94a --- /dev/null +++ b/scripts/script-tests/package.json @@ -0,0 +1,15 @@ +{ + "name": "script-tests", + "private": true, + "version": "0.0.0", + "description": "various tests for development and build scripts", + "scripts": { + "build": "echo ok", + "test": "jest", + "build+test": "npm run build && npm test", + "build+test+package": "npm run build+test" + }, + "devDependencies": { + "jest": "^26.6.2" + } +} diff --git a/scripts/script-tests/resolve-version.test.js b/scripts/script-tests/resolve-version.test.js new file mode 100644 index 0000000000000..67621d4fc56af --- /dev/null +++ b/scripts/script-tests/resolve-version.test.js @@ -0,0 +1,147 @@ +const fs = require('fs'); +const os = require('os'); +const path = require('path'); +const resolveVersion = require('../resolve-version-lib'); + +beforeAll(() => spyOn(console, 'error')); + +happy({ + name: 'stable release', + inputs: { + 'release.json': { majorVersion: 2, releaseType: 'stable' }, + 'version.v2.json': { version: '2.1.0' }, + }, + expected: { + changelogFile: 'CHANGELOG.v2.md', + marker: '0.0.0', + prerelease: undefined, + version: '2.1.0', + versionFile: 'version.v2.json' + } +}); + +happy({ + name: 'alpha releases', + inputs: { + 'release.json': { majorVersion: 2, releaseType: 'alpha' }, + 'version.v2.json': { version: '2.1.0-alpha.0' }, + }, + expected: { + changelogFile: 'CHANGELOG.v2.md', + marker: '0.0.0', + prerelease: 'alpha', + version: '2.1.0-alpha.0', + versionFile: 'version.v2.json' + } +}); + +happy({ + name: 'rc releases', + inputs: { + 'release.json': { majorVersion: 2, releaseType: 'rc' }, + 'version.v2.json': { version: '2.1.0-rc.0' }, + }, + expected: { + changelogFile: 'CHANGELOG.v2.md', + marker: '0.0.0', + prerelease: 'rc', + version: '2.1.0-rc.0', + versionFile: 'version.v2.json' + } +}); + +happy({ + name: 'v1 changelog is still called CHANGELOG.md for backwards compatibility', + inputs: { + 'release.json': { majorVersion: 1, releaseType: 'stable' }, + 'version.v1.json': { version: '1.72.0' } + }, + expected: { + changelogFile: 'CHANGELOG.md', + marker: '0.0.0', + prerelease: undefined, + version: '1.72.0', + versionFile: 'version.v1.json' + } +}); + +failure({ + name: 'invalid release type', + inputs: { 'release.json': { majorVersion: 2, releaseType: 'build' } }, + expected: 'releaseType=build is not allowed. Allowed values: alpha,rc,stable' +}); + +failure({ + name: 'invalid major version (less then min)', + inputs: { 'release.json': { majorVersion: -1, releaseType: 'rc' } }, + expected: 'majorVersion=-1 is an unsupported major version (should be between 1 and 2)' +}); + +failure({ + name: 'invalid major version (over max)', + inputs: { 'release.json': { majorVersion: 3, releaseType: 'rc' } }, + expected: 'majorVersion=3 is an unsupported major version (should be between 1 and 2)' +}); + +failure({ + name: 'invalid major version (non-number)', + inputs: { 'release.json': { majorVersion: '2', releaseType: 'rc' } }, + expected: 'majorVersion=2 must be a number' +}); + +failure({ + name: 'no version file', + inputs: { 'release.json': { majorVersion: 2, releaseType: 'alpha' } }, + expected: 'unable to find version file version.v2.json for major version 2' +}); + +failure({ + name: 'actual version not the right major', + inputs: { + 'release.json': { majorVersion: 1, releaseType: 'stable' }, + 'version.v1.json': { version: '2.0.0' } + }, + expected: 'current version "2.0.0" does not use the expected major version 1' +}); + +failure({ + name: 'actual version not the right pre-release', + inputs: { + 'release.json': { majorVersion: 2, releaseType: 'alpha' }, + 'version.v2.json': { version: '2.0.0-rc.0' } + }, + expected: 'could not find pre-release tag "alpha" in current version "2.0.0-rc.0" defined in version.v2.json' +}); + +failure({ + name: 'actual version not the right pre-release (stable)', + inputs: { + 'release.json': { majorVersion: 2, releaseType: 'stable' }, + 'version.v2.json': { version: '2.0.0-alpha.0' } + }, + expected: 'found pre-release tag in version specified in version.v2.json is 2.0.0-alpha.0 but "releaseType"" is set to "stable"' +}); + +function happy({ name, inputs, expected } = opts) { + test(name, () => { + const tmpdir = stage(inputs); + const actual = resolveVersion(tmpdir); + expect(actual).toStrictEqual(expected); + }); +} + +function failure({ name, inputs, expected } = opts) { + test(name, () => { + const tmpdir = stage(inputs); + expect(() => resolveVersion(tmpdir)).toThrow(expected); + }); +} + +function stage(inputs) { + const tmpdir = fs.mkdtempSync(path.join(os.tmpdir(), 'resolve-version-')); + for (const [ name, contents ] of Object.entries(inputs)) { + const data = typeof(contents) === 'string' ? contents : JSON.stringify(contents); + fs.writeFileSync(path.join(tmpdir, name), data); + } + return tmpdir; +} diff --git a/tools/pkglint/lib/rules.ts b/tools/pkglint/lib/rules.ts index 23c791c4cac23..9c35dc39ca0f0 100644 --- a/tools/pkglint/lib/rules.ts +++ b/tools/pkglint/lib/rules.ts @@ -1499,9 +1499,14 @@ function hasIntegTests(pkg: PackageJson) { * Return whether this package should use CDK build tools */ function shouldUseCDKBuildTools(pkg: PackageJson) { - // The packages that DON'T use CDKBuildTools are the package itself - // and the packages used by it. - return pkg.packageName !== 'cdk-build-tools' && pkg.packageName !== 'merkle-build' && pkg.packageName !== 'awslint'; + const exclude = [ + 'cdk-build-tools', + 'merkle-build', + 'awslint', + 'script-tests', + ]; + + return !exclude.includes(pkg.packageName); } function repoRoot(dir: string) { diff --git a/version.v1.json b/version.v1.json new file mode 100644 index 0000000000000..003975241dcee --- /dev/null +++ b/version.v1.json @@ -0,0 +1,3 @@ +{ + "version": "1.71.0" +} \ No newline at end of file From d1e88a6530e9031771c736cef8cc917b617548a6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 5 Nov 2020 15:01:10 +0000 Subject: [PATCH 052/314] chore(deps-dev): bump conventional-changelog-cli from 2.1.0 to 2.1.1 (#11301) Bumps [conventional-changelog-cli](https://github.com/conventional-changelog/conventional-changelog) from 2.1.0 to 2.1.1. - [Release notes](https://github.com/conventional-changelog/conventional-changelog/releases) - [Commits](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-cli@2.1.0...conventional-changelog-cli@2.1.1) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 223 ++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 214 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index cc691e2b639ea..5273c3c13e477 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "build-all": "tsc -b" }, "devDependencies": { - "conventional-changelog-cli": "^2.1.0", + "conventional-changelog-cli": "^2.1.1", "fs-extra": "^9.0.1", "graceful-fs": "^4.2.4", "jest-junit": "^12.0.0", diff --git a/yarn.lock b/yarn.lock index d263423de110e..27f55d7ab3cb8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4847,6 +4847,14 @@ conventional-changelog-angular@^5.0.11, conventional-changelog-angular@^5.0.3: compare-func "^2.0.0" q "^1.5.1" +conventional-changelog-angular@^5.0.12: + version "5.0.12" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz#c979b8b921cbfe26402eb3da5bbfda02d865a2b9" + integrity sha512-5GLsbnkR/7A89RyHLvvoExbiGbd9xKdKqDTrArnPbOqBqG/2wIosu0fHwpeIRI8Tl94MhVNBXcLJZl92ZQ5USw== + dependencies: + compare-func "^2.0.0" + q "^1.5.1" + conventional-changelog-atom@^2.0.7: version "2.0.7" resolved "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-2.0.7.tgz#221575253a04f77a2fd273eb2bf29a138f710abf" @@ -4854,15 +4862,22 @@ conventional-changelog-atom@^2.0.7: dependencies: q "^1.5.1" -conventional-changelog-cli@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-cli/-/conventional-changelog-cli-2.1.0.tgz#5da5be32203ca8382815afc85b7f9151115d5e97" - integrity sha512-hZ8EcpxV4LcGOZwH+U5LJQDnyA4o/uyUdmIGzmFZMB4caujavvDBo/iTgVihk0m1QKkEhJgulagrILSm1JCakA== +conventional-changelog-atom@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-2.0.8.tgz#a759ec61c22d1c1196925fca88fe3ae89fd7d8de" + integrity sha512-xo6v46icsFTK3bb7dY/8m2qvc8sZemRgdqLb/bjpBsH2UyOS8rKNTgcb5025Hri6IpANPApbXMg15QLb1LJpBw== + dependencies: + q "^1.5.1" + +conventional-changelog-cli@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-cli/-/conventional-changelog-cli-2.1.1.tgz#7a11980bc399938e0509d2adf8e7a0e213eb994e" + integrity sha512-xMGQdKJ+4XFDDgfX5aK7UNFduvJMbvF5BB+g0OdVhA3rYdYyhctrIE2Al+WYdZeKTdg9YzMWF2iFPT8MupIwng== dependencies: add-stream "^1.0.0" - conventional-changelog "^3.1.23" + conventional-changelog "^3.1.24" lodash "^4.17.15" - meow "^7.0.0" + meow "^8.0.0" tempfile "^3.0.0" conventional-changelog-codemirror@^2.0.7: @@ -4872,6 +4887,13 @@ conventional-changelog-codemirror@^2.0.7: dependencies: q "^1.5.1" +conventional-changelog-codemirror@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-2.0.8.tgz#398e9530f08ce34ec4640af98eeaf3022eb1f7dc" + integrity sha512-z5DAsn3uj1Vfp7po3gpt2Boc+Bdwmw2++ZHa5Ak9k0UKsYAO5mH1UBTN0qSCuJZREIhX6WU4E1p3IW2oRCNzQw== + dependencies: + q "^1.5.1" + conventional-changelog-config-spec@2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/conventional-changelog-config-spec/-/conventional-changelog-config-spec-2.1.0.tgz#874a635287ef8b581fd8558532bf655d4fb59f2d" @@ -4886,6 +4908,15 @@ conventional-changelog-conventionalcommits@4.4.0, conventional-changelog-convent lodash "^4.17.15" q "^1.5.1" +conventional-changelog-conventionalcommits@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.5.0.tgz#a02e0b06d11d342fdc0f00c91d78265ed0bc0a62" + integrity sha512-buge9xDvjjOxJlyxUnar/+6i/aVEVGA7EEh4OafBCXPlLUQPGbRUBhBUveWRxzvR8TEjhKEP4BdepnpG2FSZXw== + dependencies: + compare-func "^2.0.0" + lodash "^4.17.15" + q "^1.5.1" + conventional-changelog-core@^3.1.6: version "3.2.3" resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-3.2.3.tgz#b31410856f431c847086a7dcb4d2ca184a7d88fb" @@ -4926,6 +4957,27 @@ conventional-changelog-core@^4.2.0: shelljs "^0.8.3" through2 "^3.0.0" +conventional-changelog-core@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-4.2.1.tgz#f811ad98ab2ff080becafc61407509420c9b447d" + integrity sha512-8cH8/DEoD3e5Q6aeogdR5oaaKs0+mG6+f+Om0ZYt3PNv7Zo0sQhu4bMDRsqAF+UTekTAtP1W/C41jH/fkm8Jtw== + dependencies: + add-stream "^1.0.0" + conventional-changelog-writer "^4.0.18" + conventional-commits-parser "^3.2.0" + dateformat "^3.0.0" + get-pkg-repo "^1.0.0" + git-raw-commits "2.0.0" + git-remote-origin-url "^2.0.0" + git-semver-tags "^4.1.1" + lodash "^4.17.15" + normalize-package-data "^3.0.0" + q "^1.5.1" + read-pkg "^3.0.0" + read-pkg-up "^3.0.0" + shelljs "^0.8.3" + through2 "^4.0.0" + conventional-changelog-ember@^2.0.8: version "2.0.8" resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-2.0.8.tgz#f0f04eb7ff3c885af97db100865ab95dcfa9917f" @@ -4933,6 +4985,13 @@ conventional-changelog-ember@^2.0.8: dependencies: q "^1.5.1" +conventional-changelog-ember@^2.0.9: + version "2.0.9" + resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-2.0.9.tgz#619b37ec708be9e74a220f4dcf79212ae1c92962" + integrity sha512-ulzIReoZEvZCBDhcNYfDIsLTHzYHc7awh+eI44ZtV5cx6LVxLlVtEmcO+2/kGIHGtw+qVabJYjdI5cJOQgXh1A== + dependencies: + q "^1.5.1" + conventional-changelog-eslint@^3.0.8: version "3.0.8" resolved "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-3.0.8.tgz#f8b952b7ed7253ea0ac0b30720bb381f4921b46c" @@ -4940,6 +4999,13 @@ conventional-changelog-eslint@^3.0.8: dependencies: q "^1.5.1" +conventional-changelog-eslint@^3.0.9: + version "3.0.9" + resolved "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-3.0.9.tgz#689bd0a470e02f7baafe21a495880deea18b7cdb" + integrity sha512-6NpUCMgU8qmWmyAMSZO5NrRd7rTgErjrm4VASam2u5jrZS0n38V7Y9CzTtLT2qwz5xEChDR4BduoWIr8TfwvXA== + dependencies: + q "^1.5.1" + conventional-changelog-express@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-2.0.5.tgz#6e93705acdad374516ca125990012a48e710f8de" @@ -4947,6 +5013,13 @@ conventional-changelog-express@^2.0.5: dependencies: q "^1.5.1" +conventional-changelog-express@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-2.0.6.tgz#420c9d92a347b72a91544750bffa9387665a6ee8" + integrity sha512-SDez2f3iVJw6V563O3pRtNwXtQaSmEfTCaTBPCqn0oG0mfkq0rX4hHBq5P7De2MncoRixrALj3u3oQsNK+Q0pQ== + dependencies: + q "^1.5.1" + conventional-changelog-jquery@^3.0.10: version "3.0.10" resolved "https://registry.yarnpkg.com/conventional-changelog-jquery/-/conventional-changelog-jquery-3.0.10.tgz#fe8eb6aff322aa980af5eb68497622a5f6257ce7" @@ -4954,6 +5027,13 @@ conventional-changelog-jquery@^3.0.10: dependencies: q "^1.5.1" +conventional-changelog-jquery@^3.0.11: + version "3.0.11" + resolved "https://registry.yarnpkg.com/conventional-changelog-jquery/-/conventional-changelog-jquery-3.0.11.tgz#d142207400f51c9e5bb588596598e24bba8994bf" + integrity sha512-x8AWz5/Td55F7+o/9LQ6cQIPwrCjfJQ5Zmfqi8thwUEKHstEn4kTIofXub7plf1xvFA2TqhZlq7fy5OmV6BOMw== + dependencies: + q "^1.5.1" + conventional-changelog-jshint@^2.0.8: version "2.0.8" resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-2.0.8.tgz#3fff4df8cb46037f77b9dc3f8e354c7f99332f13" @@ -4962,6 +5042,14 @@ conventional-changelog-jshint@^2.0.8: compare-func "^2.0.0" q "^1.5.1" +conventional-changelog-jshint@^2.0.9: + version "2.0.9" + resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-2.0.9.tgz#f2d7f23e6acd4927a238555d92c09b50fe3852ff" + integrity sha512-wMLdaIzq6TNnMHMy31hql02OEQ8nCQfExw1SE0hYL5KvU+JCTuPaDO+7JiogGT2gJAxiUGATdtYYfh+nT+6riA== + dependencies: + compare-func "^2.0.0" + q "^1.5.1" + conventional-changelog-preset-loader@^2.1.1, conventional-changelog-preset-loader@^2.3.4: version "2.3.4" resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.4.tgz#14a855abbffd59027fd602581f1f34d9862ea44c" @@ -4983,7 +5071,23 @@ conventional-changelog-writer@^4.0.17, conventional-changelog-writer@^4.0.6: split "^1.0.0" through2 "^3.0.0" -conventional-changelog@3.1.23, conventional-changelog@^3.1.23: +conventional-changelog-writer@^4.0.18: + version "4.0.18" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.18.tgz#10b73baa59c7befc69b360562f8b9cd19e63daf8" + integrity sha512-mAQDCKyB9HsE8Ko5cCM1Jn1AWxXPYV0v8dFPabZRkvsiWUul2YyAqbIaoMKF88Zf2ffnOPSvKhboLf3fnjo5/A== + dependencies: + compare-func "^2.0.0" + conventional-commits-filter "^2.0.7" + dateformat "^3.0.0" + handlebars "^4.7.6" + json-stringify-safe "^5.0.1" + lodash "^4.17.15" + meow "^8.0.0" + semver "^6.0.0" + split "^1.0.0" + through2 "^4.0.0" + +conventional-changelog@3.1.23: version "3.1.23" resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-3.1.23.tgz#d696408021b579a3814aba79b38729ed86478aea" integrity sha512-sScUu2NHusjRC1dPc5p8/b3kT78OYr95/Bx7Vl8CPB8tF2mG1xei5iylDTRjONV5hTlzt+Cn/tBWrKdd299b7A== @@ -5000,6 +5104,23 @@ conventional-changelog@3.1.23, conventional-changelog@^3.1.23: conventional-changelog-jshint "^2.0.8" conventional-changelog-preset-loader "^2.3.4" +conventional-changelog@^3.1.24: + version "3.1.24" + resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-3.1.24.tgz#ebd180b0fd1b2e1f0095c4b04fd088698348a464" + integrity sha512-ed6k8PO00UVvhExYohroVPXcOJ/K1N0/drJHx/faTH37OIZthlecuLIRX/T6uOp682CAoVoFpu+sSEaeuH6Asg== + dependencies: + conventional-changelog-angular "^5.0.12" + conventional-changelog-atom "^2.0.8" + conventional-changelog-codemirror "^2.0.8" + conventional-changelog-conventionalcommits "^4.5.0" + conventional-changelog-core "^4.2.1" + conventional-changelog-ember "^2.0.9" + conventional-changelog-eslint "^3.0.9" + conventional-changelog-express "^2.0.6" + conventional-changelog-jquery "^3.0.11" + conventional-changelog-jshint "^2.0.9" + conventional-changelog-preset-loader "^2.3.4" + conventional-commits-filter@^2.0.2, conventional-commits-filter@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.6.tgz#0935e1240c5ca7698329affee1b6a46d33324c4c" @@ -5008,6 +5129,14 @@ conventional-commits-filter@^2.0.2, conventional-commits-filter@^2.0.6: lodash.ismatch "^4.4.0" modify-values "^1.0.0" +conventional-commits-filter@^2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.7.tgz#f8d9b4f182fce00c9af7139da49365b136c8a0b3" + integrity sha512-ASS9SamOP4TbCClsRHxIHXRfcGCnIoQqkvAzCSbZzTFLfcTqJVugB0agRgsEELsqaeWgsXv513eS116wnlSSPA== + dependencies: + lodash.ismatch "^4.4.0" + modify-values "^1.0.0" + conventional-commits-parser@^3.0.3, conventional-commits-parser@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.1.0.tgz#10140673d5e7ef5572633791456c5d03b69e8be4" @@ -5021,6 +5150,19 @@ conventional-commits-parser@^3.0.3, conventional-commits-parser@^3.1.0: through2 "^3.0.0" trim-off-newlines "^1.0.0" +conventional-commits-parser@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.2.0.tgz#9e261b139ca4b7b29bcebbc54460da36894004ca" + integrity sha512-XmJiXPxsF0JhAKyfA2Nn+rZwYKJ60nanlbSWwwkGwLQFbugsc0gv1rzc7VbbUWAzJfR1qR87/pNgv9NgmxtBMQ== + dependencies: + JSONStream "^1.0.4" + is-text-path "^1.0.1" + lodash "^4.17.15" + meow "^8.0.0" + split2 "^2.0.0" + through2 "^4.0.0" + trim-off-newlines "^1.0.0" + conventional-recommended-bump@6.0.10: version "6.0.10" resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-6.0.10.tgz#ac2fb3e31bad2aeda80086b345bf0c52edd1d1b3" @@ -6961,6 +7103,14 @@ git-semver-tags@^4.0.0, git-semver-tags@^4.1.0: meow "^7.0.0" semver "^6.0.0" +git-semver-tags@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-4.1.1.tgz#63191bcd809b0ec3e151ba4751c16c444e5b5780" + integrity sha512-OWyMt5zBe7xFs8vglMmhM9lRQzCWL3WjHtxNNfJTMngGym7pC1kh8sP6jevfydJ6LP3ZvGxfb6ABYgPUM0mtsA== + dependencies: + meow "^8.0.0" + semver "^6.0.0" + git-up@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/git-up/-/git-up-4.0.2.tgz#10c3d731051b366dc19d3df454bfca3f77913a7c" @@ -7234,6 +7384,13 @@ hosted-git-info@^2.1.4, hosted-git-info@^2.7.1: resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== +hosted-git-info@^3.0.6: + version "3.0.7" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-3.0.7.tgz#a30727385ea85acfcee94e0aad9e368c792e036c" + integrity sha512-fWqc0IcuXs+BmE9orLDyVykAG9GJtGLGuZAAqgcckPgv5xad4AcXGIv8galtQvlwutxSlaMcdw7BUtq2EIvqCQ== + dependencies: + lru-cache "^6.0.0" + hsl-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/hsl-regex/-/hsl-regex-1.0.0.tgz#d49330c789ed819e276a4c0d272dffa30b18fe6e" @@ -8528,7 +8685,7 @@ jest-worker@^26.6.2: merge-stream "^2.0.0" supports-color "^7.0.0" -jest@^26.6.3: +jest@^26.6.2, jest@^26.6.3: version "26.6.3" resolved "https://registry.yarnpkg.com/jest/-/jest-26.6.3.tgz#40e8fdbe48f00dfa1f0ce8121ca74b88ac9148ef" integrity sha512-lGS5PXGAzR4RF7V5+XObhqz2KZIDUA1yD0DG6pBVmy10eh0ZIXQImRuzocsI/N2XZ1GrLFwTS27In2i2jlpq1Q== @@ -9217,6 +9374,13 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + macos-release@^2.2.0: version "2.4.1" resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.4.1.tgz#64033d0ec6a5e6375155a74b1a1eba8e509820ac" @@ -9389,6 +9553,23 @@ meow@^7.0.0: type-fest "^0.13.1" yargs-parser "^18.1.3" +meow@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-8.0.0.tgz#1aa10ee61046719e334ffdc038bb5069250ec99a" + integrity sha512-nbsTRz2fwniJBFgUkcdISq8y/q9n9VbiHYbfwklFh5V4V2uAcxtKQkDc0yCLPM/kP0d+inZBewn3zJqewHE7kg== + dependencies: + "@types/minimist" "^1.2.0" + camelcase-keys "^6.2.2" + decamelize-keys "^1.1.0" + hard-rejection "^2.1.0" + minimist-options "4.1.0" + normalize-package-data "^3.0.0" + read-pkg-up "^7.0.1" + redent "^3.0.0" + trim-newlines "^3.0.0" + type-fest "^0.18.0" + yargs-parser "^20.2.3" + merge-descriptors@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" @@ -9849,6 +10030,16 @@ normalize-package-data@^2.0.0, normalize-package-data@^2.3.0, normalize-package- semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" +normalize-package-data@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-3.0.0.tgz#1f8a7c423b3d2e85eb36985eaf81de381d01301a" + integrity sha512-6lUjEI0d3v6kFrtgA/lOx4zHCWULXsFNIjHolnZCKCTLA6m/G625cdn3O7eNmT0iD3jfo6HZ9cdImGZwf21prw== + dependencies: + hosted-git-info "^3.0.6" + resolve "^1.17.0" + semver "^7.3.2" + validate-npm-package-license "^3.0.1" + normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" @@ -11518,7 +11709,7 @@ readable-stream@1.1.x: isarray "0.0.1" string_decoder "~0.10.x" -"readable-stream@2 || 3", readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: +"readable-stream@2 || 3", readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -12999,6 +13190,13 @@ through2@^3.0.0: inherits "^2.0.4" readable-stream "2 || 3" +through2@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/through2/-/through2-4.0.2.tgz#a7ce3ac2a7a8b0b966c80e7c49f0484c3b239764" + integrity sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw== + dependencies: + readable-stream "3" + through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@^2.3.8: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" @@ -13259,6 +13457,11 @@ type-fest@^0.13.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934" integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg== +type-fest@^0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.0.tgz#2edfa6382d48653707344f7fccdb0443d460e8d6" + integrity sha512-fbDukFPnJBdn2eZ3RR+5mK2slHLFd6gYHY7jna1KWWy4Yr4XysHuCdXRzy+RiG/HwG4WJat00vdC2UHky5eKiQ== + type-fest@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1" @@ -13940,7 +14143,7 @@ yapool@^1.0.0: resolved "https://registry.yarnpkg.com/yapool/-/yapool-1.0.0.tgz#f693f29a315b50d9a9da2646a7a6645c96985b6a" integrity sha1-9pPymjFbUNmp2iZGp6ZkXJaYW2o= -yargs-parser@20.x, yargs-parser@^20.2.2: +yargs-parser@20.x, yargs-parser@^20.2.2, yargs-parser@^20.2.3: version "20.2.3" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.3.tgz#92419ba867b858c868acf8bae9bf74af0dd0ce26" integrity sha512-emOFRT9WVHw03QSvN5qor9QQT9+sw5vwxfYweivSMHTcAXPefwVae2FjO7JJjj8hCE4CzPOPeFM83VwT29HCww== From 84781532a21c3f0e88a637a820f0b88d29a008a5 Mon Sep 17 00:00:00 2001 From: Eli Polonsky Date: Thu, 5 Nov 2020 18:03:28 +0200 Subject: [PATCH 053/314] chore: install standard-version before running bump (#11312) This [PR](https://github.com/aws/aws-cdk/pull/11307) migrated our CLI usage of `standard-version` to be used in code as a library. But the library is not installed anywhere. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- bump.sh | 5 ++++- scripts/bump-candidate.sh | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bump.sh b/bump.sh index 750d452da496d..746353925c60d 100755 --- a/bump.sh +++ b/bump.sh @@ -13,4 +13,7 @@ # # -------------------------------------------------------------------------------------------------- set -euo pipefail -./scripts/bump.js ${1:-minor} +scriptdir=$(cd $(dirname $0) && pwd) +cd ${scriptdir} +yarn +${scriptdir}/scripts/bump.js ${1:-minor} diff --git a/scripts/bump-candidate.sh b/scripts/bump-candidate.sh index ee509daa78d16..abdbbe8a3f3a3 100755 --- a/scripts/bump-candidate.sh +++ b/scripts/bump-candidate.sh @@ -17,4 +17,5 @@ # -------------------------------------------------------------------------------------------------- set -euo pipefail scriptdir=$(cd $(dirname $0) && pwd) -BUMP_CANDIDATE=true ${scriptdir}/bump.js ${1:-minor} +rootdir=${scriptdir}/.. +BUMP_CANDIDATE=true ${rootdir}/bump.sh ${1:-minor} From 246404df0bcdec1cba49bceafdb38d7ba4010a1f Mon Sep 17 00:00:00 2001 From: Shiv Lakshminarayan Date: Thu, 5 Nov 2020 11:19:53 -0800 Subject: [PATCH 054/314] chore(cfnspec): fix spec patch not being applied for Route 53 healthchecks (#11303) The patch added in #11280 was not being applied as our patching requires the `PropertyTypes` and `ResourceTypes` keys rather than use them directly through the `path` property. Since they were previously relying entirely on the path, the patch was not actually applied. Verified the final specification after all patches have been applied. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../660_Route53_HealthCheck_patch.json | 289 +++++++++--------- 1 file changed, 147 insertions(+), 142 deletions(-) diff --git a/packages/@aws-cdk/cfnspec/spec-source/660_Route53_HealthCheck_patch.json b/packages/@aws-cdk/cfnspec/spec-source/660_Route53_HealthCheck_patch.json index ea429331a6c42..b03232b4e72a5 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/660_Route53_HealthCheck_patch.json +++ b/packages/@aws-cdk/cfnspec/spec-source/660_Route53_HealthCheck_patch.json @@ -1,152 +1,157 @@ { - "patch": { - "description": "Patch Route 53 HealthCheck casing regression - mirrors cfn-lint (https://github.com/aws-cloudformation/cfn-python-lint/blob/master/src/cfnlint/data/ExtendedSpecs/all/01_spec_patch.json) ", - "operations": [ - { - "op": "add", - "path": "/ResourceTypes/AWS::Route53::HealthCheck/Properties/HealthCheckConfig/Type", - "value": "HealthCheckConfig" - }, - { - "op": "remove", - "path": "/ResourceTypes/AWS::Route53::HealthCheck/Properties/HealthCheckConfig/PrimitiveType" - }, - { - "op": "add", - "path": "/PropertyTypes/AWS::Route53::HealthCheck.AlarmIdentifier", - "value": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-alarmidentifier.html", - "Properties": { - "Name": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-alarmidentifier.html#cfn-route53-healthcheck-alarmidentifier-name", - "PrimitiveType": "String", - "Required": true, - "UpdateType": "Mutable" - }, - "Region": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-alarmidentifier.html#cfn-route53-healthcheck-alarmidentifier-region", - "PrimitiveType": "String", - "Required": true, - "UpdateType": "Mutable" + "PropertyTypes": { + "patch": { + "description": "Patch Route 53 HealthCheck casing regression - mirrors cfn-lint (https://github.com/aws-cloudformation/cfn-python-lint/blob/master/src/cfnlint/data/ExtendedSpecs/all/01_spec_patch.json) ", + "operations": [ + { + "op": "add", + "path": "/AWS::Route53::HealthCheck.AlarmIdentifier", + "value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-alarmidentifier.html", + "Properties": { + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-alarmidentifier.html#cfn-route53-healthcheck-alarmidentifier-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Region": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-alarmidentifier.html#cfn-route53-healthcheck-alarmidentifier-region", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } } } - } - }, - { - "op": "add", - "path": "/PropertyTypes/AWS::Route53::HealthCheck.HealthCheckConfig", - "value": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html", - "Properties": { - "AlarmIdentifier": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-alarmidentifier", - "Required": false, - "Type": "AlarmIdentifier", - "UpdateType": "Mutable" - }, - "ChildHealthChecks": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-childhealthchecks", - "DuplicatesAllowed": false, - "PrimitiveItemType": "String", - "Required": false, - "Type": "List", - "UpdateType": "Mutable" - }, - "EnableSNI": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-enablesni", - "PrimitiveType": "Boolean", - "Required": false, - "UpdateType": "Mutable" - }, - "FailureThreshold": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-failurethreshold", - "PrimitiveType": "Integer", - "Required": false, - "UpdateType": "Mutable" - }, - "FullyQualifiedDomainName": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-fullyqualifieddomainname", - "PrimitiveType": "String", - "Required": false, - "UpdateType": "Mutable" - }, - "HealthThreshold": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-healththreshold", - "PrimitiveType": "Integer", - "Required": false, - "UpdateType": "Mutable" - }, - "IPAddress": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-ipaddress", - "PrimitiveType": "String", - "Required": false, - "UpdateType": "Mutable" - }, - "InsufficientDataHealthStatus": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-insufficientdatahealthstatus", - "PrimitiveType": "String", - "Required": false, - "UpdateType": "Mutable", - "Value": { - "ValueType": "Route53HealthCheckConfigHealthStatus" - } - }, - "Inverted": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-inverted", - "PrimitiveType": "Boolean", - "Required": false, - "UpdateType": "Mutable" - }, - "MeasureLatency": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-measurelatency", - "PrimitiveType": "Boolean", - "Required": false, - "UpdateType": "Immutable" - }, - "Port": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-port", - "PrimitiveType": "Integer", - "Required": false, - "UpdateType": "Mutable" - }, - "Regions": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-regions", - "DuplicatesAllowed": false, - "PrimitiveItemType": "String", - "Required": false, - "Type": "List", - "UpdateType": "Mutable" - }, - "RequestInterval": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-requestinterval", - "PrimitiveType": "Integer", - "Required": false, - "UpdateType": "Immutable" - }, - "ResourcePath": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-resourcepath", - "PrimitiveType": "String", - "Required": false, - "UpdateType": "Mutable" - }, - "SearchString": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-searchstring", - "PrimitiveType": "String", - "Required": false, - "UpdateType": "Mutable" - }, - "Type": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-type", - "PrimitiveType": "String", - "Required": true, - "UpdateType": "Immutable", - "Value": { - "ValueType": "Route53HealthCheckConfigType" + }, + { + "op": "add", + "path": "/AWS::Route53::HealthCheck.HealthCheckConfig", + "value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html", + "Properties": { + "AlarmIdentifier": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-alarmidentifier", + "Required": false, + "Type": "AlarmIdentifier", + "UpdateType": "Mutable" + }, + "ChildHealthChecks": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-childhealthchecks", + "DuplicatesAllowed": false, + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "EnableSNI": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-enablesni", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "FailureThreshold": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-failurethreshold", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "FullyQualifiedDomainName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-fullyqualifieddomainname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "HealthThreshold": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-healththreshold", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "IPAddress": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-ipaddress", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "InsufficientDataHealthStatus": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-insufficientdatahealthstatus", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Inverted": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-inverted", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "MeasureLatency": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-measurelatency", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Immutable" + }, + "Port": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-port", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "Regions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-regions", + "DuplicatesAllowed": false, + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "RequestInterval": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-requestinterval", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Immutable" + }, + "ResourcePath": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-resourcepath", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "SearchString": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-searchstring", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Type": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-type", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" } } } } + ] + } + }, + "ResourceTypes": { + "AWS::Route53::HealthCheck": { + "patch": { + "description": "Patch Route 53 HealthCheck casing regression - mirrors cfn-lint (https://github.com/aws-cloudformation/cfn-python-lint/blob/master/src/cfnlint/data/ExtendedSpecs/all/01_spec_patch.json) ", + "operations": [ + { + "op": "add", + "path": "/Properties/HealthCheckConfig/Type", + "value": "HealthCheckConfig" + }, + { + "op": "remove", + "path": "/Properties/HealthCheckConfig/PrimitiveType" + } + ] } - ] + } } } \ No newline at end of file From f77dbdee53a12c096f0fe1e884a5e66e4ac54e24 Mon Sep 17 00:00:00 2001 From: Eli Polonsky Date: Thu, 5 Nov 2020 21:48:19 +0200 Subject: [PATCH 055/314] chore: fix candidate bump invocation (#11318) Allow versions with pre-release tags in stable branches to allow BUMP_CANDIDATE to work. Otherwise, after the bump, any call to `resolve-version` will fail because there is a mismatch between the actual version and `release.json`. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- bump.sh | 2 +- scripts/bump.js | 2 +- scripts/resolve-version-lib.js | 9 ++++---- scripts/script-tests/resolve-version.test.js | 24 ++++++++++++-------- 4 files changed, 21 insertions(+), 16 deletions(-) diff --git a/bump.sh b/bump.sh index 746353925c60d..73954148de7c6 100755 --- a/bump.sh +++ b/bump.sh @@ -15,5 +15,5 @@ set -euo pipefail scriptdir=$(cd $(dirname $0) && pwd) cd ${scriptdir} -yarn +yarn --frozen-lockfile ${scriptdir}/scripts/bump.js ${1:-minor} diff --git a/scripts/bump.js b/scripts/bump.js index cd041768b1a03..a1d678c57ce18 100755 --- a/scripts/bump.js +++ b/scripts/bump.js @@ -31,7 +31,7 @@ async function main() { if (forTesting) { opts.skip.commit = true; - opts.changelog = true; + opts.skip.changelog = true; // if we are on a "stable" branch, add a pre-release tag ("rc") to the // version number as a safety in case this version will accidentally be diff --git a/scripts/resolve-version-lib.js b/scripts/resolve-version-lib.js index a4b3d1d9f22b4..1be5dc06d6876 100755 --- a/scripts/resolve-version-lib.js +++ b/scripts/resolve-version-lib.js @@ -42,11 +42,10 @@ function resolveVersion(rootdir) { if (!currentVersion.startsWith(`${majorVersion}.`)) { throw new Error(`current version "${currentVersion}" does not use the expected major version ${majorVersion}`); } - if (releaseType === 'stable') { - if (currentVersion.includes('-')) { - throw new Error(`found pre-release tag in version specified in ${versionFile} is ${currentVersion} but "releaseType"" is set to "stable"`); - } - } else { + // if this is a pre-release, make sure current version includes the + // pre-release tag (e.g. "1.0.0-alpha.0"). we allow stable branches to bump to + // a pre-release for testing purposes when BUMP_CANDIDATE=true (see bump.js) + if (releaseType !== 'stable') { if (!currentVersion.includes(`-${releaseType}.`)) { throw new Error(`could not find pre-release tag "${releaseType}" in current version "${currentVersion}" defined in ${versionFile}`); } diff --git a/scripts/script-tests/resolve-version.test.js b/scripts/script-tests/resolve-version.test.js index 67621d4fc56af..f1b6f596a82d2 100644 --- a/scripts/script-tests/resolve-version.test.js +++ b/scripts/script-tests/resolve-version.test.js @@ -65,6 +65,21 @@ happy({ } }); +happy({ + name: 'to support BUMP_CANDIDATE stable branches can be bumped towards a pre-release', + inputs: { + 'release.json': { majorVersion: 2, releaseType: 'stable' }, + 'version.v2.json': { version: '2.0.0-rc.0' } + }, + expected: { + changelogFile: 'CHANGELOG.v2.md', + marker: '0.0.0', + prerelease: undefined, + version: '2.0.0-rc.0', + versionFile: 'version.v2.json' + } +}); + failure({ name: 'invalid release type', inputs: { 'release.json': { majorVersion: 2, releaseType: 'build' } }, @@ -113,15 +128,6 @@ failure({ expected: 'could not find pre-release tag "alpha" in current version "2.0.0-rc.0" defined in version.v2.json' }); -failure({ - name: 'actual version not the right pre-release (stable)', - inputs: { - 'release.json': { majorVersion: 2, releaseType: 'stable' }, - 'version.v2.json': { version: '2.0.0-alpha.0' } - }, - expected: 'found pre-release tag in version specified in version.v2.json is 2.0.0-alpha.0 but "releaseType"" is set to "stable"' -}); - function happy({ name, inputs, expected } = opts) { test(name, () => { const tmpdir = stage(inputs); From fa5ea36495e62bfc8841f92871a41106c5f7b87d Mon Sep 17 00:00:00 2001 From: Dominic Fezzie Date: Thu, 5 Nov 2020 12:18:52 -0800 Subject: [PATCH 056/314] chore(ecs-service-extensions): update APP_MESH_ENVOY_SIDECAR_VERSION (#11297) Update APP_MESH_ENVOY_SIDECAR_VERSION to v1.15.1.0-prod ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../ecs-service-extensions/lib/extensions/appmesh.ts | 2 +- .../test/integ.all-service-addons.expected.json | 6 +++--- .../test/integ.multiple-environments.expected.json | 4 ++-- .../ecs-service-extensions/test/test.appmesh.ts | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts index 9a4973cd89d8f..0ca41490969d8 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts +++ b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts @@ -10,7 +10,7 @@ import { Container } from './container'; import { ServiceExtension, ServiceBuild } from './extension-interfaces'; // The version of the App Mesh envoy sidecar to add to the task. -const APP_MESH_ENVOY_SIDECAR_VERSION = 'v1.15.0.0-prod'; +const APP_MESH_ENVOY_SIDECAR_VERSION = 'v1.15.1.0-prod'; /** * The settings for the App Mesh extension. diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/test/integ.all-service-addons.expected.json b/packages/@aws-cdk-containers/ecs-service-extensions/test/integ.all-service-addons.expected.json index 6ec717eee8cbe..005f503e417c2 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/test/integ.all-service-addons.expected.json +++ b/packages/@aws-cdk-containers/ecs-service-extensions/test/integ.all-service-addons.expected.json @@ -727,7 +727,7 @@ { "Ref": "AWS::URLSuffix" }, - "/aws-appmesh-envoy:v1.15.0.0-prod" + "/aws-appmesh-envoy:v1.15.1.0-prod" ] ] }, @@ -1596,7 +1596,7 @@ { "Ref": "AWS::URLSuffix" }, - "/aws-appmesh-envoy:v1.15.0.0-prod" + "/aws-appmesh-envoy:v1.15.1.0-prod" ] ] }, @@ -2584,7 +2584,7 @@ { "Ref": "AWS::URLSuffix" }, - "/aws-appmesh-envoy:v1.15.0.0-prod" + "/aws-appmesh-envoy:v1.15.1.0-prod" ] ] }, diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/test/integ.multiple-environments.expected.json b/packages/@aws-cdk-containers/ecs-service-extensions/test/integ.multiple-environments.expected.json index baffae9541166..fbd4ece89913b 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/test/integ.multiple-environments.expected.json +++ b/packages/@aws-cdk-containers/ecs-service-extensions/test/integ.multiple-environments.expected.json @@ -1186,7 +1186,7 @@ { "Ref": "AWS::URLSuffix" }, - "/aws-appmesh-envoy:v1.15.0.0-prod" + "/aws-appmesh-envoy:v1.15.1.0-prod" ] ] }, @@ -1710,7 +1710,7 @@ { "Ref": "AWS::URLSuffix" }, - "/aws-appmesh-envoy:v1.15.0.0-prod" + "/aws-appmesh-envoy:v1.15.1.0-prod" ] ] }, diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/test/test.appmesh.ts b/packages/@aws-cdk-containers/ecs-service-extensions/test/test.appmesh.ts index 3c34c99ff8f18..a221b9d31933e 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/test/test.appmesh.ts +++ b/packages/@aws-cdk-containers/ecs-service-extensions/test/test.appmesh.ts @@ -132,7 +132,7 @@ export = { { Ref: 'AWS::URLSuffix', }, - '/aws-appmesh-envoy:v1.15.0.0-prod', + '/aws-appmesh-envoy:v1.15.1.0-prod', ], ], }, From 9968669e4f4602a03de67e12bc5636a4f4bb1fd7 Mon Sep 17 00:00:00 2001 From: Eli Polonsky Date: Fri, 6 Nov 2020 02:05:12 +0200 Subject: [PATCH 057/314] fix(dynamodb): Misconfigured metrics causing empty graphs (#11283) This PR corrects 3 misconfigured metrics we had on the `Table` construct. ### UserErrors Per the [documentation](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/metrics-dimensions.html) The `table.metricUserErrors()` does not emit the `TableName` dimension. It is actually an account (and region) wide metric. The fix was to remove the `TableName` dimensionality from the metric creation. ### SystemErrors Per the [documentation](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/metrics-dimensions.html) The `table.metricSystemErrors()` is always emitted with the `Operation` dimension, and our current implementation does not pass it. The fix adds an additional `operations` property to the method, that allows passing an array of operations, the returned metric will be a *SUM* over those operations. If no operation is passed, we sum all available operations. Since the current method returns a `Metric`, returning a math expression won't work since it is an `IMetric` that doesn't extend `Metric`. To avoid breaking changes, we introduce a new method, `metricSystemErrorsForOperations`: ```ts const totalSystemErrors = table.metricSystemErrorsForOperations(); const getPutSystemErrors = table.metricSystemErrorsForOperations({ operations: [dynamo.Operation.PUT_ITEM, dynamo.Operation.GET_ITEM] }); ``` ### SuccessfulRequestLatency Per the [documentation](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/metrics-dimensions.html) The `table.metricSuccessfulRequestLatency()` is always emitted with the `Operation` dimension, and our current implementation does not pass it. The fix requires user to pass the `Operation` dimension. So the API is: ```ts const getLatency = table.metricSuccessfulRequestLatency({ dimensions: { Operation: 'GetItem' }, }); ``` Fixes https://github.com/aws/aws-cdk/issues/11261 Fixes https://github.com/aws/aws-cdk/issues/11269 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-cloudwatch/lib/alarm.ts | 16 +- .../aws-cloudwatch/test/test.alarm.ts | 34 +++- packages/@aws-cdk/aws-dynamodb/lib/table.ts | 187 ++++++++++++++++-- .../aws-dynamodb/test/dynamodb.test.ts | 143 +++++++++++++- 4 files changed, 362 insertions(+), 18 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudwatch/lib/alarm.ts b/packages/@aws-cdk/aws-cloudwatch/lib/alarm.ts index 94268ae282fcb..ae8fd29424786 100644 --- a/packages/@aws-cdk/aws-cloudwatch/lib/alarm.ts +++ b/packages/@aws-cdk/aws-cloudwatch/lib/alarm.ts @@ -273,11 +273,18 @@ export class Alarm extends AlarmBase { }; }, withExpression(expr, conf) { + + const hasSubmetrics = mathExprHasSubmetrics(expr); + + if (hasSubmetrics) { + assertSubmetricsCount(expr); + } + return { expression: expr.expression, id: entry.id || uniqueMetricId(), label: conf.renderingProperties?.label, - period: mathExprHasSubmetrics(expr) ? undefined : expr.period, + period: hasSubmetrics ? undefined : expr.period, returnData: entry.tag ? undefined : false, // Tag stores "primary" attribute, default is "true" }; }, @@ -344,4 +351,11 @@ function mathExprHasSubmetrics(expr: MetricExpressionConfig) { return Object.keys(expr.usingMetrics).length > 0; } +function assertSubmetricsCount(expr: MetricExpressionConfig) { + if (Object.keys(expr.usingMetrics).length > 10) { + // https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarms-on-metric-math-expressions + throw new Error('Alarms on math expressions cannot contain more than 10 individual metrics'); + }; +} + type Writeable = { -readonly [P in keyof T]: T[P] }; diff --git a/packages/@aws-cdk/aws-cloudwatch/test/test.alarm.ts b/packages/@aws-cdk/aws-cloudwatch/test/test.alarm.ts index 6b863af88b1cd..c7c0f647c2e58 100644 --- a/packages/@aws-cdk/aws-cloudwatch/test/test.alarm.ts +++ b/packages/@aws-cdk/aws-cloudwatch/test/test.alarm.ts @@ -2,7 +2,7 @@ import { ABSENT, expect, haveResource } from '@aws-cdk/assert'; import { Duration, Stack } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { Test } from 'nodeunit'; -import { Alarm, IAlarm, IAlarmAction, Metric } from '../lib'; +import { Alarm, IAlarm, IAlarmAction, Metric, MathExpression, IMetric } from '../lib'; const testMetric = new Metric({ namespace: 'CDK/Test', @@ -10,6 +10,38 @@ const testMetric = new Metric({ }); export = { + + 'alarm does not accept a math expression with more than 10 metrics'(test: Test) { + + const stack = new Stack(); + + const usingMetrics: Record = {}; + + for (const i of [...Array(15).keys()]) { + const metricName = `metric${i}`; + usingMetrics[metricName] = new Metric({ + namespace: 'CDK/Test', + metricName: metricName, + }); + } + + const math = new MathExpression({ + expression: 'a', + usingMetrics, + }); + + test.throws(() => { + + new Alarm(stack, 'Alarm', { + metric: math, + threshold: 1000, + evaluationPeriods: 3, + }); + + }, /Alarms on math expressions cannot contain more than 10 individual metrics/); + + test.done(); + }, 'can make simple alarm'(test: Test) { // GIVEN const stack = new Stack(); diff --git a/packages/@aws-cdk/aws-dynamodb/lib/table.ts b/packages/@aws-cdk/aws-dynamodb/lib/table.ts index 7358c248d4ba1..f67175c62c5b9 100644 --- a/packages/@aws-cdk/aws-dynamodb/lib/table.ts +++ b/packages/@aws-cdk/aws-dynamodb/lib/table.ts @@ -19,6 +19,54 @@ const RANGE_KEY_TYPE = 'RANGE'; // https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html#limits-secondary-indexes const MAX_LOCAL_SECONDARY_INDEX_COUNT = 5; +/** + * Options for configuring a system errors metric that considers multiple operations. + */ +export interface SystemErrorsForOperationsMetricOptions extends cloudwatch.MetricOptions { + + /** + * The operations to apply the metric to. + * + * @default - All operations available by DynamoDB tables will be considered. + */ + readonly operations?: Operation[]; + +} + +/** + * Supported DynamoDB table operations. + */ +export enum Operation { + + /** GetItem */ + GET_ITEM = 'GetItem', + + /** BatchGetItem */ + BATCH_GET_ITEM = 'BatchGetItem', + + /** Scan */ + SCAN = 'Scan', + + /** Query */ + QUERY = 'Query', + + /** GetRecords */ + GET_RECORDS = 'GetRecords', + + /** PutItem */ + PUT_ITEM = 'PutItem', + + /** DeleteItem */ + DELETE_ITEM = 'DeleteItem', + + /** UpdateItem */ + UPDATE_ITEM = 'UpdateItem', + + /** BatchWriteItem */ + BATCH_WRITE_ITEM = 'BatchWriteItem', + +} + /** * Represents an attribute for describing the key schema for the table * and indexes. @@ -385,6 +433,8 @@ export interface ITable extends IResource { * Metric for the system errors * * @param props properties of a metric + * + * @deprecated use `metricSystemErrorsForOperations` */ metricSystemErrors(props?: cloudwatch.MetricOptions): cloudwatch.Metric; @@ -406,8 +456,10 @@ export interface ITable extends IResource { * Metric for the successful request latency * * @param props properties of a metric + * */ metricSuccessfulRequestLatency(props?: cloudwatch.MetricOptions): cloudwatch.Metric; + } /** @@ -628,6 +680,9 @@ abstract class TableBase extends Resource implements ITable { /** * Return the given named metric for this Table + * + * By default, the metric will be calculated as a sum over a period of 5 minutes. + * You can customize this by using the `statistic` and `period` properties. */ public metric(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric { return new cloudwatch.Metric({ @@ -643,7 +698,8 @@ abstract class TableBase extends Resource implements ITable { /** * Metric for the consumed read capacity units this table * - * @default sum over a minute + * By default, the metric will be calculated as a sum over a period of 5 minutes. + * You can customize this by using the `statistic` and `period` properties. */ public metricConsumedReadCapacityUnits(props?: cloudwatch.MetricOptions): cloudwatch.Metric { return this.metric('ConsumedReadCapacityUnits', { statistic: 'sum', ...props }); @@ -652,7 +708,8 @@ abstract class TableBase extends Resource implements ITable { /** * Metric for the consumed write capacity units this table * - * @default sum over a minute + * By default, the metric will be calculated as a sum over a period of 5 minutes. + * You can customize this by using the `statistic` and `period` properties. */ public metricConsumedWriteCapacityUnits(props?: cloudwatch.MetricOptions): cloudwatch.Metric { return this.metric('ConsumedWriteCapacityUnits', { statistic: 'sum', ...props }); @@ -661,37 +718,145 @@ abstract class TableBase extends Resource implements ITable { /** * Metric for the system errors this table * - * @default sum over a minute + * @deprecated use `metricSystemErrorsForOperations`. */ public metricSystemErrors(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('SystemErrors', { statistic: 'sum', ...props }); + + if (!props?.dimensions?.Operation) { + // 'Operation' must be passed because its an operational metric. + throw new Error("'Operation' dimension must be passed for the 'SystemErrors' metric."); + } + + const dimensions = { + TableName: this.tableName, + ...props?.dimensions ?? {}, + }; + + return this.metric('SystemErrors', { statistic: 'sum', ...props, dimensions }); } /** - * Metric for the user errors this table + * Metric for the user errors. Note that this metric reports user errors across all + * the tables in the account and region the table resides in. * - * @default sum over a minute + * By default, the metric will be calculated as a sum over a period of 5 minutes. + * You can customize this by using the `statistic` and `period` properties. */ public metricUserErrors(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('UserErrors', { statistic: 'sum', ...props }); + + if (props?.dimensions) { + throw new Error("'dimensions' is not supported for the 'UserErrors' metric"); + } + + // overriding 'dimensions' here because this metric is an account metric. + // see 'UserErrors' in https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/metrics-dimensions.html + return this.metric('UserErrors', { statistic: 'sum', ...props, dimensions: {} }); } /** * Metric for the conditional check failed requests this table * - * @default sum over a minute + * By default, the metric will be calculated as a sum over a period of 5 minutes. + * You can customize this by using the `statistic` and `period` properties. */ public metricConditionalCheckFailedRequests(props?: cloudwatch.MetricOptions): cloudwatch.Metric { return this.metric('ConditionalCheckFailedRequests', { statistic: 'sum', ...props }); } /** - * Metric for the successful request latency this table + * Metric for the successful request latency this table. + * + * By default, the metric will be calculated as an average over a period of 5 minutes. + * You can customize this by using the `statistic` and `period` properties. * - * @default avg over a minute */ public metricSuccessfulRequestLatency(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('SuccessfulRequestLatency', { statistic: 'avg', ...props }); + + if (!props?.dimensions?.Operation) { + throw new Error("'Operation' dimension must be passed for the 'SuccessfulRequestLatency' metric."); + } + + const dimensions = { + TableName: this.tableName, + ...props?.dimensions ?? {}, + }; + + return this.metric('SuccessfulRequestLatency', { statistic: 'avg', ...props, dimensions }); + } + + /** + * Metric for the system errors this table. + * + * This will sum errors across all possible operations. + * Note that by default, each individual metric will be calculated as a sum over a period of 5 minutes. + * You can customize this by using the `statistic` and `period` properties. + */ + public metricSystemErrorsForOperations(props?: SystemErrorsForOperationsMetricOptions): cloudwatch.IMetric { + + if (props?.dimensions?.Operation) { + throw new Error("The Operation dimension is not supported. Use the 'operations' property."); + } + + const operations = props?.operations ?? Object.values(Operation); + + const values = this.createMetricsForOperations('SystemErrors', operations, { statistic: 'sum', ...props }); + + const sum = new cloudwatch.MathExpression({ + expression: `${Object.keys(values).join(' + ')}`, + usingMetrics: { ...values }, + color: props?.color, + label: 'Sum of errors across all operations', + period: props?.period, + }); + + return sum; + } + + /** + * Create a map of metrics that can be used in a math expression. + * + * Using the return value of this function as the `usingMetrics` property in `cloudwatch.MathExpression` allows you to + * use the keys of this map as metric names inside you expression. + * + * @param metricName The metric name. + * @param operations The list of operations to create metrics for. + * @param props Properties for the individual metrics. + * @param metricNameMapper Mapper function to allow controlling the individual metric name per operation. + */ + private createMetricsForOperations(metricName: string, operations: Operation[], + props?: cloudwatch.MetricOptions, metricNameMapper?: (op: Operation) => string): Record { + + const metrics: Record = {}; + + const mapper = metricNameMapper ?? (op => op.toLowerCase()); + + if (props?.dimensions?.Operation) { + throw new Error('Invalid properties. Operation dimension is not supported when calculating operational metrics'); + } + + for (const operation of operations) { + + const metric = this.metric(metricName, { + ...props, + dimensions: { + TableName: this.tableName, + Operation: operation, + ...props?.dimensions, + }, + }); + + const operationMetricName = mapper(operation); + const firstChar = operationMetricName.charAt(0); + + if (firstChar === firstChar.toUpperCase()) { + // https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html#metric-math-syntax + throw new Error(`Mapper generated an illegal operation metric name: ${operationMetricName}. Must start with a lowercase letter`); + } + + metrics[operationMetricName] = metric; + } + + return metrics; } protected abstract get hasIndex(): boolean; diff --git a/packages/@aws-cdk/aws-dynamodb/test/dynamodb.test.ts b/packages/@aws-cdk/aws-dynamodb/test/dynamodb.test.ts index 4d0ab34e5a757..3a4dad70f1463 100644 --- a/packages/@aws-cdk/aws-dynamodb/test/dynamodb.test.ts +++ b/packages/@aws-cdk/aws-dynamodb/test/dynamodb.test.ts @@ -14,6 +14,7 @@ import { StreamViewType, Table, TableEncryption, + Operation, } from '../lib'; /* eslint-disable quote-props */ @@ -1565,6 +1566,96 @@ describe('metrics', () => { }); }); + test('Using metricSystemErrorsForOperations with no operations will default to all', () => { + + const stack = new Stack(); + const table = new Table(stack, 'Table', { + partitionKey: { name: 'id', type: AttributeType.STRING }, + }); + + expect(Object.keys(table.metricSystemErrorsForOperations().toMetricConfig().mathExpression!.usingMetrics)).toEqual([ + 'getitem', + 'batchgetitem', + 'scan', + 'query', + 'getrecords', + 'putitem', + 'deleteitem', + 'updateitem', + 'batchwriteitem', + ]); + + }); + + test('Can use metricSystemErrors without the TableName dimension', () => { + + const stack = new Stack(); + const table = new Table(stack, 'Table', { + partitionKey: { name: 'id', type: AttributeType.STRING }, + }); + + expect(table.metricSystemErrors({ dimensions: { Operation: 'GetItem' } }).dimensions).toEqual({ + TableName: table.tableName, + Operation: 'GetItem', + }); + + }); + + test('Using metricSystemErrors without the Operation dimension will fail', () => { + + const stack = new Stack(); + const table = new Table(stack, 'Table', { + partitionKey: { name: 'id', type: AttributeType.STRING }, + }); + + expect(() => table.metricSystemErrors({ dimensions: { TableName: table.tableName } })) + .toThrow(/'Operation' dimension must be passed for the 'SystemErrors' metric./); + + }); + + test('Can use metricSystemErrorsForOperations on a Dynamodb Table', () => { + + // GIVEN + const stack = new Stack(); + const table = new Table(stack, 'Table', { + partitionKey: { name: 'id', type: AttributeType.STRING }, + }); + + // THEN + expect(stack.resolve(table.metricSystemErrorsForOperations({ operations: [Operation.GET_ITEM, Operation.PUT_ITEM] }))).toEqual({ + expression: 'getitem + putitem', + label: 'Sum of errors across all operations', + period: Duration.minutes(5), + usingMetrics: { + getitem: { + dimensions: { + Operation: 'GetItem', + TableName: { + Ref: 'TableCD117FA1', + }, + }, + metricName: 'SystemErrors', + namespace: 'AWS/DynamoDB', + period: Duration.minutes(5), + statistic: 'Sum', + }, + putitem: { + dimensions: { + Operation: 'PutItem', + TableName: { + Ref: 'TableCD117FA1', + }, + }, + metricName: 'SystemErrors', + namespace: 'AWS/DynamoDB', + period: Duration.minutes(5), + statistic: 'Sum', + }, + }, + }); + + }); + test('Can use metricSystemErrors on a Dynamodb Table', () => { // GIVEN const stack = new Stack(); @@ -1573,15 +1664,26 @@ describe('metrics', () => { }); // THEN - expect(stack.resolve(table.metricSystemErrors())).toEqual({ + expect(stack.resolve(table.metricSystemErrors({ dimensions: { TableName: table.tableName, Operation: 'GetItem' } }))).toEqual({ period: Duration.minutes(5), - dimensions: { TableName: { Ref: 'TableCD117FA1' } }, + dimensions: { TableName: { Ref: 'TableCD117FA1' }, Operation: 'GetItem' }, namespace: 'AWS/DynamoDB', metricName: 'SystemErrors', statistic: 'Sum', }); }); + test('Using metricUserErrors with dimensions will fail', () => { + // GIVEN + const stack = new Stack(); + const table = new Table(stack, 'Table', { + partitionKey: { name: 'id', type: AttributeType.STRING }, + }); + + expect(() => table.metricUserErrors({ dimensions: { TableName: table.tableName } })).toThrow(/'dimensions' is not supported for the 'UserErrors' metric/); + + }); + test('Can use metricUserErrors on a Dynamodb Table', () => { // GIVEN const stack = new Stack(); @@ -1592,7 +1694,7 @@ describe('metrics', () => { // THEN expect(stack.resolve(table.metricUserErrors())).toEqual({ period: Duration.minutes(5), - dimensions: { TableName: { Ref: 'TableCD117FA1' } }, + dimensions: {}, namespace: 'AWS/DynamoDB', metricName: 'UserErrors', statistic: 'Sum', @@ -1616,6 +1718,32 @@ describe('metrics', () => { }); }); + test('Can use metricSuccessfulRequestLatency without the TableName dimension', () => { + + const stack = new Stack(); + const table = new Table(stack, 'Table', { + partitionKey: { name: 'id', type: AttributeType.STRING }, + }); + + expect(table.metricSuccessfulRequestLatency({ dimensions: { Operation: 'GetItem' } }).dimensions).toEqual({ + TableName: table.tableName, + Operation: 'GetItem', + }); + + }); + + test('Using metricSuccessfulRequestLatency without the Operation dimension will fail', () => { + + const stack = new Stack(); + const table = new Table(stack, 'Table', { + partitionKey: { name: 'id', type: AttributeType.STRING }, + }); + + expect(() => table.metricSuccessfulRequestLatency({ dimensions: { TableName: table.tableName } })) + .toThrow(/'Operation' dimension must be passed for the 'SuccessfulRequestLatency' metric./); + + }); + test('Can use metricSuccessfulRequestLatency on a Dynamodb Table', () => { // GIVEN const stack = new Stack(); @@ -1624,9 +1752,14 @@ describe('metrics', () => { }); // THEN - expect(stack.resolve(table.metricSuccessfulRequestLatency())).toEqual({ + expect(stack.resolve(table.metricSuccessfulRequestLatency({ + dimensions: { + TableName: table.tableName, + Operation: 'GetItem', + }, + }))).toEqual({ period: Duration.minutes(5), - dimensions: { TableName: { Ref: 'TableCD117FA1' } }, + dimensions: { TableName: { Ref: 'TableCD117FA1' }, Operation: 'GetItem' }, namespace: 'AWS/DynamoDB', metricName: 'SuccessfulRequestLatency', statistic: 'Average', From 89a505524ae3fe1c726d6988df07da6167493480 Mon Sep 17 00:00:00 2001 From: Thorsten Hoeger Date: Fri, 6 Nov 2020 01:33:38 +0100 Subject: [PATCH 058/314] feat(ecs-patterns): add option to create cname instead of alias record (#10812) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-ecs-patterns/README.md | 4 + .../application-load-balanced-service-base.ts | 56 +++++++-- .../network-load-balanced-service-base.ts | 52 +++++++- .../test.load-balanced-fargate-service.ts | 117 ++++++++++++++++++ 4 files changed, 215 insertions(+), 14 deletions(-) diff --git a/packages/@aws-cdk/aws-ecs-patterns/README.md b/packages/@aws-cdk/aws-ecs-patterns/README.md index cd88ea5133292..57905649401cd 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/README.md +++ b/packages/@aws-cdk/aws-ecs-patterns/README.md @@ -66,6 +66,8 @@ Fargate services use the default VPC Security Group unless one or more are provi By setting `redirectHTTP` to true, CDK will automatically create a listener on port 80 that redirects HTTP traffic to the HTTPS port. +If you specify the option `recordType` you can decide if you want the construct to use CNAME or Route53-Aliases as record sets. + Additionally, if more than one application target group are needed, instantiate one of the following: * `ApplicationMultipleTargetGroupsEc2Service` @@ -153,6 +155,8 @@ The CDK will create a new Amazon ECS cluster if you specify a VPC and omit `clus If `cluster` and `vpc` are omitted, the CDK creates a new VPC with subnets in two Availability Zones and a cluster within this VPC. +If you specify the option `recordType` you can decide if you want the construct to use CNAME or Route53-Aliases as record sets. + Additionally, if more than one network target group is needed, instantiate one of the following: * NetworkMultipleTargetGroupsEc2Service diff --git a/packages/@aws-cdk/aws-ecs-patterns/lib/base/application-load-balanced-service-base.ts b/packages/@aws-cdk/aws-ecs-patterns/lib/base/application-load-balanced-service-base.ts index 942a9afb32673..24e2aa98fd430 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/lib/base/application-load-balanced-service-base.ts +++ b/packages/@aws-cdk/aws-ecs-patterns/lib/base/application-load-balanced-service-base.ts @@ -6,11 +6,29 @@ import { IApplicationLoadBalancer, ListenerCertificate, ListenerAction, } from '@aws-cdk/aws-elasticloadbalancingv2'; import { IRole } from '@aws-cdk/aws-iam'; -import { ARecord, IHostedZone, RecordTarget } from '@aws-cdk/aws-route53'; +import { ARecord, IHostedZone, RecordTarget, CnameRecord } from '@aws-cdk/aws-route53'; import { LoadBalancerTarget } from '@aws-cdk/aws-route53-targets'; import * as cdk from '@aws-cdk/core'; import { Construct } from 'constructs'; +/** + * Describes the type of DNS record the service should create + */ +export enum ApplicationLoadBalancedServiceRecordType { + /** + * Create Route53 A Alias record + */ + ALIAS, + /** + * Create a CNAME record + */ + CNAME, + /** + * Do not create any DNS records + */ + NONE +} + /** * The properties for the base ApplicationLoadBalancedEc2Service or ApplicationLoadBalancedFargateService service. */ @@ -177,6 +195,14 @@ export interface ApplicationLoadBalancedServiceBaseProps { * @default false */ readonly redirectHTTP?: boolean; + + /** + * Specifies whether the Route53 record should be a CNAME, an A record using the Alias feature or no record at all. + * This is useful if you need to work with DNS systems that do not support alias records. + * + * @default ApplicationLoadBalancedServiceRecordType.ALIAS + */ + readonly recordType?: ApplicationLoadBalancedServiceRecordType; } export interface ApplicationLoadBalancedTaskImageOptions { @@ -390,13 +416,27 @@ export abstract class ApplicationLoadBalancedServiceBase extends cdk.Construct { throw new Error('A Route53 hosted domain zone name is required to configure the specified domain name'); } - const record = new ARecord(this, 'DNS', { - zone: props.domainZone, - recordName: props.domainName, - target: RecordTarget.fromAlias(new LoadBalancerTarget(loadBalancer)), - }); - - domainName = record.domainName; + switch (props.recordType ?? ApplicationLoadBalancedServiceRecordType.ALIAS) { + case ApplicationLoadBalancedServiceRecordType.ALIAS: + let aliasRecord = new ARecord(this, 'DNS', { + zone: props.domainZone, + recordName: props.domainName, + target: RecordTarget.fromAlias(new LoadBalancerTarget(loadBalancer)), + }); + domainName = aliasRecord.domainName; + break; + case ApplicationLoadBalancedServiceRecordType.CNAME: + let cnameRecord = new CnameRecord(this, 'DNS', { + zone: props.domainZone, + recordName: props.domainName, + domainName: loadBalancer.loadBalancerDnsName, + }); + domainName = cnameRecord.domainName; + break; + case ApplicationLoadBalancedServiceRecordType.NONE: + // Do not create a DNS record + break; + } } if (loadBalancer instanceof ApplicationLoadBalancer) { diff --git a/packages/@aws-cdk/aws-ecs-patterns/lib/base/network-load-balanced-service-base.ts b/packages/@aws-cdk/aws-ecs-patterns/lib/base/network-load-balanced-service-base.ts index e02c402b94867..5143cf18525fe 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/lib/base/network-load-balanced-service-base.ts +++ b/packages/@aws-cdk/aws-ecs-patterns/lib/base/network-load-balanced-service-base.ts @@ -2,11 +2,29 @@ import { IVpc } from '@aws-cdk/aws-ec2'; import { AwsLogDriver, BaseService, CloudMapOptions, Cluster, ContainerImage, ICluster, LogDriver, PropagatedTagSource, Secret } from '@aws-cdk/aws-ecs'; import { INetworkLoadBalancer, NetworkListener, NetworkLoadBalancer, NetworkTargetGroup } from '@aws-cdk/aws-elasticloadbalancingv2'; import { IRole } from '@aws-cdk/aws-iam'; -import { ARecord, IHostedZone, RecordTarget } from '@aws-cdk/aws-route53'; +import { ARecord, CnameRecord, IHostedZone, RecordTarget } from '@aws-cdk/aws-route53'; import { LoadBalancerTarget } from '@aws-cdk/aws-route53-targets'; import * as cdk from '@aws-cdk/core'; import { Construct } from 'constructs'; +/** + * Describes the type of DNS record the service should create + */ +export enum NetworkLoadBalancedServiceRecordType { + /** + * Create Route53 A Alias record + */ + ALIAS, + /** + * Create a CNAME record + */ + CNAME, + /** + * Do not create any DNS records + */ + NONE +} + /** * The properties for the base NetworkLoadBalancedEc2Service or NetworkLoadBalancedFargateService service. */ @@ -136,6 +154,14 @@ export interface NetworkLoadBalancedServiceBaseProps { * @default - AWS Cloud Map service discovery is not enabled. */ readonly cloudMapOptions?: CloudMapOptions; + + /** + * Specifies whether the Route53 record should be a CNAME, an A record using the Alias feature or no record at all. + * This is useful if you need to work with DNS systems that do not support alias records. + * + * @default NetworkLoadBalancedServiceRecordType.ALIAS + */ + readonly recordType?: NetworkLoadBalancedServiceRecordType; } export interface NetworkLoadBalancedTaskImageOptions { @@ -294,11 +320,25 @@ export abstract class NetworkLoadBalancedServiceBase extends cdk.Construct { throw new Error('A Route53 hosted domain zone name is required to configure the specified domain name'); } - new ARecord(this, 'DNS', { - zone: props.domainZone, - recordName: props.domainName, - target: RecordTarget.fromAlias(new LoadBalancerTarget(loadBalancer)), - }); + switch (props.recordType ?? NetworkLoadBalancedServiceRecordType.ALIAS) { + case NetworkLoadBalancedServiceRecordType.ALIAS: + new ARecord(this, 'DNS', { + zone: props.domainZone, + recordName: props.domainName, + target: RecordTarget.fromAlias(new LoadBalancerTarget(loadBalancer)), + }); + break; + case NetworkLoadBalancedServiceRecordType.CNAME: + new CnameRecord(this, 'DNS', { + zone: props.domainZone, + recordName: props.domainName, + domainName: loadBalancer.loadBalancerDnsName, + }); + break; + case NetworkLoadBalancedServiceRecordType.NONE: + // Do not create a DNS record + break; + } } if (loadBalancer instanceof NetworkLoadBalancer) { diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/test.load-balanced-fargate-service.ts b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/test.load-balanced-fargate-service.ts index 12b3adea9dcc1..4c8152482ed06 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/test.load-balanced-fargate-service.ts +++ b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/test.load-balanced-fargate-service.ts @@ -424,6 +424,123 @@ export = { test.done(); }, + 'setting ALB cname option correctly sets the recordset type'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const cluster = new ecs.Cluster(stack, 'Cluster', { vpc }); + + // WHEN + new ecsPatterns.ApplicationLoadBalancedFargateService(stack, 'FargateAlbService', { + cluster, + protocol: ApplicationProtocol.HTTPS, + domainName: 'test.domain.com', + domainZone: route53.HostedZone.fromHostedZoneAttributes(stack, 'HostedZone', { + hostedZoneId: 'fakeId', + zoneName: 'domain.com.', + }), + recordType: ecsPatterns.ApplicationLoadBalancedServiceRecordType.CNAME, + taskImageOptions: { + containerPort: 2015, + image: ecs.ContainerImage.fromRegistry('abiosoft/caddy'), + }, + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::Route53::RecordSet', { + Name: 'test.domain.com.', + Type: 'CNAME', + })); + + test.done(); + }, + + 'setting ALB record type to NONE correctly omits the recordset'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const cluster = new ecs.Cluster(stack, 'Cluster', { vpc }); + + // WHEN + new ecsPatterns.ApplicationLoadBalancedFargateService(stack, 'FargateAlbService', { + cluster, + protocol: ApplicationProtocol.HTTPS, + domainName: 'test.domain.com', + domainZone: route53.HostedZone.fromHostedZoneAttributes(stack, 'HostedZone', { + hostedZoneId: 'fakeId', + zoneName: 'domain.com.', + }), + recordType: ecsPatterns.ApplicationLoadBalancedServiceRecordType.NONE, + taskImageOptions: { + containerPort: 2015, + image: ecs.ContainerImage.fromRegistry('abiosoft/caddy'), + }, + }); + + // THEN + expect(stack).notTo(haveResource('AWS::Route53::RecordSet')); + + test.done(); + }, + + + 'setting NLB cname option correctly sets the recordset type'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const cluster = new ecs.Cluster(stack, 'Cluster', { vpc }); + + // WHEN + new ecsPatterns.NetworkLoadBalancedFargateService(stack, 'FargateNlbService', { + cluster, + domainName: 'test.domain.com', + domainZone: route53.HostedZone.fromHostedZoneAttributes(stack, 'HostedZone', { + hostedZoneId: 'fakeId', + zoneName: 'domain.com.', + }), + recordType: ecsPatterns.NetworkLoadBalancedServiceRecordType.CNAME, + taskImageOptions: { + containerPort: 2015, + image: ecs.ContainerImage.fromRegistry('abiosoft/caddy'), + }, + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::Route53::RecordSet', { + Name: 'test.domain.com.', + Type: 'CNAME', + })); + + test.done(); + }, + + 'setting NLB record type to NONE correctly omits the recordset'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const cluster = new ecs.Cluster(stack, 'Cluster', { vpc }); + + // WHEN + new ecsPatterns.NetworkLoadBalancedFargateService(stack, 'FargateNlbService', { + cluster, + domainName: 'test.domain.com', + domainZone: route53.HostedZone.fromHostedZoneAttributes(stack, 'HostedZone', { + hostedZoneId: 'fakeId', + zoneName: 'domain.com.', + }), + recordType: ecsPatterns.NetworkLoadBalancedServiceRecordType.NONE, + taskImageOptions: { + containerPort: 2015, + image: ecs.ContainerImage.fromRegistry('abiosoft/caddy'), + }, + }); + + // THEN + expect(stack).notTo(haveResource('AWS::Route53::RecordSet')); + + test.done(); + }, + 'setting ALB HTTP protocol to create the listener on 80'(test: Test) { // GIVEN const stack = new cdk.Stack(); From 83464d77c14df4f31cfaee07bcb895ddce2101d1 Mon Sep 17 00:00:00 2001 From: AWS CDK Team Date: Fri, 6 Nov 2020 02:06:35 +0000 Subject: [PATCH 059/314] chore(release): 1.72.0 --- CHANGELOG.md | 43 ++++++++++++++++++++++++++++++++++++++++++- version.v1.json | 4 ++-- 2 files changed, 44 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6993f622a281f..7388ed1a9859b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,47 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.72.0](https://github.com/aws/aws-cdk/compare/v1.71.0...v1.72.0) (2020-11-06) + + +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES + +* **rds:** Serverless cluster `enableHttpEndpoint` renamed to `enableDataApi` +* **stepfunctions-tasks:** type of `outputLocation` in the experimental Athena `StartQueryExecution` has been changed to `s3.Location` from `string` + +### Features + +* **apigatewayv2:** http api - endpoint url ([#11092](https://github.com/aws/aws-cdk/issues/11092)) ([c200413](https://github.com/aws/aws-cdk/commit/c20041356940c5569c00e82f9e6bee794002929b)), closes [#10651](https://github.com/aws/aws-cdk/issues/10651) +* **apigatewayv2:** vpc link and private integrations ([#11198](https://github.com/aws/aws-cdk/issues/11198)) ([e87a6a3](https://github.com/aws/aws-cdk/commit/e87a6a333c06d157f6d9074e05f251505525d0d5)), closes [#10531](https://github.com/aws/aws-cdk/issues/10531) [#10119](https://github.com/aws/aws-cdk/issues/10119) [aws/jsii#1947](https://github.com/aws/jsii/issues/1947) +* **appmesh:** add Virtual Gateways and Gateway Routes ([#10879](https://github.com/aws/aws-cdk/issues/10879)) ([79200e7](https://github.com/aws/aws-cdk/commit/79200e75b2468ccdee46154d049f3ceb30bb51e1)) +* **appsync:** add RDS datasource ([#9258](https://github.com/aws/aws-cdk/issues/9258)) ([23d0943](https://github.com/aws/aws-cdk/commit/23d0943216df76bea395b319deb21282e4c57a7c)), closes [#9152](https://github.com/aws/aws-cdk/issues/9152) +* **appsync:** support custom cloudWatchLogsRoleArn for GraphqlApi ([#10357](https://github.com/aws/aws-cdk/issues/10357)) ([bed89a5](https://github.com/aws/aws-cdk/commit/bed89a5d0aabe7d9a25ad7fac74a38f03b92e4c9)), closes [#9441](https://github.com/aws/aws-cdk/issues/9441) +* **ec2:** Add Lambda interface endpoint ([#11260](https://github.com/aws/aws-cdk/issues/11260)) ([9d0c935](https://github.com/aws/aws-cdk/commit/9d0c935fc62f325105598473e39b47b247437146)), closes [#11259](https://github.com/aws/aws-cdk/issues/11259) +* intro "Names.uniqueId()" instead of the deprecated "node.uniqueId" ([#11166](https://github.com/aws/aws-cdk/issues/11166)) ([5e433b1](https://github.com/aws/aws-cdk/commit/5e433b1d52470c3ecf5a460f79e4b8103542c35c)), closes [aws/constructs#314](https://github.com/aws/constructs/issues/314) +* **ecs-patterns:** add option to create cname instead of alias record ([#10812](https://github.com/aws/aws-cdk/issues/10812)) ([89a5055](https://github.com/aws/aws-cdk/commit/89a505524ae3fe1c726d6988df07da6167493480)) +* **ecs-service-extensions:** create an `Environment` from attributes ([#10932](https://github.com/aws/aws-cdk/issues/10932)) ([d395b5e](https://github.com/aws/aws-cdk/commit/d395b5e618fc423c46c65b9be40d0c1423e2b578)), closes [#10931](https://github.com/aws/aws-cdk/issues/10931) +* **rds:** add grant method for Data API ([#10748](https://github.com/aws/aws-cdk/issues/10748)) ([884539b](https://github.com/aws/aws-cdk/commit/884539b231245c893c456b2c619fe661cd39960f)), closes [#10744](https://github.com/aws/aws-cdk/issues/10744) + + +### Bug Fixes + +* **apigateway:** changes to gateway response does not trigger auto deployment ([#11068](https://github.com/aws/aws-cdk/issues/11068)) ([0c8264a](https://github.com/aws/aws-cdk/commit/0c8264adf782d1adbfe8d538186a71093d9c8834)), closes [#10963](https://github.com/aws/aws-cdk/issues/10963) +* **cfnspec:** incorrect Route 53 health check configuration properties in CloudFormation specification ([#11280](https://github.com/aws/aws-cdk/issues/11280)) ([f3c8b50](https://github.com/aws/aws-cdk/commit/f3c8b5034eb7ad1ccd9eecb4a929c8f11a2336d0)), closes [/github.com/aws/aws-cdk/issues/11096#issuecomment-717435271](https://github.com/aws//github.com/aws/aws-cdk/issues/11096/issues/issuecomment-717435271) [#11096](https://github.com/aws/aws-cdk/issues/11096) +* **cli:** `--no-previous-parameters` incorrectly skips updates ([#11288](https://github.com/aws/aws-cdk/issues/11288)) ([1bfc649](https://github.com/aws/aws-cdk/commit/1bfc64948b6ac63f93f030c5a2064b3ac4376289)) +* **core:** many nested stacks make NodeJS run out of memory ([#11250](https://github.com/aws/aws-cdk/issues/11250)) ([c124886](https://github.com/aws/aws-cdk/commit/c124886fbcabea166f34250cad84f7526e05b1bf)) +* **core:** multiple library copies lead to 'Assets must be defined within Stage or App' error ([#11113](https://github.com/aws/aws-cdk/issues/11113)) ([fcfed39](https://github.com/aws/aws-cdk/commit/fcfed39e3524eef66d3638896bf4ca86697f1718)), closes [#10314](https://github.com/aws/aws-cdk/issues/10314) +* **core:** support docker engine v20.10.0-beta1 ([#11124](https://github.com/aws/aws-cdk/issues/11124)) ([87887a3](https://github.com/aws/aws-cdk/commit/87887a3faf24f5fde608135429585c6521637764)) +* **dynamodb:** Misconfigured metrics causing empty graphs ([#11283](https://github.com/aws/aws-cdk/issues/11283)) ([9968669](https://github.com/aws/aws-cdk/commit/9968669e4f4602a03de67e12bc5636a4f4bb1fd7)) +* **ecs:** redirect config should honor openListener flag ([#11115](https://github.com/aws/aws-cdk/issues/11115)) ([ed6e7ed](https://github.com/aws/aws-cdk/commit/ed6e7ed9ebee7dc8932c35885698fc72e2052085)) +* **event-targets:** circular dependency when the lambda target is in a different stack ([#11217](https://github.com/aws/aws-cdk/issues/11217)) ([e21f249](https://github.com/aws/aws-cdk/commit/e21f249f7b9c78ed5948d63e7650ee7b8d5b3f8b)), closes [#10942](https://github.com/aws/aws-cdk/issues/10942) +* **pipelines:** asset stage can't support more than 50 assets ([#11284](https://github.com/aws/aws-cdk/issues/11284)) ([5db8e80](https://github.com/aws/aws-cdk/commit/5db8e8018d2b8304025b7e61178c7a747c778a78)), closes [#9353](https://github.com/aws/aws-cdk/issues/9353) +* **secretsmanager:** can't export secret name from Secret ([#11202](https://github.com/aws/aws-cdk/issues/11202)) ([5dcdecb](https://github.com/aws/aws-cdk/commit/5dcdecb2c5d6ce19517af66090cfacabed88025b)), closes [#10914](https://github.com/aws/aws-cdk/issues/10914) +* **secretsmanager:** Secret.fromSecretName doesn't work with ECS ([#11042](https://github.com/aws/aws-cdk/issues/11042)) ([fe1ce73](https://github.com/aws/aws-cdk/commit/fe1ce73ec59fc3ad9d8b138ba2122303e77c0531)), closes [#10309](https://github.com/aws/aws-cdk/issues/10309) [#10519](https://github.com/aws/aws-cdk/issues/10519) +* **stepfunctions:** stack overflow when referenced json path finding encounters a circular object graph ([#11225](https://github.com/aws/aws-cdk/issues/11225)) ([f14d823](https://github.com/aws/aws-cdk/commit/f14d823279e4dbb6ac90ab21d219257b22b81278)), closes [#9319](https://github.com/aws/aws-cdk/issues/9319) +* **stepfunctions-tasks:** Athena* APIs have incorrect supported integration patterns ([#11188](https://github.com/aws/aws-cdk/issues/11188)) ([0f66833](https://github.com/aws/aws-cdk/commit/0f6683394fa6f96d6839b2c107f3dab8045509b4)), closes [#11045](https://github.com/aws/aws-cdk/issues/11045) [#11246](https://github.com/aws/aws-cdk/issues/11246) +* **stepfunctions-tasks:** incorrect S3 permissions for AthenaStartQueryExecution ([#11203](https://github.com/aws/aws-cdk/issues/11203)) ([b35c423](https://github.com/aws/aws-cdk/commit/b35c423644fbd8f20705c16c0809a9fb93e6d6f3)) +* explicitly set the 'ImagePullPrincipalType' of image ([#11264](https://github.com/aws/aws-cdk/issues/11264)) ([29aa223](https://github.com/aws/aws-cdk/commit/29aa223f05b5f012b42b662e7a9fcc8fe82167a7)), closes [#10569](https://github.com/aws/aws-cdk/issues/10569) + ## [1.71.0](https://github.com/aws/aws-cdk/compare/v1.70.0...v1.71.0) (2020-10-29) @@ -9,7 +50,7 @@ All notable changes to this project will be documented in this file. See [standa * **synthetics:** `runtime` is now a required property. -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **core:** Creation stack traces for `Lazy` values are no longer captured by default. The `CDK_DEBUG=true` environment variable must be diff --git a/version.v1.json b/version.v1.json index 003975241dcee..b7d663f683e0e 100644 --- a/version.v1.json +++ b/version.v1.json @@ -1,3 +1,3 @@ { - "version": "1.71.0" -} \ No newline at end of file + "version": "1.72.0" +} From 0c279fd3dc2001cd51736c79e5fc07755d961644 Mon Sep 17 00:00:00 2001 From: Neta Nir Date: Thu, 5 Nov 2020 18:23:01 -0800 Subject: [PATCH 060/314] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7388ed1a9859b..9bcb4c89cfe00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,7 +27,7 @@ All notable changes to this project will be documented in this file. See [standa ### Bug Fixes * **apigateway:** changes to gateway response does not trigger auto deployment ([#11068](https://github.com/aws/aws-cdk/issues/11068)) ([0c8264a](https://github.com/aws/aws-cdk/commit/0c8264adf782d1adbfe8d538186a71093d9c8834)), closes [#10963](https://github.com/aws/aws-cdk/issues/10963) -* **cfnspec:** incorrect Route 53 health check configuration properties in CloudFormation specification ([#11280](https://github.com/aws/aws-cdk/issues/11280)) ([f3c8b50](https://github.com/aws/aws-cdk/commit/f3c8b5034eb7ad1ccd9eecb4a929c8f11a2336d0)), closes [/github.com/aws/aws-cdk/issues/11096#issuecomment-717435271](https://github.com/aws//github.com/aws/aws-cdk/issues/11096/issues/issuecomment-717435271) [#11096](https://github.com/aws/aws-cdk/issues/11096) +* **cfnspec:** incorrect Route 53 health check configuration properties in CloudFormation specification ([#11280](https://github.com/aws/aws-cdk/issues/11280)) ([f3c8b50](https://github.com/aws/aws-cdk/commit/f3c8b5034eb7ad1ccd9eecb4a929c8f11a2336d0)), closes [#issuecomment-717435271](https://github.com/aws/aws-cdk/issues/11096#issuecomment-717435271) [#11096](https://github.com/aws/aws-cdk/issues/11096) * **cli:** `--no-previous-parameters` incorrectly skips updates ([#11288](https://github.com/aws/aws-cdk/issues/11288)) ([1bfc649](https://github.com/aws/aws-cdk/commit/1bfc64948b6ac63f93f030c5a2064b3ac4376289)) * **core:** many nested stacks make NodeJS run out of memory ([#11250](https://github.com/aws/aws-cdk/issues/11250)) ([c124886](https://github.com/aws/aws-cdk/commit/c124886fbcabea166f34250cad84f7526e05b1bf)) * **core:** multiple library copies lead to 'Assets must be defined within Stage or App' error ([#11113](https://github.com/aws/aws-cdk/issues/11113)) ([fcfed39](https://github.com/aws/aws-cdk/commit/fcfed39e3524eef66d3638896bf4ca86697f1718)), closes [#10314](https://github.com/aws/aws-cdk/issues/10314) From 030c5c58e2cedda8e74d7988dc44b042def9e703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20W=C3=BCrbach?= Date: Fri, 6 Nov 2020 05:44:01 +0100 Subject: [PATCH 061/314] feat(route53-targets): aws-apigatewayv2 target (#10191) Add support for [aws-apigatewayv2](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-apigatewayv2-readme.html#custom-domain) `DomainName` as target. Closes https://github.com/aws/aws-cdk/issues/8941 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-route53-targets/README.md | 15 ++++-- .../lib/api-gateway-domain-name.ts | 2 +- .../lib/api-gatewayv2-domain-name.ts | 16 ++++++ .../@aws-cdk/aws-route53-targets/lib/index.ts | 1 + .../@aws-cdk/aws-route53-targets/package.json | 2 + .../test/apigatewayv2-target.test.ts | 49 +++++++++++++++++++ 6 files changed, 80 insertions(+), 5 deletions(-) create mode 100644 packages/@aws-cdk/aws-route53-targets/lib/api-gatewayv2-domain-name.ts create mode 100644 packages/@aws-cdk/aws-route53-targets/test/apigatewayv2-target.test.ts diff --git a/packages/@aws-cdk/aws-route53-targets/README.md b/packages/@aws-cdk/aws-route53-targets/README.md index 3bd36f68ba46f..06d7dd6568255 100644 --- a/packages/@aws-cdk/aws-route53-targets/README.md +++ b/packages/@aws-cdk/aws-route53-targets/README.md @@ -16,6 +16,13 @@ This library contains Route53 Alias Record targets for: // or - route53.RecordTarget.fromAlias(new alias.ApiGatewayDomain(domainName)), }); ``` +* API Gateway V2 custom domains + ```ts + new route53.ARecord(this, 'AliasRecord', { + zone, + target: route53.RecordTarget.fromAlias(new alias.ApiGatewayv2Domain(domainName)), + }); + ``` * CloudFront distributions ```ts new route53.ARecord(this, 'AliasRecord', { @@ -55,17 +62,17 @@ For example, if the Amazon-provided DNS for the load balancer is `ALB-xxxxxxx.us ``` * S3 Bucket Website: -**Important:** The Bucket name must strictly match the full DNS name. -See [the Developer Guide](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/getting-started.html) for more info. +**Important:** The Bucket name must strictly match the full DNS name. +See [the Developer Guide](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/getting-started.html) for more info. ```ts const [recordName, domainName] = ['www', 'example.com']; - + const bucketWebsite = new Bucket(this, 'BucketWebsite', { bucketName: [recordName, domainName].join('.'), // www.example.com publicReadAccess: true, websiteIndexDocument: 'index.html', }); - + const zone = HostedZone.fromLookup(this, 'Zone', {domainName}); // example.com new route53.ARecord(this, 'AliasRecord', { diff --git a/packages/@aws-cdk/aws-route53-targets/lib/api-gateway-domain-name.ts b/packages/@aws-cdk/aws-route53-targets/lib/api-gateway-domain-name.ts index 3668a4858ac59..5aa40d5a52f10 100644 --- a/packages/@aws-cdk/aws-route53-targets/lib/api-gateway-domain-name.ts +++ b/packages/@aws-cdk/aws-route53-targets/lib/api-gateway-domain-name.ts @@ -5,7 +5,7 @@ import * as route53 from '@aws-cdk/aws-route53'; * Defines an API Gateway domain name as the alias target. * * Use the `ApiGateway` class if you wish to map the alias to an REST API with a - * domain name defined throug the `RestApiProps.domainName` prop. + * domain name defined through the `RestApiProps.domainName` prop. */ export class ApiGatewayDomain implements route53.IAliasRecordTarget { constructor(private readonly domainName: apig.IDomainName) { } diff --git a/packages/@aws-cdk/aws-route53-targets/lib/api-gatewayv2-domain-name.ts b/packages/@aws-cdk/aws-route53-targets/lib/api-gatewayv2-domain-name.ts new file mode 100644 index 0000000000000..b78078fca525a --- /dev/null +++ b/packages/@aws-cdk/aws-route53-targets/lib/api-gatewayv2-domain-name.ts @@ -0,0 +1,16 @@ +import * as apigv2 from '@aws-cdk/aws-apigatewayv2'; +import * as route53 from '@aws-cdk/aws-route53'; + +/** + * Defines an API Gateway V2 domain name as the alias target. + */ +export class ApiGatewayv2Domain implements route53.IAliasRecordTarget { + constructor(private readonly domainName: apigv2.IDomainName) { } + + public bind(_record: route53.IRecordSet): route53.AliasRecordTargetConfig { + return { + dnsName: this.domainName.regionalDomainName, + hostedZoneId: this.domainName.regionalHostedZoneId, + }; + } +} diff --git a/packages/@aws-cdk/aws-route53-targets/lib/index.ts b/packages/@aws-cdk/aws-route53-targets/lib/index.ts index 6df1bd67d6037..af574aa599519 100644 --- a/packages/@aws-cdk/aws-route53-targets/lib/index.ts +++ b/packages/@aws-cdk/aws-route53-targets/lib/index.ts @@ -1,4 +1,5 @@ export * from './api-gateway-domain-name'; +export * from './api-gatewayv2-domain-name'; export * from './bucket-website-target'; export * from './classic-load-balancer-target'; export * from './cloudfront-target'; diff --git a/packages/@aws-cdk/aws-route53-targets/package.json b/packages/@aws-cdk/aws-route53-targets/package.json index 87dd1a8969ad8..52e3e252fb960 100644 --- a/packages/@aws-cdk/aws-route53-targets/package.json +++ b/packages/@aws-cdk/aws-route53-targets/package.json @@ -74,6 +74,7 @@ }, "dependencies": { "@aws-cdk/aws-apigateway": "0.0.0", + "@aws-cdk/aws-apigatewayv2": "0.0.0", "@aws-cdk/aws-cloudfront": "0.0.0", "@aws-cdk/aws-cognito": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", @@ -89,6 +90,7 @@ "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/aws-apigateway": "0.0.0", + "@aws-cdk/aws-apigatewayv2": "0.0.0", "@aws-cdk/aws-cloudfront": "0.0.0", "@aws-cdk/aws-cognito": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", diff --git a/packages/@aws-cdk/aws-route53-targets/test/apigatewayv2-target.test.ts b/packages/@aws-cdk/aws-route53-targets/test/apigatewayv2-target.test.ts new file mode 100644 index 0000000000000..66a504f630157 --- /dev/null +++ b/packages/@aws-cdk/aws-route53-targets/test/apigatewayv2-target.test.ts @@ -0,0 +1,49 @@ +import { expect as expectStack, haveResource } from '@aws-cdk/assert'; +import * as apigwv2 from '@aws-cdk/aws-apigatewayv2'; +import * as acm from '@aws-cdk/aws-certificatemanager'; +import * as route53 from '@aws-cdk/aws-route53'; +import { Stack } from '@aws-cdk/core'; +import * as targets from '../lib'; + +test('targets.ApiGatewayv2Domain can be used to directly reference a domain', () => { + // GIVEN + const stack = new Stack(); + const domainName = 'example.com'; + const cert = new acm.Certificate(stack, 'cert', { domainName }); + const dn = new apigwv2.DomainName(stack, 'DN', { + domainName, + certificate: cert, + }); + const zone = new route53.HostedZone(stack, 'zone', { + zoneName: 'example.com', + }); + + // WHEN + new route53.ARecord(stack, 'A', { + zone, + target: route53.RecordTarget.fromAlias(new targets.ApiGatewayv2Domain(dn)), + }); + + // THEN + expectStack(stack).to(haveResource('AWS::Route53::RecordSet', { + Name: 'example.com.', + Type: 'A', + AliasTarget: { + DNSName: { + 'Fn::GetAtt': [ + 'DNFDC76583', + 'RegionalDomainName', + ], + }, + HostedZoneId: { + 'Fn::GetAtt': [ + 'DNFDC76583', + 'RegionalHostedZoneId', + ], + }, + }, + HostedZoneId: { + Ref: 'zoneEB40FF1E', + }, + })); +}); From 78c8b42b606720e2d229b024dd0cfdf6b9960fdc Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 6 Nov 2020 05:18:11 +0000 Subject: [PATCH 062/314] chore(deps-dev): bump @types/lodash from 4.14.164 to 4.14.165 (#11322) Bumps [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) from 4.14.164 to 4.14.165. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/aws-codepipeline-actions/package.json | 2 +- packages/@aws-cdk/aws-lambda/package.json | 2 +- packages/@aws-cdk/core/package.json | 2 +- yarn.lock | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/@aws-cdk/aws-codepipeline-actions/package.json b/packages/@aws-cdk/aws-codepipeline-actions/package.json index d0e82f14df40c..6cf31932d7c31 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/package.json +++ b/packages/@aws-cdk/aws-codepipeline-actions/package.json @@ -69,7 +69,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-cloudtrail": "0.0.0", - "@types/lodash": "^4.14.164", + "@types/lodash": "^4.14.165", "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-lambda/package.json b/packages/@aws-cdk/aws-lambda/package.json index c812d75c51879..63319fe238f8f 100644 --- a/packages/@aws-cdk/aws-lambda/package.json +++ b/packages/@aws-cdk/aws-lambda/package.json @@ -78,7 +78,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/aws-lambda": "^8.10.64", - "@types/lodash": "^4.14.164", + "@types/lodash": "^4.14.165", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json index 4876aa73918f8..6ed538438492b 100644 --- a/packages/@aws-cdk/core/package.json +++ b/packages/@aws-cdk/core/package.json @@ -168,7 +168,7 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/lodash": "^4.14.164", + "@types/lodash": "^4.14.165", "@types/minimatch": "^3.0.3", "@types/node": "^10.17.44", "@types/sinon": "^9.0.8", diff --git a/yarn.lock b/yarn.lock index 27f55d7ab3cb8..c82a99b9ede01 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3131,10 +3131,10 @@ dependencies: jszip "*" -"@types/lodash@^4.14.164": - version "4.14.164" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.164.tgz#52348bcf909ac7b4c1bcbeda5c23135176e5dfa0" - integrity sha512-fXCEmONnrtbYUc5014avwBeMdhHHO8YJCkOBflUL9EoJBSKZ1dei+VO74fA7JkTHZ1GvZack2TyIw5U+1lT8jg== +"@types/lodash@^4.14.165": + version "4.14.165" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.165.tgz#74d55d947452e2de0742bad65270433b63a8c30f" + integrity sha512-tjSSOTHhI5mCHTy/OOXYIhi2Wt1qcbHmuXD1Ha7q70CgI/I71afO4XtLb/cVexki1oVYchpul/TOuu3Arcdxrg== "@types/md5@^2.2.1": version "2.2.1" From 47b698ebfea300978e101234bcd80145b6f1ed17 Mon Sep 17 00:00:00 2001 From: Adam Ruka Date: Fri, 6 Nov 2020 01:36:19 -0800 Subject: [PATCH 063/314] fix(cfn-include): Fn::FindInMap cannot be used for boolean properties (#11323) Including a template that was using an `Fn::FindInMap` expression for a boolean-typed property would fail with an error similar to: `Expected 'true' or 'false' for boolean value, got: '${Token[TOKEN.151]}'`. The reason is that our `Fn.findInMap()` function in `core` incorrectly assumes `Fn::FindInMap` can only return string values. Change `CfnParser` to use a new, module-private function `Fn._findInMap()` that returns an `IResolvable`. Fixes #11300 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../find-in-map-for-boolean-property.json | 25 +++++++++++++++++++ .../test/valid-templates.test.ts | 8 ++++++ packages/@aws-cdk/core/lib/cfn-fn.ts | 17 ++++++++----- packages/@aws-cdk/core/lib/cfn-parse.ts | 2 +- 4 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 packages/@aws-cdk/cloudformation-include/test/test-templates/find-in-map-for-boolean-property.json diff --git a/packages/@aws-cdk/cloudformation-include/test/test-templates/find-in-map-for-boolean-property.json b/packages/@aws-cdk/cloudformation-include/test/test-templates/find-in-map-for-boolean-property.json new file mode 100644 index 0000000000000..cdc5181de12e9 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-include/test/test-templates/find-in-map-for-boolean-property.json @@ -0,0 +1,25 @@ +{ + "Mappings": { + "SomeMapping": { + "region": { + "key1": true + } + } + }, + "Resources": { + "Bucket": { + "Type": "AWS::S3::Bucket", + "Properties": { + "PublicAccessBlockConfiguration": { + "BlockPublicAcls": { + "Fn::FindInMap": [ + "SomeMapping", + { "Ref": "AWS::Region" }, + "key1" + ] + } + } + } + } + } +} diff --git a/packages/@aws-cdk/cloudformation-include/test/valid-templates.test.ts b/packages/@aws-cdk/cloudformation-include/test/valid-templates.test.ts index fce331ca452eb..3c2d4b81f3fe4 100644 --- a/packages/@aws-cdk/cloudformation-include/test/valid-templates.test.ts +++ b/packages/@aws-cdk/cloudformation-include/test/valid-templates.test.ts @@ -777,6 +777,14 @@ describe('CDK Include', () => { }); }); + test('can ingest a template that uses Fn::FindInMap for the value of a boolean property', () => { + includeTestTemplate(stack, 'find-in-map-for-boolean-property.json'); + + expect(stack).toMatchTemplate( + loadTestFileToJsObject('find-in-map-for-boolean-property.json'), + ); + }); + test('can ingest a template that contains Rules, and allows retrieving those Rules', () => { const cfnTemplate = includeTestTemplate(stack, 'only-parameters-and-rule.json'); const rule = cfnTemplate.getRule('TestVpcRule'); diff --git a/packages/@aws-cdk/core/lib/cfn-fn.ts b/packages/@aws-cdk/core/lib/cfn-fn.ts index 8add880b01674..27cadbc99cc51 100644 --- a/packages/@aws-cdk/core/lib/cfn-fn.ts +++ b/packages/@aws-cdk/core/lib/cfn-fn.ts @@ -22,11 +22,6 @@ export class Fn { return new FnRef(logicalName).toString(); } - /** @internal */ - public static _ref(logicalId: string): IResolvable { - return new FnRef(logicalId); - } - /** * The ``Fn::GetAtt`` intrinsic function returns the value of an attribute * from a resource in the template. @@ -178,7 +173,17 @@ export class Fn { * @returns a token represented as a string */ public static findInMap(mapName: string, topLevelKey: string, secondLevelKey: string): string { - return new FnFindInMap(mapName, topLevelKey, secondLevelKey).toString(); + return Fn._findInMap(mapName, topLevelKey, secondLevelKey).toString(); + } + + /** + * An additional function used in CfnParser, + * as Fn::FindInMap does not always return a string. + * + * @internal + */ + public static _findInMap(mapName: string, topLevelKey: string, secondLevelKey: string): IResolvable { + return new FnFindInMap(mapName, topLevelKey, secondLevelKey); } /** diff --git a/packages/@aws-cdk/core/lib/cfn-parse.ts b/packages/@aws-cdk/core/lib/cfn-parse.ts index 3013c7f757296..663bdd6437a98 100644 --- a/packages/@aws-cdk/core/lib/cfn-parse.ts +++ b/packages/@aws-cdk/core/lib/cfn-parse.ts @@ -505,7 +505,7 @@ export class CfnParser { if (!mapping) { throw new Error(`Mapping used in FindInMap expression with name '${value[0]}' was not found in the template`); } - return Fn.findInMap(mapping.logicalId, value[1], value[2]); + return Fn._findInMap(mapping.logicalId, value[1], value[2]); } case 'Fn::Select': { const value = this.parseValue(object[key]); From 2c55c4d7c749d5e44f9735f5f93130ab2f00ce54 Mon Sep 17 00:00:00 2001 From: Romain Marcadier Date: Fri, 6 Nov 2020 12:31:42 +0100 Subject: [PATCH 064/314] chore: update bug issue template (#11336) Make it clear we are interested in the **CDK** (and not `aws`) CLI version. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .github/ISSUE_TEMPLATE/bug.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md index 2ad0217714a88..b12a80d025350 100644 --- a/.github/ISSUE_TEMPLATE/bug.md +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -33,7 +33,7 @@ What is the unexpected behavior you were seeing? If you got an error, paste it h ### Environment - - **CLI Version :** + - **CDK CLI Version :** - **Framework Version:** - **Node.js Version:** - **OS :** From 40d0bbbf21f5508fa6be3167cb7da9f9680700ff Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Fri, 6 Nov 2020 13:38:45 +0000 Subject: [PATCH 065/314] chore(core): update metadata tests to reflect v2 changes (#11320) In v2, the `@aws-cdk/core` and `@aws-cdk/cx-api` modules are private. Update the tests so that it will only operate on v1. In v2, we will need to design a new set of tests. This will be included in the re-design of metadata collection - https://github.com/aws/aws-cdk-rfcs/pull/254 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/core/lib/private/runtime-info.ts | 2 +- packages/@aws-cdk/core/test/app.test.ts | 74 +++++++++++-------- 2 files changed, 45 insertions(+), 31 deletions(-) diff --git a/packages/@aws-cdk/core/lib/private/runtime-info.ts b/packages/@aws-cdk/core/lib/private/runtime-info.ts index cf4b1b619d6c4..34a4129abe491 100644 --- a/packages/@aws-cdk/core/lib/private/runtime-info.ts +++ b/packages/@aws-cdk/core/lib/private/runtime-info.ts @@ -5,7 +5,7 @@ import { major as nodeMajorVersion } from './node-version'; // list of NPM scopes included in version reporting e.g. @aws-cdk and @aws-solutions-konstruk const WHITELIST_SCOPES = ['@aws-cdk', '@aws-cdk-containers', '@aws-solutions-konstruk', '@aws-solutions-constructs', '@amzn']; // list of NPM packages included in version reporting -const WHITELIST_PACKAGES = ['aws-rfdk']; +const WHITELIST_PACKAGES = ['aws-rfdk', 'aws-cdk-lib']; /** * Returns a list of loaded modules and their versions. diff --git a/packages/@aws-cdk/core/test/app.test.ts b/packages/@aws-cdk/core/test/app.test.ts index 27b567b0f71be..69486987f0085 100644 --- a/packages/@aws-cdk/core/test/app.test.ts +++ b/packages/@aws-cdk/core/test/app.test.ts @@ -261,22 +261,23 @@ nodeunitShim({ }, 'runtime library versions'(test: Test) { - MetadataResource.clearModulesCache(); - - const response = withApp({ analyticsReporting: true }, app => { - const stack = new Stack(app, 'stack1'); - new CfnResource(stack, 'MyResource', { type: 'Resource::Type' }); - }); + v1(() => { + MetadataResource.clearModulesCache(); - const stackTemplate = response.getStackByName('stack1').template; - const libs = parseModules(stackTemplate.Resources?.CDKMetadata?.Properties?.Modules); + const response = withApp({ analyticsReporting: true }, app => { + const stack = new Stack(app, 'stack1'); + new CfnResource(stack, 'MyResource', { type: 'Resource::Type' }); + }); - // eslint-disable-next-line @typescript-eslint/no-require-imports - const version = require('../package.json').version; - test.deepEqual(libs['@aws-cdk/core'], version); - test.deepEqual(libs['@aws-cdk/cx-api'], version); - test.deepEqual(libs['jsii-runtime'], `node.js/${process.version}`); + const stackTemplate = response.getStackByName('stack1').template; + const libs = parseModules(stackTemplate.Resources?.CDKMetadata?.Properties?.Modules); + // eslint-disable-next-line @typescript-eslint/no-require-imports + const version = require('../package.json').version; + test.deepEqual(libs['@aws-cdk/core'], version); + test.deepEqual(libs['@aws-cdk/cx-api'], version); + test.deepEqual(libs['jsii-runtime'], `node.js/${process.version}`); + }); test.done(); }, @@ -320,25 +321,26 @@ nodeunitShim({ }, 'version reporting includes only @aws-cdk, aws-cdk and jsii libraries'(test: Test) { - MetadataResource.clearModulesCache(); + v1(() => { + MetadataResource.clearModulesCache(); - const response = withApp({ analyticsReporting: true }, app => { - const stack = new Stack(app, 'stack1'); - new CfnResource(stack, 'MyResource', { type: 'Resource::Type' }); - }); - - const stackTemplate = response.getStackByName('stack1').template; - const libs = parseModules(stackTemplate.Resources?.CDKMetadata?.Properties?.Modules); - const libNames = Object.keys(libs).sort(); - - test.deepEqual(libNames, [ - '@aws-cdk/cloud-assembly-schema', - '@aws-cdk/core', - '@aws-cdk/cx-api', - '@aws-cdk/region-info', - 'jsii-runtime', - ]); + const response = withApp({ analyticsReporting: true }, app => { + const stack = new Stack(app, 'stack1'); + new CfnResource(stack, 'MyResource', { type: 'Resource::Type' }); + }); + const stackTemplate = response.getStackByName('stack1').template; + const libs = parseModules(stackTemplate.Resources?.CDKMetadata?.Properties?.Modules); + const libNames = Object.keys(libs).sort(); + + test.deepEqual(libNames, [ + '@aws-cdk/cloud-assembly-schema', + '@aws-cdk/core', + '@aws-cdk/cx-api', + '@aws-cdk/region-info', + 'jsii-runtime', + ]); + }); test.done(); }, @@ -445,3 +447,15 @@ function withCliVersion(block: () => A): A { delete process.env[cxapi.CLI_VERSION_ENV]; } } + +function v1(block: () => void) { + onVersion(1, block); +} + +function onVersion(version: number, block: () => void) { + // eslint-disable-next-line @typescript-eslint/no-require-imports + const mv: number = require('../../../../release.json').majorVersion; + if (version === mv) { + block(); + } +} \ No newline at end of file From dfbf97bccff6f571fa98e0093c3193af3e00312a Mon Sep 17 00:00:00 2001 From: Shiv Lakshminarayan Date: Fri, 6 Nov 2020 06:24:51 -0800 Subject: [PATCH 066/314] chore(cognito): revert re-organization and use @internal instead so that base class is not exported (#11056) This reverts commit from #10925 which folded all implementations of `UserPoolIdentityProviderBase` into a single file. It was desirable to maintain our original code organization but we also did not want to export the base class In light of guidance provided in aws/jsii#2159, reverted back to original code organization and added the `@internal` decorator on the base class in a private directory ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-cognito/lib/index.ts | 3 +- .../@aws-cdk/aws-cognito/lib/user-pool-idp.ts | 387 ------------------ .../aws-cognito/lib/user-pool-idps/amazon.ts | 54 +++ .../aws-cognito/lib/user-pool-idps/base.ts | 198 +++++++++ .../lib/user-pool-idps/facebook.ts | 59 +++ .../aws-cognito/lib/user-pool-idps/google.ts | 54 +++ .../aws-cognito/lib/user-pool-idps/index.ts | 4 + .../private/user-pool-idp-base.ts | 39 ++ .../aws-cognito/test/user-pool-idp.test.ts | 295 ------------- .../test/user-pool-idps/amazon.test.ts | 101 +++++ .../test/user-pool-idps/base.test.ts | 95 +++++ .../test/user-pool-idps/facebook.test.ts | 103 +++++ .../test/user-pool-idps/google.test.ts | 101 +++++ 13 files changed, 810 insertions(+), 683 deletions(-) create mode 100644 packages/@aws-cdk/aws-cognito/lib/user-pool-idps/amazon.ts create mode 100644 packages/@aws-cdk/aws-cognito/lib/user-pool-idps/base.ts create mode 100644 packages/@aws-cdk/aws-cognito/lib/user-pool-idps/facebook.ts create mode 100644 packages/@aws-cdk/aws-cognito/lib/user-pool-idps/google.ts create mode 100644 packages/@aws-cdk/aws-cognito/lib/user-pool-idps/index.ts create mode 100644 packages/@aws-cdk/aws-cognito/lib/user-pool-idps/private/user-pool-idp-base.ts delete mode 100644 packages/@aws-cdk/aws-cognito/test/user-pool-idp.test.ts create mode 100644 packages/@aws-cdk/aws-cognito/test/user-pool-idps/amazon.test.ts create mode 100644 packages/@aws-cdk/aws-cognito/test/user-pool-idps/base.test.ts create mode 100644 packages/@aws-cdk/aws-cognito/test/user-pool-idps/facebook.test.ts create mode 100644 packages/@aws-cdk/aws-cognito/test/user-pool-idps/google.test.ts diff --git a/packages/@aws-cdk/aws-cognito/lib/index.ts b/packages/@aws-cdk/aws-cognito/lib/index.ts index 9aaccf45bf47e..2da1e6121b69b 100644 --- a/packages/@aws-cdk/aws-cognito/lib/index.ts +++ b/packages/@aws-cdk/aws-cognito/lib/index.ts @@ -4,4 +4,5 @@ export * from './user-pool'; export * from './user-pool-attr'; export * from './user-pool-client'; export * from './user-pool-domain'; -export * from './user-pool-idp'; \ No newline at end of file +export * from './user-pool-idp'; +export * from './user-pool-idps'; \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool-idp.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool-idp.ts index 1cc5ccbea23b1..c569ccd778fd8 100644 --- a/packages/@aws-cdk/aws-cognito/lib/user-pool-idp.ts +++ b/packages/@aws-cdk/aws-cognito/lib/user-pool-idp.ts @@ -1,8 +1,5 @@ import { IResource, Resource } from '@aws-cdk/core'; import { Construct } from 'constructs'; -import { CfnUserPoolIdentityProvider } from './cognito.generated'; -import { StandardAttributeNames } from './private/attr-names'; -import { IUserPool } from './user-pool'; /** * Represents a UserPoolIdentityProvider @@ -32,388 +29,4 @@ export class UserPoolIdentityProvider { } private constructor() {} -} - -/** - * An attribute available from a third party identity provider. - */ -export class ProviderAttribute { - /** The user id attribute provided by Amazon */ - public static readonly AMAZON_USER_ID = new ProviderAttribute('user_id'); - /** The email attribute provided by Amazon */ - public static readonly AMAZON_EMAIL = new ProviderAttribute('email'); - /** The name attribute provided by Amazon */ - public static readonly AMAZON_NAME = new ProviderAttribute('name'); - /** The postal code attribute provided by Amazon */ - public static readonly AMAZON_POSTAL_CODE = new ProviderAttribute('postal_code'); - - /** The user id attribute provided by Facebook */ - public static readonly FACEBOOK_ID = new ProviderAttribute('id'); - /** The birthday attribute provided by Facebook */ - public static readonly FACEBOOK_BIRTHDAY = new ProviderAttribute('birthday'); - /** The email attribute provided by Facebook */ - public static readonly FACEBOOK_EMAIL = new ProviderAttribute('email'); - /** The name attribute provided by Facebook */ - public static readonly FACEBOOK_NAME = new ProviderAttribute('name'); - /** The first name attribute provided by Facebook */ - public static readonly FACEBOOK_FIRST_NAME = new ProviderAttribute('first_name'); - /** The last name attribute provided by Facebook */ - public static readonly FACEBOOK_LAST_NAME = new ProviderAttribute('last_name'); - /** The middle name attribute provided by Facebook */ - public static readonly FACEBOOK_MIDDLE_NAME = new ProviderAttribute('middle_name'); - /** The gender attribute provided by Facebook */ - public static readonly FACEBOOK_GENDER = new ProviderAttribute('gender'); - /** The locale attribute provided by Facebook */ - public static readonly FACEBOOK_LOCALE = new ProviderAttribute('locale'); - - /** The name attribute provided by Google */ - public static readonly GOOGLE_NAMES = new ProviderAttribute('names'); - /** The gender attribute provided by Google */ - public static readonly GOOGLE_GENDER = new ProviderAttribute('gender'); - /** The birthday attribute provided by Google */ - public static readonly GOOGLE_BIRTHDAYS = new ProviderAttribute('birthdays'); - /** The birthday attribute provided by Google */ - public static readonly GOOGLE_PHONE_NUMBERS = new ProviderAttribute('phoneNumbers'); - /** The email attribute provided by Google */ - public static readonly GOOGLE_EMAIL = new ProviderAttribute('email'); - /** The name attribute provided by Google */ - public static readonly GOOGLE_NAME = new ProviderAttribute('name'); - /** The email attribute provided by Google */ - public static readonly GOOGLE_PICTURE = new ProviderAttribute('picture'); - /** The email attribute provided by Google */ - public static readonly GOOGLE_GIVEN_NAME = new ProviderAttribute('given_name'); - /** The email attribute provided by Google */ - public static readonly GOOGLE_FAMILY_NAME = new ProviderAttribute('family_name'); - - /** - * Use this to specify an attribute from the identity provider that is not pre-defined in the CDK. - * @param attributeName the attribute value string as recognized by the provider - */ - public static other(attributeName: string): ProviderAttribute { - return new ProviderAttribute(attributeName); - } - - /** The attribute value string as recognized by the provider. */ - public readonly attributeName: string; - - private constructor(attributeName: string) { - this.attributeName = attributeName; - } -} - -/** - * The mapping of user pool attributes to the attributes provided by the identity providers. - */ -export interface AttributeMapping { - /** - * The user's postal address is a required attribute. - * @default - not mapped - */ - readonly address?: ProviderAttribute; - - /** - * The user's birthday. - * @default - not mapped - */ - readonly birthdate?: ProviderAttribute; - - /** - * The user's e-mail address. - * @default - not mapped - */ - readonly email?: ProviderAttribute; - - /** - * The surname or last name of user. - * @default - not mapped - */ - readonly familyName?: ProviderAttribute; - - /** - * The user's gender. - * @default - not mapped - */ - readonly gender?: ProviderAttribute; - - /** - * The user's first name or give name. - * @default - not mapped - */ - readonly givenName?: ProviderAttribute; - - /** - * The user's locale. - * @default - not mapped - */ - readonly locale?: ProviderAttribute; - - /** - * The user's middle name. - * @default - not mapped - */ - readonly middleName?: ProviderAttribute; - - /** - * The user's full name in displayable form. - * @default - not mapped - */ - readonly fullname?: ProviderAttribute; - - /** - * The user's nickname or casual name. - * @default - not mapped - */ - readonly nickname?: ProviderAttribute; - - /** - * The user's telephone number. - * @default - not mapped - */ - readonly phoneNumber?: ProviderAttribute; - - /** - * The URL to the user's profile picture. - * @default - not mapped - */ - readonly profilePicture?: ProviderAttribute; - - /** - * The user's preferred username. - * @default - not mapped - */ - readonly preferredUsername?: ProviderAttribute; - - /** - * The URL to the user's profile page. - * @default - not mapped - */ - readonly profilePage?: ProviderAttribute; - - /** - * The user's time zone. - * @default - not mapped - */ - readonly timezone?: ProviderAttribute; - - /** - * Time, the user's information was last updated. - * @default - not mapped - */ - readonly lastUpdateTime?: ProviderAttribute; - - /** - * The URL to the user's web page or blog. - * @default - not mapped - */ - readonly website?: ProviderAttribute; - - /** - * Specify custom attribute mapping here and mapping for any standard attributes not supported yet. - * @default - no custom attribute mapping - */ - readonly custom?: { [key: string]: ProviderAttribute }; -} - -/** - * Properties to create a new instance of UserPoolIdentityProvider - */ -export interface UserPoolIdentityProviderProps { - /** - * The user pool to which this construct provides identities. - */ - readonly userPool: IUserPool; - - /** - * Mapping attributes from the identity provider to standard and custom attributes of the user pool. - * @default - no attribute mapping - */ - readonly attributeMapping?: AttributeMapping; -} - -/** - * Options to integrate with the various social identity providers. - */ -abstract class UserPoolIdentityProviderBase extends Resource implements IUserPoolIdentityProvider { - public abstract readonly providerName: string; - - public constructor(scope: Construct, id: string, private readonly props: UserPoolIdentityProviderProps) { - super(scope, id); - props.userPool.registerIdentityProvider(this); - } - - protected configureAttributeMapping(): any { - if (!this.props.attributeMapping) { - return undefined; - } - type SansCustom = Omit; - let mapping: { [key: string]: string } = {}; - mapping = Object.entries(this.props.attributeMapping) - .filter(([k, _]) => k !== 'custom') // 'custom' handled later separately - .reduce((agg, [k, v]) => { - return { ...agg, [StandardAttributeNames[k as keyof SansCustom]]: v.attributeName }; - }, mapping); - if (this.props.attributeMapping.custom) { - mapping = Object.entries(this.props.attributeMapping.custom).reduce((agg, [k, v]) => { - return { ...agg, [k]: v.attributeName }; - }, mapping); - } - if (Object.keys(mapping).length === 0) { return undefined; } - return mapping; - } -} - -/** - * Properties to initialize UserPoolAmazonIdentityProvider - */ -export interface UserPoolIdentityProviderAmazonProps extends UserPoolIdentityProviderProps { - /** - * The client id recognized by 'Login with Amazon' APIs. - * @see https://developer.amazon.com/docs/login-with-amazon/security-profile.html#client-identifier - */ - readonly clientId: string; - /** - * The client secret to be accompanied with clientId for 'Login with Amazon' APIs to authenticate the client. - * @see https://developer.amazon.com/docs/login-with-amazon/security-profile.html#client-identifier - */ - readonly clientSecret: string; - /** - * The types of user profile data to obtain for the Amazon profile. - * @see https://developer.amazon.com/docs/login-with-amazon/customer-profile.html - * @default [ profile ] - */ - readonly scopes?: string[]; -} - -/** - * Represents a identity provider that integrates with 'Login with Amazon' - * @resource AWS::Cognito::UserPoolIdentityProvider - */ -export class UserPoolIdentityProviderAmazon extends UserPoolIdentityProviderBase { - public readonly providerName: string; - - constructor(scope: Construct, id: string, props: UserPoolIdentityProviderAmazonProps) { - super(scope, id, props); - - const scopes = props.scopes ?? ['profile']; - - const resource = new CfnUserPoolIdentityProvider(this, 'Resource', { - userPoolId: props.userPool.userPoolId, - providerName: 'LoginWithAmazon', // must be 'LoginWithAmazon' when the type is 'LoginWithAmazon' - providerType: 'LoginWithAmazon', - providerDetails: { - client_id: props.clientId, - client_secret: props.clientSecret, - authorize_scopes: scopes.join(' '), - }, - attributeMapping: super.configureAttributeMapping(), - }); - - this.providerName = super.getResourceNameAttribute(resource.ref); - } -} - -/** - * Properties to initialize UserPoolFacebookIdentityProvider - */ -export interface UserPoolIdentityProviderFacebookProps extends UserPoolIdentityProviderProps { - /** - * The client id recognized by Facebook APIs. - */ - readonly clientId: string; - /** - * The client secret to be accompanied with clientUd for Facebook to authenticate the client. - * @see https://developers.facebook.com/docs/facebook-login/security#appsecret - */ - readonly clientSecret: string; - /** - * The list of facebook permissions to obtain for getting access to the Facebook profile. - * @see https://developers.facebook.com/docs/facebook-login/permissions - * @default [ public_profile ] - */ - readonly scopes?: string[]; - /** - * The Facebook API version to use - * @default - to the oldest version supported by Facebook - */ - readonly apiVersion?: string; -} - -/** -* Represents a identity provider that integrates with 'Facebook Login' -* @resource AWS::Cognito::UserPoolIdentityProvider -*/ -export class UserPoolIdentityProviderFacebook extends UserPoolIdentityProviderBase { - public readonly providerName: string; - - constructor(scope: Construct, id: string, props: UserPoolIdentityProviderFacebookProps) { - super(scope, id, props); - - const scopes = props.scopes ?? ['public_profile']; - - const resource = new CfnUserPoolIdentityProvider(this, 'Resource', { - userPoolId: props.userPool.userPoolId, - providerName: 'Facebook', // must be 'Facebook' when the type is 'Facebook' - providerType: 'Facebook', - providerDetails: { - client_id: props.clientId, - client_secret: props.clientSecret, - authorize_scopes: scopes.join(','), - api_version: props.apiVersion, - }, - attributeMapping: super.configureAttributeMapping(), - }); - - this.providerName = super.getResourceNameAttribute(resource.ref); - } -} - - -/** - * Properties to initialize UserPoolGoogleIdentityProvider - */ -export interface UserPoolIdentityProviderGoogleProps extends UserPoolIdentityProviderProps { - /** - * The client id recognized by Google APIs. - * @see https://developers.google.com/identity/sign-in/web/sign-in#specify_your_apps_client_id - */ - readonly clientId: string; - /** - * The client secret to be accompanied with clientId for Google APIs to authenticate the client. - * @see https://developers.google.com/identity/sign-in/web/sign-in - */ - readonly clientSecret: string; - /** - * The list of google permissions to obtain for getting access to the google profile - * @see https://developers.google.com/identity/sign-in/web/sign-in - * @default [ profile ] - */ - readonly scopes?: string[]; -} - -/** - * Represents a identity provider that integrates with 'Google' - * @resource AWS::Cognito::UserPoolIdentityProvider - */ -export class UserPoolIdentityProviderGoogle extends UserPoolIdentityProviderBase { - public readonly providerName: string; - - constructor(scope: Construct, id: string, props: UserPoolIdentityProviderGoogleProps) { - super(scope, id, props); - - const scopes = props.scopes ?? ['profile']; - - const resource = new CfnUserPoolIdentityProvider(this, 'Resource', { - userPoolId: props.userPool.userPoolId, - providerName: 'Google', // must be 'Google' when the type is 'Google' - providerType: 'Google', - providerDetails: { - client_id: props.clientId, - client_secret: props.clientSecret, - authorize_scopes: scopes.join(' '), - }, - attributeMapping: super.configureAttributeMapping(), - }); - - this.providerName = super.getResourceNameAttribute(resource.ref); - } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/amazon.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/amazon.ts new file mode 100644 index 0000000000000..c94cd5583a9d9 --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/amazon.ts @@ -0,0 +1,54 @@ +import { Construct } from 'constructs'; +import { CfnUserPoolIdentityProvider } from '../cognito.generated'; +import { UserPoolIdentityProviderProps } from './base'; +import { UserPoolIdentityProviderBase } from './private/user-pool-idp-base'; + +/** + * Properties to initialize UserPoolAmazonIdentityProvider + */ +export interface UserPoolIdentityProviderAmazonProps extends UserPoolIdentityProviderProps { + /** + * The client id recognized by 'Login with Amazon' APIs. + * @see https://developer.amazon.com/docs/login-with-amazon/security-profile.html#client-identifier + */ + readonly clientId: string; + /** + * The client secret to be accompanied with clientId for 'Login with Amazon' APIs to authenticate the client. + * @see https://developer.amazon.com/docs/login-with-amazon/security-profile.html#client-identifier + */ + readonly clientSecret: string; + /** + * The types of user profile data to obtain for the Amazon profile. + * @see https://developer.amazon.com/docs/login-with-amazon/customer-profile.html + * @default [ profile ] + */ + readonly scopes?: string[]; +} + +/** + * Represents a identity provider that integrates with 'Login with Amazon' + * @resource AWS::Cognito::UserPoolIdentityProvider + */ +export class UserPoolIdentityProviderAmazon extends UserPoolIdentityProviderBase { + public readonly providerName: string; + + constructor(scope: Construct, id: string, props: UserPoolIdentityProviderAmazonProps) { + super(scope, id, props); + + const scopes = props.scopes ?? ['profile']; + + const resource = new CfnUserPoolIdentityProvider(this, 'Resource', { + userPoolId: props.userPool.userPoolId, + providerName: 'LoginWithAmazon', // must be 'LoginWithAmazon' when the type is 'LoginWithAmazon' + providerType: 'LoginWithAmazon', + providerDetails: { + client_id: props.clientId, + client_secret: props.clientSecret, + authorize_scopes: scopes.join(' '), + }, + attributeMapping: super.configureAttributeMapping(), + }); + + this.providerName = super.getResourceNameAttribute(resource.ref); + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/base.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/base.ts new file mode 100644 index 0000000000000..27ee88777d885 --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/base.ts @@ -0,0 +1,198 @@ +import { IUserPool } from '../user-pool'; + +/** + * An attribute available from a third party identity provider. + */ +export class ProviderAttribute { + /** The user id attribute provided by Amazon */ + public static readonly AMAZON_USER_ID = new ProviderAttribute('user_id'); + /** The email attribute provided by Amazon */ + public static readonly AMAZON_EMAIL = new ProviderAttribute('email'); + /** The name attribute provided by Amazon */ + public static readonly AMAZON_NAME = new ProviderAttribute('name'); + /** The postal code attribute provided by Amazon */ + public static readonly AMAZON_POSTAL_CODE = new ProviderAttribute('postal_code'); + + /** The user id attribute provided by Facebook */ + public static readonly FACEBOOK_ID = new ProviderAttribute('id'); + /** The birthday attribute provided by Facebook */ + public static readonly FACEBOOK_BIRTHDAY = new ProviderAttribute('birthday'); + /** The email attribute provided by Facebook */ + public static readonly FACEBOOK_EMAIL = new ProviderAttribute('email'); + /** The name attribute provided by Facebook */ + public static readonly FACEBOOK_NAME = new ProviderAttribute('name'); + /** The first name attribute provided by Facebook */ + public static readonly FACEBOOK_FIRST_NAME = new ProviderAttribute('first_name'); + /** The last name attribute provided by Facebook */ + public static readonly FACEBOOK_LAST_NAME = new ProviderAttribute('last_name'); + /** The middle name attribute provided by Facebook */ + public static readonly FACEBOOK_MIDDLE_NAME = new ProviderAttribute('middle_name'); + /** The gender attribute provided by Facebook */ + public static readonly FACEBOOK_GENDER = new ProviderAttribute('gender'); + /** The locale attribute provided by Facebook */ + public static readonly FACEBOOK_LOCALE = new ProviderAttribute('locale'); + + /** The name attribute provided by Google */ + public static readonly GOOGLE_NAMES = new ProviderAttribute('names'); + /** The gender attribute provided by Google */ + public static readonly GOOGLE_GENDER = new ProviderAttribute('gender'); + /** The birthday attribute provided by Google */ + public static readonly GOOGLE_BIRTHDAYS = new ProviderAttribute('birthdays'); + /** The birthday attribute provided by Google */ + public static readonly GOOGLE_PHONE_NUMBERS = new ProviderAttribute('phoneNumbers'); + /** The email attribute provided by Google */ + public static readonly GOOGLE_EMAIL = new ProviderAttribute('email'); + /** The name attribute provided by Google */ + public static readonly GOOGLE_NAME = new ProviderAttribute('name'); + /** The email attribute provided by Google */ + public static readonly GOOGLE_PICTURE = new ProviderAttribute('picture'); + /** The email attribute provided by Google */ + public static readonly GOOGLE_GIVEN_NAME = new ProviderAttribute('given_name'); + /** The email attribute provided by Google */ + public static readonly GOOGLE_FAMILY_NAME = new ProviderAttribute('family_name'); + + /** + * Use this to specify an attribute from the identity provider that is not pre-defined in the CDK. + * @param attributeName the attribute value string as recognized by the provider + */ + public static other(attributeName: string): ProviderAttribute { + return new ProviderAttribute(attributeName); + } + + /** The attribute value string as recognized by the provider. */ + public readonly attributeName: string; + + private constructor(attributeName: string) { + this.attributeName = attributeName; + } +} + +/** + * The mapping of user pool attributes to the attributes provided by the identity providers. + */ +export interface AttributeMapping { + /** + * The user's postal address is a required attribute. + * @default - not mapped + */ + readonly address?: ProviderAttribute; + + /** + * The user's birthday. + * @default - not mapped + */ + readonly birthdate?: ProviderAttribute; + + /** + * The user's e-mail address. + * @default - not mapped + */ + readonly email?: ProviderAttribute; + + /** + * The surname or last name of user. + * @default - not mapped + */ + readonly familyName?: ProviderAttribute; + + /** + * The user's gender. + * @default - not mapped + */ + readonly gender?: ProviderAttribute; + + /** + * The user's first name or give name. + * @default - not mapped + */ + readonly givenName?: ProviderAttribute; + + /** + * The user's locale. + * @default - not mapped + */ + readonly locale?: ProviderAttribute; + + /** + * The user's middle name. + * @default - not mapped + */ + readonly middleName?: ProviderAttribute; + + /** + * The user's full name in displayable form. + * @default - not mapped + */ + readonly fullname?: ProviderAttribute; + + /** + * The user's nickname or casual name. + * @default - not mapped + */ + readonly nickname?: ProviderAttribute; + + /** + * The user's telephone number. + * @default - not mapped + */ + readonly phoneNumber?: ProviderAttribute; + + /** + * The URL to the user's profile picture. + * @default - not mapped + */ + readonly profilePicture?: ProviderAttribute; + + /** + * The user's preferred username. + * @default - not mapped + */ + readonly preferredUsername?: ProviderAttribute; + + /** + * The URL to the user's profile page. + * @default - not mapped + */ + readonly profilePage?: ProviderAttribute; + + /** + * The user's time zone. + * @default - not mapped + */ + readonly timezone?: ProviderAttribute; + + /** + * Time, the user's information was last updated. + * @default - not mapped + */ + readonly lastUpdateTime?: ProviderAttribute; + + /** + * The URL to the user's web page or blog. + * @default - not mapped + */ + readonly website?: ProviderAttribute; + + /** + * Specify custom attribute mapping here and mapping for any standard attributes not supported yet. + * @default - no custom attribute mapping + */ + readonly custom?: { [key: string]: ProviderAttribute }; +} + +/** + * Properties to create a new instance of UserPoolIdentityProvider + * + */ +export interface UserPoolIdentityProviderProps { + /** + * The user pool to which this construct provides identities. + */ + readonly userPool: IUserPool; + + /** + * Mapping attributes from the identity provider to standard and custom attributes of the user pool. + * @default - no attribute mapping + */ + readonly attributeMapping?: AttributeMapping; +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/facebook.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/facebook.ts new file mode 100644 index 0000000000000..81b7a37ac3d11 --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/facebook.ts @@ -0,0 +1,59 @@ +import { Construct } from 'constructs'; +import { CfnUserPoolIdentityProvider } from '../cognito.generated'; +import { UserPoolIdentityProviderProps } from './base'; +import { UserPoolIdentityProviderBase } from './private/user-pool-idp-base'; + +/** + * Properties to initialize UserPoolFacebookIdentityProvider + */ +export interface UserPoolIdentityProviderFacebookProps extends UserPoolIdentityProviderProps { + /** + * The client id recognized by Facebook APIs. + */ + readonly clientId: string; + /** + * The client secret to be accompanied with clientUd for Facebook to authenticate the client. + * @see https://developers.facebook.com/docs/facebook-login/security#appsecret + */ + readonly clientSecret: string; + /** + * The list of facebook permissions to obtain for getting access to the Facebook profile. + * @see https://developers.facebook.com/docs/facebook-login/permissions + * @default [ public_profile ] + */ + readonly scopes?: string[]; + /** + * The Facebook API version to use + * @default - to the oldest version supported by Facebook + */ + readonly apiVersion?: string; +} + +/** + * Represents a identity provider that integrates with 'Facebook Login' + * @resource AWS::Cognito::UserPoolIdentityProvider + */ +export class UserPoolIdentityProviderFacebook extends UserPoolIdentityProviderBase { + public readonly providerName: string; + + constructor(scope: Construct, id: string, props: UserPoolIdentityProviderFacebookProps) { + super(scope, id, props); + + const scopes = props.scopes ?? ['public_profile']; + + const resource = new CfnUserPoolIdentityProvider(this, 'Resource', { + userPoolId: props.userPool.userPoolId, + providerName: 'Facebook', // must be 'Facebook' when the type is 'Facebook' + providerType: 'Facebook', + providerDetails: { + client_id: props.clientId, + client_secret: props.clientSecret, + authorize_scopes: scopes.join(','), + api_version: props.apiVersion, + }, + attributeMapping: super.configureAttributeMapping(), + }); + + this.providerName = super.getResourceNameAttribute(resource.ref); + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/google.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/google.ts new file mode 100644 index 0000000000000..7d74dc9eb30fe --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/google.ts @@ -0,0 +1,54 @@ +import { Construct } from 'constructs'; +import { CfnUserPoolIdentityProvider } from '../cognito.generated'; +import { UserPoolIdentityProviderProps } from './base'; +import { UserPoolIdentityProviderBase } from './private/user-pool-idp-base'; + +/** + * Properties to initialize UserPoolGoogleIdentityProvider + */ +export interface UserPoolIdentityProviderGoogleProps extends UserPoolIdentityProviderProps { + /** + * The client id recognized by Google APIs. + * @see https://developers.google.com/identity/sign-in/web/sign-in#specify_your_apps_client_id + */ + readonly clientId: string; + /** + * The client secret to be accompanied with clientId for Google APIs to authenticate the client. + * @see https://developers.google.com/identity/sign-in/web/sign-in + */ + readonly clientSecret: string; + /** + * The list of google permissions to obtain for getting access to the google profile + * @see https://developers.google.com/identity/sign-in/web/sign-in + * @default [ profile ] + */ + readonly scopes?: string[]; +} + +/** + * Represents a identity provider that integrates with 'Google' + * @resource AWS::Cognito::UserPoolIdentityProvider + */ +export class UserPoolIdentityProviderGoogle extends UserPoolIdentityProviderBase { + public readonly providerName: string; + + constructor(scope: Construct, id: string, props: UserPoolIdentityProviderGoogleProps) { + super(scope, id, props); + + const scopes = props.scopes ?? ['profile']; + + const resource = new CfnUserPoolIdentityProvider(this, 'Resource', { + userPoolId: props.userPool.userPoolId, + providerName: 'Google', // must be 'Google' when the type is 'Google' + providerType: 'Google', + providerDetails: { + client_id: props.clientId, + client_secret: props.clientSecret, + authorize_scopes: scopes.join(' '), + }, + attributeMapping: super.configureAttributeMapping(), + }); + + this.providerName = super.getResourceNameAttribute(resource.ref); + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/index.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/index.ts new file mode 100644 index 0000000000000..dbc63a9854f37 --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/index.ts @@ -0,0 +1,4 @@ +export * from './base'; +export * from './amazon'; +export * from './facebook'; +export * from './google'; \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/private/user-pool-idp-base.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/private/user-pool-idp-base.ts new file mode 100644 index 0000000000000..633972f4b82f3 --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/private/user-pool-idp-base.ts @@ -0,0 +1,39 @@ +import { Resource } from '@aws-cdk/core'; +import { Construct } from 'constructs'; +import { StandardAttributeNames } from '../../private/attr-names'; +import { IUserPoolIdentityProvider } from '../../user-pool-idp'; +import { UserPoolIdentityProviderProps, AttributeMapping } from '../base'; + +/** + * Options to integrate with the various social identity providers. + * + * @internal + */ +export abstract class UserPoolIdentityProviderBase extends Resource implements IUserPoolIdentityProvider { + public abstract readonly providerName: string; + + public constructor(scope: Construct, id: string, private readonly props: UserPoolIdentityProviderProps) { + super(scope, id); + props.userPool.registerIdentityProvider(this); + } + + protected configureAttributeMapping(): any { + if (!this.props.attributeMapping) { + return undefined; + } + type SansCustom = Omit; + let mapping: { [key: string]: string } = {}; + mapping = Object.entries(this.props.attributeMapping) + .filter(([k, _]) => k !== 'custom') // 'custom' handled later separately + .reduce((agg, [k, v]) => { + return { ...agg, [StandardAttributeNames[k as keyof SansCustom]]: v.attributeName }; + }, mapping); + if (this.props.attributeMapping.custom) { + mapping = Object.entries(this.props.attributeMapping.custom).reduce((agg, [k, v]) => { + return { ...agg, [k]: v.attributeName }; + }, mapping); + } + if (Object.keys(mapping).length === 0) { return undefined; } + return mapping; + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/user-pool-idp.test.ts b/packages/@aws-cdk/aws-cognito/test/user-pool-idp.test.ts deleted file mode 100644 index c997fa9d61190..0000000000000 --- a/packages/@aws-cdk/aws-cognito/test/user-pool-idp.test.ts +++ /dev/null @@ -1,295 +0,0 @@ -import '@aws-cdk/assert/jest'; -import { Stack } from '@aws-cdk/core'; -import { ProviderAttribute, UserPool, UserPoolIdentityProviderAmazon, UserPoolIdentityProviderFacebook, UserPoolIdentityProviderGoogle } from '../lib'; - -describe('UserPoolIdentityProvider', () => { - describe('amazon', () => { - test('defaults', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'userpool'); - - // WHEN - new UserPoolIdentityProviderAmazon(stack, 'userpoolidp', { - userPool: pool, - clientId: 'amzn-client-id', - clientSecret: 'amzn-client-secret', - }); - - expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { - ProviderName: 'LoginWithAmazon', - ProviderType: 'LoginWithAmazon', - ProviderDetails: { - client_id: 'amzn-client-id', - client_secret: 'amzn-client-secret', - authorize_scopes: 'profile', - }, - }); - }); - - test('scopes', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'userpool'); - - // WHEN - new UserPoolIdentityProviderAmazon(stack, 'userpoolidp', { - userPool: pool, - clientId: 'amzn-client-id', - clientSecret: 'amzn-client-secret', - scopes: ['scope1', 'scope2'], - }); - - expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { - ProviderName: 'LoginWithAmazon', - ProviderType: 'LoginWithAmazon', - ProviderDetails: { - client_id: 'amzn-client-id', - client_secret: 'amzn-client-secret', - authorize_scopes: 'scope1 scope2', - }, - }); - }); - - test('registered with user pool', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'userpool'); - - // WHEN - const provider = new UserPoolIdentityProviderAmazon(stack, 'userpoolidp', { - userPool: pool, - clientId: 'amzn-client-id', - clientSecret: 'amzn-client-secret', - }); - - // THEN - expect(pool.identityProviders).toContain(provider); - }); - - test('attribute mapping', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'userpool'); - - // WHEN - new UserPoolIdentityProviderAmazon(stack, 'userpoolidp', { - userPool: pool, - clientId: 'amazn-client-id', - clientSecret: 'amzn-client-secret', - attributeMapping: { - givenName: ProviderAttribute.AMAZON_NAME, - address: ProviderAttribute.other('amzn-address'), - custom: { - customAttr1: ProviderAttribute.AMAZON_EMAIL, - customAttr2: ProviderAttribute.other('amzn-custom-attr'), - }, - }, - }); - - // THEN - expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { - AttributeMapping: { - given_name: 'name', - address: 'amzn-address', - customAttr1: 'email', - customAttr2: 'amzn-custom-attr', - }, - }); - }); - }); - - describe('facebook', () => { - test('defaults', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'userpool'); - - // WHEN - new UserPoolIdentityProviderFacebook(stack, 'userpoolidp', { - userPool: pool, - clientId: 'fb-client-id', - clientSecret: 'fb-client-secret', - }); - - expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { - ProviderName: 'Facebook', - ProviderType: 'Facebook', - ProviderDetails: { - client_id: 'fb-client-id', - client_secret: 'fb-client-secret', - authorize_scopes: 'public_profile', - }, - }); - }); - - test('scopes & api_version', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'userpool'); - - // WHEN - new UserPoolIdentityProviderFacebook(stack, 'userpoolidp', { - userPool: pool, - clientId: 'fb-client-id', - clientSecret: 'fb-client-secret', - scopes: ['scope1', 'scope2'], - apiVersion: 'version1', - }); - - expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { - ProviderName: 'Facebook', - ProviderType: 'Facebook', - ProviderDetails: { - client_id: 'fb-client-id', - client_secret: 'fb-client-secret', - authorize_scopes: 'scope1,scope2', - api_version: 'version1', - }, - }); - }); - - test('registered with user pool', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'userpool'); - - // WHEN - const provider = new UserPoolIdentityProviderFacebook(stack, 'userpoolidp', { - userPool: pool, - clientId: 'fb-client-id', - clientSecret: 'fb-client-secret', - }); - - // THEN - expect(pool.identityProviders).toContain(provider); - }); - - test('attribute mapping', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'userpool'); - - // WHEN - new UserPoolIdentityProviderFacebook(stack, 'userpoolidp', { - userPool: pool, - clientId: 'fb-client-id', - clientSecret: 'fb-client-secret', - attributeMapping: { - givenName: ProviderAttribute.FACEBOOK_NAME, - address: ProviderAttribute.other('fb-address'), - custom: { - customAttr1: ProviderAttribute.FACEBOOK_EMAIL, - customAttr2: ProviderAttribute.other('fb-custom-attr'), - }, - }, - }); - - // THEN - expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { - AttributeMapping: { - given_name: 'name', - address: 'fb-address', - customAttr1: 'email', - customAttr2: 'fb-custom-attr', - }, - }); - }); - }); - - describe('google', () => { - test('defaults', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'userpool'); - - // WHEN - new UserPoolIdentityProviderGoogle(stack, 'userpoolidp', { - userPool: pool, - clientId: 'google-client-id', - clientSecret: 'google-client-secret', - }); - - expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { - ProviderName: 'Google', - ProviderType: 'Google', - ProviderDetails: { - client_id: 'google-client-id', - client_secret: 'google-client-secret', - authorize_scopes: 'profile', - }, - }); - }); - - test('scopes', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'userpool'); - - // WHEN - new UserPoolIdentityProviderGoogle(stack, 'userpoolidp', { - userPool: pool, - clientId: 'google-client-id', - clientSecret: 'google-client-secret', - scopes: ['scope1', 'scope2'], - }); - - expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { - ProviderName: 'Google', - ProviderType: 'Google', - ProviderDetails: { - client_id: 'google-client-id', - client_secret: 'google-client-secret', - authorize_scopes: 'scope1 scope2', - }, - }); - }); - - test('registered with user pool', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'userpool'); - - // WHEN - const provider = new UserPoolIdentityProviderGoogle(stack, 'userpoolidp', { - userPool: pool, - clientId: 'google-client-id', - clientSecret: 'google-client-secret', - }); - - // THEN - expect(pool.identityProviders).toContain(provider); - }); - - test('attribute mapping', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'userpool'); - - // WHEN - new UserPoolIdentityProviderGoogle(stack, 'userpoolidp', { - userPool: pool, - clientId: 'google-client-id', - clientSecret: 'google-client-secret', - attributeMapping: { - givenName: ProviderAttribute.GOOGLE_NAME, - address: ProviderAttribute.other('google-address'), - custom: { - customAttr1: ProviderAttribute.GOOGLE_EMAIL, - customAttr2: ProviderAttribute.other('google-custom-attr'), - }, - }, - }); - - // THEN - expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { - AttributeMapping: { - given_name: 'name', - address: 'google-address', - customAttr1: 'email', - customAttr2: 'google-custom-attr', - }, - }); - }); - }); -}); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/user-pool-idps/amazon.test.ts b/packages/@aws-cdk/aws-cognito/test/user-pool-idps/amazon.test.ts new file mode 100644 index 0000000000000..a6995367a3ded --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/test/user-pool-idps/amazon.test.ts @@ -0,0 +1,101 @@ +import '@aws-cdk/assert/jest'; +import { Stack } from '@aws-cdk/core'; +import { ProviderAttribute, UserPool, UserPoolIdentityProviderAmazon } from '../../lib'; + +describe('UserPoolIdentityProvider', () => { + describe('amazon', () => { + test('defaults', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + new UserPoolIdentityProviderAmazon(stack, 'userpoolidp', { + userPool: pool, + clientId: 'amzn-client-id', + clientSecret: 'amzn-client-secret', + }); + + expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { + ProviderName: 'LoginWithAmazon', + ProviderType: 'LoginWithAmazon', + ProviderDetails: { + client_id: 'amzn-client-id', + client_secret: 'amzn-client-secret', + authorize_scopes: 'profile', + }, + }); + }); + + test('scopes', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + new UserPoolIdentityProviderAmazon(stack, 'userpoolidp', { + userPool: pool, + clientId: 'amzn-client-id', + clientSecret: 'amzn-client-secret', + scopes: ['scope1', 'scope2'], + }); + + expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { + ProviderName: 'LoginWithAmazon', + ProviderType: 'LoginWithAmazon', + ProviderDetails: { + client_id: 'amzn-client-id', + client_secret: 'amzn-client-secret', + authorize_scopes: 'scope1 scope2', + }, + }); + }); + + test('registered with user pool', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + const provider = new UserPoolIdentityProviderAmazon(stack, 'userpoolidp', { + userPool: pool, + clientId: 'amzn-client-id', + clientSecret: 'amzn-client-secret', + }); + + // THEN + expect(pool.identityProviders).toContain(provider); + }); + + test('attribute mapping', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + new UserPoolIdentityProviderAmazon(stack, 'userpoolidp', { + userPool: pool, + clientId: 'amazn-client-id', + clientSecret: 'amzn-client-secret', + attributeMapping: { + givenName: ProviderAttribute.AMAZON_NAME, + address: ProviderAttribute.other('amzn-address'), + custom: { + customAttr1: ProviderAttribute.AMAZON_EMAIL, + customAttr2: ProviderAttribute.other('amzn-custom-attr'), + }, + }, + }); + + // THEN + expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { + AttributeMapping: { + given_name: 'name', + address: 'amzn-address', + customAttr1: 'email', + customAttr2: 'amzn-custom-attr', + }, + }); + }); + }); +}); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/user-pool-idps/base.test.ts b/packages/@aws-cdk/aws-cognito/test/user-pool-idps/base.test.ts new file mode 100644 index 0000000000000..2bbac71068439 --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/test/user-pool-idps/base.test.ts @@ -0,0 +1,95 @@ +import '@aws-cdk/assert/jest'; +import { Stack } from '@aws-cdk/core'; +import { ProviderAttribute, UserPool } from '../../lib'; +import { UserPoolIdentityProviderBase } from '../../lib/user-pool-idps/private/user-pool-idp-base'; + +class MyIdp extends UserPoolIdentityProviderBase { + public readonly providerName = 'MyProvider'; + public readonly mapping = this.configureAttributeMapping(); +} + +describe('UserPoolIdentityProvider', () => { + describe('attribute mapping', () => { + test('absent or empty', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'UserPool'); + + // WHEN + const idp1 = new MyIdp(stack, 'MyIdp1', { + userPool: pool, + }); + const idp2 = new MyIdp(stack, 'MyIdp2', { + userPool: pool, + attributeMapping: {}, + }); + + // THEN + expect(idp1.mapping).toBeUndefined(); + expect(idp2.mapping).toBeUndefined(); + }); + + test('standard attributes', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'UserPool'); + + // WHEN + const idp = new MyIdp(stack, 'MyIdp', { + userPool: pool, + attributeMapping: { + givenName: ProviderAttribute.FACEBOOK_NAME, + birthdate: ProviderAttribute.FACEBOOK_BIRTHDAY, + }, + }); + + // THEN + expect(idp.mapping).toStrictEqual({ + given_name: 'name', + birthdate: 'birthday', + }); + }); + + test('custom', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'UserPool'); + + // WHEN + const idp = new MyIdp(stack, 'MyIdp', { + userPool: pool, + attributeMapping: { + custom: { + 'custom-attr-1': ProviderAttribute.AMAZON_EMAIL, + 'custom-attr-2': ProviderAttribute.AMAZON_NAME, + }, + }, + }); + + // THEN + expect(idp.mapping).toStrictEqual({ + 'custom-attr-1': 'email', + 'custom-attr-2': 'name', + }); + }); + + test('custom provider attribute', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'UserPool'); + + // WHEN + const idp = new MyIdp(stack, 'MyIdp', { + userPool: pool, + attributeMapping: { + address: ProviderAttribute.other('custom-provider-attr'), + }, + }); + + // THEN + expect(idp.mapping).toStrictEqual({ + address: 'custom-provider-attr', + }); + }); + }); +}); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/user-pool-idps/facebook.test.ts b/packages/@aws-cdk/aws-cognito/test/user-pool-idps/facebook.test.ts new file mode 100644 index 0000000000000..3020bd117221f --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/test/user-pool-idps/facebook.test.ts @@ -0,0 +1,103 @@ +import '@aws-cdk/assert/jest'; +import { Stack } from '@aws-cdk/core'; +import { ProviderAttribute, UserPool, UserPoolIdentityProviderFacebook } from '../../lib'; + +describe('UserPoolIdentityProvider', () => { + describe('facebook', () => { + test('defaults', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + new UserPoolIdentityProviderFacebook(stack, 'userpoolidp', { + userPool: pool, + clientId: 'fb-client-id', + clientSecret: 'fb-client-secret', + }); + + expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { + ProviderName: 'Facebook', + ProviderType: 'Facebook', + ProviderDetails: { + client_id: 'fb-client-id', + client_secret: 'fb-client-secret', + authorize_scopes: 'public_profile', + }, + }); + }); + + test('scopes & api_version', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + new UserPoolIdentityProviderFacebook(stack, 'userpoolidp', { + userPool: pool, + clientId: 'fb-client-id', + clientSecret: 'fb-client-secret', + scopes: ['scope1', 'scope2'], + apiVersion: 'version1', + }); + + expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { + ProviderName: 'Facebook', + ProviderType: 'Facebook', + ProviderDetails: { + client_id: 'fb-client-id', + client_secret: 'fb-client-secret', + authorize_scopes: 'scope1,scope2', + api_version: 'version1', + }, + }); + }); + + test('registered with user pool', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + const provider = new UserPoolIdentityProviderFacebook(stack, 'userpoolidp', { + userPool: pool, + clientId: 'fb-client-id', + clientSecret: 'fb-client-secret', + }); + + // THEN + expect(pool.identityProviders).toContain(provider); + }); + + test('attribute mapping', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + new UserPoolIdentityProviderFacebook(stack, 'userpoolidp', { + userPool: pool, + clientId: 'fb-client-id', + clientSecret: 'fb-client-secret', + attributeMapping: { + givenName: ProviderAttribute.FACEBOOK_NAME, + address: ProviderAttribute.other('fb-address'), + custom: { + customAttr1: ProviderAttribute.FACEBOOK_EMAIL, + customAttr2: ProviderAttribute.other('fb-custom-attr'), + }, + }, + }); + + // THEN + expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { + AttributeMapping: { + given_name: 'name', + address: 'fb-address', + customAttr1: 'email', + customAttr2: 'fb-custom-attr', + }, + }); + }); + }); +}); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/user-pool-idps/google.test.ts b/packages/@aws-cdk/aws-cognito/test/user-pool-idps/google.test.ts new file mode 100644 index 0000000000000..41700abe1c92d --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/test/user-pool-idps/google.test.ts @@ -0,0 +1,101 @@ +import '@aws-cdk/assert/jest'; +import { Stack } from '@aws-cdk/core'; +import { ProviderAttribute, UserPool, UserPoolIdentityProviderGoogle } from '../../lib'; + +describe('UserPoolIdentityProvider', () => { + describe('google', () => { + test('defaults', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + new UserPoolIdentityProviderGoogle(stack, 'userpoolidp', { + userPool: pool, + clientId: 'google-client-id', + clientSecret: 'google-client-secret', + }); + + expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { + ProviderName: 'Google', + ProviderType: 'Google', + ProviderDetails: { + client_id: 'google-client-id', + client_secret: 'google-client-secret', + authorize_scopes: 'profile', + }, + }); + }); + + test('scopes', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + new UserPoolIdentityProviderGoogle(stack, 'userpoolidp', { + userPool: pool, + clientId: 'google-client-id', + clientSecret: 'google-client-secret', + scopes: ['scope1', 'scope2'], + }); + + expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { + ProviderName: 'Google', + ProviderType: 'Google', + ProviderDetails: { + client_id: 'google-client-id', + client_secret: 'google-client-secret', + authorize_scopes: 'scope1 scope2', + }, + }); + }); + + test('registered with user pool', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + const provider = new UserPoolIdentityProviderGoogle(stack, 'userpoolidp', { + userPool: pool, + clientId: 'google-client-id', + clientSecret: 'google-client-secret', + }); + + // THEN + expect(pool.identityProviders).toContain(provider); + }); + + test('attribute mapping', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + new UserPoolIdentityProviderGoogle(stack, 'userpoolidp', { + userPool: pool, + clientId: 'google-client-id', + clientSecret: 'google-client-secret', + attributeMapping: { + givenName: ProviderAttribute.GOOGLE_NAME, + address: ProviderAttribute.other('google-address'), + custom: { + customAttr1: ProviderAttribute.GOOGLE_EMAIL, + customAttr2: ProviderAttribute.other('google-custom-attr'), + }, + }, + }); + + // THEN + expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { + AttributeMapping: { + given_name: 'name', + address: 'google-address', + customAttr1: 'email', + customAttr2: 'google-custom-attr', + }, + }); + }); + }); +}); \ No newline at end of file From 9eff751609597c35baadb559144b2069a2211215 Mon Sep 17 00:00:00 2001 From: Martin Muller Date: Fri, 6 Nov 2020 16:09:22 +0100 Subject: [PATCH 067/314] feat(apigateway): default value for enum type in schema models (#11064) Fixes: #11065 Add default to JsonSchema ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-apigateway/lib/json-schema.ts | 6 ++++++ .../@aws-cdk/aws-apigateway/test/util.test.ts | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/packages/@aws-cdk/aws-apigateway/lib/json-schema.ts b/packages/@aws-cdk/aws-apigateway/lib/json-schema.ts index b320031edf499..66b9c1b026203 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/json-schema.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/json-schema.ts @@ -35,6 +35,12 @@ export interface JsonSchema { readonly title?: string; readonly description?: string; readonly 'enum'?: any[]; + /** + * The default value if you use an enum. + * + * @default - not set + */ + readonly default?: any; readonly format?: string; readonly definitions?: { [name: string]: JsonSchema }; diff --git a/packages/@aws-cdk/aws-apigateway/test/util.test.ts b/packages/@aws-cdk/aws-apigateway/test/util.test.ts index f879c63698733..18352d21f5b0f 100644 --- a/packages/@aws-cdk/aws-apigateway/test/util.test.ts +++ b/packages/@aws-cdk/aws-apigateway/test/util.test.ts @@ -121,5 +121,21 @@ describe('util', () => { required: ['ref'], }); }); + + test('"default" for enum', () => { + const schema: JsonSchema = { + type: JsonSchemaType.STRING, + enum: ['green', 'blue', 'red'], + default: 'blue', + }; + + const actual = JsonSchemaMapper.toCfnJsonSchema(schema); + expect(actual).toEqual({ + $schema: 'http://json-schema.org/draft-04/schema#', + type: 'string', + enum: ['green', 'blue', 'red'], + default: 'blue', + }); + }); }); }); From 52da8cb3c65c41bf7cbd3c8001cf586a5c89041b Mon Sep 17 00:00:00 2001 From: Ayush Goyal Date: Fri, 6 Nov 2020 21:52:40 +0530 Subject: [PATCH 068/314] fix(apigateway): api key not supported for SpecRestApi (#11235) fix(apigateway): ApiKey not supported for SpecRestApi closes #11079 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-apigateway/lib/api-key.ts | 9 +++--- .../@aws-cdk/aws-apigateway/lib/restapi.ts | 20 ++++++------- .../aws-apigateway/test/restapi.test.ts | 28 +++++++++++++++++++ 3 files changed, 42 insertions(+), 15 deletions(-) diff --git a/packages/@aws-cdk/aws-apigateway/lib/api-key.ts b/packages/@aws-cdk/aws-apigateway/lib/api-key.ts index 84722c8811864..f48a01193385f 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/api-key.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/api-key.ts @@ -3,7 +3,7 @@ import { IResource as IResourceBase, Resource, Stack } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnApiKey } from './apigateway.generated'; import { ResourceOptions } from './resource'; -import { RestApi } from './restapi'; +import { IRestApi } from './restapi'; import { QuotaSettings, ThrottleSettings, UsagePlan, UsagePlanPerApiStage } from './usage-plan'; /** @@ -47,11 +47,10 @@ export interface ApiKeyOptions extends ResourceOptions { */ export interface ApiKeyProps extends ApiKeyOptions { /** - * [disable-awslint:ref-via-interface] * A list of resources this api key is associated with. * @default none */ - readonly resources?: RestApi[]; + readonly resources?: IRestApi[]; /** * An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace. @@ -183,12 +182,12 @@ export class ApiKey extends ApiKeyBase { }); } - private renderStageKeys(resources: RestApi[] | undefined): CfnApiKey.StageKeyProperty[] | undefined { + private renderStageKeys(resources: IRestApi[] | undefined): CfnApiKey.StageKeyProperty[] | undefined { if (!resources) { return undefined; } - return resources.map((resource: RestApi) => { + return resources.map((resource: IRestApi) => { const restApi = resource; const restApiId = restApi.restApiId; const stageName = restApi.deploymentStage!.stageName.toString(); diff --git a/packages/@aws-cdk/aws-apigateway/lib/restapi.ts b/packages/@aws-cdk/aws-apigateway/lib/restapi.ts index a4b8f6e2ee389..af2e0b2b3da01 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/restapi.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/restapi.ts @@ -378,6 +378,16 @@ export abstract class RestApiBase extends Resource implements IRestApi { }); } + /** + * Add an ApiKey + */ + public addApiKey(id: string, options?: ApiKeyOptions): IApiKey { + return new ApiKey(this, id, { + resources: [this], + ...options, + }); + } + /** * Returns the given named metric for this API */ @@ -706,16 +716,6 @@ export class RestApi extends RestApiBase { return this.urlForPath(); } - /** - * Add an ApiKey - */ - public addApiKey(id: string, options?: ApiKeyOptions): IApiKey { - return new ApiKey(this, id, { - resources: [this], - ...options, - }); - } - /** * Adds a new model. */ diff --git a/packages/@aws-cdk/aws-apigateway/test/restapi.test.ts b/packages/@aws-cdk/aws-apigateway/test/restapi.test.ts index 0617ae6f8eeaf..d8d0fdbcfd030 100644 --- a/packages/@aws-cdk/aws-apigateway/test/restapi.test.ts +++ b/packages/@aws-cdk/aws-apigateway/test/restapi.test.ts @@ -918,6 +918,34 @@ describe('restapi', () => { }, }); }); + + test('addApiKey is supported', () => { + // GIVEN + const stack = new Stack(); + const api = new apigw.SpecRestApi(stack, 'myapi', { + apiDefinition: apigw.ApiDefinition.fromInline({ foo: 'bar' }), + }); + api.root.addMethod('OPTIONS'); + + // WHEN + api.addApiKey('myapikey', { + apiKeyName: 'myApiKey1', + value: '01234567890ABCDEFabcdef', + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGateway::ApiKey', { + Enabled: true, + Name: 'myApiKey1', + StageKeys: [ + { + RestApiId: { Ref: 'myapi162F20B8' }, + StageName: { Ref: 'myapiDeploymentStageprod329F21FF' }, + }, + ], + Value: '01234567890ABCDEFabcdef', + }); + }); }); describe('Metrics', () => { From a4567f53d6e06d50f22d56364f69f0209c48874e Mon Sep 17 00:00:00 2001 From: Jonathan Goldwasser Date: Fri, 6 Nov 2020 21:02:42 +0100 Subject: [PATCH 069/314] fix(rds): customizing secret results in unusable password and lost attachment (#11237) When the `excludeCharacters` prop is updated the secret is correctly regenerated but the database is not updated because the `MasterUserPassword` prop does not change. Moreover the connection fields created by the attachment are lost because the `AWS::SecretsManager::SecretAttachment` doesn't "rerun" (it references the same secret). Introduce `fromGeneratedSecret()` and `fromPassword()` static methods in `Credentials`. When used the `MasterUsername` prop of the database references the username as a string instead of a dynamic reference to the username field of the secret. Moreover the logical id of the secret is a hash of its customization options. This way the secret gets replaced when it's customized, the database gets updated and the attachement reruns. This without updating the `MasterUsername` prop, avoiding a replacement of the database. For instances that were created from a snapshot the `MasterUsername` prop is not specified so there's no replacement risk. Add a new static method `fromGeneratedSecret()` in `SnapshotCredentials` to replace the secret when its customization options change (also hash in logical id). Deprecate `Credentials.fromUsername()` but keep it as default to avoid a breaking change that would replace existing databases that were not created from a snapshot. Deprecate `SnapshotCredentials.fromGeneratedPassword()` which doesn't replace the secret when customization options are changed. Closes #11040 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-rds/README.md | 8 +- packages/@aws-cdk/aws-rds/lib/cluster.ts | 12 +- .../@aws-cdk/aws-rds/lib/database-secret.ts | 33 +- packages/@aws-cdk/aws-rds/lib/instance.ts | 12 +- packages/@aws-cdk/aws-rds/lib/private/util.ts | 26 + packages/@aws-cdk/aws-rds/lib/props.ts | 102 ++- .../aws-rds/lib/serverless-cluster.ts | 12 +- ...ance-from-generated-password.expected.json | 625 ++++++++++++++++++ .../integ.instance-from-generated-password.ts | 27 + .../@aws-cdk/aws-rds/test/test.cluster.ts | 38 +- .../aws-rds/test/test.database-secret.ts | 44 +- .../@aws-cdk/aws-rds/test/test.instance.ts | 66 ++ 12 files changed, 951 insertions(+), 54 deletions(-) create mode 100644 packages/@aws-cdk/aws-rds/test/integ.instance-from-generated-password.expected.json create mode 100644 packages/@aws-cdk/aws-rds/test/integ.instance-from-generated-password.ts diff --git a/packages/@aws-cdk/aws-rds/README.md b/packages/@aws-cdk/aws-rds/README.md index 6efbdb42c8ac1..4b5683d2dc37f 100644 --- a/packages/@aws-cdk/aws-rds/README.md +++ b/packages/@aws-cdk/aws-rds/README.md @@ -23,7 +23,7 @@ your instances will be launched privately or publicly: ```ts const cluster = new rds.DatabaseCluster(this, 'Database', { engine: rds.DatabaseClusterEngine.auroraMysql({ version: rds.AuroraMysqlEngineVersion.VER_2_08_1 }), - credentials: rds.Credentials.fromUsername('clusteradmin'), // Optional - will default to admin + credentials: rds.Credentials.fromGeneratedSecret('clusteradmin'), // Optional - will default to 'admin' username and generated password instanceProps: { // optional , defaults to t3.medium instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), @@ -70,7 +70,7 @@ const instance = new rds.DatabaseInstance(this, 'Instance', { engine: rds.DatabaseInstanceEngine.oracleSe2({ version: rds.OracleEngineVersion.VER_19_0_0_0_2020_04_R1 }), // optional, defaults to m5.large instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE3, ec2.InstanceSize.SMALL), - credentials: rds.Credentials.fromUsername('syscdk'), // Optional - will default to admin + credentials: rds.Credentials.fromGeneratedSecret('syscdk'), // Optional - will default to 'admin' username and generated password vpc, vpcSubnets: { subnetType: ec2.SubnetType.PRIVATE @@ -146,13 +146,13 @@ const engine = rds.DatabaseInstanceEngine.postgres({ version: rds.PostgresEngine new rds.DatabaseInstance(this, 'InstanceWithUsername', { engine, vpc, - credentials: rds.Credentials.fromUsername('postgres'), // Creates an admin user of postgres with a generated password + credentials: rds.Credentials.fromGeneratedSecret('postgres'), // Creates an admin user of postgres with a generated password }); new rds.DatabaseInstance(this, 'InstanceWithUsernameAndPassword', { engine, vpc, - credentials: rds.Credentials.fromUsername('postgres', { password: SecretValue.ssmSecure('/dbPassword', 1) }), // Use password from SSM + credentials: rds.Credentials.fromPassword('postgres', SecretValue.ssmSecure('/dbPassword', '1')), // Use password from SSM }); const mySecret = secretsmanager.Secret.fromSecretName(this, 'DBSecret', 'myDBLoginInfo'); diff --git a/packages/@aws-cdk/aws-rds/lib/cluster.ts b/packages/@aws-cdk/aws-rds/lib/cluster.ts index c66eba30cd223..90b6ce18b2fcd 100644 --- a/packages/@aws-cdk/aws-rds/lib/cluster.ts +++ b/packages/@aws-cdk/aws-rds/lib/cluster.ts @@ -8,10 +8,9 @@ import { Annotations, Duration, RemovalPolicy, Resource, Token } from '@aws-cdk/ import { Construct } from 'constructs'; import { IClusterEngine } from './cluster-engine'; import { DatabaseClusterAttributes, IDatabaseCluster } from './cluster-ref'; -import { DatabaseSecret } from './database-secret'; import { Endpoint } from './endpoint'; import { IParameterGroup } from './parameter-group'; -import { applyRemovalPolicy, DEFAULT_PASSWORD_EXCLUDE_CHARS, defaultDeletionProtection, setupS3ImportExport } from './private/util'; +import { applyRemovalPolicy, DEFAULT_PASSWORD_EXCLUDE_CHARS, defaultDeletionProtection, renderCredentials, setupS3ImportExport } from './private/util'; import { BackupProps, Credentials, InstanceProps, PerformanceInsightRetention, RotationSingleUserOptions, RotationMultiUserOptions } from './props'; import { DatabaseProxy, DatabaseProxyOptions, ProxyTarget } from './proxy'; import { CfnDBCluster, CfnDBClusterProps, CfnDBInstance } from './rds.generated'; @@ -489,14 +488,7 @@ export class DatabaseCluster extends DatabaseClusterNew { this.singleUserRotationApplication = props.engine.singleUserRotationApplication; this.multiUserRotationApplication = props.engine.multiUserRotationApplication; - let credentials = props.credentials ?? Credentials.fromUsername(props.engine.defaultUsername ?? 'admin'); - if (!credentials.secret && !credentials.password) { - credentials = Credentials.fromSecret(new DatabaseSecret(this, 'Secret', { - username: credentials.username, - encryptionKey: credentials.encryptionKey, - excludeCharacters: credentials.excludeCharacters, - })); - } + const credentials = renderCredentials(this, props.engine, props.credentials); const secret = credentials.secret; const cluster = new CfnDBCluster(this, 'Resource', { diff --git a/packages/@aws-cdk/aws-rds/lib/database-secret.ts b/packages/@aws-cdk/aws-rds/lib/database-secret.ts index ea19e2051e6d5..0df046424a420 100644 --- a/packages/@aws-cdk/aws-rds/lib/database-secret.ts +++ b/packages/@aws-cdk/aws-rds/lib/database-secret.ts @@ -1,6 +1,7 @@ +import * as crypto from 'crypto'; import * as kms from '@aws-cdk/aws-kms'; import * as secretsmanager from '@aws-cdk/aws-secretsmanager'; -import { Aws } from '@aws-cdk/core'; +import { Aws, Names } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { DEFAULT_PASSWORD_EXCLUDE_CHARS } from './private/util'; @@ -33,6 +34,18 @@ export interface DatabaseSecretProps { * @default " %+~`#$&*()|[]{}:;<>?!'/@\"\\" */ readonly excludeCharacters?: string; + + /** + * Whether to replace this secret when the criteria for the password change. + * + * This is achieved by overriding the logical id of the AWS::SecretsManager::Secret + * with a hash of the options that influence the password generation. This + * way a new secret will be created when the password is regenerated and the + * cluster or instance consuming this secret will have its credentials updated. + * + * @default false + */ + readonly replaceOnPasswordCriteriaChanges?: boolean; } /** @@ -42,6 +55,8 @@ export interface DatabaseSecretProps { */ export class DatabaseSecret extends secretsmanager.Secret { constructor(scope: Construct, id: string, props: DatabaseSecretProps) { + const excludeCharacters = props.excludeCharacters ?? DEFAULT_PASSWORD_EXCLUDE_CHARS; + super(scope, id, { encryptionKey: props.encryptionKey, description: `Generated by the CDK for stack: ${Aws.STACK_NAME}`, @@ -52,8 +67,22 @@ export class DatabaseSecret extends secretsmanager.Secret { masterarn: props.masterSecret?.secretArn, }), generateStringKey: 'password', - excludeCharacters: props.excludeCharacters ?? DEFAULT_PASSWORD_EXCLUDE_CHARS, + excludeCharacters, }, }); + + if (props.replaceOnPasswordCriteriaChanges) { + const hash = crypto.createHash('md5'); + hash.update(JSON.stringify({ + // Use here the options that influence the password generation. + // If at some point we add other password customization options + // they sould be added here below (e.g. `passwordLength`). + excludeCharacters, + })); + const logicalId = `${Names.uniqueId(this)}${hash.digest('hex')}`; + + const secret = this.node.defaultChild as secretsmanager.CfnSecret; + secret.overrideLogicalId(logicalId.slice(-255)); // Take last 255 chars + } } } diff --git a/packages/@aws-cdk/aws-rds/lib/instance.ts b/packages/@aws-cdk/aws-rds/lib/instance.ts index fa3ecac082fab..392c75ef3564c 100644 --- a/packages/@aws-cdk/aws-rds/lib/instance.ts +++ b/packages/@aws-cdk/aws-rds/lib/instance.ts @@ -12,7 +12,7 @@ import { Endpoint } from './endpoint'; import { IInstanceEngine } from './instance-engine'; import { IOptionGroup } from './option-group'; import { IParameterGroup } from './parameter-group'; -import { applyRemovalPolicy, DEFAULT_PASSWORD_EXCLUDE_CHARS, defaultDeletionProtection, engineDescription, setupS3ImportExport } from './private/util'; +import { applyRemovalPolicy, DEFAULT_PASSWORD_EXCLUDE_CHARS, defaultDeletionProtection, engineDescription, renderCredentials, setupS3ImportExport } from './private/util'; import { Credentials, PerformanceInsightRetention, RotationMultiUserOptions, RotationSingleUserOptions, SnapshotCredentials } from './props'; import { DatabaseProxy, DatabaseProxyOptions, ProxyTarget } from './proxy'; import { CfnDBInstance, CfnDBInstanceProps } from './rds.generated'; @@ -947,14 +947,7 @@ export class DatabaseInstance extends DatabaseInstanceSource implements IDatabas constructor(scope: Construct, id: string, props: DatabaseInstanceProps) { super(scope, id, props); - let credentials = props.credentials ?? Credentials.fromUsername(props.engine.defaultUsername ?? 'admin'); - if (!credentials.secret && !credentials.password) { - credentials = Credentials.fromSecret(new DatabaseSecret(this, 'Secret', { - username: credentials.username, - encryptionKey: credentials.encryptionKey, - excludeCharacters: credentials.excludeCharacters, - })); - } + const credentials = renderCredentials(this, props.engine, props.credentials); const secret = credentials.secret; const instance = new CfnDBInstance(this, 'Resource', { @@ -1032,6 +1025,7 @@ export class DatabaseInstanceFromSnapshot extends DatabaseInstanceSource impleme username: credentials.username, encryptionKey: credentials.encryptionKey, excludeCharacters: credentials.excludeCharacters, + replaceOnPasswordCriteriaChanges: credentials.replaceOnPasswordCriteriaChanges, }); } diff --git a/packages/@aws-cdk/aws-rds/lib/private/util.ts b/packages/@aws-cdk/aws-rds/lib/private/util.ts index 361e0228c62e4..8cba1e4a1ee1e 100644 --- a/packages/@aws-cdk/aws-rds/lib/private/util.ts +++ b/packages/@aws-cdk/aws-rds/lib/private/util.ts @@ -1,7 +1,9 @@ import * as iam from '@aws-cdk/aws-iam'; import * as s3 from '@aws-cdk/aws-s3'; import { Construct, CfnDeletionPolicy, CfnResource, RemovalPolicy } from '@aws-cdk/core'; +import { DatabaseSecret } from '../database-secret'; import { IEngine } from '../engine'; +import { Credentials } from '../props'; /** * The default set of characters we exclude from generated passwords for database users. @@ -90,3 +92,27 @@ export function defaultDeletionProtection(deletionProtection?: boolean, removalP ? deletionProtection : (removalPolicy === RemovalPolicy.RETAIN ? true : undefined); } + +/** + * Renders the credentials for an instance or cluster + */ +export function renderCredentials(scope: Construct, engine: IEngine, credentials?: Credentials): Credentials { + let renderedCredentials = credentials ?? Credentials.fromUsername(engine.defaultUsername ?? 'admin'); // For backwards compatibilty + + if (!renderedCredentials.secret && !renderedCredentials.password) { + renderedCredentials = Credentials.fromSecret( + new DatabaseSecret(scope, 'Secret', { + username: renderedCredentials.username, + encryptionKey: renderedCredentials.encryptionKey, + excludeCharacters: renderedCredentials.excludeCharacters, + // if username must be referenced as a string we can safely replace the + // secret when customization options are changed without risking a replacement + replaceOnPasswordCriteriaChanges: credentials?.usernameAsString, + }), + // pass username if it must be referenced as a string + credentials?.usernameAsString ? renderedCredentials.username : undefined, + ); + } + + return renderedCredentials; +} diff --git a/packages/@aws-cdk/aws-rds/lib/props.ts b/packages/@aws-cdk/aws-rds/lib/props.ts index a54d70a5bf2ac..81725c7ffbb54 100644 --- a/packages/@aws-cdk/aws-rds/lib/props.ts +++ b/packages/@aws-cdk/aws-rds/lib/props.ts @@ -116,18 +116,9 @@ export interface BackupProps { } /** - * Options for creating a Login from a username. + * Base options for creating Credentials. */ -export interface CredentialsFromUsernameOptions { - /** - * Password - * - * Do not put passwords in your CDK code directly. - * - * @default - a Secrets Manager generated password - */ - readonly password?: SecretValue; - +export interface CredentialsBaseOptions { /** * KMS encryption key to encrypt the generated secret. * @@ -144,14 +135,55 @@ export interface CredentialsFromUsernameOptions { readonly excludeCharacters?: string; } +/** + * Options for creating Credentials from a username. + */ +export interface CredentialsFromUsernameOptions extends CredentialsBaseOptions { + /** + * Password + * + * Do not put passwords in your CDK code directly. + * + * @default - a Secrets Manager generated password + */ + readonly password?: SecretValue; +} + /** * Username and password combination */ export abstract class Credentials { + /** + * Creates Credentials with a password generated and stored in Secrets Manager. + */ + public static fromGeneratedSecret(username: string, options: CredentialsBaseOptions = {}): Credentials { + return { + ...options, + username, + usernameAsString: true, + }; + } + + /** + * Creates Credentials from a password + * + * Do not put passwords in your CDK code directly. + */ + public static fromPassword(username: string, password: SecretValue): Credentials { + return { + username, + password, + usernameAsString: true, + }; + } /** * Creates Credentials for the given username, and optional password and key. - * If no password is provided, one will be generated and stored in SecretsManager. + * If no password is provided, one will be generated and stored in Secrets Manager. + * + * @deprecated use `fromGeneratedSecret()` or `fromPassword()` for new Clusters and Instances. + * Note that switching from `fromUsername()` to `fromGeneratedSecret()` or `fromPassword()` for already deployed + * Clusters or Instances will result in their replacement! */ public static fromUsername(username: string, options: CredentialsFromUsernameOptions = {}): Credentials { return { @@ -161,7 +193,7 @@ export abstract class Credentials { } /** - * Creates Credentials from an existing SecretsManager ``Secret`` (or ``DatabaseSecret``) + * Creates Credentials from an existing Secrets Manager ``Secret`` (or ``DatabaseSecret``) * * The Secret must be a JSON string with a ``username`` and ``password`` field: * ``` @@ -171,10 +203,16 @@ export abstract class Credentials { * "password": , * } * ``` + * + * @param secret The secret where the credentials are stored + * @param username The username defined in the secret. If specified the username + * will be referenced as a string and not a dynamic reference to the username + * field in the secret. This allows to replace the secret without replacing the + * instance or cluster. */ - public static fromSecret(secret: secretsmanager.ISecret): Credentials { + public static fromSecret(secret: secretsmanager.ISecret, username?: string): Credentials { return { - username: secret.secretValueFromJson('username').toString(), + username: username ?? secret.secretValueFromJson('username').toString(), password: secret.secretValueFromJson('password'), encryptionKey: secret.encryptionKey, secret, @@ -186,6 +224,14 @@ export abstract class Credentials { */ public abstract readonly username: string; + /** + * Whether the username should be referenced as a string and not as a dynamic + * reference to the username in the secret. + * + * @default false + */ + public abstract readonly usernameAsString?: boolean; + /** * Password * @@ -241,10 +287,29 @@ export interface SnapshotCredentialsFromGeneratedPasswordOptions { * Credentials to update the password for a ``DatabaseInstanceFromSnapshot``. */ export abstract class SnapshotCredentials { + /** + * Generate a new password for the snapshot, using the existing username and an optional encryption key. + * The new credentials are stored in Secrets Manager. + * + * Note - The username must match the existing master username of the snapshot. + */ + public static fromGeneratedSecret(username: string, options: SnapshotCredentialsFromGeneratedPasswordOptions = {}): SnapshotCredentials { + return { + ...options, + generatePassword: true, + replaceOnPasswordCriteriaChanges: true, + username, + }; + } + /** * Generate a new password for the snapshot, using the existing username and an optional encryption key. * * Note - The username must match the existing master username of the snapshot. + * + * @deprecated use `fromGeneratedSecret()` for new Clusters and Instances. + * Note that switching from `fromGeneratedPassword()` to `fromGeneratedSecret()` for already deployed + * Clusters or Instances will update their master password. */ public static fromGeneratedPassword(username: string, options: SnapshotCredentialsFromGeneratedPasswordOptions = {}): SnapshotCredentials { return { @@ -295,6 +360,13 @@ export abstract class SnapshotCredentials { */ public abstract readonly generatePassword: boolean; + /** + * Whether to replace the generated secret when the criteria for the password change. + * + * @default false + */ + public abstract readonly replaceOnPasswordCriteriaChanges?: boolean; + /** * The master user password. * diff --git a/packages/@aws-cdk/aws-rds/lib/serverless-cluster.ts b/packages/@aws-cdk/aws-rds/lib/serverless-cluster.ts index c6b1d7edc514a..899607166c919 100644 --- a/packages/@aws-cdk/aws-rds/lib/serverless-cluster.ts +++ b/packages/@aws-cdk/aws-rds/lib/serverless-cluster.ts @@ -5,11 +5,10 @@ import * as secretsmanager from '@aws-cdk/aws-secretsmanager'; import { Resource, Duration, Token, Annotations, RemovalPolicy, IResource, Stack, Lazy } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { IClusterEngine } from './cluster-engine'; -import { DatabaseSecret } from './database-secret'; import { Endpoint } from './endpoint'; import { IParameterGroup } from './parameter-group'; import { DATA_API_ACTIONS } from './perms'; -import { applyRemovalPolicy, defaultDeletionProtection, DEFAULT_PASSWORD_EXCLUDE_CHARS } from './private/util'; +import { applyRemovalPolicy, defaultDeletionProtection, DEFAULT_PASSWORD_EXCLUDE_CHARS, renderCredentials } from './private/util'; import { Credentials, RotationMultiUserOptions, RotationSingleUserOptions } from './props'; import { CfnDBCluster } from './rds.generated'; import { ISubnetGroup, SubnetGroup } from './subnet-group'; @@ -420,14 +419,7 @@ export class ServerlessCluster extends ServerlessClusterBase { } } - let credentials = props.credentials ?? Credentials.fromUsername(props.engine.defaultUsername ?? 'admin'); - if (!credentials.secret && !credentials.password) { - credentials = Credentials.fromSecret(new DatabaseSecret(this, 'Secret', { - username: credentials.username, - encryptionKey: credentials.encryptionKey, - excludeCharacters: credentials.excludeCharacters, - })); - } + const credentials = renderCredentials(this, props.engine, props.credentials); const secret = credentials.secret; // bind the engine to the Cluster diff --git a/packages/@aws-cdk/aws-rds/test/integ.instance-from-generated-password.expected.json b/packages/@aws-cdk/aws-rds/test/integ.instance-from-generated-password.expected.json new file mode 100644 index 0000000000000..a01587728dac5 --- /dev/null +++ b/packages/@aws-cdk/aws-rds/test/integ.instance-from-generated-password.expected.json @@ -0,0 +1,625 @@ +{ + "Resources": { + "Vpc8378EB38": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-fixed-username/Vpc" + } + ] + } + }, + "VpcPublicSubnet1Subnet5C2D37C4": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.0.0/19", + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": "test-region-1a", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "aws-cdk-rds-fixed-username/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1RouteTable6C95E38E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-fixed-username/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1RouteTableAssociation97140677": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + } + } + }, + "VpcPublicSubnet1DefaultRoute3DA9E72A": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPublicSubnet1EIPD7E02669": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-fixed-username/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1NATGateway4D7517AA": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet1EIPD7E02669", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-fixed-username/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet2Subnet691E08A3": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.32.0/19", + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": "test-region-1b", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "aws-cdk-rds-fixed-username/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet2RouteTable94F7E489": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-fixed-username/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet2RouteTableAssociationDD5762D8": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + } + } + }, + "VpcPublicSubnet2DefaultRoute97F91067": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPublicSubnet2EIP3C605A87": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-fixed-username/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet2NATGateway9182C01D": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet2EIP3C605A87", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-fixed-username/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet3SubnetBE12F0B6": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.64.0/19", + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": "test-region-1c", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "aws-cdk-rds-fixed-username/Vpc/PublicSubnet3" + } + ] + } + }, + "VpcPublicSubnet3RouteTable93458DBB": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-fixed-username/Vpc/PublicSubnet3" + } + ] + } + }, + "VpcPublicSubnet3RouteTableAssociation1F1EDF02": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet3RouteTable93458DBB" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet3SubnetBE12F0B6" + } + } + }, + "VpcPublicSubnet3DefaultRoute4697774F": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet3RouteTable93458DBB" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPublicSubnet3EIP3A666A23": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-fixed-username/Vpc/PublicSubnet3" + } + ] + } + }, + "VpcPublicSubnet3NATGateway7640CD1D": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet3EIP3A666A23", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VpcPublicSubnet3SubnetBE12F0B6" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-fixed-username/Vpc/PublicSubnet3" + } + ] + } + }, + "VpcPrivateSubnet1Subnet536B997A": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.96.0/19", + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": "test-region-1a", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "aws-cdk-rds-fixed-username/Vpc/PrivateSubnet1" + } + ] + } + }, + "VpcPrivateSubnet1RouteTableB2C5B500": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-fixed-username/Vpc/PrivateSubnet1" + } + ] + } + }, + "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + } + } + }, + "VpcPrivateSubnet1DefaultRouteBE02A9ED": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + } + } + }, + "VpcPrivateSubnet2Subnet3788AAA1": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.128.0/19", + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": "test-region-1b", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "aws-cdk-rds-fixed-username/Vpc/PrivateSubnet2" + } + ] + } + }, + "VpcPrivateSubnet2RouteTableA678073B": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-fixed-username/Vpc/PrivateSubnet2" + } + ] + } + }, + "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + } + }, + "VpcPrivateSubnet2DefaultRoute060D2087": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet2NATGateway9182C01D" + } + } + }, + "VpcPrivateSubnet3SubnetF258B56E": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.160.0/19", + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": "test-region-1c", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "aws-cdk-rds-fixed-username/Vpc/PrivateSubnet3" + } + ] + } + }, + "VpcPrivateSubnet3RouteTableD98824C7": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-fixed-username/Vpc/PrivateSubnet3" + } + ] + } + }, + "VpcPrivateSubnet3RouteTableAssociation16BDDC43": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet3RouteTableD98824C7" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet3SubnetF258B56E" + } + } + }, + "VpcPrivateSubnet3DefaultRoute94B74F0D": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet3RouteTableD98824C7" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet3NATGateway7640CD1D" + } + } + }, + "VpcIGWD7BA715C": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-fixed-username/Vpc" + } + ] + } + }, + "VpcVPCGWBF912B6E": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "InternetGatewayId": { + "Ref": "VpcIGWD7BA715C" + } + } + }, + "InstanceSubnetGroupF2CBA54F": { + "Type": "AWS::RDS::DBSubnetGroup", + "Properties": { + "DBSubnetGroupDescription": "Subnet group for Instance database", + "SubnetIds": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + }, + { + "Ref": "VpcPrivateSubnet3SubnetF258B56E" + } + ] + } + }, + "InstanceSecurityGroupB4E5FA83": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "Security group for Instance database", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "awscdkrdsfixedusernameInstanceSecretADA7FA0A0ae21a5e1432db367b627106107972de": { + "Type": "AWS::SecretsManager::Secret", + "Properties": { + "Description": { + "Fn::Join": [ + "", + [ + "Generated by the CDK for stack: ", + { + "Ref": "AWS::StackName" + } + ] + ] + }, + "GenerateSecretString": { + "ExcludeCharacters": "!&*^#@()", + "GenerateStringKey": "password", + "PasswordLength": 30, + "SecretStringTemplate": "{\"username\":\"admin\"}" + } + } + }, + "InstanceSecretAttachment83BEE581": { + "Type": "AWS::SecretsManager::SecretTargetAttachment", + "Properties": { + "SecretId": { + "Ref": "awscdkrdsfixedusernameInstanceSecretADA7FA0A0ae21a5e1432db367b627106107972de" + }, + "TargetId": { + "Ref": "InstanceC1063A87" + }, + "TargetType": "AWS::RDS::DBInstance" + } + }, + "InstanceC1063A87": { + "Type": "AWS::RDS::DBInstance", + "Properties": { + "DBInstanceClass": "db.t3.small", + "AllocatedStorage": "100", + "BackupRetentionPeriod": 0, + "CopyTagsToSnapshot": true, + "DBName": "CDKDB", + "DBSubnetGroupName": { + "Ref": "InstanceSubnetGroupF2CBA54F" + }, + "DeleteAutomatedBackups": true, + "Engine": "mysql", + "EngineVersion": "8.0.21", + "MasterUsername": "admin", + "MasterUserPassword": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "awscdkrdsfixedusernameInstanceSecretADA7FA0A0ae21a5e1432db367b627106107972de" + }, + ":SecretString:password::}}" + ] + ] + }, + "StorageEncrypted": true, + "StorageType": "gp2", + "VPCSecurityGroups": [ + { + "Fn::GetAtt": [ + "InstanceSecurityGroupB4E5FA83", + "GroupId" + ] + } + ] + }, + "UpdateReplacePolicy": "Snapshot" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-rds/test/integ.instance-from-generated-password.ts b/packages/@aws-cdk/aws-rds/test/integ.instance-from-generated-password.ts new file mode 100644 index 0000000000000..04b9746aa409a --- /dev/null +++ b/packages/@aws-cdk/aws-rds/test/integ.instance-from-generated-password.ts @@ -0,0 +1,27 @@ +import * as ec2 from '@aws-cdk/aws-ec2'; +import * as cdk from '@aws-cdk/core'; +import * as rds from '../lib'; + +const app = new cdk.App(); + +class DatabaseInstanceStack extends cdk.Stack { + constructor(scope: cdk.App, id: string, props?: cdk.StackProps) { + super(scope, id, props); + + const vpc = new ec2.Vpc(this, 'Vpc'); + + new rds.DatabaseInstance(this, 'Instance', { + engine: rds.DatabaseInstanceEngine.mysql({ version: rds.MysqlEngineVersion.VER_8_0_21 }), + instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE3, ec2.InstanceSize.SMALL), + credentials: rds.Credentials.fromGeneratedSecret('admin', { excludeCharacters: '!&*^#@()' }), + vpc, + databaseName: 'CDKDB', + storageEncrypted: true, + backupRetention: cdk.Duration.days(0), + deleteAutomatedBackups: true, + }); + } +} + +new DatabaseInstanceStack(app, 'aws-cdk-rds-fixed-username'); +app.synth(); diff --git a/packages/@aws-cdk/aws-rds/test/test.cluster.ts b/packages/@aws-cdk/aws-rds/test/test.cluster.ts index 72c2e010b2092..db27106dbeeb8 100644 --- a/packages/@aws-cdk/aws-rds/test/test.cluster.ts +++ b/packages/@aws-cdk/aws-rds/test/test.cluster.ts @@ -7,8 +7,8 @@ import * as s3 from '@aws-cdk/aws-s3'; import * as cdk from '@aws-cdk/core'; import { Test } from 'nodeunit'; import { - AuroraEngineVersion, AuroraMysqlEngineVersion, AuroraPostgresEngineVersion, CfnDBCluster, DatabaseCluster, DatabaseClusterEngine, - DatabaseClusterFromSnapshot, ParameterGroup, PerformanceInsightRetention, SubnetGroup, + AuroraEngineVersion, AuroraMysqlEngineVersion, AuroraPostgresEngineVersion, CfnDBCluster, Credentials, DatabaseCluster, + DatabaseClusterEngine, DatabaseClusterFromSnapshot, ParameterGroup, PerformanceInsightRetention, SubnetGroup, } from '../lib'; export = { @@ -1730,6 +1730,40 @@ export = { test.done(); }, + + 'fromGeneratedSecret'(test: Test) { + // GIVEN + const stack = testStack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + + // WHEN + new DatabaseCluster(stack, 'Database', { + engine: DatabaseClusterEngine.aurora({ version: AuroraEngineVersion.VER_1_22_2 }), + credentials: Credentials.fromGeneratedSecret('admin'), + instanceProps: { + vpc, + }, + }); + + // THEN + expect(stack).to(haveResource('AWS::RDS::DBCluster', { + MasterUsername: 'admin', // username is a string + MasterUserPassword: { + 'Fn::Join': [ + '', + [ + '{{resolve:secretsmanager:', + { + Ref: 'DatabaseSecretC9203AE33fdaad7efa858a3daf9490cf0a702aeb', // logical id is a hash + }, + ':SecretString:password::}}', + ], + ], + }, + })); + + test.done(); + }, }; function testStack() { diff --git a/packages/@aws-cdk/aws-rds/test/test.database-secret.ts b/packages/@aws-cdk/aws-rds/test/test.database-secret.ts index bc215c6da3487..6e4edb551d764 100644 --- a/packages/@aws-cdk/aws-rds/test/test.database-secret.ts +++ b/packages/@aws-cdk/aws-rds/test/test.database-secret.ts @@ -1,5 +1,5 @@ import { expect, haveResource } from '@aws-cdk/assert'; -import { Stack } from '@aws-cdk/core'; +import { CfnResource, Stack } from '@aws-cdk/core'; import { Test } from 'nodeunit'; import { DatabaseSecret } from '../lib'; import { DEFAULT_PASSWORD_EXCLUDE_CHARS } from '../lib/private/util'; @@ -10,7 +10,7 @@ export = { const stack = new Stack(); // WHEN - new DatabaseSecret(stack, 'Secret', { + const dbSecret = new DatabaseSecret(stack, 'Secret', { username: 'admin-username', }); @@ -35,6 +35,8 @@ export = { }, })); + test.equal(getSecretLogicalId(dbSecret, stack), 'SecretA720EF05'); + test.done(); }, @@ -75,4 +77,42 @@ export = { test.done(); }, + + 'replace on password critera change'(test: Test) { + // GIVEN + const stack = new Stack(); + + // WHEN + const dbSecret = new DatabaseSecret(stack, 'Secret', { + username: 'admin', + replaceOnPasswordCriteriaChanges: true, + }); + + // THEN + const dbSecretlogicalId = getSecretLogicalId(dbSecret, stack); + test.equal(dbSecretlogicalId, 'Secret3fdaad7efa858a3daf9490cf0a702aeb'); + + // same node path but other excluded characters + stack.node.tryRemoveChild('Secret'); + const otherSecret1 = new DatabaseSecret(stack, 'Secret', { + username: 'admin', + replaceOnPasswordCriteriaChanges: true, + excludeCharacters: '@!()[]', + }); + test.notEqual(dbSecretlogicalId, getSecretLogicalId(otherSecret1, stack)); + + // other node path but same excluded characters + const otherSecret2 = new DatabaseSecret(stack, 'Secret2', { + username: 'admin', + replaceOnPasswordCriteriaChanges: true, + }); + test.notEqual(dbSecretlogicalId, getSecretLogicalId(otherSecret2, stack)); + + test.done(); + }, }; + +function getSecretLogicalId(dbSecret: DatabaseSecret, stack: Stack): string { + const cfnSecret = dbSecret.node.defaultChild as CfnResource; + return stack.resolve(cfnSecret.logicalId); +} diff --git a/packages/@aws-cdk/aws-rds/test/test.instance.ts b/packages/@aws-cdk/aws-rds/test/test.instance.ts index 2af2afaf35d31..9cc8c02d9d5a9 100644 --- a/packages/@aws-cdk/aws-rds/test/test.instance.ts +++ b/packages/@aws-cdk/aws-rds/test/test.instance.ts @@ -319,6 +319,27 @@ export = { test.done(); }, + 'fromGeneratedSecret'(test: Test) { + new rds.DatabaseInstanceFromSnapshot(stack, 'Instance', { + snapshotIdentifier: 'my-snapshot', + engine: rds.DatabaseInstanceEngine.mysql({ version: rds.MysqlEngineVersion.VER_8_0_19 }), + vpc, + credentials: rds.SnapshotCredentials.fromGeneratedSecret('admin', { + excludeCharacters: '"@/\\', + }), + }); + + expect(stack).to(haveResourceLike('AWS::RDS::DBInstance', { + MasterUsername: ABSENT, + MasterUserPassword: { + // logical id of secret has a hash + 'Fn::Join': ['', ['{{resolve:secretsmanager:', { Ref: 'InstanceSecretB6DFA6BE8ee0a797cad8a68dbeb85f8698cdb5bb' }, ':SecretString:password::}}']], + }, + })); + + test.done(); + }, + 'throws if generating a new password without a username'(test: Test) { test.throws(() => new rds.DatabaseInstanceFromSnapshot(stack, 'Instance', { snapshotIdentifier: 'my-snapshot', @@ -1138,4 +1159,49 @@ export = { test.done(); }, }, + + 'fromGeneratedSecret'(test: Test) { + // WHEN + new rds.DatabaseInstance(stack, 'Database', { + engine: rds.DatabaseInstanceEngine.postgres({ version: rds.PostgresEngineVersion.VER_12_3 }), + vpc, + credentials: rds.Credentials.fromGeneratedSecret('postgres'), + }); + + // THEN + expect(stack).to(haveResource('AWS::RDS::DBInstance', { + MasterUsername: 'postgres', // username is a string + MasterUserPassword: { + 'Fn::Join': [ + '', + [ + '{{resolve:secretsmanager:', + { + Ref: 'DatabaseSecretC9203AE33fdaad7efa858a3daf9490cf0a702aeb', // logical id is a hash + }, + ':SecretString:password::}}', + ], + ], + }, + })); + + test.done(); + }, + + 'fromPassword'(test: Test) { + // WHEN + new rds.DatabaseInstance(stack, 'Database', { + engine: rds.DatabaseInstanceEngine.postgres({ version: rds.PostgresEngineVersion.VER_12_3 }), + vpc, + credentials: rds.Credentials.fromPassword('postgres', cdk.SecretValue.ssmSecure('/dbPassword', '1')), + }); + + // THEN + expect(stack).to(haveResource('AWS::RDS::DBInstance', { + MasterUsername: 'postgres', // username is a string + MasterUserPassword: '{{resolve:ssm-secure:/dbPassword:1}}', // reference to SSM + })); + + test.done(); + }, }; From 13d713e6358b29e55a626c44c7b2f0dcd946fddc Mon Sep 17 00:00:00 2001 From: Dominic Fezzie Date: Fri, 6 Nov 2020 12:40:48 -0800 Subject: [PATCH 070/314] feat(appmesh): remove from*Name() methods and replace with from*Attributes() (#11266) Follow Up from https://github.com/aws/aws-cdk/pull/10879 BREAKING CHANGE: all `fromResourceName()` methods in the AppMesh module have been replaced with `fromResourceAttributes()` ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-appmesh/README.md | 29 +++++ .../@aws-cdk/aws-appmesh/lib/gateway-route.ts | 70 ++++------- packages/@aws-cdk/aws-appmesh/lib/route.ts | 88 +++++--------- .../aws-appmesh/lib/virtual-gateway.ts | 76 +++++------- .../@aws-cdk/aws-appmesh/lib/virtual-node.ts | 92 ++++++--------- .../aws-appmesh/lib/virtual-router.ts | 111 ++++-------------- .../aws-appmesh/lib/virtual-service.ts | 95 ++++++--------- .../aws-appmesh/test/test.gateway-route.ts | 39 +++++- .../@aws-cdk/aws-appmesh/test/test.route.ts | 74 +++++------- .../aws-appmesh/test/test.virtual-gateway.ts | 33 +++++- .../aws-appmesh/test/test.virtual-node.ts | 65 ++++------ .../aws-appmesh/test/test.virtual-router.ts | 29 ++++- .../aws-appmesh/test/test.virtual-service.ts | 44 +++---- 13 files changed, 370 insertions(+), 475 deletions(-) diff --git a/packages/@aws-cdk/aws-appmesh/README.md b/packages/@aws-cdk/aws-appmesh/README.md index e38a8ea49a9e9..00d70bd8b0888 100644 --- a/packages/@aws-cdk/aws-appmesh/README.md +++ b/packages/@aws-cdk/aws-appmesh/README.md @@ -307,3 +307,32 @@ gateway.addGatewayRoute('gateway-route-grpc', { }), }); ``` + +## Importing Resources + +Each mesh resource comes with two static methods for importing a reference to an existing App Mesh resource. +These imported resources can be used as references for other resources in your mesh. +There are two static methods, `fromArn` and `fromAttributes` where the `` is replaced with the resource name. + +```typescript +const arn = "arn:aws:appmesh:us-east-1:123456789012:mesh/testMesh/virtualNode/testNode"; +appmesh.VirtualNode.fromVirtualNodeArn(stack, 'importedVirtualNode', arn); +``` + +```typescript +appmesh.VirtualNode.fromVirtualNodeAttributes(stack, 'imported-virtual-node', { + mesh: appmesh.Mesh.fromMeshName(stack, 'Mesh', 'testMesh'), + virtualNodeName: virtualNodeName, +}); +``` + +To import a mesh, there are two static methods, `fromMeshArn` and `fromMeshName`. + +```typescript +const arn = 'arn:aws:appmesh:us-east-1:123456789012:mesh/testMesh'; +appmesh.Mesh.fromMeshArn(stack, 'imported-mesh', arn); +``` + +```typescript +appmesh.Mesh.fromMeshName(stack, 'imported-mesh', 'abc'); +``` diff --git a/packages/@aws-cdk/aws-appmesh/lib/gateway-route.ts b/packages/@aws-cdk/aws-appmesh/lib/gateway-route.ts index cc00c0f632ac3..5bfb3b0ca21cd 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/gateway-route.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/gateway-route.ts @@ -65,7 +65,26 @@ export class GatewayRoute extends cdk.Resource implements IGatewayRoute { * Import an existing GatewayRoute given an ARN */ public static fromGatewayRouteArn(scope: Construct, id: string, gatewayRouteArn: string): IGatewayRoute { - return new ImportedGatewayRoute(scope, id, { gatewayRouteArn }); + return new class extends cdk.Resource implements IGatewayRoute { + readonly gatewayRouteArn = gatewayRouteArn; + readonly gatewayRouteName = cdk.Fn.select(4, cdk.Fn.split('/', cdk.Stack.of(scope).parseArn(gatewayRouteArn).resourceName!)); + readonly virtualGateway = VirtualGateway.fromVirtualGatewayArn(this, 'virtualGateway', gatewayRouteArn); + }(scope, id); + } + + /** + * Import an existing GatewayRoute given attributes + */ + public static fromGatewayRouteAttributes(scope: Construct, id: string, attrs: GatewayRouteAttributes): IGatewayRoute { + return new class extends cdk.Resource implements IGatewayRoute { + readonly gatewayRouteName = attrs.gatewayRouteName; + readonly gatewayRouteArn = cdk.Stack.of(scope).formatArn({ + service: 'appmesh', + resource: `mesh/${attrs.virtualGateway.mesh.meshName}/virtualGateway/${attrs.virtualGateway.virtualGatewayName}/gatewayRoute`, + resourceName: this.gatewayRouteName, + }); + readonly virtualGateway = attrs.virtualGateway; + }(scope, id); } /** @@ -114,55 +133,14 @@ export class GatewayRoute extends cdk.Resource implements IGatewayRoute { /** * Interface with properties necessary to import a reusable GatewayRoute */ -interface GatewayRouteAttributes { +export interface GatewayRouteAttributes { /** * The name of the GatewayRoute */ - readonly gatewayRouteName?: string; + readonly gatewayRouteName: string; /** - * The Amazon Resource Name (ARN) for the GatewayRoute + * The VirtualGateway this GatewayRoute is associated with. */ - readonly gatewayRouteArn?: string; - - /** - * The name of the mesh this GatewayRoute is associated with - */ - readonly meshName?: string; - - /** - * The name of the Virtual Gateway this GatewayRoute is associated with - */ - readonly virtualGateway?: IVirtualGateway; -} - -/** - * Represents an imported IGatewayRoute - */ -class ImportedGatewayRoute extends cdk.Resource implements IGatewayRoute { - /** - * The name of the GatewayRoute - */ - public gatewayRouteName: string; - - /** - * The Amazon Resource Name (ARN) for the GatewayRoute - */ - public gatewayRouteArn: string; - - /** - * The VirtualGateway the GatewayRoute belongs to - */ - public virtualGateway: IVirtualGateway; - - constructor(scope: Construct, id: string, props: GatewayRouteAttributes) { - super(scope, id); - if (props.gatewayRouteArn) { - this.gatewayRouteArn = props.gatewayRouteArn; - this.gatewayRouteName = cdk.Fn.select(4, cdk.Fn.split('/', cdk.Stack.of(scope).parseArn(props.gatewayRouteArn).resourceName!)); - this.virtualGateway = VirtualGateway.fromVirtualGatewayArn(this, 'virtualGateway', props.gatewayRouteArn); - } else { - throw new Error('Need gatewayRouteArn'); - } - } + readonly virtualGateway: IVirtualGateway; } diff --git a/packages/@aws-cdk/aws-appmesh/lib/route.ts b/packages/@aws-cdk/aws-appmesh/lib/route.ts index 696908abc40a6..cfa0e8e6d54c1 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/route.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/route.ts @@ -3,7 +3,7 @@ import { Construct } from 'constructs'; import { CfnRoute } from './appmesh.generated'; import { IMesh } from './mesh'; import { IVirtualNode } from './virtual-node'; -import { IVirtualRouter } from './virtual-router'; +import { IVirtualRouter, VirtualRouter } from './virtual-router'; /** * Interface for which all Route based classes MUST implement @@ -22,6 +22,11 @@ export interface IRoute extends cdk.IResource { * @attribute */ readonly routeArn: string; + + /** + * The VirtualRouter the Route belongs to + */ + readonly virtualRouter: IVirtualRouter; } /** @@ -99,7 +104,7 @@ export interface RouteProps extends RouteBaseProps { readonly mesh: IMesh; /** - * The virtual router in which to define the route + * The VirtualRouter the Route belongs to */ readonly virtualRouter: IVirtualRouter; } @@ -111,21 +116,33 @@ export interface RouteProps extends RouteBaseProps { */ export class Route extends cdk.Resource implements IRoute { /** - * Import an existing route given an ARN + * Import an existing Route given an ARN */ public static fromRouteArn(scope: Construct, id: string, routeArn: string): IRoute { - return new ImportedRoute(scope, id, { routeArn }); + return new class extends cdk.Resource implements IRoute { + readonly routeArn = routeArn; + readonly virtualRouter = VirtualRouter.fromVirtualRouterArn(this, 'VirtualRouter', routeArn); + readonly routeName = cdk.Fn.select(4, cdk.Fn.split('/', cdk.Stack.of(scope).parseArn(routeArn).resourceName!)); + }(scope, id); } /** - * Import an existing route given its name + * Import an existing Route given attributes */ - public static fromRouteName(scope: Construct, id: string, meshName: string, virtualRouterName: string, routeName: string): IRoute { - return new ImportedRoute(scope, id, { meshName, virtualRouterName, routeName }); + public static fromRouteAttributes(scope: Construct, id: string, attrs: RouteAttributes): IRoute { + return new class extends cdk.Resource implements IRoute { + readonly routeName = attrs.routeName; + readonly virtualRouter = attrs.virtualRouter; + readonly routeArn = cdk.Stack.of(this).formatArn({ + service: 'appmesh', + resource: `mesh/${attrs.virtualRouter.mesh.meshName}/virtualRouter/${attrs.virtualRouter.virtualRouterName}/route`, + resourceName: this.routeName, + }); + }(scope, id); } /** - * The name of the route + * The name of the Route */ public readonly routeName: string; @@ -135,7 +152,7 @@ export class Route extends cdk.Resource implements IRoute { public readonly routeArn: string; /** - * The virtual router this route is a part of + * The VirtualRouter the Route belongs to */ public readonly virtualRouter: IVirtualRouter; @@ -215,57 +232,14 @@ export class Route extends cdk.Resource implements IRoute { /** * Interface with properties ncecessary to import a reusable Route */ -interface RouteAttributes { - /** - * The name of the route - */ - readonly routeName?: string; - - /** - * The Amazon Resource Name (ARN) for the route - */ - readonly routeArn?: string; - - /** - * The name of the mesh this route is associated with - */ - readonly meshName?: string; - - /** - * The name of the virtual router this route is associated with - */ - readonly virtualRouterName?: string; -} - -/** - * Represents and imported IRoute - */ -class ImportedRoute extends cdk.Resource implements IRoute { +export interface RouteAttributes { /** - * The name of the route + * The name of the Route */ - public readonly routeName: string; + readonly routeName: string; /** - * The Amazon Resource Name (ARN) for the route + * The VirtualRouter the Route belongs to */ - public readonly routeArn: string; - - constructor(scope: Construct, id: string, props: RouteAttributes) { - super(scope, id); - - if (props.routeArn) { - this.routeArn = props.routeArn; - this.routeName = cdk.Fn.select(4, cdk.Fn.split('/', cdk.Stack.of(scope).parseArn(props.routeArn).resourceName!)); - } else if (props.routeName && props.meshName && props.virtualRouterName) { - this.routeName = props.routeName; - this.routeArn = cdk.Stack.of(this).formatArn({ - service: 'appmesh', - resource: `mesh/${props.meshName}/virtualRouter/${props.virtualRouterName}/route`, - resourceName: this.routeName, - }); - } else { - throw new Error('Need either arn or three names'); - } - } + readonly virtualRouter: IVirtualRouter; } diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway.ts index 51950f82dbb13..337807c9153da 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway.ts @@ -26,7 +26,7 @@ export interface IVirtualGateway extends cdk.IResource { readonly virtualGatewayArn: string; /** - * The mesh which the VirtualGateway belongs to + * The Mesh which the VirtualGateway belongs to */ readonly mesh: IMesh; @@ -67,7 +67,7 @@ export interface VirtualGatewayBaseProps { */ export interface VirtualGatewayProps extends VirtualGatewayBaseProps { /** - * The mesh which the VirtualGateway belongs to + * The Mesh which the VirtualGateway belongs to */ readonly mesh: IMesh; } @@ -84,7 +84,7 @@ abstract class VirtualGatewayBase extends cdk.Resource implements IVirtualGatewa public abstract readonly virtualGatewayArn: string; /** - * The name of the mesh which the VirtualGateway belongs to + * The Mesh which the VirtualGateway belongs to */ public abstract readonly mesh: IMesh; @@ -112,7 +112,27 @@ export class VirtualGateway extends VirtualGatewayBase { * Import an existing VirtualGateway given an ARN */ public static fromVirtualGatewayArn(scope: Construct, id: string, virtualGatewayArn: string): IVirtualGateway { - return new ImportedVirtualGateway(scope, id, { virtualGatewayArn }); + return new class extends VirtualGatewayBase { + private readonly parsedArn = cdk.Fn.split('/', cdk.Stack.of(scope).parseArn(virtualGatewayArn).resourceName!); + readonly mesh = Mesh.fromMeshName(this, 'Mesh', cdk.Fn.select(0, this.parsedArn)); + readonly virtualGatewayArn = virtualGatewayArn; + readonly virtualGatewayName = cdk.Fn.select(2, this.parsedArn); + }(scope, id); + } + + /** + * Import an existing VirtualGateway given its attributes + */ + public static fromVirtualGatewayAttributes(scope: Construct, id: string, attrs: VirtualGatewayAttributes): IVirtualGateway { + return new class extends VirtualGatewayBase { + readonly mesh = attrs.mesh; + readonly virtualGatewayName = attrs.virtualGatewayName; + readonly virtualGatewayArn = cdk.Stack.of(this).formatArn({ + service: 'appmesh', + resource: `mesh/${attrs.mesh.meshName}/virtualGateway`, + resourceName: this.virtualGatewayName, + }); + }(scope, id); } /** @@ -171,56 +191,14 @@ export class VirtualGateway extends VirtualGatewayBase { /** * Unterface with properties necessary to import a reusable VirtualGateway */ -interface VirtualGatewayAttributes { - /** - * The name of the VirtualGateway - */ - readonly virtualGatewayName?: string; - - /** - * The Amazon Resource Name (ARN) belonging to the VirtualGateway - */ - readonly virtualGatewayArn?: string; - - /** - * The Mesh that the VirtualGateway belongs to - */ - readonly mesh?: IMesh; - - /** - * The name of the mesh that the VirtualGateway belongs to - */ - readonly meshName?: string; -} - -/** - * Used to import a VirtualGateway and read its properties - */ -class ImportedVirtualGateway extends VirtualGatewayBase { +export interface VirtualGatewayAttributes { /** * The name of the VirtualGateway */ - public readonly virtualGatewayName: string; - - /** - * The Amazon Resource Name (ARN) belonging to the VirtualGateway - */ - public readonly virtualGatewayArn: string; + readonly virtualGatewayName: string; /** * The Mesh that the VirtualGateway belongs to */ - public readonly mesh: IMesh; - - constructor(scope: Construct, id: string, props: VirtualGatewayAttributes) { - super(scope, id); - if (props.virtualGatewayArn) { - const meshName = cdk.Fn.select(0, cdk.Fn.split('/', cdk.Stack.of(scope).parseArn(props.virtualGatewayArn).resourceName!)); - this.mesh = Mesh.fromMeshName(this, 'Mesh', meshName); - this.virtualGatewayArn = props.virtualGatewayArn; - this.virtualGatewayName = cdk.Fn.select(2, cdk.Fn.split('/', cdk.Stack.of(scope).parseArn(props.virtualGatewayArn).resourceName!)); - } else { - throw new Error('Need virtualGatewayArn'); - } - } + readonly mesh: IMesh; } diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts index c3226a61e3813..b8b9da2026715 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts @@ -2,7 +2,7 @@ import * as cloudmap from '@aws-cdk/aws-servicediscovery'; import * as cdk from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnVirtualNode } from './appmesh.generated'; -import { IMesh } from './mesh'; +import { IMesh, Mesh } from './mesh'; import { validateHealthChecks } from './private/utils'; import { AccessLog, HealthCheck, PortMapping, Protocol, VirtualNodeListener } from './shared-interfaces'; import { IVirtualService } from './virtual-service'; @@ -19,7 +19,7 @@ export interface IVirtualNode extends cdk.IResource { readonly virtualNodeName: string; /** - * The Amazon Resource Name belonging to the VirtualNdoe + * The Amazon Resource Name belonging to the VirtualNode * * Set this value as the APPMESH_VIRTUAL_NODE_NAME environment variable for * your task group's Envoy proxy container in your task definition or pod @@ -29,6 +29,11 @@ export interface IVirtualNode extends cdk.IResource { */ readonly virtualNodeArn: string; + /** + * The Mesh which the VirtualNode belongs to + */ + readonly mesh: IMesh; + /** * Utility method to add backends for existing or new VirtualNodes */ @@ -105,7 +110,7 @@ export interface VirtualNodeBaseProps { */ export interface VirtualNodeProps extends VirtualNodeBaseProps { /** - * The name of the AppMesh which the virtual node belongs to + * The Mesh which the VirtualNode belongs to */ readonly mesh: IMesh; } @@ -117,15 +122,20 @@ abstract class VirtualNodeBase extends cdk.Resource implements IVirtualNode { public abstract readonly virtualNodeName: string; /** - * The Amazon Resource Name belonging to the VirtualNdoe + * The Amazon Resource Name belonging to the VirtualNode */ public abstract readonly virtualNodeArn: string; + /** + * The Mesh which the VirtualNode belongs to + */ + public abstract readonly mesh: IMesh; + protected readonly backends = new Array(); protected readonly listeners = new Array(); /** - * Add a Virtual Services that this node is expected to send outbound traffic to + * Add a VirtualServices that this node is expected to send outbound traffic to */ public addBackends(...props: IVirtualService[]) { for (const s of props) { @@ -197,17 +207,27 @@ export class VirtualNode extends VirtualNodeBase { * Import an existing VirtualNode given an ARN */ public static fromVirtualNodeArn(scope: Construct, id: string, virtualNodeArn: string): IVirtualNode { - return new ImportedVirtualNode(scope, id, { virtualNodeArn }); + return new class extends VirtualNodeBase { + readonly virtualNodeArn = virtualNodeArn; + private readonly parsedArn = cdk.Fn.split('/', cdk.Stack.of(scope).parseArn(virtualNodeArn).resourceName!); + readonly mesh = Mesh.fromMeshName(this, 'Mesh', cdk.Fn.select(0, this.parsedArn)); + readonly virtualNodeName = cdk.Fn.select(2, this.parsedArn); + }(scope, id); } /** * Import an existing VirtualNode given its name */ - public static fromVirtualNodeName(scope: Construct, id: string, meshName: string, virtualNodeName: string): IVirtualNode { - return new ImportedVirtualNode(scope, id, { - meshName, - virtualNodeName, - }); + public static fromVirtualNodeAttributes(scope: Construct, id: string, attrs: VirtualNodeAttributes): IVirtualNode { + return new class extends VirtualNodeBase { + readonly mesh = attrs.mesh; + readonly virtualNodeName = attrs.virtualNodeName; + readonly virtualNodeArn = cdk.Stack.of(this).formatArn({ + service: 'appmesh', + resource: `mesh/${attrs.mesh.meshName}/virtualNode`, + resourceName: this.virtualNodeName, + }); + }(scope, id); } /** @@ -221,7 +241,7 @@ export class VirtualNode extends VirtualNodeBase { public readonly virtualNodeArn: string; /** - * The service mesh that the virtual node resides in + * The Mesh which the VirtualNode belongs to */ public readonly mesh: IMesh; @@ -271,54 +291,16 @@ function renderAttributes(attrs?: {[key: string]: string}) { } /** - * Interface with properties ncecessary to import a reusable VirtualNode - */ -interface VirtualNodeAttributes { - /** - * The name of the VirtualNode - */ - readonly virtualNodeName?: string; - - /** - * The Amazon Resource Name belonging to the VirtualNdoe - */ - readonly virtualNodeArn?: string; - - /** - * The service mesh that the virtual node resides in - */ - readonly meshName?: string; -} - -/** - * Used to import a VirtualNode and read its properties + * Interface with properties necessary to import a reusable VirtualNode */ -class ImportedVirtualNode extends VirtualNodeBase { +export interface VirtualNodeAttributes { /** * The name of the VirtualNode */ - public readonly virtualNodeName: string; + readonly virtualNodeName: string; /** - * The Amazon Resource Name belonging to the VirtualNdoe + * The Mesh that the VirtualNode belongs to */ - public readonly virtualNodeArn: string; - - constructor(scope: Construct, id: string, props: VirtualNodeAttributes) { - super(scope, id); - - if (props.virtualNodeArn) { - this.virtualNodeArn = props.virtualNodeArn; - this.virtualNodeName = cdk.Fn.select(2, cdk.Fn.split('/', cdk.Stack.of(scope).parseArn(props.virtualNodeArn).resourceName!)); - } else if (props.virtualNodeName && props.meshName) { - this.virtualNodeName = props.virtualNodeName; - this.virtualNodeArn = cdk.Stack.of(this).formatArn({ - service: 'appmesh', - resource: `mesh/${props.meshName}/virtualNode`, - resourceName: this.virtualNodeName, - }); - } else { - throw new Error('Need either arn or both names'); - } - } + readonly mesh: IMesh; } diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-router.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-router.ts index f08b223ec23ed..2b416427ae389 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/virtual-router.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-router.ts @@ -24,7 +24,7 @@ export interface IVirtualRouter extends cdk.IResource { readonly virtualRouterArn: string; /** - * The service mesh that the virtual router resides in + * The Mesh which the VirtualRouter belongs to */ readonly mesh: IMesh; @@ -39,7 +39,7 @@ export interface IVirtualRouter extends cdk.IResource { */ export interface VirtualRouterBaseProps { /** - * Listener specification for the virtual router + * Listener specification for the VirtualRouter * * @default - A listener on HTTP port 8080 */ @@ -58,7 +58,7 @@ export interface VirtualRouterBaseProps { */ export interface Listener { /** - * Listener port for the virtual router + * Listener port for the VirtualRouter */ readonly portMapping: PortMapping; } @@ -75,7 +75,7 @@ abstract class VirtualRouterBase extends cdk.Resource implements IVirtualRouter public abstract readonly virtualRouterArn: string; /** - * The AppMesh mesh the VirtualRouter belongs to + * The Mesh which the VirtualRouter belongs to */ public abstract readonly mesh: IMesh; @@ -95,11 +95,11 @@ abstract class VirtualRouterBase extends cdk.Resource implements IVirtualRouter } /** - * The properties used when creating a new VritualRouter + * The properties used when creating a new VirtualRouter */ export interface VirtualRouterProps extends VirtualRouterBaseProps { /** - * The AppMesh mesh the VirtualRouter belongs to + * The Mesh which the VirtualRouter belongs to */ readonly mesh: IMesh; } @@ -109,21 +109,27 @@ export class VirtualRouter extends VirtualRouterBase { * Import an existing VirtualRouter given an ARN */ public static fromVirtualRouterArn(scope: Construct, id: string, virtualRouterArn: string): IVirtualRouter { - return new ImportedVirtualRouter(scope, id, { virtualRouterArn }); + return new class extends VirtualRouterBase { + readonly virtualRouterArn = virtualRouterArn; + private readonly parsedArn = cdk.Fn.split('/', cdk.Stack.of(scope).parseArn(virtualRouterArn).resourceName!); + readonly virtualRouterName = cdk.Fn.select(2, this.parsedArn); + readonly mesh = Mesh.fromMeshName(this, 'Mesh', cdk.Fn.select(0, this.parsedArn)); + }(scope, id); } /** - * Import an existing VirtualRouter given names - */ - public static fromVirtualRouterName(scope: Construct, id: string, meshName: string, virtualRouterName: string): IVirtualRouter { - return new ImportedVirtualRouter(scope, id, { meshName, virtualRouterName }); - } - - /** - * Import an existing virtual router given attributes + * Import an existing VirtualRouter given attributes */ public static fromVirtualRouterAttributes(scope: Construct, id: string, attrs: VirtualRouterAttributes): IVirtualRouter { - return new ImportedVirtualRouter(scope, id, attrs); + return new class extends VirtualRouterBase { + readonly virtualRouterName = attrs.virtualRouterName; + readonly mesh = attrs.mesh; + readonly virtualRouterArn = cdk.Stack.of(this).formatArn({ + service: 'appmesh', + resource: `mesh/${attrs.mesh.meshName}/virtualRouter`, + resourceName: this.virtualRouterName, + }); + }(scope, id); } /** @@ -137,7 +143,7 @@ export class VirtualRouter extends VirtualRouterBase { public readonly virtualRouterArn: string; /** - * The AppMesh mesh the VirtualRouter belongs to + * The Mesh which the VirtualRouter belongs to */ public readonly mesh: IMesh; @@ -185,75 +191,10 @@ export interface VirtualRouterAttributes { /** * The name of the VirtualRouter */ - readonly virtualRouterName?: string; - - /** - * The Amazon Resource Name (ARN) for the VirtualRouter - */ - readonly virtualRouterArn?: string; - - /** - * The AppMesh mesh the VirtualRouter belongs to - */ - readonly mesh?: IMesh; - - /** - * The name of the AppMesh mesh the VirtualRouter belongs to - */ - readonly meshName?: string; -} - -/** - * Used to import a VirtualRouter and perform actions or read properties from - */ -class ImportedVirtualRouter extends VirtualRouterBase { - /** - * The name of the VirtualRouter - */ - public readonly virtualRouterName: string; - - /** - * The Amazon Resource Name (ARN) for the VirtualRouter - */ - public readonly virtualRouterArn: string; - - private _mesh?: IMesh; - - constructor(scope: Construct, id: string, props: VirtualRouterAttributes) { - super(scope, id); - - if (props.mesh) { - this._mesh = props.mesh; - } - if (props.meshName) { - if (props.mesh) { - throw new Error('Supply either \'mesh\' or \'meshName\', but not both'); - } - this._mesh = Mesh.fromMeshName(this, 'Mesh', props.meshName); - } - - if (props.virtualRouterArn) { - this.virtualRouterArn = props.virtualRouterArn; - this.virtualRouterName = cdk.Fn.select(2, cdk.Fn.split('/', cdk.Stack.of(scope).parseArn(props.virtualRouterArn).resourceName!)); - } else if (props.virtualRouterName && props.meshName) { - this.virtualRouterName = props.virtualRouterName; - this.virtualRouterArn = cdk.Stack.of(this).formatArn({ - service: 'appmesh', - resource: `mesh/${props.meshName}/virtualRouter`, - resourceName: this.virtualRouterName, - }); - } else { - throw new Error('Need either arn or both names'); - } - } + readonly virtualRouterName: string; /** - * The AppMesh mesh the VirtualRouter belongs to + * The Mesh which the VirtualRouter belongs to */ - public get mesh(): IMesh { - if (!this._mesh) { - throw new Error('Please supply either \'mesh\' or \'meshName\' when calling \'fromVirtualRouterAttributes\''); - } - return this._mesh; - } + readonly mesh: IMesh; } diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-service.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-service.ts index 9b920ea36c9b5..374d342040784 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/virtual-service.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-service.ts @@ -1,7 +1,7 @@ import * as cdk from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnVirtualService } from './appmesh.generated'; -import { IMesh } from './mesh'; +import { IMesh, Mesh } from './mesh'; import { IVirtualNode } from './virtual-node'; import { IVirtualRouter } from './virtual-router'; @@ -22,6 +22,11 @@ export interface IVirtualService extends cdk.IResource { * @attribute */ readonly virtualServiceArn: string; + + /** + * The Mesh which the VirtualService belongs to + */ + readonly mesh: IMesh; } /** @@ -59,7 +64,7 @@ export interface VirtualServiceBaseProps { */ export interface VirtualServiceProps extends VirtualServiceBaseProps { /** - * The AppMesh mesh name for which the VirtualService belongs to + * The Mesh which the VirtualService belongs to */ readonly mesh: IMesh; } @@ -76,19 +81,27 @@ export class VirtualService extends cdk.Resource implements IVirtualService { * Import an existing VirtualService given an ARN */ public static fromVirtualServiceArn(scope: Construct, id: string, virtualServiceArn: string): IVirtualService { - return new ImportedVirtualService(scope, id, { - virtualServiceArn, - }); + return new class extends cdk.Resource implements IVirtualService { + readonly virtualServiceArn = virtualServiceArn; + private readonly parsedArn = cdk.Fn.split('/', cdk.Stack.of(scope).parseArn(virtualServiceArn).resourceName!); + readonly virtualServiceName = cdk.Fn.select(2, this.parsedArn); + readonly mesh = Mesh.fromMeshName(this, 'Mesh', cdk.Fn.select(0, this.parsedArn)); + }(scope, id); } /** - * Import an existing VirtualService given mesh and service names + * Import an existing VirtualService given its attributes */ - public static fromVirtualServiceName(scope: Construct, id: string, meshName: string, virtualServiceName: string): IVirtualService { - return new ImportedVirtualService(scope, id, { - meshName, - virtualServiceName, - }); + public static fromVirtualServiceAttributes(scope: Construct, id: string, attrs: VirtualServiceAttributes): IVirtualService { + return new class extends cdk.Resource implements IVirtualService { + readonly virtualServiceName = attrs.virtualServiceName; + readonly mesh = attrs.mesh; + readonly virtualServiceArn = cdk.Stack.of(this).formatArn({ + service: 'appmesh', + resource: `mesh/${attrs.mesh.meshName}/virtualService`, + resourceName: this.virtualServiceName, + }); + }(scope, id); } /** @@ -101,8 +114,12 @@ export class VirtualService extends cdk.Resource implements IVirtualService { */ public readonly virtualServiceArn: string; + /** + * The Mesh which the VirtualService belongs to + */ + public readonly mesh: IMesh; + private readonly virtualServiceProvider?: CfnVirtualService.VirtualServiceProviderProperty; - private readonly mesh: IMesh; constructor(scope: Construct, id: string, props: VirtualServiceProps) { super(scope, id, { @@ -159,60 +176,14 @@ export class VirtualService extends cdk.Resource implements IVirtualService { /** * Interface with properties ncecessary to import a reusable VirtualService */ -interface VirtualServiceAttributes { - /** - * The Amazon Resource Name (ARN) for the virtual service - * - * @default - Required if virtualServiceName and virtualMeshName are not supplied. - */ - readonly virtualServiceArn?: string; - +export interface VirtualServiceAttributes { /** * The name of the VirtualService, it is recommended this follows the fully-qualified domain name format. - * - * @default - Required if virtualServiceArn is not supplied. */ - readonly virtualServiceName?: string; - - /** - * The name of the service mesh that the virtual service resides in - * - * Used to derive ARN from mesh name if ARN not provided - * - * @default - Required if virtualServiceArn is not supplied. - */ - readonly meshName?: string; -} + readonly virtualServiceName: string; -/** - * Returns properties that allows a VirtualService to be imported - */ -class ImportedVirtualService extends cdk.Resource implements IVirtualService { /** - * The name of the VirtualService, it is recommended this follows the fully-qualified domain name format. + * The Mesh which the VirtualService belongs to */ - public readonly virtualServiceName: string; - - /** - * The Amazon Resource Name (ARN) for the virtual service - */ - public readonly virtualServiceArn: string; - - constructor(scope: Construct, id: string, props: VirtualServiceAttributes) { - super(scope, id); - - if (props.virtualServiceArn) { - this.virtualServiceArn = props.virtualServiceArn; - this.virtualServiceName = cdk.Fn.select(2, cdk.Fn.split('/', cdk.Stack.of(scope).parseArn(props.virtualServiceArn).resourceName!)); - } else if (props.virtualServiceName && props.meshName) { - this.virtualServiceName = props.virtualServiceName; - this.virtualServiceArn = cdk.Stack.of(this).formatArn({ - service: 'appmesh', - resource: `mesh/${props.meshName}/virtualService`, - resourceName: this.virtualServiceName, - }); - } else { - throw new Error('Need either arn or both names'); - } - } + readonly mesh: IMesh; } diff --git a/packages/@aws-cdk/aws-appmesh/test/test.gateway-route.ts b/packages/@aws-cdk/aws-appmesh/test/test.gateway-route.ts index 842e553dfa20c..2f08e58bb873a 100644 --- a/packages/@aws-cdk/aws-appmesh/test/test.gateway-route.ts +++ b/packages/@aws-cdk/aws-appmesh/test/test.gateway-route.ts @@ -133,20 +133,47 @@ export = { }, }, - 'Can export and import GatewayRoutes and perform actions'(test: Test) { + 'Can import Gateway Routes using an ARN'(test: Test) { const app = new cdk.App(); // GIVEN const stack = new cdk.Stack(app, 'Imports', { env: { account: '123456789012', region: 'us-east-1' }, }); + const meshName = 'test-mesh'; + const virtualGatewayName = 'test-gateway'; + const gatewayRouteName = 'test-gateway-route'; + const arn = `arn:aws:appmesh:us-east-1:123456789012:mesh/${meshName}/virtualGateway/${virtualGatewayName}/gatewayRoute/${gatewayRouteName}`; // WHEN - const gatewayRoute2 = appmesh.GatewayRoute.fromGatewayRouteArn( - stack, 'importedGatewayRoute2', 'arn:aws:appmesh:us-east-1:123456789012:mesh/test-mesh/virtualGateway/test-gateway/gatewayRoute/test-gateway-route'); + const gatewayRoute = appmesh.GatewayRoute.fromGatewayRouteArn(stack, 'importedGatewayRoute', arn); // THEN - test.equal(gatewayRoute2.gatewayRouteName, 'test-gateway-route'); - test.equal(gatewayRoute2.virtualGateway.virtualGatewayName, 'test-gateway'); - test.equal(gatewayRoute2.virtualGateway.mesh.meshName, 'test-mesh'); + test.equal(gatewayRoute.gatewayRouteName, gatewayRouteName); + test.equal(gatewayRoute.virtualGateway.virtualGatewayName, virtualGatewayName); + test.equal(gatewayRoute.virtualGateway.mesh.meshName, meshName); + test.done(); + }, + 'Can import Gateway Routes using attributes'(test: Test) { + const app = new cdk.App(); + // GIVEN + const stack = new cdk.Stack(app, 'Imports', { + env: { account: '123456789012', region: 'us-east-1' }, + }); + const meshName = 'test-mesh'; + const virtualGatewayName = 'test-gateway'; + const gatewayRouteName = 'test-gateway-route'; + + // WHEN + const mesh = appmesh.Mesh.fromMeshName(stack, 'Mesh', meshName); + const gateway = mesh.addVirtualGateway('VirtualGateway', { + virtualGatewayName: virtualGatewayName, + }); + const gatewayRoute = appmesh.GatewayRoute.fromGatewayRouteAttributes(stack, 'importedGatewayRoute', { + gatewayRouteName: gatewayRouteName, + virtualGateway: gateway, + }); + // THEN + test.equal(gatewayRoute.gatewayRouteName, gatewayRouteName); + test.equal(gatewayRoute.virtualGateway.mesh.meshName, meshName); test.done(); }, }; \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appmesh/test/test.route.ts b/packages/@aws-cdk/aws-appmesh/test/test.route.ts index 706a29a3552fc..3f24bdf4be470 100644 --- a/packages/@aws-cdk/aws-appmesh/test/test.route.ts +++ b/packages/@aws-cdk/aws-appmesh/test/test.route.ts @@ -4,54 +4,44 @@ import { Test } from 'nodeunit'; import * as appmesh from '../lib'; export = { - 'Can export existing route and re-import'(test: Test) { + 'Can import Routes using an ARN'(test: Test) { + const app = new cdk.App(); // GIVEN - const stack = new cdk.Stack(); - - // WHEN - const mesh = new appmesh.Mesh(stack, 'mesh', { - meshName: 'test-mesh', - }); - - const router = new appmesh.VirtualRouter(stack, 'router', { - mesh, + const stack = new cdk.Stack(app, 'Imports', { + env: { account: '123456789012', region: 'us-east-1' }, }); + const meshName = 'test-mesh'; + const virtualRouterName = 'test-virtual-router'; + const routeName = 'test-route'; + const arn = `arn:aws:appmesh:us-east-1:123456789012:mesh/${meshName}/virtualRouter/${virtualRouterName}/gatewayRoute/${routeName}`; - const service1 = new appmesh.VirtualService(stack, 'service-1', { - virtualServiceName: 'service1.domain.local', - mesh, - }); - - const node = mesh.addVirtualNode('test-node', { - dnsHostName: 'test', - listener: { - portMapping: - { - port: 8080, - protocol: appmesh.Protocol.HTTP, - }, - }, - backends: [ - service1, - ], + // WHEN + const route = appmesh.Route.fromRouteArn(stack, 'importedRoute', arn); + // THEN + test.equal(route.routeName, routeName); + test.equal(route.virtualRouter.virtualRouterName, virtualRouterName); + test.equal(route.virtualRouter.mesh.meshName, meshName); + test.done(); + }, + 'Can import Routes using ARN and attributes'(test: Test) { + const app = new cdk.App(); + // GIVEN + const stack = new cdk.Stack(app, 'Imports', { + env: { account: '123456789012', region: 'us-east-1' }, }); + const meshName = 'test-mesh'; + const virtualRouterName = 'test-virtual-router'; + const routeName = 'test-route'; - const route = new appmesh.Route(stack, 'route-1', { - mesh, - virtualRouter: router, - routeTargets: [ - { - virtualNode: node, - weight: 50, - }, - ], - prefix: '/', + // WHEN + const mesh = appmesh.Mesh.fromMeshName(stack, 'Mesh', meshName); + const virtualRouter = mesh.addVirtualRouter('VirtualGateway', { + virtualRouterName: virtualRouterName, }); - - const stack2 = new cdk.Stack(); - appmesh.Route.fromRouteName(stack2, 'imported-route', mesh.meshName, router.virtualRouterName, route.routeName); - - // Nothing to do with imported route yet + const route = appmesh.Route.fromRouteAttributes(stack, 'importedRoute', { routeName, virtualRouter }); + // THEN + test.equal(route.routeName, routeName); + test.equal(route.virtualRouter.mesh.meshName, meshName); test.done(); }, diff --git a/packages/@aws-cdk/aws-appmesh/test/test.virtual-gateway.ts b/packages/@aws-cdk/aws-appmesh/test/test.virtual-gateway.ts index 1dd75b938ab04..f5c020426c9b9 100644 --- a/packages/@aws-cdk/aws-appmesh/test/test.virtual-gateway.ts +++ b/packages/@aws-cdk/aws-appmesh/test/test.virtual-gateway.ts @@ -238,21 +238,42 @@ export = { test.done(); }, }, - - 'Can export and import VirtualGateway and perform actions'(test: Test) { + 'Can import VirtualGateways using an ARN'(test: Test) { const app = new cdk.App(); // GIVEN const stack = new cdk.Stack(app, 'Imports', { env: { account: '123456789012', region: 'us-east-1' }, }); + const meshName = 'testMesh'; + const virtualGatewayName = 'test-gateway'; + const arn = `arn:aws:appmesh:us-east-1:123456789012:mesh/${meshName}/virtualGateway/${virtualGatewayName}`; // WHEN - const virtualGateway2 = appmesh.VirtualGateway.fromVirtualGatewayArn( - stack, 'importedGateway2', 'arn:aws:appmesh:us-east-1:123456789012:mesh/testMesh/virtualGateway/test-gateway'); + const virtualGateway = appmesh.VirtualGateway.fromVirtualGatewayArn( + stack, 'importedGateway', arn); + // THEN + test.equal(virtualGateway.mesh.meshName, meshName); + test.equal(virtualGateway.virtualGatewayName, virtualGatewayName); + test.done(); + }, + 'Can import VirtualGateways using attributes'(test: Test) { + const app = new cdk.App(); + // GIVEN + const stack = new cdk.Stack(app, 'Imports', { + env: { account: '123456789012', region: 'us-east-1' }, + }); + const meshName = 'testMesh'; + const virtualGatewayName = 'test-gateway'; + // WHEN + const virtualGateway = appmesh.VirtualGateway.fromVirtualGatewayAttributes(stack, 'importedGateway', { + mesh: appmesh.Mesh.fromMeshName(stack, 'Mesh', meshName), + virtualGatewayName: virtualGatewayName, + }); // THEN - test.equal(virtualGateway2.mesh.meshName, 'testMesh'); - test.equal(virtualGateway2.virtualGatewayName, 'test-gateway'); + test.equal(virtualGateway.mesh.meshName, meshName); + test.equal(virtualGateway.virtualGatewayName, virtualGatewayName); + test.done(); }, }; \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appmesh/test/test.virtual-node.ts b/packages/@aws-cdk/aws-appmesh/test/test.virtual-node.ts index 82589e2c52ac5..06928a4a25351 100644 --- a/packages/@aws-cdk/aws-appmesh/test/test.virtual-node.ts +++ b/packages/@aws-cdk/aws-appmesh/test/test.virtual-node.ts @@ -102,55 +102,36 @@ export = { }, }, }, - 'Can export and import VirtualNode and perform actions'(test: Test) { + 'Can import Virtual Nodes using an ARN'(test: Test) { // GIVEN const stack = new cdk.Stack(); - // WHEN - const mesh = new appmesh.Mesh(stack, 'mesh', { - meshName: 'test-mesh', - }); - - const node = mesh.addVirtualNode('test-node', { - dnsHostName: 'test.domain.local', - listener: {}, - }); - - const stack2 = new cdk.Stack(); + const meshName = 'testMesh'; + const virtualNodeName = 'test-node'; + const arn = `arn:aws:appmesh:us-east-1:123456789012:mesh/${meshName}/virtualNode/${virtualNodeName}`; - const node2 = appmesh.VirtualNode.fromVirtualNodeName(stack2, 'imported-node', mesh.meshName, node.virtualNodeName); + // WHEN + const virtualNode = appmesh.VirtualNode.fromVirtualNodeArn( + stack, 'importedVirtualNode', arn); + // THEN + test.equal(virtualNode.mesh.meshName, meshName); + test.equal(virtualNode.virtualNodeName, virtualNodeName); - node2.addListeners({ - portMapping: { - port: 8081, - protocol: appmesh.Protocol.TCP, - }, + test.done(); + }, + 'Can import Virtual Nodes using attributes'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const meshName = 'testMesh'; + const virtualNodeName = 'test-node'; + // WHEN + const virtualNode = appmesh.VirtualNode.fromVirtualNodeAttributes(stack, 'importedVirtualNode', { + mesh: appmesh.Mesh.fromMeshName(stack, 'Mesh', meshName), + virtualNodeName: virtualNodeName, }); - // THEN - expect(stack).to( - haveResourceLike('AWS::AppMesh::VirtualNode', { - MeshName: { - 'Fn::GetAtt': ['meshACDFE68E', 'MeshName'], - }, - Spec: { - Listeners: [ - { - PortMapping: { - Port: 8080, - Protocol: 'http', - }, - }, - ], - ServiceDiscovery: { - DNS: { - Hostname: 'test.domain.local', - }, - }, - }, - VirtualNodeName: 'meshtestnode428A9479', - }), - ); + test.equal(virtualNode.mesh.meshName, meshName); + test.equal(virtualNode.virtualNodeName, virtualNodeName); test.done(); }, diff --git a/packages/@aws-cdk/aws-appmesh/test/test.virtual-router.ts b/packages/@aws-cdk/aws-appmesh/test/test.virtual-router.ts index 47b59e0e39962..dff7e4321f1f1 100644 --- a/packages/@aws-cdk/aws-appmesh/test/test.virtual-router.ts +++ b/packages/@aws-cdk/aws-appmesh/test/test.virtual-router.ts @@ -304,15 +304,38 @@ export = { }, }, - 'can import a virtual router'(test: Test) { + 'Can import Virtual Routers using an ARN'(test: Test) { // GIVEN const stack = new cdk.Stack(); + const meshName = 'testMesh'; + const virtualRouterName = 'virtual-router'; + const arn = `arn:aws:appmesh:us-east-1:123456789012:mesh/${meshName}/virtualRouter/${virtualRouterName}`; + // WHEN - const vr = appmesh.VirtualRouter.fromVirtualRouterName(stack, 'Router', 'MyMesh', 'MyRouter'); + const virtualRouter = appmesh.VirtualRouter.fromVirtualRouterArn( + stack, 'importedVirtualRouter', arn); + // THEN + test.equal(virtualRouter.mesh.meshName, meshName); + test.equal(virtualRouter.virtualRouterName, virtualRouterName); + test.done(); + }, + 'Can import Virtual Routers using attributes'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + + const meshName = 'testMesh'; + const virtualRouterName = 'virtual-router'; + + // WHEN + const virtualRouter1 = appmesh.VirtualRouter.fromVirtualRouterAttributes(stack, 'importVirtualRouter', { + mesh: appmesh.Mesh.fromMeshName(stack, 'Mesh', meshName), + virtualRouterName: virtualRouterName, + }); // THEN - test.ok(vr.mesh !== undefined); + test.equal(virtualRouter1.mesh.meshName, meshName); + test.equal(virtualRouter1.virtualRouterName, virtualRouterName); test.done(); }, diff --git a/packages/@aws-cdk/aws-appmesh/test/test.virtual-service.ts b/packages/@aws-cdk/aws-appmesh/test/test.virtual-service.ts index aa582c9376f19..c09c156ac75ea 100644 --- a/packages/@aws-cdk/aws-appmesh/test/test.virtual-service.ts +++ b/packages/@aws-cdk/aws-appmesh/test/test.virtual-service.ts @@ -1,39 +1,39 @@ -import * as ec2 from '@aws-cdk/aws-ec2'; -import * as cloudmap from '@aws-cdk/aws-servicediscovery'; import * as cdk from '@aws-cdk/core'; import { Test } from 'nodeunit'; import * as appmesh from '../lib'; export = { - 'Can export existing virtual-service and re-import'(test: Test) { + 'Can import Virtual Services using an ARN'(test: Test) { // GIVEN const stack = new cdk.Stack(); + const meshName = 'testMesh'; + const virtualServiceName = 'virtual-service'; + const arn = `arn:aws:appmesh:us-east-1:123456789012:mesh/${meshName}/virtualService/${virtualServiceName}`; // WHEN - const mesh = new appmesh.Mesh(stack, 'mesh', { - meshName: 'test-mesh', - }); + const virtualRouter = appmesh.VirtualRouter.fromVirtualRouterArn(stack, 'importedVirtualRouter', arn); + // THEN + test.equal(virtualRouter.mesh.meshName, meshName); + test.equal(virtualRouter.virtualRouterName, virtualServiceName); - const router = new appmesh.VirtualRouter(stack, 'router', { mesh }); + test.done(); + }, + 'Can import Virtual Services using attributes'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'vpc'); - const namespace = new cloudmap.PrivateDnsNamespace(stack, 'test-namespace', { - vpc, - name: 'domain.local', - }); + const meshName = 'testMesh'; + const virtualServiceName = 'virtual-service'; - const service = new appmesh.VirtualService(stack, 'service-1', { - mesh, - virtualServiceName: `service.${namespace.namespaceName}`, - virtualRouter: router, + // WHEN + const virtualService = appmesh.VirtualService.fromVirtualServiceAttributes(stack, 'importedVirtualService', { + mesh: appmesh.Mesh.fromMeshName(stack, 'Mesh', meshName), + virtualServiceName: virtualServiceName, }); - - const stack2 = new cdk.Stack(); - appmesh.VirtualService.fromVirtualServiceName(stack2, 'imported-virtual-service', mesh.meshName, service.virtualServiceName); - - // Nothing to do with imported virtual service yet - + // THEN + test.equal(virtualService.mesh.meshName, meshName); + test.equal(virtualService.virtualServiceName, virtualServiceName); test.done(); }, }; From 4186264050b60f332d60283c9a59cb94120e6bce Mon Sep 17 00:00:00 2001 From: MartinAltmayer Date: Sat, 7 Nov 2020 00:05:45 +0100 Subject: [PATCH 071/314] docs(cli): Fix directory in README.template.md (#11334) I was a bit confused by the README at first. I believe this change has been overlooked when moving from .env to .venv 10 days ago in a4a41b5e006110304b51ee55c34e91cc3f129281. *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-cdk/lib/init-templates/app/python/README.template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-cdk/lib/init-templates/app/python/README.template.md b/packages/aws-cdk/lib/init-templates/app/python/README.template.md index 0f3fce3e943cd..ecb028bfa951e 100644 --- a/packages/aws-cdk/lib/init-templates/app/python/README.template.md +++ b/packages/aws-cdk/lib/init-templates/app/python/README.template.md @@ -6,7 +6,7 @@ This is a blank project for Python development with CDK. The `cdk.json` file tells the CDK Toolkit how to execute your app. This project is set up like a standard Python project. The initialization -process also creates a virtualenv within this project, stored under the .env +process also creates a virtualenv within this project, stored under the `.venv` directory. To create the virtualenv it assumes that there is a `python3` (or `python` for Windows) executable in your path with access to the `venv` package. If for any reason the automatic creation of the virtualenv fails, From d946a9590122031528596b83942cfa2327881b64 Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Fri, 6 Nov 2020 23:36:07 +0000 Subject: [PATCH 072/314] chore: fix toc in contribution guide (#11329) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b538f7c009ee0..364042c28ae18 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -39,7 +39,7 @@ and let us know if it's not up-to-date (even better, submit a PR with your corr - [API Compatibility Checks](#api-compatibility-checks) - [Examples](#examples) - [Feature Flags](#feature-flags) - - [Versioning](#versioning) + - [Versioning and Release](#versioning-and-release) - [Troubleshooting](#troubleshooting) - [Debugging](#debugging) - [Connecting the VS Code Debugger](#connecting-the-vs-code-debugger) From f1d543574622cbc7b9d6eab63e85ebcb984a8909 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 7 Nov 2020 00:49:24 +0000 Subject: [PATCH 073/314] chore(deps-dev): bump parcel from 2.0.0-nightly.438 to 2.0.0-nightly.440 (#11349) Bumps [parcel](https://github.com/parcel-bundler/parcel) from 2.0.0-nightly.438 to 2.0.0-nightly.440. - [Release notes](https://github.com/parcel-bundler/parcel/releases) - [Changelog](https://github.com/parcel-bundler/parcel/blob/v2/CHANGELOG.md) - [Commits](https://github.com/parcel-bundler/parcel/commits) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- .../@aws-cdk/aws-lambda-nodejs/package.json | 2 +- yarn.lock | 924 +++++++++--------- 2 files changed, 463 insertions(+), 463 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda-nodejs/package.json b/packages/@aws-cdk/aws-lambda-nodejs/package.json index 7b03475c7d8f3..cbde0cb52cebc 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/package.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/package.json @@ -67,7 +67,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "delay": "4.4.0", - "parcel": "2.0.0-nightly.438", + "parcel": "2.0.0-nightly.440", "pkglint": "0.0.0" }, "dependencies": { diff --git a/yarn.lock b/yarn.lock index c82a99b9ede01..c1e62470d80a1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2170,128 +2170,128 @@ dependencies: "@types/node" ">= 8" -"@parcel/babel-ast-utils@2.0.0-nightly.2062+a5e23487": - version "2.0.0-nightly.2062" - resolved "https://registry.yarnpkg.com/@parcel/babel-ast-utils/-/babel-ast-utils-2.0.0-nightly.2062.tgz#dd01b86d3cd56d93c4c27f3eb92dd5f6fdbfcdba" - integrity sha512-cKCzKl0wXEdhPyGxBqrUtNulmCLi1b6aMth6L2Lg1KcdcnN/zdpXB405KTKYWUuMULLZOjatarhEV/WMGYCEjg== +"@parcel/babel-ast-utils@2.0.0-nightly.2064+1572e394": + version "2.0.0-nightly.2064" + resolved "https://registry.yarnpkg.com/@parcel/babel-ast-utils/-/babel-ast-utils-2.0.0-nightly.2064.tgz#24c1c1f95bac7879b103809bbfd71055dbb63427" + integrity sha512-Lt89A86Nr/7sHODcKBcxbtcLV0bLeoYz4uQ6wyqSD+Jn6j8oB613Wg9cGlDuaq1sKZKim/5UK5RMRkRS3oQGDw== dependencies: "@babel/generator" "^7.0.0" "@babel/parser" "^7.0.0" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.442+1572e394" -"@parcel/babel-preset-env@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/babel-preset-env/-/babel-preset-env-2.0.0-nightly.440.tgz#947d0f579717f1caf0bcc20bd612fbe3aacc4e35" - integrity sha512-ovsArQ7jdsDDD6Q8cT0RqgZ9iNIShStzNUTy/cR9C5MoA2EeMqhmguTFbKNujNPXhrsyJ0M86EEijWA+MLKNlw== +"@parcel/babel-preset-env@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/babel-preset-env/-/babel-preset-env-2.0.0-nightly.442.tgz#f863974239c5941afd27135b443002149cb50d68" + integrity sha512-WgCDZOUPFHdFo3Et+F7KKC+V+DNb5wTs4phL2F0vcEWZSAs2HYFs717jKcGWwaZA3V0fTnibIEfkIt3WXX9NKw== dependencies: "@babel/preset-env" "^7.4.0" semver "^5.4.1" -"@parcel/babylon-walk@2.0.0-nightly.2062+a5e23487": - version "2.0.0-nightly.2062" - resolved "https://registry.yarnpkg.com/@parcel/babylon-walk/-/babylon-walk-2.0.0-nightly.2062.tgz#a55418911851c7c4015622b579c4ca01ef921630" - integrity sha512-7BEK1BPSGnHcudrghUZBK9tM//Zu9Bs7n5OijYX2gTQ9re/qy7NLu4NIV03eJx6cvxg7k/nE/ZpV2lrzFgkcDg== +"@parcel/babylon-walk@2.0.0-nightly.2064+1572e394": + version "2.0.0-nightly.2064" + resolved "https://registry.yarnpkg.com/@parcel/babylon-walk/-/babylon-walk-2.0.0-nightly.2064.tgz#db99b1c8b74eb1dab01d2d6b859dc937dc099e04" + integrity sha512-l/M1oCUQJaOjJXejWE1gzfUj04Ygx9KSRhGeSUhMdFXtvsYj062PKG8ftYX4IYdy4HB1olv2g8ptvo50z3nsSA== dependencies: "@babel/types" "^7.0.0" lodash.clone "^4.5.0" -"@parcel/bundler-default@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.0.0-nightly.440.tgz#38edbaa9ecf4992e19ab8c151c6d54b29157a287" - integrity sha512-6dMnmGDSHKM6cTWNq56txQkgbLRgQLctd8KrrWnSbnfKeMKQIAdJQVhg4Y5ku680NGZlxd+8/kpXS21SYG0sHQ== +"@parcel/bundler-default@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.0.0-nightly.442.tgz#cf7a4e5d712af7dc79bb93f154f1c9c3683b3e5b" + integrity sha512-kSmqsNFSX5+9NGRrrnNBOqwf0tX5ljNcWLBEJopwUXdFvgWryt9FQjAQtx1OBGWFB7AuekBuVzQi/ZqWGU4DZA== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.440+a5e23487" - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/diagnostic" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.442+1572e394" nullthrows "^1.1.1" -"@parcel/cache@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/cache/-/cache-2.0.0-nightly.440.tgz#283088d2c74b59f7bd2dc4f317abc3dff477a798" - integrity sha512-NCQqYw9fkevvnSkV0u4EpwqswkMRqikNvMr7R/6qxuB39anVyOaygaQ1CTeAPzCs+LoExdMl4g+Q83uAMRSwbw== +"@parcel/cache@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/cache/-/cache-2.0.0-nightly.442.tgz#ce59d3797de9a1c315c88fd7f0ece9776b879e80" + integrity sha512-aM1UJMsKzNT4t1siF5oJCduUzqVc/WHR1NUUsCa5C3XVSLGqbWjIiUbFFH0xWScsvYvSoGA8lk/xKM5gid7n2g== dependencies: - "@parcel/logger" "2.0.0-nightly.440+a5e23487" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/logger" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.442+1572e394" -"@parcel/codeframe@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/codeframe/-/codeframe-2.0.0-nightly.440.tgz#ee426a7d61c43040b0c1c814a0094c0020983482" - integrity sha512-WDnyEu+10SPCK9XM19LzNL1L5vVVMak0m3088yddzc+bOdR75Pezg3bXsNdEVh2Xd8Xbz+LpWWrB9eGc/hbRdA== +"@parcel/codeframe@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/codeframe/-/codeframe-2.0.0-nightly.442.tgz#8f4ac16312fdbbbd63163fe09f245bfb836ef2b3" + integrity sha512-sUpRg4fDZTNC2qKD73tNeUVmIA07RZek1JTU5BKbC1RTWmjGOPJzDEzPvczXreGar4yZmpODMBN0c91wzkJTLg== dependencies: chalk "^2.4.2" emphasize "^2.1.0" slice-ansi "^4.0.0" string-width "^4.2.0" -"@parcel/config-default@2.0.0-nightly.440+a5e23487": +"@parcel/config-default@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/config-default/-/config-default-2.0.0-nightly.442.tgz#0da5b01410b939c9a8cf706708ef994e78fc2b19" + integrity sha512-PFIuVCLVkJJnMXvANIrh2Q8bu7Wggl9SYphcV1FBQZIl7j2INCo8ixCzGEauVXHwmHBFhWwgwh4bzEDNFMzyKQ== + dependencies: + "@parcel/bundler-default" "2.0.0-nightly.442+1572e394" + "@parcel/namer-default" "2.0.0-nightly.442+1572e394" + "@parcel/optimizer-cssnano" "2.0.0-nightly.442+1572e394" + "@parcel/optimizer-data-url" "2.0.0-nightly.442+1572e394" + "@parcel/optimizer-htmlnano" "2.0.0-nightly.442+1572e394" + "@parcel/optimizer-terser" "2.0.0-nightly.442+1572e394" + "@parcel/packager-css" "2.0.0-nightly.442+1572e394" + "@parcel/packager-html" "2.0.0-nightly.442+1572e394" + "@parcel/packager-js" "2.0.0-nightly.442+1572e394" + "@parcel/packager-raw" "2.0.0-nightly.442+1572e394" + "@parcel/packager-raw-url" "2.0.0-nightly.2064+1572e394" + "@parcel/packager-ts" "2.0.0-nightly.442+1572e394" + "@parcel/reporter-bundle-analyzer" "2.0.0-nightly.2064+1572e394" + "@parcel/reporter-bundle-buddy" "2.0.0-nightly.2064+1572e394" + "@parcel/reporter-cli" "2.0.0-nightly.442+1572e394" + "@parcel/reporter-dev-server" "2.0.0-nightly.442+1572e394" + "@parcel/resolver-default" "2.0.0-nightly.442+1572e394" + "@parcel/runtime-browser-hmr" "2.0.0-nightly.442+1572e394" + "@parcel/runtime-js" "2.0.0-nightly.442+1572e394" + "@parcel/runtime-react-refresh" "2.0.0-nightly.442+1572e394" + "@parcel/transformer-babel" "2.0.0-nightly.442+1572e394" + "@parcel/transformer-coffeescript" "2.0.0-nightly.442+1572e394" + "@parcel/transformer-css" "2.0.0-nightly.442+1572e394" + "@parcel/transformer-glsl" "2.0.0-nightly.2064+1572e394" + "@parcel/transformer-graphql" "2.0.0-nightly.442+1572e394" + "@parcel/transformer-html" "2.0.0-nightly.442+1572e394" + "@parcel/transformer-image" "2.0.0-nightly.2064+1572e394" + "@parcel/transformer-inline-string" "2.0.0-nightly.442+1572e394" + "@parcel/transformer-js" "2.0.0-nightly.442+1572e394" + "@parcel/transformer-json" "2.0.0-nightly.442+1572e394" + "@parcel/transformer-jsonld" "2.0.0-nightly.2064+1572e394" + "@parcel/transformer-less" "2.0.0-nightly.442+1572e394" + "@parcel/transformer-mdx" "2.0.0-nightly.2064+1572e394" + "@parcel/transformer-postcss" "2.0.0-nightly.442+1572e394" + "@parcel/transformer-posthtml" "2.0.0-nightly.442+1572e394" + "@parcel/transformer-pug" "2.0.0-nightly.442+1572e394" + "@parcel/transformer-raw" "2.0.0-nightly.442+1572e394" + "@parcel/transformer-react-refresh-babel" "2.0.0-nightly.442+1572e394" + "@parcel/transformer-react-refresh-wrap" "2.0.0-nightly.442+1572e394" + "@parcel/transformer-sass" "2.0.0-nightly.442+1572e394" + "@parcel/transformer-stylus" "2.0.0-nightly.442+1572e394" + "@parcel/transformer-sugarss" "2.0.0-nightly.442+1572e394" + "@parcel/transformer-toml" "2.0.0-nightly.442+1572e394" + "@parcel/transformer-typescript-types" "2.0.0-nightly.442+1572e394" + "@parcel/transformer-vue" "2.0.0-nightly.2064+1572e394" + "@parcel/transformer-yaml" "2.0.0-nightly.442+1572e394" + +"@parcel/core@2.0.0-nightly.440+1572e394": version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/config-default/-/config-default-2.0.0-nightly.440.tgz#69e53a1c8ca9860e7f64cf382119c7902cdb9a45" - integrity sha512-mGzxsPT2cyShfTa16Mgo9shjfyEVP+qbZ0R4xKiokhRkek9Wxhyb4FOka8qltxuMSsCyGsBk6kfCR0WTmzffaA== - dependencies: - "@parcel/bundler-default" "2.0.0-nightly.440+a5e23487" - "@parcel/namer-default" "2.0.0-nightly.440+a5e23487" - "@parcel/optimizer-cssnano" "2.0.0-nightly.440+a5e23487" - "@parcel/optimizer-data-url" "2.0.0-nightly.440+a5e23487" - "@parcel/optimizer-htmlnano" "2.0.0-nightly.440+a5e23487" - "@parcel/optimizer-terser" "2.0.0-nightly.440+a5e23487" - "@parcel/packager-css" "2.0.0-nightly.440+a5e23487" - "@parcel/packager-html" "2.0.0-nightly.440+a5e23487" - "@parcel/packager-js" "2.0.0-nightly.440+a5e23487" - "@parcel/packager-raw" "2.0.0-nightly.440+a5e23487" - "@parcel/packager-raw-url" "2.0.0-nightly.2062+a5e23487" - "@parcel/packager-ts" "2.0.0-nightly.440+a5e23487" - "@parcel/reporter-bundle-analyzer" "2.0.0-nightly.2062+a5e23487" - "@parcel/reporter-bundle-buddy" "2.0.0-nightly.2062+a5e23487" - "@parcel/reporter-cli" "2.0.0-nightly.440+a5e23487" - "@parcel/reporter-dev-server" "2.0.0-nightly.440+a5e23487" - "@parcel/resolver-default" "2.0.0-nightly.440+a5e23487" - "@parcel/runtime-browser-hmr" "2.0.0-nightly.440+a5e23487" - "@parcel/runtime-js" "2.0.0-nightly.440+a5e23487" - "@parcel/runtime-react-refresh" "2.0.0-nightly.440+a5e23487" - "@parcel/transformer-babel" "2.0.0-nightly.440+a5e23487" - "@parcel/transformer-coffeescript" "2.0.0-nightly.440+a5e23487" - "@parcel/transformer-css" "2.0.0-nightly.440+a5e23487" - "@parcel/transformer-glsl" "2.0.0-nightly.2062+a5e23487" - "@parcel/transformer-graphql" "2.0.0-nightly.440+a5e23487" - "@parcel/transformer-html" "2.0.0-nightly.440+a5e23487" - "@parcel/transformer-image" "2.0.0-nightly.2062+a5e23487" - "@parcel/transformer-inline-string" "2.0.0-nightly.440+a5e23487" - "@parcel/transformer-js" "2.0.0-nightly.440+a5e23487" - "@parcel/transformer-json" "2.0.0-nightly.440+a5e23487" - "@parcel/transformer-jsonld" "2.0.0-nightly.2062+a5e23487" - "@parcel/transformer-less" "2.0.0-nightly.440+a5e23487" - "@parcel/transformer-mdx" "2.0.0-nightly.2062+a5e23487" - "@parcel/transformer-postcss" "2.0.0-nightly.440+a5e23487" - "@parcel/transformer-posthtml" "2.0.0-nightly.440+a5e23487" - "@parcel/transformer-pug" "2.0.0-nightly.440+a5e23487" - "@parcel/transformer-raw" "2.0.0-nightly.440+a5e23487" - "@parcel/transformer-react-refresh-babel" "2.0.0-nightly.440+a5e23487" - "@parcel/transformer-react-refresh-wrap" "2.0.0-nightly.440+a5e23487" - "@parcel/transformer-sass" "2.0.0-nightly.440+a5e23487" - "@parcel/transformer-stylus" "2.0.0-nightly.440+a5e23487" - "@parcel/transformer-sugarss" "2.0.0-nightly.440+a5e23487" - "@parcel/transformer-toml" "2.0.0-nightly.440+a5e23487" - "@parcel/transformer-typescript-types" "2.0.0-nightly.440+a5e23487" - "@parcel/transformer-vue" "2.0.0-nightly.2062+a5e23487" - "@parcel/transformer-yaml" "2.0.0-nightly.440+a5e23487" - -"@parcel/core@2.0.0-nightly.438+a5e23487": - version "2.0.0-nightly.438" - resolved "https://registry.yarnpkg.com/@parcel/core/-/core-2.0.0-nightly.438.tgz#a7dc93eb86c3028ea3d75edf5a0e60628022cec5" - integrity sha512-3GS62SRVjmde+VO1YJ+Jft5PvwMh+LeTe1qp/FKQDAE8gKz/IJmtKvRgFC/FdLVQhwA3efXyGT1h+IZuJJdn4A== - dependencies: - "@parcel/cache" "2.0.0-nightly.440+a5e23487" - "@parcel/diagnostic" "2.0.0-nightly.440+a5e23487" - "@parcel/events" "2.0.0-nightly.440+a5e23487" - "@parcel/fs" "2.0.0-nightly.440+a5e23487" - "@parcel/logger" "2.0.0-nightly.440+a5e23487" - "@parcel/package-manager" "2.0.0-nightly.440+a5e23487" - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + resolved "https://registry.yarnpkg.com/@parcel/core/-/core-2.0.0-nightly.440.tgz#50be517f63bf280077de2bd6f79171c9847ca951" + integrity sha512-4Y5Abevi292J07q33QqEfNMExfGPJtjJ93wJs3NTibkXj17eGl0unPyPowYDHHuH6Eqlzk8clpMgnmmjJZkKsA== + dependencies: + "@parcel/cache" "2.0.0-nightly.442+1572e394" + "@parcel/diagnostic" "2.0.0-nightly.442+1572e394" + "@parcel/events" "2.0.0-nightly.442+1572e394" + "@parcel/fs" "2.0.0-nightly.442+1572e394" + "@parcel/logger" "2.0.0-nightly.442+1572e394" + "@parcel/package-manager" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/types" "2.0.0-nightly.440+a5e23487" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" - "@parcel/workers" "2.0.0-nightly.440+a5e23487" + "@parcel/types" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/workers" "2.0.0-nightly.442+1572e394" abortcontroller-polyfill "^1.1.9" base-x "^3.0.8" browserslist "^4.6.6" @@ -2305,72 +2305,72 @@ querystring "^0.2.0" semver "^5.4.1" -"@parcel/diagnostic@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/diagnostic/-/diagnostic-2.0.0-nightly.440.tgz#ccb5f1719dc458fc707a8df8cd5034cafd7c7ff0" - integrity sha512-vAgSjhj0nbHIZq6cjc7PdU3wDw9PwTo0g/kr24FXDy4DZuwAPG0vm4cWQk9u6mwlAT6OiUFbtBjQQ7/jEc+vgw== +"@parcel/diagnostic@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/diagnostic/-/diagnostic-2.0.0-nightly.442.tgz#8ba93575c3f1ff17b538af4c380fd6616a07bc25" + integrity sha512-rL9vRNP6U+vyJ/ReNHZMqMNA1ffCQ2EpEiS97lr7jb6cRlXMgsVFEdD8aNOIT7qcp9G9ALiV+xZMAsQSCs84qQ== dependencies: json-source-map "^0.6.1" nullthrows "^1.1.1" -"@parcel/events@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/events/-/events-2.0.0-nightly.440.tgz#7103afc255f8bba7d4a942fc1a662898d9eef621" - integrity sha512-0/ZF1hL1EIKoFJ8fJzcCqIZocibijUFACmZR4epHAwMc0ydI8BQ5xFfFjHdL6nPc6tIEXwAVSDf6i8nj1xqMKg== +"@parcel/events@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/events/-/events-2.0.0-nightly.442.tgz#56ada13b1dbe01405082d56ac96a1db29475f2d6" + integrity sha512-QItzVrcsn1wNnVH5aoYDQjry4gqDONa6XTw0S/P/ccaXGgw+gUZPe+h74sPaTA8BfWBCskH8VjeUsvcA/nSwXA== -"@parcel/fs-write-stream-atomic@2.0.0-nightly.2062+a5e23487": - version "2.0.0-nightly.2062" - resolved "https://registry.yarnpkg.com/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.0-nightly.2062.tgz#27a53d16479f5a15bbc4d4bc0c851165eff366b7" - integrity sha512-ypcpWHrhgvApLu0aqfPlOqh5/YLSXr+Pv2BpwAT8J6WpkW0Cpogs1xmGExKpHvqOZWvXQ+nDqoz+xFF+hBMO8w== +"@parcel/fs-write-stream-atomic@2.0.0-nightly.2064+1572e394": + version "2.0.0-nightly.2064" + resolved "https://registry.yarnpkg.com/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.0-nightly.2064.tgz#51dab77443533a1fbd681459fb07c3ba9e666224" + integrity sha512-chDwq1J6PfHlwXwlM8l9o049eAmgz9B4ErNZtEwsgXsxvRj4B44IbIMJTaRZulFucwRV5AXtht4ckfsV+miOjQ== dependencies: graceful-fs "^4.1.2" iferr "^1.0.2" imurmurhash "^0.1.4" readable-stream "1 || 2" -"@parcel/fs@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-2.0.0-nightly.440.tgz#a7b5eb878f8e352a4e05c36246cbfa0c5738d3fd" - integrity sha512-+8g5PNSx7HpswGKjDxhElTaC91OmKXNUE13uZGGkpxUupCBu5vBnWjg0FLM3RS4wKi2qa3/nDmCncbUW+qwJoA== +"@parcel/fs@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-2.0.0-nightly.442.tgz#6078ee0380a342418a3cee269c47384a817550ea" + integrity sha512-RlUbXa5T4DCVLpmQigmmXBwzYn42eDbSHz4Q5+LpQdQd1RNGeYbR1IheBgVPDA0XVSXj/1UY//uDYRchxfaS3Q== dependencies: - "@parcel/fs-write-stream-atomic" "2.0.0-nightly.2062+a5e23487" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/fs-write-stream-atomic" "2.0.0-nightly.2064+1572e394" + "@parcel/utils" "2.0.0-nightly.442+1572e394" "@parcel/watcher" "2.0.0-alpha.8" - "@parcel/workers" "2.0.0-nightly.440+a5e23487" + "@parcel/workers" "2.0.0-nightly.442+1572e394" graceful-fs "^4.2.4" mkdirp "^0.5.1" ncp "^2.0.0" nullthrows "^1.1.1" - rimraf "^2.6.2" + rimraf "^3.0.2" -"@parcel/logger@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-2.0.0-nightly.440.tgz#5287e17dddf12f8298ab99708d86ba59a54fc641" - integrity sha512-SEVWgo7tno1UeqF2mJovHMQqycAJNNh5iN1ux4Ld5HzCLldG0+E+AVK7OYIaGHIGiMabrEco0CC1OwR4qXJnvQ== +"@parcel/logger@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-2.0.0-nightly.442.tgz#89b3bd2dda7a6d23bd94741d7f76fd1af30edf95" + integrity sha512-YA6xN27q4fXYEya2oOYOP1/uj0uaNnaO6dnRjSYv86fAM5qThtSl2LnWIK6TvN805JErZm8mRbwWRDayM37Yhg== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.440+a5e23487" - "@parcel/events" "2.0.0-nightly.440+a5e23487" + "@parcel/diagnostic" "2.0.0-nightly.442+1572e394" + "@parcel/events" "2.0.0-nightly.442+1572e394" -"@parcel/markdown-ansi@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/markdown-ansi/-/markdown-ansi-2.0.0-nightly.440.tgz#d621a2110d32b8aaaf79a5356a2c308b0f8b1b19" - integrity sha512-oo/4Oz3o43LsDO224GmCkTgXzF8+8hvzF9oC3WUWV3ancNZ2qQoWjwAGRa8QB4UE+5ijBpoSb/wIv5HfEmIipQ== +"@parcel/markdown-ansi@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/markdown-ansi/-/markdown-ansi-2.0.0-nightly.442.tgz#cc693b46cbd2df4c60f64fc04cb5e483bab877b6" + integrity sha512-+JgG26I7jN8JSNJCpJNsn9au2ci7HM9bE+K3LGCaWeHLfxxQbq5oC6dzI5b5jmxxB0JKFugAc3YBx0ZfckswyQ== dependencies: chalk "^2.4.2" -"@parcel/namer-default@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/namer-default/-/namer-default-2.0.0-nightly.440.tgz#b8628109633f077ce5764bf54eb6dfc9a7950db4" - integrity sha512-o4jyL/6DixMCSSV5bXpLB1p9XLM/fwl0RIQ1IbZMfEOmh/T/ycratgAXRliri8/fjkbjlCg3zRyZqpBcoMWozQ== +"@parcel/namer-default@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/namer-default/-/namer-default-2.0.0-nightly.442.tgz#62bd0ad82be823219480cabf56faf991ca4225b7" + integrity sha512-Vho7fCkhHhSLQ/oR5Ru757PwDIx67zH/yaS3MrcwtWfvgydS9aiRswoG8xeaLwy+4M8I/TDpRt9e3pAmfdWFNQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.440+a5e23487" - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/diagnostic" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" nullthrows "^1.1.1" -"@parcel/node-libs-browser@2.0.0-nightly.2062+a5e23487": - version "2.0.0-nightly.2062" - resolved "https://registry.yarnpkg.com/@parcel/node-libs-browser/-/node-libs-browser-2.0.0-nightly.2062.tgz#830b5b63cb1ebf07d0c31afa08c64b4d1d016a7b" - integrity sha512-TouswHMPuDz8KhqtjKjU4VUJjcStRaAj3poBe31Rb474xSp1xLG4CBpul+idgKkip5yTA1Qr10ondIizuEnRrg== +"@parcel/node-libs-browser@2.0.0-nightly.2064+1572e394": + version "2.0.0-nightly.2064" + resolved "https://registry.yarnpkg.com/@parcel/node-libs-browser/-/node-libs-browser-2.0.0-nightly.2064.tgz#b49bb4b1ef9e774e23e158ea652ff1888544eedf" + integrity sha512-iRMLprGbDcdwYC7b1fhY0eyFyl0mtQAalEGc63lfEr0LY3jXtJRt9reapsKZjGcQUNWF1lgjs4yfye6X8Dgvcg== dependencies: assert "^2.0.0" browserify-zlib "^0.2.0" @@ -2395,71 +2395,71 @@ util "^0.12.3" vm-browserify "^1.1.2" -"@parcel/node-resolver-core@2.0.0-nightly.2062+a5e23487": - version "2.0.0-nightly.2062" - resolved "https://registry.yarnpkg.com/@parcel/node-resolver-core/-/node-resolver-core-2.0.0-nightly.2062.tgz#82bf32f3a1555a7bf6eca7820d00615ddb1d206a" - integrity sha512-66nVYW6LPn1uGqL6Dk8a6onQm+Ggh6wldv0t238bnc8wUvZR7MU/paMpSeFsb1dTTKQZDk8ak35JsAsu+wQuHg== +"@parcel/node-resolver-core@2.0.0-nightly.2064+1572e394": + version "2.0.0-nightly.2064" + resolved "https://registry.yarnpkg.com/@parcel/node-resolver-core/-/node-resolver-core-2.0.0-nightly.2064.tgz#f33945882a1315c361f555b978b5867b3326895c" + integrity sha512-PAhtLBmR5PkYSpD22NtOTRGtVQNghLBnJoQhaWMg74W8+UdB17hcoVS7Q8UHdgIPR5mZ+PB1hRN2/Yt2y65f4g== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.440+a5e23487" - "@parcel/node-libs-browser" "2.0.0-nightly.2062+a5e23487" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/diagnostic" "2.0.0-nightly.442+1572e394" + "@parcel/node-libs-browser" "2.0.0-nightly.2064+1572e394" + "@parcel/utils" "2.0.0-nightly.442+1572e394" micromatch "^3.0.4" nullthrows "^1.1.1" querystring "^0.2.0" -"@parcel/optimizer-cssnano@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.0.0-nightly.440.tgz#e2941af9cc127f25ac3e23b8c61079158e9d3336" - integrity sha512-10DlbQWW2M8Pp/Ixy6SPPSfxGe8ZPqCMwgkt8KTdccq6VlGF84innCnEv5USOu3o5xKHtlOgQmlpOi9T8gh4TA== +"@parcel/optimizer-cssnano@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.0.0-nightly.442.tgz#6aeeaa4d4c477d406dbd173457ef72fe9984f735" + integrity sha512-XCZOqdgW+ljLf+yylz/eHY0BWsFN3OyV4igo/qfNwKItINvofoGQUHM0V2FxgRuy8awI/pHopQ1h2tItPDZ3PQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" "@parcel/source-map" "2.0.0-alpha.4.16" cssnano "^4.1.10" postcss "^8.0.5" -"@parcel/optimizer-data-url@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-data-url/-/optimizer-data-url-2.0.0-nightly.440.tgz#4e9a7ed5484adc85cc2e052b291e51b22b12d46d" - integrity sha512-yEIJm4wr8n5hQ2T0AQHeb5hCAdcPYySn4plodd4tyPWr93ITkrKqilkmnyyGi9JyM64wK1WqQtA3GjeA/+HjXg== +"@parcel/optimizer-data-url@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-data-url/-/optimizer-data-url-2.0.0-nightly.442.tgz#8041d16a342f80f9913bd4dc8902ef200130b9a7" + integrity sha512-zLgvzmTABKeDqfsczw7zvPhIeYXMHfEPuBlR2w89t9dAXR6habUvOiwYumZ87qxvatrrc1OzK8/OqCV7X+THug== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.442+1572e394" isbinaryfile "^4.0.2" mime "^2.4.4" -"@parcel/optimizer-htmlnano@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.0.0-nightly.440.tgz#f8cafa8063cc97fdf5437ac7bbde32aa1e21239c" - integrity sha512-LWTxTOmnf1CuCkytg1sCcIUAuqfxQH2khb21bf4Ib5mgqkKDDRcd4eAyBbal9/ht94GdyRYqbZ1JzRTo37MgJw== +"@parcel/optimizer-htmlnano@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.0.0-nightly.442.tgz#93d637c7788d60ca83723437ede5553c63fd13df" + integrity sha512-8mampv7H2vx4KBx9DmpT5h+AreQWARfukQ/2R7MLP5oJzaMBpqd8kfIJtIFRMrheSQRSgg0/gIXJrV+D/Kv3yQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.442+1572e394" htmlnano "^0.2.2" nullthrows "^1.1.1" posthtml "^0.11.3" -"@parcel/optimizer-terser@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-terser/-/optimizer-terser-2.0.0-nightly.440.tgz#b16733244384f65db74c492c6968f6520735dcb3" - integrity sha512-2kLxL2CBaX7YZKXHRmlzKiLJeWAfgk21pIsCGzfRiGWr2fPIWiWpSLQCZQnEI1v0urUAmM+ZAvU0yZ2DLasMkA== +"@parcel/optimizer-terser@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-terser/-/optimizer-terser-2.0.0-nightly.442.tgz#d7a105e4651ac13ebab8192bde2c58f396a3c929" + integrity sha512-QwaegPtxmhSBhwIL7PhgaBGvozFNwVkzQoFYUW99c9Gb47B2XF77vxBQxhKrH/BUltMM3hMQq0aQAyLHLyK4lg== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.440+a5e23487" - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/diagnostic" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.442+1572e394" nullthrows "^1.1.1" terser "^5.2.0" -"@parcel/package-manager@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/package-manager/-/package-manager-2.0.0-nightly.440.tgz#470bb6716450faf4b133f4832fc6664830d83585" - integrity sha512-BXmjrpKwCabhIhcHmgNiWLzJzlrtFalE3zEVB9drAxWI1OHP4W4Q4awDnn7b3ap1JCvW8q85qrTKNxPDxRWq+g== - dependencies: - "@parcel/diagnostic" "2.0.0-nightly.440+a5e23487" - "@parcel/fs" "2.0.0-nightly.440+a5e23487" - "@parcel/logger" "2.0.0-nightly.440+a5e23487" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" - "@parcel/workers" "2.0.0-nightly.440+a5e23487" +"@parcel/package-manager@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/package-manager/-/package-manager-2.0.0-nightly.442.tgz#cc3a34664b8b9f9d3b0c48af9512d58586e678b1" + integrity sha512-5hCa6PrnpPx2s/WQJXakaegWJcKeqUrxvuG85sR4SntPb3AD3O0HJTHEsnCw8fMi1ijt/TyM9a8smccrEoRpkA== + dependencies: + "@parcel/diagnostic" "2.0.0-nightly.442+1572e394" + "@parcel/fs" "2.0.0-nightly.442+1572e394" + "@parcel/logger" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/workers" "2.0.0-nightly.442+1572e394" command-exists "^1.2.6" cross-spawn "^6.0.4" nullthrows "^1.1.1" @@ -2467,91 +2467,91 @@ semver "^5.4.1" split2 "^3.1.1" -"@parcel/packager-css@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/packager-css/-/packager-css-2.0.0-nightly.440.tgz#d1890a207f8ed7173bacd5a0cfbc8dacb463a2c1" - integrity sha512-QXIflpM+Tqkhhkjdw06i6Y4PgUVsMAusBMP4TJa+NVdTg+vL4nItd1dRw2jeANxDwGhaQJChA2vTW2PIxwvK1g== +"@parcel/packager-css@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/packager-css/-/packager-css-2.0.0-nightly.442.tgz#f2d51f495cc5415790844436cf3781412b9d0d34" + integrity sha512-OlxdCd+6VjlDJwNHx3v5DwgjlL2jaqdXeSWanRllygXAcRPC7+n69Ds27soNSKUJ4765WFJDKNbOGG1a5hqvOA== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.442+1572e394" -"@parcel/packager-html@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/packager-html/-/packager-html-2.0.0-nightly.440.tgz#47701156f2644af01666fb321268f89ffae07d61" - integrity sha512-U8riNMZrs8wZt90fz3I3KLq08GJS2jNuldx4CM7qZWNRcFc/WK4MSPB9Ag5TTkq4WibXvGYhwnnMf3hfDbzlvw== +"@parcel/packager-html@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/packager-html/-/packager-html-2.0.0-nightly.442.tgz#173e3f17d16cd09797a306adc9d71660729d91a8" + integrity sha512-fs+AjyO39inrGbQ5iulIyzt2AFUosWNWXujoXMRRwlApkCaN6QEioH6n0r9XZ0lVplJPkZpgS9kLNA/I6mLbRA== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" - "@parcel/types" "2.0.0-nightly.440+a5e23487" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/types" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.442+1572e394" nullthrows "^1.1.1" posthtml "^0.11.3" -"@parcel/packager-js@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/packager-js/-/packager-js-2.0.0-nightly.440.tgz#cf2a6c90294de497cbe0404537263e88d88992ca" - integrity sha512-iofUUOXbZrIowoaaoTGOguRx5a8mOytjQFkQDVq/VgcI3Pi7MU8tHQsQfUN8dpSWaMgMNFZALHrASoXUL4mcdQ== +"@parcel/packager-js@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/packager-js/-/packager-js-2.0.0-nightly.442.tgz#e4afd2023ee77cb1a41fcf56aad1b9e9ee3684a0" + integrity sha512-P+za6XldIPPLQmqD0ZUUewJn4z7xq3TBajeiv4s6JVsSmicpin0s1XCWOqPY6xlp9ebJs8toQ+IquMjVbWaxIQ== dependencies: "@babel/traverse" "^7.2.3" - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" - "@parcel/scope-hoisting" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/scope-hoisting" "2.0.0-nightly.442+1572e394" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.442+1572e394" nullthrows "^1.1.1" -"@parcel/packager-raw-url@2.0.0-nightly.2062+a5e23487": - version "2.0.0-nightly.2062" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw-url/-/packager-raw-url-2.0.0-nightly.2062.tgz#e0c602f11a0cdd8c46896d6db66b213428e946e7" - integrity sha512-iZD+Pxg4CS2FgkMBGSW4FIsWaLaJlP6/W3IbJt8nUbAoMRgOZMi+fi6Mi/53mseMITT+Pb6/CvViubqT+8uMBQ== +"@parcel/packager-raw-url@2.0.0-nightly.2064+1572e394": + version "2.0.0-nightly.2064" + resolved "https://registry.yarnpkg.com/@parcel/packager-raw-url/-/packager-raw-url-2.0.0-nightly.2064.tgz#2e4ceb87bbbe30c947635c10f25fcb778216b24f" + integrity sha512-lgYFlPADOZPCUxHoPs/iigqegHtk46+41En4+1vM6j+0GsrOGiI5DtMSiRLz+nTqkZ/QiRN7d0M6N0Reggi5fg== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.442+1572e394" -"@parcel/packager-raw@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw/-/packager-raw-2.0.0-nightly.440.tgz#30ed36e97b719b2a14ccfb4a9f4136ce75a985ee" - integrity sha512-dL+jAvNkeYkjEmz+V/Os2Q+tyqjaVzazRh8NOLt4pzDC0cIDqWpzokvBDXUrsHhX+vHx1pYNBfKrNIpeXSR8Wg== +"@parcel/packager-raw@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/packager-raw/-/packager-raw-2.0.0-nightly.442.tgz#99eb809b35d92f5e8e8029754e48e0326633f530" + integrity sha512-XwJWh1WfGruu7EOOow8g8gWfRhna0r61kzp6EsGD52JcRfHazk/2crQOdIp6g59eTM0McuiWvrnQaHGL+JbYEw== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" -"@parcel/packager-ts@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/packager-ts/-/packager-ts-2.0.0-nightly.440.tgz#09cbe1e491c62cfdfe83f3fd024a56f3c2e7b11b" - integrity sha512-XmolyZzytwEStt49Nrf9m/MEbk5oqEkT0AOE7Ardmav2AmpANZsgMn1QZeBn7qaMN4VAmPtwZJdTyvXaLaX/5w== +"@parcel/packager-ts@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/packager-ts/-/packager-ts-2.0.0-nightly.442.tgz#122e4bfa7a7a40949e8da41ac3494f0bab8fe574" + integrity sha512-dZ7EWTR1mLcRyBtjhN6ilOSIddy5n9TUrP5/YhLZl9dNfwySv0xVI5bz9dg3AWo2oWY8LsPgL/FGrPccvocW+A== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" -"@parcel/plugin@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/plugin/-/plugin-2.0.0-nightly.440.tgz#ec56ea50eda7a243ef553cc2d1cd2c77c5b4954a" - integrity sha512-+3GtynjGoIqtkl83XCy2iZ+HFOb9NOHTKao26jl7HftuGXUObJ4q/t+ODEa6iWc/zgFNZMDOO7v99ngtN+iP9g== +"@parcel/plugin@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/plugin/-/plugin-2.0.0-nightly.442.tgz#05319c57475ab99a2479a2b1ef72a23a2626bb5b" + integrity sha512-M+GUjvLUHS8N0p+hl9QNDaUwbxqlMnBuAo56lEpGhad1+QWVdky4chPfnWTfxzDr4tAEcatJQAcBxLVwBTQrtg== dependencies: - "@parcel/types" "2.0.0-nightly.440+a5e23487" + "@parcel/types" "2.0.0-nightly.442+1572e394" -"@parcel/reporter-bundle-analyzer@2.0.0-nightly.2062+a5e23487": - version "2.0.0-nightly.2062" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.0.0-nightly.2062.tgz#2377d3110c8434032290972bca01c254355b7dd4" - integrity sha512-euvJsCP4hykNmx6Re1SKTMKcmkuNLCjN+pdbPU8BDriqo1+6zZguvfBrfUPAirQlfs9sfgPekSI3E26fUHqg7g== +"@parcel/reporter-bundle-analyzer@2.0.0-nightly.2064+1572e394": + version "2.0.0-nightly.2064" + resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.0.0-nightly.2064.tgz#657f8f1af9489cac19f086d8ee62918a74f365ea" + integrity sha512-Rz7/BqlucCiuyopX9Sd2yByGMzp29EIyGIJqQgJJpA6VqwFkAvkBjqU3PmnB382JNbCiwGAbBBFJ/nH1z1uQyg== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.442+1572e394" nullthrows "^1.1.1" -"@parcel/reporter-bundle-buddy@2.0.0-nightly.2062+a5e23487": - version "2.0.0-nightly.2062" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-buddy/-/reporter-bundle-buddy-2.0.0-nightly.2062.tgz#7ec94b12594f475053a2b194f3ef06d24b71059f" - integrity sha512-1R8tC+xYAglYrzrP9lLwt0gcCJCTnGs6Aq3LRBjAAQaTRe5Skvp/PgAx0SjijxbTsfNwU8GrXgvFT3a2CtMH+g== +"@parcel/reporter-bundle-buddy@2.0.0-nightly.2064+1572e394": + version "2.0.0-nightly.2064" + resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-buddy/-/reporter-bundle-buddy-2.0.0-nightly.2064.tgz#2e50d6698338cf82521a4386119046eed58c6bc0" + integrity sha512-hhwsUQsEfdP9hKcX2GM78lxJXvgKJuHwpV1aCLmoGQINZBvOo1STrn+fGaaFTbv/maOyf2f/cato3xP8H0X8oA== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" -"@parcel/reporter-cli@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/reporter-cli/-/reporter-cli-2.0.0-nightly.440.tgz#9cff5dd88351936b24e6fcdfa6743318137b7544" - integrity sha512-xOblD0sz4ZmDPMtYW7nyfbJMCbo4CBWNdan6F2Gdntq8QDQdgvpxDzThzhk/tYe8VvRb3L0I7NiC/gJCmwdewA== +"@parcel/reporter-cli@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/reporter-cli/-/reporter-cli-2.0.0-nightly.442.tgz#285a5bc0a550f4b5a01baf85d3b0d15950fe00a3" + integrity sha512-SwPs2eRSHNxbWZykfUiBlZS9XjCgYPizCg/rKJXX3/PUuAcngrSVR1AQxKYhFkF5UCaanHcz6p3gXTVXPEDCiw== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" - "@parcel/types" "2.0.0-nightly.440+a5e23487" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/types" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.442+1572e394" chalk "^3.0.0" filesize "^3.6.0" nullthrows "^1.1.1" @@ -2560,13 +2560,13 @@ strip-ansi "^6.0.0" term-size "^2.1.1" -"@parcel/reporter-dev-server@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/reporter-dev-server/-/reporter-dev-server-2.0.0-nightly.440.tgz#ff32fb950a185c596e166c0e0b4e7c3cd3d5bb48" - integrity sha512-dq3IUKeQVtgvPQkY7XyyYFF0rP+z+yQD9Esti4agTQTDnwKFj9NpFiKPCogC4jUkCX6g/sPA6pWgBNYp+nxSbg== +"@parcel/reporter-dev-server@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/reporter-dev-server/-/reporter-dev-server-2.0.0-nightly.442.tgz#39d92de590341d499743d568b1db60586b13a57f" + integrity sha512-JZK3Z7XoCktFhBMGjFn0EVQF3mjH0r8tZUTHgolENaqN2Wa7HFaA48kLYCnTo63clNRSMHzh8iBOF4UtcWh0qQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.442+1572e394" connect "^3.7.0" ejs "^2.6.1" http-proxy-middleware "^1.0.0" @@ -2574,54 +2574,54 @@ serve-handler "^6.0.0" ws "^6.2.0" -"@parcel/resolver-default@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/resolver-default/-/resolver-default-2.0.0-nightly.440.tgz#0ff18d91f4fd981d03f00ecf90bebd6c6df24934" - integrity sha512-a/6mnGlvP7fbFeadz+/4RvUIQ7xx57eDPv0cEvYTMjNtYEJen6yurOMmHFRTT2ODF8a5begDMjyMgmseuAvFRA== +"@parcel/resolver-default@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/resolver-default/-/resolver-default-2.0.0-nightly.442.tgz#be927df2b47972a324f60c4b58edcf4f7252d6b2" + integrity sha512-AhhA/9uU1qJTu2F9SmpL6DsSCMHBxy4DVVEfvBBDrHB2VPgsBGt50/IwnuEfUFGY862QNnTFOI2CFIKUdvuYVg== dependencies: - "@parcel/node-resolver-core" "2.0.0-nightly.2062+a5e23487" - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/node-resolver-core" "2.0.0-nightly.2064+1572e394" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" -"@parcel/runtime-browser-hmr@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.0.0-nightly.440.tgz#f1786fdd958d92933b39a79760adf2398615d1fe" - integrity sha512-i6q4KRU77AUfQnujdRluEemPaHdyf0vQjFjV8lWx4ETuFJZPF02tbHuAA+EWu6OdFk1jXYSW9H4SoYatFC3zEw== +"@parcel/runtime-browser-hmr@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.0.0-nightly.442.tgz#ec5c430037f370b6f351e9078e8df1c596b45a85" + integrity sha512-DLbeGNRZo0HDgyZq6JycfF/GIA/J1w3oA3hGr13fvuryfhdKng3mRxj9Tjqd+2Y3m1ZDJ4DaA8QQMVklbOMmaQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.442+1572e394" -"@parcel/runtime-js@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/runtime-js/-/runtime-js-2.0.0-nightly.440.tgz#a0f141f3cfc4dcc529a9f029200395116ca66790" - integrity sha512-ZFULRKR+So/n+AwCKX1sTJm2exZ9VfZh9ZGQ0hnzJuRlrwDTVlegVeZ/Z+O1TtBGpJMwrK+oaS+sf1clDePIvg== +"@parcel/runtime-js@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/runtime-js/-/runtime-js-2.0.0-nightly.442.tgz#fe40d6528eb1613c48131cefa460c63e7080bfcc" + integrity sha512-upSaL1u/vFnp5YhUR3MAqf+LaPGsUziGTAV+zl+XgDFPemYYGsjO2NwlTkaVbjXy3Q2V3x0LNBdStsCUFycqdg== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.442+1572e394" nullthrows "^1.1.1" -"@parcel/runtime-react-refresh@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.0.0-nightly.440.tgz#4a9f43dda44b8084ea0bcb4a28d78c99e3c4ac2d" - integrity sha512-SVzyhPdj6qc4CXLHCxLD/eI2Hg6NEv0M90E3rYz6dr1flA9XMlknaSMABHJ/53xAlyHHBnawMr28OoKkyc3GDA== +"@parcel/runtime-react-refresh@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.0.0-nightly.442.tgz#83d9e1dc91203c923977d8a1b7b817570720ca22" + integrity sha512-aqE6C1/748MEwm8pVX+6+wVhxlWlmCYFLedmIktGPcIdzY7LgV9WmakwutfDofp/9n3nvuWNOeNcE6F6FNe9kA== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" react-refresh "^0.6.0" -"@parcel/scope-hoisting@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/scope-hoisting/-/scope-hoisting-2.0.0-nightly.440.tgz#4a0c48c460d592bc1bfff6c17546a8ea732a13fd" - integrity sha512-GC+OLI/aLNxFINw2Dp/laTx1qKsIrBCP7i2IRjne3iuUTrqF8sGCnm6zFM/SJjVGOH9Ayu3i35aPo8wZl/IOqA== +"@parcel/scope-hoisting@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/scope-hoisting/-/scope-hoisting-2.0.0-nightly.442.tgz#8f9c0cbf74e215ef6677bb4342724bac8c081d3e" + integrity sha512-4pXgdvhvLdfGsbIi3emDFDhAb///1rNbESQHIqRixckz01u3Pzp8YzHH2UGk0CAat7TizZ6eFCLTiUmVNhLSpQ== dependencies: "@babel/generator" "^7.3.3" "@babel/parser" "^7.0.0" "@babel/template" "^7.4.0" "@babel/traverse" "^7.2.3" "@babel/types" "^7.3.3" - "@parcel/babel-ast-utils" "2.0.0-nightly.2062+a5e23487" - "@parcel/babylon-walk" "2.0.0-nightly.2062+a5e23487" - "@parcel/diagnostic" "2.0.0-nightly.440+a5e23487" + "@parcel/babel-ast-utils" "2.0.0-nightly.2064+1572e394" + "@parcel/babylon-walk" "2.0.0-nightly.2064+1572e394" + "@parcel/diagnostic" "2.0.0-nightly.442+1572e394" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.442+1572e394" nullthrows "^1.1.1" "@parcel/source-map@2.0.0-alpha.4.16": @@ -2632,10 +2632,10 @@ node-addon-api "^3.0.0" node-gyp-build "^4.2.2" -"@parcel/transformer-babel@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/transformer-babel/-/transformer-babel-2.0.0-nightly.440.tgz#a437e7b153800ab1daea29c9b3335abf535341bf" - integrity sha512-NhS172zvaCROhPHk8jmAlmyBN7nuPPkGwbCx6SfDdl1+ZaDbbtDQlwDwpzrEdQRHCjoZ8va4IyM9CltT3K8S7Q== +"@parcel/transformer-babel@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/transformer-babel/-/transformer-babel-2.0.0-nightly.442.tgz#507c988007e113beff91e326b19d76ce7db53637" + integrity sha512-s8qJ9gjb80IVok0kZDVBJ3OdQB4t0acGDU0FvUS0dom5QH4mDrdx9H4pLCyvQUhagRgG4obR3zxOM8F4btpusw== dependencies: "@babel/core" "^7.0.0" "@babel/generator" "^7.0.0" @@ -2645,85 +2645,85 @@ "@babel/preset-env" "^7.0.0" "@babel/preset-react" "^7.0.0" "@babel/traverse" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2062+a5e23487" - "@parcel/babel-preset-env" "2.0.0-nightly.440+a5e23487" - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/babel-ast-utils" "2.0.0-nightly.2064+1572e394" + "@parcel/babel-preset-env" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.442+1572e394" browserslist "^4.6.6" core-js "^3.2.1" nullthrows "^1.1.1" semver "^5.7.0" -"@parcel/transformer-coffeescript@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/transformer-coffeescript/-/transformer-coffeescript-2.0.0-nightly.440.tgz#e88e53ee0d59a84db241ab4c0b6f4e776d3990aa" - integrity sha512-narQTJm1hMFKfc8R+JXtEsVl+L3OgcywfjAFXrzNe/S25j9RDLXiF1ZTRNzvbxvYdhUkMq+V2+SNuOjcuWk3Qw== +"@parcel/transformer-coffeescript@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/transformer-coffeescript/-/transformer-coffeescript-2.0.0-nightly.442.tgz#d6f7c968bbc2a77ecd6aa0dfd2d475080d1087da" + integrity sha512-3IFOCbmLIaGOYF6ZAYKC/1uN/fklais7kSPJQdMWCaB7w0Xz55nuGkCqOIPfnzOjb0cQRXRRoZ5yDjaMV6oveA== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.442+1572e394" coffeescript "^2.0.3" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-css@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/transformer-css/-/transformer-css-2.0.0-nightly.440.tgz#5f655d41b4a70ea1cbd0b71fb559964993165ca7" - integrity sha512-0L3TS0AnW2mkBtXa+63jb/n6h7HLzEizJ+hCoiGwCbFe7mCU6qVSJIaRPyrUHlJmsFkoSVVBxNHSKTiqPfywSg== +"@parcel/transformer-css@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/transformer-css/-/transformer-css-2.0.0-nightly.442.tgz#ad73fa845488d394fd598351f06e7bc23c99b9aa" + integrity sha512-KyGcfQFlBJ52ziqprWim42NdLiFHvg8F20vq34eSo3Yc/fhAP2wsswEOAk1G2SB7yVsoqE6drmNUyno6eVi+QQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.442+1572e394" postcss "^8.0.5" postcss-value-parser "^4.1.0" semver "^5.4.1" -"@parcel/transformer-glsl@2.0.0-nightly.2062+a5e23487": - version "2.0.0-nightly.2062" - resolved "https://registry.yarnpkg.com/@parcel/transformer-glsl/-/transformer-glsl-2.0.0-nightly.2062.tgz#8f11885359facf2242b1b7166b76d1477815dcbf" - integrity sha512-52FWirL/F1fCC7rvgMKhs7N0O/Um3AEFX87dXQvCJ2oYPkUj0fplt5KJWY9VN8wF196goNJdpQ8OqcybCpPzOA== +"@parcel/transformer-glsl@2.0.0-nightly.2064+1572e394": + version "2.0.0-nightly.2064" + resolved "https://registry.yarnpkg.com/@parcel/transformer-glsl/-/transformer-glsl-2.0.0-nightly.2064.tgz#89fbc3763142a05b0776955a26254f0544972fa7" + integrity sha512-WGdsft6k7J0GZWgmCK7Fwox8AnK94JFk4dMibq48CdwQTjh2oDQPKdz1ChGM9HEQ0TQGK7BkHsd5SgOv9qx8mw== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.442+1572e394" -"@parcel/transformer-graphql@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/transformer-graphql/-/transformer-graphql-2.0.0-nightly.440.tgz#03784310a8aecb738c7a9929169c1f2991158335" - integrity sha512-dIZzR/cF+w6Lb3LU8Ew3ksmJv03uzxUWV7o4F4RvpCPQtKXUY0SxilPnfkSfIEtpBWGK87ajgOt8nLRZwkOvKQ== +"@parcel/transformer-graphql@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/transformer-graphql/-/transformer-graphql-2.0.0-nightly.442.tgz#cd47c682e379b958b9b31db0fb48daa471cb1c57" + integrity sha512-m/cfu86fbzCM2Ia+bZSZ0LWUb0IlYbR+FXtyvR28U2vSOfj7N9L1f1kWCAkwInK0TMcWBJMHZ95apjMjvssn+g== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" -"@parcel/transformer-html@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/transformer-html/-/transformer-html-2.0.0-nightly.440.tgz#223b0f5bb24ade59f636a2f57da16f8b1da7549f" - integrity sha512-UI7DmN5NIItasrg2v2Jyxx5HDTA4AmxJqFI232KBOUQmso6HJNF8Fjzmb3T8v2ETujjKzTWhZXOpnlHCP+Ok7w== +"@parcel/transformer-html@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/transformer-html/-/transformer-html-2.0.0-nightly.442.tgz#2b3109d0f14d52d2144552a638a0f16c39f269d6" + integrity sha512-iyEH+aefIwd1XMEH81gy3xo0+bcApFIUBe6sVCvII8xBdnUjeahy/0Y/4basAkOLV5V0rhUYiF0ZoKRraQRYDw== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.442+1572e394" nullthrows "^1.1.1" posthtml "^0.11.3" posthtml-parser "^0.4.1" posthtml-render "^1.1.5" semver "^5.4.1" -"@parcel/transformer-image@2.0.0-nightly.2062+a5e23487": - version "2.0.0-nightly.2062" - resolved "https://registry.yarnpkg.com/@parcel/transformer-image/-/transformer-image-2.0.0-nightly.2062.tgz#722150c5669e7828645e486299fab5fc2325db40" - integrity sha512-ZCow9ILc369itY1Y6dh4ghXv3jHL5HBC76wsc/e0wGOtmPT9vPoiol6WpfX2B3B5QMF8tDl9oK3ss7iaPyCoeA== +"@parcel/transformer-image@2.0.0-nightly.2064+1572e394": + version "2.0.0-nightly.2064" + resolved "https://registry.yarnpkg.com/@parcel/transformer-image/-/transformer-image-2.0.0-nightly.2064.tgz#5a83373d57a9a9abf88a5b930b1f616c62f3b326" + integrity sha512-tNg4jYnbIhWyE2LEDPr+JAN/vZsG1wQp++NBQdNB0sjAKbanF11MjqR6qr6ivE4Gs4GVZGOWl3wRpnrKFcBY9Q== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" -"@parcel/transformer-inline-string@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.0.0-nightly.440.tgz#6b7e8ec3080fd7946d12a63178677d6c88dab127" - integrity sha512-dcPTHtFfrtP5i8f4T/wg9ABzPgR848yx0M1SpDnCWPMKcwCrBVPr9cGqxACGeOJs4Ul1sVfsG7SvhH/G0RQfVw== +"@parcel/transformer-inline-string@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.0.0-nightly.442.tgz#4ecc0d10b80b331b6d78402ac00e1314658dc200" + integrity sha512-wuf+qaFB9mBH6b9GrRhuWnkZBxbEUWaBzvJTFtyCTNCD8Hn/2+K/t/yT2w5oFwMvB1crE5pKIsveZS4jt0KJIA== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" -"@parcel/transformer-js@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.0.0-nightly.440.tgz#147b2371f3a94c6db1fed164e5836a85127f2f4c" - integrity sha512-ofpSlc3ab8ymJ0P7rC527Vda7c11QhYWDydmuhXfsQqybJ8MR58tUfG3Kt6krt3UUglIRsio/X54/ZOJ0CuyYw== +"@parcel/transformer-js@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.0.0-nightly.442.tgz#b27821bade3aa46b58918919137c40b868342535" + integrity sha512-7MzCqYhhwSWPi15aKIWgUCCqomDk7yPq1tEphFGEh7qGklJ0szfwvZxFSgu5zY48eVrsewleu41gtsJ4B7MUHQ== dependencies: "@babel/core" "^7.0.0" "@babel/generator" "^7.0.0" @@ -2732,193 +2732,193 @@ "@babel/template" "^7.4.0" "@babel/traverse" "^7.0.0" "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2062+a5e23487" - "@parcel/babylon-walk" "2.0.0-nightly.2062+a5e23487" - "@parcel/diagnostic" "2.0.0-nightly.440+a5e23487" - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" - "@parcel/scope-hoisting" "2.0.0-nightly.440+a5e23487" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/babel-ast-utils" "2.0.0-nightly.2064+1572e394" + "@parcel/babylon-walk" "2.0.0-nightly.2064+1572e394" + "@parcel/diagnostic" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/scope-hoisting" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.442+1572e394" micromatch "^4.0.2" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-json@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/transformer-json/-/transformer-json-2.0.0-nightly.440.tgz#933ffd167e43d16bb828a11d3cca8f8f97f8c084" - integrity sha512-h9+LLqy/IKG1Xb8pcF6pAVRiwQfQ8S6nNvoVQI2ksXftYfmJLMY62swy3jxe2jX1oumR5TEs7oQYB32w3hQJQg== +"@parcel/transformer-json@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/transformer-json/-/transformer-json-2.0.0-nightly.442.tgz#098b35cf4384b3b16243ba5d3b0624a33d52c314" + integrity sha512-CCz1SNAkMFSrl1ydOibkVjH4jZ1wyz1ZLGjRkOXKtejJqjvlTPd6w/IPhl+uBbhxFmkc1Y3wNSc0xeYjZ8mTtg== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" json5 "^2.1.0" -"@parcel/transformer-jsonld@2.0.0-nightly.2062+a5e23487": - version "2.0.0-nightly.2062" - resolved "https://registry.yarnpkg.com/@parcel/transformer-jsonld/-/transformer-jsonld-2.0.0-nightly.2062.tgz#f9a099541e5395dc70a353b4f5401478fc25c23d" - integrity sha512-PlFxPPuo65bkji6PNa3xwSbURvnD4eOuWemyN8tHfnK5A/AprdYgOscC4/NspxiQATQshVwq9DDQ4aAQEZCd0w== +"@parcel/transformer-jsonld@2.0.0-nightly.2064+1572e394": + version "2.0.0-nightly.2064" + resolved "https://registry.yarnpkg.com/@parcel/transformer-jsonld/-/transformer-jsonld-2.0.0-nightly.2064.tgz#208adcadc278c7c8d350e518585909abdbe40fdb" + integrity sha512-TIqQ42ng4RIZmgmDsXfTzepUmZ0fz71SZl5MaeLh7PVkhBkUYwshQyv33EaCkELVNPArkCu3nPOgmZPHZFtDDA== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" - "@parcel/types" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/types" "2.0.0-nightly.442+1572e394" json5 "^2.1.2" -"@parcel/transformer-less@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/transformer-less/-/transformer-less-2.0.0-nightly.440.tgz#2bfb6d1c4099c2e022565778d62178bfa3954fc2" - integrity sha512-2HPCT1uyvMLBvYq+YQJrQ6iLaceDOYzr+nuzyyXg4eThvDKU1T9QvW+3qSKCsdGy+C7Tuj0g2m2LIQChwMjjeQ== +"@parcel/transformer-less@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/transformer-less/-/transformer-less-2.0.0-nightly.442.tgz#41438b256d435a7b862ef13d602f68cf463cdc92" + integrity sha512-dsLMQt6lJ761dqHXPY3Ac9w+LUhgdhMCy/FNFsIxJRfDmtTuu3XFwDtvX698Q4RrmXbA+SljS2XD9xs3Dc927g== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" "@parcel/source-map" "2.0.0-alpha.4.16" -"@parcel/transformer-mdx@2.0.0-nightly.2062+a5e23487": - version "2.0.0-nightly.2062" - resolved "https://registry.yarnpkg.com/@parcel/transformer-mdx/-/transformer-mdx-2.0.0-nightly.2062.tgz#7b7f56c0feb5ed4cefc3fdd61d8b6f77786ff249" - integrity sha512-iJERfvegil8HBiLcAatMRpFh6U/eciuul2wjQPhQcRt9L2njtLY6RwDOeJPXqx8vdZ0TQpV6xmv5MwRXsZ/+xA== +"@parcel/transformer-mdx@2.0.0-nightly.2064+1572e394": + version "2.0.0-nightly.2064" + resolved "https://registry.yarnpkg.com/@parcel/transformer-mdx/-/transformer-mdx-2.0.0-nightly.2064.tgz#f26235a9b3a0fb1970eaadd15492ec96d154220f" + integrity sha512-UBw0ECZWl9pQzo5Hfkb2PMmuI29+D/PzpWU0JtTTinEXFziIBGZTrPEeSzxueGdW9j3z64JHgBfVCwsjoEineA== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" -"@parcel/transformer-postcss@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/transformer-postcss/-/transformer-postcss-2.0.0-nightly.440.tgz#6aedb45b121ec15059850d4de71868548ebd6b98" - integrity sha512-+DzWXPrB7b4wIwGT5TMeMIg7IKP+OToV+6SvW6XE5SW43NFGvGl2RQ9vKozVHfxMODHrCkP2VRgHGqO2lCEV3w== +"@parcel/transformer-postcss@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/transformer-postcss/-/transformer-postcss-2.0.0-nightly.442.tgz#1e412363f7f64760342cb73a97a22018ece12faf" + integrity sha512-Mb62rmbQpVlv9vOrTawu/YvcSaqlng5DSiMaoxg+MvL2KpRpEqScQ3B5gA91QiEOAkfV6KkmZdBw7xttHipteg== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.442+1572e394" css-modules-loader-core "^1.1.0" nullthrows "^1.1.1" postcss-value-parser "^4.1.0" semver "^5.4.1" -"@parcel/transformer-posthtml@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/transformer-posthtml/-/transformer-posthtml-2.0.0-nightly.440.tgz#e6a5d16599670abb26008e25310305a46975d785" - integrity sha512-8AzRmxae2YeZBb7G8eGUun4gohS2pfKrDBOkAgby1CGz9H2n/2ux+ETKb212QD6vD06ekfDf0lxMrO4Ngu42lg== +"@parcel/transformer-posthtml@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/transformer-posthtml/-/transformer-posthtml-2.0.0-nightly.442.tgz#2428c7b950c9bf9969c511f059f43a8ce349ab74" + integrity sha512-besL6BiRMgecQTItV+G4xdGKJEpdYYHpMzR33JGwOXYdHM3rNc3iUIplkc6IwpTjcejYGxAMbm+UlqgXyVFWCw== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" nullthrows "^1.1.1" posthtml "^0.11.3" posthtml-parser "^0.4.1" posthtml-render "^1.1.5" semver "^5.4.1" -"@parcel/transformer-pug@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/transformer-pug/-/transformer-pug-2.0.0-nightly.440.tgz#dc22bac479e5eb46fe440ab63ad654f0f84a4686" - integrity sha512-q+fOQG3FhBP2r3oRvUicarZEVsqLGUQZj7BB/Ouu+El3Pv8/Da+qBqA+YRZcAgemXy+Z+coxWYFsND61T2eZ2Q== +"@parcel/transformer-pug@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/transformer-pug/-/transformer-pug-2.0.0-nightly.442.tgz#4ca4eb6ece1f94963e07d2af9d3e7004073a9b56" + integrity sha512-QobktRWxetiMnPQOtCWb/XxBKhjSQL5ooyGyYUP8etdxH5BWggWyNcsliEKrv5V+LBDHYMRjTJI5a6hTZ3Kgew== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" -"@parcel/transformer-raw@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/transformer-raw/-/transformer-raw-2.0.0-nightly.440.tgz#662f9c80dcf25d9aa3ccd2d16e3a93fff5d7b62b" - integrity sha512-qPpRk6Qa9izCDjtmXDcIcb8p0pNdMygxwQESTHdp/O7YARiB2qMtI7122u7N7cB8+/r+Hsnuqh74kjyLkEvBDQ== +"@parcel/transformer-raw@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/transformer-raw/-/transformer-raw-2.0.0-nightly.442.tgz#75f67ad2791f58231b8c826eeb169d4e832d112d" + integrity sha512-Ve7zA9QdEOG9ikMmkBLB2IcZ2uX8SdpUeAY80Qfz0GynPTYl+fGtfMK8pG4pnmyLDKfvIcWdPbS4ngeLC6h9pA== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" -"@parcel/transformer-react-refresh-babel@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-babel/-/transformer-react-refresh-babel-2.0.0-nightly.440.tgz#5ffaca93d0168e57b3393ac9afcda09069efe236" - integrity sha512-7W4WXPnoU9TxagjNUAO6b7JPVjcyMZbtc8xRY80pfOuLYXircdoVBN1RZn7tXSZjxPNVDbeoehF7Qu/uyCM6vA== +"@parcel/transformer-react-refresh-babel@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-babel/-/transformer-react-refresh-babel-2.0.0-nightly.442.tgz#f56b9d29fe8ae94a25f5ed6ac0ed071ac8b03172" + integrity sha512-b0t774lYoUlFMFPj+dZBXZA67oX/EWseooGGqwidre/C2MTbFnlm3dbcN9Qb62O4VgAjvuNQoP0V/LOm/sT5aA== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" react-refresh "^0.6.0" -"@parcel/transformer-react-refresh-wrap@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.0.0-nightly.440.tgz#87b47b164964bdb4e8ad71ff34d12117ee5c551b" - integrity sha512-BlzhB8shNGuj3pr/EeR30IJT63VE0kZnF/3kEJ1YEmIR2PyraqQdGRGpyde9aG8QliOCDgp+R9hxSfu1KIDTgQ== +"@parcel/transformer-react-refresh-wrap@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.0.0-nightly.442.tgz#d62a6d6a4409aeef5744bcbba67c4017670bc531" + integrity sha512-8zNCM6KkuluDiVyYKdqX4fIzW2ovbLXuKTg7te3DBWZgj1VwJG1neSFaMlmM5b3AvtVTfYHBDUElapTfArfEBw== dependencies: "@babel/generator" "^7.0.0" "@babel/parser" "^7.0.0" "@babel/template" "^7.4.0" "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2062+a5e23487" - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/babel-ast-utils" "2.0.0-nightly.2064+1572e394" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.442+1572e394" react-refresh "^0.6.0" semver "^5.4.1" -"@parcel/transformer-sass@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sass/-/transformer-sass-2.0.0-nightly.440.tgz#11dbf48337189a300b20a1477dfe5525a820f0bb" - integrity sha512-4G9B+ygvmDbUV5VJNlIFBZ5sjXrvccmhv3jiusD7tZHHE2/oI3FjJkbix88cekE+aFH5RnQVcPfRxGExVboNIw== +"@parcel/transformer-sass@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/transformer-sass/-/transformer-sass-2.0.0-nightly.442.tgz#b2b6e68072e3f0673d9c0d6deb812f5cc48231ac" + integrity sha512-KBPPFI0L7ZcoNbyDXytYyE351NC9tTOeAPWTUgw2w7Xu+9OnThAqTAeAiiERxk5iIUe+wGNxCnvqqCxdf5QQmQ== dependencies: - "@parcel/fs" "2.0.0-nightly.440+a5e23487" - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/fs" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.442+1572e394" -"@parcel/transformer-stylus@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/transformer-stylus/-/transformer-stylus-2.0.0-nightly.440.tgz#954323ad2445327363f9d0189a974200fcb4618c" - integrity sha512-MfEL8cbH5ytJ55rlol2UEjsNqko83iD+iR6GSbH0aVceNwhq2iI8T7SGOr8aWtJxcT6F90eLINn/BR/T3Lwmjg== +"@parcel/transformer-stylus@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/transformer-stylus/-/transformer-stylus-2.0.0-nightly.442.tgz#c845ada0b16c3148af1a958981e165beda1f1b25" + integrity sha512-vpnWBEZXvXez8DpL46gOCHMXCheHSA4pwUGDcSA/l1fovLFmrmvCITvnO4CKHn/MmHlwWho2JKqdmgoCmKIrnA== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.442+1572e394" -"@parcel/transformer-sugarss@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sugarss/-/transformer-sugarss-2.0.0-nightly.440.tgz#c74009bc383a5765df5f7eee7496b69509e8a352" - integrity sha512-QljfI2ApR3ebN/G2cVZaTbekAQKQXrr17JXexQhy/BsQaR1wwlh/wWlOKRZBK5/h40hpRfr/cfNmmcJ9ytQ/2g== +"@parcel/transformer-sugarss@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/transformer-sugarss/-/transformer-sugarss-2.0.0-nightly.442.tgz#c3532adaed8b20fbf3df72b63e7cbf50485c9505" + integrity sha512-+dM/QLqREveNdysMhtEixTzlq3zC/5cEOeF3i0EFLtaDh09mxgjiTzzDrgbVkQlxN4B35n1U4+QJe2JTgD5osg== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" postcss "^8.0.5" -"@parcel/transformer-toml@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/transformer-toml/-/transformer-toml-2.0.0-nightly.440.tgz#9cfadcb93c449574f57923a7a43835bb2138a38a" - integrity sha512-xkL3RcUNs2PDuXFQUSN3qHvRmD2YjeoG/XhQnTBzO26ZjrkpqGQuklLXmfYfQMmenYDjnoVtCALGd6enbil17A== +"@parcel/transformer-toml@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/transformer-toml/-/transformer-toml-2.0.0-nightly.442.tgz#800777e75bac8d8207c33964b67bc3641eba7d2b" + integrity sha512-LzC/x/KqDWf4NR+K4XBGagX+Z7N6D8rEN1PoQIA5L53LrAgvp3PyThb87XgzzOQdrguIi0nYvYq+4LV7aKI+TQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" -"@parcel/transformer-typescript-types@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.0.0-nightly.440.tgz#0c2736fc88f3ca16008cf04ce0f2f1f35c9071ba" - integrity sha512-WmfINC+yLPA7/unlyYuxIrIdyQmSHkc3i8Mvib3GjCkllZv8sv5USzADV6FdXnH24N8kS/g0vyD+cquXLGiSpg== +"@parcel/transformer-typescript-types@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.0.0-nightly.442.tgz#5fed91e892bf419b9b580391d1b441a3588840fc" + integrity sha512-NsDDX2b0YFWYJWj8T9VXx4VKDJPNZ86UdW6rbZu6FlmPGwKSmQdgh7P8l/FZmISf3zdx5lnF5/daJ5UwP9aW1A== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/ts-utils" "2.0.0-nightly.440+a5e23487" + "@parcel/ts-utils" "2.0.0-nightly.442+1572e394" nullthrows "^1.1.1" -"@parcel/transformer-vue@2.0.0-nightly.2062+a5e23487": - version "2.0.0-nightly.2062" - resolved "https://registry.yarnpkg.com/@parcel/transformer-vue/-/transformer-vue-2.0.0-nightly.2062.tgz#2d81f4b55e7048387dc07317f1aa55178f48fe6c" - integrity sha512-munBdg0a+6mUKkKkRg5gQXGfLUbweIZRW9GuZlJ2cY3VfRgtv5ry3924POr4ISS9d5rS4fcc91s4zKcsgf68Qg== +"@parcel/transformer-vue@2.0.0-nightly.2064+1572e394": + version "2.0.0-nightly.2064" + resolved "https://registry.yarnpkg.com/@parcel/transformer-vue/-/transformer-vue-2.0.0-nightly.2064.tgz#61af60c8e19a2232821ef205c132037130420d75" + integrity sha512-NKjVB6VCsNF3Mw3kJQ80rb/rk+/xDuS3aTKoWhicFfgaIFfLK9dtOUnI0TL+/2iUAYletRIPMHLqVlE8nm7P8w== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.440+a5e23487" - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/diagnostic" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/utils" "2.0.0-nightly.442+1572e394" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-yaml@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/transformer-yaml/-/transformer-yaml-2.0.0-nightly.440.tgz#5595e05d437a0f0da427a056640d829f02bf8119" - integrity sha512-wlQTG8BVdWLpOXmrNs0rtI4DH3TVlU4jYPs/FNVyewieIPJeMSNMzFbbqyZo7H1kS4rsOar8Zs16n6hhI94Uug== +"@parcel/transformer-yaml@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/transformer-yaml/-/transformer-yaml-2.0.0-nightly.442.tgz#2417ba8a8d46c78d01668ee7d11ad057ec558612" + integrity sha512-tOsegT+6qnE50nY2EHmqt2E1VwFSTYNf7VpdDTafK/224GA7OUelInkG7uGnFlXZAbZtnslomX1bw9r3+qfRCg== dependencies: - "@parcel/plugin" "2.0.0-nightly.440+a5e23487" + "@parcel/plugin" "2.0.0-nightly.442+1572e394" -"@parcel/ts-utils@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/ts-utils/-/ts-utils-2.0.0-nightly.440.tgz#abfd9ea86cafc209b919142f57d9f435170a3721" - integrity sha512-8fgEwSMdZncLLmqQ46pBkATp0E1tZUOT/uNcpUd1l2ziCW5FLalpvs3EallnvnxmD1rX/ZmJdKVhqk1kg4gngw== +"@parcel/ts-utils@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/ts-utils/-/ts-utils-2.0.0-nightly.442.tgz#caa0462775131ce5d9d013f16c289e9cb4a59a68" + integrity sha512-4zSsKDpDf/n+uUY/54szK0FBVoizW20PSxyWhar8RoY6EcVnbPt95O5KyWHiRVyZdJePs9IdS3t3t3dy/wv+ow== dependencies: nullthrows "^1.1.1" -"@parcel/types@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/types/-/types-2.0.0-nightly.440.tgz#122fe1eb81741f18710e4622cbbd24316be634e4" - integrity sha512-kzKcR0uOerd9w70bt8oq5i+gK7aJ1uA+TFesvGpNO6657HQxGJ94tGWTCFw6deSjG+6+z6movXEL+FCzEyR77A== +"@parcel/types@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/types/-/types-2.0.0-nightly.442.tgz#2ed42698635a3a87d52479fd9bccf96cc62c57e9" + integrity sha512-kDKBQ1ulrp5f48WU1sdBQvLlXNJEbm3AnkkL/GQ7WUN/YlK8Qumg/mRX5iOxYIqf76RDExlg2lJDsYKIp8/PxQ== -"@parcel/utils@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-2.0.0-nightly.440.tgz#34b549e565460eaddc90174728d27c9959b4f402" - integrity sha512-VKPXrPmzggVNCmwICs9FCBdMSeB0vfJRZNNrzyDhYBA4wkTNFGui8GFdVFI8a3zVgit9LxqxMeNOQ18d1nNbMw== +"@parcel/utils@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-2.0.0-nightly.442.tgz#cc218c88463c20bb2cabea16a2f368a7607384d4" + integrity sha512-3i/Ccejeh+TnQ9h8EEg4lX6iBD8Vz/gu+iqKE/hYrIUs+fwZ6aM3EJM0JFPSH0yEOf2iWXB+dvDkI+UpAHMe1A== dependencies: "@iarna/toml" "^2.2.0" - "@parcel/codeframe" "2.0.0-nightly.440+a5e23487" - "@parcel/diagnostic" "2.0.0-nightly.440+a5e23487" - "@parcel/logger" "2.0.0-nightly.440+a5e23487" - "@parcel/markdown-ansi" "2.0.0-nightly.440+a5e23487" + "@parcel/codeframe" "2.0.0-nightly.442+1572e394" + "@parcel/diagnostic" "2.0.0-nightly.442+1572e394" + "@parcel/logger" "2.0.0-nightly.442+1572e394" + "@parcel/markdown-ansi" "2.0.0-nightly.442+1572e394" "@parcel/source-map" "2.0.0-alpha.4.16" ansi-html "^0.0.7" chalk "^2.4.2" @@ -2943,14 +2943,14 @@ node-addon-api "^3.0.0" node-gyp-build "^4.2.1" -"@parcel/workers@2.0.0-nightly.440+a5e23487": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-2.0.0-nightly.440.tgz#dac36d9ba2f18c632c56e8271d878048fd3b955d" - integrity sha512-DvuB8TZXsYJ7hOpKxTnzeV/kWTnvo1wjJEPboOzfzfIl4seZjr6gVHC70T+06Aip1MnxUBVFPtHLsZkYN8AIjg== +"@parcel/workers@2.0.0-nightly.442+1572e394": + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-2.0.0-nightly.442.tgz#298e779e1b06f039ea88f736df4ace3644efa891" + integrity sha512-MAs2BoI0KWPPrC12muImB8jEhcgn+PdFizBlUPam6SxUPjgSkJu7c91Yzb4aMsGOIMU4PK+YNgJptEM6e4fq8g== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.440+a5e23487" - "@parcel/logger" "2.0.0-nightly.440+a5e23487" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" + "@parcel/diagnostic" "2.0.0-nightly.442+1572e394" + "@parcel/logger" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.442+1572e394" chrome-trace-event "^1.0.2" nullthrows "^1.1.1" @@ -10600,19 +10600,19 @@ parallel-transform@^1.1.0: inherits "^2.0.3" readable-stream "^2.1.5" -parcel@2.0.0-nightly.438: - version "2.0.0-nightly.438" - resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.0.0-nightly.438.tgz#0a0b1c818a4227aa40bcdf2f8262abd6e883b2ef" - integrity sha512-m21vpFeKibMX+ssXsAWQnkqgfMd0yeJhFGd03SyaM7oJEk8+lGwI4ibAuYISLh0M6FzBvVzQaFIe0m5Xz1yfvA== - dependencies: - "@parcel/config-default" "2.0.0-nightly.440+a5e23487" - "@parcel/core" "2.0.0-nightly.438+a5e23487" - "@parcel/diagnostic" "2.0.0-nightly.440+a5e23487" - "@parcel/events" "2.0.0-nightly.440+a5e23487" - "@parcel/fs" "2.0.0-nightly.440+a5e23487" - "@parcel/logger" "2.0.0-nightly.440+a5e23487" - "@parcel/package-manager" "2.0.0-nightly.440+a5e23487" - "@parcel/utils" "2.0.0-nightly.440+a5e23487" +parcel@2.0.0-nightly.440: + version "2.0.0-nightly.440" + resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.0.0-nightly.440.tgz#88d8dbca07eba9e6caa2b116d9efc122adae8f2c" + integrity sha512-Er2a5LqSQbK1AnA1z4bUoj3PuelzFDFiMMc8y0pQdCXp/38wwnAFndn3v8qEZ6FiKaVKQAlHG43sbMoKrysUNg== + dependencies: + "@parcel/config-default" "2.0.0-nightly.442+1572e394" + "@parcel/core" "2.0.0-nightly.440+1572e394" + "@parcel/diagnostic" "2.0.0-nightly.442+1572e394" + "@parcel/events" "2.0.0-nightly.442+1572e394" + "@parcel/fs" "2.0.0-nightly.442+1572e394" + "@parcel/logger" "2.0.0-nightly.442+1572e394" + "@parcel/package-manager" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.442+1572e394" chalk "^2.1.0" commander "^2.19.0" get-port "^4.2.0" @@ -12030,7 +12030,7 @@ rimraf@^2.5.4, rimraf@^2.6.2, rimraf@^2.6.3: dependencies: glob "^7.1.3" -rimraf@^3.0.0: +rimraf@^3.0.0, rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== From 0a3e980cb880ee546d0840281aa9e2a781d7412b Mon Sep 17 00:00:00 2001 From: Dominic Fezzie Date: Fri, 6 Nov 2020 17:19:11 -0800 Subject: [PATCH 074/314] feat(appmesh): change VirtualRouter's Listener to a union-like class (#11277) Follows the pattern set in https://github.com/aws/aws-cdk/pull/10879 and transitions the VirtualRouter listener to use protocol specific listeners. BREAKING CHANGE: VirtualRouter's Listeners are no longer a struct; use the static factory methods of the `VirtualNodeListener` class to obtain instances of them * **appmesh:** VirtualRouter accepts a list of listeners instead of a single listener ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../lib/extensions/appmesh.ts | 18 ++-- packages/@aws-cdk/aws-appmesh/README.md | 30 +++---- packages/@aws-cdk/aws-appmesh/lib/index.ts | 1 + .../lib/virtual-router-listener.ts | 82 +++++++++++++++++++ .../aws-appmesh/lib/virtual-router.ts | 27 ++---- .../@aws-cdk/aws-appmesh/test/integ.mesh.ts | 9 +- .../@aws-cdk/aws-appmesh/test/test.mesh.ts | 27 ++---- .../aws-appmesh/test/test.virtual-router.ts | 82 +++++++++++++++++++ 8 files changed, 209 insertions(+), 67 deletions(-) create mode 100644 packages/@aws-cdk/aws-appmesh/lib/virtual-router-listener.ts diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts index 0ca41490969d8..583ca06435c09 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts +++ b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts @@ -276,12 +276,9 @@ export class AppMeshExtension extends ServiceExtension { // and other similar behaviors. this.virtualRouter = new appmesh.VirtualRouter(this.scope, `${this.parentService.id}-virtual-router`, { mesh: this.mesh, - listener: { - portMapping: { - port: containerextension.trafficPort, - protocol: this.protocol, - }, - }, + listeners: [ + this.virtualRouterListener(containerextension.trafficPort), + ], virtualRouterName: `${this.parentService.id}`, }); @@ -331,4 +328,13 @@ export class AppMeshExtension extends ServiceExtension { // nodes from the other service. this.virtualNode.addBackends(otherAppMesh.virtualService); } + + private virtualRouterListener(port: number): appmesh.VirtualRouterListener { + switch (this.protocol) { + case appmesh.Protocol.HTTP: return appmesh.VirtualRouterListener.http(port); + case appmesh.Protocol.HTTP2: return appmesh.VirtualRouterListener.http2(port); + case appmesh.Protocol.GRPC: return appmesh.VirtualRouterListener.grpc(port); + case appmesh.Protocol.TCP: return appmesh.VirtualRouterListener.tcp(port); + } + } } diff --git a/packages/@aws-cdk/aws-appmesh/README.md b/packages/@aws-cdk/aws-appmesh/README.md index 00d70bd8b0888..9c0a4b7f1da2e 100644 --- a/packages/@aws-cdk/aws-appmesh/README.md +++ b/packages/@aws-cdk/aws-appmesh/README.md @@ -53,22 +53,21 @@ const mesh = new Mesh(stack, 'AppMesh', { ## Adding VirtualRouters -The `Mesh` needs `VirtualRouters` as logical units to route to `VirtualNodes`. +The _Mesh_ needs _VirtualRouters_ as logical units to route requests to _VirtualNodes_. -Virtual routers handle traffic for one or more virtual services within your mesh. After you create a virtual router, you can create and associate routes for your virtual router that direct incoming requests to different virtual nodes. +Virtual routers handle traffic for one or more virtual services within your mesh. +After you create a virtual router, you can create and associate routes to your virtual router that direct incoming requests to different virtual nodes. ```typescript const router = mesh.addVirtualRouter('router', { - listener: { - portMapping: { - port: 8081, - protocol: Protocol.HTTP, - } - } + listeners: [ appmesh.VirtualRouterListener.http(8080) ], }); ``` -The router can also be created using the constructor and passing in the mesh instead of calling the addVirtualRouter() method for the mesh. +The router can also be created using the constructor and passing in the mesh instead of calling the `addVirtualRouter()` method for the mesh. +The same pattern applies to all constructs within the appmesh library, for any mesh.addXZY method, a new constuctor can also be used. +This is particularly useful for cross stack resources are required. +Where creating the `mesh` as part of an infrastructure stack and creating the `resources` such as `nodes` is more useful to keep in the application stack. ```typescript const mesh = new Mesh(stack, 'AppMesh', { @@ -78,18 +77,15 @@ const mesh = new Mesh(stack, 'AppMesh', { const router = new VirtualRouter(stack, 'router', { mesh, // notice that mesh is a required property when creating a router with a new statement - listener: { - portMapping: { - port: 8081, - protocol: Protocol.HTTP, - } + listeners: [ appmesh.VirtualRouterListener.http(8081) ] } }); ``` -The listener protocol can be either `HTTP` or `TCP`. - -The same pattern applies to all constructs within the appmesh library, for any mesh.addXZY method, a new constuctor can also be used. This is particularly useful for cross stack resources are required. Where creating the `mesh` as part of an infrastructure stack and creating the `resources` such as `nodes` is more useful to keep in the application stack. +The _VirtualRouterListener_ class provides an easy interface for defining new protocol specific listeners. +The `http()`, `http2()`, `grpc()` and `tcp()` methods are available for use. +They accept a single port parameter, that is used to define what port to match requests on. +The port parameter can be omitted, and it will default to port 8080. ## Adding VirtualService diff --git a/packages/@aws-cdk/aws-appmesh/lib/index.ts b/packages/@aws-cdk/aws-appmesh/lib/index.ts index 69cdfd8d2e3c6..d95c017c2071e 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/index.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/index.ts @@ -5,6 +5,7 @@ export * from './route'; export * from './shared-interfaces'; export * from './virtual-node'; export * from './virtual-router'; +export * from './virtual-router-listener'; export * from './virtual-service'; export * from './virtual-gateway'; export * from './virtual-gateway-listener'; diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-router-listener.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-router-listener.ts new file mode 100644 index 0000000000000..7a5e867d0b7c9 --- /dev/null +++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-router-listener.ts @@ -0,0 +1,82 @@ +import * as cdk from '@aws-cdk/core'; +import { CfnVirtualRouter } from './appmesh.generated'; +import { Protocol } from './shared-interfaces'; + +/** + * Properties for a VirtualRouter listener + */ +export interface VirtualRouterListenerConfig { + /** + * Single listener config for a VirtualRouter + */ + readonly listener: CfnVirtualRouter.VirtualRouterListenerProperty; +} + +/** + * Represents the properties needed to define listeners for a VirtualRouter + */ +export abstract class VirtualRouterListener { + /** + * Returns an HTTP Listener for a VirtualRouter + * + * @param port the optional port of the listener, 8080 by default + */ + public static http(port?: number): VirtualRouterListener { + return new VirtualRouterListenerImpl(Protocol.HTTP, port); + } + + /** + * Returns an HTTP2 Listener for a VirtualRouter + * + * @param port the optional port of the listener, 8080 by default + */ + public static http2(port?: number): VirtualRouterListener { + return new VirtualRouterListenerImpl(Protocol.HTTP2, port); + } + + /** + * Returns a GRPC Listener for a VirtualRouter + * + * @param port the optional port of the listener, 8080 by default + */ + public static grpc(port?: number): VirtualRouterListener { + return new VirtualRouterListenerImpl(Protocol.GRPC, port); + } + + /** + * Returns a TCP Listener for a VirtualRouter + * + * @param port the optional port of the listener, 8080 by default + */ + public static tcp(port?: number): VirtualRouterListener { + return new VirtualRouterListenerImpl(Protocol.TCP, port); + } + + /** + * Called when the VirtualRouterListener type is initialized. Can be used to enforce + * mutual exclusivity + */ + public abstract bind(scope: cdk.Construct): VirtualRouterListenerConfig; +} + +class VirtualRouterListenerImpl extends VirtualRouterListener { + private readonly protocol: Protocol; + private readonly port: number; + + constructor(protocol: Protocol, port?: number) { + super(); + this.protocol = protocol; + this.port = port ?? 8080; + } + + bind(_scope: cdk.Construct): VirtualRouterListenerConfig { + return { + listener: { + portMapping: { + port: this.port, + protocol: this.protocol, + }, + }, + }; + } +} diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-router.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-router.ts index 2b416427ae389..65c3921a844fd 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/virtual-router.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-router.ts @@ -3,7 +3,7 @@ import { Construct } from 'constructs'; import { CfnVirtualRouter } from './appmesh.generated'; import { IMesh, Mesh } from './mesh'; import { Route, RouteBaseProps } from './route'; -import { PortMapping, Protocol } from './shared-interfaces'; +import { VirtualRouterListener } from './virtual-router-listener'; /** * Interface which all VirtualRouter based classes MUST implement @@ -43,7 +43,7 @@ export interface VirtualRouterBaseProps { * * @default - A listener on HTTP port 8080 */ - readonly listener?: Listener; + readonly listeners?: VirtualRouterListener[]; /** * The name of the VirtualRouter @@ -53,16 +53,6 @@ export interface VirtualRouterBaseProps { readonly virtualRouterName?: string; } -/** - * A single listener for - */ -export interface Listener { - /** - * Listener port for the VirtualRouter - */ - readonly portMapping: PortMapping; -} - abstract class VirtualRouterBase extends cdk.Resource implements IVirtualRouter { /** * The name of the VirtualRouter @@ -155,8 +145,11 @@ export class VirtualRouter extends VirtualRouterBase { }); this.mesh = props.mesh; - - this.addListener(props.listener || { portMapping: { port: 8080, protocol: Protocol.HTTP } }); + if (props.listeners && props.listeners.length) { + props.listeners.forEach(listener => this.addListener(listener)); + } else { + this.addListener(VirtualRouterListener.http()); + } const router = new CfnVirtualRouter(this, 'Resource', { virtualRouterName: this.physicalName, @@ -177,10 +170,8 @@ export class VirtualRouter extends VirtualRouterBase { /** * Add port mappings to the router */ - private addListener(listener: Listener) { - this.listeners.push({ - portMapping: listener.portMapping, - }); + private addListener(listener: VirtualRouterListener) { + this.listeners.push(listener.bind(this).listener); } } diff --git a/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts b/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts index 322ae1cc608d6..3de6eb20c77d2 100644 --- a/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts +++ b/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts @@ -19,12 +19,9 @@ const namespace = new cloudmap.PrivateDnsNamespace(stack, 'test-namespace', { const mesh = new appmesh.Mesh(stack, 'mesh'); const router = mesh.addVirtualRouter('router', { - listener: { - portMapping: { - port: 8080, - protocol: appmesh.Protocol.HTTP, - }, - }, + listeners: [ + appmesh.VirtualRouterListener.http(), + ], }); const virtualService = mesh.addVirtualService('service', { diff --git a/packages/@aws-cdk/aws-appmesh/test/test.mesh.ts b/packages/@aws-cdk/aws-appmesh/test/test.mesh.ts index f8e6ebcbb716d..690dce4a08ddc 100644 --- a/packages/@aws-cdk/aws-appmesh/test/test.mesh.ts +++ b/packages/@aws-cdk/aws-appmesh/test/test.mesh.ts @@ -66,14 +66,7 @@ export = { meshName: 'test-mesh', }); - mesh.addVirtualRouter('router', { - listener: { - portMapping: { - port: 8080, - protocol: appmesh.Protocol.HTTP, - }, - }, - }); + mesh.addVirtualRouter('router'); // THEN expect(stack).to( @@ -147,12 +140,9 @@ export = { }); const testRouter = mesh.addVirtualRouter('router', { - listener: { - portMapping: { - port: 8080, - protocol: appmesh.Protocol.HTTP, - }, - }, + listeners: [ + appmesh.VirtualRouterListener.http(), + ], }); // THEN @@ -178,12 +168,9 @@ export = { }); const testRouter = mesh.addVirtualRouter('test-router', { - listener: { - portMapping: { - port: 8080, - protocol: appmesh.Protocol.HTTP, - }, - }, + listeners: [ + appmesh.VirtualRouterListener.http(), + ], }); mesh.addVirtualService('service', { diff --git a/packages/@aws-cdk/aws-appmesh/test/test.virtual-router.ts b/packages/@aws-cdk/aws-appmesh/test/test.virtual-router.ts index dff7e4321f1f1..72510c83c4de2 100644 --- a/packages/@aws-cdk/aws-appmesh/test/test.virtual-router.ts +++ b/packages/@aws-cdk/aws-appmesh/test/test.virtual-router.ts @@ -5,6 +5,88 @@ import { Test } from 'nodeunit'; import * as appmesh from '../lib'; export = { + 'When creating a VirtualRouter': { + 'should have appropriate defaults'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const mesh = new appmesh.Mesh(stack, 'mesh', { + meshName: 'test-mesh', + }); + // WHEN + mesh.addVirtualRouter('http-router-listener'); + + expect(stack).to(haveResourceLike('AWS::AppMesh::VirtualRouter', { + VirtualRouterName: 'meshhttprouterlistenerF57BCB2F', + Spec: { + Listeners: [ + { + PortMapping: { + Port: 8080, + Protocol: appmesh.Protocol.HTTP, + }, + }, + ], + }, + })); + test.done(); + }, + 'should have protocol variant listeners'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const mesh = new appmesh.Mesh(stack, 'mesh', { + meshName: 'test-mesh', + }); + // WHEN + mesh.addVirtualRouter('http-router-listener', { + listeners: [ + appmesh.VirtualRouterListener.http(), + ], + virtualRouterName: 'http-router-listener', + }); + + mesh.addVirtualRouter('http2-router-listener', { + listeners: [ + appmesh.VirtualRouterListener.http2(), + ], + virtualRouterName: 'http2-router-listener', + }); + + mesh.addVirtualRouter('grpc-router-listener', { + listeners: [ + appmesh.VirtualRouterListener.grpc(), + ], + virtualRouterName: 'grpc-router-listener', + }); + + mesh.addVirtualRouter('tcp-router-listener', { + listeners: [ + appmesh.VirtualRouterListener.tcp(), + ], + virtualRouterName: 'tcp-router-listener', + }); + + // THEN + const expectedPorts = [appmesh.Protocol.HTTP, appmesh.Protocol.HTTP2, appmesh.Protocol.GRPC, appmesh.Protocol.TCP]; + expectedPorts.forEach(protocol => { + expect(stack).to(haveResourceLike('AWS::AppMesh::VirtualRouter', { + VirtualRouterName: `${protocol}-router-listener`, + Spec: { + Listeners: [ + { + PortMapping: { + Port: 8080, + Protocol: protocol, + }, + }, + ], + }, + })); + }); + + test.done(); + }, + }, + 'When adding route to existing VirtualRouter': { 'should create route resource'(test: Test) { // GIVEN From 54c276d215fd636c2f8970795512a838377b2f21 Mon Sep 17 00:00:00 2001 From: Rajal <55556967+rajal-amzn@users.noreply.github.com> Date: Fri, 6 Nov 2020 18:47:35 -0800 Subject: [PATCH 075/314] feat(region-info): added AppMesh ECR account for eu-south-1 region (#11207) AppMesh is launched in `eu-south-1` region and has a separate account for storing Envoy images in ECR. Updated the ECR account information. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .gitallowed | 1 + .../test/integ.all-service-addons.expected.json | 8 ++++---- .../test/integ.multiple-environments.expected.json | 6 +++--- packages/@aws-cdk/region-info/build-tools/fact-tables.ts | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitallowed b/.gitallowed index 7542be9216573..972728e4b4a7e 100644 --- a/.gitallowed +++ b/.gitallowed @@ -21,3 +21,4 @@ account: '123456789012' account: '772975370895' account: '856666278305' account: '840364872350' +account: '422531588944' diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/test/integ.all-service-addons.expected.json b/packages/@aws-cdk-containers/ecs-service-extensions/test/integ.all-service-addons.expected.json index 005f503e417c2..f9d42c3927b60 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/test/integ.all-service-addons.expected.json +++ b/packages/@aws-cdk-containers/ecs-service-extensions/test/integ.all-service-addons.expected.json @@ -3323,7 +3323,7 @@ "ecrRepo": "840364872350" }, "eu-south-1": { - "ecrRepo": "840364872350" + "ecrRepo": "422531588944" }, "eu-west-1": { "ecrRepo": "840364872350" @@ -3382,7 +3382,7 @@ "ecrRepo": "840364872350" }, "eu-south-1": { - "ecrRepo": "840364872350" + "ecrRepo": "422531588944" }, "eu-west-1": { "ecrRepo": "840364872350" @@ -3441,7 +3441,7 @@ "ecrRepo": "840364872350" }, "eu-south-1": { - "ecrRepo": "840364872350" + "ecrRepo": "422531588944" }, "eu-west-1": { "ecrRepo": "840364872350" @@ -3491,4 +3491,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/test/integ.multiple-environments.expected.json b/packages/@aws-cdk-containers/ecs-service-extensions/test/integ.multiple-environments.expected.json index fbd4ece89913b..1d41a6913794e 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/test/integ.multiple-environments.expected.json +++ b/packages/@aws-cdk-containers/ecs-service-extensions/test/integ.multiple-environments.expected.json @@ -2142,7 +2142,7 @@ "ecrRepo": "840364872350" }, "eu-south-1": { - "ecrRepo": "840364872350" + "ecrRepo": "422531588944" }, "eu-west-1": { "ecrRepo": "840364872350" @@ -2201,7 +2201,7 @@ "ecrRepo": "840364872350" }, "eu-south-1": { - "ecrRepo": "840364872350" + "ecrRepo": "422531588944" }, "eu-west-1": { "ecrRepo": "840364872350" @@ -2235,4 +2235,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/region-info/build-tools/fact-tables.ts b/packages/@aws-cdk/region-info/build-tools/fact-tables.ts index 6680629073cf2..528cd8463f05e 100644 --- a/packages/@aws-cdk/region-info/build-tools/fact-tables.ts +++ b/packages/@aws-cdk/region-info/build-tools/fact-tables.ts @@ -146,7 +146,7 @@ export const APPMESH_ECR_ACCOUNTS: { [region: string]: string } = { 'ca-central-1': '840364872350', 'eu-central-1': '840364872350', 'eu-north-1': '840364872350', - 'eu-south-1': '840364872350', + 'eu-south-1': '422531588944', 'eu-west-1': '840364872350', 'eu-west-2': '840364872350', 'eu-west-3': '840364872350', From 1c10c4ad291ed08df36140afe63cd2950813b870 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 7 Nov 2020 19:06:49 +0000 Subject: [PATCH 076/314] chore(deps-dev): bump fast-check from 2.6.0 to 2.6.1 (#11352) Bumps [fast-check](https://github.com/dubzzz/fast-check) from 2.6.0 to 2.6.1. - [Release notes](https://github.com/dubzzz/fast-check/releases) - [Changelog](https://github.com/dubzzz/fast-check/blob/master/CHANGELOG.md) - [Commits](https://github.com/dubzzz/fast-check/compare/v2.6.0...v2.6.1) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/app-delivery/package.json | 2 +- packages/@aws-cdk/aws-applicationautoscaling/package.json | 2 +- packages/@aws-cdk/aws-autoscaling-common/package.json | 2 +- packages/@aws-cdk/cloudformation-diff/package.json | 2 +- packages/@aws-cdk/core/package.json | 2 +- yarn.lock | 8 ++++---- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/@aws-cdk/app-delivery/package.json b/packages/@aws-cdk/app-delivery/package.json index 80f78b742787a..e0a95c03879eb 100644 --- a/packages/@aws-cdk/app-delivery/package.json +++ b/packages/@aws-cdk/app-delivery/package.json @@ -63,7 +63,7 @@ "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "fast-check": "^2.6.0", + "fast-check": "^2.6.1", "nodeunit": "^0.11.3", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/aws-applicationautoscaling/package.json b/packages/@aws-cdk/aws-applicationautoscaling/package.json index 2bbdff68e0c78..3072fda41400d 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/package.json +++ b/packages/@aws-cdk/aws-applicationautoscaling/package.json @@ -75,7 +75,7 @@ "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", - "fast-check": "^2.6.0", + "fast-check": "^2.6.1", "nodeunit": "^0.11.3", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/aws-autoscaling-common/package.json b/packages/@aws-cdk/aws-autoscaling-common/package.json index ae3e29534c59b..805460b6ef2ba 100644 --- a/packages/@aws-cdk/aws-autoscaling-common/package.json +++ b/packages/@aws-cdk/aws-autoscaling-common/package.json @@ -67,7 +67,7 @@ "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "fast-check": "^2.6.0", + "fast-check": "^2.6.1", "nodeunit": "^0.11.3", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/cloudformation-diff/package.json b/packages/@aws-cdk/cloudformation-diff/package.json index 038bd3dd3b370..db8e8db76853e 100644 --- a/packages/@aws-cdk/cloudformation-diff/package.json +++ b/packages/@aws-cdk/cloudformation-diff/package.json @@ -33,7 +33,7 @@ "@types/string-width": "^4.0.1", "@types/table": "^5.0.0", "cdk-build-tools": "0.0.0", - "fast-check": "^2.6.0", + "fast-check": "^2.6.1", "jest": "^26.6.3", "pkglint": "0.0.0", "ts-jest": "^26.4.3" diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json index 6ed538438492b..af60767b0c135 100644 --- a/packages/@aws-cdk/core/package.json +++ b/packages/@aws-cdk/core/package.json @@ -174,7 +174,7 @@ "@types/sinon": "^9.0.8", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", - "fast-check": "^2.6.0", + "fast-check": "^2.6.1", "lodash": "^4.17.20", "nodeunit-shim": "0.0.0", "pkglint": "0.0.0", diff --git a/yarn.lock b/yarn.lock index c1e62470d80a1..48ffd02de572a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6551,10 +6551,10 @@ extsprintf@^1.2.0: resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= -fast-check@^2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-2.6.0.tgz#b4f69c781325ecdfadf6d23468e5dae2c46bfb46" - integrity sha512-Wpz0mMPGxvOtMBaEguu5Pw35uTVfJzAUqRYQksiHk6vHKBV2YNeKk9BzTuqVCYwUIl+NELyPBY2Mg96sYk2fhw== +fast-check@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-2.6.1.tgz#c9ff58b69c2eee872588985d8b93424c84359a6e" + integrity sha512-CauHEKfAjgAFpNDpFqSccu7C5kOlifCNfRxMjzY76MaAaH7ddkqqEzRE2Vm5bjpHJpndD0iVXiZC+d1rYzv5qg== dependencies: pure-rand "^3.0.0" From 9769a1bd0fa1081b6cb508c7787dc5dfff1c6371 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 7 Nov 2020 19:49:15 +0000 Subject: [PATCH 077/314] chore(deps): bump aws-sdk from 2.785.0 to 2.787.0 (#11345) Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.785.0 to 2.787.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.785.0...v2.787.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/aws-cloudfront-origins/package.json | 2 +- packages/@aws-cdk/aws-cloudfront/package.json | 2 +- packages/@aws-cdk/aws-cloudtrail/package.json | 2 +- packages/@aws-cdk/aws-codebuild/package.json | 2 +- packages/@aws-cdk/aws-codecommit/package.json | 2 +- packages/@aws-cdk/aws-dynamodb/package.json | 2 +- packages/@aws-cdk/aws-eks/package.json | 2 +- packages/@aws-cdk/aws-events-targets/package.json | 2 +- packages/@aws-cdk/aws-logs/package.json | 2 +- packages/@aws-cdk/aws-route53/package.json | 2 +- packages/@aws-cdk/aws-sqs/package.json | 2 +- packages/@aws-cdk/custom-resources/package.json | 2 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- yarn.lock | 8 ++++---- 15 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudfront-origins/package.json b/packages/@aws-cdk/aws-cloudfront-origins/package.json index 818b0dc43d7f3..f785f93e01873 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/package.json +++ b/packages/@aws-cdk/aws-cloudfront-origins/package.json @@ -72,7 +72,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", - "aws-sdk": "^2.785.0", + "aws-sdk": "^2.787.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "pkglint": "0.0.0" diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index 134526a33cbd7..9a84b3f57a115 100644 --- a/packages/@aws-cdk/aws-cloudfront/package.json +++ b/packages/@aws-cdk/aws-cloudfront/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.785.0", + "aws-sdk": "^2.787.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index a4f02bda2c372..f7285169ae2b7 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.785.0", + "aws-sdk": "^2.787.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codebuild/package.json b/packages/@aws-cdk/aws-codebuild/package.json index 096bc6fee0a0b..e8eeec89bed79 100644 --- a/packages/@aws-cdk/aws-codebuild/package.json +++ b/packages/@aws-cdk/aws-codebuild/package.json @@ -79,7 +79,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.785.0", + "aws-sdk": "^2.787.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codecommit/package.json b/packages/@aws-cdk/aws-codecommit/package.json index b19b07d18450a..dadc9d4e53590 100644 --- a/packages/@aws-cdk/aws-codecommit/package.json +++ b/packages/@aws-cdk/aws-codecommit/package.json @@ -79,7 +79,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.785.0", + "aws-sdk": "^2.787.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index fe1381716a194..40b63b35add9b 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -74,7 +74,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/jest": "^26.0.15", - "aws-sdk": "^2.785.0", + "aws-sdk": "^2.787.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index f5e8120bf29c5..f5cbb43f1287b 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", "@types/yaml": "1.9.6", - "aws-sdk": "^2.785.0", + "aws-sdk": "^2.787.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index a16ac63dae9e2..de9a8658335db 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -75,7 +75,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-codecommit": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", - "aws-sdk": "^2.785.0", + "aws-sdk": "^2.787.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index 628b9fe43c66e..29f42ad90bd1b 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.785.0", + "aws-sdk": "^2.787.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-route53/package.json b/packages/@aws-cdk/aws-route53/package.json index 9b65bb4b6c327..be9f0e15a67f1 100644 --- a/packages/@aws-cdk/aws-route53/package.json +++ b/packages/@aws-cdk/aws-route53/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.785.0", + "aws-sdk": "^2.787.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-sqs/package.json b/packages/@aws-cdk/aws-sqs/package.json index 2a8644ed6b5a5..538d5d7a6f3c6 100644 --- a/packages/@aws-cdk/aws-sqs/package.json +++ b/packages/@aws-cdk/aws-sqs/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.785.0", + "aws-sdk": "^2.787.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index acbbf1680983f..6b9ebd0219673 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -79,7 +79,7 @@ "@types/aws-lambda": "^8.10.64", "@types/fs-extra": "^8.1.1", "@types/sinon": "^9.0.8", - "aws-sdk": "^2.785.0", + "aws-sdk": "^2.787.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 51414409969d9..35ec91fed8660 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -71,7 +71,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.785.0", + "aws-sdk": "^2.787.0", "camelcase": "^6.2.0", "cdk-assets": "0.0.0", "colors": "^1.4.0", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index f917654e43d08..3c85b9a1d40ec 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -47,7 +47,7 @@ "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.785.0", + "aws-sdk": "^2.787.0", "glob": "^7.1.6", "yargs": "^16.1.0" }, diff --git a/yarn.lock b/yarn.lock index 48ffd02de572a..5638098d9bfd7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3848,10 +3848,10 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" -aws-sdk@^2.637.0, aws-sdk@^2.785.0: - version "2.785.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.785.0.tgz#e403dc92c87c00c9eda86b4214870d874ea69251" - integrity sha512-B8KOd9pg+ofT++O0D8rfm30VDdCzBWCFl43rvXBEWbH6lq/fQcLYLTbhKEufqjqnpwzT+prlpNszdNqKYME34g== +aws-sdk@^2.637.0, aws-sdk@^2.787.0: + version "2.787.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.787.0.tgz#4d8966d11c7dbe770de26632e552c97b2d91e340" + integrity sha512-3WlUdWqUB8Vhdvj/7TENr/7SEmQzxmnHxOJ8l2WjZbcMRSuI0/9Ym4p1TC3hf21VDVDhkdGlw60QqpZQ1qb+Mg== dependencies: buffer "4.9.2" events "1.1.1" From 651ee5cae8b283f09039ad115ca272b78c512dc2 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 8 Nov 2020 03:27:07 +0000 Subject: [PATCH 078/314] chore(deps): bump diff from 4.0.2 to 5.0.0 (#11354) Bumps [diff](https://github.com/kpdecker/jsdiff) from 4.0.2 to 5.0.0. - [Release notes](https://github.com/kpdecker/jsdiff/releases) - [Changelog](https://github.com/kpdecker/jsdiff/blob/master/release-notes.md) - [Commits](https://github.com/kpdecker/jsdiff/compare/v4.0.2...v5.0.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/cloudformation-diff/package.json | 2 +- yarn.lock | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/cloudformation-diff/package.json b/packages/@aws-cdk/cloudformation-diff/package.json index db8e8db76853e..5a5bd72a0280f 100644 --- a/packages/@aws-cdk/cloudformation-diff/package.json +++ b/packages/@aws-cdk/cloudformation-diff/package.json @@ -23,7 +23,7 @@ "dependencies": { "@aws-cdk/cfnspec": "0.0.0", "colors": "^1.4.0", - "diff": "^4.0.2", + "diff": "^5.0.0", "fast-deep-equal": "^3.1.3", "string-width": "^4.2.0", "table": "^6.0.3" diff --git a/yarn.lock b/yarn.lock index 5638098d9bfd7..dfa99ffbd3558 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5840,6 +5840,11 @@ diff@^4.0.1, diff@^4.0.2: resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== +diff@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + diffie-hellman@^5.0.0: version "5.0.3" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" From 51cd8af67507b4b3a641e993544f1678a90ddc88 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 8 Nov 2020 16:09:28 +0000 Subject: [PATCH 079/314] chore(deps): bump ts-jest from 26.4.3 to 26.4.4 (#11356) Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 26.4.3 to 26.4.4. - [Release notes](https://github.com/kulshekhar/ts-jest/releases) - [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md) - [Commits](https://github.com/kulshekhar/ts-jest/compare/v26.4.3...v26.4.4) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/assert/package.json | 2 +- packages/@aws-cdk/aws-dynamodb/package.json | 2 +- packages/@aws-cdk/aws-sam/package.json | 2 +- .../@aws-cdk/cloudformation-diff/package.json | 2 +- .../cloudformation-include/package.json | 2 +- .../@monocdk-experiment/assert/package.json | 2 +- packages/aws-cdk/package.json | 2 +- tools/cdk-build-tools/package.json | 2 +- yarn.lock | 39 +++---------------- 9 files changed, 13 insertions(+), 42 deletions(-) diff --git a/packages/@aws-cdk/assert/package.json b/packages/@aws-cdk/assert/package.json index a1e007b5733cf..cb651d3ba12df 100644 --- a/packages/@aws-cdk/assert/package.json +++ b/packages/@aws-cdk/assert/package.json @@ -25,7 +25,7 @@ "cdk-build-tools": "0.0.0", "jest": "^26.6.3", "pkglint": "0.0.0", - "ts-jest": "^26.4.3" + "ts-jest": "^26.4.4" }, "dependencies": { "@aws-cdk/cloud-assembly-schema": "0.0.0", diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index 40b63b35add9b..2a4b972b025c5 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -82,7 +82,7 @@ "jest": "^26.6.3", "pkglint": "0.0.0", "sinon": "^9.2.1", - "ts-jest": "^26.4.3" + "ts-jest": "^26.4.4" }, "dependencies": { "@aws-cdk/aws-applicationautoscaling": "0.0.0", diff --git a/packages/@aws-cdk/aws-sam/package.json b/packages/@aws-cdk/aws-sam/package.json index 8d8c5e608d0cc..7a788ee71a606 100644 --- a/packages/@aws-cdk/aws-sam/package.json +++ b/packages/@aws-cdk/aws-sam/package.json @@ -79,7 +79,7 @@ "cfn2ts": "0.0.0", "jest": "^26.6.3", "pkglint": "0.0.0", - "ts-jest": "^26.4.3" + "ts-jest": "^26.4.4" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/cloudformation-diff/package.json b/packages/@aws-cdk/cloudformation-diff/package.json index 5a5bd72a0280f..2fb02810b2182 100644 --- a/packages/@aws-cdk/cloudformation-diff/package.json +++ b/packages/@aws-cdk/cloudformation-diff/package.json @@ -36,7 +36,7 @@ "fast-check": "^2.6.1", "jest": "^26.6.3", "pkglint": "0.0.0", - "ts-jest": "^26.4.3" + "ts-jest": "^26.4.4" }, "repository": { "url": "https://github.com/aws/aws-cdk.git", diff --git a/packages/@aws-cdk/cloudformation-include/package.json b/packages/@aws-cdk/cloudformation-include/package.json index 9e67e7dda3901..5504214ff2f62 100644 --- a/packages/@aws-cdk/cloudformation-include/package.json +++ b/packages/@aws-cdk/cloudformation-include/package.json @@ -332,7 +332,7 @@ "cdk-integ-tools": "0.0.0", "jest": "^26.6.3", "pkglint": "0.0.0", - "ts-jest": "^26.4.3" + "ts-jest": "^26.4.4" }, "keywords": [ "aws", diff --git a/packages/@monocdk-experiment/assert/package.json b/packages/@monocdk-experiment/assert/package.json index 89cb3fbce95ba..d366f5c00f20b 100644 --- a/packages/@monocdk-experiment/assert/package.json +++ b/packages/@monocdk-experiment/assert/package.json @@ -41,7 +41,7 @@ "jest": "^26.6.3", "monocdk": "0.0.0", "pkglint": "0.0.0", - "ts-jest": "^26.4.3" + "ts-jest": "^26.4.4" }, "dependencies": { "@aws-cdk/cloudformation-diff": "0.0.0" diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 35ec91fed8660..553d64b28bf7a 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -59,7 +59,7 @@ "mockery": "^2.1.0", "pkglint": "0.0.0", "sinon": "^9.2.1", - "ts-jest": "^26.4.3", + "ts-jest": "^26.4.4", "ts-mock-imports": "^1.3.0", "@octokit/rest": "^18.0.9", "make-runnable": "^1.3.8" diff --git a/tools/cdk-build-tools/package.json b/tools/cdk-build-tools/package.json index 09246c5f04f4c..3aa024ae4127e 100644 --- a/tools/cdk-build-tools/package.json +++ b/tools/cdk-build-tools/package.json @@ -54,7 +54,7 @@ "jsii-pacmak": "^1.14.1", "nodeunit": "^0.11.3", "nyc": "^15.1.0", - "ts-jest": "^26.4.3", + "ts-jest": "^26.4.4", "typescript": "~3.9.7", "yargs": "^16.1.0", "yarn-cling": "0.0.0" diff --git a/yarn.lock b/yarn.lock index dfa99ffbd3558..476516b903cbb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1137,11 +1137,6 @@ slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/create-cache-key-function@^26.5.0": - version "26.5.0" - resolved "https://registry.yarnpkg.com/@jest/create-cache-key-function/-/create-cache-key-function-26.5.0.tgz#1d07947adc51ea17766d9f0ccf5a8d6ea94c47dc" - integrity sha512-DJ+pEBUIqarrbv1W/C39f9YH0rJ4wsXZ/VC6JafJPlHW2HOucKceeaqTOQj9MEDQZjySxMLkOq5mfXZXNZcmWw== - "@jest/environment@^26.6.2": version "26.6.2" resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-26.6.2.tgz#ba364cc72e221e79cc8f0a99555bf5d7577cf92c" @@ -1267,17 +1262,6 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" -"@jest/types@^26.6.1": - version "26.6.1" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.1.tgz#2638890e8031c0bc8b4681e0357ed986e2f866c5" - integrity sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^15.0.0" - chalk "^4.0.0" - "@jest/types@^26.6.2": version "26.6.2" resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" @@ -8632,19 +8616,7 @@ jest-snapshot@^26.6.2: pretty-format "^26.6.2" semver "^7.3.2" -jest-util@^26.1.0: - version "26.6.1" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.1.tgz#4cc0d09ec57f28d12d053887eec5dc976a352e9b" - integrity sha512-xCLZUqVoqhquyPLuDXmH7ogceGctbW8SMyQVjD9o+1+NPWI7t0vO08udcFLVPLgKWcvc+zotaUv/RuaR6l8HIA== - dependencies: - "@jest/types" "^26.6.1" - "@types/node" "*" - chalk "^4.0.0" - graceful-fs "^4.2.4" - is-ci "^2.0.0" - micromatch "^4.0.2" - -jest-util@^26.6.2: +jest-util@^26.1.0, jest-util@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.2.tgz#907535dbe4d5a6cb4c47ac9b926f6af29576cbc1" integrity sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q== @@ -13339,12 +13311,11 @@ trivial-deferred@^1.0.1: resolved "https://registry.yarnpkg.com/trivial-deferred/-/trivial-deferred-1.0.1.tgz#376d4d29d951d6368a6f7a0ae85c2f4d5e0658f3" integrity sha1-N21NKdlR1jaKb3oK6FwvTV4GWPM= -ts-jest@^26.4.3: - version "26.4.3" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.4.3.tgz#d153a616033e7ec8544b97ddbe2638cbe38d53db" - integrity sha512-pFDkOKFGY+nL9v5pkhm+BIFpoAuno96ff7GMnIYr/3L6slFOS365SI0fGEVYx2RKGji5M2elxhWjDMPVcOCdSw== +ts-jest@^26.4.4: + version "26.4.4" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.4.4.tgz#61f13fb21ab400853c532270e52cc0ed7e502c49" + integrity sha512-3lFWKbLxJm34QxyVNNCgXX1u4o/RV0myvA2y2Bxm46iGIjKlaY0own9gIckbjZJPn+WaJEnfPPJ20HHGpoq4yg== dependencies: - "@jest/create-cache-key-function" "^26.5.0" "@types/jest" "26.x" bs-logger "0.x" buffer-from "1.x" From 7ab5ab8dad9ad08ff43602d5ee78c31e6b8413ed Mon Sep 17 00:00:00 2001 From: arkon Date: Sun, 8 Nov 2020 18:24:22 -0500 Subject: [PATCH 080/314] fix(elasticsearch): use correct latency metric names (#11175) Fixes #11174 As per the issue details, this uses the correct metric names as described in [the documentation](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-managedomains-cloudwatchmetrics.html). ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-elasticsearch/lib/domain.ts | 4 ++-- packages/@aws-cdk/aws-elasticsearch/test/domain.test.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/@aws-cdk/aws-elasticsearch/lib/domain.ts b/packages/@aws-cdk/aws-elasticsearch/lib/domain.ts index 406c3c6dd0314..4931bde8f4a1e 100644 --- a/packages/@aws-cdk/aws-elasticsearch/lib/domain.ts +++ b/packages/@aws-cdk/aws-elasticsearch/lib/domain.ts @@ -1038,7 +1038,7 @@ abstract class DomainBase extends cdk.Resource implements IDomain { * @default p99 over 5 minutes */ public metricSearchLatency(props?: MetricOptions): Metric { - return this.metric('SearchLatencyP99', { statistic: 'p99', ...props }); + return this.metric('SearchLatency', { statistic: 'p99', ...props }); } /** @@ -1047,7 +1047,7 @@ abstract class DomainBase extends cdk.Resource implements IDomain { * @default p99 over 5 minutes */ public metricIndexingLatency(props?: MetricOptions): Metric { - return this.metric('IndexingLatencyP99', { statistic: 'p99', ...props }); + return this.metric('IndexingLatency', { statistic: 'p99', ...props }); } private grant( diff --git a/packages/@aws-cdk/aws-elasticsearch/test/domain.test.ts b/packages/@aws-cdk/aws-elasticsearch/test/domain.test.ts index fc5472affaf6f..e4b8abf50e29d 100644 --- a/packages/@aws-cdk/aws-elasticsearch/test/domain.test.ts +++ b/packages/@aws-cdk/aws-elasticsearch/test/domain.test.ts @@ -394,7 +394,7 @@ describe('metrics', () => { test('Can use metricSearchLatency on an Elasticsearch Domain', () => { testMetric( (domain) => domain.metricSearchLatency(), - 'SearchLatencyP99', + 'SearchLatency', 'p99', ); }); @@ -402,7 +402,7 @@ describe('metrics', () => { test('Can use metricIndexingLatency on an Elasticsearch Domain', () => { testMetric( (domain) => domain.metricIndexingLatency(), - 'IndexingLatencyP99', + 'IndexingLatency', 'p99', ); }); From 550dd99bc853fb89569088c7bac0b12bded0833f Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2020 01:20:50 +0000 Subject: [PATCH 081/314] chore(deps-dev): bump parcel from 2.0.0-nightly.440 to 2.0.0-nightly.442 (#11361) Bumps [parcel](https://github.com/parcel-bundler/parcel) from 2.0.0-nightly.440 to 2.0.0-nightly.442. - [Release notes](https://github.com/parcel-bundler/parcel/releases) - [Changelog](https://github.com/parcel-bundler/parcel/blob/v2/CHANGELOG.md) - [Commits](https://github.com/parcel-bundler/parcel/commits) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- .../@aws-cdk/aws-lambda-nodejs/package.json | 2 +- yarn.lock | 934 +++++++++--------- 2 files changed, 468 insertions(+), 468 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda-nodejs/package.json b/packages/@aws-cdk/aws-lambda-nodejs/package.json index cbde0cb52cebc..a5ea9b0fad381 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/package.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/package.json @@ -67,7 +67,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "delay": "4.4.0", - "parcel": "2.0.0-nightly.440", + "parcel": "2.0.0-nightly.442", "pkglint": "0.0.0" }, "dependencies": { diff --git a/yarn.lock b/yarn.lock index 476516b903cbb..bc0ef657e520a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2154,128 +2154,128 @@ dependencies: "@types/node" ">= 8" -"@parcel/babel-ast-utils@2.0.0-nightly.2064+1572e394": - version "2.0.0-nightly.2064" - resolved "https://registry.yarnpkg.com/@parcel/babel-ast-utils/-/babel-ast-utils-2.0.0-nightly.2064.tgz#24c1c1f95bac7879b103809bbfd71055dbb63427" - integrity sha512-Lt89A86Nr/7sHODcKBcxbtcLV0bLeoYz4uQ6wyqSD+Jn6j8oB613Wg9cGlDuaq1sKZKim/5UK5RMRkRS3oQGDw== +"@parcel/babel-ast-utils@2.0.0-nightly.2066+e2136965": + version "2.0.0-nightly.2066" + resolved "https://registry.yarnpkg.com/@parcel/babel-ast-utils/-/babel-ast-utils-2.0.0-nightly.2066.tgz#bd4d0214b84acc4146831f66bfa4b4e8e81a5b17" + integrity sha512-Nl8ddCuIWRDMpr3tGPSfSAX0rdKyndlCIEd5LM8rQ8IAcR03NuX6IG2h4jGcgCIAfGaqS/9M1Xfpr1rFQHXYoQ== dependencies: "@babel/generator" "^7.0.0" "@babel/parser" "^7.0.0" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.444+e2136965" -"@parcel/babel-preset-env@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/babel-preset-env/-/babel-preset-env-2.0.0-nightly.442.tgz#f863974239c5941afd27135b443002149cb50d68" - integrity sha512-WgCDZOUPFHdFo3Et+F7KKC+V+DNb5wTs4phL2F0vcEWZSAs2HYFs717jKcGWwaZA3V0fTnibIEfkIt3WXX9NKw== +"@parcel/babel-preset-env@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/babel-preset-env/-/babel-preset-env-2.0.0-nightly.444.tgz#6ae1995f17958d159a5df615ab80b61edce9a880" + integrity sha512-JYZczFbDrTOo0H8Iu6t8UAF58L9CTFO+Ojhg/kjw9+0ookmLlKMA2Ar8u/Wozh2A1lWe1xCyZQFC0xYZTuQIBA== dependencies: "@babel/preset-env" "^7.4.0" semver "^5.4.1" -"@parcel/babylon-walk@2.0.0-nightly.2064+1572e394": - version "2.0.0-nightly.2064" - resolved "https://registry.yarnpkg.com/@parcel/babylon-walk/-/babylon-walk-2.0.0-nightly.2064.tgz#db99b1c8b74eb1dab01d2d6b859dc937dc099e04" - integrity sha512-l/M1oCUQJaOjJXejWE1gzfUj04Ygx9KSRhGeSUhMdFXtvsYj062PKG8ftYX4IYdy4HB1olv2g8ptvo50z3nsSA== +"@parcel/babylon-walk@2.0.0-nightly.2066+e2136965": + version "2.0.0-nightly.2066" + resolved "https://registry.yarnpkg.com/@parcel/babylon-walk/-/babylon-walk-2.0.0-nightly.2066.tgz#375072084e5da071fa9493ce77e16443dd0dfa04" + integrity sha512-lDHJ5wUPe4vCGh1wiW8CH7j0Tqo7o6yz2UG9UQhzhDviS7jHfpkCg4f3ss1YpJS8jlYQ/TY+PypoWGZcOQa+8g== dependencies: "@babel/types" "^7.0.0" lodash.clone "^4.5.0" -"@parcel/bundler-default@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.0.0-nightly.442.tgz#cf7a4e5d712af7dc79bb93f154f1c9c3683b3e5b" - integrity sha512-kSmqsNFSX5+9NGRrrnNBOqwf0tX5ljNcWLBEJopwUXdFvgWryt9FQjAQtx1OBGWFB7AuekBuVzQi/ZqWGU4DZA== +"@parcel/bundler-default@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.0.0-nightly.444.tgz#77ce4e22ca41442f564e5045a9ed9d25fef693d8" + integrity sha512-VaB0rkF3B7deqz7xUj+jXvD+emSWo4CeBWcEEjhYHdpj/GeqFSAW/o9CxcgB1pDWiIWU3kI4es+qHJ4zf6icEw== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.442+1572e394" - "@parcel/plugin" "2.0.0-nightly.442+1572e394" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/diagnostic" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.444+e2136965" nullthrows "^1.1.1" -"@parcel/cache@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/cache/-/cache-2.0.0-nightly.442.tgz#ce59d3797de9a1c315c88fd7f0ece9776b879e80" - integrity sha512-aM1UJMsKzNT4t1siF5oJCduUzqVc/WHR1NUUsCa5C3XVSLGqbWjIiUbFFH0xWScsvYvSoGA8lk/xKM5gid7n2g== +"@parcel/cache@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/cache/-/cache-2.0.0-nightly.444.tgz#d1994e86be596b96cb8017e39fb7e23459ce279c" + integrity sha512-uV4o+Rh3XerFjnFy7uQHwIad6BBgRvyH/sapzNBXpxzyAcE9VL4+edWLjUVSSlaEDGsn/goPpg3+idjWNlGJQw== dependencies: - "@parcel/logger" "2.0.0-nightly.442+1572e394" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/logger" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.444+e2136965" -"@parcel/codeframe@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/codeframe/-/codeframe-2.0.0-nightly.442.tgz#8f4ac16312fdbbbd63163fe09f245bfb836ef2b3" - integrity sha512-sUpRg4fDZTNC2qKD73tNeUVmIA07RZek1JTU5BKbC1RTWmjGOPJzDEzPvczXreGar4yZmpODMBN0c91wzkJTLg== +"@parcel/codeframe@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/codeframe/-/codeframe-2.0.0-nightly.444.tgz#cfc546cebe4c8794b4c3bae20ee2bec30a5e759e" + integrity sha512-BCulOXUU2iuGdJqxv1yenXggD+BLhA9mSBAfx7Wvlye1D9tAamuqXN4V4oROk4sFY6UK6wFSMR7zMlS4QsuAVg== dependencies: chalk "^2.4.2" emphasize "^2.1.0" slice-ansi "^4.0.0" string-width "^4.2.0" -"@parcel/config-default@2.0.0-nightly.442+1572e394": +"@parcel/config-default@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/config-default/-/config-default-2.0.0-nightly.444.tgz#757c0a17291486b845ffbe11eb24e0d43bdec372" + integrity sha512-N7Jxznaz6CCb9EUL3jrxhTySWjYFkCLXqRZCQInyqeawXQHP5esemBUEhe0uybzFjt+vUUKxVTXE2qZQb+YEsA== + dependencies: + "@parcel/bundler-default" "2.0.0-nightly.444+e2136965" + "@parcel/namer-default" "2.0.0-nightly.444+e2136965" + "@parcel/optimizer-cssnano" "2.0.0-nightly.444+e2136965" + "@parcel/optimizer-data-url" "2.0.0-nightly.444+e2136965" + "@parcel/optimizer-htmlnano" "2.0.0-nightly.444+e2136965" + "@parcel/optimizer-terser" "2.0.0-nightly.444+e2136965" + "@parcel/packager-css" "2.0.0-nightly.444+e2136965" + "@parcel/packager-html" "2.0.0-nightly.444+e2136965" + "@parcel/packager-js" "2.0.0-nightly.444+e2136965" + "@parcel/packager-raw" "2.0.0-nightly.444+e2136965" + "@parcel/packager-raw-url" "2.0.0-nightly.2066+e2136965" + "@parcel/packager-ts" "2.0.0-nightly.444+e2136965" + "@parcel/reporter-bundle-analyzer" "2.0.0-nightly.2066+e2136965" + "@parcel/reporter-bundle-buddy" "2.0.0-nightly.2066+e2136965" + "@parcel/reporter-cli" "2.0.0-nightly.444+e2136965" + "@parcel/reporter-dev-server" "2.0.0-nightly.444+e2136965" + "@parcel/resolver-default" "2.0.0-nightly.444+e2136965" + "@parcel/runtime-browser-hmr" "2.0.0-nightly.444+e2136965" + "@parcel/runtime-js" "2.0.0-nightly.444+e2136965" + "@parcel/runtime-react-refresh" "2.0.0-nightly.444+e2136965" + "@parcel/transformer-babel" "2.0.0-nightly.444+e2136965" + "@parcel/transformer-coffeescript" "2.0.0-nightly.444+e2136965" + "@parcel/transformer-css" "2.0.0-nightly.444+e2136965" + "@parcel/transformer-glsl" "2.0.0-nightly.2066+e2136965" + "@parcel/transformer-graphql" "2.0.0-nightly.444+e2136965" + "@parcel/transformer-html" "2.0.0-nightly.444+e2136965" + "@parcel/transformer-image" "2.0.0-nightly.2066+e2136965" + "@parcel/transformer-inline-string" "2.0.0-nightly.444+e2136965" + "@parcel/transformer-js" "2.0.0-nightly.444+e2136965" + "@parcel/transformer-json" "2.0.0-nightly.444+e2136965" + "@parcel/transformer-jsonld" "2.0.0-nightly.2066+e2136965" + "@parcel/transformer-less" "2.0.0-nightly.444+e2136965" + "@parcel/transformer-mdx" "2.0.0-nightly.2066+e2136965" + "@parcel/transformer-postcss" "2.0.0-nightly.444+e2136965" + "@parcel/transformer-posthtml" "2.0.0-nightly.444+e2136965" + "@parcel/transformer-pug" "2.0.0-nightly.444+e2136965" + "@parcel/transformer-raw" "2.0.0-nightly.444+e2136965" + "@parcel/transformer-react-refresh-babel" "2.0.0-nightly.444+e2136965" + "@parcel/transformer-react-refresh-wrap" "2.0.0-nightly.444+e2136965" + "@parcel/transformer-sass" "2.0.0-nightly.444+e2136965" + "@parcel/transformer-stylus" "2.0.0-nightly.444+e2136965" + "@parcel/transformer-sugarss" "2.0.0-nightly.444+e2136965" + "@parcel/transformer-toml" "2.0.0-nightly.444+e2136965" + "@parcel/transformer-typescript-types" "2.0.0-nightly.444+e2136965" + "@parcel/transformer-vue" "2.0.0-nightly.2066+e2136965" + "@parcel/transformer-yaml" "2.0.0-nightly.444+e2136965" + +"@parcel/core@2.0.0-nightly.442+e2136965": version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/config-default/-/config-default-2.0.0-nightly.442.tgz#0da5b01410b939c9a8cf706708ef994e78fc2b19" - integrity sha512-PFIuVCLVkJJnMXvANIrh2Q8bu7Wggl9SYphcV1FBQZIl7j2INCo8ixCzGEauVXHwmHBFhWwgwh4bzEDNFMzyKQ== - dependencies: - "@parcel/bundler-default" "2.0.0-nightly.442+1572e394" - "@parcel/namer-default" "2.0.0-nightly.442+1572e394" - "@parcel/optimizer-cssnano" "2.0.0-nightly.442+1572e394" - "@parcel/optimizer-data-url" "2.0.0-nightly.442+1572e394" - "@parcel/optimizer-htmlnano" "2.0.0-nightly.442+1572e394" - "@parcel/optimizer-terser" "2.0.0-nightly.442+1572e394" - "@parcel/packager-css" "2.0.0-nightly.442+1572e394" - "@parcel/packager-html" "2.0.0-nightly.442+1572e394" - "@parcel/packager-js" "2.0.0-nightly.442+1572e394" - "@parcel/packager-raw" "2.0.0-nightly.442+1572e394" - "@parcel/packager-raw-url" "2.0.0-nightly.2064+1572e394" - "@parcel/packager-ts" "2.0.0-nightly.442+1572e394" - "@parcel/reporter-bundle-analyzer" "2.0.0-nightly.2064+1572e394" - "@parcel/reporter-bundle-buddy" "2.0.0-nightly.2064+1572e394" - "@parcel/reporter-cli" "2.0.0-nightly.442+1572e394" - "@parcel/reporter-dev-server" "2.0.0-nightly.442+1572e394" - "@parcel/resolver-default" "2.0.0-nightly.442+1572e394" - "@parcel/runtime-browser-hmr" "2.0.0-nightly.442+1572e394" - "@parcel/runtime-js" "2.0.0-nightly.442+1572e394" - "@parcel/runtime-react-refresh" "2.0.0-nightly.442+1572e394" - "@parcel/transformer-babel" "2.0.0-nightly.442+1572e394" - "@parcel/transformer-coffeescript" "2.0.0-nightly.442+1572e394" - "@parcel/transformer-css" "2.0.0-nightly.442+1572e394" - "@parcel/transformer-glsl" "2.0.0-nightly.2064+1572e394" - "@parcel/transformer-graphql" "2.0.0-nightly.442+1572e394" - "@parcel/transformer-html" "2.0.0-nightly.442+1572e394" - "@parcel/transformer-image" "2.0.0-nightly.2064+1572e394" - "@parcel/transformer-inline-string" "2.0.0-nightly.442+1572e394" - "@parcel/transformer-js" "2.0.0-nightly.442+1572e394" - "@parcel/transformer-json" "2.0.0-nightly.442+1572e394" - "@parcel/transformer-jsonld" "2.0.0-nightly.2064+1572e394" - "@parcel/transformer-less" "2.0.0-nightly.442+1572e394" - "@parcel/transformer-mdx" "2.0.0-nightly.2064+1572e394" - "@parcel/transformer-postcss" "2.0.0-nightly.442+1572e394" - "@parcel/transformer-posthtml" "2.0.0-nightly.442+1572e394" - "@parcel/transformer-pug" "2.0.0-nightly.442+1572e394" - "@parcel/transformer-raw" "2.0.0-nightly.442+1572e394" - "@parcel/transformer-react-refresh-babel" "2.0.0-nightly.442+1572e394" - "@parcel/transformer-react-refresh-wrap" "2.0.0-nightly.442+1572e394" - "@parcel/transformer-sass" "2.0.0-nightly.442+1572e394" - "@parcel/transformer-stylus" "2.0.0-nightly.442+1572e394" - "@parcel/transformer-sugarss" "2.0.0-nightly.442+1572e394" - "@parcel/transformer-toml" "2.0.0-nightly.442+1572e394" - "@parcel/transformer-typescript-types" "2.0.0-nightly.442+1572e394" - "@parcel/transformer-vue" "2.0.0-nightly.2064+1572e394" - "@parcel/transformer-yaml" "2.0.0-nightly.442+1572e394" - -"@parcel/core@2.0.0-nightly.440+1572e394": - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/@parcel/core/-/core-2.0.0-nightly.440.tgz#50be517f63bf280077de2bd6f79171c9847ca951" - integrity sha512-4Y5Abevi292J07q33QqEfNMExfGPJtjJ93wJs3NTibkXj17eGl0unPyPowYDHHuH6Eqlzk8clpMgnmmjJZkKsA== - dependencies: - "@parcel/cache" "2.0.0-nightly.442+1572e394" - "@parcel/diagnostic" "2.0.0-nightly.442+1572e394" - "@parcel/events" "2.0.0-nightly.442+1572e394" - "@parcel/fs" "2.0.0-nightly.442+1572e394" - "@parcel/logger" "2.0.0-nightly.442+1572e394" - "@parcel/package-manager" "2.0.0-nightly.442+1572e394" - "@parcel/plugin" "2.0.0-nightly.442+1572e394" + resolved "https://registry.yarnpkg.com/@parcel/core/-/core-2.0.0-nightly.442.tgz#058195bb3c4f333874c923488a4fcdafac28c925" + integrity sha512-sEWAqRYCyBG+Cf8bvFs7rbMQovZivaUwUcnbqwaBhoUqmoHuxUJnBH2z0ht5TqFrzGiyZmNWXa3F4s875QzbMA== + dependencies: + "@parcel/cache" "2.0.0-nightly.444+e2136965" + "@parcel/diagnostic" "2.0.0-nightly.444+e2136965" + "@parcel/events" "2.0.0-nightly.444+e2136965" + "@parcel/fs" "2.0.0-nightly.444+e2136965" + "@parcel/logger" "2.0.0-nightly.444+e2136965" + "@parcel/package-manager" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/types" "2.0.0-nightly.442+1572e394" - "@parcel/utils" "2.0.0-nightly.442+1572e394" - "@parcel/workers" "2.0.0-nightly.442+1572e394" + "@parcel/types" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/workers" "2.0.0-nightly.444+e2136965" abortcontroller-polyfill "^1.1.9" base-x "^3.0.8" browserslist "^4.6.6" @@ -2289,72 +2289,72 @@ querystring "^0.2.0" semver "^5.4.1" -"@parcel/diagnostic@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/diagnostic/-/diagnostic-2.0.0-nightly.442.tgz#8ba93575c3f1ff17b538af4c380fd6616a07bc25" - integrity sha512-rL9vRNP6U+vyJ/ReNHZMqMNA1ffCQ2EpEiS97lr7jb6cRlXMgsVFEdD8aNOIT7qcp9G9ALiV+xZMAsQSCs84qQ== +"@parcel/diagnostic@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/diagnostic/-/diagnostic-2.0.0-nightly.444.tgz#ed1db5d1b4b30ee9490c03b07c38dca4790be426" + integrity sha512-nGlyju2MlkcufTZkFMZiOtk7/YKF7+L8ScWpM6i2W6nMTfDxh9OTlO68FBgXTYFEqr9eVeh4vzXZP6Dr4UQ3aQ== dependencies: json-source-map "^0.6.1" nullthrows "^1.1.1" -"@parcel/events@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/events/-/events-2.0.0-nightly.442.tgz#56ada13b1dbe01405082d56ac96a1db29475f2d6" - integrity sha512-QItzVrcsn1wNnVH5aoYDQjry4gqDONa6XTw0S/P/ccaXGgw+gUZPe+h74sPaTA8BfWBCskH8VjeUsvcA/nSwXA== +"@parcel/events@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/events/-/events-2.0.0-nightly.444.tgz#6f8cfa720590ffa52c763ab2a17137425de47993" + integrity sha512-r6EDHAWippZd2Zj24O4XQYvm3we9wExlmj+nVzAz4l4j8GQdzhS+qMyUsGh9UFOT0y0/SxyKhbxFpH27KqirgQ== -"@parcel/fs-write-stream-atomic@2.0.0-nightly.2064+1572e394": - version "2.0.0-nightly.2064" - resolved "https://registry.yarnpkg.com/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.0-nightly.2064.tgz#51dab77443533a1fbd681459fb07c3ba9e666224" - integrity sha512-chDwq1J6PfHlwXwlM8l9o049eAmgz9B4ErNZtEwsgXsxvRj4B44IbIMJTaRZulFucwRV5AXtht4ckfsV+miOjQ== +"@parcel/fs-write-stream-atomic@2.0.0-nightly.2066+e2136965": + version "2.0.0-nightly.2066" + resolved "https://registry.yarnpkg.com/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.0-nightly.2066.tgz#1b47bd5b64a4f83071323ed5587c827af6571986" + integrity sha512-mM/MXdDQmxD+K3o8Bjmt9tnEzDPyKUYy55OhFCNfAAn2WVjKp+lXX/Qd+naIX2/D4yzsFa0FsXC17n1wpAh4Dw== dependencies: graceful-fs "^4.1.2" iferr "^1.0.2" imurmurhash "^0.1.4" readable-stream "1 || 2" -"@parcel/fs@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-2.0.0-nightly.442.tgz#6078ee0380a342418a3cee269c47384a817550ea" - integrity sha512-RlUbXa5T4DCVLpmQigmmXBwzYn42eDbSHz4Q5+LpQdQd1RNGeYbR1IheBgVPDA0XVSXj/1UY//uDYRchxfaS3Q== +"@parcel/fs@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-2.0.0-nightly.444.tgz#3ca648e57120df1f279f6fe706454c14140664a2" + integrity sha512-csiTigyfyoJlb/nbt3Ga1Ib8CkfRboNMAwdrnHp0pc7omqx733B9Xs8iImNfqR1KLdL5yD8oIqqpzB8Kr24GfQ== dependencies: - "@parcel/fs-write-stream-atomic" "2.0.0-nightly.2064+1572e394" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/fs-write-stream-atomic" "2.0.0-nightly.2066+e2136965" + "@parcel/utils" "2.0.0-nightly.444+e2136965" "@parcel/watcher" "2.0.0-alpha.8" - "@parcel/workers" "2.0.0-nightly.442+1572e394" + "@parcel/workers" "2.0.0-nightly.444+e2136965" graceful-fs "^4.2.4" mkdirp "^0.5.1" ncp "^2.0.0" nullthrows "^1.1.1" rimraf "^3.0.2" -"@parcel/logger@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-2.0.0-nightly.442.tgz#89b3bd2dda7a6d23bd94741d7f76fd1af30edf95" - integrity sha512-YA6xN27q4fXYEya2oOYOP1/uj0uaNnaO6dnRjSYv86fAM5qThtSl2LnWIK6TvN805JErZm8mRbwWRDayM37Yhg== +"@parcel/logger@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-2.0.0-nightly.444.tgz#217a523f8f342fb49eb591c90e048b01d879b739" + integrity sha512-oSIVRt/w/JiKeD0nnrW/XecAHHtxjPeQvY6wOqp6h1gTrnE9Id6WBOB8up42JkcNsRGicC+FXa7ag252BBjxcQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.442+1572e394" - "@parcel/events" "2.0.0-nightly.442+1572e394" + "@parcel/diagnostic" "2.0.0-nightly.444+e2136965" + "@parcel/events" "2.0.0-nightly.444+e2136965" -"@parcel/markdown-ansi@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/markdown-ansi/-/markdown-ansi-2.0.0-nightly.442.tgz#cc693b46cbd2df4c60f64fc04cb5e483bab877b6" - integrity sha512-+JgG26I7jN8JSNJCpJNsn9au2ci7HM9bE+K3LGCaWeHLfxxQbq5oC6dzI5b5jmxxB0JKFugAc3YBx0ZfckswyQ== +"@parcel/markdown-ansi@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/markdown-ansi/-/markdown-ansi-2.0.0-nightly.444.tgz#2f2fbca0fe5eeb79d5eb205a99e1c6d346c72181" + integrity sha512-0HiYTFpdIc4/v/ZkTo7CqhfiQSXBvekX/1mb2hk2LG7khQcmqXFeSXH/GohlHnY9NZBZNmH+LsBVQ0VWR9V/ag== dependencies: chalk "^2.4.2" -"@parcel/namer-default@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/namer-default/-/namer-default-2.0.0-nightly.442.tgz#62bd0ad82be823219480cabf56faf991ca4225b7" - integrity sha512-Vho7fCkhHhSLQ/oR5Ru757PwDIx67zH/yaS3MrcwtWfvgydS9aiRswoG8xeaLwy+4M8I/TDpRt9e3pAmfdWFNQ== +"@parcel/namer-default@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/namer-default/-/namer-default-2.0.0-nightly.444.tgz#8fa2c0c98a8b706feb3d89af8ff89850b2a004b3" + integrity sha512-qJvXfXnPKM7eZedxV+Um+1UxN1QugFYkH6eNJx1HvbxV/Vwj0OBJ8AM4BobqPkoA1IxxsPW/d8uthCK+XVqsxA== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.442+1572e394" - "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/diagnostic" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" nullthrows "^1.1.1" -"@parcel/node-libs-browser@2.0.0-nightly.2064+1572e394": - version "2.0.0-nightly.2064" - resolved "https://registry.yarnpkg.com/@parcel/node-libs-browser/-/node-libs-browser-2.0.0-nightly.2064.tgz#b49bb4b1ef9e774e23e158ea652ff1888544eedf" - integrity sha512-iRMLprGbDcdwYC7b1fhY0eyFyl0mtQAalEGc63lfEr0LY3jXtJRt9reapsKZjGcQUNWF1lgjs4yfye6X8Dgvcg== +"@parcel/node-libs-browser@2.0.0-nightly.2066+e2136965": + version "2.0.0-nightly.2066" + resolved "https://registry.yarnpkg.com/@parcel/node-libs-browser/-/node-libs-browser-2.0.0-nightly.2066.tgz#78dd59bf9e4e136c0f115c27bb18e3d0145a120e" + integrity sha512-nzDPDjFqIqoQ68DEnVTP4GAFm28gililBSWTLWyWOXfLiN03WO5Fa2uCEQRBbod+Tlb8eonwcrglza8lxGlZOg== dependencies: assert "^2.0.0" browserify-zlib "^0.2.0" @@ -2379,71 +2379,71 @@ util "^0.12.3" vm-browserify "^1.1.2" -"@parcel/node-resolver-core@2.0.0-nightly.2064+1572e394": - version "2.0.0-nightly.2064" - resolved "https://registry.yarnpkg.com/@parcel/node-resolver-core/-/node-resolver-core-2.0.0-nightly.2064.tgz#f33945882a1315c361f555b978b5867b3326895c" - integrity sha512-PAhtLBmR5PkYSpD22NtOTRGtVQNghLBnJoQhaWMg74W8+UdB17hcoVS7Q8UHdgIPR5mZ+PB1hRN2/Yt2y65f4g== +"@parcel/node-resolver-core@2.0.0-nightly.2066+e2136965": + version "2.0.0-nightly.2066" + resolved "https://registry.yarnpkg.com/@parcel/node-resolver-core/-/node-resolver-core-2.0.0-nightly.2066.tgz#2b4b318c250d39c2580a3e43d840eaa8c4b625b6" + integrity sha512-qOujpQyPwVStiU+bHYkl9JTgl14eSQzmrIsXJ/RNrSHfadqgkgUcNp5DFPppqDmnLXIp7YwXl6mxjtgfFgb4Zg== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.442+1572e394" - "@parcel/node-libs-browser" "2.0.0-nightly.2064+1572e394" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/diagnostic" "2.0.0-nightly.444+e2136965" + "@parcel/node-libs-browser" "2.0.0-nightly.2066+e2136965" + "@parcel/utils" "2.0.0-nightly.444+e2136965" micromatch "^3.0.4" nullthrows "^1.1.1" querystring "^0.2.0" -"@parcel/optimizer-cssnano@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.0.0-nightly.442.tgz#6aeeaa4d4c477d406dbd173457ef72fe9984f735" - integrity sha512-XCZOqdgW+ljLf+yylz/eHY0BWsFN3OyV4igo/qfNwKItINvofoGQUHM0V2FxgRuy8awI/pHopQ1h2tItPDZ3PQ== +"@parcel/optimizer-cssnano@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.0.0-nightly.444.tgz#3ec149c63adb9a34b91596c2366f425bd54791f9" + integrity sha512-mKlXZlZfm1oe4cmUVh8CciqMQaO1wNZfkm0zQn5hLeAfI2Sd6krWNOesccE9+o6+7PlWVA1VP5g9cJbLOeyCqw== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" "@parcel/source-map" "2.0.0-alpha.4.16" cssnano "^4.1.10" postcss "^8.0.5" -"@parcel/optimizer-data-url@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-data-url/-/optimizer-data-url-2.0.0-nightly.442.tgz#8041d16a342f80f9913bd4dc8902ef200130b9a7" - integrity sha512-zLgvzmTABKeDqfsczw7zvPhIeYXMHfEPuBlR2w89t9dAXR6habUvOiwYumZ87qxvatrrc1OzK8/OqCV7X+THug== +"@parcel/optimizer-data-url@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-data-url/-/optimizer-data-url-2.0.0-nightly.444.tgz#381d1d5f0f91eb6822a05381326b6d769bda1616" + integrity sha512-s2f2fWIiWKl8CxgPL68JHt90qgxJ3UTYa7bhG2CqFnuBqxLkGAorqYHPq+ElRHy9pjKZuvGL5sOfFPYhmcUuLg== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.444+e2136965" isbinaryfile "^4.0.2" mime "^2.4.4" -"@parcel/optimizer-htmlnano@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.0.0-nightly.442.tgz#93d637c7788d60ca83723437ede5553c63fd13df" - integrity sha512-8mampv7H2vx4KBx9DmpT5h+AreQWARfukQ/2R7MLP5oJzaMBpqd8kfIJtIFRMrheSQRSgg0/gIXJrV+D/Kv3yQ== +"@parcel/optimizer-htmlnano@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.0.0-nightly.444.tgz#5008efbd4cd98b74c3edd197245827e32bde3458" + integrity sha512-uLN3Kj7n6Ppbic1EP4I8T8ZKktVz44TbcEV1B98HD0CEviThMOKIw+XG1UnI2rpbP//d13Qy/pHEl2YoXlr9uA== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.444+e2136965" htmlnano "^0.2.2" nullthrows "^1.1.1" posthtml "^0.11.3" -"@parcel/optimizer-terser@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-terser/-/optimizer-terser-2.0.0-nightly.442.tgz#d7a105e4651ac13ebab8192bde2c58f396a3c929" - integrity sha512-QwaegPtxmhSBhwIL7PhgaBGvozFNwVkzQoFYUW99c9Gb47B2XF77vxBQxhKrH/BUltMM3hMQq0aQAyLHLyK4lg== +"@parcel/optimizer-terser@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-terser/-/optimizer-terser-2.0.0-nightly.444.tgz#4eacd7ea22fe11c2fc65a66103b23cb4b9e08e02" + integrity sha512-DvauanAQ8ywyZYPtluq0FnbB2VNv5rzRsh8q3i3MKE0ElSN9aTn5MSKBMMzTIdVk5M8jzNldQW3toaXe83LhcA== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.442+1572e394" - "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/diagnostic" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.444+e2136965" nullthrows "^1.1.1" terser "^5.2.0" -"@parcel/package-manager@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/package-manager/-/package-manager-2.0.0-nightly.442.tgz#cc3a34664b8b9f9d3b0c48af9512d58586e678b1" - integrity sha512-5hCa6PrnpPx2s/WQJXakaegWJcKeqUrxvuG85sR4SntPb3AD3O0HJTHEsnCw8fMi1ijt/TyM9a8smccrEoRpkA== - dependencies: - "@parcel/diagnostic" "2.0.0-nightly.442+1572e394" - "@parcel/fs" "2.0.0-nightly.442+1572e394" - "@parcel/logger" "2.0.0-nightly.442+1572e394" - "@parcel/utils" "2.0.0-nightly.442+1572e394" - "@parcel/workers" "2.0.0-nightly.442+1572e394" +"@parcel/package-manager@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/package-manager/-/package-manager-2.0.0-nightly.444.tgz#98414d390b72aa96eb5d1783f709b4730139e395" + integrity sha512-FS+neGRcUGnOxRMnRPsrg9yu5YotgrGZepm/cTVnitLJh/de4dXto+GIJWlI/yjNdYPRWgObn+dnaJfTNg/3cQ== + dependencies: + "@parcel/diagnostic" "2.0.0-nightly.444+e2136965" + "@parcel/fs" "2.0.0-nightly.444+e2136965" + "@parcel/logger" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/workers" "2.0.0-nightly.444+e2136965" command-exists "^1.2.6" cross-spawn "^6.0.4" nullthrows "^1.1.1" @@ -2451,91 +2451,91 @@ semver "^5.4.1" split2 "^3.1.1" -"@parcel/packager-css@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/packager-css/-/packager-css-2.0.0-nightly.442.tgz#f2d51f495cc5415790844436cf3781412b9d0d34" - integrity sha512-OlxdCd+6VjlDJwNHx3v5DwgjlL2jaqdXeSWanRllygXAcRPC7+n69Ds27soNSKUJ4765WFJDKNbOGG1a5hqvOA== +"@parcel/packager-css@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/packager-css/-/packager-css-2.0.0-nightly.444.tgz#43b5f848b0ccee2c2a11016d0f7734a29104f53b" + integrity sha512-jQRxz00jHtnbh8vunIjYzGYYxvyC0ToSh3gh2uiGogbHWtTzdWhL6x3cBOQq7n4B4BlBKx6KFqARnE6lcDHMFw== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.444+e2136965" -"@parcel/packager-html@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/packager-html/-/packager-html-2.0.0-nightly.442.tgz#173e3f17d16cd09797a306adc9d71660729d91a8" - integrity sha512-fs+AjyO39inrGbQ5iulIyzt2AFUosWNWXujoXMRRwlApkCaN6QEioH6n0r9XZ0lVplJPkZpgS9kLNA/I6mLbRA== +"@parcel/packager-html@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/packager-html/-/packager-html-2.0.0-nightly.444.tgz#786245074813277a6d41d6acf727572470335978" + integrity sha512-azFEsn9PzWXpollTLN0qpvy8wjgl6OuOP5IF1JJm9sa3k0mWQNNiNSKKkPhQVYIxPXhcXIUFGY8QZDsdAzVIzg== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" - "@parcel/types" "2.0.0-nightly.442+1572e394" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/types" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.444+e2136965" nullthrows "^1.1.1" posthtml "^0.11.3" -"@parcel/packager-js@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/packager-js/-/packager-js-2.0.0-nightly.442.tgz#e4afd2023ee77cb1a41fcf56aad1b9e9ee3684a0" - integrity sha512-P+za6XldIPPLQmqD0ZUUewJn4z7xq3TBajeiv4s6JVsSmicpin0s1XCWOqPY6xlp9ebJs8toQ+IquMjVbWaxIQ== +"@parcel/packager-js@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/packager-js/-/packager-js-2.0.0-nightly.444.tgz#a456bf058cffaafbb73ae7fd76b0734d6bc93619" + integrity sha512-xKNIXEQpkuLKWqjaj0Y582P8cqe+J2F1zWxUKbGHeaBvGFjnLqWtHA6SpP44/JyasnmdHfCOcz5BGyBY/6gG2w== dependencies: "@babel/traverse" "^7.2.3" - "@parcel/plugin" "2.0.0-nightly.442+1572e394" - "@parcel/scope-hoisting" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/scope-hoisting" "2.0.0-nightly.444+e2136965" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.444+e2136965" nullthrows "^1.1.1" -"@parcel/packager-raw-url@2.0.0-nightly.2064+1572e394": - version "2.0.0-nightly.2064" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw-url/-/packager-raw-url-2.0.0-nightly.2064.tgz#2e4ceb87bbbe30c947635c10f25fcb778216b24f" - integrity sha512-lgYFlPADOZPCUxHoPs/iigqegHtk46+41En4+1vM6j+0GsrOGiI5DtMSiRLz+nTqkZ/QiRN7d0M6N0Reggi5fg== +"@parcel/packager-raw-url@2.0.0-nightly.2066+e2136965": + version "2.0.0-nightly.2066" + resolved "https://registry.yarnpkg.com/@parcel/packager-raw-url/-/packager-raw-url-2.0.0-nightly.2066.tgz#914a8cd87a6a39a5409cbacd79b0bee4ca230071" + integrity sha512-THMH4Oa7x679lew3praIt0xYOCykMWuH5/DRt8AdOVXTGDYc5JfARHvXZc4SI0ZQCqksBhU22B436hePqH/qSA== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.444+e2136965" -"@parcel/packager-raw@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw/-/packager-raw-2.0.0-nightly.442.tgz#99eb809b35d92f5e8e8029754e48e0326633f530" - integrity sha512-XwJWh1WfGruu7EOOow8g8gWfRhna0r61kzp6EsGD52JcRfHazk/2crQOdIp6g59eTM0McuiWvrnQaHGL+JbYEw== +"@parcel/packager-raw@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/packager-raw/-/packager-raw-2.0.0-nightly.444.tgz#4b904509fd4b7567056032e216bc8f9868327de6" + integrity sha512-/CI4PpeelABTja4oYnTtANWYYfr/z7u+9YNz84w3zJOynQJ20zAVatYOH0N+4KapDfoSz27MfQujNwhrax3l1w== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" -"@parcel/packager-ts@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/packager-ts/-/packager-ts-2.0.0-nightly.442.tgz#122e4bfa7a7a40949e8da41ac3494f0bab8fe574" - integrity sha512-dZ7EWTR1mLcRyBtjhN6ilOSIddy5n9TUrP5/YhLZl9dNfwySv0xVI5bz9dg3AWo2oWY8LsPgL/FGrPccvocW+A== +"@parcel/packager-ts@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/packager-ts/-/packager-ts-2.0.0-nightly.444.tgz#21957c442510b4e2b9f51a1a167874a9d6283506" + integrity sha512-Mr0tiSV5+0f0bTDouFQBmA/gR2x8fbqFOOtLGHmRjn+1X5+20ClrcQPnwPCiuvwd4PhFn7BahrI+YJsGtxw9vg== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" -"@parcel/plugin@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/plugin/-/plugin-2.0.0-nightly.442.tgz#05319c57475ab99a2479a2b1ef72a23a2626bb5b" - integrity sha512-M+GUjvLUHS8N0p+hl9QNDaUwbxqlMnBuAo56lEpGhad1+QWVdky4chPfnWTfxzDr4tAEcatJQAcBxLVwBTQrtg== +"@parcel/plugin@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/plugin/-/plugin-2.0.0-nightly.444.tgz#ac6a0bdb861d7b76fad28060ca74cf4735d1b23c" + integrity sha512-7EIliO7OHlzljKeb9n353xahcdGh4F6WIuu1lrM82bB4tsmnvFDeLetmEXppKo1brr7I3J15joF15TtZi7wBaQ== dependencies: - "@parcel/types" "2.0.0-nightly.442+1572e394" + "@parcel/types" "2.0.0-nightly.444+e2136965" -"@parcel/reporter-bundle-analyzer@2.0.0-nightly.2064+1572e394": - version "2.0.0-nightly.2064" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.0.0-nightly.2064.tgz#657f8f1af9489cac19f086d8ee62918a74f365ea" - integrity sha512-Rz7/BqlucCiuyopX9Sd2yByGMzp29EIyGIJqQgJJpA6VqwFkAvkBjqU3PmnB382JNbCiwGAbBBFJ/nH1z1uQyg== +"@parcel/reporter-bundle-analyzer@2.0.0-nightly.2066+e2136965": + version "2.0.0-nightly.2066" + resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.0.0-nightly.2066.tgz#1dc919854376ef9124cee2de2064346b1fab8c9c" + integrity sha512-OUWFYSWLkOoqta2hQuVb4wctStJ96gsolNGzOjANTdirOIYcN8IH9EcDPic0KNZTdRQYS4K5Yr7TkNU2x/JlsQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.444+e2136965" nullthrows "^1.1.1" -"@parcel/reporter-bundle-buddy@2.0.0-nightly.2064+1572e394": - version "2.0.0-nightly.2064" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-buddy/-/reporter-bundle-buddy-2.0.0-nightly.2064.tgz#2e50d6698338cf82521a4386119046eed58c6bc0" - integrity sha512-hhwsUQsEfdP9hKcX2GM78lxJXvgKJuHwpV1aCLmoGQINZBvOo1STrn+fGaaFTbv/maOyf2f/cato3xP8H0X8oA== +"@parcel/reporter-bundle-buddy@2.0.0-nightly.2066+e2136965": + version "2.0.0-nightly.2066" + resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-buddy/-/reporter-bundle-buddy-2.0.0-nightly.2066.tgz#c4e7a1031895458e769166856d4bf0625b3eb1d9" + integrity sha512-Vh+Hfq1ynme6AZPKXPa/LCacTX3GzgpxM8xIIuXCbvLa6yK2Mx6P8CUz8uW13Sjkw+6HPmmVKVFv7FMCwPAB0A== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" -"@parcel/reporter-cli@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/reporter-cli/-/reporter-cli-2.0.0-nightly.442.tgz#285a5bc0a550f4b5a01baf85d3b0d15950fe00a3" - integrity sha512-SwPs2eRSHNxbWZykfUiBlZS9XjCgYPizCg/rKJXX3/PUuAcngrSVR1AQxKYhFkF5UCaanHcz6p3gXTVXPEDCiw== +"@parcel/reporter-cli@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/reporter-cli/-/reporter-cli-2.0.0-nightly.444.tgz#d87857853edf7395be3aa905ba35a5e0155e990e" + integrity sha512-4eHfegZGPVbEa4wWjbfSI02n+QjUEiMo2slxvEL8kLTjs01n7T76Z4QTOlqofOuymkF3vyI3PZtw+jSDfSJK/g== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" - "@parcel/types" "2.0.0-nightly.442+1572e394" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/types" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.444+e2136965" chalk "^3.0.0" filesize "^3.6.0" nullthrows "^1.1.1" @@ -2544,13 +2544,13 @@ strip-ansi "^6.0.0" term-size "^2.1.1" -"@parcel/reporter-dev-server@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/reporter-dev-server/-/reporter-dev-server-2.0.0-nightly.442.tgz#39d92de590341d499743d568b1db60586b13a57f" - integrity sha512-JZK3Z7XoCktFhBMGjFn0EVQF3mjH0r8tZUTHgolENaqN2Wa7HFaA48kLYCnTo63clNRSMHzh8iBOF4UtcWh0qQ== +"@parcel/reporter-dev-server@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/reporter-dev-server/-/reporter-dev-server-2.0.0-nightly.444.tgz#0c45bc2e7c2a89297c18833ba0d171a7a645abdc" + integrity sha512-kjnAkdHkOoaUTS3+aVC42w+tGf7U6f5gWjeloKl1TkuChbV0dzNzyCGJHLve4tBtBoyAscb+hhOR96WFbBTs+w== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.444+e2136965" connect "^3.7.0" ejs "^2.6.1" http-proxy-middleware "^1.0.0" @@ -2558,54 +2558,54 @@ serve-handler "^6.0.0" ws "^6.2.0" -"@parcel/resolver-default@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/resolver-default/-/resolver-default-2.0.0-nightly.442.tgz#be927df2b47972a324f60c4b58edcf4f7252d6b2" - integrity sha512-AhhA/9uU1qJTu2F9SmpL6DsSCMHBxy4DVVEfvBBDrHB2VPgsBGt50/IwnuEfUFGY862QNnTFOI2CFIKUdvuYVg== +"@parcel/resolver-default@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/resolver-default/-/resolver-default-2.0.0-nightly.444.tgz#4ee9126d5989cbfe72c6daa0e70c2ddd50615e89" + integrity sha512-fIIw8FV35XoaTYsBZ4Y5ObtxujhUMYkmGbRSIapCr7kUqXCoPsxuUbEM5WA9dYvZ9i+6nh7wfzIT1IMn0Quv/g== dependencies: - "@parcel/node-resolver-core" "2.0.0-nightly.2064+1572e394" - "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/node-resolver-core" "2.0.0-nightly.2066+e2136965" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" -"@parcel/runtime-browser-hmr@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.0.0-nightly.442.tgz#ec5c430037f370b6f351e9078e8df1c596b45a85" - integrity sha512-DLbeGNRZo0HDgyZq6JycfF/GIA/J1w3oA3hGr13fvuryfhdKng3mRxj9Tjqd+2Y3m1ZDJ4DaA8QQMVklbOMmaQ== +"@parcel/runtime-browser-hmr@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.0.0-nightly.444.tgz#f56f3ad6beb9db061bb033c43ad873cf688d736d" + integrity sha512-S5cEICwMvMm+zfyvrOKTmj0jwc1zGE2t9eKTCqJ87c2WGJZwPHqawc43cWj6jkaEtxIsNf5m3CwNhKrEosWaBg== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.444+e2136965" -"@parcel/runtime-js@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/runtime-js/-/runtime-js-2.0.0-nightly.442.tgz#fe40d6528eb1613c48131cefa460c63e7080bfcc" - integrity sha512-upSaL1u/vFnp5YhUR3MAqf+LaPGsUziGTAV+zl+XgDFPemYYGsjO2NwlTkaVbjXy3Q2V3x0LNBdStsCUFycqdg== +"@parcel/runtime-js@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/runtime-js/-/runtime-js-2.0.0-nightly.444.tgz#c466f4237460518826ea96117438fae7cee3a407" + integrity sha512-k6hbNdxBptsg3AYztDNoeLlQ2FV/RbIM+qCADYslynIYFRJv8BiXQwOwusioUTscUVvFqfOHFxq67eOhLPYjpw== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.444+e2136965" nullthrows "^1.1.1" -"@parcel/runtime-react-refresh@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.0.0-nightly.442.tgz#83d9e1dc91203c923977d8a1b7b817570720ca22" - integrity sha512-aqE6C1/748MEwm8pVX+6+wVhxlWlmCYFLedmIktGPcIdzY7LgV9WmakwutfDofp/9n3nvuWNOeNcE6F6FNe9kA== +"@parcel/runtime-react-refresh@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.0.0-nightly.444.tgz#99fbbab6da0859a08661e8eeaad06e9e4870f081" + integrity sha512-HS+aGPvVg9LlkPiBiBvhMV4b8tanEiy++V5E7weOjqMMfVxHZsJDg6Q1MKyedsgC4rvk2v5jmFsbgqk0hbjBag== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" - react-refresh "^0.6.0" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" + react-refresh "^0.9.0" -"@parcel/scope-hoisting@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/scope-hoisting/-/scope-hoisting-2.0.0-nightly.442.tgz#8f9c0cbf74e215ef6677bb4342724bac8c081d3e" - integrity sha512-4pXgdvhvLdfGsbIi3emDFDhAb///1rNbESQHIqRixckz01u3Pzp8YzHH2UGk0CAat7TizZ6eFCLTiUmVNhLSpQ== +"@parcel/scope-hoisting@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/scope-hoisting/-/scope-hoisting-2.0.0-nightly.444.tgz#1c46e31469259f489ab4c1e8d89a27231d4c4ec2" + integrity sha512-lHBWPFnWrqusp1XPvTqJaa4oSFALrjvsj9Ae31qJOStsbOxrpJCzJPl6+sJfmYSjH2IizwlQjWiXq4PKrq1tRQ== dependencies: "@babel/generator" "^7.3.3" "@babel/parser" "^7.0.0" "@babel/template" "^7.4.0" "@babel/traverse" "^7.2.3" "@babel/types" "^7.3.3" - "@parcel/babel-ast-utils" "2.0.0-nightly.2064+1572e394" - "@parcel/babylon-walk" "2.0.0-nightly.2064+1572e394" - "@parcel/diagnostic" "2.0.0-nightly.442+1572e394" + "@parcel/babel-ast-utils" "2.0.0-nightly.2066+e2136965" + "@parcel/babylon-walk" "2.0.0-nightly.2066+e2136965" + "@parcel/diagnostic" "2.0.0-nightly.444+e2136965" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.444+e2136965" nullthrows "^1.1.1" "@parcel/source-map@2.0.0-alpha.4.16": @@ -2616,10 +2616,10 @@ node-addon-api "^3.0.0" node-gyp-build "^4.2.2" -"@parcel/transformer-babel@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/transformer-babel/-/transformer-babel-2.0.0-nightly.442.tgz#507c988007e113beff91e326b19d76ce7db53637" - integrity sha512-s8qJ9gjb80IVok0kZDVBJ3OdQB4t0acGDU0FvUS0dom5QH4mDrdx9H4pLCyvQUhagRgG4obR3zxOM8F4btpusw== +"@parcel/transformer-babel@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/transformer-babel/-/transformer-babel-2.0.0-nightly.444.tgz#c88446ceda04674c7552cbd4e96bfb5bf8c11dbe" + integrity sha512-/ADoA06rrvZN66/Xod8Fsy0xT/N6azn1XT9CoM0G2saXPyN9xpJINbTIT2tfci8zq8vdLoJGfpnP2MOYQyo38A== dependencies: "@babel/core" "^7.0.0" "@babel/generator" "^7.0.0" @@ -2629,85 +2629,85 @@ "@babel/preset-env" "^7.0.0" "@babel/preset-react" "^7.0.0" "@babel/traverse" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2064+1572e394" - "@parcel/babel-preset-env" "2.0.0-nightly.442+1572e394" - "@parcel/plugin" "2.0.0-nightly.442+1572e394" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/babel-ast-utils" "2.0.0-nightly.2066+e2136965" + "@parcel/babel-preset-env" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.444+e2136965" browserslist "^4.6.6" core-js "^3.2.1" nullthrows "^1.1.1" semver "^5.7.0" -"@parcel/transformer-coffeescript@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/transformer-coffeescript/-/transformer-coffeescript-2.0.0-nightly.442.tgz#d6f7c968bbc2a77ecd6aa0dfd2d475080d1087da" - integrity sha512-3IFOCbmLIaGOYF6ZAYKC/1uN/fklais7kSPJQdMWCaB7w0Xz55nuGkCqOIPfnzOjb0cQRXRRoZ5yDjaMV6oveA== +"@parcel/transformer-coffeescript@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/transformer-coffeescript/-/transformer-coffeescript-2.0.0-nightly.444.tgz#abf0cb23a431084efae9752579db883fcc24033a" + integrity sha512-3KBX8NP6I3O4wnxC3mkqvgcOinKQIf4vmjlQryMysUKZt7rK8451J3PHQqVwlzK3ALHvLsWTC7I0JmXFR4hwUg== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.444+e2136965" coffeescript "^2.0.3" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-css@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/transformer-css/-/transformer-css-2.0.0-nightly.442.tgz#ad73fa845488d394fd598351f06e7bc23c99b9aa" - integrity sha512-KyGcfQFlBJ52ziqprWim42NdLiFHvg8F20vq34eSo3Yc/fhAP2wsswEOAk1G2SB7yVsoqE6drmNUyno6eVi+QQ== +"@parcel/transformer-css@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/transformer-css/-/transformer-css-2.0.0-nightly.444.tgz#d9c3c83b5b5b87faa721254031b91d8f5da3a091" + integrity sha512-dxXsV4kAdRGRcdzALOEXG1rsV1Y270F17y2k6HdKRcsashOkAiEr3AxKkj3i8y3ztfnQleQcyr+TXX8ErX/EPg== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.444+e2136965" postcss "^8.0.5" postcss-value-parser "^4.1.0" semver "^5.4.1" -"@parcel/transformer-glsl@2.0.0-nightly.2064+1572e394": - version "2.0.0-nightly.2064" - resolved "https://registry.yarnpkg.com/@parcel/transformer-glsl/-/transformer-glsl-2.0.0-nightly.2064.tgz#89fbc3763142a05b0776955a26254f0544972fa7" - integrity sha512-WGdsft6k7J0GZWgmCK7Fwox8AnK94JFk4dMibq48CdwQTjh2oDQPKdz1ChGM9HEQ0TQGK7BkHsd5SgOv9qx8mw== +"@parcel/transformer-glsl@2.0.0-nightly.2066+e2136965": + version "2.0.0-nightly.2066" + resolved "https://registry.yarnpkg.com/@parcel/transformer-glsl/-/transformer-glsl-2.0.0-nightly.2066.tgz#e9a010dfa6da01decabd8c182a9c7e604b83a1a6" + integrity sha512-lLuoWjTS3Z+DHW4HSNnkFh6uG62gcxMjWRERlsozIzW9h3M86tYn/o8otd1veZfKQAj33cCmcSJ6VMSCsXlB2w== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.444+e2136965" -"@parcel/transformer-graphql@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/transformer-graphql/-/transformer-graphql-2.0.0-nightly.442.tgz#cd47c682e379b958b9b31db0fb48daa471cb1c57" - integrity sha512-m/cfu86fbzCM2Ia+bZSZ0LWUb0IlYbR+FXtyvR28U2vSOfj7N9L1f1kWCAkwInK0TMcWBJMHZ95apjMjvssn+g== +"@parcel/transformer-graphql@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/transformer-graphql/-/transformer-graphql-2.0.0-nightly.444.tgz#f307aef9fe2f8286ee34487d419d2398257edb6f" + integrity sha512-rT7AANVXFdhv+URURKvNGc7EyH4lsaQp5528BxN6lQ+LfmG9sjN7ZVcUp1YU0enm3ul4fiv1AUCFJhfCFgXNBA== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" -"@parcel/transformer-html@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/transformer-html/-/transformer-html-2.0.0-nightly.442.tgz#2b3109d0f14d52d2144552a638a0f16c39f269d6" - integrity sha512-iyEH+aefIwd1XMEH81gy3xo0+bcApFIUBe6sVCvII8xBdnUjeahy/0Y/4basAkOLV5V0rhUYiF0ZoKRraQRYDw== +"@parcel/transformer-html@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/transformer-html/-/transformer-html-2.0.0-nightly.444.tgz#525c8dd1d18347f3434f642f5a5867e8f43fa5ad" + integrity sha512-rZJOvDpNPdDq6dNroY86ofeDJQDV0N2z81dk1itR44lyWS/W6Xu4Nx1x7zp6bK/CMzoF6rk6mEATo1D0neEzlw== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.444+e2136965" nullthrows "^1.1.1" posthtml "^0.11.3" posthtml-parser "^0.4.1" posthtml-render "^1.1.5" semver "^5.4.1" -"@parcel/transformer-image@2.0.0-nightly.2064+1572e394": - version "2.0.0-nightly.2064" - resolved "https://registry.yarnpkg.com/@parcel/transformer-image/-/transformer-image-2.0.0-nightly.2064.tgz#5a83373d57a9a9abf88a5b930b1f616c62f3b326" - integrity sha512-tNg4jYnbIhWyE2LEDPr+JAN/vZsG1wQp++NBQdNB0sjAKbanF11MjqR6qr6ivE4Gs4GVZGOWl3wRpnrKFcBY9Q== +"@parcel/transformer-image@2.0.0-nightly.2066+e2136965": + version "2.0.0-nightly.2066" + resolved "https://registry.yarnpkg.com/@parcel/transformer-image/-/transformer-image-2.0.0-nightly.2066.tgz#2919e3d84003c50aac70492bc1d24d3dc61578d7" + integrity sha512-NzEvG5JidDx71YlvmqM6jiQsUOEtfCvKdbGVXxiLj6GVrjtILwMhu1A3BI5f5ltasmCOa6q2ZlNnsxSuBOtiOg== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" -"@parcel/transformer-inline-string@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.0.0-nightly.442.tgz#4ecc0d10b80b331b6d78402ac00e1314658dc200" - integrity sha512-wuf+qaFB9mBH6b9GrRhuWnkZBxbEUWaBzvJTFtyCTNCD8Hn/2+K/t/yT2w5oFwMvB1crE5pKIsveZS4jt0KJIA== +"@parcel/transformer-inline-string@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.0.0-nightly.444.tgz#b80d88074a5d10e44ac4287cbf7803283c6cdd6b" + integrity sha512-/OCAydewYjYaUKJwjBLOoRjqEvTZnqqZX3M75f9WhoaILoVqBZzX1HwSxkm5JG7UPc9252rCfLLY0H3MjreQGA== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" -"@parcel/transformer-js@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.0.0-nightly.442.tgz#b27821bade3aa46b58918919137c40b868342535" - integrity sha512-7MzCqYhhwSWPi15aKIWgUCCqomDk7yPq1tEphFGEh7qGklJ0szfwvZxFSgu5zY48eVrsewleu41gtsJ4B7MUHQ== +"@parcel/transformer-js@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.0.0-nightly.444.tgz#b3c9e90a1c461ba382d69c646cc2311f1217e9ca" + integrity sha512-/IpSYzhdBMwPuytsjCBYq5YrwatHeVhn2Hk+oa0YYnLuAwRqrVlDYuFGto1afmOsHNYlbt56ME8p2WNQu0BF3Q== dependencies: "@babel/core" "^7.0.0" "@babel/generator" "^7.0.0" @@ -2716,193 +2716,193 @@ "@babel/template" "^7.4.0" "@babel/traverse" "^7.0.0" "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2064+1572e394" - "@parcel/babylon-walk" "2.0.0-nightly.2064+1572e394" - "@parcel/diagnostic" "2.0.0-nightly.442+1572e394" - "@parcel/plugin" "2.0.0-nightly.442+1572e394" - "@parcel/scope-hoisting" "2.0.0-nightly.442+1572e394" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/babel-ast-utils" "2.0.0-nightly.2066+e2136965" + "@parcel/babylon-walk" "2.0.0-nightly.2066+e2136965" + "@parcel/diagnostic" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/scope-hoisting" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.444+e2136965" micromatch "^4.0.2" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-json@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/transformer-json/-/transformer-json-2.0.0-nightly.442.tgz#098b35cf4384b3b16243ba5d3b0624a33d52c314" - integrity sha512-CCz1SNAkMFSrl1ydOibkVjH4jZ1wyz1ZLGjRkOXKtejJqjvlTPd6w/IPhl+uBbhxFmkc1Y3wNSc0xeYjZ8mTtg== +"@parcel/transformer-json@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/transformer-json/-/transformer-json-2.0.0-nightly.444.tgz#d2775cb08cb3e40e04ee173d86dae4dd33ab566a" + integrity sha512-DsdsFngJpq4j8TgGFGaP2DiQQHN1E8mQDDGvgJFcNjxAESYaVvWOXXANLdNA5pfnSnZP94BcdTb67ZU5a870kA== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" json5 "^2.1.0" -"@parcel/transformer-jsonld@2.0.0-nightly.2064+1572e394": - version "2.0.0-nightly.2064" - resolved "https://registry.yarnpkg.com/@parcel/transformer-jsonld/-/transformer-jsonld-2.0.0-nightly.2064.tgz#208adcadc278c7c8d350e518585909abdbe40fdb" - integrity sha512-TIqQ42ng4RIZmgmDsXfTzepUmZ0fz71SZl5MaeLh7PVkhBkUYwshQyv33EaCkELVNPArkCu3nPOgmZPHZFtDDA== +"@parcel/transformer-jsonld@2.0.0-nightly.2066+e2136965": + version "2.0.0-nightly.2066" + resolved "https://registry.yarnpkg.com/@parcel/transformer-jsonld/-/transformer-jsonld-2.0.0-nightly.2066.tgz#30321d699974c74fd595bf91f4b3675611982683" + integrity sha512-tt/avA5iW5HgxTkqubzhDtCpgrsR8VMddVDtuaB1S3fWUJkC25gDcyLabPWQ4HjQKQeRMtQ3HdRSJGFEY33OWQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" - "@parcel/types" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/types" "2.0.0-nightly.444+e2136965" json5 "^2.1.2" -"@parcel/transformer-less@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/transformer-less/-/transformer-less-2.0.0-nightly.442.tgz#41438b256d435a7b862ef13d602f68cf463cdc92" - integrity sha512-dsLMQt6lJ761dqHXPY3Ac9w+LUhgdhMCy/FNFsIxJRfDmtTuu3XFwDtvX698Q4RrmXbA+SljS2XD9xs3Dc927g== +"@parcel/transformer-less@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/transformer-less/-/transformer-less-2.0.0-nightly.444.tgz#f356264dd5c4f0904a7b5d74d645bc51ae0c3857" + integrity sha512-rlAqR/Kxu6qBfkAhgDSkQClWYl+Oy0bIUJ8f8RGbj+EltCAUeUpVzM1V4/Cf1pskx2dA/ddbzU6HNPnTLnw4QQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" "@parcel/source-map" "2.0.0-alpha.4.16" -"@parcel/transformer-mdx@2.0.0-nightly.2064+1572e394": - version "2.0.0-nightly.2064" - resolved "https://registry.yarnpkg.com/@parcel/transformer-mdx/-/transformer-mdx-2.0.0-nightly.2064.tgz#f26235a9b3a0fb1970eaadd15492ec96d154220f" - integrity sha512-UBw0ECZWl9pQzo5Hfkb2PMmuI29+D/PzpWU0JtTTinEXFziIBGZTrPEeSzxueGdW9j3z64JHgBfVCwsjoEineA== +"@parcel/transformer-mdx@2.0.0-nightly.2066+e2136965": + version "2.0.0-nightly.2066" + resolved "https://registry.yarnpkg.com/@parcel/transformer-mdx/-/transformer-mdx-2.0.0-nightly.2066.tgz#6e198221e557e45cc69aa52967d6e08b77297fc6" + integrity sha512-vUlLXliFLswYEyluM3UnFlWJBP1UWTP0PsFAji9JnSgwJjJdd8VN2ionUgfxt127GCa2207nEwoCKFJndxRXaw== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" -"@parcel/transformer-postcss@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/transformer-postcss/-/transformer-postcss-2.0.0-nightly.442.tgz#1e412363f7f64760342cb73a97a22018ece12faf" - integrity sha512-Mb62rmbQpVlv9vOrTawu/YvcSaqlng5DSiMaoxg+MvL2KpRpEqScQ3B5gA91QiEOAkfV6KkmZdBw7xttHipteg== +"@parcel/transformer-postcss@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/transformer-postcss/-/transformer-postcss-2.0.0-nightly.444.tgz#1edaef51580df346e615008bd00b3cf603011ae1" + integrity sha512-lABqSvFMgwXc9GQk4ab4eACSZBoWWNQ29TM0ggyCMvWbmVCdRAyRWxcuihot1IeJseEW21/p3VzPwKvOViXE/A== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.444+e2136965" css-modules-loader-core "^1.1.0" nullthrows "^1.1.1" postcss-value-parser "^4.1.0" semver "^5.4.1" -"@parcel/transformer-posthtml@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/transformer-posthtml/-/transformer-posthtml-2.0.0-nightly.442.tgz#2428c7b950c9bf9969c511f059f43a8ce349ab74" - integrity sha512-besL6BiRMgecQTItV+G4xdGKJEpdYYHpMzR33JGwOXYdHM3rNc3iUIplkc6IwpTjcejYGxAMbm+UlqgXyVFWCw== +"@parcel/transformer-posthtml@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/transformer-posthtml/-/transformer-posthtml-2.0.0-nightly.444.tgz#23b8a5476d88612200c0e21fc8e6491b8474c85c" + integrity sha512-dKfoy86FoDaPic9I7J3h6zGbUy0qrAmIDIQJDoIySrhYlgr1qgJTEgKFg5s2E4IIzmw4leCQzVNYCDmEBHq3Qg== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" nullthrows "^1.1.1" posthtml "^0.11.3" posthtml-parser "^0.4.1" posthtml-render "^1.1.5" semver "^5.4.1" -"@parcel/transformer-pug@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/transformer-pug/-/transformer-pug-2.0.0-nightly.442.tgz#4ca4eb6ece1f94963e07d2af9d3e7004073a9b56" - integrity sha512-QobktRWxetiMnPQOtCWb/XxBKhjSQL5ooyGyYUP8etdxH5BWggWyNcsliEKrv5V+LBDHYMRjTJI5a6hTZ3Kgew== +"@parcel/transformer-pug@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/transformer-pug/-/transformer-pug-2.0.0-nightly.444.tgz#194e02ec75d79360096db41fde133f3f6f542c6b" + integrity sha512-Z9W/PmpRG+MPUEi83tr2hUZ7sS42QHuWxo+7N0ODQ+oCiSnZjWWhMgOWnuXkqkTK49J8ELIkzMkX8qm21Yk4qg== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" -"@parcel/transformer-raw@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/transformer-raw/-/transformer-raw-2.0.0-nightly.442.tgz#75f67ad2791f58231b8c826eeb169d4e832d112d" - integrity sha512-Ve7zA9QdEOG9ikMmkBLB2IcZ2uX8SdpUeAY80Qfz0GynPTYl+fGtfMK8pG4pnmyLDKfvIcWdPbS4ngeLC6h9pA== +"@parcel/transformer-raw@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/transformer-raw/-/transformer-raw-2.0.0-nightly.444.tgz#d4a83b228310aa8ecf6e1d9bd85fbc38f9c57eb8" + integrity sha512-aKfHRTttYOG+084n8O/H6lG4bfg54Lfxl20/hg6NY2bANrfFKUz/2pvRxnv5zr24Wt4hvDKSuyfVnos6uw4i6g== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" -"@parcel/transformer-react-refresh-babel@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-babel/-/transformer-react-refresh-babel-2.0.0-nightly.442.tgz#f56b9d29fe8ae94a25f5ed6ac0ed071ac8b03172" - integrity sha512-b0t774lYoUlFMFPj+dZBXZA67oX/EWseooGGqwidre/C2MTbFnlm3dbcN9Qb62O4VgAjvuNQoP0V/LOm/sT5aA== +"@parcel/transformer-react-refresh-babel@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-babel/-/transformer-react-refresh-babel-2.0.0-nightly.444.tgz#e34a1e5fb5023bfcfc5ced3727153c9a43732f7a" + integrity sha512-G9coZvaKEUwZLvzxQ66FOw9/KLNeKdSN2v7LeFG0V1SZ+pXOV7FWnEmTKF6cbBt4BCdin6QxncUNKKSL9vI+mw== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" - react-refresh "^0.6.0" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" + react-refresh "^0.9.0" -"@parcel/transformer-react-refresh-wrap@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.0.0-nightly.442.tgz#d62a6d6a4409aeef5744bcbba67c4017670bc531" - integrity sha512-8zNCM6KkuluDiVyYKdqX4fIzW2ovbLXuKTg7te3DBWZgj1VwJG1neSFaMlmM5b3AvtVTfYHBDUElapTfArfEBw== +"@parcel/transformer-react-refresh-wrap@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.0.0-nightly.444.tgz#8ea823786dab7f595c6dbadf1661f44131d766f6" + integrity sha512-iLZpR/CiMyNwGGIV+sJvfk+OkhFT372UBxDb2PdApp+2hVMAW97pwGb+X+Uz3dehvXoJtXDhWqT1OIXq09Yjkg== dependencies: "@babel/generator" "^7.0.0" "@babel/parser" "^7.0.0" "@babel/template" "^7.4.0" "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2064+1572e394" - "@parcel/plugin" "2.0.0-nightly.442+1572e394" - "@parcel/utils" "2.0.0-nightly.442+1572e394" - react-refresh "^0.6.0" + "@parcel/babel-ast-utils" "2.0.0-nightly.2066+e2136965" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.444+e2136965" + react-refresh "^0.9.0" semver "^5.4.1" -"@parcel/transformer-sass@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sass/-/transformer-sass-2.0.0-nightly.442.tgz#b2b6e68072e3f0673d9c0d6deb812f5cc48231ac" - integrity sha512-KBPPFI0L7ZcoNbyDXytYyE351NC9tTOeAPWTUgw2w7Xu+9OnThAqTAeAiiERxk5iIUe+wGNxCnvqqCxdf5QQmQ== +"@parcel/transformer-sass@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/transformer-sass/-/transformer-sass-2.0.0-nightly.444.tgz#99a17fcf1107cc213a215ead7862f9795fa7cf34" + integrity sha512-0L8Ld2UdoCgslw5YEm+5TSqBcLgjdvW3paJv/y6d9d2Rqq6ol5x1aIeQ5lEELI6f4RgPaAcik2UIQzxhvW54og== dependencies: - "@parcel/fs" "2.0.0-nightly.442+1572e394" - "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/fs" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.444+e2136965" -"@parcel/transformer-stylus@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/transformer-stylus/-/transformer-stylus-2.0.0-nightly.442.tgz#c845ada0b16c3148af1a958981e165beda1f1b25" - integrity sha512-vpnWBEZXvXez8DpL46gOCHMXCheHSA4pwUGDcSA/l1fovLFmrmvCITvnO4CKHn/MmHlwWho2JKqdmgoCmKIrnA== +"@parcel/transformer-stylus@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/transformer-stylus/-/transformer-stylus-2.0.0-nightly.444.tgz#e7ea63c0fff39064dfb4788b5c6db6f76be5a054" + integrity sha512-dUfoeeWYivV1yPUWB6fGFzhyags1jPe0i1CKrsSgRkQ7vOEUZi7zWlJ1bZyUMBlZvNDDL8TQ0eEjvAb5Jx3DzQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.444+e2136965" -"@parcel/transformer-sugarss@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sugarss/-/transformer-sugarss-2.0.0-nightly.442.tgz#c3532adaed8b20fbf3df72b63e7cbf50485c9505" - integrity sha512-+dM/QLqREveNdysMhtEixTzlq3zC/5cEOeF3i0EFLtaDh09mxgjiTzzDrgbVkQlxN4B35n1U4+QJe2JTgD5osg== +"@parcel/transformer-sugarss@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/transformer-sugarss/-/transformer-sugarss-2.0.0-nightly.444.tgz#f9502ababfd319278b39a7a27d11229534f45d10" + integrity sha512-MI0+tx8RbyBy0fYgCRDm0wSox7Uz3UkP/4WuUszOWuPpBM1y00bq+fbiEm/aaiX2UGMsncXPaNjbTHkeCJD0Yg== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" postcss "^8.0.5" -"@parcel/transformer-toml@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/transformer-toml/-/transformer-toml-2.0.0-nightly.442.tgz#800777e75bac8d8207c33964b67bc3641eba7d2b" - integrity sha512-LzC/x/KqDWf4NR+K4XBGagX+Z7N6D8rEN1PoQIA5L53LrAgvp3PyThb87XgzzOQdrguIi0nYvYq+4LV7aKI+TQ== +"@parcel/transformer-toml@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/transformer-toml/-/transformer-toml-2.0.0-nightly.444.tgz#679faef0dcc7b67b0435e152ac9a75e09b006226" + integrity sha512-ad0iwx3K47r/EiatDGI0p/P8h/COKUcgwmbJFNVuVi9Aj6uueoNTQS/Sqto1Y+a/ZQZrWMUxnNei/JcYTG09gA== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" -"@parcel/transformer-typescript-types@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.0.0-nightly.442.tgz#5fed91e892bf419b9b580391d1b441a3588840fc" - integrity sha512-NsDDX2b0YFWYJWj8T9VXx4VKDJPNZ86UdW6rbZu6FlmPGwKSmQdgh7P8l/FZmISf3zdx5lnF5/daJ5UwP9aW1A== +"@parcel/transformer-typescript-types@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.0.0-nightly.444.tgz#f05a2280ce0cf99afceee6303bc8eb969c7ce244" + integrity sha512-kxUbCuemWLKnu3xqd/hEnLvbjf9AhLnc+RN7aA6EXAmXJ+K0Q/jWrXw+3B2enLtNEjrZ8Ig+6MrThpWIIpgKJw== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/ts-utils" "2.0.0-nightly.442+1572e394" + "@parcel/ts-utils" "2.0.0-nightly.444+e2136965" nullthrows "^1.1.1" -"@parcel/transformer-vue@2.0.0-nightly.2064+1572e394": - version "2.0.0-nightly.2064" - resolved "https://registry.yarnpkg.com/@parcel/transformer-vue/-/transformer-vue-2.0.0-nightly.2064.tgz#61af60c8e19a2232821ef205c132037130420d75" - integrity sha512-NKjVB6VCsNF3Mw3kJQ80rb/rk+/xDuS3aTKoWhicFfgaIFfLK9dtOUnI0TL+/2iUAYletRIPMHLqVlE8nm7P8w== +"@parcel/transformer-vue@2.0.0-nightly.2066+e2136965": + version "2.0.0-nightly.2066" + resolved "https://registry.yarnpkg.com/@parcel/transformer-vue/-/transformer-vue-2.0.0-nightly.2066.tgz#8ab6d500ed5042f915392ce2e87fdbcdee34a2f9" + integrity sha512-nYxUCCodPkYgJy11/07YkHACJsepssEAkpvczdKBhWx5VLmvUksqdbYV90o+l9EcEXnV7hWjJHz/IYfFPROQDg== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.442+1572e394" - "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/diagnostic" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/utils" "2.0.0-nightly.444+e2136965" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-yaml@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/transformer-yaml/-/transformer-yaml-2.0.0-nightly.442.tgz#2417ba8a8d46c78d01668ee7d11ad057ec558612" - integrity sha512-tOsegT+6qnE50nY2EHmqt2E1VwFSTYNf7VpdDTafK/224GA7OUelInkG7uGnFlXZAbZtnslomX1bw9r3+qfRCg== +"@parcel/transformer-yaml@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/transformer-yaml/-/transformer-yaml-2.0.0-nightly.444.tgz#40dec778624aa31090afe719070254f5170076b5" + integrity sha512-Qe54cAL4A2pfzfYJP1iOVwKexhiRwpRti+Ikw0HvmnLhu0nU5IyxZR9p1vFOATWFa4/VwmY4fbDJfsTPfWV//w== dependencies: - "@parcel/plugin" "2.0.0-nightly.442+1572e394" + "@parcel/plugin" "2.0.0-nightly.444+e2136965" -"@parcel/ts-utils@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/ts-utils/-/ts-utils-2.0.0-nightly.442.tgz#caa0462775131ce5d9d013f16c289e9cb4a59a68" - integrity sha512-4zSsKDpDf/n+uUY/54szK0FBVoizW20PSxyWhar8RoY6EcVnbPt95O5KyWHiRVyZdJePs9IdS3t3t3dy/wv+ow== +"@parcel/ts-utils@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/ts-utils/-/ts-utils-2.0.0-nightly.444.tgz#9e03e724afb01f9bda2b697a3cd7787f8f046bcd" + integrity sha512-rGzGAjzssAPCdYWSBtg+XHCqnJw7BCg0pyqVJTI6UiHCOUpJ8sRLbt/M+VCZ4wGuSL2mnLe/+TTBdyvpuDs9+Q== dependencies: nullthrows "^1.1.1" -"@parcel/types@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/types/-/types-2.0.0-nightly.442.tgz#2ed42698635a3a87d52479fd9bccf96cc62c57e9" - integrity sha512-kDKBQ1ulrp5f48WU1sdBQvLlXNJEbm3AnkkL/GQ7WUN/YlK8Qumg/mRX5iOxYIqf76RDExlg2lJDsYKIp8/PxQ== +"@parcel/types@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/types/-/types-2.0.0-nightly.444.tgz#967d0dffe4b8f6a5e1b38cf28ebb19963a36bab4" + integrity sha512-aokJZ8sd+eSI/LuWVhVKSJUhNQanBDaq31jzIzwZUIrIUI9KAYTutdcm7mcbsXCRx6U27YhiuxCmL/XDGAdZTQ== -"@parcel/utils@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-2.0.0-nightly.442.tgz#cc218c88463c20bb2cabea16a2f368a7607384d4" - integrity sha512-3i/Ccejeh+TnQ9h8EEg4lX6iBD8Vz/gu+iqKE/hYrIUs+fwZ6aM3EJM0JFPSH0yEOf2iWXB+dvDkI+UpAHMe1A== +"@parcel/utils@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-2.0.0-nightly.444.tgz#b177ea1de0d76d2eab9a83d8640e2f5d97c3375b" + integrity sha512-yq9T/ubJbtMhJXuK99Y1DG3VFMy6OwWFZH0J7W7pfULCTmSzt78eujbDWKvqzNLRKt2e4HebjRF+A11aZ3pu+A== dependencies: "@iarna/toml" "^2.2.0" - "@parcel/codeframe" "2.0.0-nightly.442+1572e394" - "@parcel/diagnostic" "2.0.0-nightly.442+1572e394" - "@parcel/logger" "2.0.0-nightly.442+1572e394" - "@parcel/markdown-ansi" "2.0.0-nightly.442+1572e394" + "@parcel/codeframe" "2.0.0-nightly.444+e2136965" + "@parcel/diagnostic" "2.0.0-nightly.444+e2136965" + "@parcel/logger" "2.0.0-nightly.444+e2136965" + "@parcel/markdown-ansi" "2.0.0-nightly.444+e2136965" "@parcel/source-map" "2.0.0-alpha.4.16" ansi-html "^0.0.7" chalk "^2.4.2" @@ -2927,14 +2927,14 @@ node-addon-api "^3.0.0" node-gyp-build "^4.2.1" -"@parcel/workers@2.0.0-nightly.442+1572e394": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-2.0.0-nightly.442.tgz#298e779e1b06f039ea88f736df4ace3644efa891" - integrity sha512-MAs2BoI0KWPPrC12muImB8jEhcgn+PdFizBlUPam6SxUPjgSkJu7c91Yzb4aMsGOIMU4PK+YNgJptEM6e4fq8g== +"@parcel/workers@2.0.0-nightly.444+e2136965": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-2.0.0-nightly.444.tgz#5ca32d0ac88338ffb761438d2336e4b730d2eed2" + integrity sha512-T1flEMHdzMLaMbVgJsZ13pT2/IChH4CnpEE7Fj2/axthMq7GHqmeVLiDDM/y6BEDEW/I3FvWHR2PjVpzGljWQw== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.442+1572e394" - "@parcel/logger" "2.0.0-nightly.442+1572e394" - "@parcel/utils" "2.0.0-nightly.442+1572e394" + "@parcel/diagnostic" "2.0.0-nightly.444+e2136965" + "@parcel/logger" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.444+e2136965" chrome-trace-event "^1.0.2" nullthrows "^1.1.1" @@ -10577,19 +10577,19 @@ parallel-transform@^1.1.0: inherits "^2.0.3" readable-stream "^2.1.5" -parcel@2.0.0-nightly.440: - version "2.0.0-nightly.440" - resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.0.0-nightly.440.tgz#88d8dbca07eba9e6caa2b116d9efc122adae8f2c" - integrity sha512-Er2a5LqSQbK1AnA1z4bUoj3PuelzFDFiMMc8y0pQdCXp/38wwnAFndn3v8qEZ6FiKaVKQAlHG43sbMoKrysUNg== - dependencies: - "@parcel/config-default" "2.0.0-nightly.442+1572e394" - "@parcel/core" "2.0.0-nightly.440+1572e394" - "@parcel/diagnostic" "2.0.0-nightly.442+1572e394" - "@parcel/events" "2.0.0-nightly.442+1572e394" - "@parcel/fs" "2.0.0-nightly.442+1572e394" - "@parcel/logger" "2.0.0-nightly.442+1572e394" - "@parcel/package-manager" "2.0.0-nightly.442+1572e394" - "@parcel/utils" "2.0.0-nightly.442+1572e394" +parcel@2.0.0-nightly.442: + version "2.0.0-nightly.442" + resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.0.0-nightly.442.tgz#4d776ab4ba1e371809b983bec9ccf65aa88ce0e7" + integrity sha512-v7OrOEJujFS4BkDx1SGTfXqL4abIuhT0DYP5oenZ5Ump/jmeOYUlDv4L/reds7kOanFKIu5xiA6yR0JOTUwmuQ== + dependencies: + "@parcel/config-default" "2.0.0-nightly.444+e2136965" + "@parcel/core" "2.0.0-nightly.442+e2136965" + "@parcel/diagnostic" "2.0.0-nightly.444+e2136965" + "@parcel/events" "2.0.0-nightly.444+e2136965" + "@parcel/fs" "2.0.0-nightly.444+e2136965" + "@parcel/logger" "2.0.0-nightly.444+e2136965" + "@parcel/package-manager" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.444+e2136965" chalk "^2.1.0" commander "^2.19.0" get-port "^4.2.0" @@ -11547,10 +11547,10 @@ react-is@^17.0.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.1.tgz#5b3531bd76a645a4c9fb6e693ed36419e3301339" integrity sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA== -react-refresh@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.6.0.tgz#81971b8f3c8c05aaa6ce87491ae41b396133f896" - integrity sha512-Wv48N+GFt6Azvtl/LMvzNW9hvEyJdRQ48oVKIBAN7hjtvXXfxfVJXbPl/11SM1C/NIquIFXzzWCo6ZNH0I8I4g== +react-refresh@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.9.0.tgz#71863337adc3e5c2f8a6bfddd12ae3bfe32aafbf" + integrity sha512-Gvzk7OZpiqKSkxsQvO/mbTN1poglhmAV7gR/DdIrRrSMXraRQQlfikRJOr3Nb9GTMPC5kof948Zy6jJZIFtDvQ== read-cmd-shim@^1.0.1: version "1.0.5" From 0153028e6438eb13b07b8f2043745e5bc3faa6b7 Mon Sep 17 00:00:00 2001 From: Josh Kellendonk Date: Mon, 9 Nov 2020 04:32:02 -0700 Subject: [PATCH 082/314] feat(elasticloadbalancingv2): add load balancer lookups (#11089) Adds `fromLookup()` methods to both Application and Network load balancers as well as their listeners. Closes #11088 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- allowed-breaking-changes.txt | 6 +- .../@aws-cdk/aws-ec2/lib/security-group.ts | 26 +- .../aws-ec2/test/security-group.test.ts | 19 +- .../aws-elasticloadbalancingv2/README.md | 88 ++ .../lib/alb/application-listener.ts | 138 ++- .../lib/alb/application-load-balancer.ts | 62 +- .../lib/nlb/network-listener.ts | 43 +- .../lib/nlb/network-load-balancer.ts | 48 +- .../lib/shared/base-listener.ts | 91 +- .../lib/shared/base-load-balancer.ts | 74 +- .../lib/shared/util.ts | 12 +- .../aws-elasticloadbalancingv2/package.json | 4 + .../test/alb/listener.test.ts | 86 ++ .../test/alb/load-balancer.test.ts | 53 ++ .../test/nlb/listener.test.ts | 22 + .../test/nlb/load-balancer.test.ts | 60 ++ .../lib/cloud-assembly/context-queries.ts | 160 +++- .../schema/cloud-assembly.schema.json | 135 ++- .../schema/cloud-assembly.version.json | 2 +- .../cx-api/lib/context/load-balancer.ts | 69 ++ .../cx-api/lib/context/security-group.ts | 17 + packages/@aws-cdk/cx-api/lib/index.ts | 2 + packages/aws-cdk/lib/api/aws-auth/sdk.ts | 5 + .../aws-cdk/lib/context-providers/index.ts | 5 + .../lib/context-providers/load-balancers.ts | 302 ++++++ .../lib/context-providers/security-groups.ts | 55 ++ .../context-providers/load-balancers.test.ts | 881 ++++++++++++++++++ .../context-providers/security-groups.test.ts | 178 ++++ packages/aws-cdk/test/util/mock-sdk.ts | 8 + 29 files changed, 2606 insertions(+), 45 deletions(-) create mode 100644 packages/@aws-cdk/cx-api/lib/context/load-balancer.ts create mode 100644 packages/@aws-cdk/cx-api/lib/context/security-group.ts create mode 100644 packages/aws-cdk/lib/context-providers/load-balancers.ts create mode 100644 packages/aws-cdk/lib/context-providers/security-groups.ts create mode 100644 packages/aws-cdk/test/context-providers/load-balancers.test.ts create mode 100644 packages/aws-cdk/test/context-providers/security-groups.test.ts diff --git a/allowed-breaking-changes.txt b/allowed-breaking-changes.txt index 2e53fd5b537fa..9120903b01912 100644 --- a/allowed-breaking-changes.txt +++ b/allowed-breaking-changes.txt @@ -3,6 +3,10 @@ # and that won't typecheck if Manifest.load() adds a union arm and now returns A | B | C. change-return-type:@aws-cdk/cloud-assembly-schema.Manifest.load +# Adding any new context queries will add to the ContextQueryProperties type, +# which changes the signature of MissingContext. +weakened:@aws-cdk/cloud-assembly-schema.MissingContext + removed:@aws-cdk/core.BootstraplessSynthesizer.DEFAULT_ASSET_PUBLISHING_ROLE_ARN removed:@aws-cdk/core.DefaultStackSynthesizer.DEFAULT_ASSET_PUBLISHING_ROLE_ARN removed:@aws-cdk/core.DefaultStackSynthesizerProps.assetPublishingExternalId @@ -47,4 +51,4 @@ incompatible-argument:@aws-cdk/aws-ecs.Ec2TaskDefinition.addVolume incompatible-argument:@aws-cdk/aws-ecs.FargateTaskDefinition. incompatible-argument:@aws-cdk/aws-ecs.FargateTaskDefinition.addVolume incompatible-argument:@aws-cdk/aws-ecs.TaskDefinition. -incompatible-argument:@aws-cdk/aws-ecs.TaskDefinition.addVolume \ No newline at end of file +incompatible-argument:@aws-cdk/aws-ecs.TaskDefinition.addVolume diff --git a/packages/@aws-cdk/aws-ec2/lib/security-group.ts b/packages/@aws-cdk/aws-ec2/lib/security-group.ts index be52a3aa637cd..db733fcb816d4 100644 --- a/packages/@aws-cdk/aws-ec2/lib/security-group.ts +++ b/packages/@aws-cdk/aws-ec2/lib/security-group.ts @@ -1,4 +1,6 @@ -import { Annotations, IResource, Lazy, Names, Resource, ResourceProps, Stack, Token } from '@aws-cdk/core'; +import * as cxschema from '@aws-cdk/cloud-assembly-schema'; +import { Annotations, ContextProvider, IResource, Lazy, Names, Resource, ResourceProps, Stack, Token } from '@aws-cdk/core'; +import * as cxapi from '@aws-cdk/cx-api'; import { Construct } from 'constructs'; import { Connections } from './connections'; import { CfnSecurityGroup, CfnSecurityGroupEgress, CfnSecurityGroupIngress } from './ec2.generated'; @@ -294,6 +296,28 @@ export interface SecurityGroupImportOptions { * ``` */ export class SecurityGroup extends SecurityGroupBase { + /** + * Look up a security group by id. + */ + public static fromLookup(scope: Construct, id: string, securityGroupId: string) { + if (Token.isUnresolved(securityGroupId)) { + throw new Error('All arguments to look up a security group must be concrete (no Tokens)'); + } + + const attributes: cxapi.SecurityGroupContextResponse = ContextProvider.getValue(scope, { + provider: cxschema.ContextProvider.SECURITY_GROUP_PROVIDER, + props: { securityGroupId }, + dummyValue: { + securityGroupId: 'sg-12345', + allowAllOutbound: true, + } as cxapi.SecurityGroupContextResponse, + }).value; + + return SecurityGroup.fromSecurityGroupId(scope, id, attributes.securityGroupId, { + allowAllOutbound: attributes.allowAllOutbound, + mutable: true, + }); + } /** * Import an existing security group into this app. diff --git a/packages/@aws-cdk/aws-ec2/test/security-group.test.ts b/packages/@aws-cdk/aws-ec2/test/security-group.test.ts index 918c8a79ceb89..1a72a6a715d2c 100644 --- a/packages/@aws-cdk/aws-ec2/test/security-group.test.ts +++ b/packages/@aws-cdk/aws-ec2/test/security-group.test.ts @@ -1,5 +1,5 @@ import { expect, haveResource, not } from '@aws-cdk/assert'; -import { Intrinsic, Lazy, Stack, Token } from '@aws-cdk/core'; +import { App, Intrinsic, Lazy, Stack, Token } from '@aws-cdk/core'; import { nodeunitShim, Test } from 'nodeunit-shim'; import { Peer, Port, SecurityGroup, Vpc } from '../lib'; @@ -293,4 +293,21 @@ nodeunitShim({ test.done(); }, }, + + 'can look up a security group'(test: Test) { + const app = new App(); + const stack = new Stack(app, 'stack', { + env: { + account: '1234', + region: 'us-east-1', + }, + }); + + const securityGroup = SecurityGroup.fromLookup(stack, 'stack', 'sg-1234'); + + test.equal(securityGroup.securityGroupId, 'sg-12345'); + test.equal(securityGroup.allowAllOutbound, true); + + test.done(); + }, }); diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/README.md b/packages/@aws-cdk/aws-elasticloadbalancingv2/README.md index 93cbb9948b449..49cfd5dc5db81 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/README.md +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/README.md @@ -356,3 +356,91 @@ case for ECS Services for example), take a resource dependency on // has been associated with the LoadBalancer, before 'resource' is created. resourced.addDependency(targetGroup.loadBalancerDependency()); ``` + +## Looking up Load Balancers and Listeners + +You may look up load balancers and load balancer listeners by using one of the +following lookup methods: + +- `ApplicationLoadBalancer.fromlookup(options)` - Look up an application load + balancer. +- `ApplicationListener.fromLookup(options)` - Look up an application load + balancer listener. +- `NetworkLoadBalancer.fromLookup(options)` - Look up a network load balancer. +- `NetworkListener.fromLookup(options)` - Look up a network load balancer + listener. + +### Load Balancer lookup options + +You may look up a load balancer by ARN or by associated tags. When you look a +load balancer up by ARN, that load balancer will be returned unless CDK detects +that the load balancer is of the wrong type. When you look up a load balancer by +tags, CDK will return the load balancer matching all specified tags. If more +than one load balancer matches, CDK will throw an error requesting that you +provide more specific criteria. + +**Look up a Application Load Balancer by ARN** +```ts +const loadBalancer = ApplicationLoadBalancer.fromLookup(stack, 'ALB', { + loadBalancerArn: YOUR_ALB_ARN, +}); +``` + +**Look up an Application Load Balancer by tags** +```ts +const loadBalancer = ApplicationLoadBalancer.fromLookup(stack, 'ALB', { + loadBalancerTags: { + // Finds a load balancer matching all tags. + some: 'tag', + someother: 'tag', + }, +}); +``` + +## Load Balancer Listener lookup options + +You may look up a load balancer listener by the following criteria: + +- Associated load balancer ARN +- Associated load balancer tags +- Listener ARN +- Listener port +- Listener protocol + +The lookup method will return the matching listener. If more than one listener +matches, CDK will throw an error requesting that you specify additional +criteria. + +**Look up a Listener by associated Load Balancer, Port, and Protocol** + +```ts +const listener = ApplicationListener.fromLookup(stack, 'ALBListener', { + loadBalancerArn: YOUR_ALB_ARN, + listenerProtocol: ApplicationProtocol.HTTPS, + listenerPort: 443, +}); +``` + +**Look up a Listener by associated Load Balancer Tag, Port, and Protocol** + +```ts +const listener = ApplicationListener.fromLookup(stack, 'ALBListener', { + loadBalancerTags: { + Cluster: 'MyClusterName', + }, + listenerProtocol: ApplicationProtocol.HTTPS, + listenerPort: 443, +}); +``` + +**Look up a Network Listener by associated Load Balancer Tag, Port, and Protocol** + +```ts +const listener = NetworkListener.fromLookup(stack, 'ALBListener', { + loadBalancerTags: { + Cluster: 'MyClusterName', + }, + listenerProtocol: Protocol.TCP, + listenerPort: 12345, +}); +``` diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener.ts index d088008e7ce23..3a055b5fce4be 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener.ts @@ -1,7 +1,9 @@ import * as ec2 from '@aws-cdk/aws-ec2'; +import * as cxschema from '@aws-cdk/cloud-assembly-schema'; import { Duration, IResource, Lazy, Resource, Token } from '@aws-cdk/core'; +import * as cxapi from '@aws-cdk/cx-api'; import { Construct } from 'constructs'; -import { BaseListener } from '../shared/base-listener'; +import { BaseListener, BaseListenerLookupOptions } from '../shared/base-listener'; import { HealthCheck } from '../shared/base-target-group'; import { ApplicationProtocol, IpAddressType, SslPolicy } from '../shared/enums'; import { IListenerCertificate, ListenerCertificate } from '../shared/listener-certificate'; @@ -106,12 +108,53 @@ export interface ApplicationListenerProps extends BaseApplicationListenerProps { readonly loadBalancer: IApplicationLoadBalancer; } +/** + * Options for ApplicationListener lookup + */ +export interface ApplicationListenerLookupOptions extends BaseListenerLookupOptions { + /** + * ARN of the listener to look up + * @default - does not filter by listener arn + */ + readonly listenerArn?: string; + + /** + * Filter listeners by listener protocol + * @default - does not filter by listener protocol + */ + readonly listenerProtocol?: ApplicationProtocol; +} + /** * Define an ApplicationListener * * @resource AWS::ElasticLoadBalancingV2::Listener */ export class ApplicationListener extends BaseListener implements IApplicationListener { + /** + * Look up an ApplicationListener. + */ + public static fromLookup(scope: Construct, id: string, options: ApplicationListenerLookupOptions): IApplicationListener { + if (Token.isUnresolved(options.listenerArn)) { + throw new Error('All arguments to look up a load balancer listener must be concrete (no Tokens)'); + } + + let listenerProtocol: cxschema.LoadBalancerListenerProtocol | undefined; + switch (options.listenerProtocol) { + case ApplicationProtocol.HTTP: listenerProtocol = cxschema.LoadBalancerListenerProtocol.HTTP; break; + case ApplicationProtocol.HTTPS: listenerProtocol = cxschema.LoadBalancerListenerProtocol.HTTPS; break; + } + + const props = BaseListener._queryContextProvider(scope, { + userOptions: options, + loadBalancerType: cxschema.LoadBalancerType.APPLICATION, + listenerArn: options.listenerArn, + listenerProtocol, + }); + + return new LookedUpApplicationListener(scope, id, props); + } + /** * Import an existing listener */ @@ -517,36 +560,28 @@ export interface ApplicationListenerAttributes { readonly securityGroupAllowsAllOutbound?: boolean; } -class ImportedApplicationListener extends Resource implements IApplicationListener { - public readonly connections: ec2.Connections; +abstract class ExternalApplicationListener extends Resource implements IApplicationListener { + /** + * Connections object. + */ + public abstract readonly connections: ec2.Connections; /** * ARN of the listener */ - public readonly listenerArn: string; + public abstract readonly listenerArn: string; - constructor(scope: Construct, id: string, props: ApplicationListenerAttributes) { + constructor(scope: Construct, id: string) { super(scope, id); + } - this.listenerArn = props.listenerArn; - - const defaultPort = props.defaultPort !== undefined ? ec2.Port.tcp(props.defaultPort) : undefined; - - let securityGroup: ec2.ISecurityGroup; - if (props.securityGroup) { - securityGroup = props.securityGroup; - } else if (props.securityGroupId) { - securityGroup = ec2.SecurityGroup.fromSecurityGroupId(scope, 'SecurityGroup', props.securityGroupId, { - allowAllOutbound: props.securityGroupAllowsAllOutbound, - }); - } else { - throw new Error('Either `securityGroup` or `securityGroupId` must be specified to import an application listener.'); - } - - this.connections = new ec2.Connections({ - securityGroups: [securityGroup], - defaultPort, - }); + /** + * Register that a connectable that has been added to this load balancer. + * + * Don't call this directly. It is called by ApplicationTargetGroup. + */ + public registerConnectable(connectable: ec2.IConnectable, portRange: ec2.Port): void { + this.connections.allowTo(connectable, portRange, 'Load balancer to target'); } /** @@ -599,14 +634,55 @@ class ImportedApplicationListener extends Resource implements IApplicationListen // eslint-disable-next-line max-len throw new Error('Can only call addTargets() when using a constructed ApplicationListener; construct a new TargetGroup and use addTargetGroup.'); } +} - /** - * Register that a connectable that has been added to this load balancer. - * - * Don't call this directly. It is called by ApplicationTargetGroup. - */ - public registerConnectable(connectable: ec2.IConnectable, portRange: ec2.Port): void { - this.connections.allowTo(connectable, portRange, 'Load balancer to target'); +/** + * An imported application listener. + */ +class ImportedApplicationListener extends ExternalApplicationListener { + public readonly listenerArn: string; + public readonly connections: ec2.Connections; + + constructor(scope: Construct, id: string, props: ApplicationListenerAttributes) { + super(scope, id); + + this.listenerArn = props.listenerArn; + const defaultPort = props.defaultPort !== undefined ? ec2.Port.tcp(props.defaultPort) : undefined; + + let securityGroup: ec2.ISecurityGroup; + if (props.securityGroup) { + securityGroup = props.securityGroup; + } else if (props.securityGroupId) { + securityGroup = ec2.SecurityGroup.fromSecurityGroupId(scope, 'SecurityGroup', props.securityGroupId, { + allowAllOutbound: props.securityGroupAllowsAllOutbound, + }); + } else { + throw new Error('Either `securityGroup` or `securityGroupId` must be specified to import an application listener.'); + } + + this.connections = new ec2.Connections({ + securityGroups: [securityGroup], + defaultPort, + }); + } +} + +class LookedUpApplicationListener extends ExternalApplicationListener { + public readonly listenerArn: string; + public readonly connections: ec2.Connections; + + constructor(scope: Construct, id: string, props: cxapi.LoadBalancerListenerContextResponse) { + super(scope, id); + + this.listenerArn = props.listenerArn; + this.connections = new ec2.Connections({ + defaultPort: ec2.Port.tcp(props.listenerPort), + }); + + for (const securityGroupId of props.securityGroupIds) { + const securityGroup = ec2.SecurityGroup.fromLookup(this, `SecurityGroup-${securityGroupId}`, securityGroupId); + this.connections.addSecurityGroup(securityGroup); + } } } diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts index 780282071a18c..0b6c9d76a7d8f 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts @@ -1,8 +1,10 @@ import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; import * as ec2 from '@aws-cdk/aws-ec2'; +import * as cxschema from '@aws-cdk/cloud-assembly-schema'; import { Duration, Lazy, Names, Resource } from '@aws-cdk/core'; +import * as cxapi from '@aws-cdk/cx-api'; import { Construct } from 'constructs'; -import { BaseLoadBalancer, BaseLoadBalancerProps, ILoadBalancerV2 } from '../shared/base-load-balancer'; +import { BaseLoadBalancer, BaseLoadBalancerLookupOptions, BaseLoadBalancerProps, ILoadBalancerV2 } from '../shared/base-load-balancer'; import { IpAddressType, ApplicationProtocol } from '../shared/enums'; import { ApplicationListener, BaseApplicationListenerProps } from './application-listener'; import { ListenerAction } from './application-listener-action'; @@ -42,12 +44,30 @@ export interface ApplicationLoadBalancerProps extends BaseLoadBalancerProps { readonly idleTimeout?: Duration; } +/** + * Options for looking up an ApplicationLoadBalancer + */ +export interface ApplicationLoadBalancerLookupOptions extends BaseLoadBalancerLookupOptions { +} + /** * Define an Application Load Balancer * * @resource AWS::ElasticLoadBalancingV2::LoadBalancer */ export class ApplicationLoadBalancer extends BaseLoadBalancer implements IApplicationLoadBalancer { + /** + * Look up an application load balancer. + */ + public static fromLookup(scope: Construct, id: string, options: ApplicationLoadBalancerLookupOptions): IApplicationLoadBalancer { + const props = BaseLoadBalancer._queryContextProvider(scope, { + userOptions: options, + loadBalancerType: cxschema.LoadBalancerType.APPLICATION, + }); + + return new LookedUpApplicationLoadBalancer(scope, id, props); + } + /** * Import an existing Application Load Balancer */ @@ -598,6 +618,46 @@ class ImportedApplicationLoadBalancer extends Resource implements IApplicationLo } } +class LookedUpApplicationLoadBalancer extends Resource implements IApplicationLoadBalancer { + public readonly loadBalancerArn: string; + public readonly loadBalancerCanonicalHostedZoneId: string; + public readonly loadBalancerDnsName: string; + public readonly ipAddressType?: IpAddressType; + public readonly connections: ec2.Connections; + public readonly vpc?: ec2.IVpc; + + constructor(scope: Construct, id: string, props: cxapi.LoadBalancerContextResponse) { + super(scope, id); + + this.loadBalancerArn = props.loadBalancerArn; + this.loadBalancerCanonicalHostedZoneId = props.loadBalancerCanonicalHostedZoneId; + this.loadBalancerDnsName = props.loadBalancerDnsName; + + if (props.ipAddressType === cxapi.LoadBalancerIpAddressType.IPV4) { + this.ipAddressType = IpAddressType.IPV4; + } else if (props.ipAddressType === cxapi.LoadBalancerIpAddressType.DUAL_STACK) { + this.ipAddressType = IpAddressType.DUAL_STACK; + } + + this.vpc = ec2.Vpc.fromLookup(this, 'Vpc', { + vpcId: props.vpcId, + }); + + this.connections = new ec2.Connections(); + for (const securityGroupId of props.securityGroupIds) { + const securityGroup = ec2.SecurityGroup.fromLookup(this, `SecurityGroup-${securityGroupId}`, securityGroupId); + this.connections.addSecurityGroup(securityGroup); + } + } + + public addListener(id: string, props: BaseApplicationListenerProps): ApplicationListener { + return new ApplicationListener(this, id, { + ...props, + loadBalancer: this, + }); + } +} + /** * Properties for a redirection config */ diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-listener.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-listener.ts index cf98f4b7cbbd4..8d0312977e092 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-listener.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-listener.ts @@ -1,6 +1,7 @@ +import * as cxschema from '@aws-cdk/cloud-assembly-schema'; import { Duration, IResource, Resource } from '@aws-cdk/core'; import { Construct } from 'constructs'; -import { BaseListener } from '../shared/base-listener'; +import { BaseListener, BaseListenerLookupOptions } from '../shared/base-listener'; import { HealthCheck } from '../shared/base-target-group'; import { Protocol, SslPolicy } from '../shared/enums'; import { IListenerCertificate } from '../shared/listener-certificate'; @@ -86,12 +87,52 @@ export interface NetworkListenerProps extends BaseNetworkListenerProps { readonly loadBalancer: INetworkLoadBalancer; } +/** + * Options for looking up a network listener. + */ +export interface NetworkListenerLookupOptions extends BaseListenerLookupOptions { + /** + * Protocol of the listener port + * @default - listener is not filtered by protocol + */ + readonly listenerProtocol?: Protocol; +} + /** * Define a Network Listener * * @resource AWS::ElasticLoadBalancingV2::Listener */ export class NetworkListener extends BaseListener implements INetworkListener { + /** + * Looks up a network listener + */ + public static fromLookup(scope: Construct, id: string, options: NetworkListenerLookupOptions): INetworkListener { + let listenerProtocol: cxschema.LoadBalancerListenerProtocol | undefined; + if (options.listenerProtocol) { + validateNetworkProtocol(options.listenerProtocol); + + switch (options.listenerProtocol) { + case Protocol.TCP: listenerProtocol = cxschema.LoadBalancerListenerProtocol.TCP; break; + case Protocol.UDP: listenerProtocol = cxschema.LoadBalancerListenerProtocol.UDP; break; + case Protocol.TCP_UDP: listenerProtocol = cxschema.LoadBalancerListenerProtocol.TCP_UDP; break; + case Protocol.TLS: listenerProtocol = cxschema.LoadBalancerListenerProtocol.TLS; break; + } + } + + const props = BaseListener._queryContextProvider(scope, { + userOptions: options, + listenerProtocol: listenerProtocol, + loadBalancerType: cxschema.LoadBalancerType.NETWORK, + }); + + class LookedUp extends Resource implements INetworkListener { + public listenerArn = props.listenerArn; + } + + return new LookedUp(scope, id); + } + /** * Import an existing listener */ diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-load-balancer.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-load-balancer.ts index d8ba0a8b77506..74dd1f060509f 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-load-balancer.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-load-balancer.ts @@ -2,9 +2,11 @@ import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; import * as ec2 from '@aws-cdk/aws-ec2'; import { PolicyStatement, ServicePrincipal } from '@aws-cdk/aws-iam'; import { IBucket } from '@aws-cdk/aws-s3'; +import * as cxschema from '@aws-cdk/cloud-assembly-schema'; import { Resource } from '@aws-cdk/core'; +import * as cxapi from '@aws-cdk/cx-api'; import { Construct } from 'constructs'; -import { BaseLoadBalancer, BaseLoadBalancerProps, ILoadBalancerV2 } from '../shared/base-load-balancer'; +import { BaseLoadBalancer, BaseLoadBalancerLookupOptions, BaseLoadBalancerProps, ILoadBalancerV2 } from '../shared/base-load-balancer'; import { BaseNetworkListenerProps, NetworkListener } from './network-listener'; /** @@ -51,12 +53,30 @@ export interface NetworkLoadBalancerAttributes { readonly vpc?: ec2.IVpc; } +/** + * Options for looking up an NetworkLoadBalancer + */ +export interface NetworkLoadBalancerLookupOptions extends BaseLoadBalancerLookupOptions { +} + /** * Define a new network load balancer * * @resource AWS::ElasticLoadBalancingV2::LoadBalancer */ export class NetworkLoadBalancer extends BaseLoadBalancer implements INetworkLoadBalancer { + /** + * Looks up the network load balancer. + */ + public static fromLookup(scope: Construct, id: string, options: NetworkLoadBalancerLookupOptions): INetworkLoadBalancer { + const props = BaseLoadBalancer._queryContextProvider(scope, { + userOptions: options, + loadBalancerType: cxschema.LoadBalancerType.NETWORK, + }); + + return new LookedUpNetworkLoadBalancer(scope, id, props); + } + public static fromNetworkLoadBalancerAttributes(scope: Construct, id: string, attrs: NetworkLoadBalancerAttributes): INetworkLoadBalancer { class Import extends Resource implements INetworkLoadBalancer { public readonly loadBalancerArn = attrs.loadBalancerArn; @@ -289,3 +309,29 @@ export interface INetworkLoadBalancer extends ILoadBalancerV2, ec2.IVpcEndpointS */ addListener(id: string, props: BaseNetworkListenerProps): NetworkListener; } + +class LookedUpNetworkLoadBalancer extends Resource implements INetworkLoadBalancer { + public readonly loadBalancerCanonicalHostedZoneId: string; + public readonly loadBalancerDnsName: string; + public readonly loadBalancerArn: string; + public readonly vpc?: ec2.IVpc; + + constructor(scope: Construct, id: string, props: cxapi.LoadBalancerContextResponse) { + super(scope, id); + + this.loadBalancerArn = props.loadBalancerArn; + this.loadBalancerCanonicalHostedZoneId = props.loadBalancerCanonicalHostedZoneId; + this.loadBalancerDnsName = props.loadBalancerDnsName; + + this.vpc = ec2.Vpc.fromLookup(this, 'Vpc', { + vpcId: props.vpcId, + }); + } + + public addListener(lid: string, props: BaseNetworkListenerProps): NetworkListener { + return new NetworkListener(this, lid, { + loadBalancer: this, + ...props, + }); + } +} diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-listener.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-listener.ts index 7866e522e0375..b735d6e375870 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-listener.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-listener.ts @@ -1,12 +1,101 @@ -import { Annotations, Lazy, Resource } from '@aws-cdk/core'; +import * as cxschema from '@aws-cdk/cloud-assembly-schema'; +import { Annotations, ContextProvider, Lazy, Resource, Token } from '@aws-cdk/core'; +import * as cxapi from '@aws-cdk/cx-api'; import { Construct } from 'constructs'; import { CfnListener } from '../elasticloadbalancingv2.generated'; import { IListenerAction } from './listener-action'; +import { mapTagMapToCxschema } from './util'; + +/** + * Options for listener lookup + */ +export interface BaseListenerLookupOptions { + /** + * Filter listeners by associated load balancer arn + * @default - does not filter by load balancer arn + */ + readonly loadBalancerArn?: string; + + /** + * Filter listeners by associated load balancer tags + * @default - does not filter by load balancer tags + */ + readonly loadBalancerTags?: Record; + + /** + * Filter listeners by listener port + * @default - does not filter by listener port + */ + readonly listenerPort?: number; +} + +/** + * Options for querying the load balancer listener context provider + * @internal + */ +export interface ListenerQueryContextProviderOptions { + /** + * User's provided options + */ + readonly userOptions: BaseListenerLookupOptions; + + /** + * Type of load balancer expected + */ + readonly loadBalancerType: cxschema.LoadBalancerType; + + /** + * ARN of the listener to look up + * @default - does not filter by listener arn + */ + readonly listenerArn?: string; + + /** + * Optional protocol of the listener to look up + */ + readonly listenerProtocol?: cxschema.LoadBalancerListenerProtocol; +} /** * Base class for listeners */ export abstract class BaseListener extends Resource { + /** + * Queries the load balancer listener context provider for load balancer + * listener info. + * @internal + */ + protected static _queryContextProvider(scope: Construct, options: ListenerQueryContextProviderOptions) { + if (Token.isUnresolved(options.userOptions.loadBalancerArn) + || Object.values(options.userOptions.loadBalancerTags ?? {}).some(Token.isUnresolved) + || Token.isUnresolved(options.userOptions.listenerPort)) { + throw new Error('All arguments to look up a load balancer listener must be concrete (no Tokens)'); + } + + let cxschemaTags: cxschema.Tag[] | undefined; + if (options.userOptions.loadBalancerTags) { + cxschemaTags = mapTagMapToCxschema(options.userOptions.loadBalancerTags); + } + + const props: cxapi.LoadBalancerListenerContextResponse = ContextProvider.getValue(scope, { + provider: cxschema.ContextProvider.LOAD_BALANCER_LISTENER_PROVIDER, + props: { + listenerArn: options.listenerArn, + listenerPort: options.userOptions.listenerPort, + listenerProtocol: options.listenerProtocol, + loadBalancerArn: options.userOptions.loadBalancerArn, + loadBalancerTags: cxschemaTags, + loadBalancerType: options.loadBalancerType, + } as cxschema.LoadBalancerListenerContextQuery, + dummyValue: { + listenerArn: `arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/${options.loadBalancerType}/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2`, + listenerPort: 80, + securityGroupIds: ['sg-123456789012'], + } as cxapi.LoadBalancerListenerContextResponse, + }).value; + + return props; + } /** * @attribute */ diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-load-balancer.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-load-balancer.ts index 1ca544187038a..46526b9376f68 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-load-balancer.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-load-balancer.ts @@ -1,11 +1,13 @@ import * as ec2 from '@aws-cdk/aws-ec2'; import * as iam from '@aws-cdk/aws-iam'; import * as s3 from '@aws-cdk/aws-s3'; -import { IResource, Lazy, Resource, Stack, Token } from '@aws-cdk/core'; +import * as cxschema from '@aws-cdk/cloud-assembly-schema'; +import { ContextProvider, IResource, Lazy, Resource, Stack, Token } from '@aws-cdk/core'; +import * as cxapi from '@aws-cdk/cx-api'; import { RegionInfo } from '@aws-cdk/region-info'; import { Construct } from 'constructs'; import { CfnLoadBalancer } from '../elasticloadbalancingv2.generated'; -import { Attributes, ifUndefined, renderAttributes } from './util'; +import { Attributes, ifUndefined, mapTagMapToCxschema, renderAttributes } from './util'; /** * Shared properties of both Application and Network Load Balancers @@ -64,10 +66,78 @@ export interface ILoadBalancerV2 extends IResource { readonly loadBalancerDnsName: string; } +/** + * Options for looking up load balancers + */ +export interface BaseLoadBalancerLookupOptions { + /** + * Find by load balancer's ARN + * @default - does not search by load balancer arn + */ + readonly loadBalancerArn?: string; + + /** + * Match load balancer tags. + * @default - does not match load balancers by tags + */ + readonly loadBalancerTags?: Record; +} + +/** + * Options for query context provider + * @internal + */ +export interface LoadBalancerQueryContextProviderOptions { + /** + * User's lookup options + */ + readonly userOptions: BaseLoadBalancerLookupOptions; + + /** + * Type of load balancer + */ + readonly loadBalancerType: cxschema.LoadBalancerType; +} + /** * Base class for both Application and Network Load Balancers */ export abstract class BaseLoadBalancer extends Resource { + /** + * Queries the load balancer context provider for load balancer info. + * @internal + */ + protected static _queryContextProvider(scope: Construct, options: LoadBalancerQueryContextProviderOptions) { + if (Token.isUnresolved(options.userOptions.loadBalancerArn) + || Object.values(options.userOptions.loadBalancerTags ?? {}).some(Token.isUnresolved)) { + throw new Error('All arguments to look up a load balancer must be concrete (no Tokens)'); + } + + let cxschemaTags: cxschema.Tag[] | undefined; + if (options.userOptions.loadBalancerTags) { + cxschemaTags = mapTagMapToCxschema(options.userOptions.loadBalancerTags); + } + + const props: cxapi.LoadBalancerContextResponse = ContextProvider.getValue(scope, { + provider: cxschema.ContextProvider.LOAD_BALANCER_PROVIDER, + props: { + loadBalancerArn: options.userOptions.loadBalancerArn, + loadBalancerTags: cxschemaTags, + loadBalancerType: options.loadBalancerType, + } as cxschema.LoadBalancerContextQuery, + dummyValue: { + ipAddressType: cxapi.LoadBalancerIpAddressType.DUAL_STACK, + loadBalancerArn: `arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/${options.loadBalancerType}/my-load-balancer/50dc6c495c0c9188`, + loadBalancerCanonicalHostedZoneId: 'Z3DZXE0EXAMPLE', + loadBalancerDnsName: 'my-load-balancer-1234567890.us-west-2.elb.amazonaws.com', + securityGroupIds: ['sg-1234'], + vpcId: 'vpc-12345', + } as cxapi.LoadBalancerContextResponse, + }).value; + + return props; + } + /** * The canonical hosted zone ID of this load balancer * diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/util.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/util.ts index 2776d533faefa..2ecc35c365694 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/util.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/util.ts @@ -1,3 +1,4 @@ +import * as cxschema from '@aws-cdk/cloud-assembly-schema'; import { ApplicationProtocol, Protocol } from './enums'; export type Attributes = {[key: string]: string | undefined}; @@ -79,4 +80,13 @@ export function validateNetworkProtocol(protocol: Protocol) { if (NLB_PROTOCOLS.indexOf(protocol) === -1) { throw new Error(`The protocol must be one of ${NLB_PROTOCOLS.join(', ')}. Found ${protocol}`); } -} \ No newline at end of file +} + +/** + * Helper to map a map of tags to cxschema tag format. + * @internal + */ +export function mapTagMapToCxschema(tagMap: Record): cxschema.Tag[] { + return Object.entries(tagMap) + .map(([key, value]) => ({ key, value })); +} diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json index 10fc9e52db4f2..d65911b6abd7f 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json @@ -85,7 +85,9 @@ "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", + "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/core": "0.0.0", + "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/region-info": "0.0.0", "constructs": "^3.2.0" }, @@ -97,7 +99,9 @@ "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", + "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/core": "0.0.0", + "@aws-cdk/cx-api": "0.0.0", "constructs": "^3.2.0", "@aws-cdk/region-info": "0.0.0" }, diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/listener.test.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/listener.test.ts index 18f162b1f8210..b9de0961423ec 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/listener.test.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/listener.test.ts @@ -1364,6 +1364,92 @@ describe('tests', () => { }); }).toThrow(/Specify at most one/); }); + + describe('lookup', () => { + test('Can look up an ApplicationListener', () => { + // GIVEN + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'stack', { + env: { + account: '123456789012', + region: 'us-west-2', + }, + }); + + // WHEN + const listener = elbv2.ApplicationListener.fromLookup(stack, 'a', { + loadBalancerTags: { + some: 'tag', + }, + }); + + // THEN + expect(stack).not.toHaveResource('AWS::ElasticLoadBalancingV2::Listener'); + expect(listener.listenerArn).toEqual('arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/application/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2'); + expect(listener.connections.securityGroups[0].securityGroupId).toEqual('sg-12345'); + }); + + test('Can add rules to a looked-up ApplicationListener', () => { + // GIVEN + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'stack', { + env: { + account: '123456789012', + region: 'us-west-2', + }, + }); + + const listener = elbv2.ApplicationListener.fromLookup(stack, 'a', { + loadBalancerTags: { + some: 'tag', + }, + }); + + // WHEN + new elbv2.ApplicationListenerRule(stack, 'rule', { + listener, + conditions: [ + elbv2.ListenerCondition.hostHeaders(['example.com']), + ], + action: elbv2.ListenerAction.fixedResponse(200), + priority: 5, + }); + + // THEN + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { + Priority: 5, + }); + }); + + test('Can add certificates to a looked-up ApplicationListener', () => { + // GIVEN + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'stack', { + env: { + account: '123456789012', + region: 'us-west-2', + }, + }); + + const listener = elbv2.ApplicationListener.fromLookup(stack, 'a', { + loadBalancerTags: { + some: 'tag', + }, + }); + + // WHEN + listener.addCertificateArns('certs', [ + 'arn:something', + ]); + + // THEN + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::ListenerCertificate', { + Certificates: [ + { CertificateArn: 'arn:something' }, + ], + }); + }); + }); }); class ResourceWithLBDependency extends cdk.CfnResource { diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/load-balancer.test.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/load-balancer.test.ts index 41063924e863c..e2745a2fb02aa 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/load-balancer.test.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/load-balancer.test.ts @@ -334,4 +334,57 @@ describe('tests', () => { Type: 'application', }); }); + + describe('lookup', () => { + test('Can look up an ApplicationLoadBalancer', () => { + // GIVEN + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'stack', { + env: { + account: '123456789012', + region: 'us-west-2', + }, + }); + + // WHEN + const loadBalancer = elbv2.ApplicationLoadBalancer.fromLookup(stack, 'a', { + loadBalancerTags: { + some: 'tag', + }, + }); + + // THEN + expect(stack).not.toHaveResource('AWS::ElasticLoadBalancingV2::ApplicationLoadBalancer'); + expect(loadBalancer.loadBalancerArn).toEqual('arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188'); + expect(loadBalancer.loadBalancerCanonicalHostedZoneId).toEqual('Z3DZXE0EXAMPLE'); + expect(loadBalancer.loadBalancerDnsName).toEqual('my-load-balancer-1234567890.us-west-2.elb.amazonaws.com'); + expect(loadBalancer.ipAddressType).toEqual(elbv2.IpAddressType.DUAL_STACK); + expect(loadBalancer.connections.securityGroups[0].securityGroupId).toEqual('sg-1234'); + }); + + test('Can add listeners to a looked-up ApplicationLoadBalancer', () => { + // GIVEN + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'stack', { + env: { + account: '123456789012', + region: 'us-west-2', + }, + }); + + const loadBalancer = elbv2.ApplicationLoadBalancer.fromLookup(stack, 'a', { + loadBalancerTags: { + some: 'tag', + }, + }); + + // WHEN + loadBalancer.addListener('listener', { + protocol: elbv2.ApplicationProtocol.HTTP, + }); + + // THEN + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::Listener'); + }); + }); }); diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/listener.test.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/listener.test.ts index 4d3573c24d96e..d40197d00a280 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/listener.test.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/listener.test.ts @@ -388,6 +388,28 @@ describe('tests', () => { }); }).toThrow(/Specify at most one/); }); + + test('Can look up an NetworkListener', () => { + // GIVEN + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'stack', { + env: { + account: '123456789012', + region: 'us-west-2', + }, + }); + + // WHEN + const listener = elbv2.NetworkListener.fromLookup(stack, 'a', { + loadBalancerTags: { + some: 'tag', + }, + }); + + // THEN + expect(stack).not.toHaveResource('AWS::ElasticLoadBalancingV2::Listener'); + expect(listener.listenerArn).toEqual('arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/network/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2'); + }); }); class ResourceWithLBDependency extends cdk.CfnResource { diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/load-balancer.test.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/load-balancer.test.ts index ee6272f7abae9..88a3999ec0a6f 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/load-balancer.test.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/load-balancer.test.ts @@ -401,4 +401,64 @@ describe('tests', () => { Type: 'network', }); }); + + describe('lookup', () => { + test('Can look up a NetworkLoadBalancer', () => { + // GIVEN + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'stack', { + env: { + account: '123456789012', + region: 'us-west-2', + }, + }); + + // WHEN + const loadBalancer = elbv2.NetworkLoadBalancer.fromLookup(stack, 'a', { + loadBalancerTags: { + some: 'tag', + }, + }); + + // THEN + expect(stack).not.toHaveResource('AWS::ElasticLoadBalancingV2::NetworkLoadBalancer'); + expect(loadBalancer.loadBalancerArn).toEqual('arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/network/my-load-balancer/50dc6c495c0c9188'); + expect(loadBalancer.loadBalancerCanonicalHostedZoneId).toEqual('Z3DZXE0EXAMPLE'); + expect(loadBalancer.loadBalancerDnsName).toEqual('my-load-balancer-1234567890.us-west-2.elb.amazonaws.com'); + }); + + test('Can add listeners to a looked-up NetworkLoadBalancer', () => { + // GIVEN + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'stack', { + env: { + account: '123456789012', + region: 'us-west-2', + }, + }); + + const loadBalancer = elbv2.NetworkLoadBalancer.fromLookup(stack, 'a', { + loadBalancerTags: { + some: 'tag', + }, + }); + + const targetGroup = new elbv2.NetworkTargetGroup(stack, 'tg', { + vpc: loadBalancer.vpc, + port: 3000, + }); + + // WHEN + loadBalancer.addListener('listener', { + protocol: elbv2.Protocol.TCP_UDP, + port: 3000, + defaultAction: elbv2.NetworkListenerAction.forward([targetGroup]), + }); + + // THEN + expect(stack).not.toHaveResource('AWS::ElasticLoadBalancingV2::NetworkLoadBalancer'); + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::Listener'); + }); + }); }); + diff --git a/packages/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/context-queries.ts b/packages/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/context-queries.ts index f2d11b76eac39..56c609a08dd39 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/context-queries.ts +++ b/packages/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/context-queries.ts @@ -1,3 +1,4 @@ +import { Tag } from './metadata-schema'; /** * Identifier for the context provider @@ -33,6 +34,20 @@ export enum ContextProvider { */ ENDPOINT_SERVICE_AVAILABILITY_ZONE_PROVIDER = 'endpoint-service-availability-zones', + /** + * Load balancer provider + */ + LOAD_BALANCER_PROVIDER = 'load-balancer', + + /** + * Load balancer listener provider + */ + LOAD_BALANCER_LISTENER_PROVIDER = 'load-balancer-listener', + + /** + * Security group provider + */ + SECURITY_GROUP_PROVIDER = 'security-group', } /** @@ -196,9 +211,152 @@ export interface EndpointServiceAvailabilityZonesContextQuery { readonly serviceName: string; } +/** + * Type of load balancer + */ +export enum LoadBalancerType { + /** + * Network load balancer + */ + NETWORK = 'network', + + /** + * Application load balancer + */ + APPLICATION = 'application', +} + +/** + * Filters for selecting load balancers + */ +export interface LoadBalancerFilter { + /** + * Filter load balancers by their type + */ + readonly loadBalancerType: LoadBalancerType; + + /** + * Find by load balancer's ARN + * @default - does not search by load balancer arn + */ + readonly loadBalancerArn?: string; + + /** + * Match load balancer tags + * @default - does not match load balancers by tags + */ + readonly loadBalancerTags?: Tag[]; +} + +/** + * Query input for looking up a load balancer + */ +export interface LoadBalancerContextQuery extends LoadBalancerFilter { + /** + * Query account + */ + readonly account: string; + + /** + * Query region + */ + readonly region: string; +} + +/** + * The protocol for connections from clients to the load balancer + */ +export enum LoadBalancerListenerProtocol { + /** + * HTTP protocol + */ + HTTP = 'HTTP', + + /** + * HTTPS protocol + */ + HTTPS = 'HTTPS', + + /** + * TCP protocol + */ + TCP = 'TCP', + + /** + * TLS protocol + */ + TLS = 'TLS', + + /** + * UDP protocol + * */ + UDP = 'UDP', + + /** + * TCP and UDP protocol + * */ + TCP_UDP = 'TCP_UDP', +} + +/** + * Query input for looking up a load balancer listener + */ +export interface LoadBalancerListenerContextQuery extends LoadBalancerFilter { + /** + * Query account + */ + readonly account: string; + + /** + * Query region + */ + readonly region: string; + + /** + * Find by listener's arn + * @default - does not find by listener arn + */ + readonly listenerArn?: string; + + /** + * Filter by listener protocol + * @default - does not filter by listener protocol + */ + readonly listenerProtocol?: LoadBalancerListenerProtocol; + + /** + * Filter listeners by listener port + * @default - does not filter by a listener port + */ + readonly listenerPort?: number; +} + +/** + * Query input for looking up a security group + */ +export interface SecurityGroupContextQuery { + /** + * Query account + */ + readonly account: string; + + /** + * Query region + */ + readonly region: string; + + /** + * Security group id + */ + readonly securityGroupId: string; +} + export type ContextQueryProperties = AmiContextQuery | AvailabilityZonesContextQuery | HostedZoneContextQuery | SSMParameterContextQuery | VpcContextQuery -| EndpointServiceAvailabilityZonesContextQuery; +| EndpointServiceAvailabilityZonesContextQuery +| LoadBalancerContextQuery +| LoadBalancerListenerContextQuery +| SecurityGroupContextQuery; diff --git a/packages/@aws-cdk/cloud-assembly-schema/schema/cloud-assembly.schema.json b/packages/@aws-cdk/cloud-assembly-schema/schema/cloud-assembly.schema.json index a154b78a0b508..99fbaedb6c416 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/schema/cloud-assembly.schema.json +++ b/packages/@aws-cdk/cloud-assembly-schema/schema/cloud-assembly.schema.json @@ -247,11 +247,11 @@ "type": "object", "properties": { "key": { - "description": "Tag key.", + "description": "Tag key.\n\n(In the actual file on disk this will be cased as \"Key\", and the structure is\npatched to match this structure upon loading:\nhttps://github.com/aws/aws-cdk/blob/4aadaa779b48f35838cccd4e25107b2338f05547/packages/%40aws-cdk/cloud-assembly-schema/lib/manifest.ts#L137)", "type": "string" }, "value": { - "description": "Tag value.", + "description": "Tag value.\n\n(In the actual file on disk this will be cased as \"Value\", and the structure is\npatched to match this structure upon loading:\nhttps://github.com/aws/aws-cdk/blob/4aadaa779b48f35838cccd4e25107b2338f05547/packages/%40aws-cdk/cloud-assembly-schema/lib/manifest.ts#L137)", "type": "string" } }, @@ -391,6 +391,15 @@ }, { "$ref": "#/definitions/EndpointServiceAvailabilityZonesContextQuery" + }, + { + "$ref": "#/definitions/LoadBalancerContextQuery" + }, + { + "$ref": "#/definitions/LoadBalancerListenerContextQuery" + }, + { + "$ref": "#/definitions/SecurityGroupContextQuery" } ] } @@ -408,6 +417,9 @@ "availability-zones", "endpoint-service-availability-zones", "hosted-zone", + "load-balancer", + "load-balancer-listener", + "security-group", "ssm", "vpc-provider" ], @@ -580,6 +592,125 @@ "serviceName" ] }, + "LoadBalancerContextQuery": { + "description": "Query input for looking up a load balancer", + "type": "object", + "properties": { + "account": { + "description": "Query account", + "type": "string" + }, + "region": { + "description": "Query region", + "type": "string" + }, + "loadBalancerType": { + "$ref": "#/definitions/LoadBalancerType", + "description": "Filter load balancers by their type" + }, + "loadBalancerArn": { + "description": "Find by load balancer's ARN (Default - does not search by load balancer arn)", + "type": "string" + }, + "loadBalancerTags": { + "description": "Match load balancer tags (Default - does not match load balancers by tags)", + "type": "array", + "items": { + "$ref": "#/definitions/Tag" + } + } + }, + "required": [ + "account", + "loadBalancerType", + "region" + ] + }, + "LoadBalancerType": { + "description": "Type of load balancer", + "enum": [ + "application", + "network" + ], + "type": "string" + }, + "LoadBalancerListenerContextQuery": { + "description": "Query input for looking up a load balancer listener", + "type": "object", + "properties": { + "account": { + "description": "Query account", + "type": "string" + }, + "region": { + "description": "Query region", + "type": "string" + }, + "listenerArn": { + "description": "Find by listener's arn (Default - does not find by listener arn)", + "type": "string" + }, + "listenerProtocol": { + "description": "Filter by listener protocol (Default - does not filter by listener protocol)", + "enum": [ + "HTTP", + "HTTPS", + "TCP", + "TCP_UDP", + "TLS", + "UDP" + ], + "type": "string" + }, + "listenerPort": { + "description": "Filter listeners by listener port (Default - does not filter by a listener port)", + "type": "number" + }, + "loadBalancerType": { + "$ref": "#/definitions/LoadBalancerType", + "description": "Filter load balancers by their type" + }, + "loadBalancerArn": { + "description": "Find by load balancer's ARN (Default - does not search by load balancer arn)", + "type": "string" + }, + "loadBalancerTags": { + "description": "Match load balancer tags (Default - does not match load balancers by tags)", + "type": "array", + "items": { + "$ref": "#/definitions/Tag" + } + } + }, + "required": [ + "account", + "loadBalancerType", + "region" + ] + }, + "SecurityGroupContextQuery": { + "description": "Query input for looking up a security group", + "type": "object", + "properties": { + "account": { + "description": "Query account", + "type": "string" + }, + "region": { + "description": "Query region", + "type": "string" + }, + "securityGroupId": { + "description": "Security group id", + "type": "string" + } + }, + "required": [ + "account", + "region", + "securityGroupId" + ] + }, "RuntimeInfo": { "description": "Information about the application's runtime components.", "type": "object", diff --git a/packages/@aws-cdk/cloud-assembly-schema/schema/cloud-assembly.version.json b/packages/@aws-cdk/cloud-assembly-schema/schema/cloud-assembly.version.json index 2211f30276a5e..bdc5a9f306dec 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/schema/cloud-assembly.version.json +++ b/packages/@aws-cdk/cloud-assembly-schema/schema/cloud-assembly.version.json @@ -1 +1 @@ -{"version":"6.0.0"} +{"version":"7.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/cx-api/lib/context/load-balancer.ts b/packages/@aws-cdk/cx-api/lib/context/load-balancer.ts new file mode 100644 index 0000000000000..bea7c432de57f --- /dev/null +++ b/packages/@aws-cdk/cx-api/lib/context/load-balancer.ts @@ -0,0 +1,69 @@ +/** + * Load balancer ip address type. + */ +export enum LoadBalancerIpAddressType { + /** + * IPV4 ip address + */ + IPV4 = 'ipv4', + + /** + * Dual stack address + */ + DUAL_STACK = 'dualstack', +} + +/** + * Properties of a discovered load balancer + */ +export interface LoadBalancerContextResponse { + /** + * The ARN of the load balancer. + */ + readonly loadBalancerArn: string; + + /** + * The hosted zone ID of the load balancer's name. + */ + readonly loadBalancerCanonicalHostedZoneId: string; + + /** + * Load balancer's DNS name + */ + readonly loadBalancerDnsName: string; + + /** + * Type of IP address + */ + readonly ipAddressType: LoadBalancerIpAddressType; + + /** + * Load balancer's security groups + */ + readonly securityGroupIds: string[]; + + /** + * Load balancer's VPC + */ + readonly vpcId: string; +} + +/** + * Properties of a discovered load balancer listener. + */ +export interface LoadBalancerListenerContextResponse { + /** + * The ARN of the listener. + */ + readonly listenerArn: string; + + /** + * The port the listener is listening on. + */ + readonly listenerPort: number; + + /** + * The security groups of the load balancer. + */ + readonly securityGroupIds: string[]; +} diff --git a/packages/@aws-cdk/cx-api/lib/context/security-group.ts b/packages/@aws-cdk/cx-api/lib/context/security-group.ts new file mode 100644 index 0000000000000..f1ea8c2a7ca37 --- /dev/null +++ b/packages/@aws-cdk/cx-api/lib/context/security-group.ts @@ -0,0 +1,17 @@ + +/** + * Properties of a discovered SecurityGroup. + */ +export interface SecurityGroupContextResponse { + /** + * The security group's id. + */ + readonly securityGroupId: string; + + /** + * Whether the security group allows all outbound traffic. This will be true + * when the security group has all-protocol egress permissions to access both + * `0.0.0.0/0` and `::/0`. + */ + readonly allowAllOutbound: boolean; +} diff --git a/packages/@aws-cdk/cx-api/lib/index.ts b/packages/@aws-cdk/cx-api/lib/index.ts index a6ac4977a6d17..8bab2151735c0 100644 --- a/packages/@aws-cdk/cx-api/lib/index.ts +++ b/packages/@aws-cdk/cx-api/lib/index.ts @@ -1,8 +1,10 @@ export * from './cxapi'; export * from './context/vpc'; export * from './context/ami'; +export * from './context/load-balancer'; export * from './context/availability-zones'; export * from './context/endpoint-service-availability-zones'; +export * from './context/security-group'; export * from './cloud-artifact'; export * from './artifacts/asset-manifest-artifact'; export * from './artifacts/cloudformation-artifact'; diff --git a/packages/aws-cdk/lib/api/aws-auth/sdk.ts b/packages/aws-cdk/lib/api/aws-auth/sdk.ts index 2a20b9560b0fd..5825d0f627d39 100644 --- a/packages/aws-cdk/lib/api/aws-auth/sdk.ts +++ b/packages/aws-cdk/lib/api/aws-auth/sdk.ts @@ -29,6 +29,7 @@ export interface ISDK { s3(): AWS.S3; route53(): AWS.Route53; ecr(): AWS.ECR; + elbv2(): AWS.ELBv2; } /** @@ -92,6 +93,10 @@ export class SDK implements ISDK { return wrapServiceErrorHandling(new AWS.ECR(this.config)); } + public elbv2(): AWS.ELBv2 { + return wrapServiceErrorHandling(new AWS.ELBv2(this.config)); + } + public async currentAccount(): Promise { return cached(this, CURRENT_ACCOUNT_KEY, () => SDK.accountCache.fetch(this.credentials.accessKeyId, async () => { // if we don't have one, resolve from STS and store in cache. diff --git a/packages/aws-cdk/lib/context-providers/index.ts b/packages/aws-cdk/lib/context-providers/index.ts index a4a67351d4daf..e60ad6066d280 100644 --- a/packages/aws-cdk/lib/context-providers/index.ts +++ b/packages/aws-cdk/lib/context-providers/index.ts @@ -7,7 +7,9 @@ import { AmiContextProviderPlugin } from './ami'; import { AZContextProviderPlugin } from './availability-zones'; import { EndpointServiceAZContextProviderPlugin } from './endpoint-service-availability-zones'; import { HostedZoneContextProviderPlugin } from './hosted-zones'; +import { LoadBalancerListenerContextProviderPlugin, LoadBalancerContextProviderPlugin } from './load-balancers'; import { ContextProviderPlugin } from './provider'; +import { SecurityGroupContextProviderPlugin } from './security-groups'; import { SSMContextProviderPlugin } from './ssm-parameters'; import { VpcNetworkContextProviderPlugin } from './vpcs'; @@ -61,4 +63,7 @@ const availableContextProviders: ProviderMap = { [cxschema.ContextProvider.VPC_PROVIDER]: VpcNetworkContextProviderPlugin, [cxschema.ContextProvider.AMI_PROVIDER]: AmiContextProviderPlugin, [cxschema.ContextProvider.ENDPOINT_SERVICE_AVAILABILITY_ZONE_PROVIDER]: EndpointServiceAZContextProviderPlugin, + [cxschema.ContextProvider.SECURITY_GROUP_PROVIDER]: SecurityGroupContextProviderPlugin, + [cxschema.ContextProvider.LOAD_BALANCER_PROVIDER]: LoadBalancerContextProviderPlugin, + [cxschema.ContextProvider.LOAD_BALANCER_LISTENER_PROVIDER]: LoadBalancerListenerContextProviderPlugin, }; diff --git a/packages/aws-cdk/lib/context-providers/load-balancers.ts b/packages/aws-cdk/lib/context-providers/load-balancers.ts new file mode 100644 index 0000000000000..26f00c7746fe3 --- /dev/null +++ b/packages/aws-cdk/lib/context-providers/load-balancers.ts @@ -0,0 +1,302 @@ +import * as cxschema from '@aws-cdk/cloud-assembly-schema'; +import * as cxapi from '@aws-cdk/cx-api'; +import * as AWS from 'aws-sdk'; +import { Mode, SdkProvider } from '../api'; +import { ContextProviderPlugin } from './provider'; + +/** + * Provides load balancer context information. + */ +export class LoadBalancerContextProviderPlugin implements ContextProviderPlugin { + constructor(private readonly aws: SdkProvider) { + } + + async getValue(query: cxschema.LoadBalancerContextQuery): Promise { + const elbv2 = (await this.aws.forEnvironment(cxapi.EnvironmentUtils.make(query.account, query.region), Mode.ForReading)).elbv2(); + + if (!query.loadBalancerArn && !query.loadBalancerTags) { + throw new Error('The load balancer lookup query must specify either `loadBalancerArn` or `loadBalancerTags`'); + } + + const loadBalancers = await findLoadBalancers(elbv2, query); + + if (loadBalancers.length === 0) { + throw new Error(`No load balancers found matching ${JSON.stringify(query)}`); + } + + if (loadBalancers.length > 1) { + throw new Error(`Multiple load balancers found matching ${JSON.stringify(query)} - please provide more specific criteria`); + } + + const loadBalancer = loadBalancers[0]; + + const ipAddressType = loadBalancer.IpAddressType === 'ipv4' + ? cxapi.LoadBalancerIpAddressType.IPV4 + : cxapi.LoadBalancerIpAddressType.DUAL_STACK; + + return { + loadBalancerArn: loadBalancer.LoadBalancerArn!, + loadBalancerCanonicalHostedZoneId: loadBalancer.CanonicalHostedZoneId!, + loadBalancerDnsName: loadBalancer.DNSName!, + vpcId: loadBalancer.VpcId!, + securityGroupIds: loadBalancer.SecurityGroups ?? [], + ipAddressType: ipAddressType, + }; + } +} + +// Decreases line length +type LoadBalancerListenerQuery = cxschema.LoadBalancerListenerContextQuery; +type LoadBalancerListenerResponse = cxapi.LoadBalancerListenerContextResponse; + +/** + * Provides load balancer listener context information + */ +export class LoadBalancerListenerContextProviderPlugin implements ContextProviderPlugin { + constructor(private readonly aws: SdkProvider) { + } + + async getValue(query: LoadBalancerListenerQuery): Promise { + const elbv2 = (await this.aws.forEnvironment(cxapi.EnvironmentUtils.make(query.account, query.region), Mode.ForReading)).elbv2(); + + if (!query.listenerArn && !query.loadBalancerArn && !query.loadBalancerTags) { + throw new Error('The load balancer listener query must specify at least one of: `listenerArn`, `loadBalancerArn` or `loadBalancerTags`'); + } + + return query.listenerArn ? this.getListenerByArn(elbv2, query) : this.getListenerByFilteringLoadBalancers(elbv2, query); + } + + /** + * Look up a listener by querying listeners for query's listener arn and then + * resolve its load balancer for the security group information. + */ + private async getListenerByArn(elbv2: AWS.ELBv2, query: LoadBalancerListenerQuery) { + const listenerArn = query.listenerArn!; + const listenerResults = await elbv2.describeListeners({ ListenerArns: [listenerArn] }).promise(); + const listeners = (listenerResults.Listeners ?? []); + + if (listeners.length === 0) { + throw new Error(`No load balancer listeners found matching arn ${listenerArn}`); + } + + const listener = listeners[0]; + + const loadBalancers = await findLoadBalancers(elbv2, { + ...query, + loadBalancerArn: listener.LoadBalancerArn!, + }); + + if (loadBalancers.length === 0) { + throw new Error(`No associated load balancer found for listener arn ${listenerArn}`); + } + + const loadBalancer = loadBalancers[0]; + + return { + listenerArn: listener.ListenerArn!, + listenerPort: listener.Port!, + securityGroupIds: loadBalancer.SecurityGroups ?? [], + }; + } + + /** + * Look up a listener by starting from load balancers, filtering out + * unmatching load balancers, and then by querying the listeners of each load + * balancer and filtering out unmatching listeners. + */ + private async getListenerByFilteringLoadBalancers(elbv2: AWS.ELBv2, args: LoadBalancerListenerQuery) { + // Find matching load balancers + const loadBalancers = await findLoadBalancers(elbv2, args); + + if (loadBalancers.length === 0) { + throw new Error(`No associated load balancers found for load balancer listener query ${JSON.stringify(args)}`); + } + + return this.findMatchingListener(elbv2, loadBalancers, args); + } + + /** + * Finds the matching listener from the list of load balancers. This will + * error unless there is exactly one match so that the user is prompted to + * provide more specific criteria rather than us providing a nondeterministic + * result. + */ + private async findMatchingListener(elbv2: AWS.ELBv2, loadBalancers: AWS.ELBv2.LoadBalancers, query: LoadBalancerListenerQuery) { + const loadBalancersByArn = indexLoadBalancersByArn(loadBalancers); + const loadBalancerArns = Object.keys(loadBalancersByArn); + + const matches = Array(); + + for await (const listener of describeListenersByLoadBalancerArn(elbv2, loadBalancerArns)) { + const loadBalancer = loadBalancersByArn[listener.LoadBalancerArn!]; + if (listenerMatchesQueryFilter(listener, query) && loadBalancer) { + matches.push({ + listenerArn: listener.ListenerArn!, + listenerPort: listener.Port!, + securityGroupIds: loadBalancer.SecurityGroups ?? [], + }); + } + } + + if (matches.length === 0) { + throw new Error(`No load balancer listeners found matching ${JSON.stringify(query)}`); + } + + if (matches.length > 1) { + throw new Error(`Multiple load balancer listeners found matching ${JSON.stringify(query)} - please provide more specific criteria`); + } + + return matches[0]; + } +} + +/** + * Find load balancers by the given filter args. + */ +async function findLoadBalancers(elbv2: AWS.ELBv2, args: cxschema.LoadBalancerFilter) { + // List load balancers + let loadBalancers = await describeLoadBalancers(elbv2, { + LoadBalancerArns: args.loadBalancerArn ? [args.loadBalancerArn] : undefined, + }); + + // Filter by load balancer type + loadBalancers = loadBalancers.filter(lb => lb.Type === args.loadBalancerType); + + // Filter by load balancer tags + if (args.loadBalancerTags) { + loadBalancers = await filterLoadBalancersByTags(elbv2, loadBalancers, args.loadBalancerTags); + } + + return loadBalancers; +} + +/** + * Helper to paginate over describeLoadBalancers + * @internal + */ +export async function describeLoadBalancers(elbv2: AWS.ELBv2, request: AWS.ELBv2.DescribeLoadBalancersInput) { + const loadBalancers = Array(); + let page: AWS.ELBv2.DescribeLoadBalancersOutput | undefined; + do { + page = await elbv2.describeLoadBalancers({ + ...request, + Marker: page?.NextMarker, + }).promise(); + + loadBalancers.push(...Array.from(page.LoadBalancers ?? [])); + } while (page.NextMarker); + + return loadBalancers; +} + +/** + * Describes the tags of each load balancer and returns the load balancers that + * match the given tags. + */ +async function filterLoadBalancersByTags(elbv2: AWS.ELBv2, loadBalancers: AWS.ELBv2.LoadBalancers, loadBalancerTags: cxschema.Tag[]) { + const loadBalancersByArn = indexLoadBalancersByArn(loadBalancers); + const loadBalancerArns = Object.keys(loadBalancersByArn); + const matchingLoadBalancers = Array(); + + // Consume the items of async generator. + for await (const tags of describeTags(elbv2, loadBalancerArns)) { + if (tagsMatch(tags, loadBalancerTags) && loadBalancersByArn[tags.ResourceArn!]) { + matchingLoadBalancers.push(loadBalancersByArn[tags.ResourceArn!]); + } + } + + return matchingLoadBalancers; +} + +/** + * Generator function that yields `TagDescriptions`. The API doesn't support + * pagination, so this generator breaks the resource list into chunks and issues + * the appropriate requests, yielding each tag description as it receives it. + * @internal + */ +export async function* describeTags(elbv2: AWS.ELBv2, resourceArns: string[]) { + // Max of 20 resource arns per request. + const chunkSize = 20; + for (let i = 0; i < resourceArns.length; i += chunkSize) { + const chunk = resourceArns.slice(i, Math.min(i + chunkSize, resourceArns.length)); + const chunkTags = await elbv2.describeTags({ + ResourceArns: chunk, + }).promise(); + + for (const tag of chunkTags.TagDescriptions ?? []) { + yield tag; + } + } +} + +/** + * Determines if the given TagDescription matches the required tags. + * @internal + */ +export function tagsMatch(tagDescription: AWS.ELBv2.TagDescription, requiredTags: cxschema.Tag[]) { + const tagsByName: Record = {}; + for (const tag of tagDescription.Tags ?? []) { + tagsByName[tag.Key!] = tag.Value; + } + + for (const tag of requiredTags) { + if (tagsByName[tag.key] !== tag.value) { + return false; + } + } + + return true; +} + +/** + * Async generator that produces listener descriptions by traversing the + * pagination. Because describeListeners only lets you search by one load + * balancer arn at a time, we request them individually and yield the listeners + * as they come in. + * @internal + */ +export async function* describeListenersByLoadBalancerArn(elbv2: AWS.ELBv2, loadBalancerArns: string[]) { + for (const loadBalancerArn of loadBalancerArns) { + let page: AWS.ELBv2.DescribeListenersOutput | undefined; + do { + page = await elbv2.describeListeners({ + LoadBalancerArn: loadBalancerArn, + Marker: page?.NextMarker, + }).promise(); + + for (const listener of page.Listeners ?? []) { + yield listener; + } + } while (page.NextMarker); + } +} + +/** + * Determines if a listener matches the query filters. + */ +function listenerMatchesQueryFilter(listener: AWS.ELBv2.Listener, args: cxschema.LoadBalancerListenerContextQuery): boolean { + if (args.listenerPort && listener.Port !== args.listenerPort) { + // No match. + return false; + } + + if (args.listenerProtocol && listener.Protocol !== args.listenerProtocol) { + // No match. + return false; + } + + return true; +} + +/** + * Returns a record of load balancers indexed by their arns + */ +function indexLoadBalancersByArn(loadBalancers: AWS.ELBv2.LoadBalancer[]): Record { + const loadBalancersByArn: Record = {}; + + for (const loadBalancer of loadBalancers) { + loadBalancersByArn[loadBalancer.LoadBalancerArn!] = loadBalancer; + } + + return loadBalancersByArn; +} diff --git a/packages/aws-cdk/lib/context-providers/security-groups.ts b/packages/aws-cdk/lib/context-providers/security-groups.ts new file mode 100644 index 0000000000000..e8f464128b68d --- /dev/null +++ b/packages/aws-cdk/lib/context-providers/security-groups.ts @@ -0,0 +1,55 @@ +import * as cxschema from '@aws-cdk/cloud-assembly-schema'; +import * as cxapi from '@aws-cdk/cx-api'; +import * as AWS from 'aws-sdk'; +import { Mode, SdkProvider } from '../api'; +import { ContextProviderPlugin } from './provider'; + +export class SecurityGroupContextProviderPlugin implements ContextProviderPlugin { + constructor(private readonly aws: SdkProvider) { + } + + async getValue(args: cxschema.SecurityGroupContextQuery): Promise { + const account: string = args.account!; + const region: string = args.region!; + + const ec2 = (await this.aws.forEnvironment(cxapi.EnvironmentUtils.make(account, region), Mode.ForReading)).ec2(); + + const response = await ec2.describeSecurityGroups({ + GroupIds: [args.securityGroupId], + }).promise(); + + const securityGroups = response.SecurityGroups ?? []; + if (securityGroups.length === 0) { + throw new Error(`No security groups found matching ${JSON.stringify(args)}`); + } + + const [securityGroup] = securityGroups; + + return { + securityGroupId: securityGroup.GroupId!, + allowAllOutbound: hasAllTrafficEgress(securityGroup), + }; + } +} + +/** + * @internal + */ +export function hasAllTrafficEgress(securityGroup: AWS.EC2.SecurityGroup) { + let hasAllTrafficCidrV4 = false; + let hasAllTrafficCidrV6 = false; + + for (const ipPermission of securityGroup.IpPermissionsEgress ?? []) { + const isAllProtocols = ipPermission.IpProtocol === '-1'; + + if (isAllProtocols && ipPermission.IpRanges?.some(m => m.CidrIp === '0.0.0.0/0')) { + hasAllTrafficCidrV4 = true; + } + + if (isAllProtocols && ipPermission.Ipv6Ranges?.some(m => m.CidrIpv6 === '::/0')) { + hasAllTrafficCidrV6 = true; + } + } + + return hasAllTrafficCidrV4 && hasAllTrafficCidrV6; +} diff --git a/packages/aws-cdk/test/context-providers/load-balancers.test.ts b/packages/aws-cdk/test/context-providers/load-balancers.test.ts new file mode 100644 index 0000000000000..03ab1ac4cf989 --- /dev/null +++ b/packages/aws-cdk/test/context-providers/load-balancers.test.ts @@ -0,0 +1,881 @@ +import * as cxschema from '@aws-cdk/cloud-assembly-schema'; +import * as aws from 'aws-sdk'; +import * as AWS from 'aws-sdk-mock'; +import { LoadBalancerListenerContextProviderPlugin, LoadBalancerContextProviderPlugin, tagsMatch, describeListenersByLoadBalancerArn, describeTags, describeLoadBalancers } from '../../lib/context-providers/load-balancers'; +import { MockSdkProvider } from '../util/mock-sdk'; + +AWS.setSDK(require.resolve('aws-sdk')); + +const mockSDK = new MockSdkProvider(); + +type AwsCallback = (err: Error | null, val: T) => void; + +afterEach(done => { + AWS.restore(); + done(); +}); + +describe('utilities', () => { + test('describeTags yields tags by chunk', async () => { + const resourceTags: Record = {}; + for (const resourceArn of [...Array(100)].map((_, i) => `arn:load-balancer-${i}`)) { + resourceTags[resourceArn] = { + ResourceArn: resourceArn, + Tags: [ + { Key: 'name', Value: resourceArn }, + ], + }; + }; + + AWS.mock('ELBv2', 'describeTags', (_params: aws.ELBv2.DescribeTagsInput, cb: AwsCallback) => { + expect(_params.ResourceArns.length).toBeLessThanOrEqual(20); + + cb(null, { + TagDescriptions: _params.ResourceArns.map(resourceArn => ({ + ResourceArn: resourceArn, + Tags: [ + { Key: 'name', Value: resourceArn }, + ], + })), + }); + }); + + const elbv2 = await (await mockSDK.forEnvironment()).elbv2(); + + const resourceTagsOut: Record = {}; + for await (const tagDescription of describeTags(elbv2, Object.keys(resourceTags))) { + resourceTagsOut[tagDescription.ResourceArn!] = tagDescription; + } + + expect(resourceTagsOut).toEqual(resourceTags); + }); + + test('describeListenersByLoadBalancerArn traverses pages', async () => { + // arn:listener-0, arn:listener-1, ..., arn:listener-99 + const listenerArns = [...Array(100)].map((_, i) => `arn:listener-${i}`); + expect(listenerArns[0]).toEqual('arn:listener-0'); + + AWS.mock('ELBv2', 'describeListeners', (_params: aws.ELBv2.DescribeListenersInput, cb: AwsCallback) => { + const start = parseInt(_params.Marker ?? '0'); + const end = start + 10; + const slice = listenerArns.slice(start, end); + + cb(null, { + Listeners: slice.map(arn => ({ + ListenerArn: arn, + })), + NextMarker: end < listenerArns.length ? end.toString() : undefined, + }); + }); + + const elbv2 = await (await mockSDK.forEnvironment()).elbv2(); + + const listenerArnsFromPages = Array(); + for await (const listener of describeListenersByLoadBalancerArn(elbv2, ['arn:load-balancer'])) { + listenerArnsFromPages.push(listener.ListenerArn!); + } + + expect(listenerArnsFromPages).toEqual(listenerArns); + }); + + test('describeLoadBalancers traverses pages', async () => { + const loadBalancerArns = [...Array(100)].map((_, i) => `arn:load-balancer-${i}`); + expect(loadBalancerArns[0]).toEqual('arn:load-balancer-0'); + + AWS.mock('ELBv2', 'describeLoadBalancers', (_params: aws.ELBv2.DescribeLoadBalancersInput, cb: AwsCallback) => { + const start = parseInt(_params.Marker ?? '0'); + const end = start + 10; + const slice = loadBalancerArns.slice(start, end); + + cb(null, { + LoadBalancers: slice.map(loadBalancerArn => ({ + LoadBalancerArn: loadBalancerArn, + })), + NextMarker: end < loadBalancerArns.length ? end.toString() : undefined, + }); + }); + + const elbv2 = await (await mockSDK.forEnvironment()).elbv2(); + const loadBalancerArnsFromPages = (await describeLoadBalancers(elbv2, {})).map(l => l.LoadBalancerArn!); + + expect(loadBalancerArnsFromPages).toEqual(loadBalancerArns); + }); + + describe('tagsMatch', () => { + test('all tags match', () => { + const tagDescription = { + ResourceArn: 'arn:whatever', + Tags: [{ Key: 'some', Value: 'tag' }], + }; + + const requiredTags = [ + { key: 'some', value: 'tag' }, + ]; + + expect(tagsMatch(tagDescription, requiredTags)).toEqual(true); + }); + + test('extra tags match', () => { + const tagDescription = { + ResourceArn: 'arn:whatever', + Tags: [ + { Key: 'some', Value: 'tag' }, + { Key: 'other', Value: 'tag2' }, + ], + }; + + const requiredTags = [ + { key: 'some', value: 'tag' }, + ]; + + expect(tagsMatch(tagDescription, requiredTags)).toEqual(true); + }); + + test('no tags matches no tags', () => { + const tagDescription = { + ResourceArn: 'arn:whatever', + Tags: [], + }; + + expect(tagsMatch(tagDescription, [])).toEqual(true); + }); + + test('one tag matches of several', () => { + const tagDescription = { + ResourceArn: 'arn:whatever', + Tags: [{ Key: 'some', Value: 'tag' }], + }; + + const requiredTags = [ + { key: 'some', value: 'tag' }, + { key: 'other', value: 'value' }, + ]; + + expect(tagsMatch(tagDescription, requiredTags)).toEqual(false); + }); + + test('undefined tag does not error', () => { + const tagDescription = { + ResourceArn: 'arn:whatever', + Tags: [{ Key: 'some' }], + }; + + const requiredTags = [ + { key: 'some', value: 'tag' }, + { key: 'other', value: 'value' }, + ]; + + expect(tagsMatch(tagDescription, requiredTags)).toEqual(false); + }); + }); +}); + +describe('load balancer context provider plugin', () => { + test('errors when no matches are found', async () => { + // GIVEN + const provider = new LoadBalancerContextProviderPlugin(mockSDK); + + mockALBLookup({ + loadBalancers: [], + }); + + // WHEN + await expect( + provider.getValue({ + account: '1234', + region: 'us-east-1', + loadBalancerType: cxschema.LoadBalancerType.APPLICATION, + loadBalancerArn: 'arn:load-balancer1', + }), + ).rejects.toThrow(/No load balancers found/i); + }); + + test('errors when multiple load balancers match', async () => { + // GIVEN + const provider = new LoadBalancerContextProviderPlugin(mockSDK); + + mockALBLookup({ + loadBalancers: [ + { + IpAddressType: 'ipv4', + LoadBalancerArn: 'arn:load-balancer1', + DNSName: 'dns1.example.com', + CanonicalHostedZoneId: 'Z1234', + SecurityGroups: ['sg-1234'], + VpcId: 'vpc-1234', + Type: 'application', + }, + { + IpAddressType: 'ipv4', + LoadBalancerArn: 'arn:load-balancer2', + DNSName: 'dns2.example.com', + CanonicalHostedZoneId: 'Z1234', + SecurityGroups: ['sg-1234'], + VpcId: 'vpc-1234', + Type: 'application', + }, + ], + describeTagsExpected: { ResourceArns: ['arn:load-balancer1', 'arn:load-balancer2'] }, + tagDescriptions: [ + { + ResourceArn: 'arn:load-balancer1', + Tags: [ + { Key: 'some', Value: 'tag' }, + ], + }, + { + ResourceArn: 'arn:load-balancer2', + Tags: [ + { Key: 'some', Value: 'tag' }, + ], + }, + ], + }); + + // WHEN + await expect( + provider.getValue({ + account: '1234', + region: 'us-east-1', + loadBalancerType: cxschema.LoadBalancerType.APPLICATION, + loadBalancerTags: [ + { key: 'some', value: 'tag' }, + ], + }), + ).rejects.toThrow(/Multiple load balancers found/i); + }); + + test('looks up by arn', async () => { + // GIVEN + const provider = new LoadBalancerContextProviderPlugin(mockSDK); + + mockALBLookup({ + describeLoadBalancersExpected: { LoadBalancerArns: ['arn:load-balancer1'] }, + loadBalancers: [ + { + IpAddressType: 'ipv4', + LoadBalancerArn: 'arn:load-balancer1', + DNSName: 'dns.example.com', + CanonicalHostedZoneId: 'Z1234', + SecurityGroups: ['sg-1234'], + VpcId: 'vpc-1234', + Type: 'application', + }, + ], + }); + + // WHEN + const result = await provider.getValue({ + account: '1234', + region: 'us-east-1', + loadBalancerType: cxschema.LoadBalancerType.APPLICATION, + loadBalancerArn: 'arn:load-balancer1', + }); + + // THEN + expect(result.ipAddressType).toEqual('ipv4'); + expect(result.loadBalancerArn).toEqual('arn:load-balancer1'); + expect(result.loadBalancerCanonicalHostedZoneId).toEqual('Z1234'); + expect(result.loadBalancerDnsName).toEqual('dns.example.com'); + expect(result.securityGroupIds).toEqual(['sg-1234']); + expect(result.vpcId).toEqual('vpc-1234'); + }); + + test('looks up by tags', async() => { + // GIVEN + const provider = new LoadBalancerContextProviderPlugin(mockSDK); + + mockALBLookup({ + loadBalancers: [ + { + IpAddressType: 'ipv4', + LoadBalancerArn: 'arn:load-balancer1', + DNSName: 'dns1.example.com', + CanonicalHostedZoneId: 'Z1234', + SecurityGroups: ['sg-1234'], + VpcId: 'vpc-1234', + Type: 'application', + }, + { + IpAddressType: 'ipv4', + LoadBalancerArn: 'arn:load-balancer2', + DNSName: 'dns2.example.com', + CanonicalHostedZoneId: 'Z1234', + SecurityGroups: ['sg-1234'], + VpcId: 'vpc-1234', + Type: 'application', + }, + ], + describeTagsExpected: { ResourceArns: ['arn:load-balancer1', 'arn:load-balancer2'] }, + tagDescriptions: [ + { + ResourceArn: 'arn:load-balancer1', + Tags: [ + { Key: 'some', Value: 'tag' }, + ], + }, + { + ResourceArn: 'arn:load-balancer2', + Tags: [ + { Key: 'some', Value: 'tag' }, + { Key: 'second', Value: 'tag2' }, + ], + }, + ], + }); + + // WHEN + const result = await provider.getValue({ + account: '1234', + region: 'us-east-1', + loadBalancerType: cxschema.LoadBalancerType.APPLICATION, + loadBalancerTags: [ + { key: 'some', value: 'tag' }, + { key: 'second', value: 'tag2' }, + ], + }); + + expect(result.loadBalancerArn).toEqual('arn:load-balancer2'); + }); + + test('filters by type', async () => { + // GIVEN + const provider = new LoadBalancerContextProviderPlugin(mockSDK); + + mockALBLookup({ + loadBalancers: [ + { + IpAddressType: 'ipv4', + Type: 'network', + LoadBalancerArn: 'arn:load-balancer1', + DNSName: 'dns1.example.com', + CanonicalHostedZoneId: 'Z1234', + SecurityGroups: ['sg-1234'], + VpcId: 'vpc-1234', + }, + { + IpAddressType: 'ipv4', + Type: 'application', + LoadBalancerArn: 'arn:load-balancer2', + DNSName: 'dns2.example.com', + CanonicalHostedZoneId: 'Z1234', + SecurityGroups: ['sg-1234'], + VpcId: 'vpc-1234', + }, + ], + + tagDescriptions: [ + { + ResourceArn: 'arn:load-balancer1', + Tags: [{ Key: 'some', Value: 'tag' }], + }, + { + ResourceArn: 'arn:load-balancer2', + Tags: [{ Key: 'some', Value: 'tag' }], + }, + ], + }); + + // WHEN + const loadBalancer = await provider.getValue({ + account: '1234', + region: 'us-east-1', + loadBalancerTags: [{ key: 'some', value: 'tag' }], + loadBalancerType: cxschema.LoadBalancerType.APPLICATION, + }); + + expect(loadBalancer.loadBalancerArn).toEqual('arn:load-balancer2'); + }); +}); + +describe('load balancer listener context provider plugin', () => { + test('errors when no associated load balancers match', async () => { + // GIVEN + const provider = new LoadBalancerListenerContextProviderPlugin(mockSDK); + + mockALBLookup({ + loadBalancers: [], + }); + + // WHEN + await expect( + provider.getValue({ + account: '1234', + region: 'us-east-1', + loadBalancerType: cxschema.LoadBalancerType.APPLICATION, + loadBalancerTags: [{ key: 'some', value: 'tag' }], + }), + ).rejects.toThrow(/No associated load balancers found/i); + }); + + test('errors when no listeners match', async () => { + // GIVEN + const provider = new LoadBalancerListenerContextProviderPlugin(mockSDK); + + mockALBLookup({ + loadBalancers: [ + { + LoadBalancerArn: 'arn:load-balancer', + Type: 'application', + }, + ], + listeners: [ + { + LoadBalancerArn: 'arn:load-balancer', + ListenerArn: 'arn:listener', + Port: 80, + Protocol: 'HTTP', + }, + ], + }); + + // WHEN + await expect( + provider.getValue({ + account: '1234', + region: 'us-east-1', + loadBalancerType: cxschema.LoadBalancerType.APPLICATION, + loadBalancerArn: 'arn:load-balancer', + listenerPort: 443, + listenerProtocol: cxschema.LoadBalancerListenerProtocol.HTTPS, + }), + ).rejects.toThrow(/No load balancer listeners found/i); + }); + + test('errors when multiple listeners match', async () => { + // GIVEN + const provider = new LoadBalancerListenerContextProviderPlugin(mockSDK); + + mockALBLookup({ + loadBalancers: [ + { + LoadBalancerArn: 'arn:load-balancer', + Type: 'application', + }, + { + LoadBalancerArn: 'arn:load-balancer2', + Type: 'application', + }, + ], + tagDescriptions: [ + { + ResourceArn: 'arn:load-balancer', + Tags: [{ Key: 'some', Value: 'tag' }], + }, + { + ResourceArn: 'arn:load-balancer2', + Tags: [{ Key: 'some', Value: 'tag' }], + }, + ], + listeners: [ + { + LoadBalancerArn: 'arn:load-balancer', + ListenerArn: 'arn:listener', + Port: 80, + Protocol: 'HTTP', + }, + { + LoadBalancerArn: 'arn:load-balancer2', + ListenerArn: 'arn:listener2', + Port: 80, + Protocol: 'HTTP', + }, + ], + }); + + // WHEN + await expect( + provider.getValue({ + account: '1234', + region: 'us-east-1', + loadBalancerType: cxschema.LoadBalancerType.APPLICATION, + loadBalancerTags: [{ key: 'some', value: 'tag' }], + listenerPort: 80, + listenerProtocol: cxschema.LoadBalancerListenerProtocol.HTTP, + }), + ).rejects.toThrow(/Multiple load balancer listeners/i); + }); + + test('looks up by listener arn', async () => { + // GIVEN + const provider = new LoadBalancerListenerContextProviderPlugin(mockSDK); + + mockALBLookup({ + describeListenersExpected: { ListenerArns: ['arn:listener-arn'] }, + listeners: [ + { + ListenerArn: 'arn:listener-arn', + LoadBalancerArn: 'arn:load-balancer-arn', + Port: 999, + }, + ], + describeLoadBalancersExpected: { LoadBalancerArns: ['arn:load-balancer-arn'] }, + loadBalancers: [ + { + LoadBalancerArn: 'arn:load-balancer-arn', + SecurityGroups: ['sg-1234', 'sg-2345'], + Type: 'application', + }, + ], + }); + + // WHEN + const listener = await provider.getValue({ + account: '1234', + region: 'us-east-1', + loadBalancerType: cxschema.LoadBalancerType.APPLICATION, + listenerArn: 'arn:listener-arn', + }); + + // THEN + expect(listener.listenerArn).toEqual('arn:listener-arn'); + expect(listener.listenerPort).toEqual(999); + expect(listener.securityGroupIds).toEqual(['sg-1234', 'sg-2345']); + }); + + test('looks up by associated load balancer arn', async () => { + // GIVEN + const provider = new LoadBalancerListenerContextProviderPlugin(mockSDK); + + mockALBLookup({ + describeLoadBalancersExpected: { LoadBalancerArns: ['arn:load-balancer-arn1'] }, + loadBalancers: [ + { + LoadBalancerArn: 'arn:load-balancer-arn1', + SecurityGroups: ['sg-1234'], + Type: 'application', + }, + ], + + describeListenersExpected: { LoadBalancerArn: 'arn:load-balancer-arn1' }, + listeners: [ + { + // This one + ListenerArn: 'arn:listener-arn1', + LoadBalancerArn: 'arn:load-balancer-arn1', + Port: 80, + }, + ], + }); + + // WHEN + const listener = await provider.getValue({ + account: '1234', + region: 'us-east-1', + loadBalancerType: cxschema.LoadBalancerType.APPLICATION, + loadBalancerArn: 'arn:load-balancer-arn1', + }); + + // THEN + expect(listener.listenerArn).toEqual('arn:listener-arn1'); + expect(listener.listenerPort).toEqual(80); + expect(listener.securityGroupIds).toEqual(['sg-1234']); + }); + + test('looks up by associated load balancer tags', async () => { + // GIVEN + const provider = new LoadBalancerListenerContextProviderPlugin(mockSDK); + + mockALBLookup({ + describeLoadBalancersExpected: { LoadBalancerArns: undefined }, + loadBalancers: [ + { + // This one should have the wrong tags + LoadBalancerArn: 'arn:load-balancer-arn1', + SecurityGroups: ['sg-1234', 'sg-2345'], + Type: 'application', + }, + { + // Expecting this one + LoadBalancerArn: 'arn:load-balancer-arn2', + SecurityGroups: ['sg-3456', 'sg-4567'], + Type: 'application', + }, + ], + + describeTagsExpected: { ResourceArns: ['arn:load-balancer-arn1', 'arn:load-balancer-arn2'] }, + tagDescriptions: [ + { + ResourceArn: 'arn:load-balancer-arn1', + Tags: [], + }, + { + // Expecting this one + ResourceArn: 'arn:load-balancer-arn2', + Tags: [ + { Key: 'some', Value: 'tag' }, + ], + }, + ], + + describeListenersExpected: { LoadBalancerArn: 'arn:load-balancer-arn2' }, + listeners: [ + { + // This one + ListenerArn: 'arn:listener-arn1', + LoadBalancerArn: 'arn:load-balancer-arn2', + Port: 80, + }, + { + ListenerArn: 'arn:listener-arn2', + LoadBalancerArn: 'arn:load-balancer-arn2', + Port: 999, + }, + ], + }); + + // WHEN + const listener = await provider.getValue({ + account: '1234', + region: 'us-east-1', + loadBalancerType: cxschema.LoadBalancerType.APPLICATION, + loadBalancerTags: [ + { key: 'some', value: 'tag' }, + ], + listenerPort: 999, + }); + + // THEN + expect(listener.listenerArn).toEqual('arn:listener-arn2'); + expect(listener.listenerPort).toEqual(999); + expect(listener.securityGroupIds).toEqual(['sg-3456', 'sg-4567']); + }); + + test('looks up by listener port and proto', async () => { + // GIVEN + const provider = new LoadBalancerListenerContextProviderPlugin(mockSDK); + + AWS.mock('ELBv2', 'describeLoadBalancers', (_params: aws.ELBv2.DescribeLoadBalancersInput, cb: AwsCallback) => { + expect(_params).toEqual({}); + cb(null, { + LoadBalancers: [ + { + // Shouldn't have any matching listeners + IpAddressType: 'ipv4', + LoadBalancerArn: 'arn:load-balancer1', + DNSName: 'dns1.example.com', + CanonicalHostedZoneId: 'Z1234', + SecurityGroups: ['sg-1234'], + VpcId: 'vpc-1234', + Type: 'application', + }, + { + // Should have a matching listener + IpAddressType: 'ipv4', + LoadBalancerArn: 'arn:load-balancer2', + DNSName: 'dns2.example.com', + CanonicalHostedZoneId: 'Z1234', + SecurityGroups: ['sg-2345'], + VpcId: 'vpc-1234', + Type: 'application', + }, + ], + }); + }); + + AWS.mock('ELBv2', 'describeTags', (_params: aws.ELBv2.DescribeTagsInput, cb: AwsCallback) => { + cb(null, { + TagDescriptions: [ + { + ResourceArn: 'arn:load-balancer1', + Tags: [{ Key: 'some', Value: 'tag' }], + }, + { + ResourceArn: 'arn:load-balancer2', + Tags: [{ Key: 'some', Value: 'tag' }], + }, + ], + }); + }); + + AWS.mock('ELBv2', 'describeListeners', (params: aws.ELBv2.DescribeListenersInput, cb: AwsCallback) => { + if (params.LoadBalancerArn === 'arn:load-balancer1') { + cb(null, { + Listeners: [ + { + // Wrong port, wrong protocol => no match + ListenerArn: 'arn:listener-arn1', + LoadBalancerArn: 'arn:load-balancer1', + Protocol: 'HTTP', + Port: 80, + }, + { + // Wrong protocol, right port => no match + ListenerArn: 'arn:listener-arn3', + LoadBalancerArn: 'arn:load-balancer1', + Protocol: 'HTTPS', + Port: 443, + }, + { + // Wrong port, right protocol => no match + ListenerArn: 'arn:listener-arn4', + LoadBalancerArn: 'arn:load-balancer1', + Protocol: 'TCP', + Port: 999, + }, + ], + }); + } else if (params.LoadBalancerArn === 'arn:load-balancer2') { + cb(null, { + Listeners: [ + { + // Wrong port, wrong protocol => no match + ListenerArn: 'arn:listener-arn5', + LoadBalancerArn: 'arn:load-balancer2', + Protocol: 'HTTP', + Port: 80, + }, + { + // Right port, right protocol => match + ListenerArn: 'arn:listener-arn6', + LoadBalancerArn: 'arn:load-balancer2', + Port: 443, + Protocol: 'TCP', + }, + ], + }); + } else { + cb(new Error(`Unexpected request: ${JSON.stringify(params)}'`), {}); + } + }); + + // WHEN + const listener = await provider.getValue({ + account: '1234', + region: 'us-east-1', + loadBalancerType: cxschema.LoadBalancerType.APPLICATION, + loadBalancerTags: [{ key: 'some', value: 'tag' }], + listenerProtocol: cxschema.LoadBalancerListenerProtocol.TCP, + listenerPort: 443, + }); + + // THEN + expect(listener.listenerArn).toEqual('arn:listener-arn6'); + expect(listener.listenerPort).toEqual(443); + expect(listener.securityGroupIds).toEqual(['sg-2345']); + }); + + test('filters by associated load balancer type', async () => { + // GIVEN + const provider = new LoadBalancerListenerContextProviderPlugin(mockSDK); + + mockALBLookup({ + describeLoadBalancersExpected: { LoadBalancerArns: undefined }, + loadBalancers: [ + { + // This one has wrong type => no match + LoadBalancerArn: 'arn:load-balancer-arn1', + SecurityGroups: [], + Type: 'application', + }, + { + // Right type => match + LoadBalancerArn: 'arn:load-balancer-arn2', + SecurityGroups: [], + Type: 'network', + }, + ], + + tagDescriptions: [ + { + ResourceArn: 'arn:load-balancer-arn1', + Tags: [{ Key: 'some', Value: 'tag' }], + }, + { + ResourceArn: 'arn:load-balancer-arn2', + Tags: [{ Key: 'some', Value: 'tag' }], + }, + ], + + describeListenersExpected: { LoadBalancerArn: 'arn:load-balancer-arn2' }, + listeners: [ + { + ListenerArn: 'arn:listener-arn2', + LoadBalancerArn: 'arn:load-balancer-arn2', + Port: 443, + }, + ], + }); + + // WHEN + const listener = await provider.getValue({ + account: '1234', + region: 'us-east-1', + loadBalancerType: cxschema.LoadBalancerType.NETWORK, + loadBalancerTags: [{ key: 'some', value: 'tag' }], + listenerPort: 443, + }); + + // THEN + expect(listener.listenerArn).toEqual('arn:listener-arn2'); + expect(listener.listenerPort).toEqual(443); + }); + + test('errors when associated load balancer is wrong type', async () => { + // GIVEN + const provider = new LoadBalancerListenerContextProviderPlugin(mockSDK); + + mockALBLookup({ + describeListenersExpected: { ListenerArns: ['arn:listener-arn1'] }, + listeners: [ + { + ListenerArn: 'arn:listener-arn1', + LoadBalancerArn: 'arn:load-balancer-arn1', + Port: 443, + }, + ], + + describeLoadBalancersExpected: { LoadBalancerArns: ['arn:load-balancer-arn1'] }, + loadBalancers: [ + { + // This one has wrong type => no match + LoadBalancerArn: 'arn:load-balancer-arn1', + SecurityGroups: [], + Type: 'application', + }, + ], + }); + + // WHEN + await expect( + provider.getValue({ + account: '1234', + region: 'us-east-1', + loadBalancerType: cxschema.LoadBalancerType.NETWORK, + listenerArn: 'arn:listener-arn1', + }), + ).rejects.toThrow(/no associated load balancer found/i); + }); +}); + +interface ALBLookupOptions { + describeLoadBalancersExpected?: any; + loadBalancers?: aws.ELBv2.LoadBalancers; + describeTagsExpected?: any; + tagDescriptions?: aws.ELBv2.TagDescriptions; + describeListenersExpected?: any; + listeners?: aws.ELBv2.Listeners; +} + +function mockALBLookup(options: ALBLookupOptions) { + AWS.mock('ELBv2', 'describeLoadBalancers', (_params: aws.ELBv2.DescribeLoadBalancersInput, cb: AwsCallback) => { + if (options.describeLoadBalancersExpected !== undefined) { + expect(_params).toEqual(options.describeLoadBalancersExpected); + } + cb(null, { LoadBalancers: options.loadBalancers }); + }); + + AWS.mock('ELBv2', 'describeTags', (_params: aws.ELBv2.DescribeTagsInput, cb: AwsCallback) => { + if (options.describeTagsExpected !== undefined) { + expect(_params).toEqual(options.describeTagsExpected); + } + cb(null, { TagDescriptions: options.tagDescriptions }); + }); + + AWS.mock('ELBv2', 'describeListeners', (_params: aws.ELBv2.DescribeListenersInput, cb: AwsCallback) => { + if (options.describeListenersExpected !== undefined) { + expect(_params).toEqual(options.describeListenersExpected); + } + cb(null, { Listeners: options.listeners }); + }); +} diff --git a/packages/aws-cdk/test/context-providers/security-groups.test.ts b/packages/aws-cdk/test/context-providers/security-groups.test.ts new file mode 100644 index 0000000000000..7f24e684819b6 --- /dev/null +++ b/packages/aws-cdk/test/context-providers/security-groups.test.ts @@ -0,0 +1,178 @@ +import * as aws from 'aws-sdk'; +import * as AWS from 'aws-sdk-mock'; +import { hasAllTrafficEgress, SecurityGroupContextProviderPlugin } from '../../lib/context-providers/security-groups'; +import { MockSdkProvider } from '../util/mock-sdk'; + +AWS.setSDK(require.resolve('aws-sdk')); + +const mockSDK = new MockSdkProvider(); + +type AwsCallback = (err: Error | null, val: T) => void; + +afterEach(done => { + AWS.restore(); + done(); +}); + +describe('security group context provider plugin', () => { + test('errors when no matches are found', async () => { + // GIVEN + const provider = new SecurityGroupContextProviderPlugin(mockSDK); + + AWS.mock('EC2', 'describeSecurityGroups', (_params: aws.EC2.DescribeSecurityGroupsRequest, cb: AwsCallback) => { + cb(null, { SecurityGroups: [] }); + }); + + // WHEN + await expect( + provider.getValue({ + account: '1234', + region: 'us-east-1', + securityGroupId: 'sg-1234', + }), + ).rejects.toThrow(/No security groups found/i); + }); + + test('looks up by security group id', async () => { + // GIVEN + const provider = new SecurityGroupContextProviderPlugin(mockSDK); + + AWS.mock('EC2', 'describeSecurityGroups', (_params: aws.EC2.DescribeSecurityGroupsRequest, cb: AwsCallback) => { + expect(_params).toEqual({ GroupIds: ['sg-1234'] }); + cb(null, { + SecurityGroups: [ + { + GroupId: 'sg-1234', + IpPermissionsEgress: [ + { + IpProtocol: '-1', + IpRanges: [ + { CidrIp: '0.0.0.0/0' }, + ], + }, + { + IpProtocol: '-1', + Ipv6Ranges: [ + { CidrIpv6: '::/0' }, + ], + }, + ], + }, + ], + }); + }); + + // WHEN + const res = await provider.getValue({ + account: '1234', + region: 'us-east-1', + securityGroupId: 'sg-1234', + }); + + // THEN + expect(res.securityGroupId).toEqual('sg-1234'); + expect(res.allowAllOutbound).toEqual(true); + }); + + test('detects non all-outbound egress', async () => { + // GIVEN + const provider = new SecurityGroupContextProviderPlugin(mockSDK); + + AWS.mock('EC2', 'describeSecurityGroups', (_params: aws.EC2.DescribeSecurityGroupsRequest, cb: AwsCallback) => { + expect(_params).toEqual({ GroupIds: ['sg-1234'] }); + cb(null, { + SecurityGroups: [ + { + GroupId: 'sg-1234', + IpPermissionsEgress: [ + { + IpProtocol: '-1', + IpRanges: [ + { CidrIp: '10.0.0.0/16' }, + ], + }, + ], + }, + ], + }); + }); + + // WHEN + const res = await provider.getValue({ + account: '1234', + region: 'us-east-1', + securityGroupId: 'sg-1234', + }); + + // THEN + expect(res.securityGroupId).toEqual('sg-1234'); + expect(res.allowAllOutbound).toEqual(false); + }); + + test('identifies allTrafficEgress from SecurityGroup permissions', () => { + expect( + hasAllTrafficEgress({ + IpPermissionsEgress: [ + { + IpProtocol: '-1', + IpRanges: [ + { CidrIp: '0.0.0.0/0' }, + ], + }, + { + IpProtocol: '-1', + Ipv6Ranges: [ + { CidrIpv6: '::/0' }, + ], + }, + ], + }), + ).toBe(true); + }); + + test('identifies allTrafficEgress from SecurityGroup permissions when combined', () => { + expect( + hasAllTrafficEgress({ + IpPermissionsEgress: [ + { + IpProtocol: '-1', + IpRanges: [ + { CidrIp: '0.0.0.0/0' }, + ], + Ipv6Ranges: [ + { CidrIpv6: '::/0' }, + ], + }, + ], + }), + ).toBe(true); + }); + + test('identifies lacking allTrafficEgress from SecurityGroup permissions', () => { + expect( + hasAllTrafficEgress({ + IpPermissionsEgress: [ + { + IpProtocol: '-1', + IpRanges: [ + { CidrIp: '10.0.0.0/16' }, + ], + }, + ], + }), + ).toBe(false); + + expect( + hasAllTrafficEgress({ + IpPermissions: [ + { + IpProtocol: 'TCP', + IpRanges: [ + { CidrIp: '0.0.0.0/0' }, + ], + }, + ], + }), + ).toBe(false); + }); +}); diff --git a/packages/aws-cdk/test/util/mock-sdk.ts b/packages/aws-cdk/test/util/mock-sdk.ts index 2ce2bbd8cf346..a060cef470a86 100644 --- a/packages/aws-cdk/test/util/mock-sdk.ts +++ b/packages/aws-cdk/test/util/mock-sdk.ts @@ -77,6 +77,13 @@ export class MockSdkProvider extends SdkProvider { public stubSTS(stubs: SyncHandlerSubsetOf) { (this.sdk as any).sts = jest.fn().mockReturnValue(partialAwsService(stubs)); } + + /** + * Replace the ELBv2 client with the given object + */ + public stubELBv2(stubs: SyncHandlerSubsetOf) { + (this.sdk as any).elbv2 = jest.fn().mockReturnValue(partialAwsService(stubs)); + } } export class MockSdk implements ISDK { @@ -87,6 +94,7 @@ export class MockSdk implements ISDK { public readonly s3 = jest.fn(); public readonly route53 = jest.fn(); public readonly ecr = jest.fn(); + public readonly elbv2 = jest.fn(); public currentAccount(): Promise { return Promise.resolve({ accountId: '123456789012', partition: 'aws' }); From ab9bcf26ecb8c171cf4ba3bdc795cb45c7096fd8 Mon Sep 17 00:00:00 2001 From: Tim Dikland <31453088+tdikland@users.noreply.github.com> Date: Mon, 9 Nov 2020 13:58:21 +0100 Subject: [PATCH 083/314] feat(pipelines): ShellScriptAction can configure environment (#11229) The build environment for the ShellScriptAction is hardcoded and set to LINUX_4_0. This fix allows the build environment to be specified in the ShellScriptAction fixes #10919 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/pipelines/README.md | 3 +- .../lib/validation/shell-script-action.ts | 9 ++- .../pipelines/test/validation.test.ts | 59 +++++++++++++++++++ 3 files changed, 69 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/pipelines/README.md b/packages/@aws-cdk/pipelines/README.md index b575fcd00732d..238fa51dbc710 100644 --- a/packages/@aws-cdk/pipelines/README.md +++ b/packages/@aws-cdk/pipelines/README.md @@ -362,7 +362,8 @@ stage.addActions(new ShellScriptAction({ vpc, // Optionally specify SecurityGroups securityGroups, - // ... more configuration ... + // Optionally specify a BuildEnvironment + environment, })); ``` diff --git a/packages/@aws-cdk/pipelines/lib/validation/shell-script-action.ts b/packages/@aws-cdk/pipelines/lib/validation/shell-script-action.ts index 4fb610688e9a4..1b439fe309c7e 100644 --- a/packages/@aws-cdk/pipelines/lib/validation/shell-script-action.ts +++ b/packages/@aws-cdk/pipelines/lib/validation/shell-script-action.ts @@ -54,6 +54,13 @@ export interface ShellScriptActionProps { */ readonly additionalArtifacts?: codepipeline.Artifact[]; + /** + * The CodeBuild environment where scripts are executed. + * + * @default LinuxBuildImage.STANDARD_4_0 + */ + readonly environment?: codebuild.BuildEnvironment + /** * RunOrder for this action * @@ -177,7 +184,7 @@ export class ShellScriptAction implements codepipeline.IAction, iam.IGrantable { } this._project = new codebuild.PipelineProject(scope, 'Project', { - environment: { buildImage: codebuild.LinuxBuildImage.STANDARD_4_0 }, + environment: this.props.environment || { buildImage: codebuild.LinuxBuildImage.STANDARD_4_0 }, vpc: this.props.vpc, securityGroups: this.props.securityGroups, subnetSelection: this.props.subnetSelection, diff --git a/packages/@aws-cdk/pipelines/test/validation.test.ts b/packages/@aws-cdk/pipelines/test/validation.test.ts index 9986aad4d2758..4f1cffbef61ec 100644 --- a/packages/@aws-cdk/pipelines/test/validation.test.ts +++ b/packages/@aws-cdk/pipelines/test/validation.test.ts @@ -1,5 +1,6 @@ import { anything, arrayWith, deepObjectLike, encodedJson } from '@aws-cdk/assert'; import '@aws-cdk/assert/jest'; +import * as codebuild from '@aws-cdk/aws-codebuild'; import * as codepipeline from '@aws-cdk/aws-codepipeline'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as iam from '@aws-cdk/aws-iam'; @@ -330,6 +331,64 @@ test('run ShellScriptAction with Security Group', () => { }); }); +test('run ShellScriptAction with specified codebuild image', () => { + // WHEN + pipeline.addStage('Test').addActions(new cdkp.ShellScriptAction({ + actionName: 'imageAction', + additionalArtifacts: [integTestArtifact], + commands: ['true'], + environment: { buildImage: codebuild.LinuxBuildImage.STANDARD_2_0 }, + })); + + // THEN + expect(pipelineStack).toHaveResourceLike('AWS::CodePipeline::Pipeline', { + Stages: arrayWith({ + Name: 'Test', + Actions: [ + deepObjectLike({ + Name: 'imageAction', + }), + ], + }), + }); + expect(pipelineStack).toHaveResourceLike('AWS::CodeBuild::Project', { + Environment: { + Image: 'aws/codebuild/standard:2.0', + }, + }); +}); + +test('run ShellScriptAction with specified BuildEnvironment', () => { + // WHEN + pipeline.addStage('Test').addActions(new cdkp.ShellScriptAction({ + actionName: 'imageAction', + additionalArtifacts: [integTestArtifact], + commands: ['true'], + environment: { + buildImage: codebuild.LinuxBuildImage.STANDARD_2_0, + computeType: codebuild.ComputeType.LARGE, + environmentVariables: { FOO: { value: 'BAR', type: codebuild.BuildEnvironmentVariableType.PLAINTEXT } }, + privileged: true, + }, + })); + + // THEN + expect(pipelineStack).toHaveResourceLike('AWS::CodeBuild::Project', { + Environment: { + Image: 'aws/codebuild/standard:2.0', + PrivilegedMode: true, + ComputeType: 'BUILD_GENERAL1_LARGE', + EnvironmentVariables: [ + { + Type: 'PLAINTEXT', + Value: 'BAR', + Name: 'FOO', + }, + ], + }, + }); +}); + class AppWithStackOutput extends Stage { public readonly output: CfnOutput; From 6efa5e10e01a5f46b914601a807b932b4c745dae Mon Sep 17 00:00:00 2001 From: Thorsten Hoeger Date: Mon, 9 Nov 2020 15:02:09 +0100 Subject: [PATCH 084/314] feat(cli): process credentials (#11114) This adds support for the credentials_process feature. Using the aws-sso-credential-process utility you can also use AWS SSO with this feature This should fix #3008 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts | 6 +++++- packages/aws-cdk/test/api/sdk-provider.test.ts | 9 +++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts b/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts index 12e2cfd375268..d92321542cdd0 100644 --- a/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts +++ b/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts @@ -40,7 +40,10 @@ export class AwsCliCompatible { if (options.profile) { await forceSdkToReadConfigIfPresent(); const theProfile = options.profile; - return new AWS.CredentialProviderChain([() => profileCredentials(theProfile)]); + return new AWS.CredentialProviderChain([ + () => profileCredentials(theProfile), + () => new AWS.ProcessCredentials({ profile: theProfile }), + ]); } const implicitProfile = process.env.AWS_PROFILE || process.env.AWS_DEFAULT_PROFILE || 'default'; @@ -55,6 +58,7 @@ export class AwsCliCompatible { // environment variable. await forceSdkToReadConfigIfPresent(); sources.push(() => profileCredentials(implicitProfile)); + sources.push(() => new AWS.ProcessCredentials({ profile: implicitProfile })); } if (options.containerCreds ?? hasEcsCredentials()) { diff --git a/packages/aws-cdk/test/api/sdk-provider.test.ts b/packages/aws-cdk/test/api/sdk-provider.test.ts index 44b618954c94e..ad604f895e3a1 100644 --- a/packages/aws-cdk/test/api/sdk-provider.test.ts +++ b/packages/aws-cdk/test/api/sdk-provider.test.ts @@ -3,6 +3,7 @@ import * as cxapi from '@aws-cdk/cx-api'; import * as AWS from 'aws-sdk'; import * as SDKMock from 'aws-sdk-mock'; import type { ConfigurationOptions } from 'aws-sdk/lib/config-base'; +import * as promptly from 'promptly'; import * as uuid from 'uuid'; import { PluginHost } from '../../lib'; import { ISDK, Mode, SdkProvider } from '../../lib/api/aws-auth'; @@ -195,12 +196,16 @@ describe('with default config files', () => { // WHEN const provider = await SdkProvider.withAwsCliCompatibleDefaults({ ...defaultCredOptions, profile: 'mfa-role' }); + const promptlyMockCalls = (promptly.prompt as jest.Mock).mock.calls.length; + // THEN try { await provider.withAssumedRole('arn:aws:iam::account:role/role', undefined, undefined); + fail('Should error as no credentials could be loaded'); } catch (e) { - // Mock response was set to fail with message test to make sure we don't call STS - expect(e.message).toEqual('Error fetching MFA token: test'); + // Mock response was set to fail to make sure we don't call STS + // Make sure the MFA mock was called during this test + expect((promptly.prompt as jest.Mock).mock.calls.length).toBe(promptlyMockCalls + 1); } }); From 07c3ac8630762d8979b9bb55c62829eee88500de Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Mon, 9 Nov 2020 15:18:29 +0100 Subject: [PATCH 085/314] chore(lambda-nodejs): drop coverage requirement (#11370) The `lambda-nodejs` package sometimes exhibits a coverage drop on the build server, failing the build with the following error: ``` @aws-cdk/aws-lambda-nodejs: Jest: "global" coverage threshold for branches (60%) not met: 53.75% ``` Repeating the build again typically fixes the error. I could not reproduce the issue locally, "on my machine" the build just works with sufficient coverage. The current behavior is a drain on PR builds, so I'm lowering the coverage requirement so builds don't fail on unrelated changes. --- packages/@aws-cdk/aws-lambda-nodejs/jest.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-lambda-nodejs/jest.config.js b/packages/@aws-cdk/aws-lambda-nodejs/jest.config.js index fc310b5014407..11cf7330b303d 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/jest.config.js +++ b/packages/@aws-cdk/aws-lambda-nodejs/jest.config.js @@ -4,7 +4,7 @@ module.exports = { coverageThreshold: { global: { ...baseConfig.coverageThreshold.global, - branches: 60, + branches: 50, }, }, }; From 37a149b03751810d9ed984e415bbfb216881e74b Mon Sep 17 00:00:00 2001 From: "Eric Z. Beard" Date: Mon, 9 Nov 2020 06:51:17 -0800 Subject: [PATCH 086/314] fix(cli): Python `id` parameter in init template conflicts with built-in (#10874) In Python, `id()` is a builtin function that can cause linter warnings and some confusion while developing stacks in Python. This change simply renames `id` to `stack_id` in the init template. --- .../%name.PythonModule%/%name.PythonModule%_stack.template.py | 4 ++-- .../%name.PythonModule%/%name.PythonModule%_stack.template.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/aws-cdk/lib/init-templates/app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py b/packages/aws-cdk/lib/init-templates/app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py index adf164cd876c7..9d86ad16906e6 100644 --- a/packages/aws-cdk/lib/init-templates/app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py +++ b/packages/aws-cdk/lib/init-templates/app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py @@ -3,7 +3,7 @@ class %name.PascalCased%Stack(core.Stack): - def __init__(self, scope: core.Construct, id: str, **kwargs) -> None: - super().__init__(scope, id, **kwargs) + def __init__(self, scope: core.Construct, construct_id: str, **kwargs) -> None: + super().__init__(scope, construct_id, **kwargs) # The code that defines your stack goes here diff --git a/packages/aws-cdk/lib/init-templates/sample-app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py b/packages/aws-cdk/lib/init-templates/sample-app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py index 910a4b838c933..ace9c193df291 100644 --- a/packages/aws-cdk/lib/init-templates/sample-app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py +++ b/packages/aws-cdk/lib/init-templates/sample-app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py @@ -9,8 +9,8 @@ class %name.PascalCased%Stack(core.Stack): - def __init__(self, scope: core.Construct, id: str, **kwargs) -> None: - super().__init__(scope, id, **kwargs) + def __init__(self, scope: core.Construct, construct_id: str, **kwargs) -> None: + super().__init__(scope, construct_id, **kwargs) queue = sqs.Queue( self, "%name.PascalCased%Queue", From 4887ba6004b20c86c0025d16e235b8333d6efa6b Mon Sep 17 00:00:00 2001 From: eswets Date: Mon, 9 Nov 2020 16:19:40 +0100 Subject: [PATCH 087/314] fix(cli): deployments are skipped if stack is in a _failed state (#10847) fixes #10784 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/aws-cdk/lib/api/deploy-stack.ts | 6 ++++++ .../aws-cdk/test/api/deploy-stack.test.ts | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/packages/aws-cdk/lib/api/deploy-stack.ts b/packages/aws-cdk/lib/api/deploy-stack.ts index 64ccd3dd77352..b13582ce31623 100644 --- a/packages/aws-cdk/lib/api/deploy-stack.ts +++ b/packages/aws-cdk/lib/api/deploy-stack.ts @@ -440,6 +440,12 @@ async function canSkipDeploy( return false; } + // Existing stack is in a failed state + if (cloudFormationStack.stackStatus.isFailure) { + debug(`${deployName}: stack is in a failure state`); + return false; + } + // We can skip deploy return true; } diff --git a/packages/aws-cdk/test/api/deploy-stack.test.ts b/packages/aws-cdk/test/api/deploy-stack.test.ts index 6e45a20acc770..51c54ec57b886 100644 --- a/packages/aws-cdk/test/api/deploy-stack.test.ts +++ b/packages/aws-cdk/test/api/deploy-stack.test.ts @@ -423,6 +423,25 @@ test('deploy not skipped if template did not change but one tag removed', async expect(cfnMocks.getTemplate).toHaveBeenCalledWith({ StackName: 'withouterrors', TemplateStage: 'Original' }); }); +test('deploy is not skipped if stack is in a _FAILED state', async () => { + // GIVEN + givenStackExists({ + StackStatus: 'DELETE_FAILED', + }); + + // WHEN + await deployStack({ + stack: FAKE_STACK, + sdk, + sdkProvider, + resolvedEnvironment: mockResolvedEnvironment(), + usePreviousParameters: true, + }).catch(() => {}); + + // THEN + expect(cfnMocks.createChangeSet).toHaveBeenCalled(); +}); + test('existing stack in UPDATE_ROLLBACK_COMPLETE state can be updated', async () => { // GIVEN givenStackExists( From 5d907b62abd4428c27677965353fb04d92267e2c Mon Sep 17 00:00:00 2001 From: wtho Date: Mon, 9 Nov 2020 16:47:56 +0100 Subject: [PATCH 088/314] feat(cognito): user pools - non-ascii email domains (#11099) If an email address for cognito email settings contains a non-ascii character, the cognito cdk package applies punycode encoding, which cloudformation will pick up properly. This pull request adds the [`punycode`](https://github.com/bestiejs/punycode.js) package to the dependencies, as previously discussed in #8473. The package occupies 42KB in `node_modules` after installation. I am not sure if I configured the package correctly to be included in the cdk build. The project itself added `punycode` to `aws-cdk-lib` and `monocdk`, I had to re-run `yarn install` in these packages. Unit- and integration tests are added, but notice that I could not manage a manual e2e test, I think I need to own a domain with non-ascii letters to do so, which I currently do not. A similar approach as in this PR will also be interesting for other cdk packages which deal with email addresses and domains, like hosted zones. According to the [Cfn Domain Name Format Docs](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DomainNameFormat.html), characters with code point below 33, or in `[127, 255]` should be escaped with an octal code, which is not applied in this pull request. Fixes #8473 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- package.json | 6 ++++ packages/@aws-cdk/aws-cognito/NOTICE | 28 +++++++++++++++++++ packages/@aws-cdk/aws-cognito/README.md | 3 ++ .../@aws-cdk/aws-cognito/lib/user-pool.ts | 10 +++++-- packages/@aws-cdk/aws-cognito/package.json | 8 +++++- .../aws-cognito/test/user-pool.test.ts | 21 ++++++++++++++ packages/aws-cdk-lib/package.json | 2 ++ packages/monocdk/NOTICE | 26 ++++++++++++++++- packages/monocdk/package.json | 2 ++ tools/cdk-build-tools/config/eslintrc.js | 13 +++++++++ yarn.lock | 5 ++++ 11 files changed, 119 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 5273c3c13e477..1caf075cefc9c 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,8 @@ "**/jszip/**", "@aws-cdk/aws-codepipeline-actions/case", "@aws-cdk/aws-codepipeline-actions/case/**", + "@aws-cdk/aws-cognito/punycode", + "@aws-cdk/aws-cognito/punycode/**", "@aws-cdk/aws-ecr-assets/minimatch", "@aws-cdk/aws-ecr-assets/minimatch/**", "@aws-cdk/aws-eks/yaml", @@ -79,6 +81,8 @@ "aws-cdk-lib/jsonschema/**", "aws-cdk-lib/minimatch", "aws-cdk-lib/minimatch/**", + "aws-cdk-lib/punycode", + "aws-cdk-lib/punycode/**", "aws-cdk-lib/semver", "aws-cdk-lib/semver/**", "aws-cdk-lib/yaml", @@ -91,6 +95,8 @@ "monocdk/jsonschema/**", "monocdk/minimatch", "monocdk/minimatch/**", + "monocdk/punycode", + "monocdk/punycode/**", "monocdk/semver", "monocdk/semver/**", "monocdk/yaml", diff --git a/packages/@aws-cdk/aws-cognito/NOTICE b/packages/@aws-cdk/aws-cognito/NOTICE index bfccac9a7f69c..1ebef94c4d19c 100644 --- a/packages/@aws-cdk/aws-cognito/NOTICE +++ b/packages/@aws-cdk/aws-cognito/NOTICE @@ -1,2 +1,30 @@ AWS Cloud Development Kit (AWS CDK) Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +------------------------------------------------------------------------------- + +The AWS CDK includes the following third-party software/licensing: + +** punycode - https://www.npmjs.com/package/punycode +Copyright Mathias Bynens + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/README.md b/packages/@aws-cdk/aws-cognito/README.md index 7160d9cf60efc..749ad38300d40 100644 --- a/packages/@aws-cdk/aws-cognito/README.md +++ b/packages/@aws-cdk/aws-cognito/README.md @@ -319,6 +319,9 @@ Amazon SES, however, support for Amazon SES is not available in the CDK yet. If give [this issue](https://github.com/aws/aws-cdk/issues/6768) a +1. Until then, you can use the [cfn layer](https://docs.aws.amazon.com/cdk/latest/guide/cfn_layer.html) to configure this. +If an email address contains non-ASCII characters, it will be encoded using the [punycode +encoding](https://en.wikipedia.org/wiki/Punycode) when generating the template for Cloudformation. + ### Lambda Triggers User pools can be configured such that AWS Lambda functions can be triggered when certain user operations or actions diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool.ts index 91d62af406489..8091c3ae4bc1d 100644 --- a/packages/@aws-cdk/aws-cognito/lib/user-pool.ts +++ b/packages/@aws-cdk/aws-cognito/lib/user-pool.ts @@ -2,6 +2,7 @@ import { IRole, PolicyDocument, PolicyStatement, Role, ServicePrincipal } from ' import * as lambda from '@aws-cdk/aws-lambda'; import { Duration, IResource, Lazy, Names, Resource, Stack, Token } from '@aws-cdk/core'; import { Construct } from 'constructs'; +import { toASCII as punycodeEncode } from 'punycode/'; import { CfnUserPool } from './cognito.generated'; import { StandardAttributeNames } from './private/attr-names'; import { ICustomAttribute, StandardAttribute, StandardAttributes } from './user-pool-attr'; @@ -733,8 +734,8 @@ export class UserPool extends UserPoolBase { enabledMfas: this.mfaConfiguration(props), policies: passwordPolicy !== undefined ? { passwordPolicy } : undefined, emailConfiguration: undefinedIfNoKeys({ - from: props.emailSettings?.from, - replyToEmailAddress: props.emailSettings?.replyTo, + from: encodePuny(props.emailSettings?.from), + replyToEmailAddress: encodePuny(props.emailSettings?.replyTo), }), usernameConfiguration: undefinedIfNoKeys({ caseSensitive: props.signInCaseSensitive, @@ -1019,6 +1020,9 @@ export class UserPool extends UserPoolBase { } function undefinedIfNoKeys(struct: object): object | undefined { - const allUndefined = Object.values(struct).reduce((acc, v) => acc && (v === undefined), true); + const allUndefined = Object.values(struct).every(val => val === undefined); return allUndefined ? undefined : struct; } +function encodePuny(input: string | undefined): string | undefined { + return input !== undefined ? punycodeEncode(input) : input; +} diff --git a/packages/@aws-cdk/aws-cognito/package.json b/packages/@aws-cdk/aws-cognito/package.json index 82884c63ec340..137a8335d8300 100644 --- a/packages/@aws-cdk/aws-cognito/package.json +++ b/packages/@aws-cdk/aws-cognito/package.json @@ -73,6 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", + "@types/punycode": "^2.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", @@ -85,7 +86,9 @@ "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/custom-resources": "0.0.0", - "constructs": "^3.2.0" + "constructs": "^3.2.0", + "punycode": "^2.1.1" + }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -96,6 +99,9 @@ "@aws-cdk/custom-resources": "0.0.0", "constructs": "^3.2.0" }, + "bundledDependencies": [ + "punycode" + ], "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" }, diff --git a/packages/@aws-cdk/aws-cognito/test/user-pool.test.ts b/packages/@aws-cdk/aws-cognito/test/user-pool.test.ts index c4cb35832925c..45d27521a92ff 100644 --- a/packages/@aws-cdk/aws-cognito/test/user-pool.test.ts +++ b/packages/@aws-cdk/aws-cognito/test/user-pool.test.ts @@ -1271,6 +1271,27 @@ describe('User Pool', () => { })).toThrow(/enableSmsRole cannot be disabled/); }); }); + + test('email transmission with cyrillic characters are encoded', () => { + // GIVEN + const stack = new Stack(); + + // WHEN + new UserPool(stack, 'Pool', { + emailSettings: { + from: 'от@домен.рф', + replyTo: 'ответить@домен.рф', + }, + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::Cognito::UserPool', { + EmailConfiguration: { + From: 'от@xn--d1acufc.xn--p1ai', + ReplyToEmailAddress: 'ответить@xn--d1acufc.xn--p1ai', + }, + }); + }); }); diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index 73c843dc8c7cb..2f8b786e7e01b 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -82,6 +82,7 @@ "fs-extra", "jsonschema", "minimatch", + "punycode", "semver", "yaml" ], @@ -90,6 +91,7 @@ "fs-extra": "^9.0.1", "jsonschema": "^1.4.0", "minimatch": "^3.0.4", + "punycode": "^2.1.1", "semver": "^7.3.2", "yaml": "1.10.0" }, diff --git a/packages/monocdk/NOTICE b/packages/monocdk/NOTICE index 392ba117cb70b..12897b42a4062 100644 --- a/packages/monocdk/NOTICE +++ b/packages/monocdk/NOTICE @@ -120,4 +120,28 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----------------- \ No newline at end of file +---------------- + +** punycode - https://www.npmjs.com/package/punycode +Copyright Mathias Bynens + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- \ No newline at end of file diff --git a/packages/monocdk/package.json b/packages/monocdk/package.json index e34bf2fb7c82f..8783378fbef4f 100644 --- a/packages/monocdk/package.json +++ b/packages/monocdk/package.json @@ -81,6 +81,7 @@ "fs-extra", "jsonschema", "minimatch", + "punycode", "semver", "yaml" ], @@ -89,6 +90,7 @@ "fs-extra": "^9.0.1", "jsonschema": "^1.4.0", "minimatch": "^3.0.4", + "punycode": "^2.1.1", "semver": "^7.3.2", "yaml": "1.10.0" }, diff --git a/tools/cdk-build-tools/config/eslintrc.js b/tools/cdk-build-tools/config/eslintrc.js index 51be4eac2e4c2..26a357f4e6f25 100644 --- a/tools/cdk-build-tools/config/eslintrc.js +++ b/tools/cdk-build-tools/config/eslintrc.js @@ -84,6 +84,19 @@ module.exports = { alphabetize: { order: 'asc', caseInsensitive: true }, }], + // disallow import of deprecated punycode package + 'no-restricted-imports': [ + 'error', { + paths: [ + { + name: 'punycode', + message: `Package 'punycode' has to be imported with trailing slash, see warning in https://github.com/bestiejs/punycode.js#installation`, + }, + ], + patterns: ['!punycode/'], + }, + ], + // Cannot import from the same module twice 'no-duplicate-imports': ['error'], diff --git a/yarn.lock b/yarn.lock index bc0ef657e520a..0f8e81dbe6bec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3191,6 +3191,11 @@ resolved "https://registry.yarnpkg.com/@types/proxyquire/-/proxyquire-1.3.28.tgz#05a647bb0d8fe48fc8edcc193e43cc79310faa7d" integrity sha512-SQaNzWQ2YZSr7FqAyPPiA3FYpux2Lqh3HWMZQk47x3xbMCqgC/w0dY3dw9rGqlweDDkrySQBcaScXWeR+Yb11Q== +"@types/punycode@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@types/punycode/-/punycode-2.1.0.tgz#89e4f3d09b3f92e87a80505af19be7e0c31d4e83" + integrity sha512-PG5aLpW6PJOeV2fHRslP4IOMWn+G+Uq8CfnyJ+PDS8ndCbU+soO+fB3NKCKo0p/Jh2Y4aPaiQZsrOXFdzpcA6g== + "@types/q@^1.5.1": version "1.5.4" resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.4.tgz#15925414e0ad2cd765bfef58842f7e26a7accb24" From 3009490c4e1e1a10a9e4ea52cefe03aac296d649 Mon Sep 17 00:00:00 2001 From: Khufu-I Date: Mon, 9 Nov 2020 08:18:15 -0800 Subject: [PATCH 089/314] fix(cloudwatch): composite alarm ARN uses wrong separator (#11186) CompositeAlarm ARN separator should be `:` instead of `/` Fixes https://github.com/aws/aws-cdk/issues/11184 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-cloudwatch/lib/composite-alarm.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/@aws-cdk/aws-cloudwatch/lib/composite-alarm.ts b/packages/@aws-cdk/aws-cloudwatch/lib/composite-alarm.ts index e8f8b95db3850..8d625ee16f7f6 100644 --- a/packages/@aws-cdk/aws-cloudwatch/lib/composite-alarm.ts +++ b/packages/@aws-cdk/aws-cloudwatch/lib/composite-alarm.ts @@ -115,6 +115,7 @@ export class CompositeAlarm extends AlarmBase { service: 'cloudwatch', resource: 'alarm', resourceName: this.physicalName, + sep: ':', }); } From 474f6c673e9f419bbc80c1a7797348e98767e8c9 Mon Sep 17 00:00:00 2001 From: Kyle Roach Date: Mon, 9 Nov 2020 12:47:54 -0400 Subject: [PATCH 090/314] feat(cognito): user pool resource server (#11118) Also allow adding resource server via `userPool.addResourceServer` ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-cognito/README.md | 41 +++++++ packages/@aws-cdk/aws-cognito/lib/index.ts | 3 +- .../aws-cognito/lib/user-pool-client.ts | 8 ++ .../lib/user-pool-resource-server.ts | 116 ++++++++++++++++++ .../@aws-cdk/aws-cognito/lib/user-pool.ts | 14 +++ ...eg.user-pool-resource-server.expected.json | 92 ++++++++++++++ .../test/integ.user-pool-resource-server.ts | 44 +++++++ .../aws-cognito/test/user-pool-client.test.ts | 37 +++++- .../test/user-pool-resource-server.test.ts | 71 +++++++++++ .../aws-cognito/test/user-pool.test.ts | 30 +++++ 10 files changed, 454 insertions(+), 2 deletions(-) create mode 100644 packages/@aws-cdk/aws-cognito/lib/user-pool-resource-server.ts create mode 100644 packages/@aws-cdk/aws-cognito/test/integ.user-pool-resource-server.expected.json create mode 100644 packages/@aws-cdk/aws-cognito/test/integ.user-pool-resource-server.ts create mode 100644 packages/@aws-cdk/aws-cognito/test/user-pool-resource-server.test.ts diff --git a/packages/@aws-cdk/aws-cognito/README.md b/packages/@aws-cdk/aws-cognito/README.md index 749ad38300d40..881db02148556 100644 --- a/packages/@aws-cdk/aws-cognito/README.md +++ b/packages/@aws-cdk/aws-cognito/README.md @@ -42,6 +42,7 @@ This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aw - [Import](#importing-user-pools) - [Identity Providers](#identity-providers) - [App Clients](#app-clients) + - [Resource Servers](#resource-servers) - [Domains](#domains) ## User Pools @@ -549,6 +550,46 @@ pool.addClient('app-client', { }); ``` +### Resource Servers + +A resource server is a server for access-protected resources. It handles authenticated requests from an app that has an +access token. See [Defining Resource +Servers](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-define-resource-servers.html) +for more information. + +An application may choose to model custom permissions via OAuth. Resource Servers provide this capability via custom scopes +that are attached to an app client. The following example sets up a resource server for the 'users' resource for two different +app clients and configures the clients to use these scopes. + +```ts +const pool = new cognito.UserPool(this, 'Pool'); + +const readOnlyScope = new ResourceServerScope({ scopeName: 'read', scopeDescription: 'Read-only access' }); +const fullAccessScope = new ResourceServerScope({ scopeName: '*', scopeDescription: 'Full access' }); + +const userServer = pool.addResourceServer('ResourceServer', { + identifier: 'users', + scopes: [ readOnlyScope, fullAccessScope ], +}); + +const readOnlyClient = pool.addClient('read-only-client', { + // ... + oAuth: { + // ... + scopes: [ OAuthScope.resourceServer(userServer, readOnlyScope) ], + }, +}); + +const fullAccessClient = pool.addClient('full-access-client', { + // ... + oAuth: { + // ... + scopes: [ OAuthScope.resourceServer(userServer, fullAccessScope) ], + }, +}); +``` + + ### Domains After setting up an [app client](#app-clients), the address for the user pool's sign-up and sign-in webpages can be diff --git a/packages/@aws-cdk/aws-cognito/lib/index.ts b/packages/@aws-cdk/aws-cognito/lib/index.ts index 2da1e6121b69b..cab56671c2b9e 100644 --- a/packages/@aws-cdk/aws-cognito/lib/index.ts +++ b/packages/@aws-cdk/aws-cognito/lib/index.ts @@ -5,4 +5,5 @@ export * from './user-pool-attr'; export * from './user-pool-client'; export * from './user-pool-domain'; export * from './user-pool-idp'; -export * from './user-pool-idps'; \ No newline at end of file +export * from './user-pool-idps'; +export * from './user-pool-resource-server'; diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool-client.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool-client.ts index 630000df485ba..34e6f13f75cae 100644 --- a/packages/@aws-cdk/aws-cognito/lib/user-pool-client.ts +++ b/packages/@aws-cdk/aws-cognito/lib/user-pool-client.ts @@ -2,6 +2,7 @@ import { IResource, Resource } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnUserPoolClient } from './cognito.generated'; import { IUserPool } from './user-pool'; +import { IUserPoolResourceServer, ResourceServerScope } from './user-pool-resource-server'; /** * Types of authentication flow @@ -133,6 +134,13 @@ export class OAuthScope { return new OAuthScope(name); } + /** + * Adds a custom scope that's tied to a resource server in your stack + */ + public static resourceServer(server: IUserPoolResourceServer, scope: ResourceServerScope) { + return new OAuthScope(`${server.userPoolResourceServerId}/${scope.scopeName}`); + } + /** * The name of this scope as recognized by CloudFormation. * @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolclient.html#cfn-cognito-userpoolclient-allowedoauthscopes diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool-resource-server.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool-resource-server.ts new file mode 100644 index 0000000000000..d78d61e956587 --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/lib/user-pool-resource-server.ts @@ -0,0 +1,116 @@ +import { IResource, Resource } from '@aws-cdk/core'; +import { Construct } from 'constructs'; +import { CfnUserPoolResourceServer } from './cognito.generated'; +import { IUserPool } from './user-pool'; + +/** + * Represents a Cognito user pool resource server + */ +export interface IUserPoolResourceServer extends IResource { + /** + * Resource server id + * @attribute + */ + readonly userPoolResourceServerId: string; +} + +/** + * Props to initialize ResourceServerScope + */ +export interface ResourceServerScopeProps { + /** + * The name of the scope + */ + readonly scopeName: string; + + /** + * A description of the scope. + */ + readonly scopeDescription: string; +} + +/** + * A scope for ResourceServer + */ +export class ResourceServerScope { + /** + * The name of the scope + */ + public readonly scopeName: string; + + /** + * A description of the scope. + */ + public readonly scopeDescription: string; + + constructor(props: ResourceServerScopeProps) { + this.scopeName = props.scopeName; + this.scopeDescription = props.scopeDescription; + } +} + + +/** + * Options to create a UserPoolResourceServer + */ +export interface UserPoolResourceServerOptions { + /** + * A unique resource server identifier for the resource server. + */ + readonly identifier: string; + + /** + * A friendly name for the resource server. + * @default - same as `identifier` + */ + readonly userPoolResourceServerName?: string; + + /** + * Oauth scopes + * @default - No scopes will be added + */ + readonly scopes?: ResourceServerScope[]; +} + +/** + * Properties for the UserPoolResourceServer construct + */ +export interface UserPoolResourceServerProps extends UserPoolResourceServerOptions { + /** + * The user pool to add this resource server to + */ + readonly userPool: IUserPool; +} + +/** + * Defines a User Pool OAuth2.0 Resource Server + */ +export class UserPoolResourceServer extends Resource implements IUserPoolResourceServer { + /** + * Import a user pool resource client given its id. + */ + public static fromUserPoolResourceServerId(scope: Construct, id: string, userPoolResourceServerId: string): IUserPoolResourceServer { + class Import extends Resource implements IUserPoolResourceServer { + public readonly userPoolResourceServerId = userPoolResourceServerId; + } + + return new Import(scope, id); + } + + public readonly userPoolResourceServerId: string; + + constructor(scope: Construct, id: string, props: UserPoolResourceServerProps) { + super(scope, id, { + physicalName: props.identifier, + }); + + const resource = new CfnUserPoolResourceServer(this, 'Resource', { + identifier: this.physicalName, + name: props.userPoolResourceServerName ?? this.physicalName, + scopes: props.scopes, + userPoolId: props.userPool.userPoolId, + }); + + this.userPoolResourceServerId = resource.ref; + } +} diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool.ts index 8091c3ae4bc1d..0e652fb2c0b76 100644 --- a/packages/@aws-cdk/aws-cognito/lib/user-pool.ts +++ b/packages/@aws-cdk/aws-cognito/lib/user-pool.ts @@ -9,6 +9,7 @@ import { ICustomAttribute, StandardAttribute, StandardAttributes } from './user- import { UserPoolClient, UserPoolClientOptions } from './user-pool-client'; import { UserPoolDomain, UserPoolDomainOptions } from './user-pool-domain'; import { IUserPoolIdentityProvider } from './user-pool-idp'; +import { UserPoolResourceServer, UserPoolResourceServerOptions } from './user-pool-resource-server'; /** * The different ways in which users of this pool can sign up or sign in. @@ -601,6 +602,12 @@ export interface IUserPool extends IResource { */ addDomain(id: string, options: UserPoolDomainOptions): UserPoolDomain; + /** + * Add a new resource server to this user pool. + * @see https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-resource-servers.html + */ + addResourceServer(id: string, options: UserPoolResourceServerOptions): UserPoolResourceServer; + /** * Register an identity provider with this user pool. */ @@ -626,6 +633,13 @@ abstract class UserPoolBase extends Resource implements IUserPool { }); } + public addResourceServer(id: string, options: UserPoolResourceServerOptions): UserPoolResourceServer { + return new UserPoolResourceServer(this, id, { + userPool: this, + ...options, + }); + } + public registerIdentityProvider(provider: IUserPoolIdentityProvider) { this.identityProviders.push(provider); } diff --git a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-resource-server.expected.json b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-resource-server.expected.json new file mode 100644 index 0000000000000..ffc765b879357 --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-resource-server.expected.json @@ -0,0 +1,92 @@ +{ + "Resources": { + "myuserpool01998219": { + "Type": "AWS::Cognito::UserPool", + "Properties": { + "AccountRecoverySetting": { + "RecoveryMechanisms": [ + { + "Name": "verified_phone_number", + "Priority": 1 + }, + { + "Name": "verified_email", + "Priority": 2 + } + ] + }, + "AdminCreateUserConfig": { + "AllowAdminCreateUserOnly": true + }, + "EmailVerificationMessage": "The verification code to your new account is {####}", + "EmailVerificationSubject": "Verify your new account", + "SmsVerificationMessage": "The verification code to your new account is {####}", + "UserPoolName": "MyUserPool", + "VerificationMessageTemplate": { + "DefaultEmailOption": "CONFIRM_WITH_CODE", + "EmailMessage": "The verification code to your new account is {####}", + "EmailSubject": "Verify your new account", + "SmsMessage": "The verification code to your new account is {####}" + } + } + }, + "myuserpoolmyserver50C4D8E9": { + "Type": "AWS::Cognito::UserPoolResourceServer", + "Properties": { + "Identifier": "users", + "Name": "users", + "UserPoolId": { + "Ref": "myuserpool01998219" + }, + "Scopes": [ + { + "ScopeDescription": "read only", + "ScopeName": "read" + } + ] + } + }, + "myuserpoolclientC5FA41EC": { + "Type": "AWS::Cognito::UserPoolClient", + "Properties": { + "UserPoolId": { + "Ref": "myuserpool01998219" + }, + "AllowedOAuthFlows": [ + "client_credentials" + ], + "AllowedOAuthFlowsUserPoolClient": true, + "AllowedOAuthScopes": [ + { + "Fn::Join": [ + "", + [ + { + "Ref": "myuserpoolmyserver50C4D8E9" + }, + "/read" + ] + ] + } + ], + "ClientName": "users-app", + "GenerateSecret": true, + "SupportedIdentityProviders": [ + "COGNITO" + ] + } + } + }, + "Outputs": { + "poolid": { + "Value": { + "Ref": "myuserpool01998219" + } + }, + "clientid": { + "Value": { + "Ref": "myuserpoolclientC5FA41EC" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-resource-server.ts b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-resource-server.ts new file mode 100644 index 0000000000000..8610d7a3e1296 --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-resource-server.ts @@ -0,0 +1,44 @@ +import { App, CfnOutput, Stack } from '@aws-cdk/core'; +import { OAuthScope, ResourceServerScope, UserPool } from '../lib'; + +const app = new App(); +const stack = new Stack(app, 'integ-user-pool-resource-server'); + +/* + * Stack verification steps: + * Cognito will only allow you to add a custom scope on a user pool client that is defined by a resource server. + * Checking the app client scopes will verify if the resource server is configured correctly. + * The exports userPoolId and userPoolClientId are exported here to test + * + * * `aws cognito-idp describe-user-pool-client --user-pool-id $userPoolId --client-id $userPoolClientId` should return "users/read" in "AllowedOAuthScopes" + */ +const userPool = new UserPool(stack, 'myuserpool', { + userPoolName: 'MyUserPool', +}); + +const readScope = new ResourceServerScope({ scopeName: 'read', scopeDescription: 'read only' }); +const userServer = userPool.addResourceServer('myserver', { + identifier: 'users', + scopes: [readScope], +}); + +const client = userPool.addClient('client', { + userPoolClientName: 'users-app', + generateSecret: true, + oAuth: { + flows: { + clientCredentials: true, + }, + scopes: [ + OAuthScope.resourceServer(userServer, readScope), + ], + }, +}); + +new CfnOutput(stack, 'pool-id', { + value: userPool.userPoolId, +}); + +new CfnOutput(stack, 'client-id', { + value: client.userPoolClientId, +}); diff --git a/packages/@aws-cdk/aws-cognito/test/user-pool-client.test.ts b/packages/@aws-cdk/aws-cognito/test/user-pool-client.test.ts index eeddb55bc1ff1..93c8937dba68b 100644 --- a/packages/@aws-cdk/aws-cognito/test/user-pool-client.test.ts +++ b/packages/@aws-cdk/aws-cognito/test/user-pool-client.test.ts @@ -1,7 +1,7 @@ import { ABSENT } from '@aws-cdk/assert'; import '@aws-cdk/assert/jest'; import { Stack } from '@aws-cdk/core'; -import { OAuthScope, UserPool, UserPoolClient, UserPoolClientIdentityProvider, UserPoolIdentityProvider } from '../lib'; +import { OAuthScope, ResourceServerScope, UserPool, UserPoolClient, UserPoolClientIdentityProvider, UserPoolIdentityProvider } from '../lib'; describe('User Pool Client', () => { test('default setup', () => { @@ -310,6 +310,41 @@ describe('User Pool Client', () => { }); }); + test('OAuth scopes - resource server', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'Pool'); + const scope = new ResourceServerScope({ scopeName: 'scope-name', scopeDescription: 'scope-desc' }); + const resourceServer = pool.addResourceServer('ResourceServer', { + identifier: 'resource-server', + scopes: [scope], + }); + + // WHEN + pool.addClient('Client', { + oAuth: { + flows: { clientCredentials: true }, + scopes: [ + OAuthScope.resourceServer(resourceServer, scope), + ], + }, + }); + + // THEN + expect(stack).toHaveResource('AWS::Cognito::UserPoolClient', { + AllowedOAuthScopes: [ + { + 'Fn::Join': [ + '', [ + stack.resolve(resourceServer.userPoolResourceServerId), + '/scope-name', + ], + ], + }, + ], + }); + }); + test('OAuthScope - openid is included when email or phone is specified', () => { // GIVEN const stack = new Stack(); diff --git a/packages/@aws-cdk/aws-cognito/test/user-pool-resource-server.test.ts b/packages/@aws-cdk/aws-cognito/test/user-pool-resource-server.test.ts new file mode 100644 index 0000000000000..17c2045230ca5 --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/test/user-pool-resource-server.test.ts @@ -0,0 +1,71 @@ +import '@aws-cdk/assert/jest'; +import { Stack } from '@aws-cdk/core'; +import { UserPool, UserPoolResourceServer } from '../lib'; + +describe('User Pool Resource Server', () => { + test('default setup', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'Pool'); + + // WHEN + new UserPoolResourceServer(stack, 'Server', { + userPool: pool, + identifier: 'users', + }); + + //THEN + expect(stack).toHaveResource('AWS::Cognito::UserPoolResourceServer', { + Identifier: 'users', + Name: 'users', + UserPoolId: stack.resolve(pool.userPoolId), + }); + }); + + test('can assign a custom name', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'Pool'); + + // WHEN + new UserPoolResourceServer(stack, 'Server', { + userPoolResourceServerName: 'internal-users', + userPool: pool, + identifier: 'users', + }); + + //THEN + expect(stack).toHaveResource('AWS::Cognito::UserPoolResourceServer', { + Identifier: 'users', + Name: 'internal-users', + }); + }); + + test('can assign scopes', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'Pool'); + + // WHEN + new UserPoolResourceServer(stack, 'Server', { + userPool: pool, + identifier: 'users', + scopes: [ + { + scopeName: 'read', + scopeDescription: 'read only access', + }, + ], + }); + + //THEN + expect(stack).toHaveResource('AWS::Cognito::UserPoolResourceServer', { + Scopes: [ + { + ScopeDescription: 'read only access', + ScopeName: 'read', + }, + ], + }); + }); +}); diff --git a/packages/@aws-cdk/aws-cognito/test/user-pool.test.ts b/packages/@aws-cdk/aws-cognito/test/user-pool.test.ts index 45d27521a92ff..a2199eecce800 100644 --- a/packages/@aws-cdk/aws-cognito/test/user-pool.test.ts +++ b/packages/@aws-cdk/aws-cognito/test/user-pool.test.ts @@ -883,6 +883,36 @@ describe('User Pool', () => { }); }); + test('addResourceServer', () => { + // GIVEN + const stack = new Stack(); + + // WHEN + const userpool = new UserPool(stack, 'Pool'); + userpool.addResourceServer('ResourceServer', { + identifier: 'users', + scopes: [ + { + scopeName: 'read', + scopeDescription: 'Read-only access', + }, + ], + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::Cognito::UserPoolResourceServer', { + Identifier: 'users', + Name: 'users', + UserPoolId: stack.resolve(userpool.userPoolId), + Scopes: [ + { + ScopeDescription: 'Read-only access', + ScopeName: 'read', + }, + ], + }); + }); + test('addDomain', () => { // GIVEN const stack = new Stack(); From 17611d6e0f1085505c90cf4d6d4f22b91c530ce1 Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Mon, 9 Nov 2020 17:16:31 +0000 Subject: [PATCH 091/314] chore(apigatewayv2): move lambda and http proxy integrations to the 'integrations' module (#11339) We now have a `@aws-cdk/aws-apigatewayv2-integrations` module that is intended to hold all integration of HTTP APIs with other services. In line with this, move `LambdaProxyIntegration` and `HttpProxyIntegration` classes to this module. BREAKING CHANGE: `LambdaProxyIntegration` and `HttpProxyIntegration` classes have moved to the `@aws-cdk/aws-apigatewayv2-integration` module. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-apigatewayv2-integrations/README.md | 66 +++- .../lib/http/http-proxy.ts} | 10 +- .../lib/http/index.ts | 2 + .../lib/http}/lambda.ts | 8 +- .../package.json | 4 + .../test/http/http-proxy.test.ts} | 3 +- .../test/http}/integ.http-proxy.expected.json | 0 .../test/http}/integ.http-proxy.ts | 3 +- .../http}/integ.lambda-proxy.expected.json | 0 .../test/http}/integ.lambda-proxy.ts | 3 +- .../test/http}/lambda.test.ts | 3 +- packages/@aws-cdk/aws-apigatewayv2/README.md | 15 +- .../aws-apigatewayv2/lib/http/index.ts | 1 - .../lib/http/integrations/index.ts | 2 - .../@aws-cdk/aws-apigatewayv2/package.json | 2 - .../aws-apigatewayv2/test/http/api.test.ts | 37 +- .../http/integ.custom-domain.expected.json | 335 ------------------ .../test/http/integ.custom-domain.ts | 59 --- 18 files changed, 109 insertions(+), 444 deletions(-) rename packages/@aws-cdk/{aws-apigatewayv2/lib/http/integrations/http.ts => aws-apigatewayv2-integrations/lib/http/http-proxy.ts} (81%) rename packages/@aws-cdk/{aws-apigatewayv2/lib/http/integrations => aws-apigatewayv2-integrations/lib/http}/lambda.ts (89%) rename packages/@aws-cdk/{aws-apigatewayv2/test/http/integrations/http.test.ts => aws-apigatewayv2-integrations/test/http/http-proxy.test.ts} (94%) rename packages/@aws-cdk/{aws-apigatewayv2/test/http/integrations => aws-apigatewayv2-integrations/test/http}/integ.http-proxy.expected.json (100%) rename packages/@aws-cdk/{aws-apigatewayv2/test/http/integrations => aws-apigatewayv2-integrations/test/http}/integ.http-proxy.ts (89%) rename packages/@aws-cdk/{aws-apigatewayv2/test/http/integrations => aws-apigatewayv2-integrations/test/http}/integ.lambda-proxy.expected.json (100%) rename packages/@aws-cdk/{aws-apigatewayv2/test/http/integrations => aws-apigatewayv2-integrations/test/http}/integ.lambda-proxy.ts (87%) rename packages/@aws-cdk/{aws-apigatewayv2/test/http/integrations => aws-apigatewayv2-integrations/test/http}/lambda.test.ts (92%) delete mode 100644 packages/@aws-cdk/aws-apigatewayv2/lib/http/integrations/index.ts delete mode 100644 packages/@aws-cdk/aws-apigatewayv2/test/http/integ.custom-domain.expected.json delete mode 100644 packages/@aws-cdk/aws-apigatewayv2/test/http/integ.custom-domain.ts diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/README.md b/packages/@aws-cdk/aws-apigatewayv2-integrations/README.md index 2cda8eab308ab..5aa7f03dc3c26 100644 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/README.md +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/README.md @@ -11,16 +11,66 @@ ## Table of Contents -- [Introduction](#introduction) -- [Private Integration](#private-integration) +- [HTTP APIs](#http-apis) + - [Lambda Integration](#lambda) + - [HTTP Proxy Integration](#http-proxy) + - [Private Integration](#private-integration) -## Introduction +## HTTP APIs Integrations connect a route to backend resources. HTTP APIs support Lambda proxy, AWS service, and HTTP proxy integrations. HTTP proxy integrations are also known as private integrations. -Currently the following integrations are supported by this construct library. +### Lambda -## Private Integration +Lambda integrations enable integrating an HTTP API route with a Lambda function. When a client invokes the route, the +API Gateway service forwards the request to the Lambda function and returns the function's response to the client. + +The API Gateway service will invoke the lambda function with an event payload of a specific format. The service expects +the function to respond in a specific format. The details on this format is available at [Working with AWS Lambda +proxy integrations](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html). + +The following code configures a route `GET /books` with a Lambda proxy integration. + +```ts +const booksFn = new lambda.Function(stack, 'BooksDefaultFn', { ... }); +const booksIntegration = new LambdaProxyIntegration({ + handler: booksDefaultFn, +}); + +const httpApi = new HttpApi(stack, 'HttpApi'); + +httpApi.addRoutes({ + path: '/books', + methods: [ HttpMethod.GET ], + integration: booksIntegration, +}); +``` + +### HTTP Proxy + +HTTP Proxy integrations enables connecting an HTTP API route to a publicly routable HTTP endpoint. When a client +invokes the route, the API Gateway service forwards the entire request and response between the API Gateway endpoint +and the integrating HTTP endpoint. More information can be found at [Working with HTTP proxy +integrations](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-http.html). + +The following code configures a route `GET /books` with an HTTP proxy integration to an HTTP endpoint +`get-books-proxy.myproxy.internal`. + +```ts +const booksIntegration = new HttpProxyIntegration({ + url: 'https://get-books-proxy.myproxy.internal', +}); + +const httpApi = new HttpApi(stack, 'HttpApi'); + +httpApi.addRoutes({ + path: '/books', + methods: [ HttpMethod.GET ], + integration: booksIntegration, +}); +``` + +### Private Integration Private integrations enable integrating an HTTP API route with private resources in a VPC, such as Application Load Balancers or Amazon ECS container-based applications. Using private integrations, resources in a VPC can be exposed for access by @@ -28,7 +78,7 @@ clients outside of the VPC. The following integrations are supported for private resources in a VPC. -### Application Load Balancer +#### Application Load Balancer The following code is a basic application load balancer private integration of HTTP API: @@ -47,7 +97,7 @@ const httpEndpoint = new HttpApi(stack, 'HttpProxyPrivateApi', { }); ``` -### Network Load Balancer +#### Network Load Balancer The following code is a basic network load balancer private integration of HTTP API: @@ -66,7 +116,7 @@ const httpEndpoint = new HttpApi(stack, 'HttpProxyPrivateApi', { }); ``` -### Cloud Map Service Discovery +#### Cloud Map Service Discovery The following code is a basic discovery service private integration of HTTP API: diff --git a/packages/@aws-cdk/aws-apigatewayv2/lib/http/integrations/http.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/http-proxy.ts similarity index 81% rename from packages/@aws-cdk/aws-apigatewayv2/lib/http/integrations/http.ts rename to packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/http-proxy.ts index d5020d2d908ba..a7ef2d1b4d7b9 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/lib/http/integrations/http.ts +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/http-proxy.ts @@ -1,5 +1,11 @@ -import { HttpIntegrationType, HttpRouteIntegrationBindOptions, HttpRouteIntegrationConfig, IHttpRouteIntegration, PayloadFormatVersion } from '../integration'; -import { HttpMethod } from '../route'; +import { + HttpIntegrationType, + HttpRouteIntegrationBindOptions, + HttpRouteIntegrationConfig, + HttpMethod, + IHttpRouteIntegration, + PayloadFormatVersion, +} from '@aws-cdk/aws-apigatewayv2'; /** * Properties to initialize a new `HttpProxyIntegration`. diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/index.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/index.ts index bd4bb0ee34cac..8e0598975f8cb 100644 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/index.ts +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/index.ts @@ -2,3 +2,5 @@ export * from './base-types'; export * from './alb'; export * from './nlb'; export * from './service-discovery'; +export * from './http-proxy'; +export * from './lambda'; diff --git a/packages/@aws-cdk/aws-apigatewayv2/lib/http/integrations/lambda.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/lambda.ts similarity index 89% rename from packages/@aws-cdk/aws-apigatewayv2/lib/http/integrations/lambda.ts rename to packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/lambda.ts index 9f0d4f89ee6f6..a962b268d7165 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/lib/http/integrations/lambda.ts +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/lambda.ts @@ -1,7 +1,13 @@ +import { + HttpIntegrationType, + HttpRouteIntegrationBindOptions, + HttpRouteIntegrationConfig, + IHttpRouteIntegration, + PayloadFormatVersion, +} from '@aws-cdk/aws-apigatewayv2'; import { ServicePrincipal } from '@aws-cdk/aws-iam'; import { IFunction } from '@aws-cdk/aws-lambda'; import { Names, Stack } from '@aws-cdk/core'; -import { HttpIntegrationType, HttpRouteIntegrationBindOptions, HttpRouteIntegrationConfig, IHttpRouteIntegration, PayloadFormatVersion } from '../integration'; /** * Lambda Proxy integration properties diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json index 3cca63ba579e2..b233b0db9d9a1 100644 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json @@ -81,6 +81,8 @@ "@aws-cdk/aws-apigatewayv2": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", "@aws-cdk/aws-elasticloadbalancingv2": "0.0.0", + "@aws-cdk/aws-iam": "0.0.0", + "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-servicediscovery": "0.0.0", "@aws-cdk/core": "0.0.0", "constructs": "^3.2.0" @@ -89,6 +91,8 @@ "@aws-cdk/aws-apigatewayv2": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", "@aws-cdk/aws-elasticloadbalancingv2": "0.0.0", + "@aws-cdk/aws-iam": "0.0.0", + "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-servicediscovery": "0.0.0", "@aws-cdk/core": "0.0.0", "constructs": "^3.2.0" diff --git a/packages/@aws-cdk/aws-apigatewayv2/test/http/integrations/http.test.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/http-proxy.test.ts similarity index 94% rename from packages/@aws-cdk/aws-apigatewayv2/test/http/integrations/http.test.ts rename to packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/http-proxy.test.ts index c8d30e292b46c..8a0eb5830a7f4 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/test/http/integrations/http.test.ts +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/http-proxy.test.ts @@ -1,6 +1,7 @@ import '@aws-cdk/assert/jest'; +import { HttpApi, HttpIntegration, HttpIntegrationType, HttpMethod, HttpRoute, HttpRouteKey, PayloadFormatVersion } from '@aws-cdk/aws-apigatewayv2'; import { Stack } from '@aws-cdk/core'; -import { HttpApi, HttpIntegration, HttpIntegrationType, HttpMethod, HttpProxyIntegration, HttpRoute, HttpRouteKey, PayloadFormatVersion } from '../../../lib'; +import { HttpProxyIntegration } from '../../lib'; describe('HttpProxyIntegration', () => { test('default', () => { diff --git a/packages/@aws-cdk/aws-apigatewayv2/test/http/integrations/integ.http-proxy.expected.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.http-proxy.expected.json similarity index 100% rename from packages/@aws-cdk/aws-apigatewayv2/test/http/integrations/integ.http-proxy.expected.json rename to packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.http-proxy.expected.json diff --git a/packages/@aws-cdk/aws-apigatewayv2/test/http/integrations/integ.http-proxy.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.http-proxy.ts similarity index 89% rename from packages/@aws-cdk/aws-apigatewayv2/test/http/integrations/integ.http-proxy.ts rename to packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.http-proxy.ts index 15db80661e3f1..9fa5803973376 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/test/http/integrations/integ.http-proxy.ts +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.http-proxy.ts @@ -1,6 +1,7 @@ +import { HttpApi } from '@aws-cdk/aws-apigatewayv2'; import * as lambda from '@aws-cdk/aws-lambda'; import { App, CfnOutput, Stack } from '@aws-cdk/core'; -import { HttpApi, HttpProxyIntegration, LambdaProxyIntegration } from '../../../lib'; +import { HttpProxyIntegration, LambdaProxyIntegration } from '../../lib'; /* * Stack verification steps: diff --git a/packages/@aws-cdk/aws-apigatewayv2/test/http/integrations/integ.lambda-proxy.expected.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.lambda-proxy.expected.json similarity index 100% rename from packages/@aws-cdk/aws-apigatewayv2/test/http/integrations/integ.lambda-proxy.expected.json rename to packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.lambda-proxy.expected.json diff --git a/packages/@aws-cdk/aws-apigatewayv2/test/http/integrations/integ.lambda-proxy.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.lambda-proxy.ts similarity index 87% rename from packages/@aws-cdk/aws-apigatewayv2/test/http/integrations/integ.lambda-proxy.ts rename to packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.lambda-proxy.ts index 2114f94729edf..ed1cabee002e4 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/test/http/integrations/integ.lambda-proxy.ts +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.lambda-proxy.ts @@ -1,6 +1,7 @@ +import { HttpApi } from '@aws-cdk/aws-apigatewayv2'; import * as lambda from '@aws-cdk/aws-lambda'; import { App, CfnOutput, Stack } from '@aws-cdk/core'; -import { HttpApi, LambdaProxyIntegration } from '../../../lib'; +import { LambdaProxyIntegration } from '../../lib'; /* * Stack verification steps: diff --git a/packages/@aws-cdk/aws-apigatewayv2/test/http/integrations/lambda.test.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/lambda.test.ts similarity index 92% rename from packages/@aws-cdk/aws-apigatewayv2/test/http/integrations/lambda.test.ts rename to packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/lambda.test.ts index 8cdea2a3748c5..6272095194db6 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/test/http/integrations/lambda.test.ts +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/lambda.test.ts @@ -1,7 +1,8 @@ import '@aws-cdk/assert/jest'; +import { HttpApi, HttpRoute, HttpRouteKey, PayloadFormatVersion } from '@aws-cdk/aws-apigatewayv2'; import { Code, Function, Runtime } from '@aws-cdk/aws-lambda'; import { App, Stack } from '@aws-cdk/core'; -import { HttpApi, HttpRoute, HttpRouteKey, LambdaProxyIntegration, PayloadFormatVersion } from '../../../lib'; +import { LambdaProxyIntegration } from '../../lib'; describe('LambdaProxyIntegration', () => { test('default', () => { diff --git a/packages/@aws-cdk/aws-apigatewayv2/README.md b/packages/@aws-cdk/aws-apigatewayv2/README.md index c25027fc81c39..ea93eda2149ed 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/README.md +++ b/packages/@aws-cdk/aws-apigatewayv2/README.md @@ -52,14 +52,13 @@ path, such as, `GET /books`. Learn more at [Working with routes](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-routes.html). Use the `ANY` method to match any methods for a route that are not explicitly defined. -Integrations define how the HTTP API responds when a client reaches a specific Route. HTTP APIs support two types of -integrations - Lambda proxy integration and HTTP proxy integration. Learn more at [Configuring -integrations](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations.html). +Integrations define how the HTTP API responds when a client reaches a specific Route. HTTP APIs support Lambda proxy +integration, HTTP proxy integration and, AWS service integrations, also known as private integrations. Learn more at +[Configuring integrations](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations.html). -The code snippet below configures a route `GET /books` with an HTTP proxy integration and uses the `ANY` method to -proxy all other HTTP method calls to `/books` to a lambda proxy. - -The URL to the endpoint can be retrieved via the `apiEndpoint` attribute. +Integrations are available at the `aws-apigatewayv2-integrations` module and more information is available in that module. +As an early example, the following code snippet configures a route `GET /books` with an HTTP proxy integration all +configures all other HTTP method calls to `/books` to a lambda proxy. ```ts const getBooksIntegration = new HttpProxyIntegration({ @@ -85,6 +84,8 @@ httpApi.addRoutes({ }); ``` +The URL to the endpoint can be retrieved via the `apiEndpoint` attribute. + The `defaultIntegration` option while defining HTTP APIs lets you create a default catch-all integration that is matched when a client reaches a route that is not explicitly defined. diff --git a/packages/@aws-cdk/aws-apigatewayv2/lib/http/index.ts b/packages/@aws-cdk/aws-apigatewayv2/lib/http/index.ts index ee07bd7af8ee2..c594da33bac91 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/lib/http/index.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/lib/http/index.ts @@ -1,7 +1,6 @@ export * from './api'; export * from './route'; export * from './integration'; -export * from './integrations'; export * from './stage'; export * from './api-mapping'; export * from './vpc-link'; diff --git a/packages/@aws-cdk/aws-apigatewayv2/lib/http/integrations/index.ts b/packages/@aws-cdk/aws-apigatewayv2/lib/http/integrations/index.ts deleted file mode 100644 index 7797fe6ea8b03..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2/lib/http/integrations/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './http'; -export * from './lambda'; \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2/package.json b/packages/@aws-cdk/aws-apigatewayv2/package.json index 07b768f848bdd..126cbc4143d00 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/package.json +++ b/packages/@aws-cdk/aws-apigatewayv2/package.json @@ -83,7 +83,6 @@ "@aws-cdk/aws-certificatemanager": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", - "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-cloudwatch": "0.0.0", "@aws-cdk/core": "0.0.0", "constructs": "^3.2.0" @@ -91,7 +90,6 @@ "peerDependencies": { "@aws-cdk/aws-ec2": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", - "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-certificatemanager": "0.0.0", "@aws-cdk/aws-cloudwatch": "0.0.0", "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-apigatewayv2/test/http/api.test.ts b/packages/@aws-cdk/aws-apigatewayv2/test/http/api.test.ts index 96c747985be04..fb91ec588be56 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/test/http/api.test.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/test/http/api.test.ts @@ -2,9 +2,8 @@ import '@aws-cdk/assert/jest'; import { ABSENT } from '@aws-cdk/assert'; import { Metric } from '@aws-cdk/aws-cloudwatch'; import * as ec2 from '@aws-cdk/aws-ec2'; -import { Code, Function, Runtime } from '@aws-cdk/aws-lambda'; import { Duration, Stack } from '@aws-cdk/core'; -import { HttpApi, HttpMethod, LambdaProxyIntegration } from '../../lib'; +import { HttpApi, HttpIntegrationType, HttpMethod, HttpRouteIntegrationBindOptions, HttpRouteIntegrationConfig, IHttpRouteIntegration, PayloadFormatVersion } from '../../lib'; describe('HttpApi', () => { test('default', () => { @@ -50,13 +49,7 @@ describe('HttpApi', () => { test('default integration', () => { const stack = new Stack(); const httpApi = new HttpApi(stack, 'api', { - defaultIntegration: new LambdaProxyIntegration({ - handler: new Function(stack, 'fn', { - code: Code.fromInline('foo'), - runtime: Runtime.NODEJS_12_X, - handler: 'index.handler', - }), - }), + defaultIntegration: new DummyRouteIntegration(), }); expect(stack).toHaveResourceLike('AWS::ApiGatewayV2::Route', { @@ -76,13 +69,7 @@ describe('HttpApi', () => { httpApi.addRoutes({ path: '/pets', methods: [HttpMethod.GET, HttpMethod.PATCH], - integration: new LambdaProxyIntegration({ - handler: new Function(stack, 'fn', { - code: Code.fromInline('foo'), - runtime: Runtime.NODEJS_12_X, - handler: 'index.handler', - }), - }), + integration: new DummyRouteIntegration(), }); expect(stack).toHaveResourceLike('AWS::ApiGatewayV2::Route', { @@ -102,13 +89,7 @@ describe('HttpApi', () => { httpApi.addRoutes({ path: '/pets', - integration: new LambdaProxyIntegration({ - handler: new Function(stack, 'fn', { - code: Code.fromInline('foo'), - runtime: Runtime.NODEJS_12_X, - handler: 'index.handler', - }), - }), + integration: new DummyRouteIntegration(), }); expect(stack).toHaveResourceLike('AWS::ApiGatewayV2::Route', { @@ -281,3 +262,13 @@ describe('HttpApi', () => { expect(api.apiEndpoint).toBeDefined(); }); }); + +class DummyRouteIntegration implements IHttpRouteIntegration { + public bind(_: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig { + return { + payloadFormatVersion: PayloadFormatVersion.VERSION_2_0, + type: HttpIntegrationType.HTTP_PROXY, + uri: 'some-uri', + }; + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2/test/http/integ.custom-domain.expected.json b/packages/@aws-cdk/aws-apigatewayv2/test/http/integ.custom-domain.expected.json deleted file mode 100644 index 2273bb18b02b4..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2/test/http/integ.custom-domain.expected.json +++ /dev/null @@ -1,335 +0,0 @@ -{ - "Resources": { - "echohandlerServiceRole833A8F7A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "echohandler8F648AB2": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async function(event, context) { return { statusCode: 200, headers: { \"content-type\": \"application/json\" }, body: JSON.stringify(event) }; };" - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "echohandlerServiceRole833A8F7A", - "Arn" - ] - }, - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "echohandlerServiceRole833A8F7A" - ] - }, - "DNFDC76583": { - "Type": "AWS::ApiGatewayV2::DomainName", - "Properties": { - "DomainName": "apigv2.demo.com", - "DomainNameConfigurations": [ - { - "CertificateArn": "arn:aws:acm:us-east-1:111111111111:certificate", - "EndpointType": "REGIONAL" - } - ] - } - }, - "HttpProxyProdApi368B6161": { - "Type": "AWS::ApiGatewayV2::Api", - "Properties": { - "Name": "HttpProxyProdApi", - "ProtocolType": "HTTP" - } - }, - "HttpProxyProdApiDefaultRouteinteghttpproxyHttpProxyProdApiDefaultRoute20082F68PermissionB29E0EB7": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "echohandler8F648AB2", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "HttpProxyProdApi368B6161" - }, - "/*/*" - ] - ] - } - } - }, - "HttpProxyProdApiDefaultRouteDefaultRouteIntegration702F0DF7": { - "Type": "AWS::ApiGatewayV2::Integration", - "Properties": { - "ApiId": { - "Ref": "HttpProxyProdApi368B6161" - }, - "IntegrationType": "AWS_PROXY", - "IntegrationUri": { - "Fn::GetAtt": [ - "echohandler8F648AB2", - "Arn" - ] - }, - "PayloadFormatVersion": "2.0" - } - }, - "HttpProxyProdApiDefaultRoute40EFC108": { - "Type": "AWS::ApiGatewayV2::Route", - "Properties": { - "ApiId": { - "Ref": "HttpProxyProdApi368B6161" - }, - "RouteKey": "$default", - "Target": { - "Fn::Join": [ - "", - [ - "integrations/", - { - "Ref": "HttpProxyProdApiDefaultRouteDefaultRouteIntegration702F0DF7" - } - ] - ] - } - } - }, - "HttpProxyProdApiDefaultStage0038B180": { - "Type": "AWS::ApiGatewayV2::Stage", - "Properties": { - "ApiId": { - "Ref": "HttpProxyProdApi368B6161" - }, - "StageName": "$default", - "AutoDeploy": true - }, - "DependsOn": [ - "DNFDC76583" - ] - }, - "HttpProxyProdApiDefaultStageinteghttpproxyDNfoo38514765": { - "Type": "AWS::ApiGatewayV2::ApiMapping", - "Properties": { - "ApiId": { - "Ref": "HttpProxyProdApi368B6161" - }, - "DomainName": "apigv2.demo.com", - "Stage": "$default", - "ApiMappingKey": "foo" - }, - "DependsOn": [ - "DNFDC76583", - "HttpProxyProdApiDefaultStage0038B180" - ] - }, - "HttpProxyProdApiBetaStage7074CBDF": { - "Type": "AWS::ApiGatewayV2::Stage", - "Properties": { - "ApiId": { - "Ref": "HttpProxyProdApi368B6161" - }, - "StageName": "beta", - "AutoDeploy": true - }, - "DependsOn": [ - "DNFDC76583" - ] - }, - "HttpProxyProdApiBetaStageinteghttpproxyDNbarA0E8C5B4": { - "Type": "AWS::ApiGatewayV2::ApiMapping", - "Properties": { - "ApiId": { - "Ref": "HttpProxyProdApi368B6161" - }, - "DomainName": "apigv2.demo.com", - "Stage": "beta", - "ApiMappingKey": "bar" - }, - "DependsOn": [ - "DNFDC76583", - "HttpProxyProdApiBetaStage7074CBDF" - ] - }, - "DemoApiE67238F8": { - "Type": "AWS::ApiGatewayV2::Api", - "Properties": { - "Name": "DemoApi", - "ProtocolType": "HTTP" - } - }, - "DemoApiDefaultRouteinteghttpproxyDemoApiDefaultRoute050CFFE6PermissionB1FE82E7": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "echohandler8F648AB2", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "DemoApiE67238F8" - }, - "/*/*" - ] - ] - } - } - }, - "DemoApiDefaultRouteDefaultRouteIntegration714B9B03": { - "Type": "AWS::ApiGatewayV2::Integration", - "Properties": { - "ApiId": { - "Ref": "DemoApiE67238F8" - }, - "IntegrationType": "AWS_PROXY", - "IntegrationUri": { - "Fn::GetAtt": [ - "echohandler8F648AB2", - "Arn" - ] - }, - "PayloadFormatVersion": "2.0" - } - }, - "DemoApiDefaultRouteF8069A72": { - "Type": "AWS::ApiGatewayV2::Route", - "Properties": { - "ApiId": { - "Ref": "DemoApiE67238F8" - }, - "RouteKey": "$default", - "Target": { - "Fn::Join": [ - "", - [ - "integrations/", - { - "Ref": "DemoApiDefaultRouteDefaultRouteIntegration714B9B03" - } - ] - ] - } - } - }, - "DemoApiDefaultStage5FCE2787": { - "Type": "AWS::ApiGatewayV2::Stage", - "Properties": { - "ApiId": { - "Ref": "DemoApiE67238F8" - }, - "StageName": "$default", - "AutoDeploy": true - }, - "DependsOn": [ - "DNFDC76583" - ] - }, - "DemoApiDefaultStageinteghttpproxyDNdemo045504F3": { - "Type": "AWS::ApiGatewayV2::ApiMapping", - "Properties": { - "ApiId": { - "Ref": "DemoApiE67238F8" - }, - "DomainName": "apigv2.demo.com", - "Stage": "$default", - "ApiMappingKey": "demo" - }, - "DependsOn": [ - "DemoApiDefaultStage5FCE2787", - "DNFDC76583" - ] - } - }, - "Outputs": { - "RegionalDomainName": { - "Value": { - "Fn::GetAtt": [ - "DNFDC76583", - "RegionalDomainName" - ] - } - }, - "DomainName": { - "Value": "apigv2.demo.com" - }, - "CustomUDomainURL": { - "Value": "https://apigv2.demo.com" - }, - "ProdApiDefaultStageURL": { - "Value": "https://apigv2.demo.com/foo" - }, - "ProdApiBetaStageURL": { - "Value": "https://apigv2.demo.com/bar" - }, - "DemoApiDefaultStageURL": { - "Value": "https://apigv2.demo.com/demo" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2/test/http/integ.custom-domain.ts b/packages/@aws-cdk/aws-apigatewayv2/test/http/integ.custom-domain.ts deleted file mode 100644 index 0046b1a505e1c..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2/test/http/integ.custom-domain.ts +++ /dev/null @@ -1,59 +0,0 @@ -import * as acm from '@aws-cdk/aws-certificatemanager'; -import * as lambda from '@aws-cdk/aws-lambda'; -import { App, CfnOutput, Stack } from '@aws-cdk/core'; -import { DomainName, HttpApi, LambdaProxyIntegration } from '../../lib'; - -const app = new App(); - -const stack = new Stack(app, 'integ-http-proxy'); - -const handler = new lambda.Function(stack, 'echohandler', { - runtime: lambda.Runtime.NODEJS_12_X, - handler: 'index.handler', - code: new lambda.InlineCode('exports.handler = async function(event, context) { return { statusCode: 200, headers: { "content-type": "application/json" }, body: JSON.stringify(event) }; };'), -}); - -const certArn = 'arn:aws:acm:us-east-1:111111111111:certificate'; -const domainName = 'apigv2.demo.com'; - -const dn = new DomainName(stack, 'DN', { - domainName, - certificate: acm.Certificate.fromCertificateArn(stack, 'cert', certArn), -}); - -const prodApi = new HttpApi(stack, 'HttpProxyProdApi', { - defaultIntegration: new LambdaProxyIntegration({ handler }), - // https://${dn.domainName}/foo goes to prodApi $default stage - defaultDomainMapping: { - domainName: dn, - mappingKey: 'foo', - }, -}); - -// beta stage -prodApi.addStage('BetaStage', { - stageName: 'beta', - autoDeploy: true, - // https://${dn.domainName}/bar goes to the beta stage - domainMapping: { - domainName: dn, - mappingKey: 'bar', - }, -}); - -// the Demo API -new HttpApi(stack, 'DemoApi', { - defaultIntegration: new LambdaProxyIntegration({ handler }), - // https://${dn.domainName}/demo goes to apiDemo $default stage - defaultDomainMapping: { - domainName: dn, - mappingKey: 'demo', - }, -}); - -new CfnOutput(stack, 'RegionalDomainName', { value: dn.regionalDomainName }); -new CfnOutput(stack, 'DomainName', { value: dn.domainName }); -new CfnOutput(stack, 'CustomUDomainURL', { value: `https://${dn.domainName}` }); -new CfnOutput(stack, 'ProdApiDefaultStageURL', { value: `https://${dn.domainName}/foo` }); -new CfnOutput(stack, 'ProdApiBetaStageURL', { value: `https://${dn.domainName}/bar` }); -new CfnOutput(stack, 'DemoApiDefaultStageURL', { value: `https://${dn.domainName}/demo` }); From 521d990832b31b9804910e0df6223b4d26eef2d6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2020 18:22:53 +0000 Subject: [PATCH 092/314] chore(deps): bump aws-sdk from 2.787.0 to 2.788.0 (#11377) Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.787.0 to 2.788.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.787.0...v2.788.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/aws-cloudfront-origins/package.json | 2 +- packages/@aws-cdk/aws-cloudfront/package.json | 2 +- packages/@aws-cdk/aws-cloudtrail/package.json | 2 +- packages/@aws-cdk/aws-codebuild/package.json | 2 +- packages/@aws-cdk/aws-codecommit/package.json | 2 +- packages/@aws-cdk/aws-dynamodb/package.json | 2 +- packages/@aws-cdk/aws-eks/package.json | 2 +- packages/@aws-cdk/aws-events-targets/package.json | 2 +- packages/@aws-cdk/aws-logs/package.json | 2 +- packages/@aws-cdk/aws-route53/package.json | 2 +- packages/@aws-cdk/aws-sqs/package.json | 2 +- packages/@aws-cdk/custom-resources/package.json | 2 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- yarn.lock | 8 ++++---- 15 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudfront-origins/package.json b/packages/@aws-cdk/aws-cloudfront-origins/package.json index f785f93e01873..d9940d592b470 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/package.json +++ b/packages/@aws-cdk/aws-cloudfront-origins/package.json @@ -72,7 +72,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", - "aws-sdk": "^2.787.0", + "aws-sdk": "^2.788.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "pkglint": "0.0.0" diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index 9a84b3f57a115..96cb83b76975d 100644 --- a/packages/@aws-cdk/aws-cloudfront/package.json +++ b/packages/@aws-cdk/aws-cloudfront/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.787.0", + "aws-sdk": "^2.788.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index f7285169ae2b7..faeaca29856f8 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.787.0", + "aws-sdk": "^2.788.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codebuild/package.json b/packages/@aws-cdk/aws-codebuild/package.json index e8eeec89bed79..256ef54a8043c 100644 --- a/packages/@aws-cdk/aws-codebuild/package.json +++ b/packages/@aws-cdk/aws-codebuild/package.json @@ -79,7 +79,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.787.0", + "aws-sdk": "^2.788.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codecommit/package.json b/packages/@aws-cdk/aws-codecommit/package.json index dadc9d4e53590..37c2db758c4e1 100644 --- a/packages/@aws-cdk/aws-codecommit/package.json +++ b/packages/@aws-cdk/aws-codecommit/package.json @@ -79,7 +79,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.787.0", + "aws-sdk": "^2.788.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index 2a4b972b025c5..2971848607c8f 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -74,7 +74,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/jest": "^26.0.15", - "aws-sdk": "^2.787.0", + "aws-sdk": "^2.788.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index f5cbb43f1287b..6a2b597e8108b 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", "@types/yaml": "1.9.6", - "aws-sdk": "^2.787.0", + "aws-sdk": "^2.788.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index de9a8658335db..a7e9ff3977ed0 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -75,7 +75,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-codecommit": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", - "aws-sdk": "^2.787.0", + "aws-sdk": "^2.788.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index 29f42ad90bd1b..508e513186f94 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.787.0", + "aws-sdk": "^2.788.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-route53/package.json b/packages/@aws-cdk/aws-route53/package.json index be9f0e15a67f1..923eac82a25dc 100644 --- a/packages/@aws-cdk/aws-route53/package.json +++ b/packages/@aws-cdk/aws-route53/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.787.0", + "aws-sdk": "^2.788.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-sqs/package.json b/packages/@aws-cdk/aws-sqs/package.json index 538d5d7a6f3c6..58c766ae01919 100644 --- a/packages/@aws-cdk/aws-sqs/package.json +++ b/packages/@aws-cdk/aws-sqs/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.787.0", + "aws-sdk": "^2.788.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index 6b9ebd0219673..9177928a2a80d 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -79,7 +79,7 @@ "@types/aws-lambda": "^8.10.64", "@types/fs-extra": "^8.1.1", "@types/sinon": "^9.0.8", - "aws-sdk": "^2.787.0", + "aws-sdk": "^2.788.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 553d64b28bf7a..39850c64a5576 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -71,7 +71,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.787.0", + "aws-sdk": "^2.788.0", "camelcase": "^6.2.0", "cdk-assets": "0.0.0", "colors": "^1.4.0", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index 3c85b9a1d40ec..d5f9201c5b79b 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -47,7 +47,7 @@ "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.787.0", + "aws-sdk": "^2.788.0", "glob": "^7.1.6", "yargs": "^16.1.0" }, diff --git a/yarn.lock b/yarn.lock index 0f8e81dbe6bec..d7146c0a711c9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3837,10 +3837,10 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" -aws-sdk@^2.637.0, aws-sdk@^2.787.0: - version "2.787.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.787.0.tgz#4d8966d11c7dbe770de26632e552c97b2d91e340" - integrity sha512-3WlUdWqUB8Vhdvj/7TENr/7SEmQzxmnHxOJ8l2WjZbcMRSuI0/9Ym4p1TC3hf21VDVDhkdGlw60QqpZQ1qb+Mg== +aws-sdk@^2.637.0, aws-sdk@^2.788.0: + version "2.788.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.788.0.tgz#020f84975db9623d0a434105991e7074c488693f" + integrity sha512-UKc+4MFRezIkgk668mylj7MpVD2dCtiDBppgx05SwYSDGT60bixrKv3nE/YJK+gAv53CWVf7WL6hNv76+TWkTA== dependencies: buffer "4.9.2" events "1.1.1" From 76a1afa50c3cd840fdc61ec6b3e76afc1c62bd2c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2020 00:50:09 +0000 Subject: [PATCH 093/314] chore(deps-dev): bump parcel from 2.0.0-nightly.442 to 2.0.0-nightly.443 (#11383) Bumps [parcel](https://github.com/parcel-bundler/parcel) from 2.0.0-nightly.442 to 2.0.0-nightly.443. - [Release notes](https://github.com/parcel-bundler/parcel/releases) - [Changelog](https://github.com/parcel-bundler/parcel/blob/v2/CHANGELOG.md) - [Commits](https://github.com/parcel-bundler/parcel/commits) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- .../@aws-cdk/aws-lambda-nodejs/package.json | 2 +- yarn.lock | 920 +++++++++--------- 2 files changed, 461 insertions(+), 461 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda-nodejs/package.json b/packages/@aws-cdk/aws-lambda-nodejs/package.json index a5ea9b0fad381..de6ea3d7b31a8 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/package.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/package.json @@ -67,7 +67,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "delay": "4.4.0", - "parcel": "2.0.0-nightly.442", + "parcel": "2.0.0-nightly.443", "pkglint": "0.0.0" }, "dependencies": { diff --git a/yarn.lock b/yarn.lock index d7146c0a711c9..9b3a1ba3e3604 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2154,128 +2154,128 @@ dependencies: "@types/node" ">= 8" -"@parcel/babel-ast-utils@2.0.0-nightly.2066+e2136965": - version "2.0.0-nightly.2066" - resolved "https://registry.yarnpkg.com/@parcel/babel-ast-utils/-/babel-ast-utils-2.0.0-nightly.2066.tgz#bd4d0214b84acc4146831f66bfa4b4e8e81a5b17" - integrity sha512-Nl8ddCuIWRDMpr3tGPSfSAX0rdKyndlCIEd5LM8rQ8IAcR03NuX6IG2h4jGcgCIAfGaqS/9M1Xfpr1rFQHXYoQ== +"@parcel/babel-ast-utils@2.0.0-nightly.2067+adb92ee0": + version "2.0.0-nightly.2067" + resolved "https://registry.yarnpkg.com/@parcel/babel-ast-utils/-/babel-ast-utils-2.0.0-nightly.2067.tgz#bbb65a31eb2531a8d8bec1416b5d0047a74b57ac" + integrity sha512-1oWLszHqibl9giNCzzwd9DVePmivPridrcOlX+txSAkuQ2FG0mVSutv25XturJ6g/B6z78pL2tNV/fdVjf6lkA== dependencies: "@babel/generator" "^7.0.0" "@babel/parser" "^7.0.0" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" -"@parcel/babel-preset-env@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/babel-preset-env/-/babel-preset-env-2.0.0-nightly.444.tgz#6ae1995f17958d159a5df615ab80b61edce9a880" - integrity sha512-JYZczFbDrTOo0H8Iu6t8UAF58L9CTFO+Ojhg/kjw9+0ookmLlKMA2Ar8u/Wozh2A1lWe1xCyZQFC0xYZTuQIBA== +"@parcel/babel-preset-env@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/babel-preset-env/-/babel-preset-env-2.0.0-nightly.445.tgz#93ecf8ed29179c99e5e6d7e1534fcfae7a72a73e" + integrity sha512-fkYiZocLAsEyjz50nibkVIHULP0hwV9K2Qjl+/tqA1WJYh6/TMb1/EsaQ4T1CTY+zVsCh3TgRY4a+WqQ+OCu/A== dependencies: "@babel/preset-env" "^7.4.0" semver "^5.4.1" -"@parcel/babylon-walk@2.0.0-nightly.2066+e2136965": - version "2.0.0-nightly.2066" - resolved "https://registry.yarnpkg.com/@parcel/babylon-walk/-/babylon-walk-2.0.0-nightly.2066.tgz#375072084e5da071fa9493ce77e16443dd0dfa04" - integrity sha512-lDHJ5wUPe4vCGh1wiW8CH7j0Tqo7o6yz2UG9UQhzhDviS7jHfpkCg4f3ss1YpJS8jlYQ/TY+PypoWGZcOQa+8g== +"@parcel/babylon-walk@2.0.0-nightly.2067+adb92ee0": + version "2.0.0-nightly.2067" + resolved "https://registry.yarnpkg.com/@parcel/babylon-walk/-/babylon-walk-2.0.0-nightly.2067.tgz#102349d4f52d8046868429cb70f5fd4fe544957e" + integrity sha512-PlFGav6fC8HIsA1pS7moWTWgXuwL4OI+xH50Wee5Dc0Q3KNmfyqCJpnhRhCJTGmVe8KGYEgXF6MNwrvjVWUCbg== dependencies: "@babel/types" "^7.0.0" lodash.clone "^4.5.0" -"@parcel/bundler-default@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.0.0-nightly.444.tgz#77ce4e22ca41442f564e5045a9ed9d25fef693d8" - integrity sha512-VaB0rkF3B7deqz7xUj+jXvD+emSWo4CeBWcEEjhYHdpj/GeqFSAW/o9CxcgB1pDWiIWU3kI4es+qHJ4zf6icEw== +"@parcel/bundler-default@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.0.0-nightly.445.tgz#bac962673e7ebe6c8314e5cab7e89f03a00fca77" + integrity sha512-v6zhPfvte103vtZkAUh4mJkVLCLvX9ZjI8p6ZP3fDSI1Y5F8akWe4LWXOo1ATMjfELcwbcb317rOAKgwvV6fiQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.444+e2136965" - "@parcel/plugin" "2.0.0-nightly.444+e2136965" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" nullthrows "^1.1.1" -"@parcel/cache@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/cache/-/cache-2.0.0-nightly.444.tgz#d1994e86be596b96cb8017e39fb7e23459ce279c" - integrity sha512-uV4o+Rh3XerFjnFy7uQHwIad6BBgRvyH/sapzNBXpxzyAcE9VL4+edWLjUVSSlaEDGsn/goPpg3+idjWNlGJQw== +"@parcel/cache@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/cache/-/cache-2.0.0-nightly.445.tgz#ade1c56a3b8064223b5b4004d0f3a76116290617" + integrity sha512-HhOkWCCNRs8zdKRyiWUiYI63BZc4MjrgFCiNv00KxyDCtDXtZrD5yjzRdVbVMmJvoth8iAtNoSCrJ2hGsouPBQ== dependencies: - "@parcel/logger" "2.0.0-nightly.444+e2136965" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/logger" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" -"@parcel/codeframe@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/codeframe/-/codeframe-2.0.0-nightly.444.tgz#cfc546cebe4c8794b4c3bae20ee2bec30a5e759e" - integrity sha512-BCulOXUU2iuGdJqxv1yenXggD+BLhA9mSBAfx7Wvlye1D9tAamuqXN4V4oROk4sFY6UK6wFSMR7zMlS4QsuAVg== +"@parcel/codeframe@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/codeframe/-/codeframe-2.0.0-nightly.445.tgz#4a89d283e26a0e24eb91954e499ecd80cf4472a2" + integrity sha512-lptg9/JUko0GXe4dbG39w7sIVyOhT414qVem6mOC7P7Fy0Us7Qat23nAlWGLICZ4iYavOO44B9yIRbwUv/WB7g== dependencies: chalk "^2.4.2" emphasize "^2.1.0" slice-ansi "^4.0.0" string-width "^4.2.0" -"@parcel/config-default@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/config-default/-/config-default-2.0.0-nightly.444.tgz#757c0a17291486b845ffbe11eb24e0d43bdec372" - integrity sha512-N7Jxznaz6CCb9EUL3jrxhTySWjYFkCLXqRZCQInyqeawXQHP5esemBUEhe0uybzFjt+vUUKxVTXE2qZQb+YEsA== - dependencies: - "@parcel/bundler-default" "2.0.0-nightly.444+e2136965" - "@parcel/namer-default" "2.0.0-nightly.444+e2136965" - "@parcel/optimizer-cssnano" "2.0.0-nightly.444+e2136965" - "@parcel/optimizer-data-url" "2.0.0-nightly.444+e2136965" - "@parcel/optimizer-htmlnano" "2.0.0-nightly.444+e2136965" - "@parcel/optimizer-terser" "2.0.0-nightly.444+e2136965" - "@parcel/packager-css" "2.0.0-nightly.444+e2136965" - "@parcel/packager-html" "2.0.0-nightly.444+e2136965" - "@parcel/packager-js" "2.0.0-nightly.444+e2136965" - "@parcel/packager-raw" "2.0.0-nightly.444+e2136965" - "@parcel/packager-raw-url" "2.0.0-nightly.2066+e2136965" - "@parcel/packager-ts" "2.0.0-nightly.444+e2136965" - "@parcel/reporter-bundle-analyzer" "2.0.0-nightly.2066+e2136965" - "@parcel/reporter-bundle-buddy" "2.0.0-nightly.2066+e2136965" - "@parcel/reporter-cli" "2.0.0-nightly.444+e2136965" - "@parcel/reporter-dev-server" "2.0.0-nightly.444+e2136965" - "@parcel/resolver-default" "2.0.0-nightly.444+e2136965" - "@parcel/runtime-browser-hmr" "2.0.0-nightly.444+e2136965" - "@parcel/runtime-js" "2.0.0-nightly.444+e2136965" - "@parcel/runtime-react-refresh" "2.0.0-nightly.444+e2136965" - "@parcel/transformer-babel" "2.0.0-nightly.444+e2136965" - "@parcel/transformer-coffeescript" "2.0.0-nightly.444+e2136965" - "@parcel/transformer-css" "2.0.0-nightly.444+e2136965" - "@parcel/transformer-glsl" "2.0.0-nightly.2066+e2136965" - "@parcel/transformer-graphql" "2.0.0-nightly.444+e2136965" - "@parcel/transformer-html" "2.0.0-nightly.444+e2136965" - "@parcel/transformer-image" "2.0.0-nightly.2066+e2136965" - "@parcel/transformer-inline-string" "2.0.0-nightly.444+e2136965" - "@parcel/transformer-js" "2.0.0-nightly.444+e2136965" - "@parcel/transformer-json" "2.0.0-nightly.444+e2136965" - "@parcel/transformer-jsonld" "2.0.0-nightly.2066+e2136965" - "@parcel/transformer-less" "2.0.0-nightly.444+e2136965" - "@parcel/transformer-mdx" "2.0.0-nightly.2066+e2136965" - "@parcel/transformer-postcss" "2.0.0-nightly.444+e2136965" - "@parcel/transformer-posthtml" "2.0.0-nightly.444+e2136965" - "@parcel/transformer-pug" "2.0.0-nightly.444+e2136965" - "@parcel/transformer-raw" "2.0.0-nightly.444+e2136965" - "@parcel/transformer-react-refresh-babel" "2.0.0-nightly.444+e2136965" - "@parcel/transformer-react-refresh-wrap" "2.0.0-nightly.444+e2136965" - "@parcel/transformer-sass" "2.0.0-nightly.444+e2136965" - "@parcel/transformer-stylus" "2.0.0-nightly.444+e2136965" - "@parcel/transformer-sugarss" "2.0.0-nightly.444+e2136965" - "@parcel/transformer-toml" "2.0.0-nightly.444+e2136965" - "@parcel/transformer-typescript-types" "2.0.0-nightly.444+e2136965" - "@parcel/transformer-vue" "2.0.0-nightly.2066+e2136965" - "@parcel/transformer-yaml" "2.0.0-nightly.444+e2136965" - -"@parcel/core@2.0.0-nightly.442+e2136965": - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/@parcel/core/-/core-2.0.0-nightly.442.tgz#058195bb3c4f333874c923488a4fcdafac28c925" - integrity sha512-sEWAqRYCyBG+Cf8bvFs7rbMQovZivaUwUcnbqwaBhoUqmoHuxUJnBH2z0ht5TqFrzGiyZmNWXa3F4s875QzbMA== - dependencies: - "@parcel/cache" "2.0.0-nightly.444+e2136965" - "@parcel/diagnostic" "2.0.0-nightly.444+e2136965" - "@parcel/events" "2.0.0-nightly.444+e2136965" - "@parcel/fs" "2.0.0-nightly.444+e2136965" - "@parcel/logger" "2.0.0-nightly.444+e2136965" - "@parcel/package-manager" "2.0.0-nightly.444+e2136965" - "@parcel/plugin" "2.0.0-nightly.444+e2136965" +"@parcel/config-default@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/config-default/-/config-default-2.0.0-nightly.445.tgz#d48b91629ccf3b065702ce1b893fd7011a3cb494" + integrity sha512-v7l35yN+KYLzuzMEGxdHr8WSaTXhZlY7FQKeoZ7XupFRXAB2QsOyoIpm74LMkSsRLAWZ3JOQej3Ii79bbTvFHQ== + dependencies: + "@parcel/bundler-default" "2.0.0-nightly.445+adb92ee0" + "@parcel/namer-default" "2.0.0-nightly.445+adb92ee0" + "@parcel/optimizer-cssnano" "2.0.0-nightly.445+adb92ee0" + "@parcel/optimizer-data-url" "2.0.0-nightly.445+adb92ee0" + "@parcel/optimizer-htmlnano" "2.0.0-nightly.445+adb92ee0" + "@parcel/optimizer-terser" "2.0.0-nightly.445+adb92ee0" + "@parcel/packager-css" "2.0.0-nightly.445+adb92ee0" + "@parcel/packager-html" "2.0.0-nightly.445+adb92ee0" + "@parcel/packager-js" "2.0.0-nightly.445+adb92ee0" + "@parcel/packager-raw" "2.0.0-nightly.445+adb92ee0" + "@parcel/packager-raw-url" "2.0.0-nightly.2067+adb92ee0" + "@parcel/packager-ts" "2.0.0-nightly.445+adb92ee0" + "@parcel/reporter-bundle-analyzer" "2.0.0-nightly.2067+adb92ee0" + "@parcel/reporter-bundle-buddy" "2.0.0-nightly.2067+adb92ee0" + "@parcel/reporter-cli" "2.0.0-nightly.445+adb92ee0" + "@parcel/reporter-dev-server" "2.0.0-nightly.445+adb92ee0" + "@parcel/resolver-default" "2.0.0-nightly.445+adb92ee0" + "@parcel/runtime-browser-hmr" "2.0.0-nightly.445+adb92ee0" + "@parcel/runtime-js" "2.0.0-nightly.445+adb92ee0" + "@parcel/runtime-react-refresh" "2.0.0-nightly.445+adb92ee0" + "@parcel/transformer-babel" "2.0.0-nightly.445+adb92ee0" + "@parcel/transformer-coffeescript" "2.0.0-nightly.445+adb92ee0" + "@parcel/transformer-css" "2.0.0-nightly.445+adb92ee0" + "@parcel/transformer-glsl" "2.0.0-nightly.2067+adb92ee0" + "@parcel/transformer-graphql" "2.0.0-nightly.445+adb92ee0" + "@parcel/transformer-html" "2.0.0-nightly.445+adb92ee0" + "@parcel/transformer-image" "2.0.0-nightly.2067+adb92ee0" + "@parcel/transformer-inline-string" "2.0.0-nightly.445+adb92ee0" + "@parcel/transformer-js" "2.0.0-nightly.445+adb92ee0" + "@parcel/transformer-json" "2.0.0-nightly.445+adb92ee0" + "@parcel/transformer-jsonld" "2.0.0-nightly.2067+adb92ee0" + "@parcel/transformer-less" "2.0.0-nightly.445+adb92ee0" + "@parcel/transformer-mdx" "2.0.0-nightly.2067+adb92ee0" + "@parcel/transformer-postcss" "2.0.0-nightly.445+adb92ee0" + "@parcel/transformer-posthtml" "2.0.0-nightly.445+adb92ee0" + "@parcel/transformer-pug" "2.0.0-nightly.445+adb92ee0" + "@parcel/transformer-raw" "2.0.0-nightly.445+adb92ee0" + "@parcel/transformer-react-refresh-babel" "2.0.0-nightly.445+adb92ee0" + "@parcel/transformer-react-refresh-wrap" "2.0.0-nightly.445+adb92ee0" + "@parcel/transformer-sass" "2.0.0-nightly.445+adb92ee0" + "@parcel/transformer-stylus" "2.0.0-nightly.445+adb92ee0" + "@parcel/transformer-sugarss" "2.0.0-nightly.445+adb92ee0" + "@parcel/transformer-toml" "2.0.0-nightly.445+adb92ee0" + "@parcel/transformer-typescript-types" "2.0.0-nightly.445+adb92ee0" + "@parcel/transformer-vue" "2.0.0-nightly.2067+adb92ee0" + "@parcel/transformer-yaml" "2.0.0-nightly.445+adb92ee0" + +"@parcel/core@2.0.0-nightly.443+adb92ee0": + version "2.0.0-nightly.443" + resolved "https://registry.yarnpkg.com/@parcel/core/-/core-2.0.0-nightly.443.tgz#2aadb331972f97738d74e1032d8894cdd7b08fa1" + integrity sha512-tjxlSYwrR4X4244PvdKYQslAQf1jqsBSjVtb19tD+5r/B+nmWrZtVe3/S1JEu8rFVt54TGsgifrO4RyOOlvqVA== + dependencies: + "@parcel/cache" "2.0.0-nightly.445+adb92ee0" + "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" + "@parcel/events" "2.0.0-nightly.445+adb92ee0" + "@parcel/fs" "2.0.0-nightly.445+adb92ee0" + "@parcel/logger" "2.0.0-nightly.445+adb92ee0" + "@parcel/package-manager" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/types" "2.0.0-nightly.444+e2136965" - "@parcel/utils" "2.0.0-nightly.444+e2136965" - "@parcel/workers" "2.0.0-nightly.444+e2136965" + "@parcel/types" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/workers" "2.0.0-nightly.445+adb92ee0" abortcontroller-polyfill "^1.1.9" base-x "^3.0.8" browserslist "^4.6.6" @@ -2289,72 +2289,72 @@ querystring "^0.2.0" semver "^5.4.1" -"@parcel/diagnostic@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/diagnostic/-/diagnostic-2.0.0-nightly.444.tgz#ed1db5d1b4b30ee9490c03b07c38dca4790be426" - integrity sha512-nGlyju2MlkcufTZkFMZiOtk7/YKF7+L8ScWpM6i2W6nMTfDxh9OTlO68FBgXTYFEqr9eVeh4vzXZP6Dr4UQ3aQ== +"@parcel/diagnostic@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/diagnostic/-/diagnostic-2.0.0-nightly.445.tgz#9ee4346683445c7e6c05695d0c1e105dbc4a81ce" + integrity sha512-uURmdKGPQn5ZGHzJbuPTnTYDFWzsYlt6SBysVU5/OGoWXDlsW7nQ+MU7rfIQl9D5pgFtC9G+orwSPvjDmBi83w== dependencies: json-source-map "^0.6.1" nullthrows "^1.1.1" -"@parcel/events@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/events/-/events-2.0.0-nightly.444.tgz#6f8cfa720590ffa52c763ab2a17137425de47993" - integrity sha512-r6EDHAWippZd2Zj24O4XQYvm3we9wExlmj+nVzAz4l4j8GQdzhS+qMyUsGh9UFOT0y0/SxyKhbxFpH27KqirgQ== +"@parcel/events@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/events/-/events-2.0.0-nightly.445.tgz#f8c7b0ab75bc9c2676bb65c428780467378f31ee" + integrity sha512-4w1NoPtP4lAl2IC0B3dNKEJgukSSArdnd/+D33Y57S6C9Ninw6nTrEQtfePmoZqNVcmEk/ztSBxixn484NE+IA== -"@parcel/fs-write-stream-atomic@2.0.0-nightly.2066+e2136965": - version "2.0.0-nightly.2066" - resolved "https://registry.yarnpkg.com/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.0-nightly.2066.tgz#1b47bd5b64a4f83071323ed5587c827af6571986" - integrity sha512-mM/MXdDQmxD+K3o8Bjmt9tnEzDPyKUYy55OhFCNfAAn2WVjKp+lXX/Qd+naIX2/D4yzsFa0FsXC17n1wpAh4Dw== +"@parcel/fs-write-stream-atomic@2.0.0-nightly.2067+adb92ee0": + version "2.0.0-nightly.2067" + resolved "https://registry.yarnpkg.com/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.0-nightly.2067.tgz#e868a6d75e791f66477f9fbc6b65763c0cd9f16c" + integrity sha512-zIKF9CfZQPi7iwbHTaulTY2k8ZUcnSj4tVeHKrd2XiX+5yv7Q80Kuk5GbpcnMw/FxSubxNvHX/x7oxbtFCiXeA== dependencies: graceful-fs "^4.1.2" iferr "^1.0.2" imurmurhash "^0.1.4" readable-stream "1 || 2" -"@parcel/fs@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-2.0.0-nightly.444.tgz#3ca648e57120df1f279f6fe706454c14140664a2" - integrity sha512-csiTigyfyoJlb/nbt3Ga1Ib8CkfRboNMAwdrnHp0pc7omqx733B9Xs8iImNfqR1KLdL5yD8oIqqpzB8Kr24GfQ== +"@parcel/fs@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-2.0.0-nightly.445.tgz#28bc385de0dc9ab7a776a0329fad92a33c5bc074" + integrity sha512-iQL/gAC7PfS8N1Vt6GZeb7b6zjtr0umEFlyC7uQ6lyV/Ln2syqTJWQ+OKCdpURdi2PY3dqzqD9OyNqVFpp5+IA== dependencies: - "@parcel/fs-write-stream-atomic" "2.0.0-nightly.2066+e2136965" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/fs-write-stream-atomic" "2.0.0-nightly.2067+adb92ee0" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" "@parcel/watcher" "2.0.0-alpha.8" - "@parcel/workers" "2.0.0-nightly.444+e2136965" + "@parcel/workers" "2.0.0-nightly.445+adb92ee0" graceful-fs "^4.2.4" mkdirp "^0.5.1" ncp "^2.0.0" nullthrows "^1.1.1" rimraf "^3.0.2" -"@parcel/logger@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-2.0.0-nightly.444.tgz#217a523f8f342fb49eb591c90e048b01d879b739" - integrity sha512-oSIVRt/w/JiKeD0nnrW/XecAHHtxjPeQvY6wOqp6h1gTrnE9Id6WBOB8up42JkcNsRGicC+FXa7ag252BBjxcQ== +"@parcel/logger@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-2.0.0-nightly.445.tgz#5085896f9f4cd398b94ce2956e74a497886825f6" + integrity sha512-AtTE3ciR/xrqDSaEqEBgFd0zhUK5mCq+G7tXYeCu71+OphnCo30vSVe9NhsoZmWHoFvtOjCZ0M9ECfTJzVXRuw== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.444+e2136965" - "@parcel/events" "2.0.0-nightly.444+e2136965" + "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" + "@parcel/events" "2.0.0-nightly.445+adb92ee0" -"@parcel/markdown-ansi@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/markdown-ansi/-/markdown-ansi-2.0.0-nightly.444.tgz#2f2fbca0fe5eeb79d5eb205a99e1c6d346c72181" - integrity sha512-0HiYTFpdIc4/v/ZkTo7CqhfiQSXBvekX/1mb2hk2LG7khQcmqXFeSXH/GohlHnY9NZBZNmH+LsBVQ0VWR9V/ag== +"@parcel/markdown-ansi@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/markdown-ansi/-/markdown-ansi-2.0.0-nightly.445.tgz#5a271162f65e2a2a3c5de5a2a95999d72336c01e" + integrity sha512-CoVZYc5JsdQfsgt3BVlR9u+36I6EBAwQOo7y4iR4nNiF/MWb8s30PGLTNjykYxyNxBI92YfHl8RTMgyeGuHCqw== dependencies: chalk "^2.4.2" -"@parcel/namer-default@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/namer-default/-/namer-default-2.0.0-nightly.444.tgz#8fa2c0c98a8b706feb3d89af8ff89850b2a004b3" - integrity sha512-qJvXfXnPKM7eZedxV+Um+1UxN1QugFYkH6eNJx1HvbxV/Vwj0OBJ8AM4BobqPkoA1IxxsPW/d8uthCK+XVqsxA== +"@parcel/namer-default@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/namer-default/-/namer-default-2.0.0-nightly.445.tgz#19bd7440ac7c9510cf8b321838e39e5549d83dfb" + integrity sha512-hsYj0OCkh8LSshTSuW6HKR6O0YbHTPJydZ+5+XrV5v87PDOp1QBLeuDCR6hporRqx7KWBp20PROWrrXgjcvJmQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.444+e2136965" - "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" nullthrows "^1.1.1" -"@parcel/node-libs-browser@2.0.0-nightly.2066+e2136965": - version "2.0.0-nightly.2066" - resolved "https://registry.yarnpkg.com/@parcel/node-libs-browser/-/node-libs-browser-2.0.0-nightly.2066.tgz#78dd59bf9e4e136c0f115c27bb18e3d0145a120e" - integrity sha512-nzDPDjFqIqoQ68DEnVTP4GAFm28gililBSWTLWyWOXfLiN03WO5Fa2uCEQRBbod+Tlb8eonwcrglza8lxGlZOg== +"@parcel/node-libs-browser@2.0.0-nightly.2067+adb92ee0": + version "2.0.0-nightly.2067" + resolved "https://registry.yarnpkg.com/@parcel/node-libs-browser/-/node-libs-browser-2.0.0-nightly.2067.tgz#8b6195a0013f2c4018d637bcd9de7b778aaf6e42" + integrity sha512-0Q5ZwBM3bZM3tYsMvh7SEc3iMc5d3AgSkn5MG6+rRbLnFP3dwRQws/2qpCghX9//2ifTa9jNwU7cSqlMdVN/Ng== dependencies: assert "^2.0.0" browserify-zlib "^0.2.0" @@ -2379,71 +2379,71 @@ util "^0.12.3" vm-browserify "^1.1.2" -"@parcel/node-resolver-core@2.0.0-nightly.2066+e2136965": - version "2.0.0-nightly.2066" - resolved "https://registry.yarnpkg.com/@parcel/node-resolver-core/-/node-resolver-core-2.0.0-nightly.2066.tgz#2b4b318c250d39c2580a3e43d840eaa8c4b625b6" - integrity sha512-qOujpQyPwVStiU+bHYkl9JTgl14eSQzmrIsXJ/RNrSHfadqgkgUcNp5DFPppqDmnLXIp7YwXl6mxjtgfFgb4Zg== +"@parcel/node-resolver-core@2.0.0-nightly.2067+adb92ee0": + version "2.0.0-nightly.2067" + resolved "https://registry.yarnpkg.com/@parcel/node-resolver-core/-/node-resolver-core-2.0.0-nightly.2067.tgz#27b083414d0a6f4ec532c67441f4b844bffde5c7" + integrity sha512-pXh5flmV49zo25nhZPxDzeIdQmuUNCX5okXELQC7aCbbSInLHZNwCAks0PaGCMXo+Cx5nWtzRaC50URn2LnJVA== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.444+e2136965" - "@parcel/node-libs-browser" "2.0.0-nightly.2066+e2136965" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" + "@parcel/node-libs-browser" "2.0.0-nightly.2067+adb92ee0" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" micromatch "^3.0.4" nullthrows "^1.1.1" querystring "^0.2.0" -"@parcel/optimizer-cssnano@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.0.0-nightly.444.tgz#3ec149c63adb9a34b91596c2366f425bd54791f9" - integrity sha512-mKlXZlZfm1oe4cmUVh8CciqMQaO1wNZfkm0zQn5hLeAfI2Sd6krWNOesccE9+o6+7PlWVA1VP5g9cJbLOeyCqw== +"@parcel/optimizer-cssnano@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.0.0-nightly.445.tgz#b4e3e8a42dfbbfee6f3e93bfa794ea575ee17f6f" + integrity sha512-jD4AEtloLMmEN2kJ7wGD+bN6krv/7MFifNSQTLSjuHR4X5yE68LYanUDiFwZFLoA5PS6IN0k2MPV5uQx5b/Iag== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" "@parcel/source-map" "2.0.0-alpha.4.16" cssnano "^4.1.10" postcss "^8.0.5" -"@parcel/optimizer-data-url@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-data-url/-/optimizer-data-url-2.0.0-nightly.444.tgz#381d1d5f0f91eb6822a05381326b6d769bda1616" - integrity sha512-s2f2fWIiWKl8CxgPL68JHt90qgxJ3UTYa7bhG2CqFnuBqxLkGAorqYHPq+ElRHy9pjKZuvGL5sOfFPYhmcUuLg== +"@parcel/optimizer-data-url@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-data-url/-/optimizer-data-url-2.0.0-nightly.445.tgz#ecf601c69be85a343d4d7889048163c9b06f71da" + integrity sha512-6aCjXaEBHcMtr9u/7FBNRd0v2de27CdG+AKcDUopHOeT7algwlam59dvFQK/cGqTFYjuoTRQcEZaC3R6tmLqwg== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" isbinaryfile "^4.0.2" mime "^2.4.4" -"@parcel/optimizer-htmlnano@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.0.0-nightly.444.tgz#5008efbd4cd98b74c3edd197245827e32bde3458" - integrity sha512-uLN3Kj7n6Ppbic1EP4I8T8ZKktVz44TbcEV1B98HD0CEviThMOKIw+XG1UnI2rpbP//d13Qy/pHEl2YoXlr9uA== +"@parcel/optimizer-htmlnano@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.0.0-nightly.445.tgz#d056a71c0f5e29a9a7c3103579a5cb977733fa2d" + integrity sha512-RiPJEStbZ4OtQYvTPd8KKuXANsgy86viA76u4mnadInupxsM+MRlxj/7eUt7t+kSqE/z6yoH1HTF69kpUgwXYw== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" htmlnano "^0.2.2" nullthrows "^1.1.1" posthtml "^0.11.3" -"@parcel/optimizer-terser@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-terser/-/optimizer-terser-2.0.0-nightly.444.tgz#4eacd7ea22fe11c2fc65a66103b23cb4b9e08e02" - integrity sha512-DvauanAQ8ywyZYPtluq0FnbB2VNv5rzRsh8q3i3MKE0ElSN9aTn5MSKBMMzTIdVk5M8jzNldQW3toaXe83LhcA== +"@parcel/optimizer-terser@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-terser/-/optimizer-terser-2.0.0-nightly.445.tgz#3e48db6cc5725151b6ef2ed12c65b904a2422bfb" + integrity sha512-DH+0UZCcFmeBEwLlY64ZZWyvoHi1bjVnKW7WLaRauHPBwrT3xGVkIa+hN7QHQ+E2t4jDCQd7IpfoswzBqGohvA== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.444+e2136965" - "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" nullthrows "^1.1.1" terser "^5.2.0" -"@parcel/package-manager@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/package-manager/-/package-manager-2.0.0-nightly.444.tgz#98414d390b72aa96eb5d1783f709b4730139e395" - integrity sha512-FS+neGRcUGnOxRMnRPsrg9yu5YotgrGZepm/cTVnitLJh/de4dXto+GIJWlI/yjNdYPRWgObn+dnaJfTNg/3cQ== +"@parcel/package-manager@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/package-manager/-/package-manager-2.0.0-nightly.445.tgz#5eaa68935f96ac11a92ccea99323aaa218f721b7" + integrity sha512-DhGslnPGIk/jd1DS5sNL3JLxk59GqvDn9Q+gAicB6QvKjF2Lq3GQLlnl6bi4bXetZwOYjdRBdaXikweJmKBs4A== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.444+e2136965" - "@parcel/fs" "2.0.0-nightly.444+e2136965" - "@parcel/logger" "2.0.0-nightly.444+e2136965" - "@parcel/utils" "2.0.0-nightly.444+e2136965" - "@parcel/workers" "2.0.0-nightly.444+e2136965" + "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" + "@parcel/fs" "2.0.0-nightly.445+adb92ee0" + "@parcel/logger" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/workers" "2.0.0-nightly.445+adb92ee0" command-exists "^1.2.6" cross-spawn "^6.0.4" nullthrows "^1.1.1" @@ -2451,91 +2451,91 @@ semver "^5.4.1" split2 "^3.1.1" -"@parcel/packager-css@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/packager-css/-/packager-css-2.0.0-nightly.444.tgz#43b5f848b0ccee2c2a11016d0f7734a29104f53b" - integrity sha512-jQRxz00jHtnbh8vunIjYzGYYxvyC0ToSh3gh2uiGogbHWtTzdWhL6x3cBOQq7n4B4BlBKx6KFqARnE6lcDHMFw== +"@parcel/packager-css@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/packager-css/-/packager-css-2.0.0-nightly.445.tgz#688c2f1c96bd698325d8765c7acf3ebb049027ef" + integrity sha512-p1V4yBeF3RSds/o0e8V+Qs4/z+rDY32yakgdzBBYAtSYhPIIXUNaZMw0/DWqq7ClALeM6Xs+UQwFtT95worcIA== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" -"@parcel/packager-html@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/packager-html/-/packager-html-2.0.0-nightly.444.tgz#786245074813277a6d41d6acf727572470335978" - integrity sha512-azFEsn9PzWXpollTLN0qpvy8wjgl6OuOP5IF1JJm9sa3k0mWQNNiNSKKkPhQVYIxPXhcXIUFGY8QZDsdAzVIzg== +"@parcel/packager-html@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/packager-html/-/packager-html-2.0.0-nightly.445.tgz#53fd08f3c9bd838940441a5098c2f70ac04a5099" + integrity sha512-LwOJELmGXX0yT0///njuzEzHSygjMZMDuDcJLMnMoiyA5MivoYWeVU/MTZvorTU8dzZ61SqiUIS1NbjDORp4vg== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" - "@parcel/types" "2.0.0-nightly.444+e2136965" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/types" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" nullthrows "^1.1.1" posthtml "^0.11.3" -"@parcel/packager-js@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/packager-js/-/packager-js-2.0.0-nightly.444.tgz#a456bf058cffaafbb73ae7fd76b0734d6bc93619" - integrity sha512-xKNIXEQpkuLKWqjaj0Y582P8cqe+J2F1zWxUKbGHeaBvGFjnLqWtHA6SpP44/JyasnmdHfCOcz5BGyBY/6gG2w== +"@parcel/packager-js@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/packager-js/-/packager-js-2.0.0-nightly.445.tgz#7ce928ed783c924457395d1a1adc48e56490dda4" + integrity sha512-ePZzrgLJgZW+RUDiX/qZLDme2UmkIsFUr/4Rhdyc2S/QBMDAHcmBgXb61bavItw9CdzmyWdabqSx7jDr6RqzMw== dependencies: "@babel/traverse" "^7.2.3" - "@parcel/plugin" "2.0.0-nightly.444+e2136965" - "@parcel/scope-hoisting" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/scope-hoisting" "2.0.0-nightly.445+adb92ee0" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" nullthrows "^1.1.1" -"@parcel/packager-raw-url@2.0.0-nightly.2066+e2136965": - version "2.0.0-nightly.2066" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw-url/-/packager-raw-url-2.0.0-nightly.2066.tgz#914a8cd87a6a39a5409cbacd79b0bee4ca230071" - integrity sha512-THMH4Oa7x679lew3praIt0xYOCykMWuH5/DRt8AdOVXTGDYc5JfARHvXZc4SI0ZQCqksBhU22B436hePqH/qSA== +"@parcel/packager-raw-url@2.0.0-nightly.2067+adb92ee0": + version "2.0.0-nightly.2067" + resolved "https://registry.yarnpkg.com/@parcel/packager-raw-url/-/packager-raw-url-2.0.0-nightly.2067.tgz#5b93d627266ae4bd859c00c19da21a67cad56549" + integrity sha512-bCcOOrNAx17tOXMI5PJ1FtjJYj/idZokjmmeHZzrOmOjvppbGTNsDW92EyL3iBzB4aX0l9Dn9MSwV52/tWCVRA== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" -"@parcel/packager-raw@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw/-/packager-raw-2.0.0-nightly.444.tgz#4b904509fd4b7567056032e216bc8f9868327de6" - integrity sha512-/CI4PpeelABTja4oYnTtANWYYfr/z7u+9YNz84w3zJOynQJ20zAVatYOH0N+4KapDfoSz27MfQujNwhrax3l1w== +"@parcel/packager-raw@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/packager-raw/-/packager-raw-2.0.0-nightly.445.tgz#a02bda8f218a03bcca9660e88f14e91e48c1830e" + integrity sha512-ZxZoWc9+5Bs+FXD6Kw2EP3DRp6F+Ya3qq4R2Jd+9EjjnfuH8leYOKwPghUio/G+AkSQEeOmBYgjhsE18o8ZpvA== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" -"@parcel/packager-ts@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/packager-ts/-/packager-ts-2.0.0-nightly.444.tgz#21957c442510b4e2b9f51a1a167874a9d6283506" - integrity sha512-Mr0tiSV5+0f0bTDouFQBmA/gR2x8fbqFOOtLGHmRjn+1X5+20ClrcQPnwPCiuvwd4PhFn7BahrI+YJsGtxw9vg== +"@parcel/packager-ts@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/packager-ts/-/packager-ts-2.0.0-nightly.445.tgz#04110a5ade9682fe90b26f6f547ff0da47f50af4" + integrity sha512-adNSvw8A736QEhjI7quvo5RzZOZW3Q14d/vmP86qx1nBrCSeHy/MFl/CyjeebQpJuZeGXnoiIHX8aWhz96kshQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" -"@parcel/plugin@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/plugin/-/plugin-2.0.0-nightly.444.tgz#ac6a0bdb861d7b76fad28060ca74cf4735d1b23c" - integrity sha512-7EIliO7OHlzljKeb9n353xahcdGh4F6WIuu1lrM82bB4tsmnvFDeLetmEXppKo1brr7I3J15joF15TtZi7wBaQ== +"@parcel/plugin@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/plugin/-/plugin-2.0.0-nightly.445.tgz#c9f5a2ed3ad214d78744d761d4c3301ab2ff9fa2" + integrity sha512-qxcX+BiKRdHyCYTpEjjMOzjzLjpZmhdXdmL6PwAESg0PjqA7KCx1pL6zVJHaR68mQ/WBXE2lX7hl++Nfg2vtbw== dependencies: - "@parcel/types" "2.0.0-nightly.444+e2136965" + "@parcel/types" "2.0.0-nightly.445+adb92ee0" -"@parcel/reporter-bundle-analyzer@2.0.0-nightly.2066+e2136965": - version "2.0.0-nightly.2066" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.0.0-nightly.2066.tgz#1dc919854376ef9124cee2de2064346b1fab8c9c" - integrity sha512-OUWFYSWLkOoqta2hQuVb4wctStJ96gsolNGzOjANTdirOIYcN8IH9EcDPic0KNZTdRQYS4K5Yr7TkNU2x/JlsQ== +"@parcel/reporter-bundle-analyzer@2.0.0-nightly.2067+adb92ee0": + version "2.0.0-nightly.2067" + resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.0.0-nightly.2067.tgz#ddf3984b2e088d33b2332c6e8b07b8286172e74c" + integrity sha512-GitRUuMGk4cf2Jais2mSVNUH2R3hmojCUMS9zrxmK9zu+W9Okl1V4yhEX6NbwSmuzKXEUOU2utMlqUYN12z1dg== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" nullthrows "^1.1.1" -"@parcel/reporter-bundle-buddy@2.0.0-nightly.2066+e2136965": - version "2.0.0-nightly.2066" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-buddy/-/reporter-bundle-buddy-2.0.0-nightly.2066.tgz#c4e7a1031895458e769166856d4bf0625b3eb1d9" - integrity sha512-Vh+Hfq1ynme6AZPKXPa/LCacTX3GzgpxM8xIIuXCbvLa6yK2Mx6P8CUz8uW13Sjkw+6HPmmVKVFv7FMCwPAB0A== +"@parcel/reporter-bundle-buddy@2.0.0-nightly.2067+adb92ee0": + version "2.0.0-nightly.2067" + resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-buddy/-/reporter-bundle-buddy-2.0.0-nightly.2067.tgz#38e05ca74d0c8c342a7269dc1a1bb65c064599d8" + integrity sha512-DEazr+ZzSTnDoP/kOamsPmD77IqwE8Fbp/HvDIDA4DQvkobxHLIt0w0Qr8lJ2tAgwzLRuAxA6UAHOvX6qVB1IQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" -"@parcel/reporter-cli@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/reporter-cli/-/reporter-cli-2.0.0-nightly.444.tgz#d87857853edf7395be3aa905ba35a5e0155e990e" - integrity sha512-4eHfegZGPVbEa4wWjbfSI02n+QjUEiMo2slxvEL8kLTjs01n7T76Z4QTOlqofOuymkF3vyI3PZtw+jSDfSJK/g== +"@parcel/reporter-cli@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/reporter-cli/-/reporter-cli-2.0.0-nightly.445.tgz#135ad99e1568ec2534d1d4553857b241537a6b9b" + integrity sha512-88oGRxN2Eimi3BqzEHb1fdITCh0XPRHf79EFxY7jUoxJobJwBIu967BzG+yy7NvARgYkm8aBa9+f+KyASrXPpw== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" - "@parcel/types" "2.0.0-nightly.444+e2136965" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/types" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" chalk "^3.0.0" filesize "^3.6.0" nullthrows "^1.1.1" @@ -2544,13 +2544,13 @@ strip-ansi "^6.0.0" term-size "^2.1.1" -"@parcel/reporter-dev-server@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/reporter-dev-server/-/reporter-dev-server-2.0.0-nightly.444.tgz#0c45bc2e7c2a89297c18833ba0d171a7a645abdc" - integrity sha512-kjnAkdHkOoaUTS3+aVC42w+tGf7U6f5gWjeloKl1TkuChbV0dzNzyCGJHLve4tBtBoyAscb+hhOR96WFbBTs+w== +"@parcel/reporter-dev-server@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/reporter-dev-server/-/reporter-dev-server-2.0.0-nightly.445.tgz#45b7d8d2bcf17609e4542e5c7b6872fa5aa15189" + integrity sha512-mYJ+t9KMCA52AaYvg0dxIMqdSZbnckxxunIM/uPe+J7Nd71ImfSNMv7K/xVx67RrSm/YD0gSgbGI4yfWX2/kGQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" connect "^3.7.0" ejs "^2.6.1" http-proxy-middleware "^1.0.0" @@ -2558,54 +2558,54 @@ serve-handler "^6.0.0" ws "^6.2.0" -"@parcel/resolver-default@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/resolver-default/-/resolver-default-2.0.0-nightly.444.tgz#4ee9126d5989cbfe72c6daa0e70c2ddd50615e89" - integrity sha512-fIIw8FV35XoaTYsBZ4Y5ObtxujhUMYkmGbRSIapCr7kUqXCoPsxuUbEM5WA9dYvZ9i+6nh7wfzIT1IMn0Quv/g== +"@parcel/resolver-default@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/resolver-default/-/resolver-default-2.0.0-nightly.445.tgz#3aeff1e04f6005f019e93304ffbf29e01e38903a" + integrity sha512-A5hpAqtvFeA4AifeMSRBvUuJcKI5AnXotPXJ+ZoP6H8GjRcUbdkGSpObc+B6W4ZmMuYEtojGSHFA+eHcyVgQsg== dependencies: - "@parcel/node-resolver-core" "2.0.0-nightly.2066+e2136965" - "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/node-resolver-core" "2.0.0-nightly.2067+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" -"@parcel/runtime-browser-hmr@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.0.0-nightly.444.tgz#f56f3ad6beb9db061bb033c43ad873cf688d736d" - integrity sha512-S5cEICwMvMm+zfyvrOKTmj0jwc1zGE2t9eKTCqJ87c2WGJZwPHqawc43cWj6jkaEtxIsNf5m3CwNhKrEosWaBg== +"@parcel/runtime-browser-hmr@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.0.0-nightly.445.tgz#04f2863e4a82a16a3f31f69535757d0077418899" + integrity sha512-kqUdNGh0oxHOM8UcMzxXW6EiDq6rSaAR3TGXam+HcLPyid9U5rPGUn0+476vtoiwH/mOrjKXRWEZJ0DsdfhnFw== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" -"@parcel/runtime-js@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/runtime-js/-/runtime-js-2.0.0-nightly.444.tgz#c466f4237460518826ea96117438fae7cee3a407" - integrity sha512-k6hbNdxBptsg3AYztDNoeLlQ2FV/RbIM+qCADYslynIYFRJv8BiXQwOwusioUTscUVvFqfOHFxq67eOhLPYjpw== +"@parcel/runtime-js@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/runtime-js/-/runtime-js-2.0.0-nightly.445.tgz#da86efc2f7c05ce0b6fd1f2d7c7935434f088b9c" + integrity sha512-/8HEZVm9Kc/mXM/wS3vyQxU3XLwKq/zEMiX8dKmWIrgFyqHBnKg06Xru1665mj1vhgpw1Viwr5DfrdjYVbuVVg== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" nullthrows "^1.1.1" -"@parcel/runtime-react-refresh@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.0.0-nightly.444.tgz#99fbbab6da0859a08661e8eeaad06e9e4870f081" - integrity sha512-HS+aGPvVg9LlkPiBiBvhMV4b8tanEiy++V5E7weOjqMMfVxHZsJDg6Q1MKyedsgC4rvk2v5jmFsbgqk0hbjBag== +"@parcel/runtime-react-refresh@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.0.0-nightly.445.tgz#ef0edf335e69c0c659213de7445242373fa62390" + integrity sha512-4V8Hf3XumyPcfKRehf8/3mfTZduuWWN/tz+A4fh/9WRh9u6Hz1ozAbTjS/fpd78HnzK5BUIglUkvMyD5inhxoQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" react-refresh "^0.9.0" -"@parcel/scope-hoisting@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/scope-hoisting/-/scope-hoisting-2.0.0-nightly.444.tgz#1c46e31469259f489ab4c1e8d89a27231d4c4ec2" - integrity sha512-lHBWPFnWrqusp1XPvTqJaa4oSFALrjvsj9Ae31qJOStsbOxrpJCzJPl6+sJfmYSjH2IizwlQjWiXq4PKrq1tRQ== +"@parcel/scope-hoisting@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/scope-hoisting/-/scope-hoisting-2.0.0-nightly.445.tgz#bfe8f3bc4b5020e71df0d5845944c00136783277" + integrity sha512-+S9Ud91ONAQzG/F6LTOyrZwNGXeT394vrI6/FqAtVVqnHWZXK6JmN26kPnou+8SB8oxkMbzGhMxzoft7mORQVQ== dependencies: "@babel/generator" "^7.3.3" "@babel/parser" "^7.0.0" "@babel/template" "^7.4.0" "@babel/traverse" "^7.2.3" "@babel/types" "^7.3.3" - "@parcel/babel-ast-utils" "2.0.0-nightly.2066+e2136965" - "@parcel/babylon-walk" "2.0.0-nightly.2066+e2136965" - "@parcel/diagnostic" "2.0.0-nightly.444+e2136965" + "@parcel/babel-ast-utils" "2.0.0-nightly.2067+adb92ee0" + "@parcel/babylon-walk" "2.0.0-nightly.2067+adb92ee0" + "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" nullthrows "^1.1.1" "@parcel/source-map@2.0.0-alpha.4.16": @@ -2616,10 +2616,10 @@ node-addon-api "^3.0.0" node-gyp-build "^4.2.2" -"@parcel/transformer-babel@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/transformer-babel/-/transformer-babel-2.0.0-nightly.444.tgz#c88446ceda04674c7552cbd4e96bfb5bf8c11dbe" - integrity sha512-/ADoA06rrvZN66/Xod8Fsy0xT/N6azn1XT9CoM0G2saXPyN9xpJINbTIT2tfci8zq8vdLoJGfpnP2MOYQyo38A== +"@parcel/transformer-babel@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/transformer-babel/-/transformer-babel-2.0.0-nightly.445.tgz#b12affbcd5df92597d91e8d404698fd7add574b0" + integrity sha512-+vf48c1BLe/4GAz7XXARc9+O92yhQVELmmFOX5uV1dnNy1bdSg6Ek7Ln/uHe3iabcMJF4YbYKBKXJMWiUdalWw== dependencies: "@babel/core" "^7.0.0" "@babel/generator" "^7.0.0" @@ -2629,85 +2629,85 @@ "@babel/preset-env" "^7.0.0" "@babel/preset-react" "^7.0.0" "@babel/traverse" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2066+e2136965" - "@parcel/babel-preset-env" "2.0.0-nightly.444+e2136965" - "@parcel/plugin" "2.0.0-nightly.444+e2136965" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/babel-ast-utils" "2.0.0-nightly.2067+adb92ee0" + "@parcel/babel-preset-env" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" browserslist "^4.6.6" core-js "^3.2.1" nullthrows "^1.1.1" semver "^5.7.0" -"@parcel/transformer-coffeescript@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/transformer-coffeescript/-/transformer-coffeescript-2.0.0-nightly.444.tgz#abf0cb23a431084efae9752579db883fcc24033a" - integrity sha512-3KBX8NP6I3O4wnxC3mkqvgcOinKQIf4vmjlQryMysUKZt7rK8451J3PHQqVwlzK3ALHvLsWTC7I0JmXFR4hwUg== +"@parcel/transformer-coffeescript@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/transformer-coffeescript/-/transformer-coffeescript-2.0.0-nightly.445.tgz#b109291ec5d289cc3c02b3897aef64cb00a43358" + integrity sha512-81z83poTX4ZsoA7QnW0RqIsP7WXHsIz9X3+IXW78Gm12lmgXOXGD/cSY6QtlBi4oqFxtiE9gVgEWety4j8qcgw== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" coffeescript "^2.0.3" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-css@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/transformer-css/-/transformer-css-2.0.0-nightly.444.tgz#d9c3c83b5b5b87faa721254031b91d8f5da3a091" - integrity sha512-dxXsV4kAdRGRcdzALOEXG1rsV1Y270F17y2k6HdKRcsashOkAiEr3AxKkj3i8y3ztfnQleQcyr+TXX8ErX/EPg== +"@parcel/transformer-css@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/transformer-css/-/transformer-css-2.0.0-nightly.445.tgz#5c443563ae8e005af6be424b0de9ec5f81560ed6" + integrity sha512-g0tCf/U5PDVjbttEfS0OipXYkcJ9AgibkWt4K4BtP8q6t+lctB71eyinHamcNHFJoi/mKW0EzlObBER9pIV+4w== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" postcss "^8.0.5" postcss-value-parser "^4.1.0" semver "^5.4.1" -"@parcel/transformer-glsl@2.0.0-nightly.2066+e2136965": - version "2.0.0-nightly.2066" - resolved "https://registry.yarnpkg.com/@parcel/transformer-glsl/-/transformer-glsl-2.0.0-nightly.2066.tgz#e9a010dfa6da01decabd8c182a9c7e604b83a1a6" - integrity sha512-lLuoWjTS3Z+DHW4HSNnkFh6uG62gcxMjWRERlsozIzW9h3M86tYn/o8otd1veZfKQAj33cCmcSJ6VMSCsXlB2w== +"@parcel/transformer-glsl@2.0.0-nightly.2067+adb92ee0": + version "2.0.0-nightly.2067" + resolved "https://registry.yarnpkg.com/@parcel/transformer-glsl/-/transformer-glsl-2.0.0-nightly.2067.tgz#11599d0f5804e1503f8e28e750b260c8bbc08cd1" + integrity sha512-IG0dggCM8R3EycMmMgT3BAhtIENfLf2FsaMGFlTiKcF71IXn9JPLjjbx+Yn5yASJyAHP0dWgycw4xCjrxxg5yA== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" -"@parcel/transformer-graphql@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/transformer-graphql/-/transformer-graphql-2.0.0-nightly.444.tgz#f307aef9fe2f8286ee34487d419d2398257edb6f" - integrity sha512-rT7AANVXFdhv+URURKvNGc7EyH4lsaQp5528BxN6lQ+LfmG9sjN7ZVcUp1YU0enm3ul4fiv1AUCFJhfCFgXNBA== +"@parcel/transformer-graphql@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/transformer-graphql/-/transformer-graphql-2.0.0-nightly.445.tgz#fe311396f080a605810625fcaaa5a2238c2a74f6" + integrity sha512-i+lkzhzUp7DAOZeCWZbsa83+abzLRmijxMYVkMRKer8yaDNDlcqWfCVbzAcVFBI/wc6/mQ2nA/1erhePjqwfTA== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" -"@parcel/transformer-html@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/transformer-html/-/transformer-html-2.0.0-nightly.444.tgz#525c8dd1d18347f3434f642f5a5867e8f43fa5ad" - integrity sha512-rZJOvDpNPdDq6dNroY86ofeDJQDV0N2z81dk1itR44lyWS/W6Xu4Nx1x7zp6bK/CMzoF6rk6mEATo1D0neEzlw== +"@parcel/transformer-html@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/transformer-html/-/transformer-html-2.0.0-nightly.445.tgz#561136797d7c6c476ab607f881dab34ca1b89d9e" + integrity sha512-sL1clzjug9xs25HN8VKyUnxKc1/wDfa9GBZNPUN7cysmbCCWGvPNiYd7LWp8EihMj+vEbyZ27rMF/hz6iN77UA== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" nullthrows "^1.1.1" posthtml "^0.11.3" posthtml-parser "^0.4.1" posthtml-render "^1.1.5" semver "^5.4.1" -"@parcel/transformer-image@2.0.0-nightly.2066+e2136965": - version "2.0.0-nightly.2066" - resolved "https://registry.yarnpkg.com/@parcel/transformer-image/-/transformer-image-2.0.0-nightly.2066.tgz#2919e3d84003c50aac70492bc1d24d3dc61578d7" - integrity sha512-NzEvG5JidDx71YlvmqM6jiQsUOEtfCvKdbGVXxiLj6GVrjtILwMhu1A3BI5f5ltasmCOa6q2ZlNnsxSuBOtiOg== +"@parcel/transformer-image@2.0.0-nightly.2067+adb92ee0": + version "2.0.0-nightly.2067" + resolved "https://registry.yarnpkg.com/@parcel/transformer-image/-/transformer-image-2.0.0-nightly.2067.tgz#2ed9c82340861742466235e3adef342f61b2c553" + integrity sha512-9b/539/IUMu/JAAzrwRP+1rZ5c1jcrobOY3hfT6gPc9dYsZPg6GAI5Zgri8k+D769Y/nxVzT3wHjx4asjOTy1g== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" -"@parcel/transformer-inline-string@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.0.0-nightly.444.tgz#b80d88074a5d10e44ac4287cbf7803283c6cdd6b" - integrity sha512-/OCAydewYjYaUKJwjBLOoRjqEvTZnqqZX3M75f9WhoaILoVqBZzX1HwSxkm5JG7UPc9252rCfLLY0H3MjreQGA== +"@parcel/transformer-inline-string@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.0.0-nightly.445.tgz#4646777d25bad1964ceef442d45e2d1701a31d25" + integrity sha512-5q4+7gMhDMDXZrrDFGc7BSAr59bE9Mh6lYfqF4pPK70Gr5L5+ntUMGtscySnRl7IoIMd2T59SuHWZjxHdfNWHg== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" -"@parcel/transformer-js@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.0.0-nightly.444.tgz#b3c9e90a1c461ba382d69c646cc2311f1217e9ca" - integrity sha512-/IpSYzhdBMwPuytsjCBYq5YrwatHeVhn2Hk+oa0YYnLuAwRqrVlDYuFGto1afmOsHNYlbt56ME8p2WNQu0BF3Q== +"@parcel/transformer-js@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.0.0-nightly.445.tgz#8fbae7bfb3b2a9a76a47219dcafd38948e4311c1" + integrity sha512-6/FN3GyBJAAsI5qR5rL1GNxdRCvnQli4p3lGvT2CGQZvy6FpScSw4KrtAKUzcGSTuJJM7P1fXkN0RYeR5RpD8w== dependencies: "@babel/core" "^7.0.0" "@babel/generator" "^7.0.0" @@ -2716,193 +2716,193 @@ "@babel/template" "^7.4.0" "@babel/traverse" "^7.0.0" "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2066+e2136965" - "@parcel/babylon-walk" "2.0.0-nightly.2066+e2136965" - "@parcel/diagnostic" "2.0.0-nightly.444+e2136965" - "@parcel/plugin" "2.0.0-nightly.444+e2136965" - "@parcel/scope-hoisting" "2.0.0-nightly.444+e2136965" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/babel-ast-utils" "2.0.0-nightly.2067+adb92ee0" + "@parcel/babylon-walk" "2.0.0-nightly.2067+adb92ee0" + "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/scope-hoisting" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" micromatch "^4.0.2" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-json@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/transformer-json/-/transformer-json-2.0.0-nightly.444.tgz#d2775cb08cb3e40e04ee173d86dae4dd33ab566a" - integrity sha512-DsdsFngJpq4j8TgGFGaP2DiQQHN1E8mQDDGvgJFcNjxAESYaVvWOXXANLdNA5pfnSnZP94BcdTb67ZU5a870kA== +"@parcel/transformer-json@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/transformer-json/-/transformer-json-2.0.0-nightly.445.tgz#7a2218d38d392ef125f938c6093f7ef89d6fcda6" + integrity sha512-skEW2uwFs3NYSv56Nwa16rqKVnApYHbMrjv2DnuiNhlY3JP+f03aTvdYxtvoB8aQni5HzMUm68aRnBH+rEqypg== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" json5 "^2.1.0" -"@parcel/transformer-jsonld@2.0.0-nightly.2066+e2136965": - version "2.0.0-nightly.2066" - resolved "https://registry.yarnpkg.com/@parcel/transformer-jsonld/-/transformer-jsonld-2.0.0-nightly.2066.tgz#30321d699974c74fd595bf91f4b3675611982683" - integrity sha512-tt/avA5iW5HgxTkqubzhDtCpgrsR8VMddVDtuaB1S3fWUJkC25gDcyLabPWQ4HjQKQeRMtQ3HdRSJGFEY33OWQ== +"@parcel/transformer-jsonld@2.0.0-nightly.2067+adb92ee0": + version "2.0.0-nightly.2067" + resolved "https://registry.yarnpkg.com/@parcel/transformer-jsonld/-/transformer-jsonld-2.0.0-nightly.2067.tgz#b45351918734cd1b8a39ebae224bdc29db47bd9b" + integrity sha512-nppjkCAqGTVyHDUgKmBIfTfKsiARpiVA1TCN9T2QBbW8FNU0duFDZBF+++NfH2pLtOt2KbRk7dRE/fimpMjAxA== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" - "@parcel/types" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/types" "2.0.0-nightly.445+adb92ee0" json5 "^2.1.2" -"@parcel/transformer-less@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/transformer-less/-/transformer-less-2.0.0-nightly.444.tgz#f356264dd5c4f0904a7b5d74d645bc51ae0c3857" - integrity sha512-rlAqR/Kxu6qBfkAhgDSkQClWYl+Oy0bIUJ8f8RGbj+EltCAUeUpVzM1V4/Cf1pskx2dA/ddbzU6HNPnTLnw4QQ== +"@parcel/transformer-less@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/transformer-less/-/transformer-less-2.0.0-nightly.445.tgz#400612ba75ca3546b59c56807aaab415b751e27c" + integrity sha512-EjGK2ZsbGHQc5YD6CIVdVZn9hmL7sTM8SjuRU0/CFgKVQh3NI0e8vVjfA4UnMgRAsVAxFKDiyIc10pZuRrTBEQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" "@parcel/source-map" "2.0.0-alpha.4.16" -"@parcel/transformer-mdx@2.0.0-nightly.2066+e2136965": - version "2.0.0-nightly.2066" - resolved "https://registry.yarnpkg.com/@parcel/transformer-mdx/-/transformer-mdx-2.0.0-nightly.2066.tgz#6e198221e557e45cc69aa52967d6e08b77297fc6" - integrity sha512-vUlLXliFLswYEyluM3UnFlWJBP1UWTP0PsFAji9JnSgwJjJdd8VN2ionUgfxt127GCa2207nEwoCKFJndxRXaw== +"@parcel/transformer-mdx@2.0.0-nightly.2067+adb92ee0": + version "2.0.0-nightly.2067" + resolved "https://registry.yarnpkg.com/@parcel/transformer-mdx/-/transformer-mdx-2.0.0-nightly.2067.tgz#4ac94a9a33c495ede3638d036d493999d6624e96" + integrity sha512-tRIJLA2W6EmxXjjvBc37t8xASNaR0ZmmFc4K0LmJbiO5kuHWfOjuw/npq6p+TShYUUZYTSgeVsN9HolCDw/v4g== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" -"@parcel/transformer-postcss@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/transformer-postcss/-/transformer-postcss-2.0.0-nightly.444.tgz#1edaef51580df346e615008bd00b3cf603011ae1" - integrity sha512-lABqSvFMgwXc9GQk4ab4eACSZBoWWNQ29TM0ggyCMvWbmVCdRAyRWxcuihot1IeJseEW21/p3VzPwKvOViXE/A== +"@parcel/transformer-postcss@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/transformer-postcss/-/transformer-postcss-2.0.0-nightly.445.tgz#18fd18252b035192ef2b53a4029bd3f29a75e2b3" + integrity sha512-vGfrP0zkbwo7eMLQmWd29K6JAmoyKUMRt3U8fOE3KMxWTR4EwR/jAnv9qwimlz5GoEDne7dsBv1eHcrqpl50uQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" css-modules-loader-core "^1.1.0" nullthrows "^1.1.1" postcss-value-parser "^4.1.0" semver "^5.4.1" -"@parcel/transformer-posthtml@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/transformer-posthtml/-/transformer-posthtml-2.0.0-nightly.444.tgz#23b8a5476d88612200c0e21fc8e6491b8474c85c" - integrity sha512-dKfoy86FoDaPic9I7J3h6zGbUy0qrAmIDIQJDoIySrhYlgr1qgJTEgKFg5s2E4IIzmw4leCQzVNYCDmEBHq3Qg== +"@parcel/transformer-posthtml@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/transformer-posthtml/-/transformer-posthtml-2.0.0-nightly.445.tgz#49d26ae8bf6f0d210066517972315fbb45a36a2b" + integrity sha512-jTUj+zyXKCTNgnJHNOKgjzmJgpcbmQgPEnac8TEwrW1iENaAxU+6gUChczf9xyzLpsV3WRT/4F8UheSiTqbpvw== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" nullthrows "^1.1.1" posthtml "^0.11.3" posthtml-parser "^0.4.1" posthtml-render "^1.1.5" semver "^5.4.1" -"@parcel/transformer-pug@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/transformer-pug/-/transformer-pug-2.0.0-nightly.444.tgz#194e02ec75d79360096db41fde133f3f6f542c6b" - integrity sha512-Z9W/PmpRG+MPUEi83tr2hUZ7sS42QHuWxo+7N0ODQ+oCiSnZjWWhMgOWnuXkqkTK49J8ELIkzMkX8qm21Yk4qg== +"@parcel/transformer-pug@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/transformer-pug/-/transformer-pug-2.0.0-nightly.445.tgz#a3df420a1bcb441381fb291e8d81b53be61ae3d0" + integrity sha512-0oMbtawueZgnWVRUxUZNBSZipfJ5IpzIDE++PnIkqChSukVHNtCaYuSYrsButDSmJ1R9lcbCfwGD6jKYiNGqtQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" -"@parcel/transformer-raw@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/transformer-raw/-/transformer-raw-2.0.0-nightly.444.tgz#d4a83b228310aa8ecf6e1d9bd85fbc38f9c57eb8" - integrity sha512-aKfHRTttYOG+084n8O/H6lG4bfg54Lfxl20/hg6NY2bANrfFKUz/2pvRxnv5zr24Wt4hvDKSuyfVnos6uw4i6g== +"@parcel/transformer-raw@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/transformer-raw/-/transformer-raw-2.0.0-nightly.445.tgz#ae26126a6e9100a0c2422f9bfdd205fe78b3b715" + integrity sha512-EpmlvQmEo0Efiq8UXw5zBB7N+cOUP8/2jT+Q3fTRO5dCwhVury/kE1dauApcrCoeUWyWNEyE19cQCirrdeNbZQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" -"@parcel/transformer-react-refresh-babel@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-babel/-/transformer-react-refresh-babel-2.0.0-nightly.444.tgz#e34a1e5fb5023bfcfc5ced3727153c9a43732f7a" - integrity sha512-G9coZvaKEUwZLvzxQ66FOw9/KLNeKdSN2v7LeFG0V1SZ+pXOV7FWnEmTKF6cbBt4BCdin6QxncUNKKSL9vI+mw== +"@parcel/transformer-react-refresh-babel@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-babel/-/transformer-react-refresh-babel-2.0.0-nightly.445.tgz#742e48f22fc9bb1418bb0e75217f44276b0f6283" + integrity sha512-3bY1JfS2m/4yXQEO5Lu7IAGcWmAyGu5KzGAtNXlC9lQRB2xSkNaSDuuIaj2XdQ3MmJUssnwUNjI2J+BQO+/2HA== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" react-refresh "^0.9.0" -"@parcel/transformer-react-refresh-wrap@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.0.0-nightly.444.tgz#8ea823786dab7f595c6dbadf1661f44131d766f6" - integrity sha512-iLZpR/CiMyNwGGIV+sJvfk+OkhFT372UBxDb2PdApp+2hVMAW97pwGb+X+Uz3dehvXoJtXDhWqT1OIXq09Yjkg== +"@parcel/transformer-react-refresh-wrap@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.0.0-nightly.445.tgz#0290c472f753b2b313dc2d04b75304513bec4911" + integrity sha512-9+97jl4sGdyMXKcVyqEQiHPdPjkyIa5bDWxGCuZ3JuefrTrFcghHTTl7Q/BenFV/m0iBkqmaQ5fFGmAUQWZ1OQ== dependencies: "@babel/generator" "^7.0.0" "@babel/parser" "^7.0.0" "@babel/template" "^7.4.0" "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2066+e2136965" - "@parcel/plugin" "2.0.0-nightly.444+e2136965" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/babel-ast-utils" "2.0.0-nightly.2067+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" react-refresh "^0.9.0" semver "^5.4.1" -"@parcel/transformer-sass@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sass/-/transformer-sass-2.0.0-nightly.444.tgz#99a17fcf1107cc213a215ead7862f9795fa7cf34" - integrity sha512-0L8Ld2UdoCgslw5YEm+5TSqBcLgjdvW3paJv/y6d9d2Rqq6ol5x1aIeQ5lEELI6f4RgPaAcik2UIQzxhvW54og== +"@parcel/transformer-sass@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/transformer-sass/-/transformer-sass-2.0.0-nightly.445.tgz#8d2e998f637ecb691f6f6c0062ccf2fdc74b04cf" + integrity sha512-Hioyt64523DpDq2dMK1Ww8PFyvnyReuTSuwEi4TCgXeZsUX0cmwZILe0X1e/nhYUsPZMPjnnQL3qnRNoxK3cVg== dependencies: - "@parcel/fs" "2.0.0-nightly.444+e2136965" - "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/fs" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" -"@parcel/transformer-stylus@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/transformer-stylus/-/transformer-stylus-2.0.0-nightly.444.tgz#e7ea63c0fff39064dfb4788b5c6db6f76be5a054" - integrity sha512-dUfoeeWYivV1yPUWB6fGFzhyags1jPe0i1CKrsSgRkQ7vOEUZi7zWlJ1bZyUMBlZvNDDL8TQ0eEjvAb5Jx3DzQ== +"@parcel/transformer-stylus@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/transformer-stylus/-/transformer-stylus-2.0.0-nightly.445.tgz#b1d96c46207300a66e55c37fd9876f9550bc9f45" + integrity sha512-y1/dkOu37IwODQhKo0Bp01ouToO4OwTHO1Ibs6gojqTsc2T7ac0SeX02J20K1bmYvucj9rT/y4yyWuW6xk49KA== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" -"@parcel/transformer-sugarss@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sugarss/-/transformer-sugarss-2.0.0-nightly.444.tgz#f9502ababfd319278b39a7a27d11229534f45d10" - integrity sha512-MI0+tx8RbyBy0fYgCRDm0wSox7Uz3UkP/4WuUszOWuPpBM1y00bq+fbiEm/aaiX2UGMsncXPaNjbTHkeCJD0Yg== +"@parcel/transformer-sugarss@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/transformer-sugarss/-/transformer-sugarss-2.0.0-nightly.445.tgz#745d8862f895b3a98dc30f4be21f9a043994a639" + integrity sha512-256XNk0p8Kd5tEEVRN7KjGq+NDlNr+CrqFUAuNdr2C4tnxB+DrtNLRXh16UDdfD3jgWOxLHp4rmFjnqpLBHEHA== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" postcss "^8.0.5" -"@parcel/transformer-toml@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/transformer-toml/-/transformer-toml-2.0.0-nightly.444.tgz#679faef0dcc7b67b0435e152ac9a75e09b006226" - integrity sha512-ad0iwx3K47r/EiatDGI0p/P8h/COKUcgwmbJFNVuVi9Aj6uueoNTQS/Sqto1Y+a/ZQZrWMUxnNei/JcYTG09gA== +"@parcel/transformer-toml@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/transformer-toml/-/transformer-toml-2.0.0-nightly.445.tgz#fd179834e5ff0b8219eeb926e41de0b08b05ce7c" + integrity sha512-wGTqFwVI4is8O3JWEvSDTk7Z/U58DlEHB49C2CwqR0xVSjCQbKuFt+fLOSaEhs7D4lTcr9U1dBwwXRgA38yBJg== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" -"@parcel/transformer-typescript-types@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.0.0-nightly.444.tgz#f05a2280ce0cf99afceee6303bc8eb969c7ce244" - integrity sha512-kxUbCuemWLKnu3xqd/hEnLvbjf9AhLnc+RN7aA6EXAmXJ+K0Q/jWrXw+3B2enLtNEjrZ8Ig+6MrThpWIIpgKJw== +"@parcel/transformer-typescript-types@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.0.0-nightly.445.tgz#8dc435fdea20a1b8e84e48ce78762c4c5b0dcf45" + integrity sha512-NtcZOYLoSpoV3oVLxEDDGfZhziMKQS/znOxwVrNgy04pens2cQ028Tj42sdjL05V8vUEf3kVXVZlZGSyHFQhQQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/ts-utils" "2.0.0-nightly.444+e2136965" + "@parcel/ts-utils" "2.0.0-nightly.445+adb92ee0" nullthrows "^1.1.1" -"@parcel/transformer-vue@2.0.0-nightly.2066+e2136965": - version "2.0.0-nightly.2066" - resolved "https://registry.yarnpkg.com/@parcel/transformer-vue/-/transformer-vue-2.0.0-nightly.2066.tgz#8ab6d500ed5042f915392ce2e87fdbcdee34a2f9" - integrity sha512-nYxUCCodPkYgJy11/07YkHACJsepssEAkpvczdKBhWx5VLmvUksqdbYV90o+l9EcEXnV7hWjJHz/IYfFPROQDg== +"@parcel/transformer-vue@2.0.0-nightly.2067+adb92ee0": + version "2.0.0-nightly.2067" + resolved "https://registry.yarnpkg.com/@parcel/transformer-vue/-/transformer-vue-2.0.0-nightly.2067.tgz#41bf71f2e6d5189fe40e9eaacf9f7871a51992b9" + integrity sha512-O8Yn74mwz5fiws1vDsc13xtNyFIKL83vebs+SrW6ALZUJzIndQr2J8WRvic5C25WF2NEtnUni+dUlUAUKUqXdg== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.444+e2136965" - "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-yaml@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/transformer-yaml/-/transformer-yaml-2.0.0-nightly.444.tgz#40dec778624aa31090afe719070254f5170076b5" - integrity sha512-Qe54cAL4A2pfzfYJP1iOVwKexhiRwpRti+Ikw0HvmnLhu0nU5IyxZR9p1vFOATWFa4/VwmY4fbDJfsTPfWV//w== +"@parcel/transformer-yaml@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/transformer-yaml/-/transformer-yaml-2.0.0-nightly.445.tgz#e23988b79c50039d581b1753e32272645ed87771" + integrity sha512-V7kMbEPf5NAjAPWY4c2hezX4D23VhZwiDkFycFKD0f3SuDfnSVa/taZcH15h9cu6mAVl11X3w4X2R/v+RZhA6A== dependencies: - "@parcel/plugin" "2.0.0-nightly.444+e2136965" + "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" -"@parcel/ts-utils@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/ts-utils/-/ts-utils-2.0.0-nightly.444.tgz#9e03e724afb01f9bda2b697a3cd7787f8f046bcd" - integrity sha512-rGzGAjzssAPCdYWSBtg+XHCqnJw7BCg0pyqVJTI6UiHCOUpJ8sRLbt/M+VCZ4wGuSL2mnLe/+TTBdyvpuDs9+Q== +"@parcel/ts-utils@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/ts-utils/-/ts-utils-2.0.0-nightly.445.tgz#ff958629a2389184cb37eac5a14ee91fd30da5f2" + integrity sha512-gSsShUlj/zw/Ds9MmcbTkjsFbe0Il2MZhITc1U6ID1dUxdGVaRehhkCgwN8562L+rjS9ZRZUZACR7fTGiacSZA== dependencies: nullthrows "^1.1.1" -"@parcel/types@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/types/-/types-2.0.0-nightly.444.tgz#967d0dffe4b8f6a5e1b38cf28ebb19963a36bab4" - integrity sha512-aokJZ8sd+eSI/LuWVhVKSJUhNQanBDaq31jzIzwZUIrIUI9KAYTutdcm7mcbsXCRx6U27YhiuxCmL/XDGAdZTQ== +"@parcel/types@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/types/-/types-2.0.0-nightly.445.tgz#835026da93994a76a12e9066b48956b4a4e7e627" + integrity sha512-sY6fx7C7RAmfB6hSoVayRm2W5+TB04sLw8OK/aRDu5xiwAKX0h4ebUX+2G9EtGYKUF8gfhiQ6njt/f/SevXGdw== -"@parcel/utils@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-2.0.0-nightly.444.tgz#b177ea1de0d76d2eab9a83d8640e2f5d97c3375b" - integrity sha512-yq9T/ubJbtMhJXuK99Y1DG3VFMy6OwWFZH0J7W7pfULCTmSzt78eujbDWKvqzNLRKt2e4HebjRF+A11aZ3pu+A== +"@parcel/utils@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-2.0.0-nightly.445.tgz#fdeedba16af79b05ff61ced710ce479f154c4a09" + integrity sha512-srgHWtlvd8Jua7EmVvEBVvzO1ZDB8qIE0u677g39WDIBe7OAJ90ybHyV+zJZVRUD4JSEo4R7AFv3L7L4gkX3Mw== dependencies: "@iarna/toml" "^2.2.0" - "@parcel/codeframe" "2.0.0-nightly.444+e2136965" - "@parcel/diagnostic" "2.0.0-nightly.444+e2136965" - "@parcel/logger" "2.0.0-nightly.444+e2136965" - "@parcel/markdown-ansi" "2.0.0-nightly.444+e2136965" + "@parcel/codeframe" "2.0.0-nightly.445+adb92ee0" + "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" + "@parcel/logger" "2.0.0-nightly.445+adb92ee0" + "@parcel/markdown-ansi" "2.0.0-nightly.445+adb92ee0" "@parcel/source-map" "2.0.0-alpha.4.16" ansi-html "^0.0.7" chalk "^2.4.2" @@ -2927,14 +2927,14 @@ node-addon-api "^3.0.0" node-gyp-build "^4.2.1" -"@parcel/workers@2.0.0-nightly.444+e2136965": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-2.0.0-nightly.444.tgz#5ca32d0ac88338ffb761438d2336e4b730d2eed2" - integrity sha512-T1flEMHdzMLaMbVgJsZ13pT2/IChH4CnpEE7Fj2/axthMq7GHqmeVLiDDM/y6BEDEW/I3FvWHR2PjVpzGljWQw== +"@parcel/workers@2.0.0-nightly.445+adb92ee0": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-2.0.0-nightly.445.tgz#b3366b7c4abe4bcfaae954c4e9bb97727523d3c7" + integrity sha512-692D89hFYrqU36UxxA9VtVMzbGH4OXsWJshE1GibjurICJ8L149/pxu8v/oCsE/M8Ng1Hj9iIKdtiCrS6w6Z0w== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.444+e2136965" - "@parcel/logger" "2.0.0-nightly.444+e2136965" - "@parcel/utils" "2.0.0-nightly.444+e2136965" + "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" + "@parcel/logger" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" chrome-trace-event "^1.0.2" nullthrows "^1.1.1" @@ -10582,19 +10582,19 @@ parallel-transform@^1.1.0: inherits "^2.0.3" readable-stream "^2.1.5" -parcel@2.0.0-nightly.442: - version "2.0.0-nightly.442" - resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.0.0-nightly.442.tgz#4d776ab4ba1e371809b983bec9ccf65aa88ce0e7" - integrity sha512-v7OrOEJujFS4BkDx1SGTfXqL4abIuhT0DYP5oenZ5Ump/jmeOYUlDv4L/reds7kOanFKIu5xiA6yR0JOTUwmuQ== - dependencies: - "@parcel/config-default" "2.0.0-nightly.444+e2136965" - "@parcel/core" "2.0.0-nightly.442+e2136965" - "@parcel/diagnostic" "2.0.0-nightly.444+e2136965" - "@parcel/events" "2.0.0-nightly.444+e2136965" - "@parcel/fs" "2.0.0-nightly.444+e2136965" - "@parcel/logger" "2.0.0-nightly.444+e2136965" - "@parcel/package-manager" "2.0.0-nightly.444+e2136965" - "@parcel/utils" "2.0.0-nightly.444+e2136965" +parcel@2.0.0-nightly.443: + version "2.0.0-nightly.443" + resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.0.0-nightly.443.tgz#40f709a86acf1a6c44db6dd60ef3e9006abe3fb1" + integrity sha512-teFdXNFYWh77eBc86RVHdeKTUJch+mU51/2r2Djn75qqXglgxG5gSn613Ul52YxEjaRjI7MeZzqtY5EeaAaJTA== + dependencies: + "@parcel/config-default" "2.0.0-nightly.445+adb92ee0" + "@parcel/core" "2.0.0-nightly.443+adb92ee0" + "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" + "@parcel/events" "2.0.0-nightly.445+adb92ee0" + "@parcel/fs" "2.0.0-nightly.445+adb92ee0" + "@parcel/logger" "2.0.0-nightly.445+adb92ee0" + "@parcel/package-manager" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.445+adb92ee0" chalk "^2.1.0" commander "^2.19.0" get-port "^4.2.0" From 24de5774379b7258f3629448a760b86613acc397 Mon Sep 17 00:00:00 2001 From: Andrii Radyk Date: Tue, 10 Nov 2020 02:20:10 +0100 Subject: [PATCH 094/314] feat(cloudwatch): different view types in GraphWidget (#11160) Allow to customise different view types in GraphWidget. The default behavior is backward compatible. Closes #11063 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-cloudwatch/README.md | 11 ++++++++ packages/@aws-cdk/aws-cloudwatch/lib/graph.ts | 28 ++++++++++++++++++- .../aws-cloudwatch/test/test.graphs.ts | 26 ++++++++++++++++- 3 files changed, 63 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudwatch/README.md b/packages/@aws-cdk/aws-cloudwatch/README.md index 82b9bd250b31b..85d62de4f119c 100644 --- a/packages/@aws-cdk/aws-cloudwatch/README.md +++ b/packages/@aws-cdk/aws-cloudwatch/README.md @@ -287,6 +287,17 @@ dashboard.addWidgets(new GraphWidget({ })); ``` +The graph view can be changed from default 'timeSeries' to 'bar' or 'pie'. + +```ts +dashboard.addWidgets(new GraphWidget({ + // ... + // ... + + view: GraphWidgetView.BAR, +})); +``` + ### Alarm widget An alarm widget shows the graph and the alarm line of a single alarm: diff --git a/packages/@aws-cdk/aws-cloudwatch/lib/graph.ts b/packages/@aws-cdk/aws-cloudwatch/lib/graph.ts index 56e5de94d2acd..51cc7690785bf 100644 --- a/packages/@aws-cdk/aws-cloudwatch/lib/graph.ts +++ b/packages/@aws-cdk/aws-cloudwatch/lib/graph.ts @@ -121,6 +121,24 @@ export class AlarmWidget extends ConcreteWidget { } } +/** + * Types of view + */ +export enum GraphWidgetView { + /** + * Display as a line graph. + */ + TIME_SERIES = 'timeSeries', + /** + * Display as a bar graph. + */ + BAR = 'bar', + /** + * Display as a pie graph. + */ + PIE = 'pie', +} + /** * Properties for a GraphWidget */ @@ -187,6 +205,14 @@ export interface GraphWidgetProps extends MetricWidgetProps { * @default false */ readonly liveData?: boolean; + + + /** + * Display this metric + * + * @default TimeSeries + */ + readonly view?: GraphWidgetView; } /** @@ -214,7 +240,7 @@ export class GraphWidget extends ConcreteWidget { x: this.x, y: this.y, properties: { - view: 'timeSeries', + view: this.props.view ?? GraphWidgetView.TIME_SERIES, title: this.props.title, region: this.props.region || cdk.Aws.REGION, stacked: this.props.stacked, diff --git a/packages/@aws-cdk/aws-cloudwatch/test/test.graphs.ts b/packages/@aws-cdk/aws-cloudwatch/test/test.graphs.ts index 414d2677836bc..2ca9593581f9f 100644 --- a/packages/@aws-cdk/aws-cloudwatch/test/test.graphs.ts +++ b/packages/@aws-cdk/aws-cloudwatch/test/test.graphs.ts @@ -1,6 +1,6 @@ import { Stack } from '@aws-cdk/core'; import { Test } from 'nodeunit'; -import { Alarm, AlarmWidget, Color, GraphWidget, LegendPosition, LogQueryWidget, Metric, Shading, SingleValueWidget, LogQueryVisualizationType } from '../lib'; +import { Alarm, AlarmWidget, Color, GraphWidget, GraphWidgetView, LegendPosition, LogQueryWidget, Metric, Shading, SingleValueWidget, LogQueryVisualizationType } from '../lib'; export = { 'add stacked property to graphs'(test: Test) { @@ -86,6 +86,30 @@ export = { test.done(); }, + 'bar view'(test: Test) { + // WHEN + const stack = new Stack(); + const widget = new GraphWidget({ + title: 'Test widget', + view: GraphWidgetView.BAR, + }); + + // THEN + test.deepEqual(stack.resolve(widget.toJson()), [{ + type: 'metric', + width: 6, + height: 6, + properties: { + view: 'bar', + title: 'Test widget', + region: { Ref: 'AWS::Region' }, + yAxis: {}, + }, + }]); + + test.done(); + }, + 'singlevalue widget'(test: Test) { // GIVEN const stack = new Stack(); From 4b4d0114e849ad96fccafd4cebb0edbead83ed83 Mon Sep 17 00:00:00 2001 From: Yusuke Wada Date: Tue, 10 Nov 2020 13:45:32 +0900 Subject: [PATCH 095/314] fix(appsync): HttpDataSource extends BackedDataSource instead of BaseDataSource (#11185) BackedDataSource make Grantable HttpDataSource. I think this pr allows better use of the iam config: https://github.com/aws/aws-cdk/pull/10171 fixes #11183 --- .../@aws-cdk/aws-appsync/lib/data-source.ts | 2 +- packages/@aws-cdk/aws-appsync/package.json | 3 +- .../aws-appsync/test/appsync-http.test.ts | 73 ++++++++++++++++++- 3 files changed, 75 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/aws-appsync/lib/data-source.ts b/packages/@aws-cdk/aws-appsync/lib/data-source.ts index e13136090b56c..cb6c42de28f14 100644 --- a/packages/@aws-cdk/aws-appsync/lib/data-source.ts +++ b/packages/@aws-cdk/aws-appsync/lib/data-source.ts @@ -246,7 +246,7 @@ export interface HttpDataSourceProps extends BaseDataSourceProps { /** * An AppSync datasource backed by a http endpoint */ -export class HttpDataSource extends BaseDataSource { +export class HttpDataSource extends BackedDataSource { constructor(scope: Construct, id: string, props: HttpDataSourceProps) { const authorizationConfig = props.authorizationConfig ? { authorizationType: 'AWS_IAM', diff --git a/packages/@aws-cdk/aws-appsync/package.json b/packages/@aws-cdk/aws-appsync/package.json index 699aec7a504c5..e68c325f6dd6b 100644 --- a/packages/@aws-cdk/aws-appsync/package.json +++ b/packages/@aws-cdk/aws-appsync/package.json @@ -77,7 +77,8 @@ "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", "jest": "^26.6.3", - "pkglint": "0.0.0" + "pkglint": "0.0.0", + "@aws-cdk/aws-stepfunctions": "0.0.0" }, "dependencies": { "@aws-cdk/aws-cognito": "0.0.0", diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-http.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-http.test.ts index fbc9b7bc85c33..6484da2013921 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-http.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-http.test.ts @@ -1,5 +1,6 @@ import '@aws-cdk/assert/jest'; import * as path from 'path'; +import * as sfn from '@aws-cdk/aws-stepfunctions'; import * as cdk from '@aws-cdk/core'; import * as appsync from '../lib'; @@ -86,6 +87,76 @@ describe('Http Data Source configuration', () => { }); }); + test('other aws resources can grant http data source', () => { + // WHEN + const machineArn = 'arn:aws:states:us-east-1::stateMachine:hello'; + const machine = sfn.StateMachine.fromStateMachineArn(stack, 'importedMachine', machineArn); + const ds = api.addHttpDataSource('ds', endpoint, { + name: 'custom', + description: 'custom description', + authorizationConfig: { + signingRegion: 'us-east-1', + signingServiceName: 'states', + }, + }); + machine.grantRead(ds); + + + // THEN + expect(stack).toHaveResourceLike('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ + { + Action: [ + 'states:ListExecutions', + 'states:ListStateMachines', + ], + Effect: 'Allow', + Resource: machineArn, + }, + { + Action: [ + 'states:DescribeExecution', + 'states:DescribeStateMachineForExecution', + 'states:GetExecutionHistory', + ], + Effect: 'Allow', + Resource: { + 'Fn::Join': [ + '', + [ + 'arn:', + { + Ref: 'AWS::Partition', + }, + ':states:', + { + Ref: 'AWS::Region', + }, + ':', + { + Ref: 'AWS::AccountId', + }, + ':execution:hello:*', + ], + ], + }, + }, + { + Action: [ + 'states:ListActivities', + 'states:DescribeStateMachine', + 'states:DescribeActivity', + ], + Effect: 'Allow', + Resource: '*', + }, + ], + Version: '2012-10-17', + }, + }); + }); + test('appsync errors when creating multiple http data sources with no configuration', () => { // THEN expect(() => { @@ -93,6 +164,7 @@ describe('Http Data Source configuration', () => { api.addHttpDataSource('ds', endpoint); }).toThrow("There is already a Construct with name 'ds' in GraphqlApi [baseApi]"); }); + }); describe('adding http data source from imported api', () => { @@ -125,4 +197,3 @@ describe('adding http data source from imported api', () => { }); }); }); - From 8058b38a90529b7d5cf8bf6461bbe0f4f914620a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2020 05:19:02 +0000 Subject: [PATCH 096/314] chore(deps): bump @typescript-eslint/eslint-plugin from 4.6.1 to 4.7.0 (#11378) Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.6.1 to 4.7.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.7.0/packages/eslint-plugin) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- tools/cdk-build-tools/package.json | 2 +- yarn.lock | 61 +++++++++++++++++++++++------- 2 files changed, 49 insertions(+), 14 deletions(-) diff --git a/tools/cdk-build-tools/package.json b/tools/cdk-build-tools/package.json index 3aa024ae4127e..7edcf795f04b4 100644 --- a/tools/cdk-build-tools/package.json +++ b/tools/cdk-build-tools/package.json @@ -39,7 +39,7 @@ "pkglint": "0.0.0" }, "dependencies": { - "@typescript-eslint/eslint-plugin": "^4.6.1", + "@typescript-eslint/eslint-plugin": "^4.7.0", "@typescript-eslint/parser": "^4.6.1", "eslint-plugin-cdk": "0.0.0", "awslint": "0.0.0", diff --git a/yarn.lock b/yarn.lock index 9b3a1ba3e3604..be4190620c931 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3283,28 +3283,28 @@ resolved "https://registry.yarnpkg.com/@types/yarnpkg__lockfile/-/yarnpkg__lockfile-1.1.4.tgz#445251eb00bd9c1e751f82c7c6bf4f714edfd464" integrity sha512-/emrKCfQMQmFCqRqqBJ0JueHBT06jBRM3e8OgnvDUcvuExONujIk2hFA5dNsN9Nt41ljGVDdChvCydATZ+KOZw== -"@typescript-eslint/eslint-plugin@^4.6.1": - version "4.6.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.6.1.tgz#99d77eb7a016fd5a5e749d2c44a7e4c317eb7da3" - integrity sha512-SNZyflefTMK2JyrPfFFzzoy2asLmZvZJ6+/L5cIqg4HfKGiW2Gr1Go1OyEVqne/U4QwmoasuMwppoBHWBWF2nA== +"@typescript-eslint/eslint-plugin@^4.7.0": + version "4.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.7.0.tgz#85c9bbda00c0cb604d3c241f7bc7fb171a2d3479" + integrity sha512-li9aiSVBBd7kU5VlQlT1AqP0uWGDK6JYKUQ9cVDnOg34VNnd9t4jr0Yqc/bKxJr/tDCPDaB4KzoSFN9fgVxe/Q== dependencies: - "@typescript-eslint/experimental-utils" "4.6.1" - "@typescript-eslint/scope-manager" "4.6.1" + "@typescript-eslint/experimental-utils" "4.7.0" + "@typescript-eslint/scope-manager" "4.7.0" debug "^4.1.1" functional-red-black-tree "^1.0.1" regexpp "^3.0.0" semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@4.6.1": - version "4.6.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.6.1.tgz#a9c691dfd530a9570274fe68907c24c07a06c4aa" - integrity sha512-qyPqCFWlHZXkEBoV56UxHSoXW2qnTr4JrWVXOh3soBP3q0o7p4pUEMfInDwIa0dB/ypdtm7gLOS0hg0a73ijfg== +"@typescript-eslint/experimental-utils@4.7.0": + version "4.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.7.0.tgz#8d1058c38bec3d3bbd9c898a1c32318d80faf3c5" + integrity sha512-cymzovXAiD4EF+YoHAB5Oh02MpnXjvyaOb+v+BdpY7lsJXZQN34oIETeUwVT2XfV9rSNpXaIcknDLfupO/tUoA== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/scope-manager" "4.6.1" - "@typescript-eslint/types" "4.6.1" - "@typescript-eslint/typescript-estree" "4.6.1" + "@typescript-eslint/scope-manager" "4.7.0" + "@typescript-eslint/types" "4.7.0" + "@typescript-eslint/typescript-estree" "4.7.0" eslint-scope "^5.0.0" eslint-utils "^2.0.0" @@ -3326,11 +3326,24 @@ "@typescript-eslint/types" "4.6.1" "@typescript-eslint/visitor-keys" "4.6.1" +"@typescript-eslint/scope-manager@4.7.0": + version "4.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.7.0.tgz#2115526085fb72723ccdc1eeae75dec7126220ed" + integrity sha512-ILITvqwDJYbcDCROj6+Ob0oCKNg3SH46iWcNcTIT9B5aiVssoTYkhKjxOMNzR1F7WSJkik4zmuqve5MdnA0DyA== + dependencies: + "@typescript-eslint/types" "4.7.0" + "@typescript-eslint/visitor-keys" "4.7.0" + "@typescript-eslint/types@4.6.1": version "4.6.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.6.1.tgz#d3ad7478f53f22e7339dc006ab61aac131231552" integrity sha512-k2ZCHhJ96YZyPIsykickez+OMHkz06xppVLfJ+DY90i532/Cx2Z+HiRMH8YZQo7a4zVd/TwNBuRCdXlGK4yo8w== +"@typescript-eslint/types@4.7.0": + version "4.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.7.0.tgz#5e95ef5c740f43d942542b35811f87b62fccca69" + integrity sha512-uLszFe0wExJc+I7q0Z/+BnP7wao/kzX0hB5vJn4LIgrfrMLgnB2UXoReV19lkJQS1a1mHWGGODSxnBx6JQC3Sg== + "@typescript-eslint/typescript-estree@4.6.1": version "4.6.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.6.1.tgz#6025cce724329413f57e4959b2d676fceeca246f" @@ -3345,6 +3358,20 @@ semver "^7.3.2" tsutils "^3.17.1" +"@typescript-eslint/typescript-estree@4.7.0": + version "4.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.7.0.tgz#539531167f05ba20eb0b6785567076679e29d393" + integrity sha512-5XZRQznD1MfUmxu1t8/j2Af4OxbA7EFU2rbo0No7meb46eHgGkSieFdfV6omiC/DGIBhH9H9gXn7okBbVOm8jw== + dependencies: + "@typescript-eslint/types" "4.7.0" + "@typescript-eslint/visitor-keys" "4.7.0" + debug "^4.1.1" + globby "^11.0.1" + is-glob "^4.0.1" + lodash "^4.17.15" + semver "^7.3.2" + tsutils "^3.17.1" + "@typescript-eslint/visitor-keys@4.6.1": version "4.6.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.6.1.tgz#6b125883402d8939df7b54528d879e88f7ba3614" @@ -3353,6 +3380,14 @@ "@typescript-eslint/types" "4.6.1" eslint-visitor-keys "^2.0.0" +"@typescript-eslint/visitor-keys@4.7.0": + version "4.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.7.0.tgz#6783824f22acfc49e754970ed21b88ac03b80e6f" + integrity sha512-aDJDWuCRsf1lXOtignlfiPODkzSxxop7D0rZ91L6ZuMlcMCSh0YyK+gAfo5zN/ih6WxMwhoXgJWC3cWQdaKC+A== + dependencies: + "@typescript-eslint/types" "4.7.0" + eslint-visitor-keys "^2.0.0" + "@yarnpkg/lockfile@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" From 55e9576810d8cb3115b7bd52d704ffe793a3dd27 Mon Sep 17 00:00:00 2001 From: Thorsten Hoeger Date: Tue, 10 Nov 2020 10:30:37 +0100 Subject: [PATCH 097/314] feat(cloudwatch): add methods for lazy addition of graph metrics (#11380) Resolves #11305 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-cloudwatch/README.md | 2 ++ packages/@aws-cdk/aws-cloudwatch/lib/graph.ts | 26 ++++++++++++++++- .../aws-cloudwatch/test/test.graphs.ts | 29 +++++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-cloudwatch/README.md b/packages/@aws-cdk/aws-cloudwatch/README.md index 85d62de4f119c..e1a120a085b4a 100644 --- a/packages/@aws-cdk/aws-cloudwatch/README.md +++ b/packages/@aws-cdk/aws-cloudwatch/README.md @@ -251,6 +251,8 @@ dashboard.addWidgets(new GraphWidget({ })); ``` +Using the methods `addLeftMetric()` and `addRightMetric()` you can add metrics to a graph widget later on. + Graph widgets can also display annotations attached to the left or the right y-axis. ```ts diff --git a/packages/@aws-cdk/aws-cloudwatch/lib/graph.ts b/packages/@aws-cdk/aws-cloudwatch/lib/graph.ts index 51cc7690785bf..dee05d1245f10 100644 --- a/packages/@aws-cdk/aws-cloudwatch/lib/graph.ts +++ b/packages/@aws-cdk/aws-cloudwatch/lib/graph.ts @@ -219,11 +219,35 @@ export interface GraphWidgetProps extends MetricWidgetProps { * A dashboard widget that displays metrics */ export class GraphWidget extends ConcreteWidget { + private readonly props: GraphWidgetProps; + private readonly leftMetrics: IMetric[]; + private readonly rightMetrics: IMetric[]; + constructor(props: GraphWidgetProps) { super(props.width || 6, props.height || 6); this.props = props; + this.leftMetrics = props.left ?? []; + this.rightMetrics = props.right ?? []; + } + + /** + * Add another metric to the left Y axis of the GraphWidget + * + * @param metric the metric to add + */ + public addLeftMetric(metric: IMetric) { + this.leftMetrics.push(metric); + } + + /** + * Add another metric to the right Y axis of the GraphWidget + * + * @param metric the metric to add + */ + public addRightMetric(metric: IMetric) { + this.rightMetrics.push(metric); } public toJson(): any[] { @@ -232,7 +256,7 @@ export class GraphWidget extends ConcreteWidget { ...(this.props.rightAnnotations || []).map(mapAnnotation('right')), ]; - const metrics = allMetricsGraphJson(this.props.left || [], this.props.right || []); + const metrics = allMetricsGraphJson(this.leftMetrics, this.rightMetrics); return [{ type: 'metric', width: this.width, diff --git a/packages/@aws-cdk/aws-cloudwatch/test/test.graphs.ts b/packages/@aws-cdk/aws-cloudwatch/test/test.graphs.ts index 2ca9593581f9f..5aa11c460c1b2 100644 --- a/packages/@aws-cdk/aws-cloudwatch/test/test.graphs.ts +++ b/packages/@aws-cdk/aws-cloudwatch/test/test.graphs.ts @@ -61,6 +61,35 @@ export = { test.done(); }, + 'add metrics to graphs on either axis lazily'(test: Test) { + // WHEN + const stack = new Stack(); + const widget = new GraphWidget({ + title: 'My fancy graph', + }); + widget.addLeftMetric(new Metric({ namespace: 'CDK', metricName: 'Test' })); + widget.addRightMetric(new Metric({ namespace: 'CDK', metricName: 'Tast' })); + + // THEN + test.deepEqual(stack.resolve(widget.toJson()), [{ + type: 'metric', + width: 6, + height: 6, + properties: { + view: 'timeSeries', + title: 'My fancy graph', + region: { Ref: 'AWS::Region' }, + metrics: [ + ['CDK', 'Test'], + ['CDK', 'Tast', { yAxis: 'right' }], + ], + yAxis: {}, + }, + }]); + + test.done(); + }, + 'label and color are respected in constructor'(test: Test) { // WHEN const stack = new Stack(); From 32c164c4aa498b9bce03583f76cc21c7257a48ef Mon Sep 17 00:00:00 2001 From: adriantaut Date: Tue, 10 Nov 2020 13:11:11 +0200 Subject: [PATCH 098/314] feat(pipelines): room for extra sequential intermediary actions in CdkStage addApplication() (#11376) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently there is no way of reordering stages/actions once they are created. Getting to the Prepare and Execute change set actions while adding an application stage, we identified a use case within our company that needs one or more intermediary sequential actions before actually executing the change set. Moreover, I can imagine there can be plenty of use cases with similar requirements of having certain actions to fulfil between the Prepare and actual Execution of the Change Sets. To resolve the problem, I suggest extending the AddStageOptions interface with an optional property representing the number of intermediary actions you need room for. Closes https://github.com/aws/aws-cdk/issues/11333 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/pipelines/README.md | 10 ++++++ packages/@aws-cdk/pipelines/lib/stage.ts | 14 +++++++-- .../pipelines/test/stack-ordering.test.ts | 31 +++++++++++++++++++ 3 files changed, 53 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/pipelines/README.md b/packages/@aws-cdk/pipelines/README.md index 238fa51dbc710..42b0a435242e1 100644 --- a/packages/@aws-cdk/pipelines/README.md +++ b/packages/@aws-cdk/pipelines/README.md @@ -341,6 +341,16 @@ testingStage.addApplication(new MyApplication2(this, 'MyApp2', { })); ``` +Even more, adding a manual approval action or reserving space for some extra sequential actions +between 'Prepare' and 'Execute' ChangeSet actions is possible. + +```ts + pipeline.addApplicationStage(new MyApplication(this, 'Production'), { + manualApprovals: true, + extraRunOrderSpace: 1, + }); +``` + ## Adding validations to the pipeline You can add any type of CodePipeline Action to the pipeline in order to validate diff --git a/packages/@aws-cdk/pipelines/lib/stage.ts b/packages/@aws-cdk/pipelines/lib/stage.ts index 3f93c28808075..c7b090b3f8d02 100644 --- a/packages/@aws-cdk/pipelines/lib/stage.ts +++ b/packages/@aws-cdk/pipelines/lib/stage.ts @@ -76,6 +76,7 @@ export class CdkStage extends CoreConstruct { */ public addApplication(appStage: Stage, options: AddStageOptions = {}) { const asm = appStage.synth(); + const extraRunOrderSpace = options.extraRunOrderSpace ?? 0; if (asm.stacks.length === 0) { // If we don't check here, a more puzzling "stage contains no actions" @@ -88,8 +89,8 @@ export class CdkStage extends CoreConstruct { stack => stack.dependencies.map(d => d.id)); for (const stacks of sortedTranches) { - const runOrder = this.nextSequentialRunOrder(2); // We need 2 actions - let executeRunOrder = runOrder + 1; + const runOrder = this.nextSequentialRunOrder(extraRunOrderSpace + 2); // 2 actions for Prepare/Execute ChangeSet + let executeRunOrder = runOrder + extraRunOrderSpace + 1; // If we need to insert a manual approval action, then what's the executeRunOrder // now is where we add a manual approval step, and we allocate 1 more runOrder @@ -371,6 +372,15 @@ export interface AddStageOptions { * @default false */ readonly manualApprovals?: boolean; + /** + * Add room for extra actions + * + * You can use this to make extra room in the runOrder sequence between the + * changeset 'prepare' and 'execute' actions and insert your own actions there. + * + * @default 0 + */ + readonly extraRunOrderSpace?: number; } /** diff --git a/packages/@aws-cdk/pipelines/test/stack-ordering.test.ts b/packages/@aws-cdk/pipelines/test/stack-ordering.test.ts index ddd38e7a3a9c2..fcfede261208a 100644 --- a/packages/@aws-cdk/pipelines/test/stack-ordering.test.ts +++ b/packages/@aws-cdk/pipelines/test/stack-ordering.test.ts @@ -78,6 +78,37 @@ test('manual approval is inserted in correct location', () => { }); }); +test('extra space for sequential intermediary actions is reserved', () => { + // WHEN + pipeline.addApplicationStage(new TwoStackApp(app, 'MyApp'), { + extraRunOrderSpace: 1, + }); + + // THEN + expect(pipelineStack).toHaveResourceLike('AWS::CodePipeline::Pipeline', { + Stages: arrayWith({ + Name: 'MyApp', + Actions: sortedByRunOrder([ + objectLike({ + Name: 'Stack1.Prepare', + RunOrder: 1, + }), + objectLike({ + Name: 'Stack1.Deploy', + RunOrder: 3, + }), + objectLike({ + Name: 'Stack2.Prepare', + RunOrder: 4, + }), + objectLike({ + Name: 'Stack2.Deploy', + RunOrder: 6, + }), + ]), + }), + }); +}); class TwoStackApp extends Stage { constructor(scope: Construct, id: string, props?: StageProps) { From cdb9942bebc60abf98a74c6f9071e3527f0f01e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Israel=20Pe=C3=B1a?= Date: Tue, 10 Nov 2020 03:41:02 -0800 Subject: [PATCH 099/314] feat(core): natively support .dockerignore (#10922) Patterns in `.dockerignore` used to be interpreted as globs, which has different behavior from how `.dockerignore` is supposed to be interpreted. Specifically it was hard to properly ignore whole directories at once (such as a large `node_modules`). This PR adds an `ignoreMode` flag which controls how the ignore patterns should be interpreted. The choices are: * `IgnoreMode.GLOB` - interpret as before * `IgnoreMode.GIT` - interpret as in `.gitignore` * `IgnoreMode.DOCKER` - interpret as in `.dockerignore` Users might have dependencies on the current behavior, which is why the default `ignoreMode` depends on a feature flag: `@aws-cdk/aws-ecr-assets:dockerIgnoreSupport` (which is set to `true` for new projects) enables the new, correct Docker-ignore behavior by default. ---- Closes #10921 *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- package.json | 12 + packages/@aws-cdk/assets/lib/fs/options.ts | 9 + packages/@aws-cdk/assets/lib/staging.ts | 1 + .../test/integ.docker-asset.lit.expected.json | 4 +- packages/@aws-cdk/aws-ecr-assets/.gitignore | 5 +- packages/@aws-cdk/aws-ecr-assets/NOTICE | 2 +- packages/@aws-cdk/aws-ecr-assets/README.md | 15 ++ .../aws-ecr-assets/lib/image-asset.ts | 27 ++- .../aws-ecr-assets/test/image-asset.test.ts | 148 ++++++------ .../test/integ.assets-docker.expected.json | 4 +- .../test/integ.assets-docker.ts | 6 +- .../integ.nested-stacks-docker.expected.json | 20 +- .../test/integ.nested-stacks-docker.ts | 6 +- .../test/whitelisted-image/.dockerignore | 4 + .../test/whitelisted-image/Dockerfile | 5 + .../test/whitelisted-image/foobar.txt | 0 .../test/whitelisted-image/index.py | 33 +++ .../test/whitelisted-image/node_modules/one | 0 .../node_modules/some_dep/file | 0 .../whitelisted-image/subdirectory/baz.txt | 0 .../fargate/integ.asset-image.expected.json | 4 +- ...g.scheduled-fargate-task.lit.expected.json | 4 +- .../test/ec2/test.ec2-task-definition.ts | 11 +- .../aws-ecs/test/test.container-definition.ts | 23 +- .../integ.event-ec2-task.lit.expected.json | 4 +- .../integ.event-fargate-task.expected.json | 4 +- .../batch/integ.run-batch-job.expected.json | 4 +- .../test/batch/integ.submit-job.expected.json | 4 +- .../test/ecs/integ.ec2-run-task.expected.json | 4 +- .../test/ecs/integ.ec2-task.expected.json | 4 +- .../ecs/integ.fargate-run-task.expected.json | 4 +- .../test/ecs/integ.fargate-task.expected.json | 4 +- packages/@aws-cdk/core/NOTICE | 50 +++- packages/@aws-cdk/core/lib/asset-staging.ts | 1 + packages/@aws-cdk/core/lib/fs/copy.ts | 8 +- packages/@aws-cdk/core/lib/fs/fingerprint.ts | 17 +- packages/@aws-cdk/core/lib/fs/ignore.ts | 223 ++++++++++++++++++ packages/@aws-cdk/core/lib/fs/index.ts | 1 + packages/@aws-cdk/core/lib/fs/options.ts | 35 +++ packages/@aws-cdk/core/lib/fs/utils.ts | 29 --- packages/@aws-cdk/core/package.json | 8 +- .../@aws-cdk/core/test/fs/fs-ignore.test.ts | 125 ++++++++++ packages/@aws-cdk/core/test/fs/utils.test.ts | 20 -- packages/@aws-cdk/cx-api/lib/features.ts | 14 ++ packages/aws-cdk-lib/package.json | 4 + packages/monocdk/NOTICE | 50 +++- packages/monocdk/package.json | 4 + tools/cdk-integ-tools/lib/integ-helpers.ts | 1 + yarn.lock | 7 +- 49 files changed, 788 insertions(+), 184 deletions(-) create mode 100644 packages/@aws-cdk/aws-ecr-assets/test/whitelisted-image/.dockerignore create mode 100644 packages/@aws-cdk/aws-ecr-assets/test/whitelisted-image/Dockerfile create mode 100644 packages/@aws-cdk/aws-ecr-assets/test/whitelisted-image/foobar.txt create mode 100644 packages/@aws-cdk/aws-ecr-assets/test/whitelisted-image/index.py create mode 100644 packages/@aws-cdk/aws-ecr-assets/test/whitelisted-image/node_modules/one create mode 100644 packages/@aws-cdk/aws-ecr-assets/test/whitelisted-image/node_modules/some_dep/file create mode 100644 packages/@aws-cdk/aws-ecr-assets/test/whitelisted-image/subdirectory/baz.txt create mode 100644 packages/@aws-cdk/core/lib/fs/ignore.ts create mode 100644 packages/@aws-cdk/core/test/fs/fs-ignore.test.ts diff --git a/package.json b/package.json index 1caf075cefc9c..d387f40e0394b 100644 --- a/package.json +++ b/package.json @@ -65,18 +65,26 @@ "@aws-cdk/cloud-assembly-schema/jsonschema/**", "@aws-cdk/cloud-assembly-schema/semver", "@aws-cdk/cloud-assembly-schema/semver/**", + "@aws-cdk/core/@balena/dockerignore", + "@aws-cdk/core/@balena/dockerignore/**", "@aws-cdk/core/fs-extra", "@aws-cdk/core/fs-extra/**", + "@aws-cdk/core/ignore", + "@aws-cdk/core/ignore/**", "@aws-cdk/core/minimatch", "@aws-cdk/core/minimatch/**", "@aws-cdk/cx-api/semver", "@aws-cdk/cx-api/semver/**", "@aws-cdk/yaml-cfn/yaml", "@aws-cdk/yaml-cfn/yaml/**", + "aws-cdk-lib/@balena/dockerignore", + "aws-cdk-lib/@balena/dockerignore/**", "aws-cdk-lib/case", "aws-cdk-lib/case/**", "aws-cdk-lib/fs-extra", "aws-cdk-lib/fs-extra/**", + "aws-cdk-lib/ignore", + "aws-cdk-lib/ignore/**", "aws-cdk-lib/jsonschema", "aws-cdk-lib/jsonschema/**", "aws-cdk-lib/minimatch", @@ -87,10 +95,14 @@ "aws-cdk-lib/semver/**", "aws-cdk-lib/yaml", "aws-cdk-lib/yaml/**", + "monocdk/@balena/dockerignore", + "monocdk/@balena/dockerignore/**", "monocdk/case", "monocdk/case/**", "monocdk/fs-extra", "monocdk/fs-extra/**", + "monocdk/ignore", + "monocdk/ignore/**", "monocdk/jsonschema", "monocdk/jsonschema/**", "monocdk/minimatch", diff --git a/packages/@aws-cdk/assets/lib/fs/options.ts b/packages/@aws-cdk/assets/lib/fs/options.ts index 434dd091a7256..3ccc107d3700d 100644 --- a/packages/@aws-cdk/assets/lib/fs/options.ts +++ b/packages/@aws-cdk/assets/lib/fs/options.ts @@ -1,3 +1,4 @@ +import { IgnoreMode } from '@aws-cdk/core'; import { FollowMode } from './follow-mode'; /** @@ -18,6 +19,14 @@ export interface CopyOptions { * @default nothing is excluded */ readonly exclude?: string[]; + + /** + * The ignore behavior to use for exclude patterns. + * + * @default - GLOB for file assets, DOCKER or GLOB for docker assets depending on whether the + * '@aws-cdk/aws-ecr-assets:dockerIgnoreSupport' flag is set. + */ + readonly ignoreMode?: IgnoreMode; } /** diff --git a/packages/@aws-cdk/assets/lib/staging.ts b/packages/@aws-cdk/assets/lib/staging.ts index 87800ae8aa40f..3a441a0219f55 100644 --- a/packages/@aws-cdk/assets/lib/staging.ts +++ b/packages/@aws-cdk/assets/lib/staging.ts @@ -22,6 +22,7 @@ export class Staging extends AssetStaging { super(scope, id, { sourcePath: props.sourcePath, exclude: props.exclude, + ignoreMode: props.ignoreMode, extraHash: props.extraHash, follow: toSymlinkFollow(props.follow), }); diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.docker-asset.lit.expected.json b/packages/@aws-cdk/aws-codebuild/test/integ.docker-asset.lit.expected.json index 64ff7f68d7f8c..043ed7ee5642d 100644 --- a/packages/@aws-cdk/aws-codebuild/test/integ.docker-asset.lit.expected.json +++ b/packages/@aws-cdk/aws-codebuild/test/integ.docker-asset.lit.expected.json @@ -146,7 +146,7 @@ { "Ref": "AWS::URLSuffix" }, - "/aws-cdk/assets:ee9ebbb592f461ed4638ea9ea64fab9fd384fd2f890c4fef981f9938d82419f4" + "/aws-cdk/assets:2564b8c8e3f9e82a6394872a4e555c4d0c06ab6f47b9aca360c22c9ed622487c" ] ] }, @@ -168,4 +168,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-ecr-assets/.gitignore b/packages/@aws-cdk/aws-ecr-assets/.gitignore index cc09865158319..c6e7daac3ab7e 100644 --- a/packages/@aws-cdk/aws-ecr-assets/.gitignore +++ b/packages/@aws-cdk/aws-ecr-assets/.gitignore @@ -17,4 +17,7 @@ nyc.config.js !.eslintrc.js junit.xml -!jest.config.js \ No newline at end of file + +!jest.config.js + +!test/whitelisted-image/node_modules diff --git a/packages/@aws-cdk/aws-ecr-assets/NOTICE b/packages/@aws-cdk/aws-ecr-assets/NOTICE index 7aa28b59a89a0..c760ec779c75e 100644 --- a/packages/@aws-cdk/aws-ecr-assets/NOTICE +++ b/packages/@aws-cdk/aws-ecr-assets/NOTICE @@ -20,4 +20,4 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ----------------- \ No newline at end of file +---------------- diff --git a/packages/@aws-cdk/aws-ecr-assets/README.md b/packages/@aws-cdk/aws-ecr-assets/README.md index c120353a933ca..5334028d15664 100644 --- a/packages/@aws-cdk/aws-ecr-assets/README.md +++ b/packages/@aws-cdk/aws-ecr-assets/README.md @@ -29,6 +29,21 @@ This will instruct the toolkit to build a Docker image from `my-image`, push it to an AWS ECR repository and wire the name of the repository as CloudFormation parameters to your stack. +By default, all files in the given directory will be copied into the docker +*build context*. If there is a large directory that you know you definitely +don't need in the build context you can improve the performance by adding the +names of files and directories to ignore to a file called `.dockerignore`, or +pass them via the `exclude` property. If both are available, the patterns +found in `exclude` are appended to the patterns found in `.dockerignore`. + +The `ignoreMode` property controls how the set of ignore patterns is +interpreted. The recommended setting for Docker image assets is +`IgnoreMode.DOCKER`. If the context flag +`@aws-cdk/aws-ecr-assets:dockerIgnoreSupport` is set to `true` in your +`cdk.json` (this is by default for new projects, but must be set manually for +old projects) then `IgnoreMode.DOCKER` is the default and you don't need to +configure it on the asset itself. + Use `asset.imageUri` to reference the image (it includes both the ECR image URL and tag. diff --git a/packages/@aws-cdk/aws-ecr-assets/lib/image-asset.ts b/packages/@aws-cdk/aws-ecr-assets/lib/image-asset.ts index 93d96360b6ae3..2f6f5ff436baa 100644 --- a/packages/@aws-cdk/aws-ecr-assets/lib/image-asset.ts +++ b/packages/@aws-cdk/aws-ecr-assets/lib/image-asset.ts @@ -2,9 +2,9 @@ import * as fs from 'fs'; import * as path from 'path'; import * as assets from '@aws-cdk/assets'; import * as ecr from '@aws-cdk/aws-ecr'; -import { Annotations, Construct as CoreConstruct, Stack, Token } from '@aws-cdk/core'; +import { Annotations, Construct as CoreConstruct, FeatureFlags, IgnoreMode, Stack, Token } from '@aws-cdk/core'; +import * as cxapi from '@aws-cdk/cx-api'; import { Construct } from 'constructs'; -import * as minimatch from 'minimatch'; /** * Options for DockerImageAsset @@ -97,20 +97,28 @@ export class DockerImageAsset extends CoreConstruct implements assets.IAsset { throw new Error(`Cannot find file at ${file}`); } + const defaultIgnoreMode = FeatureFlags.of(this).isEnabled(cxapi.DOCKER_IGNORE_SUPPORT) + ? IgnoreMode.DOCKER : IgnoreMode.GLOB; + let ignoreMode = props.ignoreMode ?? defaultIgnoreMode; + let exclude: string[] = props.exclude || []; const ignore = path.join(dir, '.dockerignore'); if (fs.existsSync(ignore)) { - exclude = [...exclude, ...fs.readFileSync(ignore).toString().split('\n').filter(e => !!e)]; + const dockerIgnorePatterns = fs.readFileSync(ignore).toString().split('\n').filter(e => !!e); + + exclude = [ + ...dockerIgnorePatterns, + ...exclude, + + // Ensure .dockerignore is whitelisted no matter what. + '!.dockerignore', + ]; } - // make sure the docker file and the dockerignore file end up in the staging area - // see https://github.com/aws/aws-cdk/issues/6004 - exclude = exclude.filter(ignoreExpression => { - return !(minimatch(file, ignoreExpression, { matchBase: true }) || - minimatch(ignore, ignoreExpression, { matchBase: true })); - }); + // Ensure the Dockerfile is whitelisted no matter what. + exclude.push('!' + path.basename(file)); if (props.repositoryName) { Annotations.of(this).addWarning('DockerImageAsset.repositoryName is deprecated. Override "core.Stack.addDockerImageAsset" to control asset locations'); @@ -132,6 +140,7 @@ export class DockerImageAsset extends CoreConstruct implements assets.IAsset { const staging = new assets.Staging(this, 'Staging', { ...props, exclude, + ignoreMode, sourcePath: dir, extraHash: Object.keys(extraHash).length === 0 ? undefined diff --git a/packages/@aws-cdk/aws-ecr-assets/test/image-asset.test.ts b/packages/@aws-cdk/aws-ecr-assets/test/image-asset.test.ts index 27ee1a7eb8abd..7da0621f2aa42 100644 --- a/packages/@aws-cdk/aws-ecr-assets/test/image-asset.test.ts +++ b/packages/@aws-cdk/aws-ecr-assets/test/image-asset.test.ts @@ -3,21 +3,29 @@ import * as path from 'path'; import { expect as ourExpect, haveResource } from '@aws-cdk/assert'; import * as iam from '@aws-cdk/aws-iam'; import * as cxschema from '@aws-cdk/cloud-assembly-schema'; -import { App, DefaultStackSynthesizer, Lazy, LegacyStackSynthesizer, Stack, Stage } from '@aws-cdk/core'; +import { App, DefaultStackSynthesizer, IgnoreMode, Lazy, LegacyStackSynthesizer, Stack, Stage } from '@aws-cdk/core'; import * as cxapi from '@aws-cdk/cx-api'; import { nodeunitShim, Test } from 'nodeunit-shim'; import { DockerImageAsset } from '../lib'; /* eslint-disable quote-props */ -const DEMO_IMAGE_ASSET_HASH = 'baa2d6eb2a17c75424df631c8c70ff39f2d5f3bee8b9e1a109ee24ca17300540'; +const DEMO_IMAGE_ASSET_HASH = 'b2c69bfbfe983b634456574587443159b3b7258849856a118ad3d2772238f1a5'; + + +let app: App; +let stack: Stack; +beforeEach(() => { + app = new App({ + context: { + '@aws-cdk/aws-ecr-assets:dockerIgnoreSupport': true, + }, + }); + stack = new Stack(app, 'Stack'); +}); nodeunitShim({ 'test instantiating Asset Image'(test: Test) { - // GIVEN - const app = new App(); - const stack = new Stack(app, 'test-stack'); - // WHEN new DockerImageAsset(stack, 'Image', { directory: path.join(__dirname, 'demo-image'), @@ -30,20 +38,17 @@ nodeunitShim({ test.deepEqual(artifact.assets, [ { repositoryName: 'aws-cdk/assets', - imageTag: 'baa2d6eb2a17c75424df631c8c70ff39f2d5f3bee8b9e1a109ee24ca17300540', - id: 'baa2d6eb2a17c75424df631c8c70ff39f2d5f3bee8b9e1a109ee24ca17300540', + imageTag: 'b2c69bfbfe983b634456574587443159b3b7258849856a118ad3d2772238f1a5', + id: 'b2c69bfbfe983b634456574587443159b3b7258849856a118ad3d2772238f1a5', packaging: 'container-image', - path: 'asset.baa2d6eb2a17c75424df631c8c70ff39f2d5f3bee8b9e1a109ee24ca17300540', - sourceHash: 'baa2d6eb2a17c75424df631c8c70ff39f2d5f3bee8b9e1a109ee24ca17300540', + path: 'asset.b2c69bfbfe983b634456574587443159b3b7258849856a118ad3d2772238f1a5', + sourceHash: 'b2c69bfbfe983b634456574587443159b3b7258849856a118ad3d2772238f1a5', }, ]); test.done(); }, 'with build args'(test: Test) { - // GIVEN - const stack = new Stack(); - // WHEN new DockerImageAsset(stack, 'Image', { directory: path.join(__dirname, 'demo-image'), @@ -59,9 +64,6 @@ nodeunitShim({ }, 'with target'(test: Test) { - // GIVEN - const stack = new Stack(); - // WHEN new DockerImageAsset(stack, 'Image', { directory: path.join(__dirname, 'demo-image'), @@ -79,8 +81,6 @@ nodeunitShim({ 'with file'(test: Test) { // GIVEN - const stack = new Stack(); - const directoryPath = path.join(__dirname, 'demo-image-custom-docker-file'); // WHEN new DockerImageAsset(stack, 'Image', { @@ -96,7 +96,6 @@ nodeunitShim({ 'asset.repository.grantPull can be used to grant a principal permissions to use the image'(test: Test) { // GIVEN - const stack = new Stack(); const user = new iam.User(stack, 'MyUser'); const asset = new DockerImageAsset(stack, 'Image', { directory: path.join(__dirname, 'demo-image'), @@ -157,9 +156,6 @@ nodeunitShim({ }, 'fails if the directory does not exist'(test: Test) { - // GIVEN - const stack = new Stack(); - // THEN test.throws(() => { new DockerImageAsset(stack, 'MyAsset', { @@ -170,9 +166,6 @@ nodeunitShim({ }, 'fails if the directory does not contain a Dockerfile'(test: Test) { - // GIVEN - const stack = new Stack(); - // THEN test.throws(() => { new DockerImageAsset(stack, 'Asset', { @@ -183,9 +176,6 @@ nodeunitShim({ }, 'fails if the file does not exist'(test: Test) { - // GIVEN - const stack = new Stack(); - // THEN test.throws(() => { new DockerImageAsset(stack, 'Asset', { @@ -197,9 +187,6 @@ nodeunitShim({ }, 'docker directory is staged if asset staging is enabled'(test: Test) { - const app = new App(); - const stack = new Stack(app, 'stack'); - const image = new DockerImageAsset(stack, 'MyAsset', { directory: path.join(__dirname, 'demo-image'), }); @@ -212,50 +199,45 @@ nodeunitShim({ }, 'docker directory is staged without files specified in .dockerignore'(test: Test) { - const app = new App(); - const stack = new Stack(app, 'stack'); + testDockerDirectoryIsStagedWithoutFilesSpecifiedInDockerignore(test); + }, + 'docker directory is staged without files specified in .dockerignore with IgnoreMode.GLOB'(test: Test) { + testDockerDirectoryIsStagedWithoutFilesSpecifiedInDockerignore(test, IgnoreMode.GLOB); + }, + + 'docker directory is staged with whitelisted files specified in .dockerignore'(test: Test) { const image = new DockerImageAsset(stack, 'MyAsset', { - directory: path.join(__dirname, 'dockerignore-image'), + directory: path.join(__dirname, 'whitelisted-image'), }); const session = app.synth(); - // .dockerignore itself should be included in output to be processed during docker build + // Only the files exempted above should be included. test.ok(fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, '.dockerignore'))); test.ok(fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, 'Dockerfile'))); test.ok(fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, 'index.py'))); - test.ok(!fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, 'foobar.txt'))); + test.ok(fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, 'foobar.txt'))); test.ok(fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, 'subdirectory'))); test.ok(fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, 'subdirectory', 'baz.txt'))); + test.ok(!fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, 'node_modules'))); + test.ok(!fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, 'node_modules', 'one'))); + test.ok(!fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, 'node_modules', 'some_dep'))); + test.ok(!fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, 'node_modules', 'some_dep', 'file'))); test.done(); }, 'docker directory is staged without files specified in exclude option'(test: Test) { - const app = new App(); - const stack = new Stack(app, 'stack'); - - const image = new DockerImageAsset(stack, 'MyAsset', { - directory: path.join(__dirname, 'dockerignore-image'), - exclude: ['subdirectory'], - }); - - const session = app.synth(); - - test.ok(fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, '.dockerignore'))); - test.ok(fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, 'Dockerfile'))); - test.ok(fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, 'index.py'))); - test.ok(!fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, 'foobar.txt'))); - test.ok(!fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, 'subdirectory'))); - test.ok(!fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, 'subdirectory', 'baz.txt'))); + testDockerDirectoryIsStagedWithoutFilesSpecifiedInExcludeOption(test); + }, - test.done(); + 'docker directory is staged without files specified in exclude option with IgnoreMode.GLOB'(test: Test) { + testDockerDirectoryIsStagedWithoutFilesSpecifiedInExcludeOption(test, IgnoreMode.GLOB); }, 'fails if using tokens in build args keys or values'(test: Test) { // GIVEN - const stack = new Stack(); const token = Lazy.stringValue({ produce: () => 'foo' }); const expected = /Cannot use tokens in keys or values of "buildArgs" since they are needed before deployment/; @@ -275,7 +257,6 @@ nodeunitShim({ 'fails if using token as repositoryName'(test: Test) { // GIVEN - const stack = new Stack(); const token = Lazy.stringValue({ produce: () => 'foo' }); // THEN @@ -289,7 +270,6 @@ nodeunitShim({ 'docker build options are included in the asset id'(test: Test) { // GIVEN - const stack = new Stack(); const directory = path.join(__dirname, 'demo-image-custom-docker-file'); const asset1 = new DockerImageAsset(stack, 'Asset1', { directory }); @@ -300,20 +280,57 @@ nodeunitShim({ const asset6 = new DockerImageAsset(stack, 'Asset6', { directory, extraHash: 'random-extra' }); const asset7 = new DockerImageAsset(stack, 'Asset7', { directory, repositoryName: 'foo' }); - test.deepEqual(asset1.sourceHash, 'c555ab9f74e32ce24cd04ddeaa4d7b1b11c5740b9873a3f250e03bf73b28ce39'); - test.deepEqual(asset2.sourceHash, '273bd9a95dbe346ad5b116736d44a350e90f57e2b9ba7fd3d334b61d0420f9fd'); - test.deepEqual(asset3.sourceHash, '81a4b3fd058876c7705597500e7259ff436e521580f0bcb503a303dcac7e2a41'); - test.deepEqual(asset4.sourceHash, '10259531feb68a3967d5d25b70ec9a37a6a8e1f5b04083fada3d0a084291a698'); - test.deepEqual(asset5.sourceHash, '30e083bf51483a031759bc7fb35f69345de69fdbc511eec88bd3d1724b5ac0a9'); - test.deepEqual(asset6.sourceHash, '594ae5a5d23367d18468fefca5a4e56ca83b077d1274a1f812f55c8c9ead9eaa'); - test.deepEqual(asset7.sourceHash, 'bc007f81fe1dd0f0bbb24af898eba3f4f15edbff19b7abb3fac928439486d667'); + test.deepEqual(asset1.sourceHash, 'ab01ecd4419f59e1ec0ac9e57a60dbb653be68a29af0223fa8cb24b4b747bc73'); + test.deepEqual(asset2.sourceHash, '7fb12f6148098e3f5c56c788a865d2af689125ead403b795fe6a262ec34384b3'); + test.deepEqual(asset3.sourceHash, 'fc3b6d802ba198ba2ee55079dbef27682bcd1288d5849eb5bbd5cd69038359b3'); + test.deepEqual(asset4.sourceHash, '30439ea6dfeb4ddfd9175097286895c78393ef52a78c68f92db08abc4513cad6'); + test.deepEqual(asset5.sourceHash, '5775170880e26ba31799745241b90d4340c674bb3b1c01d758e416ee3f1c386f'); + test.deepEqual(asset6.sourceHash, 'ba82fd351a4d3e3f5c5d948b9948e7e829badc3da90f97e00bb7724afbeacfd4'); + test.deepEqual(asset7.sourceHash, '26ec194928431cab6ec5af24ea9f01af2cf7b20e361128b07b2a7405d2951f95'); test.done(); }, }); +function testDockerDirectoryIsStagedWithoutFilesSpecifiedInDockerignore(test: Test, ignoreMode?: IgnoreMode) { + const image = new DockerImageAsset(stack, 'MyAsset', { + ignoreMode, + directory: path.join(__dirname, 'dockerignore-image'), + }); + + const session = app.synth(); + + // .dockerignore itself should be included in output to be processed during docker build + test.ok(fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, '.dockerignore'))); + test.ok(fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, 'Dockerfile'))); + test.ok(fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, 'index.py'))); + test.ok(!fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, 'foobar.txt'))); + test.ok(fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, 'subdirectory'))); + test.ok(fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, 'subdirectory', 'baz.txt'))); + + test.done(); +} + +function testDockerDirectoryIsStagedWithoutFilesSpecifiedInExcludeOption(test: Test, ignoreMode?: IgnoreMode) { + const image = new DockerImageAsset(stack, 'MyAsset', { + directory: path.join(__dirname, 'dockerignore-image'), + exclude: ['subdirectory'], + ignoreMode, + }); + + const session = app.synth(); + + test.ok(fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, '.dockerignore'))); + test.ok(fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, 'Dockerfile'))); + test.ok(fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, 'index.py'))); + test.ok(!fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, 'foobar.txt'))); + test.ok(!fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, 'subdirectory'))); + test.ok(!fs.existsSync(path.join(session.directory, `asset.${image.sourceHash}`, 'subdirectory', 'baz.txt'))); + + test.done(); +} + test('nested assemblies share assets: legacy synth edition', () => { // GIVEN - const app = new App(); const stack1 = new Stack(new Stage(app, 'Stage1'), 'Stack', { synthesizer: new LegacyStackSynthesizer() }); const stack2 = new Stack(new Stage(app, 'Stage2'), 'Stack', { synthesizer: new LegacyStackSynthesizer() }); @@ -340,7 +357,6 @@ test('nested assemblies share assets: legacy synth edition', () => { test('nested assemblies share assets: default synth edition', () => { // GIVEN - const app = new App(); const stack1 = new Stack(new Stage(app, 'Stage1'), 'Stack', { synthesizer: new DefaultStackSynthesizer() }); const stack2 = new Stack(new Stage(app, 'Stage2'), 'Stack', { synthesizer: new DefaultStackSynthesizer() }); @@ -368,4 +384,4 @@ function isStackArtifact(x: any): x is cxapi.CloudFormationStackArtifact { function isAssetManifestArtifact(x: any): x is cxapi.AssetManifestArtifact { return x instanceof cxapi.AssetManifestArtifact; -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-ecr-assets/test/integ.assets-docker.expected.json b/packages/@aws-cdk/aws-ecr-assets/test/integ.assets-docker.expected.json index 1b289472b4cc1..ad86ae9cd34da 100644 --- a/packages/@aws-cdk/aws-ecr-assets/test/integ.assets-docker.expected.json +++ b/packages/@aws-cdk/aws-ecr-assets/test/integ.assets-docker.expected.json @@ -70,10 +70,10 @@ { "Ref": "AWS::URLSuffix" }, - "/aws-cdk/assets:baa2d6eb2a17c75424df631c8c70ff39f2d5f3bee8b9e1a109ee24ca17300540" + "/aws-cdk/assets:b2c69bfbfe983b634456574587443159b3b7258849856a118ad3d2772238f1a5" ] ] } } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-ecr-assets/test/integ.assets-docker.ts b/packages/@aws-cdk/aws-ecr-assets/test/integ.assets-docker.ts index 9212e350f8c8c..21161938c786f 100644 --- a/packages/@aws-cdk/aws-ecr-assets/test/integ.assets-docker.ts +++ b/packages/@aws-cdk/aws-ecr-assets/test/integ.assets-docker.ts @@ -3,7 +3,11 @@ import * as iam from '@aws-cdk/aws-iam'; import * as cdk from '@aws-cdk/core'; import * as assets from '../lib'; -const app = new cdk.App(); +const app = new cdk.App({ + context: { + '@aws-cdk/aws-ecr-assets:dockerIgnoreSupport': true, + }, +}); const stack = new cdk.Stack(app, 'integ-assets-docker'); const asset = new assets.DockerImageAsset(stack, 'DockerImage', { diff --git a/packages/@aws-cdk/aws-ecr-assets/test/integ.nested-stacks-docker.expected.json b/packages/@aws-cdk/aws-ecr-assets/test/integ.nested-stacks-docker.expected.json index 0a189b5e6d229..779ad22187591 100644 --- a/packages/@aws-cdk/aws-ecr-assets/test/integ.nested-stacks-docker.expected.json +++ b/packages/@aws-cdk/aws-ecr-assets/test/integ.nested-stacks-docker.expected.json @@ -17,7 +17,7 @@ }, "/", { - "Ref": "AssetParameters3e9c40a6bf877a4b814d5ca4817c057400e4f8f661cd52c8951bf40f5763b775S3Bucket6CE4FC69" + "Ref": "AssetParameters41589ef1a760129e41441e85e58fe02db5f019ed532b8a4a20729f3245b0593bS3BucketFB15A731" }, "/", { @@ -27,7 +27,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters3e9c40a6bf877a4b814d5ca4817c057400e4f8f661cd52c8951bf40f5763b775S3VersionKey5FE1DA58" + "Ref": "AssetParameters41589ef1a760129e41441e85e58fe02db5f019ed532b8a4a20729f3245b0593bS3VersionKeyF38F9C9A" } ] } @@ -40,7 +40,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters3e9c40a6bf877a4b814d5ca4817c057400e4f8f661cd52c8951bf40f5763b775S3VersionKey5FE1DA58" + "Ref": "AssetParameters41589ef1a760129e41441e85e58fe02db5f019ed532b8a4a20729f3245b0593bS3VersionKeyF38F9C9A" } ] } @@ -53,17 +53,17 @@ } }, "Parameters": { - "AssetParameters3e9c40a6bf877a4b814d5ca4817c057400e4f8f661cd52c8951bf40f5763b775S3Bucket6CE4FC69": { + "AssetParameters41589ef1a760129e41441e85e58fe02db5f019ed532b8a4a20729f3245b0593bS3BucketFB15A731": { "Type": "String", - "Description": "S3 bucket for asset \"3e9c40a6bf877a4b814d5ca4817c057400e4f8f661cd52c8951bf40f5763b775\"" + "Description": "S3 bucket for asset \"41589ef1a760129e41441e85e58fe02db5f019ed532b8a4a20729f3245b0593b\"" }, - "AssetParameters3e9c40a6bf877a4b814d5ca4817c057400e4f8f661cd52c8951bf40f5763b775S3VersionKey5FE1DA58": { + "AssetParameters41589ef1a760129e41441e85e58fe02db5f019ed532b8a4a20729f3245b0593bS3VersionKeyF38F9C9A": { "Type": "String", - "Description": "S3 key for asset version \"3e9c40a6bf877a4b814d5ca4817c057400e4f8f661cd52c8951bf40f5763b775\"" + "Description": "S3 key for asset version \"41589ef1a760129e41441e85e58fe02db5f019ed532b8a4a20729f3245b0593b\"" }, - "AssetParameters3e9c40a6bf877a4b814d5ca4817c057400e4f8f661cd52c8951bf40f5763b775ArtifactHash5D96BEC9": { + "AssetParameters41589ef1a760129e41441e85e58fe02db5f019ed532b8a4a20729f3245b0593bArtifactHashEC633CC8": { "Type": "String", - "Description": "Artifact hash for asset \"3e9c40a6bf877a4b814d5ca4817c057400e4f8f661cd52c8951bf40f5763b775\"" + "Description": "Artifact hash for asset \"41589ef1a760129e41441e85e58fe02db5f019ed532b8a4a20729f3245b0593b\"" } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-ecr-assets/test/integ.nested-stacks-docker.ts b/packages/@aws-cdk/aws-ecr-assets/test/integ.nested-stacks-docker.ts index 83d71192e18f4..9a6fe48b172e0 100644 --- a/packages/@aws-cdk/aws-ecr-assets/test/integ.nested-stacks-docker.ts +++ b/packages/@aws-cdk/aws-ecr-assets/test/integ.nested-stacks-docker.ts @@ -27,6 +27,10 @@ class TheParentStack extends Stack { } } -const app = new App(); +const app = new App({ + context: { + '@aws-cdk/aws-ecr-assets:dockerIgnoreSupport': true, + }, +}); new TheParentStack(app, 'nested-stacks-docker'); app.synth(); diff --git a/packages/@aws-cdk/aws-ecr-assets/test/whitelisted-image/.dockerignore b/packages/@aws-cdk/aws-ecr-assets/test/whitelisted-image/.dockerignore new file mode 100644 index 0000000000000..c9ee265b3401e --- /dev/null +++ b/packages/@aws-cdk/aws-ecr-assets/test/whitelisted-image/.dockerignore @@ -0,0 +1,4 @@ +* +!foobar.txt +!index.py +!subdirectory/ diff --git a/packages/@aws-cdk/aws-ecr-assets/test/whitelisted-image/Dockerfile b/packages/@aws-cdk/aws-ecr-assets/test/whitelisted-image/Dockerfile new file mode 100644 index 0000000000000..123b5670febc8 --- /dev/null +++ b/packages/@aws-cdk/aws-ecr-assets/test/whitelisted-image/Dockerfile @@ -0,0 +1,5 @@ +FROM python:3.6 +EXPOSE 8000 +WORKDIR /src +ADD . /src +CMD python3 index.py diff --git a/packages/@aws-cdk/aws-ecr-assets/test/whitelisted-image/foobar.txt b/packages/@aws-cdk/aws-ecr-assets/test/whitelisted-image/foobar.txt new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/packages/@aws-cdk/aws-ecr-assets/test/whitelisted-image/index.py b/packages/@aws-cdk/aws-ecr-assets/test/whitelisted-image/index.py new file mode 100644 index 0000000000000..2ccedfce3ab76 --- /dev/null +++ b/packages/@aws-cdk/aws-ecr-assets/test/whitelisted-image/index.py @@ -0,0 +1,33 @@ +#!/usr/bin/python +import sys +import textwrap +import http.server +import socketserver + +PORT = 8000 + + +class Handler(http.server.SimpleHTTPRequestHandler): + def do_GET(self): + self.send_response(200) + self.send_header('Content-Type', 'text/html') + self.end_headers() + self.wfile.write(textwrap.dedent('''\ + + It works + +

Hello from the integ test container

+

This container got built and started as part of the integ test.

+ + + ''').encode('utf-8')) + + +def main(): + httpd = http.server.HTTPServer(("", PORT), Handler) + print("serving at port", PORT) + httpd.serve_forever() + + +if __name__ == '__main__': + main() diff --git a/packages/@aws-cdk/aws-ecr-assets/test/whitelisted-image/node_modules/one b/packages/@aws-cdk/aws-ecr-assets/test/whitelisted-image/node_modules/one new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/packages/@aws-cdk/aws-ecr-assets/test/whitelisted-image/node_modules/some_dep/file b/packages/@aws-cdk/aws-ecr-assets/test/whitelisted-image/node_modules/some_dep/file new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/packages/@aws-cdk/aws-ecr-assets/test/whitelisted-image/subdirectory/baz.txt b/packages/@aws-cdk/aws-ecr-assets/test/whitelisted-image/subdirectory/baz.txt new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.asset-image.expected.json b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.asset-image.expected.json index 4ec347a575bd8..364f0a27d8b15 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.asset-image.expected.json +++ b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.asset-image.expected.json @@ -497,7 +497,7 @@ { "Ref": "AWS::URLSuffix" }, - "/aws-cdk/assets:baa2d6eb2a17c75424df631c8c70ff39f2d5f3bee8b9e1a109ee24ca17300540" + "/aws-cdk/assets:b2c69bfbfe983b634456574587443159b3b7258849856a118ad3d2772238f1a5" ] ] }, @@ -752,4 +752,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.scheduled-fargate-task.lit.expected.json b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.scheduled-fargate-task.lit.expected.json index 76e8117cf8e42..8ffdd12ce4046 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.scheduled-fargate-task.lit.expected.json +++ b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.scheduled-fargate-task.lit.expected.json @@ -293,7 +293,7 @@ { "Ref": "AWS::URLSuffix" }, - "/aws-cdk/assets:baa2d6eb2a17c75424df631c8c70ff39f2d5f3bee8b9e1a109ee24ca17300540" + "/aws-cdk/assets:b2c69bfbfe983b634456574587443159b3b7258849856a118ad3d2772238f1a5" ] ] }, @@ -504,4 +504,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/test.ec2-task-definition.ts b/packages/@aws-cdk/aws-ecs/test/ec2/test.ec2-task-definition.ts index 9688e649b545c..39c7d40fdf7d0 100644 --- a/packages/@aws-cdk/aws-ecs/test/ec2/test.ec2-task-definition.ts +++ b/packages/@aws-cdk/aws-ecs/test/ec2/test.ec2-task-definition.ts @@ -545,7 +545,12 @@ export = { 'correctly sets containers from asset using default props'(test: Test) { // GIVEN - const stack = new cdk.Stack(); + const app = new cdk.App({ + context: { + '@aws-cdk/aws-ecr-assets:dockerIgnoreSupport': true, + }, + }); + const stack = new cdk.Stack(app, 'Stack'); const taskDefinition = new ecs.Ec2TaskDefinition(stack, 'Ec2TaskDef'); @@ -557,7 +562,7 @@ export = { // THEN expect(stack).to(haveResource('AWS::ECS::TaskDefinition', { - Family: 'Ec2TaskDef', + Family: 'StackEc2TaskDefF03698CF', ContainerDefinitions: [ { Essential: true, @@ -576,7 +581,7 @@ export = { { Ref: 'AWS::URLSuffix', }, - '/aws-cdk/assets:baa2d6eb2a17c75424df631c8c70ff39f2d5f3bee8b9e1a109ee24ca17300540', + '/aws-cdk/assets:b2c69bfbfe983b634456574587443159b3b7258849856a118ad3d2772238f1a5', ], ], }, diff --git a/packages/@aws-cdk/aws-ecs/test/test.container-definition.ts b/packages/@aws-cdk/aws-ecs/test/test.container-definition.ts index cb282dd9bf870..06acd4f620083 100644 --- a/packages/@aws-cdk/aws-ecs/test/test.container-definition.ts +++ b/packages/@aws-cdk/aws-ecs/test/test.container-definition.ts @@ -1367,7 +1367,12 @@ export = { 'can use a DockerImageAsset directly for a container image'(test: Test) { // GIVEN - const stack = new cdk.Stack(); + const app = new cdk.App({ + context: { + '@aws-cdk/aws-ecr-assets:dockerIgnoreSupport': true, + }, + }); + const stack = new cdk.Stack(app, 'Stack'); const taskDefinition = new ecs.Ec2TaskDefinition(stack, 'TaskDef'); const asset = new ecr_assets.DockerImageAsset(stack, 'MyDockerImage', { directory: path.join(__dirname, 'demo-image'), @@ -1393,7 +1398,7 @@ export = { { Ref: 'AWS::Region' }, '.', { Ref: 'AWS::URLSuffix' }, - '/aws-cdk/assets:baa2d6eb2a17c75424df631c8c70ff39f2d5f3bee8b9e1a109ee24ca17300540', + '/aws-cdk/assets:b2c69bfbfe983b634456574587443159b3b7258849856a118ad3d2772238f1a5', ], ], }, @@ -1433,7 +1438,11 @@ export = { 'docker image asset options can be used when using container image'(test: Test) { // GIVEN - const app = new cdk.App(); + const app = new cdk.App({ + context: { + '@aws-cdk/aws-ecr-assets:dockerIgnoreSupport': true, + }, + }); const stack = new cdk.Stack(app, 'MyStack'); const taskDefinition = new ecs.Ec2TaskDefinition(stack, 'TaskDef'); @@ -1450,11 +1459,11 @@ export = { const asm = app.synth(); test.deepEqual(asm.getStackArtifact(stack.artifactId).assets[0], { repositoryName: 'aws-cdk/assets', - imageTag: 'f9014d1df7c8f5a5e7abaf18eb5bc895e82f8b06eeed6f75a40cf1bc2a78955a', - id: 'f9014d1df7c8f5a5e7abaf18eb5bc895e82f8b06eeed6f75a40cf1bc2a78955a', + imageTag: 'ce3419d7c5d2d44e2789b13ccbd2d54ddf682557669f68bcee753231f5f1c0a5', + id: 'ce3419d7c5d2d44e2789b13ccbd2d54ddf682557669f68bcee753231f5f1c0a5', packaging: 'container-image', - path: 'asset.f9014d1df7c8f5a5e7abaf18eb5bc895e82f8b06eeed6f75a40cf1bc2a78955a', - sourceHash: 'f9014d1df7c8f5a5e7abaf18eb5bc895e82f8b06eeed6f75a40cf1bc2a78955a', + path: 'asset.ce3419d7c5d2d44e2789b13ccbd2d54ddf682557669f68bcee753231f5f1c0a5', + sourceHash: 'ce3419d7c5d2d44e2789b13ccbd2d54ddf682557669f68bcee753231f5f1c0a5', target: 'build-target', file: 'index.py', }); diff --git a/packages/@aws-cdk/aws-events-targets/test/ecs/integ.event-ec2-task.lit.expected.json b/packages/@aws-cdk/aws-events-targets/test/ecs/integ.event-ec2-task.lit.expected.json index 5fb1bb925e0bf..eaa617893829d 100644 --- a/packages/@aws-cdk/aws-events-targets/test/ecs/integ.event-ec2-task.lit.expected.json +++ b/packages/@aws-cdk/aws-events-targets/test/ecs/integ.event-ec2-task.lit.expected.json @@ -714,7 +714,7 @@ { "Ref": "AWS::URLSuffix" }, - "/aws-cdk/assets:1f37178655533422f6654c973b99eadec99a723c7181c912e4fb0976187c687c" + "/aws-cdk/assets:709fd91ba301f9b460ce1066dbc339f6a29bd4a07609ff98fb0e0faa475b650d" ] ] }, @@ -935,4 +935,4 @@ "Default": "/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id" } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-events-targets/test/ecs/integ.event-fargate-task.expected.json b/packages/@aws-cdk/aws-events-targets/test/ecs/integ.event-fargate-task.expected.json index e3899f84125c2..8062d441cc13d 100644 --- a/packages/@aws-cdk/aws-events-targets/test/ecs/integ.event-fargate-task.expected.json +++ b/packages/@aws-cdk/aws-events-targets/test/ecs/integ.event-fargate-task.expected.json @@ -237,7 +237,7 @@ { "Ref": "AWS::URLSuffix" }, - "/aws-cdk/assets:1f37178655533422f6654c973b99eadec99a723c7181c912e4fb0976187c687c" + "/aws-cdk/assets:709fd91ba301f9b460ce1066dbc339f6a29bd4a07609ff98fb0e0faa475b650d" ] ] }, @@ -498,4 +498,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.expected.json index 7d6104ca73d1a..d7c5476ab3488 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.expected.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.expected.json @@ -869,7 +869,7 @@ { "Ref": "AWS::URLSuffix" }, - "/aws-cdk/assets:4ba4a660dbcc1e71f0bf07105626a5bc65d95ae71724dc57bbb94c8e14202342" + "/aws-cdk/assets:10112d0d2c68a9d76297acc4623b1af0d5e9fd11b2226eee455e09c6fcf1b776" ] ] }, @@ -1033,4 +1033,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.expected.json index ba8874b8d44d0..165ab49ae11a7 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.expected.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.expected.json @@ -869,7 +869,7 @@ { "Ref": "AWS::URLSuffix" }, - "/aws-cdk/assets:4ba4a660dbcc1e71f0bf07105626a5bc65d95ae71724dc57bbb94c8e14202342" + "/aws-cdk/assets:10112d0d2c68a9d76297acc4623b1af0d5e9fd11b2226eee455e09c6fcf1b776" ] ] }, @@ -1033,4 +1033,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.expected.json index bf007c4e55c32..f9694026e0630 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.expected.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.expected.json @@ -501,7 +501,7 @@ { "Ref": "AWS::URLSuffix" }, - "/aws-cdk/assets:1f37178655533422f6654c973b99eadec99a723c7181c912e4fb0976187c687c" + "/aws-cdk/assets:709fd91ba301f9b460ce1066dbc339f6a29bd4a07609ff98fb0e0faa475b650d" ] ] }, @@ -752,4 +752,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.expected.json index 09e4369720880..26ef883551481 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.expected.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.expected.json @@ -501,7 +501,7 @@ { "Ref": "AWS::URLSuffix" }, - "/aws-cdk/assets:1f37178655533422f6654c973b99eadec99a723c7181c912e4fb0976187c687c" + "/aws-cdk/assets:709fd91ba301f9b460ce1066dbc339f6a29bd4a07609ff98fb0e0faa475b650d" ] ] }, @@ -745,4 +745,4 @@ "Default": "/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id" } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.expected.json index 3d131dd24f6cf..080638d46ddcb 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.expected.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.expected.json @@ -34,7 +34,7 @@ { "Ref": "AWS::URLSuffix" }, - "/aws-cdk/assets:1f37178655533422f6654c973b99eadec99a723c7181c912e4fb0976187c687c" + "/aws-cdk/assets:709fd91ba301f9b460ce1066dbc339f6a29bd4a07609ff98fb0e0faa475b650d" ] ] }, @@ -302,4 +302,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.expected.json index c99f991489a69..7f15f160b7c39 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.expected.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.expected.json @@ -34,7 +34,7 @@ { "Ref": "AWS::URLSuffix" }, - "/aws-cdk/assets:1f37178655533422f6654c973b99eadec99a723c7181c912e4fb0976187c687c" + "/aws-cdk/assets:709fd91ba301f9b460ce1066dbc339f6a29bd4a07609ff98fb0e0faa475b650d" ] ] }, @@ -295,4 +295,4 @@ ] } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/core/NOTICE b/packages/@aws-cdk/core/NOTICE index d103738dc9483..9ff5649eac07b 100644 --- a/packages/@aws-cdk/core/NOTICE +++ b/packages/@aws-cdk/core/NOTICE @@ -37,4 +37,52 @@ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEM OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----------------- \ No newline at end of file +---------------- + +** ignore - https://www.npmjs.com/package/ignore +Copyright (c) 2013 Kael Zhang , contributors +http://kael.me/ + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** @balena/dockerignore - https://www.npmjs.com/package/@balena/dockerignore +The MIT License (MIT) + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +---------------- diff --git a/packages/@aws-cdk/core/lib/asset-staging.ts b/packages/@aws-cdk/core/lib/asset-staging.ts index 6d63f7a449414..047462ddeca71 100644 --- a/packages/@aws-cdk/core/lib/asset-staging.ts +++ b/packages/@aws-cdk/core/lib/asset-staging.ts @@ -165,6 +165,7 @@ export class AssetStaging extends CoreConstruct { customFingerprint: this.customSourceFingerprint, extraHash: props.extraHash, exclude: props.exclude, + ignoreMode: props.ignoreMode, skip, }); diff --git a/packages/@aws-cdk/core/lib/fs/copy.ts b/packages/@aws-cdk/core/lib/fs/copy.ts index d4c2841feeb6b..b9feb555c8f65 100644 --- a/packages/@aws-cdk/core/lib/fs/copy.ts +++ b/packages/@aws-cdk/core/lib/fs/copy.ts @@ -1,14 +1,16 @@ import * as fs from 'fs'; import * as path from 'path'; +import { IgnoreStrategy } from './ignore'; import { CopyOptions, SymlinkFollowMode } from './options'; -import { shouldExclude, shouldFollow } from './utils'; +import { shouldFollow } from './utils'; export function copyDirectory(srcDir: string, destDir: string, options: CopyOptions = { }, rootDir?: string) { const follow = options.follow !== undefined ? options.follow : SymlinkFollowMode.EXTERNAL; - const exclude = options.exclude || []; rootDir = rootDir || srcDir; + const ignoreStrategy = IgnoreStrategy.fromCopyOptions(options, rootDir); + if (!fs.statSync(srcDir).isDirectory()) { throw new Error(`${srcDir} is not a directory`); } @@ -17,7 +19,7 @@ export function copyDirectory(srcDir: string, destDir: string, options: CopyOpti for (const file of files) { const sourceFilePath = path.join(srcDir, file); - if (shouldExclude(exclude, path.relative(rootDir, sourceFilePath))) { + if (ignoreStrategy.ignores(sourceFilePath)) { continue; } diff --git a/packages/@aws-cdk/core/lib/fs/fingerprint.ts b/packages/@aws-cdk/core/lib/fs/fingerprint.ts index ca7da486a5d03..f7513d89743be 100644 --- a/packages/@aws-cdk/core/lib/fs/fingerprint.ts +++ b/packages/@aws-cdk/core/lib/fs/fingerprint.ts @@ -1,8 +1,9 @@ import * as crypto from 'crypto'; import * as fs from 'fs'; import * as path from 'path'; -import { FingerprintOptions, SymlinkFollowMode } from './options'; -import { shouldExclude, shouldFollow } from './utils'; +import { IgnoreStrategy } from './ignore'; +import { FingerprintOptions, IgnoreMode, SymlinkFollowMode } from './options'; +import { shouldFollow } from './utils'; const BUFFER_SIZE = 8 * 1024; const CTRL_SOH = '\x01'; @@ -33,18 +34,26 @@ export function fingerprint(fileOrDirectory: string, options: FingerprintOptions if (exclude.length) { _hashField(hash, 'options.exclude', JSON.stringify(exclude)); } + + const ignoreMode = options.ignoreMode || IgnoreMode.GLOB; + if (ignoreMode != IgnoreMode.GLOB) { + _hashField(hash, 'options.ignoreMode', ignoreMode); + } + + const ignoreStrategy = IgnoreStrategy.fromCopyOptions(options, fileOrDirectory); const isDir = fs.statSync(fileOrDirectory).isDirectory(); _processFileOrDirectory(fileOrDirectory, isDir); return hash.digest('hex'); function _processFileOrDirectory(symbolicPath: string, isRootDir: boolean = false, realPath = symbolicPath) { - if (!isRootDir && shouldExclude(exclude, symbolicPath)) { + const relativePath = path.relative(fileOrDirectory, symbolicPath); + + if (!isRootDir && ignoreStrategy.ignores(symbolicPath)) { return; } const stat = fs.lstatSync(realPath); - const relativePath = path.relative(fileOrDirectory, symbolicPath); if (stat.isSymbolicLink()) { const linkTarget = fs.readlinkSync(realPath); diff --git a/packages/@aws-cdk/core/lib/fs/ignore.ts b/packages/@aws-cdk/core/lib/fs/ignore.ts new file mode 100644 index 0000000000000..24a7114fb4707 --- /dev/null +++ b/packages/@aws-cdk/core/lib/fs/ignore.ts @@ -0,0 +1,223 @@ +import * as path from 'path'; +import dockerIgnore, * as DockerIgnore from '@balena/dockerignore'; +import gitIgnore, * as GitIgnore from 'ignore'; +import * as minimatch from 'minimatch'; +import { CopyOptions, IgnoreMode } from './options'; + +/** + * Represents file path ignoring behavior. + */ +export abstract class IgnoreStrategy { + /** + * Ignores file paths based on simple glob patterns. + * + * @returns `GlobIgnorePattern` associated with the given patterns. + * @param absoluteRootPath the absolute path to the root directory of the paths to be considered + * @param patterns + */ + public static glob(absoluteRootPath: string, patterns: string[]): GlobIgnoreStrategy { + return new GlobIgnoreStrategy(absoluteRootPath, patterns); + } + + /** + * Ignores file paths based on the [`.gitignore specification`](https://git-scm.com/docs/gitignore). + * + * @returns `GitIgnorePattern` associated with the given patterns. + * @param absoluteRootPath the absolute path to the root directory of the paths to be considered + * @param patterns + */ + public static git(absoluteRootPath: string, patterns: string[]): GitIgnoreStrategy { + return new GitIgnoreStrategy(absoluteRootPath, patterns); + } + + /** + * Ignores file paths based on the [`.dockerignore specification`](https://docs.docker.com/engine/reference/builder/#dockerignore-file). + * + * @returns `DockerIgnorePattern` associated with the given patterns. + * @param absoluteRootPath the absolute path to the root directory of the paths to be considered + * @param patterns + */ + public static docker(absoluteRootPath: string, patterns: string[]): DockerIgnoreStrategy { + return new DockerIgnoreStrategy(absoluteRootPath, patterns); + } + + /** + * Creates an IgnoreStrategy based on the `ignoreMode` and `exclude` in a `CopyOptions`. + * + * @returns `IgnoreStrategy` based on the `CopyOptions` + * @param absoluteRootPath the absolute path to the root directory of the paths to be considered + * @param options the `CopyOptions` to create the `IgnoreStrategy` from + */ + public static fromCopyOptions(options: CopyOptions, absoluteRootPath: string): IgnoreStrategy { + const ignoreMode = options.ignoreMode || IgnoreMode.GLOB; + const exclude = options.exclude || []; + + switch (ignoreMode) { + case IgnoreMode.GLOB: + return this.glob(absoluteRootPath, exclude); + + case IgnoreMode.GIT: + return this.git(absoluteRootPath, exclude); + + case IgnoreMode.DOCKER: + return this.docker(absoluteRootPath, exclude); + } + } + + /** + * Adds another pattern. + * @params pattern the pattern to add + */ + public abstract add(pattern: string): void; + + /** + * Determines whether a given file path should be ignored or not. + * + * @param absoluteFilePath absolute file path to be assessed against the pattern + * @returns `true` if the file should be ignored + */ + public abstract ignores(absoluteFilePath: string): boolean; +} + +/** + * Ignores file paths based on simple glob patterns. + */ +export class GlobIgnoreStrategy extends IgnoreStrategy { + private readonly absoluteRootPath: string; + private readonly patterns: string[]; + + constructor(absoluteRootPath: string, patterns: string[]) { + super(); + + if (!path.isAbsolute(absoluteRootPath)) { + throw new Error('GlobIgnoreStrategy expects an absolute file path'); + } + + this.absoluteRootPath = absoluteRootPath; + this.patterns = patterns; + } + + /** + * Adds another pattern. + * @params pattern the pattern to add + */ + public add(pattern: string): void { + this.patterns.push(pattern); + } + + /** + * Determines whether a given file path should be ignored or not. + * + * @param absoluteFilePath absolute file path to be assessed against the pattern + * @returns `true` if the file should be ignored + */ + public ignores(absoluteFilePath: string): boolean { + if (!path.isAbsolute(absoluteFilePath)) { + throw new Error('GlobIgnoreStrategy.ignores() expects an absolute path'); + } + + let relativePath = path.relative(this.absoluteRootPath, absoluteFilePath); + let excludeOutput = false; + + for (const pattern of this.patterns) { + const negate = pattern.startsWith('!'); + const match = minimatch(relativePath, pattern, { matchBase: true, flipNegate: true }); + + if (!negate && match) { + excludeOutput = true; + } + + if (negate && match) { + excludeOutput = false; + } + } + + return excludeOutput; + } +} + +/** + * Ignores file paths based on the [`.gitignore specification`](https://git-scm.com/docs/gitignore). + */ +export class GitIgnoreStrategy extends IgnoreStrategy { + private readonly absoluteRootPath: string; + private readonly ignore: GitIgnore.Ignore; + + constructor(absoluteRootPath: string, patterns: string[]) { + super(); + + if (!path.isAbsolute(absoluteRootPath)) { + throw new Error('GitIgnoreStrategy expects an absolute file path'); + } + + this.absoluteRootPath = absoluteRootPath; + this.ignore = gitIgnore().add(patterns); + } + + /** + * Adds another pattern. + * @params pattern the pattern to add + */ + public add(pattern: string): void { + this.ignore.add(pattern); + } + + /** + * Determines whether a given file path should be ignored or not. + * + * @param absoluteFilePath absolute file path to be assessed against the pattern + * @returns `true` if the file should be ignored + */ + public ignores(absoluteFilePath: string): boolean { + if (!path.isAbsolute(absoluteFilePath)) { + throw new Error('GitIgnoreStrategy.ignores() expects an absolute path'); + } + + let relativePath = path.relative(this.absoluteRootPath, absoluteFilePath); + + return this.ignore.ignores(relativePath); + } +} + +/** + * Ignores file paths based on the [`.dockerignore specification`](https://docs.docker.com/engine/reference/builder/#dockerignore-file). + */ +export class DockerIgnoreStrategy extends IgnoreStrategy { + private readonly absoluteRootPath: string; + private readonly ignore: DockerIgnore.Ignore; + + constructor(absoluteRootPath: string, patterns: string[]) { + super(); + + if (!path.isAbsolute(absoluteRootPath)) { + throw new Error('DockerIgnoreStrategy expects an absolute file path'); + } + + this.absoluteRootPath = absoluteRootPath; + this.ignore = dockerIgnore().add(patterns); + } + + /** + * Adds another pattern. + * @params pattern the pattern to add + */ + public add(pattern: string): void { + this.ignore.add(pattern); + } + + /** + * Determines whether a given file path should be ignored or not. + * + * @param absoluteFilePath absolute file path to be assessed against the pattern + * @returns `true` if the file should be ignored + */ + public ignores(absoluteFilePath: string): boolean { + if (!path.isAbsolute(absoluteFilePath)) { + throw new Error('DockerIgnoreStrategy.ignores() expects an absolute path'); + } + + let relativePath = path.relative(this.absoluteRootPath, absoluteFilePath); + + return this.ignore.ignores(relativePath); + } +} diff --git a/packages/@aws-cdk/core/lib/fs/index.ts b/packages/@aws-cdk/core/lib/fs/index.ts index 4ecfea7c2471c..21554eda79830 100644 --- a/packages/@aws-cdk/core/lib/fs/index.ts +++ b/packages/@aws-cdk/core/lib/fs/index.ts @@ -5,6 +5,7 @@ import { copyDirectory } from './copy'; import { fingerprint } from './fingerprint'; import { CopyOptions, FingerprintOptions } from './options'; +export * from './ignore'; export * from './options'; /** diff --git a/packages/@aws-cdk/core/lib/fs/options.ts b/packages/@aws-cdk/core/lib/fs/options.ts index eef3fcc499b08..3ea836a24e831 100644 --- a/packages/@aws-cdk/core/lib/fs/options.ts +++ b/packages/@aws-cdk/core/lib/fs/options.ts @@ -30,6 +30,34 @@ export enum SymlinkFollowMode { BLOCK_EXTERNAL = 'internal-only', } +/** + * Determines the ignore behavior to use. + */ +export enum IgnoreMode { + /** + * Ignores file paths based on simple glob patterns. + * + * This is the default for file assets. + * + * It is also the default for Docker image assets, unless the '@aws-cdk/aws-ecr-assets:dockerIgnoreSupport' + * context flag is set. + */ + GLOB = 'glob', + + /** + * Ignores file paths based on the [`.gitignore specification`](https://git-scm.com/docs/gitignore). + */ + GIT = 'git', + + /** + * Ignores file paths based on the [`.dockerignore specification`](https://docs.docker.com/engine/reference/builder/#dockerignore-file). + * + * This is the default for Docker image assets if the '@aws-cdk/aws-ecr-assets:dockerIgnoreSupport' + * context flag is set. + */ + DOCKER = 'docker' +}; + /** * Obtains applied when copying directories into the staging location. */ @@ -47,6 +75,13 @@ export interface CopyOptions { * @default - nothing is excluded */ readonly exclude?: string[]; + + /** + * The ignore behavior to use for exclude patterns. + * + * @default IgnoreMode.GLOB + */ + readonly ignoreMode?: IgnoreMode; } /** diff --git a/packages/@aws-cdk/core/lib/fs/utils.ts b/packages/@aws-cdk/core/lib/fs/utils.ts index 84c520f0f14f9..bcf41dfca7e51 100644 --- a/packages/@aws-cdk/core/lib/fs/utils.ts +++ b/packages/@aws-cdk/core/lib/fs/utils.ts @@ -1,36 +1,7 @@ import * as fs from 'fs'; import * as path from 'path'; -import * as minimatch from 'minimatch'; import { SymlinkFollowMode } from './options'; -/** - * Determines whether a given file should be excluded or not based on given - * exclusion glob patterns. - * - * @param exclude exclusion patterns - * @param filePath file path to be assessed against the pattern - * - * @returns `true` if the file should be excluded - */ -export function shouldExclude(exclude: string[], filePath: string): boolean { - let excludeOutput = false; - - for (const pattern of exclude) { - const negate = pattern.startsWith('!'); - const match = minimatch(filePath, pattern, { matchBase: true, flipNegate: true }); - - if (!negate && match) { - excludeOutput = true; - } - - if (negate && match) { - excludeOutput = false; - } - } - - return excludeOutput; -} - /** * Determines whether a symlink should be followed or not, based on a FollowMode. * diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json index af60767b0c135..c673193b26427 100644 --- a/packages/@aws-cdk/core/package.json +++ b/packages/@aws-cdk/core/package.json @@ -187,11 +187,15 @@ "@aws-cdk/region-info": "0.0.0", "constructs": "^3.2.0", "fs-extra": "^9.0.1", - "minimatch": "^3.0.4" + "minimatch": "^3.0.4", + "@balena/dockerignore": "^1.0.2", + "ignore": "^5.1.8" }, "bundledDependencies": [ "fs-extra", - "minimatch" + "minimatch", + "@balena/dockerignore", + "ignore" ], "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { diff --git a/packages/@aws-cdk/core/test/fs/fs-ignore.test.ts b/packages/@aws-cdk/core/test/fs/fs-ignore.test.ts new file mode 100644 index 0000000000000..19cf979a650b5 --- /dev/null +++ b/packages/@aws-cdk/core/test/fs/fs-ignore.test.ts @@ -0,0 +1,125 @@ +import { IgnoreStrategy } from '../../lib/fs'; + +function strategyIgnores(strategy: IgnoreStrategy, files: string[]) { + return files.filter(file => strategy.ignores(file)); +} + +function strategyPermits(strategy: IgnoreStrategy, files: string[]) { + return files.filter(file => !strategy.ignores(file)); +} + +describe('GlobIgnoreStrategy', () => { + test('excludes nothing by default', () => { + const strategy = IgnoreStrategy.glob('/tmp', []); + const permits = [ + '/tmp/some/file/path', + ]; + + expect(strategyPermits(strategy, permits)).toEqual(permits); + }); + + test('excludes requested files', () => { + const strategy = IgnoreStrategy.glob('/tmp', ['*.ignored']); + const ignores = [ + '/tmp/some/file.ignored', + ]; + const permits = [ + '/tmp/some/important/file', + ]; + + expect(strategyIgnores(strategy, ignores)).toEqual(ignores); + expect(strategyPermits(strategy, permits)).toEqual(permits); + }); + + test('does not exclude whitelisted files', () => { + const strategy = IgnoreStrategy.glob('/tmp', ['*.ignored', '!important.*']); + const permits = [ + '/tmp/some/important.ignored', + ]; + + expect(strategyPermits(strategy, permits)).toEqual(permits); + }); + + test('does not exclude .dockerignore and Dockerfile at the root', () => { + const strategy = IgnoreStrategy.glob('/tmp', ['*.ignored', '!Dockerfile', '!.dockerignore']); + const ignores = [ + '/tmp/foo.ignored', + '/tmp/some/important.ignored', + ]; + const permits = [ + '/tmp/Dockerfile', + '/tmp/.dockerignore', + ]; + + expect(strategyIgnores(strategy, ignores)).toEqual(ignores); + expect(strategyPermits(strategy, permits)).toEqual(permits); + }); +}); + +describe('GitIgnoreStrategy', () => { + test('excludes nothing by default', () => { + const strategy = IgnoreStrategy.git('/tmp', []); + const permits = [ + '/tmp/some/file/path', + ]; + + expect(strategyPermits(strategy, permits)).toEqual(permits); + }); + + test('excludes requested files', () => { + const strategy = IgnoreStrategy.git('/tmp', ['*.ignored']); + const ignores = [ + '/tmp/some/file.ignored', + ]; + const permits = [ + '/tmp/some/important/file', + ]; + + expect(strategyIgnores(strategy, ignores)).toEqual(ignores); + expect(strategyPermits(strategy, permits)).toEqual(permits); + }); + + test('does not exclude whitelisted files', () => { + const strategy = IgnoreStrategy.git('/tmp', ['*.ignored', '!important.*']); + const permits = [ + '/tmp/some/important.ignored', + ]; + + expect(strategyPermits(strategy, permits)).toEqual(permits); + }); +}); + +describe('DockerIgnoreStrategy', () => { + test('excludes nothing by default', () => { + const strategy = IgnoreStrategy.docker('/tmp', []); + const permits = [ + '/tmp/some/file/path', + ]; + + expect(strategyPermits(strategy, permits)).toEqual(permits); + }); + + test('excludes requested files', () => { + // In .dockerignore, * only matches files in the current directory + const strategy = IgnoreStrategy.docker('/tmp', ['*.ignored']); + const ignores = [ + '/tmp/file.ignored', + ]; + const permits = [ + '/tmp/some/file.ignored', + '/tmp/some/important/file', + ]; + + expect(strategyIgnores(strategy, ignores)).toEqual(ignores); + expect(strategyPermits(strategy, permits)).toEqual(permits); + }); + + test('does not exclude whitelisted files', () => { + const strategy = IgnoreStrategy.docker('/tmp', ['*.ignored', '!important.*']); + const permits = [ + '/tmp/some/important.ignored', + ]; + + expect(strategyPermits(strategy, permits)).toEqual(permits); + }); +}); diff --git a/packages/@aws-cdk/core/test/fs/utils.test.ts b/packages/@aws-cdk/core/test/fs/utils.test.ts index 1013095199a03..1eef1b6c83573 100644 --- a/packages/@aws-cdk/core/test/fs/utils.test.ts +++ b/packages/@aws-cdk/core/test/fs/utils.test.ts @@ -6,26 +6,6 @@ import { SymlinkFollowMode } from '../../lib/fs'; import * as util from '../../lib/fs/utils'; nodeunitShim({ - shouldExclude: { - 'excludes nothing by default'(test: Test) { - test.ok(!util.shouldExclude([], path.join('some', 'file', 'path'))); - test.done(); - }, - - 'excludes requested files'(test: Test) { - const exclusions = ['*.ignored']; - test.ok(util.shouldExclude(exclusions, path.join('some', 'file.ignored'))); - test.ok(!util.shouldExclude(exclusions, path.join('some', 'important', 'file'))); - test.done(); - }, - - 'does not exclude whitelisted files'(test: Test) { - const exclusions = ['*.ignored', '!important.*']; - test.ok(!util.shouldExclude(exclusions, path.join('some', 'important.ignored'))); - test.done(); - }, - }, - shouldFollow: { always: { 'follows internal'(test: Test) { diff --git a/packages/@aws-cdk/cx-api/lib/features.ts b/packages/@aws-cdk/cx-api/lib/features.ts index 0a4ee8b8d02b0..d28a88071f10d 100644 --- a/packages/@aws-cdk/cx-api/lib/features.ts +++ b/packages/@aws-cdk/cx-api/lib/features.ts @@ -44,6 +44,18 @@ export const NEW_STYLE_STACK_SYNTHESIS_CONTEXT = '@aws-cdk/core:newStyleStackSyn */ export const STACK_RELATIVE_EXPORTS_CONTEXT = '@aws-cdk/core:stackRelativeExports'; +/** + * DockerImageAsset properly supports `.dockerignore` files by default + * + * If this flag is not set, the default behavior for `DockerImageAsset` is to use + * glob semantics for `.dockerignore` files. If this flag is set, the default behavior + * is standard Docker ignore semantics. + * + * This is a feature flag as the old behavior was technically incorrect but + * users may have come to depend on it. + */ +export const DOCKER_IGNORE_SUPPORT = '@aws-cdk/aws-ecr-assets:dockerIgnoreSupport'; + /** * This map includes context keys and values for feature flags that enable * capabilities "from the future", which we could not introduce as the default @@ -61,6 +73,7 @@ export const FUTURE_FLAGS = { [ENABLE_STACK_NAME_DUPLICATES_CONTEXT]: 'true', [ENABLE_DIFF_NO_FAIL_CONTEXT]: 'true', [STACK_RELATIVE_EXPORTS_CONTEXT]: 'true', + [DOCKER_IGNORE_SUPPORT]: true, // We will advertise this flag when the feature is complete // [NEW_STYLE_STACK_SYNTHESIS_CONTEXT]: 'true', @@ -75,6 +88,7 @@ const FUTURE_FLAGS_DEFAULTS: { [key: string]: boolean } = { [ENABLE_DIFF_NO_FAIL_CONTEXT]: false, [STACK_RELATIVE_EXPORTS_CONTEXT]: false, [NEW_STYLE_STACK_SYNTHESIS_CONTEXT]: false, + [DOCKER_IGNORE_SUPPORT]: false, }; export function futureFlagDefault(flag: string): boolean { diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index 2f8b786e7e01b..2f03821f61c73 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -78,8 +78,10 @@ }, "license": "Apache-2.0", "bundledDependencies": [ + "@balena/dockerignore", "case", "fs-extra", + "ignore", "jsonschema", "minimatch", "punycode", @@ -87,8 +89,10 @@ "yaml" ], "dependencies": { + "@balena/dockerignore": "^1.0.2", "case": "1.6.3", "fs-extra": "^9.0.1", + "ignore": "^5.1.8", "jsonschema": "^1.4.0", "minimatch": "^3.0.4", "punycode": "^2.1.1", diff --git a/packages/monocdk/NOTICE b/packages/monocdk/NOTICE index 12897b42a4062..201344067fcb2 100644 --- a/packages/monocdk/NOTICE +++ b/packages/monocdk/NOTICE @@ -144,4 +144,52 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----------------- \ No newline at end of file +---------------- + +** ignore - https://www.npmjs.com/package/ignore +Copyright (c) 2013 Kael Zhang , contributors +http://kael.me/ + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** @balena/dockerignore - https://www.npmjs.com/package/@balena/dockerignore +The MIT License (MIT) + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +---------------- diff --git a/packages/monocdk/package.json b/packages/monocdk/package.json index 8783378fbef4f..f6b5dc263a9fb 100644 --- a/packages/monocdk/package.json +++ b/packages/monocdk/package.json @@ -77,8 +77,10 @@ }, "license": "Apache-2.0", "bundledDependencies": [ + "@balena/dockerignore", "case", "fs-extra", + "ignore", "jsonschema", "minimatch", "punycode", @@ -86,8 +88,10 @@ "yaml" ], "dependencies": { + "@balena/dockerignore": "^1.0.2", "case": "1.6.3", "fs-extra": "^9.0.1", + "ignore": "^5.1.8", "jsonschema": "^1.4.0", "minimatch": "^3.0.4", "punycode": "^2.1.1", diff --git a/tools/cdk-integ-tools/lib/integ-helpers.ts b/tools/cdk-integ-tools/lib/integ-helpers.ts index fb262278deb1e..3a81fe8466465 100644 --- a/tools/cdk-integ-tools/lib/integ-helpers.ts +++ b/tools/cdk-integ-tools/lib/integ-helpers.ts @@ -337,6 +337,7 @@ export const DEFAULT_SYNTH_OPTIONS = { }, ], }, + '@aws-cdk/aws-ecr-assets:dockerIgnoreSupport': true, }, env: { CDK_INTEG_ACCOUNT: '12345678', diff --git a/yarn.lock b/yarn.lock index be4190620c931..d019493b4c634 100644 --- a/yarn.lock +++ b/yarn.lock @@ -967,6 +967,11 @@ lodash "^4.17.19" to-fast-properties "^2.0.0" +"@balena/dockerignore@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@balena/dockerignore/-/dockerignore-1.0.2.tgz#9ffe4726915251e8eb69f44ef3547e0da2c03e0d" + integrity sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q== + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -7626,7 +7631,7 @@ ignore@^4.0.3, ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.1.4: +ignore@^5.1.1, ignore@^5.1.4, ignore@^5.1.8: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== From 787cc468b83f24bcf61d2a4ed21d5cc58178a214 Mon Sep 17 00:00:00 2001 From: Elad Ben-Israel Date: Tue, 10 Nov 2020 14:10:05 +0200 Subject: [PATCH 100/314] chore: 2.0.0a0 is accidentally identified as 0.0.0 by pack script (#11389) Backported from https://github.com/aws/aws-cdk/commit/9299d4e78222a43d8608090a79e95db7f65c4454 The pack script defensively checks if there are any artifacts versioned 0.0.0 under the `dist/` directory. Python artifacts are named like so: `aws_cdk.aws_iotanalytics-2.0.0a0-py3-none-any.whl` and since by default grep uses regular expressions, this matches `grep 0.0.0`. The fix is to use `-F` so that the search string is not treated as regex. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- pack.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pack.sh b/pack.sh index a61a461ce9f3e..de48b7dea0c2f 100755 --- a/pack.sh +++ b/pack.sh @@ -84,7 +84,7 @@ cp ${changelog_file} ${distdir}/CHANGELOG.md # defensive: make sure our artifacts don't use the version marker (this means # that "pack" will always fails when building in a dev environment) # when we get to 10.0.0, we can fix this... -if find dist/ | grep "${marker}"; then +if find dist/ | grep -F "${marker}"; then echo "ERROR: build artifacts use the version marker '${marker}' instead of a real version." echo "This is expected for builds in a development environment but should not happen in CI builds!" exit 1 From 76c795ae37d4168e8a98b3bc81034b455a8ae05e Mon Sep 17 00:00:00 2001 From: Petrovskyi Anatolii Date: Tue, 10 Nov 2020 13:39:37 +0100 Subject: [PATCH 101/314] feat(eks): IAM Roles for service accounts in imported clusters (#10774) Hi this is a try to fix #10601 I didn't add proper documentation and tests now because discussions about how to implement that are stale so I've decided to push it forward by creating this PR if you guys think this is a good approach I will proceed with the unit tests and proper documentation ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-eks/README.md | 26 +++ packages/@aws-cdk/aws-eks/lib/cluster.ts | 70 ++++++--- packages/@aws-cdk/aws-eks/lib/index.ts | 3 +- .../@aws-cdk/aws-eks/lib/legacy-cluster.ts | 21 +++ .../@aws-cdk/aws-eks/lib/oidc-provider.ts | 59 +++++++ .../@aws-cdk/aws-eks/lib/service-account.ts | 9 +- packages/@aws-cdk/aws-eks/package.json | 3 +- .../test/integ.eks-cluster.expected.json | 40 +++-- .../integ.eks-oidc-provider.expected.json | 148 ++++++++++++++++++ .../aws-eks/test/integ.eks-oidc-provider.ts | 12 ++ .../aws-eks/test/test.service-account.ts | 65 +++++++- .../@aws-cdk/aws-iam/lib/oidc-provider.ts | 31 +++- .../aws-iam/test/oidc-provider.test.ts | 36 ++++- 13 files changed, 473 insertions(+), 50 deletions(-) create mode 100644 packages/@aws-cdk/aws-eks/lib/oidc-provider.ts create mode 100644 packages/@aws-cdk/aws-eks/test/integ.eks-oidc-provider.expected.json create mode 100644 packages/@aws-cdk/aws-eks/test/integ.eks-oidc-provider.ts diff --git a/packages/@aws-cdk/aws-eks/README.md b/packages/@aws-cdk/aws-eks/README.md index de599ac1614ec..ad39037e100f7 100644 --- a/packages/@aws-cdk/aws-eks/README.md +++ b/packages/@aws-cdk/aws-eks/README.md @@ -643,6 +643,32 @@ new cdk.CfnOutput(this, 'ServiceAccountIamRole', { value: sa.role.roleArn }) Note that using `sa.serviceAccountName` above **does not** translate into a resource dependency. This is why an explicit dependency is needed. See for more details. +You can also add service accounts to existing clusters. +To do so, pass the `openIdConnectProvider` property when you import the cluster into the application. +```ts +// you can import an existing provider +const provider = eks.OpenIdConnectProvider.fromOpenIdConnectProviderArn(this, 'Provider', 'arn:aws:iam::123456:oidc-provider/oidc.eks.eu-west-1.amazonaws.com/id/AB123456ABC'); + +// or create a new one using an existing issuer url +const provider = new eks.OpenIdConnectProvider(this, 'Provider', issuerUrl); + +const cluster = eks.Cluster.fromClusterAttributes({ + clusterName: 'Cluster', + openIdConnectProvider: provider, + kubectlRoleArn: 'arn:aws:iam::123456:role/service-role/k8sservicerole', +}); + +const sa = cluster.addServiceAccount('MyServiceAccount'); + +const bucket = new Bucket(this, 'Bucket'); +bucket.grantReadWrite(serviceAccount); + +// ... +``` +Note that adding service accounts requires running `kubectl` commands against the cluster. +This means you must also pass the `kubectlRoleArn` when importing the cluster. +See [Using existing Clusters](https://github.com/aws/aws-cdk/tree/master/packages/@aws-cdk/aws-eks#using-existing-clusters). + ## Applying Kubernetes Resources The library supports several popular resource deployment mechanisms, among which are: diff --git a/packages/@aws-cdk/aws-eks/lib/cluster.ts b/packages/@aws-cdk/aws-eks/lib/cluster.ts index 7388c497a9906..ec6f048a4de58 100644 --- a/packages/@aws-cdk/aws-eks/lib/cluster.ts +++ b/packages/@aws-cdk/aws-eks/lib/cluster.ts @@ -19,6 +19,7 @@ import { KubernetesObjectValue } from './k8s-object-value'; import { KubernetesPatch } from './k8s-patch'; import { KubectlProvider } from './kubectl-provider'; import { Nodegroup, NodegroupOptions } from './managed-nodegroup'; +import { OpenIdConnectProvider } from './oidc-provider'; import { BottleRocketImage } from './private/bottlerocket'; import { ServiceAccount, ServiceAccountOptions } from './service-account'; import { LifecycleLabel, renderAmazonLinuxUserData, renderBottlerocketUserData } from './user-data'; @@ -77,6 +78,11 @@ export interface ICluster extends IResource, ec2.IConnectable { */ readonly clusterEncryptionConfigKeyArn: string; + /** + * The Open ID Connect Provider of the cluster used to configure Service Accounts. + */ + readonly openIdConnectProvider: iam.IOpenIdConnectProvider; + /** * An IAM role that can perform kubectl operations against this cluster. * @@ -113,6 +119,14 @@ export interface ICluster extends IResource, ec2.IConnectable { */ readonly kubectlLayer?: lambda.ILayerVersion; + /** + * Creates a new service account with corresponding IAM Role (IRSA). + * + * @param id logical id of service account + * @param options service account options + */ + addServiceAccount(id: string, options?: ServiceAccountOptions): ServiceAccount; + /** * Defines a Kubernetes resource in this cluster. * @@ -220,6 +234,14 @@ export interface ClusterAttributes { */ readonly kubectlPrivateSubnetIds?: string[]; + /** + * An Open ID Connect provider for this cluster that can be used to configure service accounts. + * You can either import an existing provider using `iam.OpenIdConnectProvider.fromProviderArn`, + * or create a new provider using `new eks.OpenIdConnectProvider` + * @default - if not specified `cluster.openIdConnectProvider` and `cluster.addServiceAccount` will throw an error. + */ + readonly openIdConnectProvider?: iam.IOpenIdConnectProvider; + /** * An AWS Lambda Layer which includes `kubectl`, Helm and the AWS CLI. * @@ -608,6 +630,7 @@ abstract class ClusterBase extends Resource implements ICluster { public abstract readonly kubectlEnvironment?: { [key: string]: string }; public abstract readonly kubectlSecurityGroup?: ec2.ISecurityGroup; public abstract readonly kubectlPrivateSubnets?: ec2.ISubnet[]; + public abstract readonly openIdConnectProvider: iam.IOpenIdConnectProvider; /** * Defines a Kubernetes resource in this cluster. @@ -651,6 +674,13 @@ abstract class ClusterBase extends Resource implements ICluster { return this.addManifest(id, ...cdk8sChart.toJson()); } + + public addServiceAccount(id: string, options: ServiceAccountOptions = {}): ServiceAccount { + return new ServiceAccount(this, id, { + ...options, + cluster: this, + }); + } } /** @@ -801,6 +831,11 @@ export class Cluster extends ClusterBase { */ private readonly _fargateProfiles: FargateProfile[] = []; + /** + * an Open ID Connect Provider instance + */ + private _openIdConnectProvider?: iam.IOpenIdConnectProvider; + /** * The AWS Lambda layer that contains `kubectl`, `helm` and the AWS CLI. If * undefined, a SAR app that contains this layer will be used. @@ -819,8 +854,6 @@ export class Cluster extends ClusterBase { */ private _awsAuth?: AwsAuth; - private _openIdConnectProvider?: iam.OpenIdConnectProvider; - private _spotInterruptHandler?: HelmChart; private _neuronDevicePlugin?: KubernetesManifest; @@ -851,7 +884,7 @@ export class Cluster extends ClusterBase { * Initiates an EKS Cluster with the supplied arguments * * @param scope a Construct, most likely a cdk.Stack created - * @param name the name of the Construct to create + * @param id the id of the Construct to create * @param props properties in the IClusterProps interface */ constructor(scope: Construct, id: string, props: ClusterProps) { @@ -1249,15 +1282,8 @@ export class Cluster extends ClusterBase { */ public get openIdConnectProvider() { if (!this._openIdConnectProvider) { - this._openIdConnectProvider = new iam.OpenIdConnectProvider(this, 'OpenIdConnectProvider', { + this._openIdConnectProvider = new OpenIdConnectProvider(this, 'OpenIdConnectProvider', { url: this.clusterOpenIdConnectIssuerUrl, - clientIds: ['sts.amazonaws.com'], - /** - * For some reason EKS isn't validating the root certificate but a intermediat certificate - * which is one level up in the tree. Because of the a constant thumbprint value has to be - * stated with this OpenID Connect provider. The certificate thumbprint is the same for all the regions. - */ - thumbprints: ['9e99a48a9960b14926bb7f3b02e22da2b0ab7280'], }); } @@ -1278,19 +1304,6 @@ export class Cluster extends ClusterBase { }); } - /** - * Adds a service account to this cluster. - * - * @param id the id of this service account - * @param options service account options - */ - public addServiceAccount(id: string, options: ServiceAccountOptions = { }) { - return new ServiceAccount(this, id, { - ...options, - cluster: this, - }); - } - /** * Internal API used by `FargateProfile` to keep inventory of Fargate profiles associated with * this cluster, for the sake of ensuring the profiles are created sequentially. @@ -1606,7 +1619,7 @@ export interface AutoScalingGroupOptions { /** * Import a cluster to use in another stack */ -class ImportedCluster extends ClusterBase implements ICluster { +class ImportedCluster extends ClusterBase { public readonly clusterName: string; public readonly clusterArn: string; public readonly connections = new ec2.Connections(); @@ -1672,6 +1685,13 @@ class ImportedCluster extends ClusterBase implements ICluster { } return this.props.clusterEncryptionConfigKeyArn; } + + public get openIdConnectProvider(): iam.IOpenIdConnectProvider { + if (!this.props.openIdConnectProvider) { + throw new Error('"openIdConnectProvider" is not defined for this imported cluster'); + } + return this.props.openIdConnectProvider; + } } /** diff --git a/packages/@aws-cdk/aws-eks/lib/index.ts b/packages/@aws-cdk/aws-eks/lib/index.ts index 2e4b7e47ae49c..633b51cc9ca30 100644 --- a/packages/@aws-cdk/aws-eks/lib/index.ts +++ b/packages/@aws-cdk/aws-eks/lib/index.ts @@ -11,4 +11,5 @@ export * from './k8s-object-value'; export * from './fargate-cluster'; export * from './service-account'; export * from './managed-nodegroup'; -export * from './kubectl-layer'; \ No newline at end of file +export * from './kubectl-layer'; +export * from './oidc-provider'; diff --git a/packages/@aws-cdk/aws-eks/lib/legacy-cluster.ts b/packages/@aws-cdk/aws-eks/lib/legacy-cluster.ts index 5fead1f4818e4..e19540cf7c3d4 100644 --- a/packages/@aws-cdk/aws-eks/lib/legacy-cluster.ts +++ b/packages/@aws-cdk/aws-eks/lib/legacy-cluster.ts @@ -11,6 +11,7 @@ import { CfnCluster, CfnClusterProps } from './eks.generated'; import { HelmChartOptions, HelmChart } from './helm-chart'; import { KubernetesManifest } from './k8s-manifest'; import { Nodegroup, NodegroupOptions } from './managed-nodegroup'; +import { ServiceAccount, ServiceAccountOptions } from './service-account'; import { renderAmazonLinuxUserData, renderBottlerocketUserData } from './user-data'; // defaults are based on https://eksctl.io @@ -244,6 +245,18 @@ export class LegacyCluster extends Resource implements ICluster { } } + public addServiceAccount(_id: string, _options?: ServiceAccountOptions): ServiceAccount { + throw new Error('legacy cluster does not support adding service accounts'); + } + + /** + * Since we dont really want to make it required on the top-level ICluster + * we do this trick here in return type to match interface type + */ + public get openIdConnectProvider(): iam.IOpenIdConnectProvider { + throw new Error('legacy cluster does not support open id connect providers'); + } + /** * Add nodes to this EKS cluster * @@ -437,6 +450,14 @@ class ImportedCluster extends Resource implements ICluster { throw new Error('legacy cluster does not support adding cdk8s charts'); } + public addServiceAccount(_id: string, _options?: ServiceAccountOptions): ServiceAccount { + throw new Error('legacy cluster does not support adding service accounts'); + } + + public get openIdConnectProvider(): iam.IOpenIdConnectProvider { + throw new Error('legacy cluster does not support open id connect providers'); + } + public get vpc() { if (!this.props.vpc) { throw new Error('"vpc" is not defined for this imported cluster'); diff --git a/packages/@aws-cdk/aws-eks/lib/oidc-provider.ts b/packages/@aws-cdk/aws-eks/lib/oidc-provider.ts new file mode 100644 index 0000000000000..5a3e90b1bdc38 --- /dev/null +++ b/packages/@aws-cdk/aws-eks/lib/oidc-provider.ts @@ -0,0 +1,59 @@ +import * as iam from '@aws-cdk/aws-iam'; +import { Construct } from 'constructs'; + +/** + * Initialization properties for `OpenIdConnectProvider`. + */ +export interface OpenIdConnectProviderProps { + /** + * The URL of the identity provider. The URL must begin with https:// and + * should correspond to the iss claim in the provider's OpenID Connect ID + * tokens. Per the OIDC standard, path components are allowed but query + * parameters are not. Typically the URL consists of only a hostname, like + * https://server.example.org or https://example.com. + * + * You can find your OIDC Issuer URL by: + * aws eks describe-cluster --name %cluster_name% --query "cluster.identity.oidc.issuer" --output text + */ + readonly url: string; +} + +/** + * IAM OIDC identity providers are entities in IAM that describe an external + * identity provider (IdP) service that supports the OpenID Connect (OIDC) + * standard, such as Google or Salesforce. You use an IAM OIDC identity provider + * when you want to establish trust between an OIDC-compatible IdP and your AWS + * account. + * + * This implementation has default values for thumbprints and clientIds props + * that will be compatible with the eks cluster + * + * @see http://openid.net/connect + * @see https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html + * + * @resource AWS::CloudFormation::CustomResource + */ +export class OpenIdConnectProvider extends iam.OpenIdConnectProvider { + /** + * Defines an OpenID Connect provider. + * @param scope The definition scope + * @param id Construct ID + * @param props Initialization properties + */ + public constructor(scope: Construct, id: string, props: OpenIdConnectProviderProps) { + /** + * For some reason EKS isn't validating the root certificate but a intermediate certificate + * which is one level up in the tree. Because of the a constant thumbprint value has to be + * stated with this OpenID Connect provider. The certificate thumbprint is the same for all the regions. + */ + const thumbprints = ['9e99a48a9960b14926bb7f3b02e22da2b0ab7280']; + + const clientIds = ['sts.amazonaws.com']; + + super(scope, id, { + url: props.url, + thumbprints, + clientIds, + }); + } +} diff --git a/packages/@aws-cdk/aws-eks/lib/service-account.ts b/packages/@aws-cdk/aws-eks/lib/service-account.ts index 17907d7f1685a..0ad6b238fdf89 100644 --- a/packages/@aws-cdk/aws-eks/lib/service-account.ts +++ b/packages/@aws-cdk/aws-eks/lib/service-account.ts @@ -1,7 +1,7 @@ import { AddToPrincipalPolicyResult, IPrincipal, IRole, OpenIdConnectPrincipal, PolicyStatement, PrincipalPolicyFragment, Role } from '@aws-cdk/aws-iam'; import { CfnJson, Names } from '@aws-cdk/core'; import { Construct } from 'constructs'; -import { Cluster } from './cluster'; +import { ICluster } from './cluster'; import { KubernetesManifest } from './k8s-manifest'; // v2 - keep this import as a separate section to reduce merge conflict when forward merging with the v2 branch. @@ -31,9 +31,8 @@ export interface ServiceAccountOptions { export interface ServiceAccountProps extends ServiceAccountOptions { /** * The cluster to apply the patch to. - * [disable-awslint:ref-via-interface] */ - readonly cluster: Cluster; + readonly cluster: ICluster; } /** @@ -71,8 +70,8 @@ export class ServiceAccount extends CoreConstruct implements IPrincipal { */ const conditions = new CfnJson(this, 'ConditionJson', { value: { - [`${cluster.clusterOpenIdConnectIssuer}:aud`]: 'sts.amazonaws.com', - [`${cluster.clusterOpenIdConnectIssuer}:sub`]: `system:serviceaccount:${this.serviceAccountNamespace}:${this.serviceAccountName}`, + [`${cluster.openIdConnectProvider.openIdConnectProviderIssuer}:aud`]: 'sts.amazonaws.com', + [`${cluster.openIdConnectProvider.openIdConnectProviderIssuer}:sub`]: `system:serviceaccount:${this.serviceAccountNamespace}:${this.serviceAccountName}`, }, }); const principal = new OpenIdConnectPrincipal(cluster.openIdConnectProvider).withConditions({ diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index 6a2b597e8108b..2b92f430c7a24 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -116,7 +116,8 @@ }, "awslint": { "exclude": [ - "props-no-arn-refs:@aws-cdk/aws-eks.ClusterProps.outputMastersRoleArn" + "props-no-arn-refs:@aws-cdk/aws-eks.ClusterProps.outputMastersRoleArn", + "props-physical-name:@aws-cdk/aws-eks.OpenIdConnectProviderProps" ] }, "stability": "experimental", diff --git a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json index 1d47ee8f4d1c1..3cccffb7a31e3 100644 --- a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json +++ b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json @@ -3526,16 +3526,30 @@ [ "{\"", { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "OpenIdConnectIssuer" + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "oidc-provider/", + { + "Ref": "ClusterOpenIdConnectProviderE7EB0530" + } + ] + } ] }, ":aud\":\"sts.amazonaws.com\",\"", { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "OpenIdConnectIssuer" + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "oidc-provider/", + { + "Ref": "ClusterOpenIdConnectProviderE7EB0530" + } + ] + } ] }, ":sub\":\"system:serviceaccount:default:awscdkeksclustertestclustermyserviceaccount4080bcdd\"}" @@ -3940,7 +3954,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParameters952bd1c03e8201c4c1c67d6de0f3fdaaf88fda05f89a1232c3f6364343cd5344S3Bucket055DC235" + "Ref": "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deS3Bucket055DC235" }, "S3Key": { "Fn::Join": [ @@ -3953,7 +3967,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters952bd1c03e8201c4c1c67d6de0f3fdaaf88fda05f89a1232c3f6364343cd5344S3VersionKey2FFFA299" + "Ref": "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deS3VersionKey2FFFA299" } ] } @@ -3966,7 +3980,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters952bd1c03e8201c4c1c67d6de0f3fdaaf88fda05f89a1232c3f6364343cd5344S3VersionKey2FFFA299" + "Ref": "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deS3VersionKey2FFFA299" } ] } @@ -4039,7 +4053,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deS3Bucket14156880" + "Ref": "AssetParameters952bd1c03e8201c4c1c67d6de0f3fdaaf88fda05f89a1232c3f6364343cd5344S3Bucket14156880" }, "S3Key": { "Fn::Join": [ @@ -4052,7 +4066,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deS3VersionKey5225BCA4" + "Ref": "AssetParameters952bd1c03e8201c4c1c67d6de0f3fdaaf88fda05f89a1232c3f6364343cd5344S3VersionKey5225BCA4" } ] } @@ -4065,7 +4079,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deS3VersionKey5225BCA4" + "Ref": "AssetParameters952bd1c03e8201c4c1c67d6de0f3fdaaf88fda05f89a1232c3f6364343cd5344S3VersionKey5225BCA4" } ] } @@ -4612,4 +4626,4 @@ "Default": "/aws/service/eks/optimized-ami/1.14/amazon-linux-2/recommended/image_id" } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-eks/test/integ.eks-oidc-provider.expected.json b/packages/@aws-cdk/aws-eks/test/integ.eks-oidc-provider.expected.json new file mode 100644 index 0000000000000..615f6f5d97d00 --- /dev/null +++ b/packages/@aws-cdk/aws-eks/test/integ.eks-oidc-provider.expected.json @@ -0,0 +1,148 @@ +{ + "Resources": { + "NoClientsNoThumbprint8BF1533F": { + "Type": "Custom::AWSCDKOpenIdConnectProvider", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderHandlerF2C543E0", + "Arn" + ] + }, + "ThumbprintList": [ + "9e99a48a9960b14926bb7f3b02e22da2b0ab7280" + ], + "ClientIDList": [ + "sts.amazonaws.com" + ], + "Url": { + "Fn::Join": [ + "", + [ + "https://oidc.eks.", + { + "Ref": "AWS::Region" + }, + ".amazonaws.com/id/test2" + ] + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65": { + "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", + "Resource": "*", + "Action": [ + "iam:CreateOpenIDConnectProvider", + "iam:DeleteOpenIDConnectProvider", + "iam:UpdateOpenIDConnectProviderThumbprint", + "iam:AddClientIDToOpenIDConnectProvider", + "iam:RemoveClientIDFromOpenIDConnectProvider" + ] + } + ] + } + } + ] + } + }, + "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderHandlerF2C543E0": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Ref": "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deS3Bucket14156880" + }, + "S3Key": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deS3VersionKey5225BCA4" + } + ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deS3VersionKey5225BCA4" + } + ] + } + ] + } + ] + ] + } + }, + "Timeout": 900, + "MemorySize": 128, + "Handler": "__entrypoint__.handler", + "Role": { + "Fn::GetAtt": [ + "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65", + "Arn" + ] + }, + "Runtime": "nodejs12.x" + }, + "DependsOn": [ + "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65" + ] + } + }, + "Parameters": { + "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deS3Bucket14156880": { + "Type": "String", + "Description": "S3 bucket for asset \"b075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0de\"" + }, + "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deS3VersionKey5225BCA4": { + "Type": "String", + "Description": "S3 key for asset version \"b075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0de\"" + }, + "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deArtifactHashC509349A": { + "Type": "String", + "Description": "Artifact hash for asset \"b075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0de\"" + } + } +} diff --git a/packages/@aws-cdk/aws-eks/test/integ.eks-oidc-provider.ts b/packages/@aws-cdk/aws-eks/test/integ.eks-oidc-provider.ts new file mode 100644 index 0000000000000..79a7ad4493b28 --- /dev/null +++ b/packages/@aws-cdk/aws-eks/test/integ.eks-oidc-provider.ts @@ -0,0 +1,12 @@ +/// !cdk-integ pragma:ignore-assets +import { App, Stack } from '@aws-cdk/core'; +import * as eks from '../lib'; + +const app = new App(); +const stack = new Stack(app, 'oidc-provider-integ-test'); + +new eks.OpenIdConnectProvider(stack, 'NoClientsNoThumbprint', { + url: `https://oidc.eks.${Stack.of(stack).region}.amazonaws.com/id/test2`, +}); + +app.synth(); diff --git a/packages/@aws-cdk/aws-eks/test/test.service-account.ts b/packages/@aws-cdk/aws-eks/test/test.service-account.ts index df60b6d1dadfa..14207c92cf64d 100644 --- a/packages/@aws-cdk/aws-eks/test/test.service-account.ts +++ b/packages/@aws-cdk/aws-eks/test/test.service-account.ts @@ -2,7 +2,7 @@ import { expect, haveResource } from '@aws-cdk/assert'; import * as iam from '@aws-cdk/aws-iam'; import { Test } from 'nodeunit'; import * as eks from '../lib'; -import { testFixtureCluster } from './util'; +import { testFixture, testFixtureCluster } from './util'; /* eslint-disable max-len */ @@ -110,5 +110,68 @@ export = { test.throws(() => cluster.addServiceAccount('MyServiceAccount')); test.done(); }, + 'addServiceAccount for imported cluster'(test: Test) { + const { stack } = testFixture(); + const oidcProvider = new iam.OpenIdConnectProvider(stack, 'ClusterOpenIdConnectProvider', { + url: 'oidc_issuer', + }); + const cluster = eks.Cluster.fromClusterAttributes(stack, 'Cluster', { + clusterName: 'Cluster', + openIdConnectProvider: oidcProvider, + kubectlRoleArn: 'arn:aws:iam::123456:role/service-role/k8sservicerole', + }); + + cluster.addServiceAccount('MyServiceAccount'); + + expect(stack).to(haveResource(eks.KubernetesManifest.RESOURCE_TYPE, { + ServiceToken: { + 'Fn::GetAtt': [ + 'StackClusterF0EB02FAKubectlProviderNestedStackStackClusterF0EB02FAKubectlProviderNestedStackResource739D12C4', + 'Outputs.StackStackClusterF0EB02FAKubectlProviderframeworkonEvent8377F076Arn', + ], + }, + Manifest: { + 'Fn::Join': [ + '', + [ + '[{"apiVersion":"v1","kind":"ServiceAccount","metadata":{"name":"stackclustermyserviceaccount373b933c","namespace":"default","labels":{"app.kubernetes.io/name":"stackclustermyserviceaccount373b933c"},"annotations":{"eks.amazonaws.com/role-arn":"', + { + 'Fn::GetAtt': [ + 'ClusterMyServiceAccountRole85337B29', + 'Arn', + ], + }, + '"}}}]', + ], + ], + }, + })); + + expect(stack).to(haveResource(iam.CfnRole.CFN_RESOURCE_TYPE_NAME, { + AssumeRolePolicyDocument: { + Statement: [ + { + Action: 'sts:AssumeRoleWithWebIdentity', + Condition: { + StringEquals: { + 'Fn::GetAtt': [ + 'ClusterMyServiceAccountConditionJson671C0633', + 'Value', + ], + }, + }, + Effect: 'Allow', + Principal: { + Federated: { + Ref: 'ClusterOpenIdConnectProviderA8B8E987', + }, + }, + }, + ], + Version: '2012-10-17', + }, + })); + test.done(); + }, }, }; diff --git a/packages/@aws-cdk/aws-iam/lib/oidc-provider.ts b/packages/@aws-cdk/aws-iam/lib/oidc-provider.ts index 3e4dda8a4d7cb..ba2ebc880893d 100644 --- a/packages/@aws-cdk/aws-iam/lib/oidc-provider.ts +++ b/packages/@aws-cdk/aws-iam/lib/oidc-provider.ts @@ -1,5 +1,14 @@ import * as path from 'path'; -import { CustomResource, CustomResourceProvider, CustomResourceProviderRuntime, IResource, Resource, Token } from '@aws-cdk/core'; +import { + CustomResource, + CustomResourceProvider, + CustomResourceProviderRuntime, + IResource, + Resource, + Stack, + Token, + Fn, +} from '@aws-cdk/core'; import { Construct } from 'constructs'; const RESOURCE_TYPE = 'Custom::AWSCDKOpenIdConnectProvider'; @@ -14,6 +23,11 @@ export interface IOpenIdConnectProvider extends IResource { * The Amazon Resource Name (ARN) of the IAM OpenID Connect provider. */ readonly openIdConnectProviderArn: string; + + /** + * The issuer for OIDC Provider + */ + readonly openIdConnectProviderIssuer: string; } /** @@ -99,9 +113,21 @@ export class OpenIdConnectProvider extends Resource implements IOpenIdConnectPro * @param openIdConnectProviderArn the ARN to import */ public static fromOpenIdConnectProviderArn(scope: Construct, id: string, openIdConnectProviderArn: string): IOpenIdConnectProvider { + const parsedResourceName = Stack.of(scope).parseArn(openIdConnectProviderArn).resourceName; + if (!parsedResourceName) { + throw new Error(`Invalid arn: ${openIdConnectProviderArn}. Unable to extract issuer url`); + } + + // this needed because TS don't understand that prev. condition + // actually does mutate the type from "string | undefined" to "string" + // inside class definition, + const resourceName = parsedResourceName; + class Import extends Resource implements IOpenIdConnectProvider { public readonly openIdConnectProviderArn = openIdConnectProviderArn; + public readonly openIdConnectProviderIssuer = resourceName; } + return new Import(scope, id); } @@ -110,6 +136,8 @@ export class OpenIdConnectProvider extends Resource implements IOpenIdConnectPro */ public readonly openIdConnectProviderArn: string; + public readonly openIdConnectProviderIssuer: string; + /** * Defines an OpenID Connect provider. * @param scope The definition scope @@ -130,6 +158,7 @@ export class OpenIdConnectProvider extends Resource implements IOpenIdConnectPro }); this.openIdConnectProviderArn = Token.asString(resource.ref); + this.openIdConnectProviderIssuer = Fn.select(1, Fn.split('oidc-provider/', this.openIdConnectProviderArn)); } private getOrCreateProvider() { diff --git a/packages/@aws-cdk/aws-iam/test/oidc-provider.test.ts b/packages/@aws-cdk/aws-iam/test/oidc-provider.test.ts index 99fe98419457b..4f157be9ab191 100644 --- a/packages/@aws-cdk/aws-iam/test/oidc-provider.test.ts +++ b/packages/@aws-cdk/aws-iam/test/oidc-provider.test.ts @@ -6,6 +6,8 @@ import { arrayDiff } from '../lib/oidc-provider/diff'; import { external } from '../lib/oidc-provider/external'; import * as handler from '../lib/oidc-provider/index'; +const arnOfProvider = 'arn:aws:iam::1234567:oidc-provider/oidc.eks.us-east-1.amazonaws.com/id/someid'; + describe('OpenIdConnectProvider resource', () => { test('minimal configuration (no clients and no thumbprint)', () => { @@ -41,10 +43,10 @@ describe('OpenIdConnectProvider resource', () => { const stack = new Stack(); // WHEN - const provider = iam.OpenIdConnectProvider.fromOpenIdConnectProviderArn(stack, 'MyProvider', 'arn:of:provider'); + const provider = iam.OpenIdConnectProvider.fromOpenIdConnectProviderArn(stack, 'MyProvider', arnOfProvider); // THEN - expect(stack.resolve(provider.openIdConnectProviderArn)).toStrictEqual('arn:of:provider'); + expect(stack.resolve(provider.openIdConnectProviderArn)).toStrictEqual(arnOfProvider); }); test('thumbprint list and client ids can be specified', () => { @@ -388,6 +390,34 @@ describe('arrayDiff', () => { }); }); +describe('OIDC issuer', () => { + test('extract issuer properly in the new provider', () => { + // GIVEN + const stack = new Stack(); + + // WHEN + const provider = new iam.OpenIdConnectProvider(stack, 'MyProvider', { + url: 'https://my-issuer', + }); + + // THEN + expect(stack.resolve(provider.openIdConnectProviderIssuer)).toStrictEqual( + { 'Fn::Select': [1, { 'Fn::Split': ['oidc-provider/', { Ref: 'MyProvider730BA1C8' }] }] }, + ); + }); + + test('extract issuer properly in the imported provider', () => { + // GIVEN + const stack = new Stack(); + + // WHEN + const provider = iam.OpenIdConnectProvider.fromOpenIdConnectProviderArn(stack, 'MyProvider', arnOfProvider); + + // THEN + expect(stack.resolve(provider.openIdConnectProviderIssuer)).toStrictEqual('oidc.eks.us-east-1.amazonaws.com/id/someid'); + }); +}); + async function invokeHandler(event: Partial) { return handler.handler(event as any); -} \ No newline at end of file +} From e3fcfadcad56a2c809280baa03ac49b444c51c79 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2020 13:47:11 +0000 Subject: [PATCH 102/314] chore(deps): bump promptly from 3.1.0 to 3.2.0 (#11393) Bumps [promptly](https://github.com/moxystudio/node-promptly) from 3.1.0 to 3.2.0. - [Release notes](https://github.com/moxystudio/node-promptly/releases) - [Changelog](https://github.com/moxystudio/node-promptly/blob/master/CHANGELOG.md) - [Commits](https://github.com/moxystudio/node-promptly/compare/v3.1.0...v3.2.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/aws-cdk/package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 39850c64a5576..9437c52bddad2 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -80,7 +80,7 @@ "glob": "^7.1.6", "json-diff": "^0.5.4", "minimatch": ">=3.0", - "promptly": "^3.1.0", + "promptly": "^3.2.0", "proxy-agent": "^4.0.0", "semver": "^7.3.2", "source-map-support": "^0.5.19", diff --git a/yarn.lock b/yarn.lock index d019493b4c634..f69b687ca86c4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7631,7 +7631,7 @@ ignore@^4.0.3, ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.1.1, ignore@^5.1.4, ignore@^5.1.8: +ignore@^5.1.4, ignore@^5.1.8: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== @@ -11373,10 +11373,10 @@ promise-retry@^1.1.1: err-code "^1.0.0" retry "^0.10.0" -promptly@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/promptly/-/promptly-3.1.0.tgz#7f723392f527f032dc295991060d3be612186ea1" - integrity sha512-ygvIcmkt+eWtrQwI1/w7wDfzfAWI7IJX1AUVsWQEQwTmpQ5jeSyiD1g6NuI9VXWhz8LK5a5Bcngp/sKnOgQtiA== +promptly@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/promptly/-/promptly-3.2.0.tgz#a5517fbbf59bd31c1751d4e1d9bef1714f42b9d8" + integrity sha512-WnR9obtgW+rG4oUV3hSnNGl1pHm3V1H/qD9iJBumGSmVsSC5HpZOLuu8qdMb6yCItGfT7dcRszejr/5P3i9Pug== dependencies: read "^1.0.4" From 64ae54103abc3362ec1fa4ddd1510667f3d1fd26 Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Tue, 10 Nov 2020 14:17:09 +0000 Subject: [PATCH 103/314] chore(ubergen): switch to ubergen.exclude as a filter instead of private (#11375) Currently, ubergen excludes packages that are marked as 'private'. In v2, all packages under `@aws-cdk/` will be marked as 'private'. This will mean that 'monocdk' and 'aws-cdk-lib' modules will have no packages included. Introduce another field `ubergen.exclude` in `package.json` that will be explicitly exclude packages from the monolithic modules. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../example-construct-library/package.json | 3 +++ packages/aws-cdk-lib/package.json | 3 +++ tools/cdk-build-tools/package.json | 3 +++ tools/cdk-integ-tools/package.json | 3 +++ tools/cfn2ts/package.json | 3 +++ tools/pkglint/lib/rules.ts | 24 +++++++++++++++++++ tools/pkgtools/package.json | 3 +++ tools/ubergen/bin/ubergen.ts | 4 ++-- tools/ubergen/package.json | 3 +++ tools/yarn-cling/package.json | 3 +++ 10 files changed, 50 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/example-construct-library/package.json b/packages/@aws-cdk/example-construct-library/package.json index 5874fd037829d..d63466a31f20c 100644 --- a/packages/@aws-cdk/example-construct-library/package.json +++ b/packages/@aws-cdk/example-construct-library/package.json @@ -100,5 +100,8 @@ }, "cdk-build": { "jest": true + }, + "ubergen": { + "exclude": true } } diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index 2f03821f61c73..113df7a9afce8 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -284,5 +284,8 @@ ], "awscdkio": { "announce": false + }, + "ubergen": { + "exclude": true } } diff --git a/tools/cdk-build-tools/package.json b/tools/cdk-build-tools/package.json index 7edcf795f04b4..9504a4075cb86 100644 --- a/tools/cdk-build-tools/package.json +++ b/tools/cdk-build-tools/package.json @@ -66,5 +66,8 @@ "homepage": "https://github.com/aws/aws-cdk", "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" + }, + "ubergen": { + "exclude": true } } diff --git a/tools/cdk-integ-tools/package.json b/tools/cdk-integ-tools/package.json index 871da4eb75467..6237634e6be3d 100644 --- a/tools/cdk-integ-tools/package.json +++ b/tools/cdk-integ-tools/package.json @@ -52,5 +52,8 @@ }, "peerDependencies": { "@aws-cdk/assert": "0.0.0" + }, + "ubergen": { + "exclude": true } } diff --git a/tools/cfn2ts/package.json b/tools/cfn2ts/package.json index 76ff69dc0f04a..7ef2c7f940205 100644 --- a/tools/cfn2ts/package.json +++ b/tools/cfn2ts/package.json @@ -50,5 +50,8 @@ "homepage": "https://github.com/aws/aws-cdk", "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" + }, + "ubergen": { + "exclude": true } } diff --git a/tools/pkglint/lib/rules.ts b/tools/pkglint/lib/rules.ts index 9c35dc39ca0f0..203af4cb41605 100644 --- a/tools/pkglint/lib/rules.ts +++ b/tools/pkglint/lib/rules.ts @@ -1457,6 +1457,30 @@ export class JestSetup extends ValidationRule { } } +export class UbergenPackageVisibility extends ValidationRule { + public readonly name = 'ubergen/package-visibility'; + + public validate(pkg: PackageJson): void { + // eslint-disable-next-line @typescript-eslint/no-require-imports + const releaseJson = require(`${__dirname}/../../../release.json`); + if (releaseJson.majorVersion === 2) { + // skip in v2 for now + return; + } + if (pkg.json.private && !pkg.json.ubergen?.exclude) { + pkg.report({ + ruleName: this.name, + message: 'ubergen.exclude must be configured for private packages', + fix: () => { + pkg.json.ubergen = { + exclude: true, + }; + }, + }); + } + } +} + /** * Determine whether this is a JSII package * diff --git a/tools/pkgtools/package.json b/tools/pkgtools/package.json index 836ed85516754..0337051d556fb 100644 --- a/tools/pkgtools/package.json +++ b/tools/pkgtools/package.json @@ -45,5 +45,8 @@ "homepage": "https://github.com/aws/aws-cdk", "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" + }, + "ubergen": { + "exclude": true } } diff --git a/tools/ubergen/bin/ubergen.ts b/tools/ubergen/bin/ubergen.ts index 3026eb04c8430..a85a64ce7f2b9 100644 --- a/tools/ubergen/bin/ubergen.ts +++ b/tools/ubergen/bin/ubergen.ts @@ -87,8 +87,8 @@ async function findLibrariesToPackage(): Promise { for (const dir of await fs.readdir(librariesRoot)) { const packageJson = await fs.readJson(path.resolve(librariesRoot, dir, 'package.json')); - if (packageJson.private) { - console.log(`\t⚠️ Skipping (private): ${packageJson.name}`); + if (packageJson.ubergen?.exclude) { + console.log(`\t⚠️ Skipping (ubergen excluded): ${packageJson.name}`); continue; } else if (packageJson.deprecated) { console.log(`\t⚠️ Skipping (deprecated): ${packageJson.name}`); diff --git a/tools/ubergen/package.json b/tools/ubergen/package.json index 4698e84f54300..12c4c622f2fe4 100644 --- a/tools/ubergen/package.json +++ b/tools/ubergen/package.json @@ -41,5 +41,8 @@ "homepage": "https://github.com/aws/aws-cdk", "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" + }, + "ubergen": { + "exclude": true } } diff --git a/tools/yarn-cling/package.json b/tools/yarn-cling/package.json index 448e2cc950c2e..9dbbd8dc51331 100644 --- a/tools/yarn-cling/package.json +++ b/tools/yarn-cling/package.json @@ -55,5 +55,8 @@ "homepage": "https://github.com/aws/aws-cdk", "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" + }, + "ubergen": { + "exclude": true } } From a8cef9a7bae3fe0d0108b9cd66d201e49e2bb1f5 Mon Sep 17 00:00:00 2001 From: Eli Polonsky Date: Tue, 10 Nov 2020 22:41:21 +0200 Subject: [PATCH 104/314] chore: do not login to DockerHub (#11358) --- buildspec-pr.yaml | 9 ++++----- buildspec.yaml | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/buildspec-pr.yaml b/buildspec-pr.yaml index 98db30c019f7e..46805c4dcdc80 100644 --- a/buildspec-pr.yaml +++ b/buildspec-pr.yaml @@ -5,11 +5,10 @@ version: 0.2 phases: install: commands: - # Start docker daemon inside the container - - nohup /usr/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://127.0.0.1:2375 --storage-driver=overlay2& - - timeout 15 sh -c "until docker info; do echo .; sleep 1; done" - # login to DockerHub to avoid throttling - - docker login -u ${DOCKERHUB_USERNAME} -p ${DOCKERHUB_PASSWORD} + + # baked in our image. + # this also takes care of launching the docker daemon. + - /root/ecr-proxy/start.sh # Install yarn if it wasn't already present in the image - yarn --version || npm -g install yarn diff --git a/buildspec.yaml b/buildspec.yaml index a3e28f521d25c..d24d7c77ab1a2 100644 --- a/buildspec.yaml +++ b/buildspec.yaml @@ -5,11 +5,10 @@ version: 0.2 phases: install: commands: - # Start docker daemon inside the container - - nohup /usr/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://127.0.0.1:2375 --storage-driver=overlay2& - - timeout 15 sh -c "until docker info; do echo .; sleep 1; done" - # login to DockerHub to avoid throttling - - docker login -u ${DOCKERHUB_USERNAME} -p ${DOCKERHUB_PASSWORD} + + # baked in our image. + # this also takes care of launching the docker daemon. + - /root/ecr-proxy/start.sh # Install yarn if it wasn't already present in the image - yarn --version || npm -g install yarn From 2468fdc57a3a4b6f70321fed473882a1cf37094b Mon Sep 17 00:00:00 2001 From: tiefps <68519546+tiefps@users.noreply.github.com> Date: Tue, 10 Nov 2020 14:11:44 -0700 Subject: [PATCH 105/314] docs(codedeploy): correct pre-defined Deployment Configuration names (#11227) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-codedeploy/lib/server/deployment-config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-codedeploy/lib/server/deployment-config.ts b/packages/@aws-cdk/aws-codedeploy/lib/server/deployment-config.ts index b6937db3a475d..058fad91341ad 100644 --- a/packages/@aws-cdk/aws-codedeploy/lib/server/deployment-config.ts +++ b/packages/@aws-cdk/aws-codedeploy/lib/server/deployment-config.ts @@ -6,7 +6,7 @@ import { arnForDeploymentConfig } from '../utils'; /** * The Deployment Configuration of an EC2/on-premise Deployment Group. * The default, pre-defined Configurations are available as constants on the {@link ServerDeploymentConfig} class - * (`ServerDeploymentConfig.HalfAtATime`, `ServerDeploymentConfig.AllAtOnce`, etc.). + * (`ServerDeploymentConfig.HALF_AT_A_TIME`, `ServerDeploymentConfig.ALL_AT_ONCE`, etc.). * To create a custom Deployment Configuration, * instantiate the {@link ServerDeploymentConfig} Construct. */ From 9638924b6fc6421ea385c5008fc862ede7b5bee2 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 11 Nov 2020 04:11:50 +0000 Subject: [PATCH 106/314] chore(deps-dev): bump nock from 13.0.4 to 13.0.5 (#11404) Bumps [nock](https://github.com/nock/nock) from 13.0.4 to 13.0.5. - [Release notes](https://github.com/nock/nock/releases) - [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md) - [Commits](https://github.com/nock/nock/compare/v13.0.4...v13.0.5) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/aws-logs/package.json | 2 +- packages/@aws-cdk/custom-resources/package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index 508e513186f94..71750ee266617 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -78,7 +78,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "nock": "^13.0.4", + "nock": "^13.0.5", "nodeunit": "^0.11.3", "pkglint": "0.0.0", "sinon": "^9.2.1" diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index 9177928a2a80d..a556f8703693e 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -85,7 +85,7 @@ "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", "fs-extra": "^9.0.1", - "nock": "^13.0.4", + "nock": "^13.0.5", "pkglint": "0.0.0", "sinon": "^9.2.1" }, diff --git a/yarn.lock b/yarn.lock index f69b687ca86c4..34748fee2bab5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9931,10 +9931,10 @@ nise@^4.0.4: just-extend "^4.0.2" path-to-regexp "^1.7.0" -nock@^13.0.4: - version "13.0.4" - resolved "https://registry.yarnpkg.com/nock/-/nock-13.0.4.tgz#9fb74db35d0aa056322e3c45be14b99105cd7510" - integrity sha512-alqTV8Qt7TUbc74x1pKRLSENzfjp4nywovcJgi/1aXDiUxXdt7TkruSTF5MDWPP7UoPVgea4F9ghVdmX0xxnSA== +nock@^13.0.5: + version "13.0.5" + resolved "https://registry.yarnpkg.com/nock/-/nock-13.0.5.tgz#a618c6f86372cb79fac04ca9a2d1e4baccdb2414" + integrity sha512-1ILZl0zfFm2G4TIeJFW0iHknxr2NyA+aGCMTjDVUsBY4CkMRispF1pfIYkTRdAR/3Bg+UzdEuK0B6HczMQZcCg== dependencies: debug "^4.1.0" json-stringify-safe "^5.0.1" From daf2a20a7442e144bf8ae1b6aad7d38018e1c6fb Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 11 Nov 2020 04:52:40 +0000 Subject: [PATCH 107/314] chore(deps): bump aws-sdk from 2.788.0 to 2.789.0 (#11398) Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.788.0 to 2.789.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.788.0...v2.789.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/aws-cloudfront-origins/package.json | 2 +- packages/@aws-cdk/aws-cloudfront/package.json | 2 +- packages/@aws-cdk/aws-cloudtrail/package.json | 2 +- packages/@aws-cdk/aws-codebuild/package.json | 2 +- packages/@aws-cdk/aws-codecommit/package.json | 2 +- packages/@aws-cdk/aws-dynamodb/package.json | 2 +- packages/@aws-cdk/aws-eks/package.json | 2 +- packages/@aws-cdk/aws-events-targets/package.json | 2 +- packages/@aws-cdk/aws-logs/package.json | 2 +- packages/@aws-cdk/aws-route53/package.json | 2 +- packages/@aws-cdk/aws-sqs/package.json | 2 +- packages/@aws-cdk/custom-resources/package.json | 2 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- yarn.lock | 8 ++++---- 15 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudfront-origins/package.json b/packages/@aws-cdk/aws-cloudfront-origins/package.json index d9940d592b470..06e954237cdf8 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/package.json +++ b/packages/@aws-cdk/aws-cloudfront-origins/package.json @@ -72,7 +72,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", - "aws-sdk": "^2.788.0", + "aws-sdk": "^2.789.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "pkglint": "0.0.0" diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index 96cb83b76975d..587776d1d4edb 100644 --- a/packages/@aws-cdk/aws-cloudfront/package.json +++ b/packages/@aws-cdk/aws-cloudfront/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.788.0", + "aws-sdk": "^2.789.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index faeaca29856f8..3146f7f682988 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.788.0", + "aws-sdk": "^2.789.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codebuild/package.json b/packages/@aws-cdk/aws-codebuild/package.json index 256ef54a8043c..001cec43f99fd 100644 --- a/packages/@aws-cdk/aws-codebuild/package.json +++ b/packages/@aws-cdk/aws-codebuild/package.json @@ -79,7 +79,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.788.0", + "aws-sdk": "^2.789.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codecommit/package.json b/packages/@aws-cdk/aws-codecommit/package.json index 37c2db758c4e1..53beb4f72810b 100644 --- a/packages/@aws-cdk/aws-codecommit/package.json +++ b/packages/@aws-cdk/aws-codecommit/package.json @@ -79,7 +79,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.788.0", + "aws-sdk": "^2.789.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index 2971848607c8f..d4de8e8e1d2a0 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -74,7 +74,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/jest": "^26.0.15", - "aws-sdk": "^2.788.0", + "aws-sdk": "^2.789.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index 2b92f430c7a24..f23de775f4ba2 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", "@types/yaml": "1.9.6", - "aws-sdk": "^2.788.0", + "aws-sdk": "^2.789.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index a7e9ff3977ed0..c9d8e2fd475b9 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -75,7 +75,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-codecommit": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", - "aws-sdk": "^2.788.0", + "aws-sdk": "^2.789.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index 71750ee266617..9034ee8214849 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.788.0", + "aws-sdk": "^2.789.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-route53/package.json b/packages/@aws-cdk/aws-route53/package.json index 923eac82a25dc..c2ae9cfcb68b6 100644 --- a/packages/@aws-cdk/aws-route53/package.json +++ b/packages/@aws-cdk/aws-route53/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.788.0", + "aws-sdk": "^2.789.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-sqs/package.json b/packages/@aws-cdk/aws-sqs/package.json index 58c766ae01919..f1a5ee11d78bb 100644 --- a/packages/@aws-cdk/aws-sqs/package.json +++ b/packages/@aws-cdk/aws-sqs/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.788.0", + "aws-sdk": "^2.789.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index a556f8703693e..b8942190103fe 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -79,7 +79,7 @@ "@types/aws-lambda": "^8.10.64", "@types/fs-extra": "^8.1.1", "@types/sinon": "^9.0.8", - "aws-sdk": "^2.788.0", + "aws-sdk": "^2.789.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 9437c52bddad2..375fe4b4f9ff6 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -71,7 +71,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.788.0", + "aws-sdk": "^2.789.0", "camelcase": "^6.2.0", "cdk-assets": "0.0.0", "colors": "^1.4.0", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index d5f9201c5b79b..6d82300abeb4d 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -47,7 +47,7 @@ "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.788.0", + "aws-sdk": "^2.789.0", "glob": "^7.1.6", "yargs": "^16.1.0" }, diff --git a/yarn.lock b/yarn.lock index 34748fee2bab5..aae1f4a455d64 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3877,10 +3877,10 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" -aws-sdk@^2.637.0, aws-sdk@^2.788.0: - version "2.788.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.788.0.tgz#020f84975db9623d0a434105991e7074c488693f" - integrity sha512-UKc+4MFRezIkgk668mylj7MpVD2dCtiDBppgx05SwYSDGT60bixrKv3nE/YJK+gAv53CWVf7WL6hNv76+TWkTA== +aws-sdk@^2.637.0, aws-sdk@^2.789.0: + version "2.789.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.789.0.tgz#a1b0a8b8b4227a7947c04e8d75239ba27d2deb93" + integrity sha512-Jqq+M4N0EgkyS4OPf05UHa7IWUcpuBdnpwMRgBnu4Ju6PxpOTh1UQcmYepVmIN3m6YVpLwFctEYzAMJFM3LT1A== dependencies: buffer "4.9.2" events "1.1.1" From 8545350306fb7cff27a63a3ce3023a7c4cc369e8 Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Wed, 11 Nov 2020 11:45:57 +0000 Subject: [PATCH 108/314] chore: include attributions for aws-cdk-lib (#11413) In the v2 branch, `aws-cdk-lib` will be made public. Hence, include attributions for these. Update the pkglint rule to also check `aws-cdk-lib` in the `master` branch. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/aws-cdk-lib/.npmignore | 3 +- packages/aws-cdk-lib/NOTICE | 193 ++++++++++++++++++++++++++++++++ tools/pkglint/lib/rules.ts | 3 +- 3 files changed, 197 insertions(+), 2 deletions(-) diff --git a/packages/aws-cdk-lib/.npmignore b/packages/aws-cdk-lib/.npmignore index b5bc540300d0f..e44d8d8404b14 100644 --- a/packages/aws-cdk-lib/.npmignore +++ b/packages/aws-cdk-lib/.npmignore @@ -4,6 +4,7 @@ *.snk !*.d.ts !*.js +test/ # Coverage coverage @@ -23,4 +24,4 @@ tsconfig.json .eslintrc.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml diff --git a/packages/aws-cdk-lib/NOTICE b/packages/aws-cdk-lib/NOTICE index bfccac9a7f69c..201344067fcb2 100644 --- a/packages/aws-cdk-lib/NOTICE +++ b/packages/aws-cdk-lib/NOTICE @@ -1,2 +1,195 @@ AWS Cloud Development Kit (AWS CDK) Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +------------------------------------------------------------------------------- + +The AWS CDK includes the following third-party software/licensing: + +** minimatch - https://www.npmjs.com/package/minimatch +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---------------- + +** fs-extra - https://www.npmjs.com/package/fs-extra +Copyright (c) 2011-2017 JP Richardson + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files +(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** semver - https://www.npmjs.com/package/semver +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---------------- + +** yaml - https://www.npmjs.com/package/yaml +Copyright 2018 Eemeli Aro + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +---------------- + +** case - https://www.npmjs.com/package/case +Copyright (c) 2013 Nathan Bubna + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** jsonschema - https://www.npmjs.com/package/jsonschema +Copyright (C) 2012-2015 Tom de Grunt + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- + +** punycode - https://www.npmjs.com/package/punycode +Copyright Mathias Bynens + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** ignore - https://www.npmjs.com/package/ignore +Copyright (c) 2013 Kael Zhang , contributors +http://kael.me/ + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** @balena/dockerignore - https://www.npmjs.com/package/@balena/dockerignore +The MIT License (MIT) + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +---------------- diff --git a/tools/pkglint/lib/rules.ts b/tools/pkglint/lib/rules.ts index 203af4cb41605..b3ae82fce7160 100644 --- a/tools/pkglint/lib/rules.ts +++ b/tools/pkglint/lib/rules.ts @@ -142,7 +142,8 @@ export class ThirdPartyAttributions extends ValidationRule { public readonly name = 'license/3p-attributions'; public validate(pkg: PackageJson): void { - if (pkg.json.private) { + const alwaysCheck = ['monocdk', 'aws-cdk-lib']; + if (pkg.json.private && !alwaysCheck.includes(pkg.json.name)) { return; } const bundled = pkg.getBundledDependencies(); From a9e40faa35cbcf4602430c0c7972c175b6a11508 Mon Sep 17 00:00:00 2001 From: AWS CDK Team Date: Wed, 11 Nov 2020 11:48:49 +0000 Subject: [PATCH 109/314] chore(release): 1.73.0 --- CHANGELOG.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ version.v1.json | 2 +- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bcb4c89cfe00..941f81402e7d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,50 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.73.0](https://github.com/aws/aws-cdk/compare/v1.72.0...v1.73.0) (2020-11-11) + + +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES + +* **apigatewayv2:** `LambdaProxyIntegration` and `HttpProxyIntegration` +classes have moved to the `@aws-cdk/aws-apigatewayv2-integration` module. +* **appmesh:** VirtualRouter's Listeners are no longer a struct; use the static factory methods of the `VirtualNodeListener` class to obtain instances of them +* **appmesh:** VirtualRouter accepts a list of listeners instead of a single listener +* **appmesh:** all `fromResourceName()` methods in the AppMesh module have been replaced with `fromResourceAttributes()` + +### Features + +* **apigateway:** default value for enum type in schema models ([#11064](https://github.com/aws/aws-cdk/issues/11064)) ([9eff751](https://github.com/aws/aws-cdk/commit/9eff751609597c35baadb559144b2069a2211215)), closes [#11065](https://github.com/aws/aws-cdk/issues/11065) +* **appmesh:** change VirtualRouter's Listener to a union-like class ([#11277](https://github.com/aws/aws-cdk/issues/11277)) ([0a3e980](https://github.com/aws/aws-cdk/commit/0a3e980cb880ee546d0840281aa9e2a781d7412b)) +* **appmesh:** remove from*Name() methods and replace with from*Attributes() ([#11266](https://github.com/aws/aws-cdk/issues/11266)) ([13d713e](https://github.com/aws/aws-cdk/commit/13d713e6358b29e55a626c44c7b2f0dcd946fddc)) +* **cli:** process credentials ([#11114](https://github.com/aws/aws-cdk/issues/11114)) ([6efa5e1](https://github.com/aws/aws-cdk/commit/6efa5e10e01a5f46b914601a807b932b4c745dae)), closes [#3008](https://github.com/aws/aws-cdk/issues/3008) +* **cloudwatch:** add methods for lazy addition of graph metrics ([#11380](https://github.com/aws/aws-cdk/issues/11380)) ([55e9576](https://github.com/aws/aws-cdk/commit/55e9576810d8cb3115b7bd52d704ffe793a3dd27)), closes [#11305](https://github.com/aws/aws-cdk/issues/11305) +* **cloudwatch:** different view types in GraphWidget ([#11160](https://github.com/aws/aws-cdk/issues/11160)) ([24de577](https://github.com/aws/aws-cdk/commit/24de5774379b7258f3629448a760b86613acc397)), closes [#11063](https://github.com/aws/aws-cdk/issues/11063) +* **cognito:** user pool resource server ([#11118](https://github.com/aws/aws-cdk/issues/11118)) ([474f6c6](https://github.com/aws/aws-cdk/commit/474f6c673e9f419bbc80c1a7797348e98767e8c9)) +* **cognito:** user pools - non-ascii email domains ([#11099](https://github.com/aws/aws-cdk/issues/11099)) ([5d907b6](https://github.com/aws/aws-cdk/commit/5d907b62abd4428c27677965353fb04d92267e2c)), closes [#8473](https://github.com/aws/aws-cdk/issues/8473) [#8473](https://github.com/aws/aws-cdk/issues/8473) +* **core:** natively support .dockerignore ([#10922](https://github.com/aws/aws-cdk/issues/10922)) ([cdb9942](https://github.com/aws/aws-cdk/commit/cdb9942bebc60abf98a74c6f9071e3527f0f01e1)) +* **eks:** IAM Roles for service accounts in imported clusters ([#10774](https://github.com/aws/aws-cdk/issues/10774)) ([76c795a](https://github.com/aws/aws-cdk/commit/76c795ae37d4168e8a98b3bc81034b455a8ae05e)), closes [#10601](https://github.com/aws/aws-cdk/issues/10601) +* **elasticloadbalancingv2:** add load balancer lookups ([#11089](https://github.com/aws/aws-cdk/issues/11089)) ([0153028](https://github.com/aws/aws-cdk/commit/0153028e6438eb13b07b8f2043745e5bc3faa6b7)), closes [#11088](https://github.com/aws/aws-cdk/issues/11088) +* **pipelines:** room for extra sequential intermediary actions in CdkStage addApplication() ([#11376](https://github.com/aws/aws-cdk/issues/11376)) ([32c164c](https://github.com/aws/aws-cdk/commit/32c164c4aa498b9bce03583f76cc21c7257a48ef)) +* **pipelines:** ShellScriptAction can configure environment ([#11229](https://github.com/aws/aws-cdk/issues/11229)) ([ab9bcf2](https://github.com/aws/aws-cdk/commit/ab9bcf26ecb8c171cf4ba3bdc795cb45c7096fd8)), closes [#10919](https://github.com/aws/aws-cdk/issues/10919) +* **region-info:** added AppMesh ECR account for eu-south-1 region ([#11207](https://github.com/aws/aws-cdk/issues/11207)) ([54c276d](https://github.com/aws/aws-cdk/commit/54c276d215fd636c2f8970795512a838377b2f21)) +* **route53-targets:** aws-apigatewayv2 target ([#10191](https://github.com/aws/aws-cdk/issues/10191)) ([030c5c5](https://github.com/aws/aws-cdk/commit/030c5c58e2cedda8e74d7988dc44b042def9e703)) + + +### Bug Fixes + +* **apigateway:** api key not supported for SpecRestApi ([#11235](https://github.com/aws/aws-cdk/issues/11235)) ([52da8cb](https://github.com/aws/aws-cdk/commit/52da8cb3c65c41bf7cbd3c8001cf586a5c89041b)), closes [#11079](https://github.com/aws/aws-cdk/issues/11079) +* **appsync:** HttpDataSource extends BackedDataSource instead of BaseDataSource ([#11185](https://github.com/aws/aws-cdk/issues/11185)) ([4b4d011](https://github.com/aws/aws-cdk/commit/4b4d0114e849ad96fccafd4cebb0edbead83ed83)), closes [#11183](https://github.com/aws/aws-cdk/issues/11183) +* **cfn-include:** Fn::FindInMap cannot be used for boolean properties ([#11323](https://github.com/aws/aws-cdk/issues/11323)) ([47b698e](https://github.com/aws/aws-cdk/commit/47b698ebfea300978e101234bcd80145b6f1ed17)), closes [#11300](https://github.com/aws/aws-cdk/issues/11300) +* **cli:** deployments are skipped if stack is in a _failed state ([#10847](https://github.com/aws/aws-cdk/issues/10847)) ([4887ba6](https://github.com/aws/aws-cdk/commit/4887ba6004b20c86c0025d16e235b8333d6efa6b)), closes [#10784](https://github.com/aws/aws-cdk/issues/10784) +* **cli:** Python `id` parameter in init template conflicts with built-in ([#10874](https://github.com/aws/aws-cdk/issues/10874)) ([37a149b](https://github.com/aws/aws-cdk/commit/37a149b03751810d9ed984e415bbfb216881e74b)) +* **cloudwatch:** composite alarm ARN uses wrong separator ([#11186](https://github.com/aws/aws-cdk/issues/11186)) ([3009490](https://github.com/aws/aws-cdk/commit/3009490c4e1e1a10a9e4ea52cefe03aac296d649)) +* **elasticsearch:** use correct latency metric names ([#11175](https://github.com/aws/aws-cdk/issues/11175)) ([7ab5ab8](https://github.com/aws/aws-cdk/commit/7ab5ab8dad9ad08ff43602d5ee78c31e6b8413ed)), closes [#11174](https://github.com/aws/aws-cdk/issues/11174) +* **rds:** customizing secret results in unusable password and lost attachment ([#11237](https://github.com/aws/aws-cdk/issues/11237)) ([a4567f5](https://github.com/aws/aws-cdk/commit/a4567f53d6e06d50f22d56364f69f0209c48874e)), closes [#11040](https://github.com/aws/aws-cdk/issues/11040) + + +* **apigatewayv2:** move lambda and http proxy integrations to the 'integrations' module ([#11339](https://github.com/aws/aws-cdk/issues/11339)) ([17611d6](https://github.com/aws/aws-cdk/commit/17611d6e0f1085505c90cf4d6d4f22b91c530ce1)) + ## [1.72.0](https://github.com/aws/aws-cdk/compare/v1.71.0...v1.72.0) (2020-11-06) diff --git a/version.v1.json b/version.v1.json index b7d663f683e0e..80ff54da9d296 100644 --- a/version.v1.json +++ b/version.v1.json @@ -1,3 +1,3 @@ { - "version": "1.72.0" + "version": "1.73.0" } From a70bceb6022fcad08b35eb6742c24e1223f57c93 Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Wed, 11 Nov 2020 12:39:46 +0000 Subject: [PATCH 110/314] chore(pkglint): rule to ensure that only allowed packages are public (#11317) In the v2 branch, most packages are private except a handful. Update the pkglint rule to carry an allowlist on the set of packages that should be private. Prevents accidentally publishing new packages. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- tools/pkglint/lib/rules.ts | 45 +++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/tools/pkglint/lib/rules.ts b/tools/pkglint/lib/rules.ts index b3ae82fce7160..c669ce1efef31 100644 --- a/tools/pkglint/lib/rules.ts +++ b/tools/pkglint/lib/rules.ts @@ -1460,24 +1460,43 @@ export class JestSetup extends ValidationRule { export class UbergenPackageVisibility extends ValidationRule { public readonly name = 'ubergen/package-visibility'; + private readonly publicPackages = ['aws-cdk-lib', 'cdk', 'aws-cdk', 'awslint']; public validate(pkg: PackageJson): void { // eslint-disable-next-line @typescript-eslint/no-require-imports const releaseJson = require(`${__dirname}/../../../release.json`); if (releaseJson.majorVersion === 2) { - // skip in v2 for now - return; - } - if (pkg.json.private && !pkg.json.ubergen?.exclude) { - pkg.report({ - ruleName: this.name, - message: 'ubergen.exclude must be configured for private packages', - fix: () => { - pkg.json.ubergen = { - exclude: true, - }; - }, - }); + // Only packages in the publicPackages list should be "public". Everything else should be private. + if (this.publicPackages.includes(pkg.json.name) && pkg.json.private === true) { + pkg.report({ + ruleName: this.name, + message: 'Package must be public', + fix: () => { + delete pkg.json.private; + }, + }); + } else if (!this.publicPackages.includes(pkg.json.name) && pkg.json.private !== true) { + pkg.report({ + ruleName: this.name, + message: 'Package must not be public', + fix: () => { + delete pkg.json.private; + pkg.json.private = true; + }, + }); + } + } else { + if (pkg.json.private && !pkg.json.ubergen?.exclude) { + pkg.report({ + ruleName: this.name, + message: 'ubergen.exclude must be configured for private packages', + fix: () => { + pkg.json.ubergen = { + exclude: true, + }; + }, + }); + } } } } From f251ce656e1786e49a078d797883ed2753939ecb Mon Sep 17 00:00:00 2001 From: AWS CDK Automation <43080478+aws-cdk-automation@users.noreply.github.com> Date: Wed, 11 Nov 2020 18:30:36 +0100 Subject: [PATCH 111/314] chore: npm-check-updates && yarn upgrade (#11418) Ran npm-check-updates and yarn upgrade to keep the `yarn.lock` file up-to-date. --- .../package.json | 8 +- .../aws-global-table-coordinator/package.json | 6 +- scripts/script-tests/package.json | 2 +- tools/cdk-build-tools/package.json | 4 +- tools/eslint-plugin-cdk/package.json | 4 +- yarn.lock | 155 ++++++++++++------ 6 files changed, 116 insertions(+), 63 deletions(-) diff --git a/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json b/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json index 9f25bfc9d6683..85da591914c1d 100644 --- a/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json +++ b/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json @@ -29,15 +29,15 @@ "devDependencies": { "aws-sdk": "^2.596.0", "aws-sdk-mock": "^5.1.0", - "eslint": "^7.12.1", + "eslint": "^7.13.0", "eslint-config-standard": "^14.1.1", "eslint-plugin-import": "^2.22.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-standard": "^4.0.2", + "eslint-plugin-standard": "^4.1.0", "jest": "^26.6.3", "lambda-tester": "^3.6.0", - "nock": "^13.0.4", - "ts-jest": "^26.4.3" + "nock": "^13.0.5", + "ts-jest": "^26.4.4" } } diff --git a/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json b/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json index e19b1fe502b2d..2dc031452ab61 100644 --- a/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json +++ b/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json @@ -29,14 +29,14 @@ "devDependencies": { "aws-sdk": "^2.596.0", "aws-sdk-mock": "^5.1.0", - "eslint": "^7.12.1", + "eslint": "^7.13.0", "eslint-config-standard": "^14.1.1", "eslint-plugin-import": "^2.22.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-standard": "^4.0.2", + "eslint-plugin-standard": "^4.1.0", "jest": "^26.6.3", "lambda-tester": "^3.6.0", - "nock": "^13.0.4" + "nock": "^13.0.5" } } diff --git a/scripts/script-tests/package.json b/scripts/script-tests/package.json index 2c6d0ff48e94a..91bca5735c77a 100644 --- a/scripts/script-tests/package.json +++ b/scripts/script-tests/package.json @@ -10,6 +10,6 @@ "build+test+package": "npm run build+test" }, "devDependencies": { - "jest": "^26.6.2" + "jest": "^26.6.3" } } diff --git a/tools/cdk-build-tools/package.json b/tools/cdk-build-tools/package.json index 9504a4075cb86..5877dba95bcef 100644 --- a/tools/cdk-build-tools/package.json +++ b/tools/cdk-build-tools/package.json @@ -40,11 +40,11 @@ }, "dependencies": { "@typescript-eslint/eslint-plugin": "^4.7.0", - "@typescript-eslint/parser": "^4.6.1", + "@typescript-eslint/parser": "^4.7.0", "eslint-plugin-cdk": "0.0.0", "awslint": "0.0.0", "colors": "^1.4.0", - "eslint": "^7.12.1", + "eslint": "^7.13.0", "eslint-import-resolver-node": "^0.3.4", "eslint-import-resolver-typescript": "^2.3.0", "eslint-plugin-import": "^2.22.1", diff --git a/tools/eslint-plugin-cdk/package.json b/tools/eslint-plugin-cdk/package.json index 24c0c14813522..e07a275ab288a 100644 --- a/tools/eslint-plugin-cdk/package.json +++ b/tools/eslint-plugin-cdk/package.json @@ -21,8 +21,8 @@ "typescript": "~3.9.7" }, "dependencies": { - "@typescript-eslint/parser": "^4.6.1", - "eslint": "^7.12.1", + "@typescript-eslint/parser": "^4.7.0", + "eslint": "^7.13.0", "fs-extra": "^9.0.1" }, "jest": { diff --git a/yarn.lock b/yarn.lock index aae1f4a455d64..d401cd2040c16 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3313,23 +3313,15 @@ eslint-scope "^5.0.0" eslint-utils "^2.0.0" -"@typescript-eslint/parser@^4.6.1": - version "4.6.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.6.1.tgz#b801bff67b536ecc4a840ac9289ba2be57e02428" - integrity sha512-lScKRPt1wM9UwyKkGKyQDqf0bh6jm8DQ5iN37urRIXDm16GEv+HGEmum2Fc423xlk5NUOkOpfTnKZc/tqKZkDQ== - dependencies: - "@typescript-eslint/scope-manager" "4.6.1" - "@typescript-eslint/types" "4.6.1" - "@typescript-eslint/typescript-estree" "4.6.1" - debug "^4.1.1" - -"@typescript-eslint/scope-manager@4.6.1": - version "4.6.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.6.1.tgz#21872b91cbf7adfc7083f17b8041149148baf992" - integrity sha512-f95+80r6VdINYscJY1KDUEDcxZ3prAWHulL4qRDfNVD0I5QAVSGqFkwHERDoLYJJWmEAkUMdQVvx7/c2Hp+Bjg== +"@typescript-eslint/parser@^4.7.0": + version "4.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.7.0.tgz#44bdab0f788b478178368baa65d3365fdc63da1c" + integrity sha512-+meGV8bMP1sJHBI2AFq1GeTwofcGiur8LoIr6v+rEmD9knyCqDlrQcFHR0KDDfldHIFDU/enZ53fla6ReF4wRw== dependencies: - "@typescript-eslint/types" "4.6.1" - "@typescript-eslint/visitor-keys" "4.6.1" + "@typescript-eslint/scope-manager" "4.7.0" + "@typescript-eslint/types" "4.7.0" + "@typescript-eslint/typescript-estree" "4.7.0" + debug "^4.1.1" "@typescript-eslint/scope-manager@4.7.0": version "4.7.0" @@ -3339,30 +3331,11 @@ "@typescript-eslint/types" "4.7.0" "@typescript-eslint/visitor-keys" "4.7.0" -"@typescript-eslint/types@4.6.1": - version "4.6.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.6.1.tgz#d3ad7478f53f22e7339dc006ab61aac131231552" - integrity sha512-k2ZCHhJ96YZyPIsykickez+OMHkz06xppVLfJ+DY90i532/Cx2Z+HiRMH8YZQo7a4zVd/TwNBuRCdXlGK4yo8w== - "@typescript-eslint/types@4.7.0": version "4.7.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.7.0.tgz#5e95ef5c740f43d942542b35811f87b62fccca69" integrity sha512-uLszFe0wExJc+I7q0Z/+BnP7wao/kzX0hB5vJn4LIgrfrMLgnB2UXoReV19lkJQS1a1mHWGGODSxnBx6JQC3Sg== -"@typescript-eslint/typescript-estree@4.6.1": - version "4.6.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.6.1.tgz#6025cce724329413f57e4959b2d676fceeca246f" - integrity sha512-/J/kxiyjQQKqEr5kuKLNQ1Finpfb8gf/NpbwqFFYEBjxOsZ621r9AqwS9UDRA1Rrr/eneX/YsbPAIhU2rFLjXQ== - dependencies: - "@typescript-eslint/types" "4.6.1" - "@typescript-eslint/visitor-keys" "4.6.1" - debug "^4.1.1" - globby "^11.0.1" - is-glob "^4.0.1" - lodash "^4.17.15" - semver "^7.3.2" - tsutils "^3.17.1" - "@typescript-eslint/typescript-estree@4.7.0": version "4.7.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.7.0.tgz#539531167f05ba20eb0b6785567076679e29d393" @@ -3377,14 +3350,6 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/visitor-keys@4.6.1": - version "4.6.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.6.1.tgz#6b125883402d8939df7b54528d879e88f7ba3614" - integrity sha512-owABze4toX7QXwOLT3/D5a8NecZEjEWU1srqxENTfqsY3bwVnl3YYbOh6s1rp2wQKO9RTHFGjKes08FgE7SVMw== - dependencies: - "@typescript-eslint/types" "4.6.1" - eslint-visitor-keys "^2.0.0" - "@typescript-eslint/visitor-keys@4.7.0": version "4.7.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.7.0.tgz#6783824f22acfc49e754970ed21b88ac03b80e6f" @@ -3610,6 +3575,11 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" +app-root-path@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.2.1.tgz#d0df4a682ee408273583d43f6f79e9892624bc9a" + integrity sha512-91IFKeKk7FjfmezPKkwtaRvSpnUc4gDwPAjA1YZ9Gn0q0PPeW+vbeUsZuyDwjI7+QTHhcLen2v25fi/AmhvbJA== + append-transform@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab" @@ -3877,7 +3847,7 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" -aws-sdk@^2.637.0, aws-sdk@^2.789.0: +aws-sdk@^2.596.0, aws-sdk@^2.637.0, aws-sdk@^2.789.0: version "2.789.0" resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.789.0.tgz#a1b0a8b8b4227a7947c04e8d75239ba27d2deb93" integrity sha512-Jqq+M4N0EgkyS4OPf05UHa7IWUcpuBdnpwMRgBnu4Ju6PxpOTh1UQcmYepVmIN3m6YVpLwFctEYzAMJFM3LT1A== @@ -5995,11 +5965,21 @@ dotenv-expand@^5.1.0: resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-5.1.0.tgz#3fbaf020bfd794884072ea26b1e9791d45a629f0" integrity sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA== +dotenv-json@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/dotenv-json/-/dotenv-json-1.0.0.tgz#fc7f672aafea04bed33818733b9f94662332815c" + integrity sha512-jAssr+6r4nKhKRudQ0HOzMskOFFi9+ubXWwmrSGJFgTvpjyPXCXsCsYbjif6mXp7uxA7xY3/LGaiTQukZzSbOQ== + dotenv@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-7.0.0.tgz#a2be3cd52736673206e8a85fb5210eea29628e7c" integrity sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g== +dotenv@^8.0.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" + integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== + dotgitignore@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/dotgitignore/-/dotgitignore-2.1.0.tgz#a4b15a4e4ef3cf383598aaf1dfa4a04bcc089b7b" @@ -6269,6 +6249,11 @@ escodegen@^1.11.0, escodegen@^1.14.1, escodegen@^1.8.1: optionalDependencies: source-map "~0.6.1" +eslint-config-standard@^14.1.1: + version "14.1.1" + resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz#830a8e44e7aef7de67464979ad06b406026c56ea" + integrity sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg== + eslint-import-resolver-node@^0.3.4: version "0.3.4" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" @@ -6296,6 +6281,14 @@ eslint-module-utils@^2.6.0: debug "^2.6.9" pkg-dir "^2.0.0" +eslint-plugin-es@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893" + integrity sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ== + dependencies: + eslint-utils "^2.0.0" + regexpp "^3.0.0" + eslint-plugin-import@^2.22.1: version "2.22.1" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz#0896c7e6a0cf44109a2d97b95903c2bb689d7702" @@ -6315,11 +6308,33 @@ eslint-plugin-import@^2.22.1: resolve "^1.17.0" tsconfig-paths "^3.9.0" +eslint-plugin-node@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d" + integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g== + dependencies: + eslint-plugin-es "^3.0.0" + eslint-utils "^2.0.0" + ignore "^5.1.1" + minimatch "^3.0.4" + resolve "^1.10.1" + semver "^6.1.0" + +eslint-plugin-promise@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz#845fd8b2260ad8f82564c1222fce44ad71d9418a" + integrity sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw== + eslint-plugin-rulesdir@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/eslint-plugin-rulesdir/-/eslint-plugin-rulesdir-0.1.0.tgz#ad144d7e98464fda82963eff3fab331aecb2bf08" integrity sha1-rRRNfphGT9qClj7/P6szGuyyvwg= +eslint-plugin-standard@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.1.0.tgz#0c3bf3a67e853f8bbbc580fb4945fbf16f41b7c5" + integrity sha512-ZL7+QRixjTR6/528YNGyDotyffm5OQst/sGxKDwGb9Uqs4In5Egi4+jbobhqJoyoCM6/7v/1A5fhQ7ScMtDjaQ== + eslint-scope@^5.0.0, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -6345,10 +6360,10 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== -eslint@^7.12.1: - version "7.12.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.12.1.tgz#bd9a81fa67a6cfd51656cdb88812ce49ccec5801" - integrity sha512-HlMTEdr/LicJfN08LB3nM1rRYliDXOmfoO4vj39xN6BLpFzF00hbwBoqHk8UcJ2M/3nlARZWy/mslvGEuZFvsg== +eslint@^7.13.0: + version "7.13.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.13.0.tgz#7f180126c0dcdef327bfb54b211d7802decc08da" + integrity sha512-uCORMuOO8tUzJmsdRtrvcGq5qposf7Rw0LwkTJkoDbOycVQtQjmnhZSuLQnozLE4TmAzlMVV45eCHmQ1OpDKUQ== dependencies: "@babel/code-frame" "^7.0.0" "@eslint/eslintrc" "^0.2.1" @@ -7631,7 +7646,7 @@ ignore@^4.0.3, ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.1.4, ignore@^5.1.8: +ignore@^5.1.1, ignore@^5.1.4, ignore@^5.1.8: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== @@ -7863,6 +7878,13 @@ is-core-module@^2.0.0: dependencies: has "^1.0.3" +is-core-module@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.1.0.tgz#a4cc031d9b1aca63eecbd18a650e13cb4eeab946" + integrity sha512-YcV7BgVMRFRua2FqQzKtTDMz8iCuLEyGKjr70q8Zm1yy2qKcurbFEd79PAdHV77oL3NrAaOVQIbMmiHQCHB7ZA== + dependencies: + has "^1.0.3" + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -8707,7 +8729,7 @@ jest-worker@^26.6.2: merge-stream "^2.0.0" supports-color "^7.0.0" -jest@^26.6.2, jest@^26.6.3: +jest@^26.6.3: version "26.6.3" resolved "https://registry.yarnpkg.com/jest/-/jest-26.6.3.tgz#40e8fdbe48f00dfa1f0ce8121ca74b88ac9148ef" integrity sha512-lGS5PXGAzR4RF7V5+XObhqz2KZIDUA1yD0DG6pBVmy10eh0ZIXQImRuzocsI/N2XZ1GrLFwTS27In2i2jlpq1Q== @@ -9039,6 +9061,24 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== +lambda-leak@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lambda-leak/-/lambda-leak-2.0.0.tgz#771985d3628487f6e885afae2b54510dcfb2cd7e" + integrity sha1-dxmF02KEh/boha+uK1RRDc+yzX4= + +lambda-tester@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/lambda-tester/-/lambda-tester-3.6.0.tgz#ceb7d4f4f0da768487a05cff37dcd088508b5247" + integrity sha512-F2ZTGWCLyIR95o/jWK46V/WnOCFAEUG/m/V7/CLhPJ7PCM+pror1rZ6ujP3TkItSGxUfpJi0kqwidw+M/nEqWw== + dependencies: + app-root-path "^2.2.1" + dotenv "^8.0.0" + dotenv-json "^1.0.0" + lambda-leak "^2.0.0" + semver "^6.1.1" + uuid "^3.3.2" + vandium-utils "^1.1.1" + lazystream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" @@ -11984,6 +12024,14 @@ resolve@^1.1.6, resolve@^1.10.0, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.13 dependencies: path-parse "^1.0.6" +resolve@^1.10.1: + version "1.19.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" + integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== + dependencies: + is-core-module "^2.1.0" + path-parse "^1.0.6" + resolve@^1.18.1: version "1.18.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.18.1.tgz#018fcb2c5b207d2a6424aee361c5a266da8f4130" @@ -12184,7 +12232,7 @@ semver@7.x, semver@^7.1.1, semver@^7.2.1, semver@^7.3.2: resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== -semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: +semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -13797,6 +13845,11 @@ validate-npm-package-name@^3.0.0: dependencies: builtins "^1.0.3" +vandium-utils@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/vandium-utils/-/vandium-utils-1.2.0.tgz#44735de4b7641a05de59ebe945f174e582db4f59" + integrity sha1-RHNd5LdkGgXeWevpRfF05YLbT1k= + vendors@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.4.tgz#e2b800a53e7a29b93506c3cf41100d16c4c4ad8e" From ec72c859c31a069406994433fe430f56ff0e5ff3 Mon Sep 17 00:00:00 2001 From: Alban Esc Date: Wed, 11 Nov 2020 09:58:53 -0800 Subject: [PATCH 112/314] feat(efs): import access point - `fromAccessPointAttributes()` (#10712) Cannot use `efs.AccessPoint.fromAccessPointId()` with `lambda.FileSystem.fromEfsAccessPoint()`. the former returns an `IAccessPoint` when the later expect an `AccessPoint`. I think following the CDK guidelines, `lambda.FileSystem.fromEfsAccessPoint()` should expect an `IAccessPoint`, not an `AccessPoint`. Argument of type `IAccessPoint` is not assignable to parameter of type `AccessPoint`. ### Solution ---- Add a new import method to the `AccessPoint` class called `fromAccessPointAttributes()` allowing to pass a fileSystem as an attribute. Closes #10711. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-efs/README.md | 19 ++ packages/@aws-cdk/aws-efs/lib/access-point.ts | 123 ++++++++- .../@aws-cdk/aws-efs/lib/efs-file-system.ts | 53 +++- .../aws-efs/test/access-point.test.ts | 85 +++++- .../@aws-cdk/aws-lambda/lib/filesystem.ts | 2 +- .../integ.lambda.filesystem.expected.json | 258 +++++++++++++++++- .../test/integ.lambda.filesystem.ts | 42 ++- 7 files changed, 542 insertions(+), 40 deletions(-) diff --git a/packages/@aws-cdk/aws-efs/README.md b/packages/@aws-cdk/aws-efs/README.md index 853ae097327cb..6a598f1146624 100644 --- a/packages/@aws-cdk/aws-efs/README.md +++ b/packages/@aws-cdk/aws-efs/README.md @@ -56,6 +56,25 @@ the access point. You may specify custom path with the `path` property. If `path created with the settings defined in the `creationInfo`. See [Creating Access Points](https://docs.aws.amazon.com/efs/latest/ug/create-access-point.html) for more details. +Any access point that has been created outside the stack can be imported into your CDK app. + +Use the `fromAccessPointAttributes()` API to import an existing access point. + +```ts +efs.AccessPoint.fromAccessPointAttributes(this, 'ap', { + accessPointArn: 'fsap-1293c4d9832fo0912', + fileSystem: efs.FileSystem.fromFileSystemAttributes(this, 'efs', { + fileSystemId: 'fs-099d3e2f', + securityGroup: SecurityGroup.fromSecurityGroupId(this, 'sg', 'sg-51530134'), + }), +}); +``` + +⚠️ Notice: When importing an Access Point using `fromAccessPointAttributes()`, you must make sure the mount targets are deployed and their lifecycle state is `available`. Otherwise, you may encounter the following error when deploying: +> EFS file system referenced by access point has +mount targets created in all availability zones the function will execute in, but not all are in the available life cycle +state yet. Please wait for them to become available and try the request again. + ### Connecting To control who can access the EFS, use the `.connections` attribute. EFS has diff --git a/packages/@aws-cdk/aws-efs/lib/access-point.ts b/packages/@aws-cdk/aws-efs/lib/access-point.ts index 7f43d88523bf1..29d22a5ec6032 100644 --- a/packages/@aws-cdk/aws-efs/lib/access-point.ts +++ b/packages/@aws-cdk/aws-efs/lib/access-point.ts @@ -20,11 +20,16 @@ export interface IAccessPoint extends IResource { * @attribute */ readonly accessPointArn: string; + + /** + * The efs filesystem + */ + readonly fileSystem: IFileSystem; } /** * Permissions as POSIX ACL - */ +*/ export interface Acl { /** * Specifies the POSIX user ID to apply to the RootDirectory. Accepts values from 0 to 2^32 (4294967295). @@ -109,23 +114,71 @@ export interface AccessPointProps extends AccessPointOptions { readonly fileSystem: IFileSystem; } +/** + * Attributes that can be specified when importing an AccessPoint + */ +export interface AccessPointAttributes { + /** + * The ID of the AccessPoint + * One of this, of {@link accessPointArn} is required + * + * @default - determined based on accessPointArn + */ + readonly accessPointId?: string; + + /** + * The ARN of the AccessPoint + * One of this, of {@link accessPointId} is required + * + * @default - determined based on accessPointId + */ + readonly accessPointArn?: string; + + /** + * The EFS filesystem + * + * @default - no EFS filesystem + */ + readonly fileSystem?: IFileSystem; +} + +abstract class AccessPointBase extends Resource implements IAccessPoint { + /** + * The ARN of the Access Point + * @attribute + */ + public abstract readonly accessPointArn: string; + + /** + * The ID of the Access Point + * @attribute + */ + public abstract readonly accessPointId: string; + + /** + * The filesystem of the access point + */ + public abstract readonly fileSystem: IFileSystem; +} + /** * Represents the AccessPoint */ -export class AccessPoint extends Resource implements IAccessPoint { +export class AccessPoint extends AccessPointBase { /** - * Import an existing Access Point + * Import an existing Access Point by attributes + */ + public static fromAccessPointAttributes(scope: Construct, id: string, attrs: AccessPointAttributes): IAccessPoint { + return new ImportedAccessPoint(scope, id, attrs); + } + + /** + * Import an existing Access Point by id */ public static fromAccessPointId(scope: Construct, id: string, accessPointId: string): IAccessPoint { - class Import extends Resource implements IAccessPoint { - public readonly accessPointId = accessPointId; - public readonly accessPointArn = Stack.of(scope).formatArn({ - service: 'elasticfilesystem', - resource: 'access-point', - resourceName: accessPointId, - }); - } - return new Import(scope, id); + return new ImportedAccessPoint(scope, id, { + accessPointId: accessPointId, + }); } /** @@ -174,3 +227,49 @@ export class AccessPoint extends Resource implements IAccessPoint { this.fileSystem = props.fileSystem; } } + +class ImportedAccessPoint extends AccessPointBase { + public readonly accessPointId: string; + public readonly accessPointArn: string; + private readonly _fileSystem?: IFileSystem; + + constructor(scope: Construct, id: string, attrs: AccessPointAttributes) { + super(scope, id); + + if (!attrs.accessPointId) { + if (!attrs.accessPointArn) { + throw new Error('One of accessPointId or AccessPointArn is required!'); + } + + this.accessPointArn = attrs.accessPointArn; + let maybeApId = Stack.of(scope).parseArn(attrs.accessPointArn).resourceName; + + if (!maybeApId) { + throw new Error('ARN for AccessPoint must provide the resource name.'); + } + + this.accessPointId = maybeApId; + } else { + if (attrs.accessPointArn) { + throw new Error('Only one of accessPointId or AccessPointArn can be provided!'); + } + + this.accessPointId = attrs.accessPointId; + this.accessPointArn = Stack.of(scope).formatArn({ + service: 'elasticfilesystem', + resource: 'access-point', + resourceName: attrs.accessPointId, + }); + } + + this._fileSystem = attrs.fileSystem; + } + + public get fileSystem() { + if (!this._fileSystem) { + throw new Error("fileSystem is not available when 'fromAccessPointId()' is used. Use 'fromAccessPointAttributes()' instead"); + } + + return this._fileSystem; + } +} diff --git a/packages/@aws-cdk/aws-efs/lib/efs-file-system.ts b/packages/@aws-cdk/aws-efs/lib/efs-file-system.ts index 2c28375667fe4..8572d85bf920d 100644 --- a/packages/@aws-cdk/aws-efs/lib/efs-file-system.ts +++ b/packages/@aws-cdk/aws-efs/lib/efs-file-system.ts @@ -206,28 +206,18 @@ export interface FileSystemAttributes { * @resource AWS::EFS::FileSystem */ export class FileSystem extends Resource implements IFileSystem { + /** + * The default port File System listens on. + */ + public static readonly DEFAULT_PORT: number = 2049; /** * Import an existing File System from the given properties. */ public static fromFileSystemAttributes(scope: Construct, id: string, attrs: FileSystemAttributes): IFileSystem { - class Import extends Resource implements IFileSystem { - public readonly fileSystemId = attrs.fileSystemId; - public readonly connections = new ec2.Connections({ - securityGroups: [attrs.securityGroup], - defaultPort: ec2.Port.tcp(FileSystem.DEFAULT_PORT), - }); - public readonly mountTargetsAvailable = new ConcreteDependable(); - } - - return new Import(scope, id); + return new ImportedFileSystem(scope, id, attrs); } - /** - * The default port File System listens on. - */ - private static readonly DEFAULT_PORT: number = 2049; - /** * The security groups/rules used to allow network connections to the file system. */ @@ -303,3 +293,36 @@ export class FileSystem extends Resource implements IFileSystem { }); } } + + +class ImportedFileSystem extends Resource implements IFileSystem { + /** + * The security groups/rules used to allow network connections to the file system. + */ + public readonly connections: ec2.Connections; + + /** + * @attribute + */ + public readonly fileSystemId: string; + + /** + * Dependable that can be depended upon to ensure the mount targets of the filesystem are ready + */ + public readonly mountTargetsAvailable: IDependable; + + constructor(scope: Construct, id: string, attrs: FileSystemAttributes) { + super(scope, id); + + this.fileSystemId = attrs.fileSystemId; + + this.connections = new ec2.Connections({ + securityGroups: [attrs.securityGroup], + defaultPort: ec2.Port.tcp(FileSystem.DEFAULT_PORT), + }); + + this.mountTargetsAvailable = new ConcreteDependable(); + } + + +} diff --git a/packages/@aws-cdk/aws-efs/test/access-point.test.ts b/packages/@aws-cdk/aws-efs/test/access-point.test.ts index 761594507c779..29770d2077d2f 100644 --- a/packages/@aws-cdk/aws-efs/test/access-point.test.ts +++ b/packages/@aws-cdk/aws-efs/test/access-point.test.ts @@ -31,7 +31,7 @@ test('new AccessPoint correctly', () => { expectCDK(stack).to(haveResource('AWS::EFS::AccessPoint')); }); -test('import correctly', () => { +test('import an AccessPoint using fromAccessPointId', () => { // WHEN const ap = new AccessPoint(stack, 'MyAccessPoint', { fileSystem, @@ -41,6 +41,87 @@ test('import correctly', () => { expect(imported.accessPointId).toEqual(ap.accessPointId); }); +test('import an AccessPoint using fromAccessPointId', () => { + // WHEN + const ap = new AccessPoint(stack, 'MyAccessPoint', { + fileSystem, + }); + const imported = AccessPoint.fromAccessPointId(stack, 'ImportedAccessPoint', ap.accessPointId); + // THEN + expect(() => imported.fileSystem).toThrow(/fileSystem is not available when 'fromAccessPointId\(\)' is used. Use 'fromAccessPointAttributes\(\)' instead/); +}); + +test('import an AccessPoint using fromAccessPointAttributes and the accessPointId', () => { + // WHEN + const ap = new AccessPoint(stack, 'MyAccessPoint', { + fileSystem, + }); + const imported = AccessPoint.fromAccessPointAttributes(stack, 'ImportedAccessPoint', { + accessPointId: ap.accessPointId, + fileSystem: fileSystem, + }); + // THEN + expect(imported.accessPointId).toEqual(ap.accessPointId); + expect(imported.accessPointArn).toEqual(ap.accessPointArn); + expect(imported.fileSystem).toEqual(ap.fileSystem); +}); + +test('import an AccessPoint using fromAccessPointAttributes and the accessPointArn', () => { + // WHEN + const ap = new AccessPoint(stack, 'MyAccessPoint', { + fileSystem, + }); + const imported = AccessPoint.fromAccessPointAttributes(stack, 'ImportedAccessPoint', { + accessPointArn: ap.accessPointArn, + fileSystem: fileSystem, + }); + // THEN + expect(imported.accessPointId).toEqual(ap.accessPointId); + expect(imported.accessPointArn).toEqual(ap.accessPointArn); + expect(imported.fileSystem).toEqual(ap.fileSystem); +}); + +test('import using accessPointArn', () => { + // WHEN + const ap = new AccessPoint(stack, 'MyAccessPoint', { + fileSystem, + }); + const imported = AccessPoint.fromAccessPointAttributes(stack, 'ImportedAccessPoint', { + accessPointArn: ap.accessPointArn, + fileSystem: fileSystem, + }); + // THEN + expect(imported.accessPointId).toEqual(ap.accessPointId); + expect(imported.accessPointArn).toEqual(ap.accessPointArn); + expect(imported.fileSystem).toEqual(ap.fileSystem); +}); + +test('throw when import using accessPointArn and accessPointId', () => { + // WHEN + const ap = new AccessPoint(stack, 'MyAccessPoint', { + fileSystem, + }); + + // THEN + expect(() => AccessPoint.fromAccessPointAttributes(stack, 'ImportedAccessPoint', { + accessPointArn: ap.accessPointArn, + accessPointId: ap.accessPointId, + fileSystem: fileSystem, + })).toThrow(/Only one of accessPointId or AccessPointArn can be provided!/); +}); + +test('throw when import without accessPointArn or accessPointId', () => { + // WHEN + new AccessPoint(stack, 'MyAccessPoint', { + fileSystem, + }); + + // THEN + expect(() => AccessPoint.fromAccessPointAttributes(stack, 'ImportedAccessPoint', { + fileSystem: fileSystem, + })).toThrow(/One of accessPointId or AccessPointArn is required!/); +}); + test('custom access point is created correctly', () => { // WHEN new AccessPoint(stack, 'MyAccessPoint', { @@ -83,4 +164,4 @@ test('custom access point is created correctly', () => { Path: '/export/share', }, })); -}); \ No newline at end of file +}); diff --git a/packages/@aws-cdk/aws-lambda/lib/filesystem.ts b/packages/@aws-cdk/aws-lambda/lib/filesystem.ts index 20b0cb1fc130d..388db50e045ec 100644 --- a/packages/@aws-cdk/aws-lambda/lib/filesystem.ts +++ b/packages/@aws-cdk/aws-lambda/lib/filesystem.ts @@ -50,7 +50,7 @@ export class FileSystem { * @param ap the Amazon EFS access point * @param mountPath the target path in the lambda runtime environment */ - public static fromEfsAccessPoint(ap: efs.AccessPoint, mountPath: string): FileSystem { + public static fromEfsAccessPoint(ap: efs.IAccessPoint, mountPath: string): FileSystem { return new FileSystem({ localMountPath: mountPath, arn: ap.accessPointArn, diff --git a/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.expected.json b/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.expected.json index ff7a04f8b7fd5..3d17a0e6ca6bf 100644 --- a/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.expected.json +++ b/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.expected.json @@ -736,7 +736,7 @@ "Type": "AWS::Lambda::Function", "Properties": { "Code": { - "ZipFile": "\nimport json\nimport os\nimport string\nimport random\nimport datetime\n\nMSG_FILE_PATH = '/mnt/msg/content'\n\ndef randomString(stringLength=10):\n letters = string.ascii_lowercase\n return ''.join(random.choice(letters) for i in range(stringLength))\n\ndef lambda_handler(event, context):\n with open(MSG_FILE_PATH, 'a') as f:\n f.write(f\"{datetime.datetime.utcnow():%Y-%m-%d-%H:%M:%S} \" + randomString(5) + ' ')\n\n file = open(MSG_FILE_PATH, \"r\")\n file_content = file.read()\n file.close()\n\n return {\n 'statusCode': 200,\n 'body': str(file_content)\n }\n " + "ZipFile": "\nimport json\nimport os\nimport string\nimport random\nimport datetime\n\nMSG_FILE_PATH = '/mnt/msg/content'\n\ndef randomString(stringLength=10):\n letters = string.ascii_lowercase\n return ''.join(random.choice(letters) for i in range(stringLength))\n\ndef lambda_handler(event, context):\n with open(MSG_FILE_PATH, 'a') as f:\n f.write(f\"{datetime.datetime.utcnow():%Y-%m-%d-%H:%M:%S} \" + randomString(5) + ' ')\n\n file = open(MSG_FILE_PATH, \"r\")\n file_content = file.read()\n file.close()\n\n return {\n 'statusCode': 200,\n 'body': str(file_content)\n }\n" }, "Handler": "index.lambda_handler", "Role": { @@ -746,6 +746,34 @@ ] }, "Runtime": "python3.7", + "FileSystemConfigs": [ + { + "LocalMountPath": "/mnt/msg", + "Arn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":elasticfilesystem:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":access-point/", + { + "Ref": "EfsAccessPointE419FED9" + } + ] + ] + } + } + ], "VpcConfig": { "SecurityGroupIds": [ { @@ -766,7 +794,203 @@ "Ref": "VpcPrivateSubnet3SubnetF258B56E" } ] + } + }, + "DependsOn": [ + "EfsEfsMountTarget195B2DD2E", + "EfsEfsMountTarget2315C927F", + "EfsEfsMountTarget36646B9A0", + "MyLambdaServiceRoleDefaultPolicy5BBC6F68", + "MyLambdaServiceRole4539ECB6" + ] + }, + "securityGroupfromawscdklambda1MyLambda2SecurityGroup7492F70D20498301D9D2": { + "Type": "AWS::EC2::SecurityGroupIngress", + "Properties": { + "IpProtocol": "tcp", + "Description": "from awscdklambda1MyLambda2SecurityGroup7492F70D:2049", + "FromPort": 2049, + "GroupId": { + "Fn::GetAtt": [ + "EfsEfsSecurityGroup6F40EA3B", + "GroupId" + ] + }, + "SourceSecurityGroupId": { + "Fn::GetAtt": [ + "MyLambda2SecurityGroup3C507954", + "GroupId" + ] + }, + "ToPort": 2049 + } + }, + "MyLambda2ServiceRoleD09B370C": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole" + ] + ] + } + ] + }, + "DependsOn": [ + "MyLambdaCCE802FB", + "MyLambdaSecurityGroup1E71A818", + "MyLambdaServiceRoleDefaultPolicy5BBC6F68", + "MyLambdaServiceRole4539ECB6" + ] + }, + "MyLambda2ServiceRoleDefaultPolicy2BECE79D": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "elasticfilesystem:ClientMount", + "Condition": { + "StringEquals": { + "elasticfilesystem:AccessPointArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":elasticfilesystem:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":access-point/", + { + "Ref": "EfsAccessPointE419FED9" + } + ] + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": "elasticfilesystem:ClientWrite", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":elasticfilesystem:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":file-system/", + { + "Ref": "Efs9E8BF36B" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "MyLambda2ServiceRoleDefaultPolicy2BECE79D", + "Roles": [ + { + "Ref": "MyLambda2ServiceRoleD09B370C" + } + ] + }, + "DependsOn": [ + "MyLambdaCCE802FB", + "MyLambdaSecurityGroup1E71A818", + "MyLambdaServiceRoleDefaultPolicy5BBC6F68", + "MyLambdaServiceRole4539ECB6" + ] + }, + "MyLambda2SecurityGroup3C507954": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "Automatic security group for Lambda Function awscdklambda1MyLambda232FB7CD2", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + }, + "DependsOn": [ + "MyLambdaCCE802FB", + "MyLambdaSecurityGroup1E71A818", + "MyLambdaServiceRoleDefaultPolicy5BBC6F68", + "MyLambdaServiceRole4539ECB6" + ] + }, + "MyLambda2254B54D5": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "\nimport json\nimport os\nimport string\nimport random\nimport datetime\n\nMSG_FILE_PATH = '/mnt/msg/content'\n\ndef randomString(stringLength=10):\n letters = string.ascii_lowercase\n return ''.join(random.choice(letters) for i in range(stringLength))\n\ndef lambda_handler(event, context):\n with open(MSG_FILE_PATH, 'a') as f:\n f.write(f\"{datetime.datetime.utcnow():%Y-%m-%d-%H:%M:%S} \" + randomString(5) + ' ')\n\n file = open(MSG_FILE_PATH, \"r\")\n file_content = file.read()\n file.close()\n\n return {\n 'statusCode': 200,\n 'body': str(file_content)\n }\n" + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "MyLambda2ServiceRoleD09B370C", + "Arn" + ] }, + "Runtime": "python3.7", "FileSystemConfigs": [ { "LocalMountPath": "/mnt/msg", @@ -794,14 +1018,36 @@ ] } } - ] + ], + "VpcConfig": { + "SecurityGroupIds": [ + { + "Fn::GetAtt": [ + "MyLambda2SecurityGroup3C507954", + "GroupId" + ] + } + ], + "SubnetIds": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + }, + { + "Ref": "VpcPrivateSubnet3SubnetF258B56E" + } + ] + } }, "DependsOn": [ - "EfsEfsMountTarget195B2DD2E", - "EfsEfsMountTarget2315C927F", - "EfsEfsMountTarget36646B9A0", + "MyLambdaCCE802FB", + "MyLambdaSecurityGroup1E71A818", "MyLambdaServiceRoleDefaultPolicy5BBC6F68", - "MyLambdaServiceRole4539ECB6" + "MyLambdaServiceRole4539ECB6", + "MyLambda2ServiceRoleDefaultPolicy2BECE79D", + "MyLambda2ServiceRoleD09B370C" ] } } diff --git a/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.ts b/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.ts index da6515233e770..c9441c1cd0a52 100644 --- a/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.ts +++ b/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.ts @@ -7,6 +7,7 @@ const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-cdk-lambda-1'); + const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 3, natGateways: 1, @@ -31,9 +32,7 @@ const accessPoint = fileSystem.addAccessPoint('AccessPoint', { }, }); -// this function will mount the access point to '/mnt/msg' and write content onto /mnt/msg/content -new lambda.Function(stack, 'MyLambda', { - code: new lambda.InlineCode(` +const lambdaCode = new lambda.InlineCode(` import json import os import string @@ -58,11 +57,46 @@ def lambda_handler(event, context): 'statusCode': 200, 'body': str(file_content) } - `), +`); + +// this function will mount the access point to '/mnt/msg' and write content onto /mnt/msg/content +const lambda1 = new lambda.Function(stack, 'MyLambda', { + code: lambdaCode, handler: 'index.lambda_handler', runtime: lambda.Runtime.PYTHON_3_7, vpc, filesystem: lambda.FileSystem.fromEfsAccessPoint(accessPoint, '/mnt/msg'), }); +let importedFileSystem = efs.FileSystem.fromFileSystemAttributes(stack, 'fileSystemImported', { + fileSystemId: fileSystem.fileSystemId, + securityGroup: ec2.SecurityGroup.fromSecurityGroupId( + stack, + 'securityGroup', + fileSystem.connections.securityGroups[0].securityGroupId, + ), +}); + +let importedAccessPoint = efs.AccessPoint.fromAccessPointAttributes(stack, 'AccessPointImported', { + accessPointId: accessPoint.accessPointId, + fileSystem: importedFileSystem, +}); + +// this function will mount the access point to '/mnt/msg' and write content onto /mnt/msg/content +const lambda2 = new lambda.Function(stack, 'MyLambda2', { + code: lambdaCode, + handler: 'index.lambda_handler', + runtime: lambda.Runtime.PYTHON_3_7, + vpc, + filesystem: lambda.FileSystem.fromEfsAccessPoint( + importedAccessPoint, + '/mnt/msg', + ), +}); + +// lambda2 doesn't have dependencies on MountTargets because the fileSystem is imported. +// Ideally, lambda2 would be deployed in another stack but integ doesn't support it. +// We are adding a dependency on the first lambda to simulate this situation. +lambda2.node.addDependency(lambda1); + app.synth(); From 8c17a35746271d38289f6e200aea35b201b8a93d Mon Sep 17 00:00:00 2001 From: AWS CDK Automation <43080478+aws-cdk-automation@users.noreply.github.com> Date: Wed, 11 Nov 2020 19:27:10 +0100 Subject: [PATCH 113/314] feat(cfnspec): cloudformation spec v20.0.0 (#11319) Following are open issues for missing properties that will be added with the update: - Closes https://github.com/aws/aws-cdk/issues/11275 --- packages/@aws-cdk/aws-ec2/lib/vpc.ts | 7 + .../@aws-cdk/aws-iotsitewise/.eslintrc.js | 3 + packages/@aws-cdk/aws-iotsitewise/.gitignore | 19 + packages/@aws-cdk/aws-iotsitewise/.npmignore | 28 + packages/@aws-cdk/aws-iotsitewise/LICENSE | 201 ++ packages/@aws-cdk/aws-iotsitewise/NOTICE | 2 + packages/@aws-cdk/aws-iotsitewise/README.md | 16 + .../@aws-cdk/aws-iotsitewise/jest.config.js | 2 + .../@aws-cdk/aws-iotsitewise/lib/index.ts | 2 + .../@aws-cdk/aws-iotsitewise/package.json | 96 + .../aws-iotsitewise/test/iotsitewise.test.ts | 6 + packages/@aws-cdk/aws-ivs/.eslintrc.js | 3 + packages/@aws-cdk/aws-ivs/.gitignore | 19 + packages/@aws-cdk/aws-ivs/.npmignore | 28 + packages/@aws-cdk/aws-ivs/LICENSE | 201 ++ packages/@aws-cdk/aws-ivs/NOTICE | 2 + packages/@aws-cdk/aws-ivs/README.md | 16 + packages/@aws-cdk/aws-ivs/jest.config.js | 2 + packages/@aws-cdk/aws-ivs/lib/index.ts | 2 + packages/@aws-cdk/aws-ivs/package.json | 96 + packages/@aws-cdk/aws-ivs/test/ivs.test.ts | 6 + .../@aws-cdk/aws-mediapackage/.eslintrc.js | 3 + packages/@aws-cdk/aws-mediapackage/.gitignore | 19 + packages/@aws-cdk/aws-mediapackage/.npmignore | 28 + packages/@aws-cdk/aws-mediapackage/LICENSE | 201 ++ packages/@aws-cdk/aws-mediapackage/NOTICE | 2 + packages/@aws-cdk/aws-mediapackage/README.md | 16 + .../@aws-cdk/aws-mediapackage/jest.config.js | 2 + .../@aws-cdk/aws-mediapackage/lib/index.ts | 2 + .../@aws-cdk/aws-mediapackage/package.json | 96 + .../test/mediapackage.test.ts | 6 + packages/@aws-cdk/cfnspec/CHANGELOG.md | 152 ++ packages/@aws-cdk/cfnspec/cfn.version | 2 +- ...0_CloudFormationResourceSpecification.json | 2350 ++++++++++++++++- ...aPackage_PackagingConfiguration_patch.json | 29 + ...80_AutoScaling_AutoScalingGroup_patch.json | 31 + .../680_MediaPackage_Channel_patch.json | 15 + .../cloudformation-include/package.json | 6 + packages/aws-cdk-lib/package.json | 3 + packages/decdk/package.json | 3 + packages/monocdk/package.json | 5 +- 41 files changed, 3587 insertions(+), 141 deletions(-) create mode 100644 packages/@aws-cdk/aws-iotsitewise/.eslintrc.js create mode 100644 packages/@aws-cdk/aws-iotsitewise/.gitignore create mode 100644 packages/@aws-cdk/aws-iotsitewise/.npmignore create mode 100644 packages/@aws-cdk/aws-iotsitewise/LICENSE create mode 100644 packages/@aws-cdk/aws-iotsitewise/NOTICE create mode 100644 packages/@aws-cdk/aws-iotsitewise/README.md create mode 100644 packages/@aws-cdk/aws-iotsitewise/jest.config.js create mode 100644 packages/@aws-cdk/aws-iotsitewise/lib/index.ts create mode 100644 packages/@aws-cdk/aws-iotsitewise/package.json create mode 100644 packages/@aws-cdk/aws-iotsitewise/test/iotsitewise.test.ts create mode 100644 packages/@aws-cdk/aws-ivs/.eslintrc.js create mode 100644 packages/@aws-cdk/aws-ivs/.gitignore create mode 100644 packages/@aws-cdk/aws-ivs/.npmignore create mode 100644 packages/@aws-cdk/aws-ivs/LICENSE create mode 100644 packages/@aws-cdk/aws-ivs/NOTICE create mode 100644 packages/@aws-cdk/aws-ivs/README.md create mode 100644 packages/@aws-cdk/aws-ivs/jest.config.js create mode 100644 packages/@aws-cdk/aws-ivs/lib/index.ts create mode 100644 packages/@aws-cdk/aws-ivs/package.json create mode 100644 packages/@aws-cdk/aws-ivs/test/ivs.test.ts create mode 100644 packages/@aws-cdk/aws-mediapackage/.eslintrc.js create mode 100644 packages/@aws-cdk/aws-mediapackage/.gitignore create mode 100644 packages/@aws-cdk/aws-mediapackage/.npmignore create mode 100644 packages/@aws-cdk/aws-mediapackage/LICENSE create mode 100644 packages/@aws-cdk/aws-mediapackage/NOTICE create mode 100644 packages/@aws-cdk/aws-mediapackage/README.md create mode 100644 packages/@aws-cdk/aws-mediapackage/jest.config.js create mode 100644 packages/@aws-cdk/aws-mediapackage/lib/index.ts create mode 100644 packages/@aws-cdk/aws-mediapackage/package.json create mode 100644 packages/@aws-cdk/aws-mediapackage/test/mediapackage.test.ts create mode 100644 packages/@aws-cdk/cfnspec/spec-source/670_MediaPackage_PackagingConfiguration_patch.json create mode 100644 packages/@aws-cdk/cfnspec/spec-source/680_AutoScaling_AutoScalingGroup_patch.json create mode 100644 packages/@aws-cdk/cfnspec/spec-source/680_MediaPackage_Channel_patch.json diff --git a/packages/@aws-cdk/aws-ec2/lib/vpc.ts b/packages/@aws-cdk/aws-ec2/lib/vpc.ts index f73a3b4c08c2a..e46113b14c89a 100644 --- a/packages/@aws-cdk/aws-ec2/lib/vpc.ts +++ b/packages/@aws-cdk/aws-ec2/lib/vpc.ts @@ -1485,6 +1485,12 @@ export class Subnet extends Resource implements ISubnet { */ public readonly subnetIpv6CidrBlocks: string[]; + /** + * The Amazon Resource Name (ARN) of the Outpost for this subnet (if one exists). + * @attribute + */ + public readonly subnetOutpostArn: string; + /** * @attribute */ @@ -1525,6 +1531,7 @@ export class Subnet extends Resource implements ISubnet { this.subnetVpcId = subnet.attrVpcId; this.subnetAvailabilityZone = subnet.attrAvailabilityZone; this.subnetIpv6CidrBlocks = subnet.attrIpv6CidrBlocks; + this.subnetOutpostArn = subnet.attrOutpostArn; // subnet.attrNetworkAclAssociationId is the default ACL after the subnet // was just created. However, the ACL can be replaced at a later time. diff --git a/packages/@aws-cdk/aws-iotsitewise/.eslintrc.js b/packages/@aws-cdk/aws-iotsitewise/.eslintrc.js new file mode 100644 index 0000000000000..61dd8dd001f63 --- /dev/null +++ b/packages/@aws-cdk/aws-iotsitewise/.eslintrc.js @@ -0,0 +1,3 @@ +const baseConfig = require('cdk-build-tools/config/eslintrc'); +baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-iotsitewise/.gitignore b/packages/@aws-cdk/aws-iotsitewise/.gitignore new file mode 100644 index 0000000000000..62ebc95d75ce6 --- /dev/null +++ b/packages/@aws-cdk/aws-iotsitewise/.gitignore @@ -0,0 +1,19 @@ +*.js +*.js.map +*.d.ts +tsconfig.json +node_modules +*.generated.ts +dist +.jsii + +.LAST_BUILD +.nyc_output +coverage +.nycrc +.LAST_PACKAGE +*.snk +nyc.config.js +!.eslintrc.js +!jest.config.js +junit.xml diff --git a/packages/@aws-cdk/aws-iotsitewise/.npmignore b/packages/@aws-cdk/aws-iotsitewise/.npmignore new file mode 100644 index 0000000000000..e4486030fcb17 --- /dev/null +++ b/packages/@aws-cdk/aws-iotsitewise/.npmignore @@ -0,0 +1,28 @@ +# Don't include original .ts files when doing `npm pack` +*.ts +!*.d.ts +coverage +.nyc_output +*.tgz + +dist +.LAST_PACKAGE +.LAST_BUILD +!*.js + +# Include .jsii +!.jsii + +*.snk + +*.tsbuildinfo + +tsconfig.json + +.eslintrc.js +jest.config.js + +# exclude cdk artifacts +**/cdk.out +junit.xml +test/ diff --git a/packages/@aws-cdk/aws-iotsitewise/LICENSE b/packages/@aws-cdk/aws-iotsitewise/LICENSE new file mode 100644 index 0000000000000..b71ec1688783a --- /dev/null +++ b/packages/@aws-cdk/aws-iotsitewise/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/@aws-cdk/aws-iotsitewise/NOTICE b/packages/@aws-cdk/aws-iotsitewise/NOTICE new file mode 100644 index 0000000000000..bfccac9a7f69c --- /dev/null +++ b/packages/@aws-cdk/aws-iotsitewise/NOTICE @@ -0,0 +1,2 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-iotsitewise/README.md b/packages/@aws-cdk/aws-iotsitewise/README.md new file mode 100644 index 0000000000000..c92df247f85b4 --- /dev/null +++ b/packages/@aws-cdk/aws-iotsitewise/README.md @@ -0,0 +1,16 @@ +## AWS::IoTSiteWise Construct Library + +--- + +![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) + +> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. + +--- + + +This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. + +```ts +import iotsitewise = require('@aws-cdk/aws-iotsitewise'); +``` diff --git a/packages/@aws-cdk/aws-iotsitewise/jest.config.js b/packages/@aws-cdk/aws-iotsitewise/jest.config.js new file mode 100644 index 0000000000000..54e28beb9798b --- /dev/null +++ b/packages/@aws-cdk/aws-iotsitewise/jest.config.js @@ -0,0 +1,2 @@ +const baseConfig = require('cdk-build-tools/config/jest.config'); +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-iotsitewise/lib/index.ts b/packages/@aws-cdk/aws-iotsitewise/lib/index.ts new file mode 100644 index 0000000000000..c31b4b7c13647 --- /dev/null +++ b/packages/@aws-cdk/aws-iotsitewise/lib/index.ts @@ -0,0 +1,2 @@ +// AWS::IoTSiteWise CloudFormation Resources: +export * from './iotsitewise.generated'; diff --git a/packages/@aws-cdk/aws-iotsitewise/package.json b/packages/@aws-cdk/aws-iotsitewise/package.json new file mode 100644 index 0000000000000..8291616094fca --- /dev/null +++ b/packages/@aws-cdk/aws-iotsitewise/package.json @@ -0,0 +1,96 @@ +{ + "name": "@aws-cdk/aws-iotsitewise", + "version": "0.0.0", + "description": "The CDK Construct Library for AWS::IoTSiteWise", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "jsii": { + "outdir": "dist", + "projectReferences": true, + "targets": { + "dotnet": { + "namespace": "Amazon.CDK.AWS.IoTSiteWise", + "packageId": "Amazon.CDK.AWS.IoTSiteWise", + "signAssembly": true, + "assemblyOriginatorKeyFile": "../../key.snk", + "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/master/logo/default-256-dark.png" + }, + "java": { + "package": "software.amazon.awscdk.services.iotsitewise", + "maven": { + "groupId": "software.amazon.awscdk", + "artifactId": "iotsitewise" + } + }, + "python": { + "classifiers": [ + "Framework :: AWS CDK", + "Framework :: AWS CDK :: 1" + ], + "distName": "aws-cdk.aws-iotsitewise", + "module": "aws_cdk.aws_iotsitewise" + } + } + }, + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk.git", + "directory": "packages/@aws-cdk/aws-iotsitewise" + }, + "homepage": "https://github.com/aws/aws-cdk", + "scripts": { + "build": "cdk-build", + "watch": "cdk-watch", + "lint": "cdk-lint", + "test": "cdk-test", + "integ": "cdk-integ", + "pkglint": "pkglint -f", + "package": "cdk-package", + "awslint": "cdk-awslint", + "cfn2ts": "cfn2ts", + "build+test+package": "npm run build+test && npm run package", + "build+test": "npm run build && npm test", + "compat": "cdk-compat", + "gen": "cfn2ts" + }, + "cdk-build": { + "cloudformation": "AWS::IoTSiteWise", + "jest": true, + "env": { + "AWSLINT_BASE_CONSTRUCT": "true" + } + }, + "keywords": [ + "aws", + "cdk", + "constructs", + "AWS::IoTSiteWise", + "aws-iotsitewise" + ], + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "license": "Apache-2.0", + "devDependencies": { + "@aws-cdk/assert": "0.0.0", + "cdk-build-tools": "0.0.0", + "cfn2ts": "0.0.0", + "pkglint": "0.0.0" + }, + "dependencies": { + "@aws-cdk/core": "0.0.0" + }, + "peerDependencies": { + "@aws-cdk/core": "0.0.0" + }, + "engines": { + "node": ">= 10.13.0 <13 || >=13.7.0" + }, + "stability": "experimental", + "maturity": "cfn-only", + "awscdkio": { + "announce": false + } +} diff --git a/packages/@aws-cdk/aws-iotsitewise/test/iotsitewise.test.ts b/packages/@aws-cdk/aws-iotsitewise/test/iotsitewise.test.ts new file mode 100644 index 0000000000000..e394ef336bfb4 --- /dev/null +++ b/packages/@aws-cdk/aws-iotsitewise/test/iotsitewise.test.ts @@ -0,0 +1,6 @@ +import '@aws-cdk/assert/jest'; +import {} from '../lib'; + +test('No tests are specified for this package', () => { + expect(true).toBe(true); +}); diff --git a/packages/@aws-cdk/aws-ivs/.eslintrc.js b/packages/@aws-cdk/aws-ivs/.eslintrc.js new file mode 100644 index 0000000000000..61dd8dd001f63 --- /dev/null +++ b/packages/@aws-cdk/aws-ivs/.eslintrc.js @@ -0,0 +1,3 @@ +const baseConfig = require('cdk-build-tools/config/eslintrc'); +baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-ivs/.gitignore b/packages/@aws-cdk/aws-ivs/.gitignore new file mode 100644 index 0000000000000..62ebc95d75ce6 --- /dev/null +++ b/packages/@aws-cdk/aws-ivs/.gitignore @@ -0,0 +1,19 @@ +*.js +*.js.map +*.d.ts +tsconfig.json +node_modules +*.generated.ts +dist +.jsii + +.LAST_BUILD +.nyc_output +coverage +.nycrc +.LAST_PACKAGE +*.snk +nyc.config.js +!.eslintrc.js +!jest.config.js +junit.xml diff --git a/packages/@aws-cdk/aws-ivs/.npmignore b/packages/@aws-cdk/aws-ivs/.npmignore new file mode 100644 index 0000000000000..e4486030fcb17 --- /dev/null +++ b/packages/@aws-cdk/aws-ivs/.npmignore @@ -0,0 +1,28 @@ +# Don't include original .ts files when doing `npm pack` +*.ts +!*.d.ts +coverage +.nyc_output +*.tgz + +dist +.LAST_PACKAGE +.LAST_BUILD +!*.js + +# Include .jsii +!.jsii + +*.snk + +*.tsbuildinfo + +tsconfig.json + +.eslintrc.js +jest.config.js + +# exclude cdk artifacts +**/cdk.out +junit.xml +test/ diff --git a/packages/@aws-cdk/aws-ivs/LICENSE b/packages/@aws-cdk/aws-ivs/LICENSE new file mode 100644 index 0000000000000..b71ec1688783a --- /dev/null +++ b/packages/@aws-cdk/aws-ivs/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/@aws-cdk/aws-ivs/NOTICE b/packages/@aws-cdk/aws-ivs/NOTICE new file mode 100644 index 0000000000000..bfccac9a7f69c --- /dev/null +++ b/packages/@aws-cdk/aws-ivs/NOTICE @@ -0,0 +1,2 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-ivs/README.md b/packages/@aws-cdk/aws-ivs/README.md new file mode 100644 index 0000000000000..0e8b591f39c21 --- /dev/null +++ b/packages/@aws-cdk/aws-ivs/README.md @@ -0,0 +1,16 @@ +## AWS::IVS Construct Library + +--- + +![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) + +> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. + +--- + + +This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. + +```ts +import ivs = require('@aws-cdk/aws-ivs'); +``` diff --git a/packages/@aws-cdk/aws-ivs/jest.config.js b/packages/@aws-cdk/aws-ivs/jest.config.js new file mode 100644 index 0000000000000..54e28beb9798b --- /dev/null +++ b/packages/@aws-cdk/aws-ivs/jest.config.js @@ -0,0 +1,2 @@ +const baseConfig = require('cdk-build-tools/config/jest.config'); +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-ivs/lib/index.ts b/packages/@aws-cdk/aws-ivs/lib/index.ts new file mode 100644 index 0000000000000..418b7c6157e85 --- /dev/null +++ b/packages/@aws-cdk/aws-ivs/lib/index.ts @@ -0,0 +1,2 @@ +// AWS::IVS CloudFormation Resources: +export * from './ivs.generated'; diff --git a/packages/@aws-cdk/aws-ivs/package.json b/packages/@aws-cdk/aws-ivs/package.json new file mode 100644 index 0000000000000..ea872b6960b3f --- /dev/null +++ b/packages/@aws-cdk/aws-ivs/package.json @@ -0,0 +1,96 @@ +{ + "name": "@aws-cdk/aws-ivs", + "version": "0.0.0", + "description": "The CDK Construct Library for AWS::IVS", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "jsii": { + "outdir": "dist", + "projectReferences": true, + "targets": { + "dotnet": { + "namespace": "Amazon.CDK.AWS.IVS", + "packageId": "Amazon.CDK.AWS.IVS", + "signAssembly": true, + "assemblyOriginatorKeyFile": "../../key.snk", + "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/master/logo/default-256-dark.png" + }, + "java": { + "package": "software.amazon.awscdk.services.ivs", + "maven": { + "groupId": "software.amazon.awscdk", + "artifactId": "ivs" + } + }, + "python": { + "classifiers": [ + "Framework :: AWS CDK", + "Framework :: AWS CDK :: 1" + ], + "distName": "aws-cdk.aws-ivs", + "module": "aws_cdk.aws_ivs" + } + } + }, + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk.git", + "directory": "packages/@aws-cdk/aws-ivs" + }, + "homepage": "https://github.com/aws/aws-cdk", + "scripts": { + "build": "cdk-build", + "watch": "cdk-watch", + "lint": "cdk-lint", + "test": "cdk-test", + "integ": "cdk-integ", + "pkglint": "pkglint -f", + "package": "cdk-package", + "awslint": "cdk-awslint", + "cfn2ts": "cfn2ts", + "build+test+package": "npm run build+test && npm run package", + "build+test": "npm run build && npm test", + "compat": "cdk-compat", + "gen": "cfn2ts" + }, + "cdk-build": { + "cloudformation": "AWS::IVS", + "jest": true, + "env": { + "AWSLINT_BASE_CONSTRUCT": "true" + } + }, + "keywords": [ + "aws", + "cdk", + "constructs", + "AWS::IVS", + "aws-ivs" + ], + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "license": "Apache-2.0", + "devDependencies": { + "@aws-cdk/assert": "0.0.0", + "cdk-build-tools": "0.0.0", + "cfn2ts": "0.0.0", + "pkglint": "0.0.0" + }, + "dependencies": { + "@aws-cdk/core": "0.0.0" + }, + "peerDependencies": { + "@aws-cdk/core": "0.0.0" + }, + "engines": { + "node": ">= 10.13.0 <13 || >=13.7.0" + }, + "stability": "experimental", + "maturity": "cfn-only", + "awscdkio": { + "announce": false + } +} diff --git a/packages/@aws-cdk/aws-ivs/test/ivs.test.ts b/packages/@aws-cdk/aws-ivs/test/ivs.test.ts new file mode 100644 index 0000000000000..e394ef336bfb4 --- /dev/null +++ b/packages/@aws-cdk/aws-ivs/test/ivs.test.ts @@ -0,0 +1,6 @@ +import '@aws-cdk/assert/jest'; +import {} from '../lib'; + +test('No tests are specified for this package', () => { + expect(true).toBe(true); +}); diff --git a/packages/@aws-cdk/aws-mediapackage/.eslintrc.js b/packages/@aws-cdk/aws-mediapackage/.eslintrc.js new file mode 100644 index 0000000000000..61dd8dd001f63 --- /dev/null +++ b/packages/@aws-cdk/aws-mediapackage/.eslintrc.js @@ -0,0 +1,3 @@ +const baseConfig = require('cdk-build-tools/config/eslintrc'); +baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-mediapackage/.gitignore b/packages/@aws-cdk/aws-mediapackage/.gitignore new file mode 100644 index 0000000000000..62ebc95d75ce6 --- /dev/null +++ b/packages/@aws-cdk/aws-mediapackage/.gitignore @@ -0,0 +1,19 @@ +*.js +*.js.map +*.d.ts +tsconfig.json +node_modules +*.generated.ts +dist +.jsii + +.LAST_BUILD +.nyc_output +coverage +.nycrc +.LAST_PACKAGE +*.snk +nyc.config.js +!.eslintrc.js +!jest.config.js +junit.xml diff --git a/packages/@aws-cdk/aws-mediapackage/.npmignore b/packages/@aws-cdk/aws-mediapackage/.npmignore new file mode 100644 index 0000000000000..e4486030fcb17 --- /dev/null +++ b/packages/@aws-cdk/aws-mediapackage/.npmignore @@ -0,0 +1,28 @@ +# Don't include original .ts files when doing `npm pack` +*.ts +!*.d.ts +coverage +.nyc_output +*.tgz + +dist +.LAST_PACKAGE +.LAST_BUILD +!*.js + +# Include .jsii +!.jsii + +*.snk + +*.tsbuildinfo + +tsconfig.json + +.eslintrc.js +jest.config.js + +# exclude cdk artifacts +**/cdk.out +junit.xml +test/ diff --git a/packages/@aws-cdk/aws-mediapackage/LICENSE b/packages/@aws-cdk/aws-mediapackage/LICENSE new file mode 100644 index 0000000000000..b71ec1688783a --- /dev/null +++ b/packages/@aws-cdk/aws-mediapackage/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/@aws-cdk/aws-mediapackage/NOTICE b/packages/@aws-cdk/aws-mediapackage/NOTICE new file mode 100644 index 0000000000000..bfccac9a7f69c --- /dev/null +++ b/packages/@aws-cdk/aws-mediapackage/NOTICE @@ -0,0 +1,2 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-mediapackage/README.md b/packages/@aws-cdk/aws-mediapackage/README.md new file mode 100644 index 0000000000000..11d84261af563 --- /dev/null +++ b/packages/@aws-cdk/aws-mediapackage/README.md @@ -0,0 +1,16 @@ +## AWS::MediaPackage Construct Library + +--- + +![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) + +> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. + +--- + + +This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. + +```ts +import mediapackage = require('@aws-cdk/aws-mediapackage'); +``` diff --git a/packages/@aws-cdk/aws-mediapackage/jest.config.js b/packages/@aws-cdk/aws-mediapackage/jest.config.js new file mode 100644 index 0000000000000..54e28beb9798b --- /dev/null +++ b/packages/@aws-cdk/aws-mediapackage/jest.config.js @@ -0,0 +1,2 @@ +const baseConfig = require('cdk-build-tools/config/jest.config'); +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-mediapackage/lib/index.ts b/packages/@aws-cdk/aws-mediapackage/lib/index.ts new file mode 100644 index 0000000000000..730abc4ac52fc --- /dev/null +++ b/packages/@aws-cdk/aws-mediapackage/lib/index.ts @@ -0,0 +1,2 @@ +// AWS::MediaPackage CloudFormation Resources: +export * from './mediapackage.generated'; diff --git a/packages/@aws-cdk/aws-mediapackage/package.json b/packages/@aws-cdk/aws-mediapackage/package.json new file mode 100644 index 0000000000000..c3561ae1027bf --- /dev/null +++ b/packages/@aws-cdk/aws-mediapackage/package.json @@ -0,0 +1,96 @@ +{ + "name": "@aws-cdk/aws-mediapackage", + "version": "0.0.0", + "description": "The CDK Construct Library for AWS::MediaPackage", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "jsii": { + "outdir": "dist", + "projectReferences": true, + "targets": { + "dotnet": { + "namespace": "Amazon.CDK.AWS.MediaPackage", + "packageId": "Amazon.CDK.AWS.MediaPackage", + "signAssembly": true, + "assemblyOriginatorKeyFile": "../../key.snk", + "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/master/logo/default-256-dark.png" + }, + "java": { + "package": "software.amazon.awscdk.services.mediapackage", + "maven": { + "groupId": "software.amazon.awscdk", + "artifactId": "mediapackage" + } + }, + "python": { + "classifiers": [ + "Framework :: AWS CDK", + "Framework :: AWS CDK :: 1" + ], + "distName": "aws-cdk.aws-mediapackage", + "module": "aws_cdk.aws_mediapackage" + } + } + }, + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk.git", + "directory": "packages/@aws-cdk/aws-mediapackage" + }, + "homepage": "https://github.com/aws/aws-cdk", + "scripts": { + "build": "cdk-build", + "watch": "cdk-watch", + "lint": "cdk-lint", + "test": "cdk-test", + "integ": "cdk-integ", + "pkglint": "pkglint -f", + "package": "cdk-package", + "awslint": "cdk-awslint", + "cfn2ts": "cfn2ts", + "build+test+package": "npm run build+test && npm run package", + "build+test": "npm run build && npm test", + "compat": "cdk-compat", + "gen": "cfn2ts" + }, + "cdk-build": { + "cloudformation": "AWS::MediaPackage", + "jest": true, + "env": { + "AWSLINT_BASE_CONSTRUCT": "true" + } + }, + "keywords": [ + "aws", + "cdk", + "constructs", + "AWS::MediaPackage", + "aws-mediapackage" + ], + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "license": "Apache-2.0", + "devDependencies": { + "@aws-cdk/assert": "0.0.0", + "cdk-build-tools": "0.0.0", + "cfn2ts": "0.0.0", + "pkglint": "0.0.0" + }, + "dependencies": { + "@aws-cdk/core": "0.0.0" + }, + "peerDependencies": { + "@aws-cdk/core": "0.0.0" + }, + "engines": { + "node": ">= 10.13.0 <13 || >=13.7.0" + }, + "stability": "experimental", + "maturity": "cfn-only", + "awscdkio": { + "announce": false + } +} diff --git a/packages/@aws-cdk/aws-mediapackage/test/mediapackage.test.ts b/packages/@aws-cdk/aws-mediapackage/test/mediapackage.test.ts new file mode 100644 index 0000000000000..e394ef336bfb4 --- /dev/null +++ b/packages/@aws-cdk/aws-mediapackage/test/mediapackage.test.ts @@ -0,0 +1,6 @@ +import '@aws-cdk/assert/jest'; +import {} from '../lib'; + +test('No tests are specified for this package', () => { + expect(true).toBe(true); +}); diff --git a/packages/@aws-cdk/cfnspec/CHANGELOG.md b/packages/@aws-cdk/cfnspec/CHANGELOG.md index 80dcd61c194ee..9c3b7d9e1e6d0 100644 --- a/packages/@aws-cdk/cfnspec/CHANGELOG.md +++ b/packages/@aws-cdk/cfnspec/CHANGELOG.md @@ -1,3 +1,155 @@ +# CloudFormation Resource Specification v20.0.0 + +## New Resource Types + +* AWS::IVS::Channel +* AWS::IVS::PlaybackKeyPair +* AWS::IVS::StreamKey +* AWS::IoTSiteWise::Asset +* AWS::IoTSiteWise::AssetModel +* AWS::IoTSiteWise::Gateway +* AWS::MediaPackage::Asset +* AWS::MediaPackage::Channel +* AWS::MediaPackage::OriginEndpoint +* AWS::MediaPackage::PackagingConfiguration +* AWS::MediaPackage::PackagingGroup + +## Attribute Changes + +* AWS::AutoScaling::AutoScalingGroup LaunchConfigurationName (__added__) +* AWS::AutoScaling::AutoScalingGroup LaunchTemplateSpecification (__added__) +* AWS::AutoScaling::AutoScalingGroup MixedInstancesPolicy (__added__) +* AWS::AutoScaling::AutoScalingGroup PlacementGroup (__added__) +* AWS::AutoScaling::AutoScalingGroup VPCZoneIdentifier (__added__) +* AWS::EC2::Subnet OutpostArn (__added__) + +## Property Changes + +* AWS::AmazonMQ::Broker LdapMetadata (__deleted__) +* AWS::AppSync::ApiKey ApiKeyId (__added__) +* AWS::AppSync::FunctionConfiguration SyncConfig (__added__) +* AWS::Athena::NamedQuery WorkGroup (__added__) +* AWS::AutoScaling::AutoScalingGroup CapacityRebalance (__added__) +* AWS::AutoScaling::LaunchConfiguration MetadataOptions (__added__) +* AWS::Batch::ComputeEnvironment Tags (__added__) +* AWS::Batch::JobDefinition Tags (__added__) +* AWS::Batch::JobQueue Tags (__added__) +* AWS::EC2::ClientVpnEndpoint SelfServicePortal (__added__) +* AWS::EC2::Route CarrierGatewayId (__added__) +* AWS::EC2::Route LocalGatewayId (__added__) +* AWS::EC2::Route VpcEndpointId (__added__) +* AWS::EC2::Subnet OutpostArn (__added__) +* AWS::EC2::VPCEndpointService ApplianceLoadBalancerArns (__deleted__) +* AWS::EMR::Cluster LogEncryptionKmsKeyId (__added__) +* AWS::EMR::Cluster ManagedScalingPolicy (__added__) +* AWS::EMR::Cluster StepConcurrencyLevel (__added__) +* AWS::ElastiCache::ReplicationGroup GlobalReplicationGroupId (__added__) +* AWS::ElastiCache::ReplicationGroup MultiAZEnabled.UpdateType (__changed__) + * Old: Immutable + * New: Mutable +* AWS::ElasticLoadBalancingV2::Listener Port.Required (__changed__) + * Old: true + * New: false +* AWS::ElasticLoadBalancingV2::Listener Protocol.Required (__changed__) + * Old: true + * New: false +* AWS::ElasticLoadBalancingV2::LoadBalancer SubnetMappings.UpdateType (__changed__) + * Old: Immutable + * New: Mutable +* AWS::GameLift::MatchmakingConfiguration FlexMatchMode (__added__) +* AWS::GameLift::MatchmakingConfiguration GameSessionQueueArns.Required (__changed__) + * Old: true + * New: false +* AWS::GlobalAccelerator::EndpointGroup PortOverrides (__added__) +* AWS::KinesisFirehose::DeliveryStream DeliveryStreamEncryptionConfigurationInput (__added__) +* AWS::KinesisFirehose::DeliveryStream Tags (__added__) +* AWS::KinesisFirehose::DeliveryStream KinesisStreamSourceConfiguration.UpdateType (__changed__) + * Old: Mutable + * New: Immutable +* AWS::LakeFormation::DataLakeSettings TrustedResourceOwners (__added__) +* AWS::Lambda::EventSourceMapping Queues (__added__) +* AWS::Lambda::EventSourceMapping SourceAccessConfigurations (__added__) +* AWS::Logs::LogGroup KmsKeyId (__added__) +* AWS::Logs::LogGroup LogGroupName.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html#cfn-cwl-loggroup-loggroupname + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html#cfn-logs-loggroup-loggroupname +* AWS::Logs::LogGroup RetentionInDays.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html#cfn-cwl-loggroup-retentionindays + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html#cfn-logs-loggroup-retentionindays +* AWS::RDS::DBCluster GlobalClusterIdentifier (__added__) +* AWS::RDS::DBCluster Engine.UpdateType (__changed__) + * Old: Immutable + * New: Conditional +* AWS::RDS::DBCluster EngineVersion.UpdateType (__changed__) + * Old: Immutable + * New: Mutable +* AWS::RDS::DBInstance Engine.UpdateType (__changed__) + * Old: Immutable + * New: Conditional +* AWS::SNS::Subscription SubscriptionRoleArn (__added__) +* AWS::SNS::Topic FifoTopic (__added__) + +## Property Type Changes + +* AWS::AmazonMQ::Broker.InterBrokerCred (__removed__) +* AWS::AmazonMQ::Broker.LdapMetadata (__removed__) +* AWS::AmazonMQ::Broker.ServerMetadata (__removed__) +* AWS::AppSync::FunctionConfiguration.LambdaConflictHandlerConfig (__added__) +* AWS::AppSync::FunctionConfiguration.SyncConfig (__added__) +* AWS::AutoScaling::LaunchConfiguration.MetadataOption (__added__) +* AWS::CloudFront::Distribution.OriginShield (__added__) +* AWS::EMR::Cluster.ComputeLimits (__added__) +* AWS::EMR::Cluster.ManagedScalingPolicy (__added__) +* AWS::EMR::Cluster.OnDemandProvisioningSpecification (__added__) +* AWS::EMR::InstanceFleetConfig.OnDemandProvisioningSpecification (__added__) +* AWS::Events::Rule.DeadLetterConfig (__added__) +* AWS::Events::Rule.RedshiftDataParameters (__added__) +* AWS::Events::Rule.RetryPolicy (__added__) +* AWS::GlobalAccelerator::EndpointGroup.PortOverride (__added__) +* AWS::KinesisFirehose::DeliveryStream.DeliveryStreamEncryptionConfigurationInput (__added__) +* AWS::Lambda::EventSourceMapping.SourceAccessConfiguration (__added__) +* AWS::SageMaker::Model.ImageConfig (__added__) +* AWS::Transfer::Server.SecurityGroupId (__added__) +* AWS::AutoScaling::AutoScalingGroup.LaunchTemplateOverrides LaunchTemplateSpecification (__added__) +* AWS::CloudFront::Distribution.Origin OriginShield (__added__) +* AWS::DLM::LifecyclePolicy.Parameters NoReboot (__added__) +* AWS::EC2::ClientVpnEndpoint.FederatedAuthenticationRequest SelfServiceSAMLProviderArn (__added__) +* AWS::EMR::Cluster.InstanceFleetProvisioningSpecifications OnDemandSpecification (__added__) +* AWS::EMR::Cluster.InstanceFleetProvisioningSpecifications SpotSpecification.Required (__changed__) + * Old: true + * New: false +* AWS::EMR::Cluster.SpotProvisioningSpecification AllocationStrategy (__added__) +* AWS::EMR::InstanceFleetConfig.InstanceFleetProvisioningSpecifications OnDemandSpecification (__added__) +* AWS::EMR::InstanceFleetConfig.InstanceFleetProvisioningSpecifications SpotSpecification.Required (__changed__) + * Old: true + * New: false +* AWS::EMR::InstanceFleetConfig.SpotProvisioningSpecification AllocationStrategy (__added__) +* AWS::ElasticLoadBalancingV2::LoadBalancer.SubnetMapping IPv6Address (__added__) +* AWS::ElasticLoadBalancingV2::TargetGroup.Matcher HttpCode.Required (__changed__) + * Old: true + * New: false +* AWS::Elasticsearch::Domain.ElasticsearchClusterConfig WarmCount (__added__) +* AWS::Elasticsearch::Domain.ElasticsearchClusterConfig WarmEnabled (__added__) +* AWS::Elasticsearch::Domain.ElasticsearchClusterConfig WarmType (__added__) +* AWS::Events::Rule.Target DeadLetterConfig (__added__) +* AWS::Events::Rule.Target RedshiftDataParameters (__added__) +* AWS::Events::Rule.Target RetryPolicy (__added__) +* AWS::KinesisFirehose::DeliveryStream.KinesisStreamSourceConfiguration KinesisStreamARN.UpdateType (__changed__) + * Old: Mutable + * New: Immutable +* AWS::KinesisFirehose::DeliveryStream.KinesisStreamSourceConfiguration RoleARN.UpdateType (__changed__) + * Old: Mutable + * New: Immutable +* AWS::S3::Bucket.Metrics EventThreshold.Required (__changed__) + * Old: true + * New: false +* AWS::S3::Bucket.SourceSelectionCriteria SseKmsEncryptedObjects.Required (__changed__) + * Old: true + * New: false +* AWS::SageMaker::Model.ContainerDefinition ImageConfig (__added__) +* AWS::Transfer::Server.EndpointDetails SecurityGroupIds (__added__) + + # CloudFormation Resource Specification v18.7.0 ## New Resource Types diff --git a/packages/@aws-cdk/cfnspec/cfn.version b/packages/@aws-cdk/cfnspec/cfn.version index fb67e3d517039..e88320d7c3862 100644 --- a/packages/@aws-cdk/cfnspec/cfn.version +++ b/packages/@aws-cdk/cfnspec/cfn.version @@ -1 +1 @@ -18.7.0 +20.0.0 diff --git a/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json b/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json index a118251db1d89..e5bb42cdaee87 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json +++ b/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json @@ -236,41 +236,6 @@ } } }, - "AWS::AmazonMQ::Broker.InterBrokerCred": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-interbrokercred.html", - "Properties": { - "Password": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-interbrokercred.html#cfn-amazonmq-broker-interbrokercred-password", - "PrimitiveType": "String", - "Required": true, - "UpdateType": "Mutable" - }, - "Username": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-interbrokercred.html#cfn-amazonmq-broker-interbrokercred-username", - "PrimitiveType": "String", - "Required": true, - "UpdateType": "Mutable" - } - } - }, - "AWS::AmazonMQ::Broker.LdapMetadata": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-ldapmetadata.html", - "Properties": { - "InterBrokerCreds": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-ldapmetadata.html#cfn-amazonmq-broker-ldapmetadata-interbrokercreds", - "ItemType": "InterBrokerCred", - "Required": false, - "Type": "List", - "UpdateType": "Mutable" - }, - "ServerMetadata": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-ldapmetadata.html#cfn-amazonmq-broker-ldapmetadata-servermetadata", - "Required": true, - "Type": "ServerMetadata", - "UpdateType": "Mutable" - } - } - }, "AWS::AmazonMQ::Broker.LdapServerMetadata": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-ldapservermetadata.html", "Properties": { @@ -383,78 +348,6 @@ } } }, - "AWS::AmazonMQ::Broker.ServerMetadata": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-servermetadata.html", - "Properties": { - "Hosts": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-servermetadata.html#cfn-amazonmq-broker-servermetadata-hosts", - "PrimitiveItemType": "String", - "Required": true, - "Type": "List", - "UpdateType": "Mutable" - }, - "RoleBase": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-servermetadata.html#cfn-amazonmq-broker-servermetadata-rolebase", - "PrimitiveType": "String", - "Required": true, - "UpdateType": "Mutable" - }, - "RoleName": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-servermetadata.html#cfn-amazonmq-broker-servermetadata-rolename", - "PrimitiveType": "String", - "Required": false, - "UpdateType": "Mutable" - }, - "RoleSearchMatching": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-servermetadata.html#cfn-amazonmq-broker-servermetadata-rolesearchmatching", - "PrimitiveType": "String", - "Required": true, - "UpdateType": "Mutable" - }, - "RoleSearchSubtree": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-servermetadata.html#cfn-amazonmq-broker-servermetadata-rolesearchsubtree", - "PrimitiveType": "Boolean", - "Required": false, - "UpdateType": "Mutable" - }, - "ServiceAccountPassword": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-servermetadata.html#cfn-amazonmq-broker-servermetadata-serviceaccountpassword", - "PrimitiveType": "String", - "Required": true, - "UpdateType": "Mutable" - }, - "ServiceAccountUsername": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-servermetadata.html#cfn-amazonmq-broker-servermetadata-serviceaccountusername", - "PrimitiveType": "String", - "Required": true, - "UpdateType": "Mutable" - }, - "UserBase": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-servermetadata.html#cfn-amazonmq-broker-servermetadata-userbase", - "PrimitiveType": "String", - "Required": true, - "UpdateType": "Mutable" - }, - "UserRoleName": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-servermetadata.html#cfn-amazonmq-broker-servermetadata-userrolename", - "PrimitiveType": "String", - "Required": false, - "UpdateType": "Mutable" - }, - "UserSearchMatching": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-servermetadata.html#cfn-amazonmq-broker-servermetadata-usersearchmatching", - "PrimitiveType": "String", - "Required": true, - "UpdateType": "Mutable" - }, - "UserSearchSubtree": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-servermetadata.html#cfn-amazonmq-broker-servermetadata-usersearchsubtree", - "PrimitiveType": "Boolean", - "Required": false, - "UpdateType": "Mutable" - } - } - }, "AWS::AmazonMQ::Broker.TagsEntry": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-tagsentry.html", "Properties": { @@ -5284,6 +5177,40 @@ } } }, + "AWS::AppSync::FunctionConfiguration.LambdaConflictHandlerConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-functionconfiguration-lambdaconflicthandlerconfig.html", + "Properties": { + "LambdaConflictHandlerArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-functionconfiguration-lambdaconflicthandlerconfig.html#cfn-appsync-functionconfiguration-lambdaconflicthandlerconfig-lambdaconflicthandlerarn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::AppSync::FunctionConfiguration.SyncConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-functionconfiguration-syncconfig.html", + "Properties": { + "ConflictDetection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-functionconfiguration-syncconfig.html#cfn-appsync-functionconfiguration-syncconfig-conflictdetection", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "ConflictHandler": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-functionconfiguration-syncconfig.html#cfn-appsync-functionconfiguration-syncconfig-conflicthandler", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "LambdaConflictHandlerConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-functionconfiguration-syncconfig.html#cfn-appsync-functionconfiguration-syncconfig-lambdaconflicthandlerconfig", + "Required": false, + "Type": "LambdaConflictHandlerConfig", + "UpdateType": "Mutable" + } + } + }, "AWS::AppSync::GraphQLApi.AdditionalAuthenticationProvider": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-additionalauthenticationprovider.html", "Properties": { @@ -6255,6 +6182,12 @@ "Required": false, "UpdateType": "Mutable" }, + "LaunchTemplateSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-launchtemplatespecification", + "Required": false, + "Type": "LaunchTemplateSpecification", + "UpdateType": "Mutable" + }, "WeightedCapacity": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-weightedcapacity", "PrimitiveType": "String", @@ -6481,6 +6414,29 @@ } } }, + "AWS::AutoScaling::LaunchConfiguration.MetadataOption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfig-metadataoption.html", + "Properties": { + "HttpEndpoint": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfig-metadataoption.html#cfn-autoscaling-launchconfig-metadataoption-httpendpoint", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "HttpPutResponseHopLimit": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfig-metadataoption.html#cfn-autoscaling-launchconfig-metadataoption-httpputresponsehoplimit", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "HttpTokens": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfig-metadataoption.html#cfn-autoscaling-launchconfig-metadataoption-httptokens", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::AutoScaling::ScalingPolicy.CustomizedMetricSpecification": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-customizedmetricspecification.html", "Properties": { @@ -8812,6 +8768,12 @@ "Required": false, "UpdateType": "Mutable" }, + "OriginShield": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-origin.html#cfn-cloudfront-distribution-origin-originshield", + "Required": false, + "Type": "OriginShield", + "UpdateType": "Mutable" + }, "S3OriginConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-origin.html#cfn-cloudfront-distribution-origin-s3originconfig", "Required": false, @@ -8918,6 +8880,23 @@ } } }, + "AWS::CloudFront::Distribution.OriginShield": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-originshield.html", + "Properties": { + "Enabled": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-originshield.html#cfn-cloudfront-distribution-originshield-enabled", + "PrimitiveType": "Boolean", + "Required": true, + "UpdateType": "Mutable" + }, + "OriginShieldRegion": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-originshield.html#cfn-cloudfront-distribution-originshield-originshieldregion", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::CloudFront::Distribution.Restrictions": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-restrictions.html", "Properties": { @@ -12194,6 +12173,12 @@ "PrimitiveType": "Boolean", "Required": false, "UpdateType": "Mutable" + }, + "NoReboot": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-parameters.html#cfn-dlm-lifecyclepolicy-parameters-noreboot", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" } } }, @@ -13016,6 +13001,12 @@ "PrimitiveType": "String", "Required": true, "UpdateType": "Mutable" + }, + "SelfServiceSAMLProviderArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-clientvpnendpoint-federatedauthenticationrequest.html#cfn-ec2-clientvpnendpoint-federatedauthenticationrequest-selfservicesamlproviderarn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" } } }, @@ -16824,6 +16815,41 @@ } } }, + "AWS::EMR::Cluster.ComputeLimits": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-computelimits.html", + "Properties": { + "MaximumCapacityUnits": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-computelimits.html#cfn-elasticmapreduce-cluster-computelimits-maximumcapacityunits", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + }, + "MaximumCoreCapacityUnits": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-computelimits.html#cfn-elasticmapreduce-cluster-computelimits-maximumcorecapacityunits", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "MaximumOnDemandCapacityUnits": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-computelimits.html#cfn-elasticmapreduce-cluster-computelimits-maximumondemandcapacityunits", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "MinimumCapacityUnits": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-computelimits.html#cfn-elasticmapreduce-cluster-computelimits-minimumcapacityunits", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + }, + "UnitType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-computelimits.html#cfn-elasticmapreduce-cluster-computelimits-unittype", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::EMR::Cluster.Configuration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-configuration.html", "Properties": { @@ -16960,9 +16986,15 @@ "AWS::EMR::Cluster.InstanceFleetProvisioningSpecifications": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancefleetprovisioningspecifications.html", "Properties": { + "OnDemandSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancefleetprovisioningspecifications.html#cfn-elasticmapreduce-cluster-instancefleetprovisioningspecifications-ondemandspecification", + "Required": false, + "Type": "OnDemandProvisioningSpecification", + "UpdateType": "Mutable" + }, "SpotSpecification": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancefleetprovisioningspecifications.html#cfn-elasticmapreduce-cluster-instancefleetprovisioningspecifications-spotspecification", - "Required": true, + "Required": false, "Type": "SpotProvisioningSpecification", "UpdateType": "Mutable" } @@ -17225,6 +17257,17 @@ } } }, + "AWS::EMR::Cluster.ManagedScalingPolicy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-managedscalingpolicy.html", + "Properties": { + "ComputeLimits": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-managedscalingpolicy.html#cfn-elasticmapreduce-cluster-managedscalingpolicy-computelimits", + "Required": false, + "Type": "ComputeLimits", + "UpdateType": "Mutable" + } + } + }, "AWS::EMR::Cluster.MetricDimension": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-metricdimension.html", "Properties": { @@ -17242,6 +17285,17 @@ } } }, + "AWS::EMR::Cluster.OnDemandProvisioningSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-ondemandprovisioningspecification.html", + "Properties": { + "AllocationStrategy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-ondemandprovisioningspecification.html#cfn-elasticmapreduce-cluster-ondemandprovisioningspecification-allocationstrategy", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::EMR::Cluster.PlacementType": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-placementtype.html", "Properties": { @@ -17372,6 +17426,12 @@ "AWS::EMR::Cluster.SpotProvisioningSpecification": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-spotprovisioningspecification.html", "Properties": { + "AllocationStrategy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-spotprovisioningspecification.html#cfn-elasticmapreduce-cluster-spotprovisioningspecification-allocationstrategy", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "BlockDurationMinutes": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-spotprovisioningspecification.html#cfn-elasticmapreduce-cluster-spotprovisioningspecification-blockdurationminutes", "PrimitiveType": "Integer", @@ -17504,9 +17564,15 @@ "AWS::EMR::InstanceFleetConfig.InstanceFleetProvisioningSpecifications": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-instancefleetprovisioningspecifications.html", "Properties": { + "OnDemandSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-instancefleetprovisioningspecifications.html#cfn-elasticmapreduce-instancefleetconfig-instancefleetprovisioningspecifications-ondemandspecification", + "Required": false, + "Type": "OnDemandProvisioningSpecification", + "UpdateType": "Mutable" + }, "SpotSpecification": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-instancefleetprovisioningspecifications.html#cfn-elasticmapreduce-instancefleetconfig-instancefleetprovisioningspecifications-spotspecification", - "Required": true, + "Required": false, "Type": "SpotProvisioningSpecification", "UpdateType": "Mutable" } @@ -17555,9 +17621,26 @@ } } }, + "AWS::EMR::InstanceFleetConfig.OnDemandProvisioningSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-ondemandprovisioningspecification.html", + "Properties": { + "AllocationStrategy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-ondemandprovisioningspecification.html#cfn-elasticmapreduce-instancefleetconfig-ondemandprovisioningspecification-allocationstrategy", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::EMR::InstanceFleetConfig.SpotProvisioningSpecification": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-spotprovisioningspecification.html", "Properties": { + "AllocationStrategy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-spotprovisioningspecification.html#cfn-elasticmapreduce-instancefleetconfig-spotprovisioningspecification-allocationstrategy", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "BlockDurationMinutes": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-spotprovisioningspecification.html#cfn-elasticmapreduce-instancefleetconfig-spotprovisioningspecification-blockdurationminutes", "PrimitiveType": "Integer", @@ -19173,6 +19256,12 @@ "Required": false, "UpdateType": "Mutable" }, + "IPv6Address": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-loadbalancer-subnetmapping.html#cfn-elasticloadbalancingv2-loadbalancer-subnetmapping-ipv6address", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "PrivateIPv4Address": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-loadbalancer-subnetmapping.html#cfn-elasticloadbalancingv2-loadbalancer-subnetmapping-privateipv4address", "PrimitiveType": "String", @@ -19193,7 +19282,7 @@ "HttpCode": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-targetgroup-matcher.html#cfn-elasticloadbalancingv2-targetgroup-matcher-httpcode", "PrimitiveType": "String", - "Required": true, + "Required": false, "UpdateType": "Mutable" } } @@ -19369,6 +19458,24 @@ "Required": false, "UpdateType": "Mutable" }, + "WarmCount": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticsearch-domain-elasticsearchclusterconfig.html#cfn-elasticsearch-domain-elasticsearchclusterconfig-warmcount", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "WarmEnabled": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticsearch-domain-elasticsearchclusterconfig.html#cfn-elasticsearch-domain-elasticsearchclusterconfig-warmenabled", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "WarmType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticsearch-domain-elasticsearchclusterconfig.html#cfn-elasticsearch-domain-elasticsearchclusterconfig-warmtype", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "ZoneAwarenessConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticsearch-domain-elasticsearchclusterconfig.html#cfn-elasticsearch-domain-elasticsearchclusterconfig-zoneawarenessconfig", "Required": false, @@ -19646,6 +19753,17 @@ } } }, + "AWS::Events::Rule.DeadLetterConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-deadletterconfig.html", + "Properties": { + "Arn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-deadletterconfig.html#cfn-events-rule-deadletterconfig-arn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::Events::Rule.EcsParameters": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-ecsparameters.html", "Properties": { @@ -19757,6 +19875,64 @@ } } }, + "AWS::Events::Rule.RedshiftDataParameters": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-redshiftdataparameters.html", + "Properties": { + "Database": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-redshiftdataparameters.html#cfn-events-rule-redshiftdataparameters-database", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "DbUser": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-redshiftdataparameters.html#cfn-events-rule-redshiftdataparameters-dbuser", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "SecretManagerArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-redshiftdataparameters.html#cfn-events-rule-redshiftdataparameters-secretmanagerarn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Sql": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-redshiftdataparameters.html#cfn-events-rule-redshiftdataparameters-sql", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "StatementName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-redshiftdataparameters.html#cfn-events-rule-redshiftdataparameters-statementname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "WithEvent": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-redshiftdataparameters.html#cfn-events-rule-redshiftdataparameters-withevent", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::Events::Rule.RetryPolicy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-retrypolicy.html", + "Properties": { + "MaximumEventAgeInSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-retrypolicy.html#cfn-events-rule-retrypolicy-maximumeventageinseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "MaximumRetryAttempts": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-retrypolicy.html#cfn-events-rule-retrypolicy-maximumretryattempts", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::Events::Rule.RunCommandParameters": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-runcommandparameters.html", "Properties": { @@ -19815,6 +19991,12 @@ "Type": "BatchParameters", "UpdateType": "Mutable" }, + "DeadLetterConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-deadletterconfig", + "Required": false, + "Type": "DeadLetterConfig", + "UpdateType": "Mutable" + }, "EcsParameters": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-ecsparameters", "Required": false, @@ -19857,6 +20039,18 @@ "Type": "KinesisParameters", "UpdateType": "Mutable" }, + "RedshiftDataParameters": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-redshiftdataparameters", + "Required": false, + "Type": "RedshiftDataParameters", + "UpdateType": "Mutable" + }, + "RetryPolicy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-retrypolicy", + "Required": false, + "Type": "RetryPolicy", + "UpdateType": "Mutable" + }, "RoleArn": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-rolearn", "PrimitiveType": "String", @@ -20460,6 +20654,23 @@ } } }, + "AWS::GlobalAccelerator::EndpointGroup.PortOverride": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-endpointgroup-portoverride.html", + "Properties": { + "EndpointPort": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-endpointgroup-portoverride.html#cfn-globalaccelerator-endpointgroup-portoverride-endpointport", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + }, + "ListenerPort": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-endpointgroup-portoverride.html#cfn-globalaccelerator-endpointgroup-portoverride-listenerport", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::GlobalAccelerator::Listener.PortRange": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-listener-portrange.html", "Properties": { @@ -25378,6 +25589,281 @@ } } }, + "AWS::IoTSiteWise::Asset.AssetHierarchy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-asset-assethierarchy.html", + "Properties": { + "ChildAssetId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-asset-assethierarchy.html#cfn-iotsitewise-asset-assethierarchy-childassetid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "LogicalId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-asset-assethierarchy.html#cfn-iotsitewise-asset-assethierarchy-logicalid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::Asset.AssetProperty": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-asset-assetproperty.html", + "Properties": { + "Alias": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-asset-assetproperty.html#cfn-iotsitewise-asset-assetproperty-alias", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "LogicalId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-asset-assetproperty.html#cfn-iotsitewise-asset-assetproperty-logicalid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "NotificationState": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-asset-assetproperty.html#cfn-iotsitewise-asset-assetproperty-notificationstate", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::AssetModel.AssetModelHierarchy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelhierarchy.html", + "Properties": { + "ChildAssetModelId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelhierarchy.html#cfn-iotsitewise-assetmodel-assetmodelhierarchy-childassetmodelid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "LogicalId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelhierarchy.html#cfn-iotsitewise-assetmodel-assetmodelhierarchy-logicalid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelhierarchy.html#cfn-iotsitewise-assetmodel-assetmodelhierarchy-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::AssetModel.AssetModelProperty": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelproperty.html", + "Properties": { + "DataType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelproperty.html#cfn-iotsitewise-assetmodel-assetmodelproperty-datatype", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "LogicalId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelproperty.html#cfn-iotsitewise-assetmodel-assetmodelproperty-logicalid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelproperty.html#cfn-iotsitewise-assetmodel-assetmodelproperty-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Type": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelproperty.html#cfn-iotsitewise-assetmodel-assetmodelproperty-type", + "Required": true, + "Type": "PropertyType", + "UpdateType": "Mutable" + }, + "Unit": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelproperty.html#cfn-iotsitewise-assetmodel-assetmodelproperty-unit", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::AssetModel.Attribute": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-attribute.html", + "Properties": { + "DefaultValue": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-attribute.html#cfn-iotsitewise-assetmodel-attribute-defaultvalue", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::AssetModel.ExpressionVariable": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-expressionvariable.html", + "Properties": { + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-expressionvariable.html#cfn-iotsitewise-assetmodel-expressionvariable-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-expressionvariable.html#cfn-iotsitewise-assetmodel-expressionvariable-value", + "Required": true, + "Type": "VariableValue", + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::AssetModel.Metric": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-metric.html", + "Properties": { + "Expression": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-metric.html#cfn-iotsitewise-assetmodel-metric-expression", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Variables": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-metric.html#cfn-iotsitewise-assetmodel-metric-variables", + "ItemType": "ExpressionVariable", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + }, + "Window": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-metric.html#cfn-iotsitewise-assetmodel-metric-window", + "Required": true, + "Type": "MetricWindow", + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::AssetModel.MetricWindow": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-metricwindow.html", + "Properties": { + "Tumbling": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-metricwindow.html#cfn-iotsitewise-assetmodel-metricwindow-tumbling", + "Required": false, + "Type": "TumblingWindow", + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::AssetModel.PropertyType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-propertytype.html", + "Properties": { + "Attribute": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-propertytype.html#cfn-iotsitewise-assetmodel-propertytype-attribute", + "Required": false, + "Type": "Attribute", + "UpdateType": "Mutable" + }, + "Metric": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-propertytype.html#cfn-iotsitewise-assetmodel-propertytype-metric", + "Required": false, + "Type": "Metric", + "UpdateType": "Mutable" + }, + "Transform": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-propertytype.html#cfn-iotsitewise-assetmodel-propertytype-transform", + "Required": false, + "Type": "Transform", + "UpdateType": "Mutable" + }, + "TypeName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-propertytype.html#cfn-iotsitewise-assetmodel-propertytype-typename", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::AssetModel.Transform": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-transform.html", + "Properties": { + "Expression": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-transform.html#cfn-iotsitewise-assetmodel-transform-expression", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Variables": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-transform.html#cfn-iotsitewise-assetmodel-transform-variables", + "ItemType": "ExpressionVariable", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::AssetModel.TumblingWindow": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-tumblingwindow.html", + "Properties": { + "Interval": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-tumblingwindow.html#cfn-iotsitewise-assetmodel-tumblingwindow-interval", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::AssetModel.VariableValue": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-variablevalue.html", + "Properties": { + "HierarchyLogicalId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-variablevalue.html#cfn-iotsitewise-assetmodel-variablevalue-hierarchylogicalid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "PropertyLogicalId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-variablevalue.html#cfn-iotsitewise-assetmodel-variablevalue-propertylogicalid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::Gateway.GatewayCapabilitySummary": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-gateway-gatewaycapabilitysummary.html", + "Properties": { + "CapabilityConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-gateway-gatewaycapabilitysummary.html#cfn-iotsitewise-gateway-gatewaycapabilitysummary-capabilityconfiguration", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "CapabilityNamespace": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-gateway-gatewaycapabilitysummary.html#cfn-iotsitewise-gateway-gatewaycapabilitysummary-capabilitynamespace", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::Gateway.GatewayPlatform": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-gateway-gatewayplatform.html", + "Properties": { + "Greengrass": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-gateway-gatewayplatform.html#cfn-iotsitewise-gateway-gatewayplatform-greengrass", + "Required": true, + "Type": "Greengrass", + "UpdateType": "Immutable" + } + } + }, + "AWS::IoTSiteWise::Gateway.Greengrass": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-gateway-greengrass.html", + "Properties": { + "GroupArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-gateway-greengrass.html#cfn-iotsitewise-gateway-greengrass-grouparn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, "AWS::IoTThingsGraph::FlowTemplate.DefinitionDocument": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotthingsgraph-flowtemplate-definitiondocument.html", "Properties": { @@ -27728,6 +28214,23 @@ } } }, + "AWS::KinesisFirehose::DeliveryStream.DeliveryStreamEncryptionConfigurationInput": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-deliverystreamencryptionconfigurationinput.html", + "Properties": { + "KeyARN": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-deliverystreamencryptionconfigurationinput.html#cfn-kinesisfirehose-deliverystream-deliverystreamencryptionconfigurationinput-keyarn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "KeyType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-deliverystreamencryptionconfigurationinput.html#cfn-kinesisfirehose-deliverystream-deliverystreamencryptionconfigurationinput-keytype", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::KinesisFirehose::DeliveryStream.Deserializer": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-deserializer.html", "Properties": { @@ -28110,13 +28613,13 @@ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-kinesisstreamsourceconfiguration.html#cfn-kinesisfirehose-deliverystream-kinesisstreamsourceconfiguration-kinesisstreamarn", "PrimitiveType": "String", "Required": true, - "UpdateType": "Mutable" + "UpdateType": "Immutable" }, "RoleARN": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-kinesisstreamsourceconfiguration.html#cfn-kinesisfirehose-deliverystream-kinesisstreamsourceconfiguration-rolearn", "PrimitiveType": "String", "Required": true, - "UpdateType": "Mutable" + "UpdateType": "Immutable" } } }, @@ -28894,6 +29397,23 @@ } } }, + "AWS::Lambda::EventSourceMapping.SourceAccessConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.html", + "Properties": { + "Type": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.html#cfn-lambda-eventsourcemapping-sourceaccessconfiguration-type", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "URI": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.html#cfn-lambda-eventsourcemapping-sourceaccessconfiguration-uri", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::Lambda::Function.Code": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html", "Properties": { @@ -33717,6 +34237,832 @@ } } }, + "AWS::MediaPackage::Asset.EgressEndpoint": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-asset-egressendpoint.html", + "Properties": { + "PackagingConfigurationId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-asset-egressendpoint.html#cfn-mediapackage-asset-egressendpoint-packagingconfigurationid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Url": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-asset-egressendpoint.html#cfn-mediapackage-asset-egressendpoint-url", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::Channel.HlsIngest": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-channel-hlsingest.html", + "Properties": { + "ingestEndpoints": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-channel-hlsingest.html#cfn-mediapackage-channel-hlsingest-ingestendpoints", + "ItemType": "IngestEndpoint", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::Channel.IngestEndpoint": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-channel-ingestendpoint.html", + "Properties": { + "Id": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-channel-ingestendpoint.html#cfn-mediapackage-channel-ingestendpoint-id", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Password": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-channel-ingestendpoint.html#cfn-mediapackage-channel-ingestendpoint-password", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Url": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-channel-ingestendpoint.html#cfn-mediapackage-channel-ingestendpoint-url", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Username": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-channel-ingestendpoint.html#cfn-mediapackage-channel-ingestendpoint-username", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::OriginEndpoint.Authorization": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-authorization.html", + "Properties": { + "CdnIdentifierSecret": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-authorization.html#cfn-mediapackage-originendpoint-authorization-cdnidentifiersecret", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "SecretsRoleArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-authorization.html#cfn-mediapackage-originendpoint-authorization-secretsrolearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::OriginEndpoint.CmafEncryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-cmafencryption.html", + "Properties": { + "KeyRotationIntervalSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-cmafencryption.html#cfn-mediapackage-originendpoint-cmafencryption-keyrotationintervalseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "SpekeKeyProvider": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-cmafencryption.html#cfn-mediapackage-originendpoint-cmafencryption-spekekeyprovider", + "Required": true, + "Type": "SpekeKeyProvider", + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::OriginEndpoint.CmafPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-cmafpackage.html", + "Properties": { + "Encryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-cmafpackage.html#cfn-mediapackage-originendpoint-cmafpackage-encryption", + "Required": false, + "Type": "CmafEncryption", + "UpdateType": "Mutable" + }, + "HlsManifests": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-cmafpackage.html#cfn-mediapackage-originendpoint-cmafpackage-hlsmanifests", + "ItemType": "HlsManifest", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "SegmentDurationSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-cmafpackage.html#cfn-mediapackage-originendpoint-cmafpackage-segmentdurationseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "SegmentPrefix": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-cmafpackage.html#cfn-mediapackage-originendpoint-cmafpackage-segmentprefix", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "StreamSelection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-cmafpackage.html#cfn-mediapackage-originendpoint-cmafpackage-streamselection", + "Required": false, + "Type": "StreamSelection", + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::OriginEndpoint.DashEncryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashencryption.html", + "Properties": { + "KeyRotationIntervalSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashencryption.html#cfn-mediapackage-originendpoint-dashencryption-keyrotationintervalseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "SpekeKeyProvider": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashencryption.html#cfn-mediapackage-originendpoint-dashencryption-spekekeyprovider", + "Required": true, + "Type": "SpekeKeyProvider", + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::OriginEndpoint.DashPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html", + "Properties": { + "AdTriggers": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html#cfn-mediapackage-originendpoint-dashpackage-adtriggers", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "AdsOnDeliveryRestrictions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html#cfn-mediapackage-originendpoint-dashpackage-adsondeliveryrestrictions", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Encryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html#cfn-mediapackage-originendpoint-dashpackage-encryption", + "Required": false, + "Type": "DashEncryption", + "UpdateType": "Mutable" + }, + "ManifestLayout": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html#cfn-mediapackage-originendpoint-dashpackage-manifestlayout", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "ManifestWindowSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html#cfn-mediapackage-originendpoint-dashpackage-manifestwindowseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "MinBufferTimeSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html#cfn-mediapackage-originendpoint-dashpackage-minbuffertimeseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "MinUpdatePeriodSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html#cfn-mediapackage-originendpoint-dashpackage-minupdateperiodseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "PeriodTriggers": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html#cfn-mediapackage-originendpoint-dashpackage-periodtriggers", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Profile": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html#cfn-mediapackage-originendpoint-dashpackage-profile", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "SegmentDurationSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html#cfn-mediapackage-originendpoint-dashpackage-segmentdurationseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "SegmentTemplateFormat": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html#cfn-mediapackage-originendpoint-dashpackage-segmenttemplateformat", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "StreamSelection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html#cfn-mediapackage-originendpoint-dashpackage-streamselection", + "Required": false, + "Type": "StreamSelection", + "UpdateType": "Mutable" + }, + "SuggestedPresentationDelaySeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html#cfn-mediapackage-originendpoint-dashpackage-suggestedpresentationdelayseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::OriginEndpoint.HlsEncryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsencryption.html", + "Properties": { + "ConstantInitializationVector": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsencryption.html#cfn-mediapackage-originendpoint-hlsencryption-constantinitializationvector", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "EncryptionMethod": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsencryption.html#cfn-mediapackage-originendpoint-hlsencryption-encryptionmethod", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "KeyRotationIntervalSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsencryption.html#cfn-mediapackage-originendpoint-hlsencryption-keyrotationintervalseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "RepeatExtXKey": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsencryption.html#cfn-mediapackage-originendpoint-hlsencryption-repeatextxkey", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "SpekeKeyProvider": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsencryption.html#cfn-mediapackage-originendpoint-hlsencryption-spekekeyprovider", + "Required": true, + "Type": "SpekeKeyProvider", + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::OriginEndpoint.HlsManifest": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsmanifest.html", + "Properties": { + "AdMarkers": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsmanifest.html#cfn-mediapackage-originendpoint-hlsmanifest-admarkers", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "AdTriggers": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsmanifest.html#cfn-mediapackage-originendpoint-hlsmanifest-adtriggers", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "AdsOnDeliveryRestrictions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsmanifest.html#cfn-mediapackage-originendpoint-hlsmanifest-adsondeliveryrestrictions", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Id": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsmanifest.html#cfn-mediapackage-originendpoint-hlsmanifest-id", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "IncludeIframeOnlyStream": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsmanifest.html#cfn-mediapackage-originendpoint-hlsmanifest-includeiframeonlystream", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "ManifestName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsmanifest.html#cfn-mediapackage-originendpoint-hlsmanifest-manifestname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "PlaylistType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsmanifest.html#cfn-mediapackage-originendpoint-hlsmanifest-playlisttype", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "PlaylistWindowSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsmanifest.html#cfn-mediapackage-originendpoint-hlsmanifest-playlistwindowseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "ProgramDateTimeIntervalSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsmanifest.html#cfn-mediapackage-originendpoint-hlsmanifest-programdatetimeintervalseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "Url": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsmanifest.html#cfn-mediapackage-originendpoint-hlsmanifest-url", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::OriginEndpoint.HlsPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlspackage.html", + "Properties": { + "AdMarkers": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlspackage.html#cfn-mediapackage-originendpoint-hlspackage-admarkers", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "AdTriggers": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlspackage.html#cfn-mediapackage-originendpoint-hlspackage-adtriggers", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "AdsOnDeliveryRestrictions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlspackage.html#cfn-mediapackage-originendpoint-hlspackage-adsondeliveryrestrictions", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Encryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlspackage.html#cfn-mediapackage-originendpoint-hlspackage-encryption", + "Required": false, + "Type": "HlsEncryption", + "UpdateType": "Mutable" + }, + "IncludeIframeOnlyStream": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlspackage.html#cfn-mediapackage-originendpoint-hlspackage-includeiframeonlystream", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "PlaylistType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlspackage.html#cfn-mediapackage-originendpoint-hlspackage-playlisttype", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "PlaylistWindowSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlspackage.html#cfn-mediapackage-originendpoint-hlspackage-playlistwindowseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "ProgramDateTimeIntervalSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlspackage.html#cfn-mediapackage-originendpoint-hlspackage-programdatetimeintervalseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "SegmentDurationSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlspackage.html#cfn-mediapackage-originendpoint-hlspackage-segmentdurationseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "StreamSelection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlspackage.html#cfn-mediapackage-originendpoint-hlspackage-streamselection", + "Required": false, + "Type": "StreamSelection", + "UpdateType": "Mutable" + }, + "UseAudioRenditionGroup": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlspackage.html#cfn-mediapackage-originendpoint-hlspackage-useaudiorenditiongroup", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::OriginEndpoint.MssEncryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-mssencryption.html", + "Properties": { + "SpekeKeyProvider": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-mssencryption.html#cfn-mediapackage-originendpoint-mssencryption-spekekeyprovider", + "Required": true, + "Type": "SpekeKeyProvider", + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::OriginEndpoint.MssPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-msspackage.html", + "Properties": { + "Encryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-msspackage.html#cfn-mediapackage-originendpoint-msspackage-encryption", + "Required": false, + "Type": "MssEncryption", + "UpdateType": "Mutable" + }, + "ManifestWindowSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-msspackage.html#cfn-mediapackage-originendpoint-msspackage-manifestwindowseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "SegmentDurationSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-msspackage.html#cfn-mediapackage-originendpoint-msspackage-segmentdurationseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "StreamSelection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-msspackage.html#cfn-mediapackage-originendpoint-msspackage-streamselection", + "Required": false, + "Type": "StreamSelection", + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::OriginEndpoint.SpekeKeyProvider": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-spekekeyprovider.html", + "Properties": { + "CertificateArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-spekekeyprovider.html#cfn-mediapackage-originendpoint-spekekeyprovider-certificatearn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "ResourceId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-spekekeyprovider.html#cfn-mediapackage-originendpoint-spekekeyprovider-resourceid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "RoleArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-spekekeyprovider.html#cfn-mediapackage-originendpoint-spekekeyprovider-rolearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "SystemIds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-spekekeyprovider.html#cfn-mediapackage-originendpoint-spekekeyprovider-systemids", + "PrimitiveItemType": "String", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + }, + "Url": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-spekekeyprovider.html#cfn-mediapackage-originendpoint-spekekeyprovider-url", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::OriginEndpoint.StreamSelection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-streamselection.html", + "Properties": { + "MaxVideoBitsPerSecond": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-streamselection.html#cfn-mediapackage-originendpoint-streamselection-maxvideobitspersecond", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "MinVideoBitsPerSecond": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-streamselection.html#cfn-mediapackage-originendpoint-streamselection-minvideobitspersecond", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "StreamOrder": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-streamselection.html#cfn-mediapackage-originendpoint-streamselection-streamorder", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration.CmafEncryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-cmafencryption.html", + "Properties": { + "SpekeKeyProvider": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-cmafencryption.html#cfn-mediapackage-packagingconfiguration-cmafencryption-spekekeyprovider", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration.CmafPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-cmafpackage.html", + "Properties": { + "Encryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-cmafpackage.html#cfn-mediapackage-packagingconfiguration-cmafpackage-encryption", + "Required": false, + "Type": "CmafEncryption", + "UpdateType": "Mutable" + }, + "HlsManifests": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-cmafpackage.html#cfn-mediapackage-packagingconfiguration-cmafpackage-hlsmanifests", + "ItemType": "HlsManifest", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + }, + "SegmentDurationSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-cmafpackage.html#cfn-mediapackage-packagingconfiguration-cmafpackage-segmentdurationseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration.DashEncryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashencryption.html", + "Properties": { + "SpekeKeyProvider": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashencryption.html#cfn-mediapackage-packagingconfiguration-dashencryption-spekekeyprovider", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration.DashManifest": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashmanifest.html", + "Properties": { + "ManifestLayout": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashmanifest.html#cfn-mediapackage-packagingconfiguration-dashmanifest-manifestlayout", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "ManifestName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashmanifest.html#cfn-mediapackage-packagingconfiguration-dashmanifest-manifestname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "MinBufferTimeSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashmanifest.html#cfn-mediapackage-packagingconfiguration-dashmanifest-minbuffertimeseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "Profile": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashmanifest.html#cfn-mediapackage-packagingconfiguration-dashmanifest-profile", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "StreamSelection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashmanifest.html#cfn-mediapackage-packagingconfiguration-dashmanifest-streamselection", + "Required": false, + "Type": "StreamSelection", + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration.DashPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashpackage.html", + "Properties": { + "DashManifests": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashpackage.html#cfn-mediapackage-packagingconfiguration-dashpackage-dashmanifests", + "ItemType": "DashManifest", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + }, + "Encryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashpackage.html#cfn-mediapackage-packagingconfiguration-dashpackage-encryption", + "Required": false, + "Type": "DashEncryption", + "UpdateType": "Mutable" + }, + "PeriodTriggers": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashpackage.html#cfn-mediapackage-packagingconfiguration-dashpackage-periodtriggers", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "SegmentDurationSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashpackage.html#cfn-mediapackage-packagingconfiguration-dashpackage-segmentdurationseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "SegmentTemplateFormat": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashpackage.html#cfn-mediapackage-packagingconfiguration-dashpackage-segmenttemplateformat", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration.HlsEncryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlsencryption.html", + "Properties": { + "ConstantInitializationVector": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlsencryption.html#cfn-mediapackage-packagingconfiguration-hlsencryption-constantinitializationvector", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "EncryptionMethod": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlsencryption.html#cfn-mediapackage-packagingconfiguration-hlsencryption-encryptionmethod", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "SpekeKeyProvider": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlsencryption.html#cfn-mediapackage-packagingconfiguration-hlsencryption-spekekeyprovider", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration.HlsManifest": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlsmanifest.html", + "Properties": { + "AdMarkers": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlsmanifest.html#cfn-mediapackage-packagingconfiguration-hlsmanifest-admarkers", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "IncludeIframeOnlyStream": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlsmanifest.html#cfn-mediapackage-packagingconfiguration-hlsmanifest-includeiframeonlystream", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "ManifestName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlsmanifest.html#cfn-mediapackage-packagingconfiguration-hlsmanifest-manifestname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "ProgramDateTimeIntervalSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlsmanifest.html#cfn-mediapackage-packagingconfiguration-hlsmanifest-programdatetimeintervalseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "RepeatExtXKey": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlsmanifest.html#cfn-mediapackage-packagingconfiguration-hlsmanifest-repeatextxkey", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "StreamSelection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlsmanifest.html#cfn-mediapackage-packagingconfiguration-hlsmanifest-streamselection", + "Required": false, + "Type": "StreamSelection", + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration.HlsPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlspackage.html", + "Properties": { + "Encryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlspackage.html#cfn-mediapackage-packagingconfiguration-hlspackage-encryption", + "Required": false, + "Type": "HlsEncryption", + "UpdateType": "Mutable" + }, + "HlsManifests": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlspackage.html#cfn-mediapackage-packagingconfiguration-hlspackage-hlsmanifests", + "ItemType": "HlsManifest", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + }, + "SegmentDurationSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlspackage.html#cfn-mediapackage-packagingconfiguration-hlspackage-segmentdurationseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "UseAudioRenditionGroup": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlspackage.html#cfn-mediapackage-packagingconfiguration-hlspackage-useaudiorenditiongroup", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration.MssEncryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-mssencryption.html", + "Properties": { + "SpekeKeyProvider": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-mssencryption.html#cfn-mediapackage-packagingconfiguration-mssencryption-spekekeyprovider", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration.MssManifest": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-mssmanifest.html", + "Properties": { + "ManifestName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-mssmanifest.html#cfn-mediapackage-packagingconfiguration-mssmanifest-manifestname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "StreamSelection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-mssmanifest.html#cfn-mediapackage-packagingconfiguration-mssmanifest-streamselection", + "Required": false, + "Type": "StreamSelection", + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration.MssPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-msspackage.html", + "Properties": { + "Encryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-msspackage.html#cfn-mediapackage-packagingconfiguration-msspackage-encryption", + "Required": false, + "Type": "MssEncryption", + "UpdateType": "Mutable" + }, + "MssManifests": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-msspackage.html#cfn-mediapackage-packagingconfiguration-msspackage-mssmanifests", + "ItemType": "MssManifest", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + }, + "SegmentDurationSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-msspackage.html#cfn-mediapackage-packagingconfiguration-msspackage-segmentdurationseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration.SpekeKeyProvider": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-spekekeyprovider.html", + "Properties": { + "RoleArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-spekekeyprovider.html#cfn-mediapackage-packagingconfiguration-spekekeyprovider-rolearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "SystemIds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-spekekeyprovider.html#cfn-mediapackage-packagingconfiguration-spekekeyprovider-systemids", + "PrimitiveItemType": "String", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + }, + "Url": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-spekekeyprovider.html#cfn-mediapackage-packagingconfiguration-spekekeyprovider-url", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration.StreamSelection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-streamselection.html", + "Properties": { + "MaxVideoBitsPerSecond": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-streamselection.html#cfn-mediapackage-packagingconfiguration-streamselection-maxvideobitspersecond", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "MinVideoBitsPerSecond": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-streamselection.html#cfn-mediapackage-packagingconfiguration-streamselection-minvideobitspersecond", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "StreamOrder": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-streamselection.html#cfn-mediapackage-packagingconfiguration-streamselection-streamorder", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingGroup.Authorization": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packaginggroup-authorization.html", + "Properties": { + "CdnIdentifierSecret": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packaginggroup-authorization.html#cfn-mediapackage-packaginggroup-authorization-cdnidentifiersecret", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "SecretsRoleArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packaginggroup-authorization.html#cfn-mediapackage-packaginggroup-authorization-secretsrolearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::MediaStore::Container.CorsRule": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediastore-container-corsrule.html", "Properties": { @@ -36707,7 +38053,7 @@ "Properties": { "EventThreshold": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metrics.html#cfn-s3-bucket-metrics-eventthreshold", - "Required": true, + "Required": false, "Type": "ReplicationTimeValue", "UpdateType": "Mutable" }, @@ -37285,7 +38631,7 @@ "Properties": { "SseKmsEncryptedObjects": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-sourceselectioncriteria.html#cfn-s3-bucket-sourceselectioncriteria-ssekmsencryptedobjects", - "Required": true, + "Required": false, "Type": "SseKmsEncryptedObjects", "UpdateType": "Mutable" } @@ -38478,6 +39824,12 @@ "Required": false, "UpdateType": "Immutable" }, + "ImageConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-model-containerdefinition.html#cfn-sagemaker-model-containerdefinition-imageconfig", + "Required": false, + "Type": "ImageConfig", + "UpdateType": "Immutable" + }, "Mode": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-model-containerdefinition.html#cfn-sagemaker-model-containerdefinition-mode", "PrimitiveType": "String", @@ -38498,6 +39850,17 @@ } } }, + "AWS::SageMaker::Model.ImageConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-model-containerdefinition-imageconfig.html", + "Properties": { + "RepositoryAccessMode": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-model-containerdefinition-imageconfig.html#cfn-sagemaker-model-containerdefinition-imageconfig-repositoryaccessmode", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, "AWS::SageMaker::Model.VpcConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-model-vpcconfig.html", "Properties": { @@ -39511,6 +40874,13 @@ "Type": "List", "UpdateType": "Conditional" }, + "SecurityGroupIds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-server-endpointdetails.html#cfn-transfer-server-endpointdetails-securitygroupids", + "ItemType": "SecurityGroupId", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, "SubnetIds": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-server-endpointdetails.html#cfn-transfer-server-endpointdetails-subnetids", "PrimitiveItemType": "String", @@ -39552,6 +40922,9 @@ "AWS::Transfer::Server.Protocol": { "PrimitiveType": "String" }, + "AWS::Transfer::Server.SecurityGroupId": { + "PrimitiveType": "String" + }, "AWS::Transfer::User.HomeDirectoryMapEntry": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-user-homedirectorymapentry.html", "Properties": { @@ -41698,7 +43071,7 @@ } } }, - "ResourceSpecificationVersion": "18.7.0", + "ResourceSpecificationVersion": "20.0.0", "ResourceTypes": { "AWS::ACMPCA::Certificate": { "Attributes": { @@ -41956,12 +43329,6 @@ "Required": true, "UpdateType": "Mutable" }, - "LdapMetadata": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amazonmq-broker.html#cfn-amazonmq-broker-ldapmetadata", - "Required": false, - "Type": "LdapMetadata", - "UpdateType": "Mutable" - }, "LdapServerMetadata": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amazonmq-broker.html#cfn-amazonmq-broker-ldapservermetadata", "Required": false, @@ -45088,6 +46455,12 @@ "Required": true, "UpdateType": "Immutable" }, + "ApiKeyId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-apikey.html#cfn-appsync-apikey-apikeyid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "Description": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-apikey.html#cfn-appsync-apikey-description", "PrimitiveType": "String", @@ -45245,6 +46618,12 @@ "PrimitiveType": "String", "Required": false, "UpdateType": "Mutable" + }, + "SyncConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-functionconfiguration.html#cfn-appsync-functionconfiguration-syncconfig", + "Required": false, + "Type": "SyncConfig", + "UpdateType": "Mutable" } } }, @@ -45666,6 +47045,12 @@ "PrimitiveType": "String", "Required": true, "UpdateType": "Immutable" + }, + "WorkGroup": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-athena-namedquery.html#cfn-athena-namedquery-workgroup", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" } } }, @@ -45722,6 +47107,23 @@ } }, "AWS::AutoScaling::AutoScalingGroup": { + "Attributes": { + "LaunchConfigurationName": { + "PrimitiveType": "String" + }, + "LaunchTemplateSpecification": { + "PrimitiveType": "String" + }, + "MixedInstancesPolicy": { + "PrimitiveType": "String" + }, + "PlacementGroup": { + "PrimitiveType": "String" + }, + "VPCZoneIdentifier": { + "PrimitiveType": "String" + } + }, "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html", "Properties": { "AutoScalingGroupName": { @@ -45738,6 +47140,12 @@ "Type": "List", "UpdateType": "Mutable" }, + "CapacityRebalance": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-capacityrebalance", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, "Cooldown": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-cooldown", "PrimitiveType": "String", @@ -45973,6 +47381,12 @@ "Required": false, "UpdateType": "Immutable" }, + "MetadataOptions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html#cfn-autoscaling-launchconfig-metadataoptions", + "Required": false, + "Type": "MetadataOption", + "UpdateType": "Immutable" + }, "PlacementTenancy": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html#cfn-as-launchconfig-placementtenancy", "PrimitiveType": "String", @@ -46323,6 +47737,12 @@ "Required": false, "UpdateType": "Mutable" }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-computeenvironment.html#cfn-batch-computeenvironment-tags", + "PrimitiveType": "Json", + "Required": false, + "UpdateType": "Immutable" + }, "Type": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-computeenvironment.html#cfn-batch-computeenvironment-type", "PrimitiveType": "String", @@ -46364,6 +47784,12 @@ "Type": "RetryStrategy", "UpdateType": "Mutable" }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobdefinition.html#cfn-batch-jobdefinition-tags", + "PrimitiveType": "Json", + "Required": false, + "UpdateType": "Immutable" + }, "Timeout": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobdefinition.html#cfn-batch-jobdefinition-timeout", "Required": false, @@ -46405,6 +47831,12 @@ "PrimitiveType": "String", "Required": false, "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobqueue.html#cfn-batch-jobqueue-tags", + "PrimitiveType": "Json", + "Required": false, + "UpdateType": "Immutable" } } }, @@ -50651,6 +52083,12 @@ "Type": "List", "UpdateType": "Mutable" }, + "SelfServicePortal": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-clientvpnendpoint.html#cfn-ec2-clientvpnendpoint-selfserviceportal", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "ServerCertificateArn": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-clientvpnendpoint.html#cfn-ec2-clientvpnendpoint-servercertificatearn", "PrimitiveType": "String", @@ -51771,6 +53209,12 @@ "AWS::EC2::Route": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html", "Properties": { + "CarrierGatewayId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html#cfn-ec2-route-carriergatewayid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "DestinationCidrBlock": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html#cfn-ec2-route-destinationcidrblock", "PrimitiveType": "String", @@ -51801,6 +53245,12 @@ "Required": false, "UpdateType": "Mutable" }, + "LocalGatewayId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html#cfn-ec2-route-localgatewayid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "NatGatewayId": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html#cfn-ec2-route-natgatewayid", "PrimitiveType": "String", @@ -51825,6 +53275,12 @@ "Required": false, "UpdateType": "Mutable" }, + "VpcEndpointId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html#cfn-ec2-route-vpcendpointid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "VpcPeeringConnectionId": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html#cfn-ec2-route-vpcpeeringconnectionid", "PrimitiveType": "String", @@ -52066,6 +53522,9 @@ "NetworkAclAssociationId": { "PrimitiveType": "String" }, + "OutpostArn": { + "PrimitiveType": "String" + }, "VpcId": { "PrimitiveType": "String" } @@ -52102,6 +53561,12 @@ "Required": false, "UpdateType": "Mutable" }, + "OutpostArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet.html#cfn-ec2-subnet-outpostarn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, "Tags": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet.html#cfn-ec2-subnet-tags", "DuplicatesAllowed": true, @@ -52727,13 +54192,6 @@ "Required": false, "UpdateType": "Mutable" }, - "ApplianceLoadBalancerArns": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcendpointservice.html#cfn-ec2-vpcendpointservice-applianceloadbalancerarns", - "PrimitiveItemType": "String", - "Required": false, - "Type": "List", - "UpdateType": "Mutable" - }, "NetworkLoadBalancerArns": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcendpointservice.html#cfn-ec2-vpcendpointservice-networkloadbalancerarns", "PrimitiveItemType": "String", @@ -53941,12 +55399,24 @@ "Type": "KerberosAttributes", "UpdateType": "Immutable" }, + "LogEncryptionKmsKeyId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-logencryptionkmskeyid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, "LogUri": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-loguri", "PrimitiveType": "String", "Required": false, "UpdateType": "Immutable" }, + "ManagedScalingPolicy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-managedscalingpolicy", + "Required": false, + "Type": "ManagedScalingPolicy", + "UpdateType": "Mutable" + }, "Name": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-name", "PrimitiveType": "String", @@ -53977,6 +55447,12 @@ "Required": true, "UpdateType": "Immutable" }, + "StepConcurrencyLevel": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-stepconcurrencylevel", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, "Steps": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-steps", "DuplicatesAllowed": false, @@ -54442,6 +55918,12 @@ "Required": false, "UpdateType": "Mutable" }, + "GlobalReplicationGroupId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-globalreplicationgroupid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, "KmsKeyId": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-kmskeyid", "PrimitiveType": "String", @@ -54452,7 +55934,7 @@ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-multiazenabled", "PrimitiveType": "Boolean", "Required": false, - "UpdateType": "Immutable" + "UpdateType": "Mutable" }, "NodeGroupConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-nodegroupconfiguration", @@ -54986,13 +56468,13 @@ "Port": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listener.html#cfn-elasticloadbalancingv2-listener-port", "PrimitiveType": "Integer", - "Required": true, + "Required": false, "UpdateType": "Mutable" }, "Protocol": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listener.html#cfn-elasticloadbalancingv2-listener-protocol", "PrimitiveType": "String", - "Required": true, + "Required": false, "UpdateType": "Mutable" }, "SslPolicy": { @@ -55116,7 +56598,7 @@ "ItemType": "SubnetMapping", "Required": false, "Type": "List", - "UpdateType": "Immutable" + "UpdateType": "Mutable" }, "Subnets": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-loadbalancer.html#cfn-elasticloadbalancingv2-loadbalancer-subnets", @@ -56184,6 +57666,12 @@ "Required": false, "UpdateType": "Mutable" }, + "FlexMatchMode": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-matchmakingconfiguration.html#cfn-gamelift-matchmakingconfiguration-flexmatchmode", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "GameProperties": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-matchmakingconfiguration.html#cfn-gamelift-matchmakingconfiguration-gameproperties", "ItemType": "GameProperty", @@ -56200,7 +57688,7 @@ "GameSessionQueueArns": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-matchmakingconfiguration.html#cfn-gamelift-matchmakingconfiguration-gamesessionqueuearns", "PrimitiveItemType": "String", - "Required": true, + "Required": false, "Type": "List", "UpdateType": "Mutable" }, @@ -56382,6 +57870,13 @@ "Required": true, "UpdateType": "Immutable" }, + "PortOverrides": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-endpointgroup.html#cfn-globalaccelerator-endpointgroup-portoverrides", + "ItemType": "PortOverride", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, "ThresholdCount": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-endpointgroup.html#cfn-globalaccelerator-endpointgroup-thresholdcount", "PrimitiveType": "Integer", @@ -58096,6 +59591,114 @@ } } }, + "AWS::IVS::Channel": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "IngestEndpoint": { + "PrimitiveType": "String" + }, + "PlaybackUrl": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-channel.html", + "Properties": { + "Authorized": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-channel.html#cfn-ivs-channel-authorized", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "LatencyMode": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-channel.html#cfn-ivs-channel-latencymode", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-channel.html#cfn-ivs-channel-name", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-channel.html#cfn-ivs-channel-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Type": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-channel.html#cfn-ivs-channel-type", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::IVS::PlaybackKeyPair": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "Fingerprint": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-playbackkeypair.html", + "Properties": { + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-playbackkeypair.html#cfn-ivs-playbackkeypair-name", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "PublicKeyMaterial": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-playbackkeypair.html#cfn-ivs-playbackkeypair-publickeymaterial", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-playbackkeypair.html#cfn-ivs-playbackkeypair-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::IVS::StreamKey": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "Value": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-streamkey.html", + "Properties": { + "ChannelArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-streamkey.html#cfn-ivs-streamkey-channelarn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-streamkey.html#cfn-ivs-streamkey-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, "AWS::ImageBuilder::Component": { "Attributes": { "Arn": { @@ -59115,6 +60718,137 @@ } } }, + "AWS::IoTSiteWise::Asset": { + "Attributes": { + "AssetArn": { + "PrimitiveType": "String" + }, + "AssetId": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-asset.html", + "Properties": { + "AssetHierarchies": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-asset.html#cfn-iotsitewise-asset-assethierarchies", + "ItemType": "AssetHierarchy", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "AssetModelId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-asset.html#cfn-iotsitewise-asset-assetmodelid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "AssetName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-asset.html#cfn-iotsitewise-asset-assetname", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "AssetProperties": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-asset.html#cfn-iotsitewise-asset-assetproperties", + "ItemType": "AssetProperty", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-asset.html#cfn-iotsitewise-asset-tags", + "DuplicatesAllowed": true, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::AssetModel": { + "Attributes": { + "AssetModelArn": { + "PrimitiveType": "String" + }, + "AssetModelId": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-assetmodel.html", + "Properties": { + "AssetModelDescription": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-assetmodel.html#cfn-iotsitewise-assetmodel-assetmodeldescription", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "AssetModelHierarchies": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-assetmodel.html#cfn-iotsitewise-assetmodel-assetmodelhierarchies", + "ItemType": "AssetModelHierarchy", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "AssetModelName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-assetmodel.html#cfn-iotsitewise-assetmodel-assetmodelname", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "AssetModelProperties": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-assetmodel.html#cfn-iotsitewise-assetmodel-assetmodelproperties", + "ItemType": "AssetModelProperty", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-assetmodel.html#cfn-iotsitewise-assetmodel-tags", + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::Gateway": { + "Attributes": { + "GatewayId": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-gateway.html", + "Properties": { + "GatewayCapabilitySummaries": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-gateway.html#cfn-iotsitewise-gateway-gatewaycapabilitysummaries", + "DuplicatesAllowed": false, + "ItemType": "GatewayCapabilitySummary", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "GatewayName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-gateway.html#cfn-iotsitewise-gateway-gatewayname", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "GatewayPlatform": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-gateway.html#cfn-iotsitewise-gateway-gatewayplatform", + "Required": true, + "Type": "GatewayPlatform", + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-gateway.html#cfn-iotsitewise-gateway-tags", + "DuplicatesAllowed": true, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, "AWS::IoTThingsGraph::FlowTemplate": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotthingsgraph-flowtemplate.html", "Properties": { @@ -59623,6 +61357,12 @@ }, "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesisfirehose-deliverystream.html", "Properties": { + "DeliveryStreamEncryptionConfigurationInput": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesisfirehose-deliverystream.html#cfn-kinesisfirehose-deliverystream-deliverystreamencryptionconfigurationinput", + "Required": false, + "Type": "DeliveryStreamEncryptionConfigurationInput", + "UpdateType": "Mutable" + }, "DeliveryStreamName": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesisfirehose-deliverystream.html#cfn-kinesisfirehose-deliverystream-deliverystreamname", "PrimitiveType": "String", @@ -59657,7 +61397,7 @@ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesisfirehose-deliverystream.html#cfn-kinesisfirehose-deliverystream-kinesisstreamsourceconfiguration", "Required": false, "Type": "KinesisStreamSourceConfiguration", - "UpdateType": "Mutable" + "UpdateType": "Immutable" }, "RedshiftDestinationConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesisfirehose-deliverystream.html#cfn-kinesisfirehose-deliverystream-redshiftdestinationconfiguration", @@ -59676,6 +61416,13 @@ "Required": false, "Type": "SplunkDestinationConfiguration", "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesisfirehose-deliverystream.html#cfn-kinesisfirehose-deliverystream-tags", + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" } } }, @@ -59687,6 +61434,13 @@ "Required": false, "Type": "Admins", "UpdateType": "Mutable" + }, + "TrustedResourceOwners": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lakeformation-datalakesettings.html#cfn-lakeformation-datalakesettings-trustedresourceowners", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" } } }, @@ -59888,6 +61642,22 @@ "Required": false, "UpdateType": "Mutable" }, + "Queues": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-queues", + "DuplicatesAllowed": false, + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "SourceAccessConfigurations": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-sourceaccessconfigurations", + "DuplicatesAllowed": false, + "ItemType": "SourceAccessConfiguration", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, "StartingPosition": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-startingposition", "PrimitiveType": "String", @@ -60204,14 +61974,20 @@ }, "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html", "Properties": { + "KmsKeyId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html#cfn-logs-loggroup-kmskeyid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "LogGroupName": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html#cfn-cwl-loggroup-loggroupname", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html#cfn-logs-loggroup-loggroupname", "PrimitiveType": "String", "Required": false, "UpdateType": "Immutable" }, "RetentionInDays": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html#cfn-cwl-loggroup-retentionindays", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html#cfn-logs-loggroup-retentionindays", "PrimitiveType": "Integer", "Required": false, "UpdateType": "Mutable" @@ -60899,6 +62675,284 @@ } } }, + "AWS::MediaPackage::Asset": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "CreatedAt": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-asset.html", + "Properties": { + "EgressEndpoints": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-asset.html#cfn-mediapackage-asset-egressendpoints", + "ItemType": "EgressEndpoint", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Id": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-asset.html#cfn-mediapackage-asset-id", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "PackagingGroupId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-asset.html#cfn-mediapackage-asset-packaginggroupid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "ResourceId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-asset.html#cfn-mediapackage-asset-resourceid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "SourceArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-asset.html#cfn-mediapackage-asset-sourcearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "SourceRoleArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-asset.html#cfn-mediapackage-asset-sourcerolearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-asset.html#cfn-mediapackage-asset-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::Channel": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "HlsIngest": { + "Type": "HlsIngest" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-channel.html", + "Properties": { + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-channel.html#cfn-mediapackage-channel-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Id": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-channel.html#cfn-mediapackage-channel-id", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-channel.html#cfn-mediapackage-channel-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Immutable" + } + } + }, + "AWS::MediaPackage::OriginEndpoint": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "Url": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html", + "Properties": { + "Authorization": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-authorization", + "Required": false, + "Type": "Authorization", + "UpdateType": "Mutable" + }, + "ChannelId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-channelid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "CmafPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-cmafpackage", + "Required": false, + "Type": "CmafPackage", + "UpdateType": "Mutable" + }, + "DashPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-dashpackage", + "Required": false, + "Type": "DashPackage", + "UpdateType": "Mutable" + }, + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "HlsPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-hlspackage", + "Required": false, + "Type": "HlsPackage", + "UpdateType": "Mutable" + }, + "Id": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-id", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "ManifestName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-manifestname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "MssPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-msspackage", + "Required": false, + "Type": "MssPackage", + "UpdateType": "Mutable" + }, + "Origination": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-origination", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "StartoverWindowSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-startoverwindowseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "TimeDelaySeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-timedelayseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "Whitelist": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-whitelist", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-packagingconfiguration.html", + "Properties": { + "CmafPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-packagingconfiguration.html#cfn-mediapackage-packagingconfiguration-cmafpackage", + "Required": false, + "Type": "CmafPackage", + "UpdateType": "Mutable" + }, + "DashPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-packagingconfiguration.html#cfn-mediapackage-packagingconfiguration-dashpackage", + "Required": false, + "Type": "DashPackage", + "UpdateType": "Mutable" + }, + "HlsPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-packagingconfiguration.html#cfn-mediapackage-packagingconfiguration-hlspackage", + "Required": false, + "Type": "HlsPackage", + "UpdateType": "Mutable" + }, + "Id": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-packagingconfiguration.html#cfn-mediapackage-packagingconfiguration-id", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "MssPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-packagingconfiguration.html#cfn-mediapackage-packagingconfiguration-msspackage", + "Required": false, + "Type": "MssPackage", + "UpdateType": "Mutable" + }, + "PackagingGroupId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-packagingconfiguration.html#cfn-mediapackage-packagingconfiguration-packaginggroupid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-packagingconfiguration.html#cfn-mediapackage-packagingconfiguration-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingGroup": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "DomainName": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-packaginggroup.html", + "Properties": { + "Authorization": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-packaginggroup.html#cfn-mediapackage-packaginggroup-authorization", + "Required": false, + "Type": "Authorization", + "UpdateType": "Mutable" + }, + "Id": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-packaginggroup.html#cfn-mediapackage-packaginggroup-id", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-packaginggroup.html#cfn-mediapackage-packaginggroup-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Immutable" + } + } + }, "AWS::MediaStore::Container": { "Attributes": { "Endpoint": { @@ -63466,7 +65520,7 @@ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-engine", "PrimitiveType": "String", "Required": true, - "UpdateType": "Immutable" + "UpdateType": "Conditional" }, "EngineMode": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-enginemode", @@ -63478,7 +65532,13 @@ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-engineversion", "PrimitiveType": "String", "Required": false, - "UpdateType": "Immutable" + "UpdateType": "Mutable" + }, + "GlobalClusterIdentifier": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-globalclusteridentifier", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Conditional" }, "KmsKeyId": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-kmskeyid", @@ -63778,7 +65838,7 @@ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html#cfn-rds-dbinstance-engine", "PrimitiveType": "String", "Required": false, - "UpdateType": "Immutable" + "UpdateType": "Conditional" }, "EngineVersion": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html#cfn-rds-dbinstance-engineversion", @@ -65594,6 +67654,12 @@ "Required": false, "UpdateType": "Mutable" }, + "SubscriptionRoleArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-subscription.html#cfn-sns-subscription-subscriptionrolearn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "TopicArn": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-subscription.html#topicarn", "PrimitiveType": "String", @@ -65622,6 +67688,12 @@ "Required": false, "UpdateType": "Mutable" }, + "FifoTopic": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-topic.html#cfn-sns-topic-fifotopic", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Immutable" + }, "KmsMasterKeyId": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-topic.html#cfn-sns-topic-kmsmasterkeyid", "PrimitiveType": "String", diff --git a/packages/@aws-cdk/cfnspec/spec-source/670_MediaPackage_PackagingConfiguration_patch.json b/packages/@aws-cdk/cfnspec/spec-source/670_MediaPackage_PackagingConfiguration_patch.json new file mode 100644 index 0000000000000..ed0f382b5ba59 --- /dev/null +++ b/packages/@aws-cdk/cfnspec/spec-source/670_MediaPackage_PackagingConfiguration_patch.json @@ -0,0 +1,29 @@ +{ + "PropertyTypes": { + "patch": { + "description": "missing type information for SpekeKeyProvider - mirrors patch in cfn-lint (https://github.com/aws-cloudformation/cfn-python-lint/pull/1751)", + "operations": [ + { + "op": "add", + "path": "/AWS::MediaPackage::PackagingConfiguration.CmafEncryption/Properties/SpekeKeyProvider/Type", + "value": "SpekeKeyProvider" + }, + { + "op": "add", + "path": "/AWS::MediaPackage::PackagingConfiguration.DashEncryption/Properties/SpekeKeyProvider/Type", + "value": "SpekeKeyProvider" + }, + { + "op": "add", + "path": "/AWS::MediaPackage::PackagingConfiguration.HlsEncryption/Properties/SpekeKeyProvider/Type", + "value": "SpekeKeyProvider" + }, + { + "op": "add", + "path": "/AWS::MediaPackage::PackagingConfiguration.MssEncryption/Properties/SpekeKeyProvider/Type", + "value": "SpekeKeyProvider" + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/cfnspec/spec-source/680_AutoScaling_AutoScalingGroup_patch.json b/packages/@aws-cdk/cfnspec/spec-source/680_AutoScaling_AutoScalingGroup_patch.json new file mode 100644 index 0000000000000..c79b21da417e1 --- /dev/null +++ b/packages/@aws-cdk/cfnspec/spec-source/680_AutoScaling_AutoScalingGroup_patch.json @@ -0,0 +1,31 @@ +{ + "ResourceTypes": { + "AWS::AutoScaling::AutoScalingGroup": { + "patch": { + "description": "remove (presumed accidentally included) new autoscaling group attributes", + "operations": [ + { + "op": "remove", + "path": "/Attributes/LaunchConfigurationName" + }, + { + "op": "remove", + "path": "/Attributes/LaunchTemplateSpecification" + }, + { + "op": "remove", + "path": "/Attributes/MixedInstancesPolicy" + }, + { + "op": "remove", + "path": "/Attributes/PlacementGroup" + }, + { + "op": "remove", + "path": "/Attributes/VPCZoneIdentifier" + } + ] + } + } + } +} diff --git a/packages/@aws-cdk/cfnspec/spec-source/680_MediaPackage_Channel_patch.json b/packages/@aws-cdk/cfnspec/spec-source/680_MediaPackage_Channel_patch.json new file mode 100644 index 0000000000000..5eb3d2a657645 --- /dev/null +++ b/packages/@aws-cdk/cfnspec/spec-source/680_MediaPackage_Channel_patch.json @@ -0,0 +1,15 @@ +{ + "ResourceTypes": { + "AWS::MediaPackage::Channel": { + "patch": { + "description": "remove the unusable attribute HlsIngest, which represents a complex type and cannot be directly converted to a primitive type", + "operations": [ + { + "op": "remove", + "path": "/Attributes/HlsIngest" + } + ] + } + } + } +} diff --git a/packages/@aws-cdk/cloudformation-include/package.json b/packages/@aws-cdk/cloudformation-include/package.json index 5504214ff2f62..a62d181f8243a 100644 --- a/packages/@aws-cdk/cloudformation-include/package.json +++ b/packages/@aws-cdk/cloudformation-include/package.json @@ -141,7 +141,9 @@ "@aws-cdk/aws-iot1click": "0.0.0", "@aws-cdk/aws-iotanalytics": "0.0.0", "@aws-cdk/aws-iotevents": "0.0.0", + "@aws-cdk/aws-iotsitewise": "0.0.0", "@aws-cdk/aws-iotthingsgraph": "0.0.0", + "@aws-cdk/aws-ivs": "0.0.0", "@aws-cdk/aws-kinesis": "0.0.0", "@aws-cdk/aws-kinesisanalytics": "0.0.0", "@aws-cdk/aws-kinesisfirehose": "0.0.0", @@ -154,6 +156,7 @@ "@aws-cdk/aws-managedblockchain": "0.0.0", "@aws-cdk/aws-mediaconvert": "0.0.0", "@aws-cdk/aws-medialive": "0.0.0", + "@aws-cdk/aws-mediapackage": "0.0.0", "@aws-cdk/aws-mediastore": "0.0.0", "@aws-cdk/aws-msk": "0.0.0", "@aws-cdk/aws-neptune": "0.0.0", @@ -271,7 +274,9 @@ "@aws-cdk/aws-iot1click": "0.0.0", "@aws-cdk/aws-iotanalytics": "0.0.0", "@aws-cdk/aws-iotevents": "0.0.0", + "@aws-cdk/aws-iotsitewise": "0.0.0", "@aws-cdk/aws-iotthingsgraph": "0.0.0", + "@aws-cdk/aws-ivs": "@aws-cdk/aws-ivs", "@aws-cdk/aws-kendra": "0.0.0", "@aws-cdk/aws-kinesis": "0.0.0", "@aws-cdk/aws-kinesisanalytics": "0.0.0", @@ -284,6 +289,7 @@ "@aws-cdk/aws-managedblockchain": "0.0.0", "@aws-cdk/aws-mediaconvert": "0.0.0", "@aws-cdk/aws-medialive": "0.0.0", + "@aws-cdk/aws-mediapackage": "0.0.0", "@aws-cdk/aws-mediastore": "0.0.0", "@aws-cdk/aws-msk": "0.0.0", "@aws-cdk/aws-neptune": "0.0.0", diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index 113df7a9afce8..c1b5e38a89280 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -190,7 +190,9 @@ "@aws-cdk/aws-iot1click": "0.0.0", "@aws-cdk/aws-iotanalytics": "0.0.0", "@aws-cdk/aws-iotevents": "0.0.0", + "@aws-cdk/aws-iotsitewise": "0.0.0", "@aws-cdk/aws-iotthingsgraph": "0.0.0", + "@aws-cdk/aws-ivs": "0.0.0", "@aws-cdk/aws-kinesis": "0.0.0", "@aws-cdk/aws-kinesisanalytics": "0.0.0", "@aws-cdk/aws-kinesisfirehose": "0.0.0", @@ -208,6 +210,7 @@ "@aws-cdk/aws-managedblockchain": "0.0.0", "@aws-cdk/aws-mediaconvert": "0.0.0", "@aws-cdk/aws-medialive": "0.0.0", + "@aws-cdk/aws-mediapackage": "0.0.0", "@aws-cdk/aws-mediastore": "0.0.0", "@aws-cdk/aws-msk": "0.0.0", "@aws-cdk/aws-neptune": "0.0.0", diff --git a/packages/decdk/package.json b/packages/decdk/package.json index 0871274f0b016..adc9732761f1f 100644 --- a/packages/decdk/package.json +++ b/packages/decdk/package.json @@ -117,7 +117,9 @@ "@aws-cdk/aws-iot1click": "0.0.0", "@aws-cdk/aws-iotanalytics": "0.0.0", "@aws-cdk/aws-iotevents": "0.0.0", + "@aws-cdk/aws-iotsitewise": "0.0.0", "@aws-cdk/aws-iotthingsgraph": "0.0.0", + "@aws-cdk/aws-ivs": "0.0.0", "@aws-cdk/aws-kendra": "0.0.0", "@aws-cdk/aws-kinesis": "0.0.0", "@aws-cdk/aws-kinesisanalytics": "0.0.0", @@ -135,6 +137,7 @@ "@aws-cdk/aws-managedblockchain": "0.0.0", "@aws-cdk/aws-mediaconvert": "0.0.0", "@aws-cdk/aws-medialive": "0.0.0", + "@aws-cdk/aws-mediapackage": "0.0.0", "@aws-cdk/aws-mediastore": "0.0.0", "@aws-cdk/aws-msk": "0.0.0", "@aws-cdk/aws-neptune": "0.0.0", diff --git a/packages/monocdk/package.json b/packages/monocdk/package.json index f6b5dc263a9fb..7123a4b0469e8 100644 --- a/packages/monocdk/package.json +++ b/packages/monocdk/package.json @@ -189,11 +189,13 @@ "@aws-cdk/aws-iot1click": "0.0.0", "@aws-cdk/aws-iotanalytics": "0.0.0", "@aws-cdk/aws-iotevents": "0.0.0", + "@aws-cdk/aws-iotsitewise": "0.0.0", "@aws-cdk/aws-iotthingsgraph": "0.0.0", + "@aws-cdk/aws-ivs": "0.0.0", + "@aws-cdk/aws-kendra": "0.0.0", "@aws-cdk/aws-kinesis": "0.0.0", "@aws-cdk/aws-kinesisanalytics": "0.0.0", "@aws-cdk/aws-kinesisfirehose": "0.0.0", - "@aws-cdk/aws-kendra": "0.0.0", "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-lakeformation": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", @@ -207,6 +209,7 @@ "@aws-cdk/aws-managedblockchain": "0.0.0", "@aws-cdk/aws-mediaconvert": "0.0.0", "@aws-cdk/aws-medialive": "0.0.0", + "@aws-cdk/aws-mediapackage": "0.0.0", "@aws-cdk/aws-mediastore": "0.0.0", "@aws-cdk/aws-msk": "0.0.0", "@aws-cdk/aws-neptune": "0.0.0", From 62baa7b51b49c1a669c7144e5883375fe9ab5d35 Mon Sep 17 00:00:00 2001 From: Shivam Verma <68244110+sshver@users.noreply.github.com> Date: Wed, 11 Nov 2020 10:56:46 -0800 Subject: [PATCH 114/314] feat(appmesh): add listener timeout to Virtual Nodes (#10793) Adds listener timeout to Virtual Nodes. BREAKING CHANGE: `IVirtualNode` no longer has the `addBackends()` method. A backend can be added to `VirtualNode` using the `addBackend()` method which accepts a single `IVirtualService` * **appmesh**: `IVirtualNode` no longer has the `addListeners()` method. A listener can be added to `VirtualNode` using the `addListener()` method which accepts a single `VirtualNodeListener` * **appmesh**: `VirtualNode` no longer has a default listener. It is valid to have a `VirtualNode` without any listeners * **appmesh**: the construction property `listener` of `VirtualNode` has been renamed to `listeners`, and its type changed to an array of listeners * **appmesh**: the struct `VirtualNodeListener` has been removed. To create Virtual Node listeners, use the static factory methods of the `VirtualNodeListener` class ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../lib/extensions/appmesh.ts | 25 +- packages/@aws-cdk/aws-appmesh/README.md | 25 +- packages/@aws-cdk/aws-appmesh/lib/index.ts | 1 + .../aws-appmesh/lib/shared-interfaces.ts | 38 --- .../aws-appmesh/lib/virtual-node-listener.ts | 219 +++++++++++++++++ .../@aws-cdk/aws-appmesh/lib/virtual-node.ts | 105 +++----- packages/@aws-cdk/aws-appmesh/package.json | 7 +- .../@aws-cdk/aws-appmesh/test/integ.mesh.ts | 14 +- .../aws-appmesh/test/test.health-check.ts | 30 +-- .../@aws-cdk/aws-appmesh/test/test.mesh.ts | 38 +-- .../aws-appmesh/test/test.virtual-node.ts | 228 +++++++++++++++--- .../aws-appmesh/test/test.virtual-router.ts | 50 ++-- 12 files changed, 524 insertions(+), 256 deletions(-) create mode 100644 packages/@aws-cdk/aws-appmesh/lib/virtual-node-listener.ts diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts index 583ca06435c09..614a1eeea2312 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts +++ b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts @@ -259,17 +259,28 @@ export class AppMeshExtension extends ServiceExtension { throw new Error('You must add a CloudMap namespace to the ECS cluster in order to use the AppMesh extension'); } + function addListener(protocol: appmesh.Protocol, port: number): appmesh.VirtualNodeListener { + switch (protocol) { + case appmesh.Protocol.HTTP : + return appmesh.VirtualNodeListener.http({ port }); + + case appmesh.Protocol.HTTP2 : + return appmesh.VirtualNodeListener.http2({ port }); + + case appmesh.Protocol.GRPC : + return appmesh.VirtualNodeListener.grpc({ port }); + + case appmesh.Protocol.TCP : + return appmesh.VirtualNodeListener.tcp({ port }); + } + } + // Create a virtual node for the name service this.virtualNode = new appmesh.VirtualNode(this.scope, `${this.parentService.id}-virtual-node`, { mesh: this.mesh, virtualNodeName: this.parentService.id, cloudMapService: service.cloudMapService, - listener: { - portMapping: { - port: containerextension.trafficPort, - protocol: this.protocol, - }, - }, + listeners: [addListener(this.protocol, containerextension.trafficPort)], }); // Create a virtual router for this service. This allows for retries @@ -326,7 +337,7 @@ export class AppMeshExtension extends ServiceExtension { // Next update the app mesh config so that the local Envoy // proxy on this service knows how to route traffic to // nodes from the other service. - this.virtualNode.addBackends(otherAppMesh.virtualService); + this.virtualNode.addBackend(otherAppMesh.virtualService); } private virtualRouterListener(port: number): appmesh.VirtualRouterListener { diff --git a/packages/@aws-cdk/aws-appmesh/README.md b/packages/@aws-cdk/aws-appmesh/README.md index 9c0a4b7f1da2e..dff8a6808c701 100644 --- a/packages/@aws-cdk/aws-appmesh/README.md +++ b/packages/@aws-cdk/aws-appmesh/README.md @@ -139,11 +139,8 @@ const service = namespace.createService('Svc'); const node = mesh.addVirtualNode('virtual-node', { cloudMapService: service, - listener: { - portMapping: { - port: 8081, - protocol: Protocol.HTTP, - }, + listeners: [appmesh.VirtualNodeListener.httpNodeListener({ + port: 8081, healthCheck: { healthyThreshold: 3, interval: Duration.seconds(5), // minimum @@ -153,9 +150,9 @@ const node = mesh.addVirtualNode('virtual-node', { timeout: Duration.seconds(2), // minimum unhealthyThreshold: 2, }, - }, + })], accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout'), -}) +}); ``` Create a `VirtualNode` with the the constructor and add tags. @@ -164,11 +161,8 @@ Create a `VirtualNode` with the the constructor and add tags. const node = new VirtualNode(this, 'node', { mesh, cloudMapService: service, - listener: { - portMapping: { - port: 8080, - protocol: Protocol.HTTP, - }, + listeners: [appmesh.VirtualNodeListener.httpNodeListener({ + port: 8080, healthCheck: { healthyThreshold: 3, interval: Duration.seconds(5), // min @@ -177,15 +171,18 @@ const node = new VirtualNode(this, 'node', { protocol: Protocol.HTTP, timeout: Duration.seconds(2), // min unhealthyThreshold: 2, + }, + timeout: { + idle: cdk.Duration.seconds(5), }, - }, + })], accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout'), }); cdk.Tag.add(node, 'Environment', 'Dev'); ``` -The listeners property can be left blank and added later with the `node.addListeners()` method. The `healthcheck` property is optional but if specifying a listener, the `portMappings` must contain at least one property. +The `listeners` property can be left blank and added later with the `node.addListener()` method. The `healthcheck` and `timeout` properties are optional but if specifying a listener, the `port` must be added. ## Adding a Route diff --git a/packages/@aws-cdk/aws-appmesh/lib/index.ts b/packages/@aws-cdk/aws-appmesh/lib/index.ts index d95c017c2071e..4c09b13ba730c 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/index.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/index.ts @@ -7,6 +7,7 @@ export * from './virtual-node'; export * from './virtual-router'; export * from './virtual-router-listener'; export * from './virtual-service'; +export * from './virtual-node-listener'; export * from './virtual-gateway'; export * from './virtual-gateway-listener'; export * from './gateway-route'; diff --git a/packages/@aws-cdk/aws-appmesh/lib/shared-interfaces.ts b/packages/@aws-cdk/aws-appmesh/lib/shared-interfaces.ts index 39111389b0a03..21ab96b6ce56a 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/shared-interfaces.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/shared-interfaces.ts @@ -68,44 +68,6 @@ export interface HealthCheck { readonly unhealthyThreshold?: number; } -/** - * Port mappings for resources that require these attributes, such as VirtualNodes and Routes - */ -export interface PortMapping { - /** - * Port mapped to the VirtualNode / Route - * - * @default 8080 - */ - readonly port: number; - - /** - * Protocol for the VirtualNode / Route, only GRPC, HTTP, HTTP2, or TCP is supported - * - * @default HTTP - */ - readonly protocol: Protocol; -} - -/** - * Represents the properties needed to define healthy and active listeners for nodes - */ -export interface VirtualNodeListener { - /** - * Array of PortMappingProps for the listener - * - * @default - HTTP port 8080 - */ - readonly portMapping?: PortMapping; - - /** - * Health checking strategy upstream nodes should use when communicating with the listener - * - * @default - no healthcheck - */ - readonly healthCheck?: HealthCheck; -} - /** * All Properties for Envoy Access logs for mesh endpoints */ diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-node-listener.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-node-listener.ts new file mode 100644 index 0000000000000..e3e433d8e25d8 --- /dev/null +++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-node-listener.ts @@ -0,0 +1,219 @@ +import * as cdk from '@aws-cdk/core'; +import { CfnVirtualNode } from './appmesh.generated'; +import { validateHealthChecks } from './private/utils'; +import { HealthCheck, Protocol } from './shared-interfaces'; + +/** + * Properties for a VirtualNode listener + */ +export interface VirtualNodeListenerConfig { + /** + * Single listener config for a VirtualNode + */ + readonly listener: CfnVirtualNode.ListenerProperty, +} + +/** + * Represents the properties needed to define a Listeners for a VirtualNode + */ +interface VirtualNodeListenerCommonOptions { + /** + * Port to listen for connections on + * + * @default - 8080 + */ + readonly port?: number + + /** + * The health check information for the listener + * + * @default - no healthcheck + */ + readonly healthCheck?: HealthCheck; +} + +/** + * Represent the HTTP Node Listener prorperty + */ +export interface HttpVirtualNodeListenerOptions extends VirtualNodeListenerCommonOptions { + /** + * Timeout for HTTP protocol + * + * @default - None + */ + readonly timeout?: HttpTimeout; +} + +/** + * Represent the GRPC Node Listener prorperty + */ +export interface GrpcVirtualNodeListenerOptions extends VirtualNodeListenerCommonOptions { + /** + * Timeout for GRPC protocol + * + * @default - None + */ + readonly timeout?: GrpcTimeout; +} + +/** + * Represent the TCP Node Listener prorperty + */ +export interface TcpVirtualNodeListenerOptions extends VirtualNodeListenerCommonOptions { + /** + * Timeout for TCP protocol + * + * @default - None + */ + readonly timeout?: TcpTimeout; +} + +/** + * Represents timeouts for HTTP protocols. + */ +export interface HttpTimeout { + /** + * Represents an idle timeout. The amount of time that a connection may be idle. + * + * @default - none + */ + readonly idle?: cdk.Duration; + + /** + * Represents per request timeout. + * + * @default - 15 s + */ + readonly perRequest?: cdk.Duration; +} + +/** + * Represents timeouts for GRPC protocols. + */ +export interface GrpcTimeout { + /** + * Represents an idle timeout. The amount of time that a connection may be idle. + * + * @default - none + */ + readonly idle?: cdk.Duration; + + /** + * Represents per request timeout. + * + * @default - 15 s + */ + readonly perRequest?: cdk.Duration; +} + +/** + * Represents timeouts for TCP protocols. + */ +export interface TcpTimeout { + /** + * Represents an idle timeout. The amount of time that a connection may be idle. + * + * @default - none + */ + readonly idle?: cdk.Duration; +} + +/** + * Defines listener for a VirtualNode + */ +export abstract class VirtualNodeListener { + /** + * Returns an HTTP Listener for a VirtualNode + */ + public static http(props: HttpVirtualNodeListenerOptions = {}): VirtualNodeListener { + return new VirtualNodeListenerImpl(Protocol.HTTP, props.healthCheck, props.timeout, props.port); + } + + /** + * Returns an HTTP2 Listener for a VirtualNode + */ + public static http2(props: HttpVirtualNodeListenerOptions = {}): VirtualNodeListener { + return new VirtualNodeListenerImpl(Protocol.HTTP2, props.healthCheck, props.timeout, props.port); + } + + /** + * Returns an GRPC Listener for a VirtualNode + */ + public static grpc(props: GrpcVirtualNodeListenerOptions = {}): VirtualNodeListener { + return new VirtualNodeListenerImpl(Protocol.GRPC, props.healthCheck, props.timeout, props.port); + } + + /** + * Returns an TCP Listener for a VirtualNode + */ + public static tcp(props: TcpVirtualNodeListenerOptions = {}): VirtualNodeListener { + return new VirtualNodeListenerImpl(Protocol.TCP, props.healthCheck, props.timeout, props.port); + } + + /** + * Binds the current object when adding Listener to a VirtualNode + */ + public abstract bind(scope: cdk.Construct): VirtualNodeListenerConfig; + +} + +class VirtualNodeListenerImpl extends VirtualNodeListener { + constructor(private readonly protocol: Protocol, + private readonly healthCheck: HealthCheck | undefined, + private readonly timeout: HttpTimeout | undefined, + private readonly port: number = 8080) { super(); } + + public bind(_scope: cdk.Construct): VirtualNodeListenerConfig { + return { + listener: { + portMapping: { + port: this.port, + protocol: this.protocol, + }, + healthCheck: this.healthCheck ? this.renderHealthCheck(this.healthCheck) : undefined, + timeout: this.timeout ? this.renderTimeout(this.timeout) : undefined, + }, + }; + } + + private renderHealthCheck(hc: HealthCheck): CfnVirtualNode.HealthCheckProperty | undefined { + if (hc === undefined) { return undefined; } + + if (hc.protocol === Protocol.TCP && hc.path) { + throw new Error('The path property cannot be set with Protocol.TCP'); + } + + if (hc.protocol === Protocol.GRPC && hc.path) { + throw new Error('The path property cannot be set with Protocol.GRPC'); + } + + const healthCheck: CfnVirtualNode.HealthCheckProperty = { + healthyThreshold: hc.healthyThreshold || 2, + intervalMillis: (hc.interval || cdk.Duration.seconds(5)).toMilliseconds(), // min + path: hc.path || (hc.protocol === Protocol.HTTP ? '/' : undefined), + port: hc.port || this.port, + protocol: hc.protocol || this.protocol, + timeoutMillis: (hc.timeout || cdk.Duration.seconds(2)).toMilliseconds(), + unhealthyThreshold: hc.unhealthyThreshold || 2, + }; + + validateHealthChecks(healthCheck); + + return healthCheck; + } + + private renderTimeout(timeout: HttpTimeout): CfnVirtualNode.ListenerTimeoutProperty { + return ({ + [this.protocol]: { + idle: timeout?.idle !== undefined ? { + unit: 'ms', + value: timeout?.idle.toMilliseconds(), + } : undefined, + perRequest: timeout?.perRequest !== undefined ? { + unit: 'ms', + value: timeout?.perRequest.toMilliseconds(), + } : undefined, + }, + }); + } +} diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts index b8b9da2026715..fd8b2cadc87db 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts @@ -3,8 +3,8 @@ import * as cdk from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnVirtualNode } from './appmesh.generated'; import { IMesh, Mesh } from './mesh'; -import { validateHealthChecks } from './private/utils'; -import { AccessLog, HealthCheck, PortMapping, Protocol, VirtualNodeListener } from './shared-interfaces'; +import { AccessLog } from './shared-interfaces'; +import { VirtualNodeListener, VirtualNodeListenerConfig } from './virtual-node-listener'; import { IVirtualService } from './virtual-service'; /** @@ -34,15 +34,6 @@ export interface IVirtualNode extends cdk.IResource { */ readonly mesh: IMesh; - /** - * Utility method to add backends for existing or new VirtualNodes - */ - addBackends(...props: IVirtualService[]): void; - - /** - * Utility method to add Node Listeners for new or existing VirtualNodes - */ - addListeners(...listeners: VirtualNodeListener[]): void; } /** @@ -95,7 +86,7 @@ export interface VirtualNodeBaseProps { * * @default - No listeners */ - readonly listener?: VirtualNodeListener; + readonly listeners?: VirtualNodeListener[]; /** * Access Logging Configuration for the virtual node @@ -130,71 +121,10 @@ abstract class VirtualNodeBase extends cdk.Resource implements IVirtualNode { * The Mesh which the VirtualNode belongs to */ public abstract readonly mesh: IMesh; - - protected readonly backends = new Array(); - protected readonly listeners = new Array(); - - /** - * Add a VirtualServices that this node is expected to send outbound traffic to - */ - public addBackends(...props: IVirtualService[]) { - for (const s of props) { - this.backends.push({ - virtualService: { - virtualServiceName: s.virtualServiceName, - }, - }); - } - } - - /** - * Utility method to add an inbound listener for this virtual node - */ - public addListeners(...listeners: VirtualNodeListener[]) { - if (this.listeners.length + listeners.length > 1) { - throw new Error('VirtualNode may have at most one listener'); - } - - for (const listener of listeners) { - const portMapping = listener.portMapping || { port: 8080, protocol: Protocol.HTTP }; - this.listeners.push({ - portMapping, - healthCheck: renderHealthCheck(listener.healthCheck, portMapping), - }); - } - } -} - -function renderHealthCheck(hc: HealthCheck | undefined, pm: PortMapping): CfnVirtualNode.HealthCheckProperty | undefined { - if (hc === undefined) { return undefined; } - - if (hc.protocol === Protocol.TCP && hc.path) { - throw new Error('The path property cannot be set with Protocol.TCP'); - } - - if (hc.protocol === Protocol.GRPC && hc.path) { - throw new Error('The path property cannot be set with Protocol.GRPC'); - } - - const protocol = hc.protocol ?? pm.protocol; - - const healthCheck: CfnVirtualNode.HealthCheckProperty = { - healthyThreshold: hc.healthyThreshold || 2, - intervalMillis: (hc.interval || cdk.Duration.seconds(5)).toMilliseconds(), // min - path: hc.path || (protocol === Protocol.HTTP ? '/' : undefined), - port: hc.port || pm.port, - protocol: hc.protocol || pm.protocol, - timeoutMillis: (hc.timeout || cdk.Duration.seconds(2)).toMilliseconds(), - unhealthyThreshold: hc.unhealthyThreshold || 2, - }; - - validateHealthChecks(healthCheck); - - return healthCheck; } /** - * VirtualNode represents a newly defined App Mesh VirtualNode + * VirtualNode represents a newly defined AppMesh VirtualNode * * Any inbound traffic that your virtual node expects should be specified as a * listener. Any outbound traffic that your virtual node expects to reach @@ -245,6 +175,9 @@ export class VirtualNode extends VirtualNodeBase { */ public readonly mesh: IMesh; + private readonly backends = new Array(); + private readonly listeners = new Array(); + constructor(scope: Construct, id: string, props: VirtualNodeProps) { super(scope, id, { physicalName: props.virtualNodeName || cdk.Lazy.stringValue({ produce: () => cdk.Names.uniqueId(this) }), @@ -252,8 +185,8 @@ export class VirtualNode extends VirtualNodeBase { this.mesh = props.mesh; - this.addBackends(...props.backends || []); - this.addListeners(...props.listener ? [props.listener] : []); + props.backends?.forEach(backend => this.addBackend(backend)); + props.listeners?.forEach(listener => this.addListener(listener)); const accessLogging = props.accessLog?.bind(this); const node = new CfnVirtualNode(this, 'Resource', { @@ -261,7 +194,7 @@ export class VirtualNode extends VirtualNodeBase { meshName: this.mesh.meshName, spec: { backends: cdk.Lazy.anyValue({ produce: () => this.backends }, { omitEmptyArray: true }), - listeners: cdk.Lazy.anyValue({ produce: () => this.listeners }, { omitEmptyArray: true }), + listeners: cdk.Lazy.anyValue({ produce: () => this.listeners.map(listener => listener.listener) }, { omitEmptyArray: true }), serviceDiscovery: { dns: props.dnsHostName !== undefined ? { hostname: props.dnsHostName } : undefined, awsCloudMap: props.cloudMapService !== undefined ? { @@ -283,6 +216,24 @@ export class VirtualNode extends VirtualNodeBase { resourceName: this.physicalName, }); } + + /** + * Utility method to add an inbound listener for this VirtualNode + */ + public addListener(listener: VirtualNodeListener) { + this.listeners.push(listener.bind(this)); + } + + /** + * Add a Virtual Services that this node is expected to send outbound traffic to + */ + public addBackend(virtualService: IVirtualService) { + this.backends.push({ + virtualService: { + virtualServiceName: virtualService.virtualServiceName, + }, + }); + } } function renderAttributes(attrs?: {[key: string]: string}) { diff --git a/packages/@aws-cdk/aws-appmesh/package.json b/packages/@aws-cdk/aws-appmesh/package.json index 2789d9085284c..6b58c9981965a 100644 --- a/packages/@aws-cdk/aws-appmesh/package.json +++ b/packages/@aws-cdk/aws-appmesh/package.json @@ -153,6 +153,7 @@ "resource-attribute:@aws-cdk/aws-appmesh.VirtualGateway.virtualGatewayResourceOwner", "resource-attribute:@aws-cdk/aws-appmesh.VirtualGateway.virtualGatewayUid", "resource-attribute:@aws-cdk/aws-appmesh.VirtualNode.virtualNodeMeshName", + "duration-prop-type:@aws-cdk/aws-appmesh.VirtualNodeListener.timeout", "resource-attribute:@aws-cdk/aws-appmesh.VirtualNode.virtualNodeMeshOwner", "resource-attribute:@aws-cdk/aws-appmesh.VirtualNode.virtualNodeResourceOwner", "resource-attribute:@aws-cdk/aws-appmesh.VirtualNode.virtualNodeUid", @@ -172,7 +173,11 @@ "props-default-doc:@aws-cdk/aws-appmesh.VirtualRouterAttributes.virtualRouterName", "docs-public-apis:@aws-cdk/aws-appmesh.Protocol.HTTP", "docs-public-apis:@aws-cdk/aws-appmesh.Protocol.HTTP2", - "docs-public-apis:@aws-cdk/aws-appmesh.Protocol.GRPC" + "docs-public-apis:@aws-cdk/aws-appmesh.Protocol.GRPC", + "duration-prop-type:@aws-cdk/aws-appmesh.GrpcVirtualNodeListenerOptions.timeout", + "duration-prop-type:@aws-cdk/aws-appmesh.HttpVirtualNodeListenerOptions.timeout", + "duration-prop-type:@aws-cdk/aws-appmesh.Http2VirtualNodeListenerOptions.timeout", + "duration-prop-type:@aws-cdk/aws-appmesh.TcpVirtualNodeListenerOptions.timeout" ] }, "stability": "experimental", diff --git a/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts b/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts index 3de6eb20c77d2..8bad51d706a32 100644 --- a/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts +++ b/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts @@ -31,18 +31,18 @@ const virtualService = mesh.addVirtualService('service', { const node = mesh.addVirtualNode('node', { dnsHostName: `node1.${namespace.namespaceName}`, - listener: { + listeners: [appmesh.VirtualNodeListener.http({ healthCheck: { healthyThreshold: 3, path: '/check-path', }, - }, + })], backends: [ virtualService, ], }); -node.addBackends(new appmesh.VirtualService(stack, 'service-2', { +node.addBackend(new appmesh.VirtualService(stack, 'service-2', { virtualServiceName: 'service2.domain.local', mesh, }), @@ -60,7 +60,7 @@ router.addRoute('route-1', { const node2 = mesh.addVirtualNode('node2', { dnsHostName: `node2.${namespace.namespaceName}`, - listener: { + listeners: [appmesh.VirtualNodeListener.http({ healthCheck: { healthyThreshold: 3, interval: cdk.Duration.seconds(5), @@ -70,7 +70,7 @@ const node2 = mesh.addVirtualNode('node2', { timeout: cdk.Duration.seconds(2), unhealthyThreshold: 2, }, - }, + })], backends: [ new appmesh.VirtualService(stack, 'service-3', { virtualServiceName: 'service3.domain.local', @@ -81,7 +81,7 @@ const node2 = mesh.addVirtualNode('node2', { const node3 = mesh.addVirtualNode('node3', { dnsHostName: `node3.${namespace.namespaceName}`, - listener: { + listeners: [appmesh.VirtualNodeListener.http({ healthCheck: { healthyThreshold: 3, interval: cdk.Duration.seconds(5), @@ -91,7 +91,7 @@ const node3 = mesh.addVirtualNode('node3', { timeout: cdk.Duration.seconds(2), unhealthyThreshold: 2, }, - }, + })], accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout'), }); diff --git a/packages/@aws-cdk/aws-appmesh/test/test.health-check.ts b/packages/@aws-cdk/aws-appmesh/test/test.health-check.ts index 6f33658598efa..d65177a124b70 100644 --- a/packages/@aws-cdk/aws-appmesh/test/test.health-check.ts +++ b/packages/@aws-cdk/aws-appmesh/test/test.health-check.ts @@ -21,9 +21,9 @@ export = { const [min, max] = [5000, 300000]; // WHEN - const toThrow = (millis: number) => getNode(stack).addListeners({ + const toThrow = (millis: number) => getNode(stack).addListener(appmesh.VirtualNodeListener.http2({ healthCheck: { interval: cdk.Duration.millis(millis) }, - }); + })); // THEN test.doesNotThrow(() => toThrow(min)); @@ -40,9 +40,9 @@ export = { const [min, max] = [2000, 60000]; // WHEN - const toThrow = (millis: number) => getNode(stack).addListeners({ + const toThrow = (millis: number) => getNode(stack).addListener(appmesh.VirtualNodeListener.http2({ healthCheck: { timeout: cdk.Duration.millis(millis) }, - }); + })); // THEN test.doesNotThrow(() => toThrow(min)); @@ -59,9 +59,9 @@ export = { const [min, max] = [1, 65535]; // WHEN - const toThrow = (port: number) => getNode(stack).addListeners({ + const toThrow = (port: number) => getNode(stack).addListener(appmesh.VirtualNodeListener.http({ healthCheck: { port }, - }); + })); // THEN test.doesNotThrow(() => toThrow(min)); @@ -79,9 +79,9 @@ export = { const [min, max] = [2, 10]; // WHEN - const toThrow = (healthyThreshold: number) => getNode(stack).addListeners({ + const toThrow = (healthyThreshold: number) => getNode(stack).addListener(appmesh.VirtualNodeListener.http({ healthCheck: { healthyThreshold }, - }); + })); // THEN test.doesNotThrow(() => toThrow(min)); @@ -98,9 +98,9 @@ export = { const [min, max] = [2, 10]; // WHEN - const toThrow = (unhealthyThreshold: number) => getNode(stack).addListeners({ + const toThrow = (unhealthyThreshold: number) => getNode(stack).addListener(appmesh.VirtualNodeListener.http({ healthCheck: { unhealthyThreshold }, - }); + })); // THEN test.doesNotThrow(() => toThrow(min)); @@ -115,12 +115,12 @@ export = { const stack = new cdk.Stack(); // WHEN - const toThrow = (protocol: appmesh.Protocol) => getNode(stack).addListeners({ + const toThrow = (protocol: appmesh.Protocol) => getNode(stack).addListener(appmesh.VirtualNodeListener.http({ healthCheck: { protocol, path: '/', }, - }); + })); // THEN test.doesNotThrow(() => toThrow(appmesh.Protocol.HTTP)); @@ -134,12 +134,12 @@ export = { const stack = new cdk.Stack(); // WHEN - const toThrow = (protocol: appmesh.Protocol) => getNode(stack).addListeners({ + const toThrow = (protocol: appmesh.Protocol) => getNode(stack).addListener(appmesh.VirtualNodeListener.http({ healthCheck: { protocol, path: '/', }, - }); + })); // THEN test.doesNotThrow(() => toThrow(appmesh.Protocol.HTTP)); @@ -148,4 +148,4 @@ export = { test.done(); }, -}; +}; \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appmesh/test/test.mesh.ts b/packages/@aws-cdk/aws-appmesh/test/test.mesh.ts index 690dce4a08ddc..1f67c708e561a 100644 --- a/packages/@aws-cdk/aws-appmesh/test/test.mesh.ts +++ b/packages/@aws-cdk/aws-appmesh/test/test.mesh.ts @@ -57,7 +57,7 @@ export = { 'When adding a Virtual Router to existing mesh': { 'with at least one complete port mappings': { - 'shoulld create proper router'(test: Test) { + 'should create proper router'(test: Test) { // GIVEN const stack = new cdk.Stack(); @@ -208,12 +208,9 @@ export = { const node = mesh.addVirtualNode('test-node', { dnsHostName: 'test.domain.local', - listener: { - portMapping: { - port: 8080, - protocol: appmesh.Protocol.HTTP, - }, - }, + listeners: [appmesh.VirtualNodeListener.http({ + port: 8080, + })], }); mesh.addVirtualService('service2', { @@ -287,12 +284,9 @@ export = { mesh.addVirtualNode('test-node', { dnsHostName: 'test.domain.local', - listener: { - portMapping: { - port: 8080, - protocol: appmesh.Protocol.HTTP, - }, - }, + listeners: [appmesh.VirtualNodeListener.http({ + port: 8080, + })], }); // THEN @@ -329,11 +323,8 @@ export = { mesh.addVirtualNode('test-node', { dnsHostName: 'test.domain.local', - listener: { - portMapping: { - port: 8080, - protocol: appmesh.Protocol.HTTP, - }, + listeners: [appmesh.VirtualNodeListener.http({ + port: 8080, healthCheck: { healthyThreshold: 3, path: '/', @@ -341,7 +332,7 @@ export = { timeout: cdk.Duration.seconds(2), // min unhealthyThreshold: 2, }, - }, + })], }); // THEN @@ -388,12 +379,9 @@ export = { mesh.addVirtualNode('test-node', { dnsHostName: 'test.domain.local', - listener: { - portMapping: { - port: 8080, - protocol: appmesh.Protocol.HTTP, - }, - }, + listeners: [appmesh.VirtualNodeListener.http({ + port: 8080, + })], backends: [ service1, ], diff --git a/packages/@aws-cdk/aws-appmesh/test/test.virtual-node.ts b/packages/@aws-cdk/aws-appmesh/test/test.virtual-node.ts index 06928a4a25351..75c7d0579e71b 100644 --- a/packages/@aws-cdk/aws-appmesh/test/test.virtual-node.ts +++ b/packages/@aws-cdk/aws-appmesh/test/test.virtual-node.ts @@ -28,41 +28,39 @@ export = { const node = new appmesh.VirtualNode(stack, 'test-node', { mesh, dnsHostName: 'test', - listener: {}, backends: [service1], }); - node.addBackends(service2); + node.addBackend(service2); // THEN - expect(stack).to( - haveResourceLike('AWS::AppMesh::VirtualNode', { - Spec: { - Backends: [ - { - VirtualService: { - VirtualServiceName: { - 'Fn::GetAtt': ['service1A48078CF', 'VirtualServiceName'], - }, + expect(stack).to(haveResourceLike('AWS::AppMesh::VirtualNode', { + Spec: { + Backends: [ + { + VirtualService: { + VirtualServiceName: { + 'Fn::GetAtt': ['service1A48078CF', 'VirtualServiceName'], }, }, - { - VirtualService: { - VirtualServiceName: { - 'Fn::GetAtt': ['service27C65CF7D', 'VirtualServiceName'], - }, + }, + { + VirtualService: { + VirtualServiceName: { + 'Fn::GetAtt': ['service27C65CF7D', 'VirtualServiceName'], }, }, - ], - }, - }), - ); + }, + ], + }, + })); test.done(); }, }, + 'when a single portmapping is added': { - 'should add the portmapping to the resoource'(test: Test) { + 'should add the portmapping to the resource'(test: Test) { // GIVEN const stack = new cdk.Stack(); @@ -75,28 +73,184 @@ export = { dnsHostName: 'test', }); - node.addListeners({ - portMapping: { - port: 8081, - protocol: appmesh.Protocol.TCP, + node.addListener(appmesh.VirtualNodeListener.tcp({ + port: 8081, + })); + + // THEN + expect(stack).to(haveResourceLike('AWS::AppMesh::VirtualNode', { + Spec: { + Listeners: [ + { + PortMapping: { + Port: 8081, + Protocol: 'tcp', + }, + }, + ], }, + })); + + test.done(); + }, + }, + + 'when a listener is added with timeout': { + 'should add the listener timeout to the resource'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + const mesh = new appmesh.Mesh(stack, 'mesh', { + meshName: 'test-mesh', + }); + + new appmesh.VirtualNode(stack, 'test-node', { + mesh, + dnsHostName: 'test', + listeners: [appmesh.VirtualNodeListener.grpc({ + port: 80, + timeout: { + idle: cdk.Duration.seconds(10), + perRequest: cdk.Duration.seconds(10), + }, + })], }); // THEN - expect(stack).to( - haveResourceLike('AWS::AppMesh::VirtualNode', { - Spec: { - Listeners: [ - { - PortMapping: { - Port: 8081, - Protocol: 'tcp', + expect(stack).to(haveResourceLike('AWS::AppMesh::VirtualNode', { + Spec: { + Listeners: [ + { + PortMapping: { + Port: 80, + Protocol: 'grpc', + }, + Timeout: { + GRPC: { + Idle: { + Unit: 'ms', + Value: 10000, + }, + PerRequest: { + Unit: 'ms', + Value: 10000, + }, }, }, - ], - }, - }), - ); + }, + ], + }, + })); + + test.done(); + }, + }, + + 'when a listener is added with healthcheck ': { + 'should add a default listener healthcheck to the resource'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + const mesh = new appmesh.Mesh(stack, 'mesh', { + meshName: 'test-mesh', + }); + + new appmesh.VirtualNode(stack, 'test-node', { + mesh, + dnsHostName: 'test', + listeners: [appmesh.VirtualNodeListener.http2({ + port: 80, + healthCheck: {}, + timeout: { idle: cdk.Duration.seconds(10) }, + })], + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::AppMesh::VirtualNode', { + Spec: { + Listeners: [ + { + HealthCheck: { + HealthyThreshold: 2, + IntervalMillis: 5000, + Port: 80, + Protocol: 'http2', + TimeoutMillis: 2000, + UnhealthyThreshold: 2, + }, + PortMapping: { + Port: 80, + Protocol: 'http2', + }, + Timeout: { + HTTP2: { + Idle: { + Unit: 'ms', + Value: 10000, + }, + }, + }, + }, + ], + }, + })); + + test.done(); + }, + }, + + 'when a listener is added with healthcheck with user defined props': { + 'should add a listener healthcheck to the resource'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + const mesh = new appmesh.Mesh(stack, 'mesh', { + meshName: 'test-mesh', + }); + + const node = new appmesh.VirtualNode(stack, 'test-node', { + mesh, + dnsHostName: 'test', + }); + + node.addListener(appmesh.VirtualNodeListener.tcp({ + port: 80, + healthCheck: { timeout: cdk.Duration.seconds(3) }, + timeout: { idle: cdk.Duration.seconds(10) }, + })); + + // THEN + expect(stack).to(haveResourceLike('AWS::AppMesh::VirtualNode', { + Spec: { + Listeners: [ + { + HealthCheck: { + HealthyThreshold: 2, + IntervalMillis: 5000, + Port: 80, + Protocol: 'tcp', + TimeoutMillis: 3000, + UnhealthyThreshold: 2, + }, + PortMapping: { + Port: 80, + Protocol: 'tcp', + }, + Timeout: { + TCP: { + Idle: { + Unit: 'ms', + Value: 10000, + }, + }, + }, + }, + ], + }, + })); test.done(); }, diff --git a/packages/@aws-cdk/aws-appmesh/test/test.virtual-router.ts b/packages/@aws-cdk/aws-appmesh/test/test.virtual-router.ts index 72510c83c4de2..56960564d6981 100644 --- a/packages/@aws-cdk/aws-appmesh/test/test.virtual-router.ts +++ b/packages/@aws-cdk/aws-appmesh/test/test.virtual-router.ts @@ -106,13 +106,9 @@ export = { const node = mesh.addVirtualNode('test-node', { dnsHostName: 'test', - listener: { - portMapping: - { - port: 8080, - protocol: appmesh.Protocol.HTTP, - }, - }, + listeners: [appmesh.VirtualNodeListener.http({ + port: 8080, + })], backends: [service1], }); @@ -179,39 +175,27 @@ export = { const node = mesh.addVirtualNode('test-node', { dnsHostName: 'test', - listener: { - portMapping: - { - port: 8080, - protocol: appmesh.Protocol.HTTP, - }, - }, + listeners: [appmesh.VirtualNodeListener.http({ + port: 8080, + })], backends: [ service1, ], }); const node2 = mesh.addVirtualNode('test-node2', { dnsHostName: 'test', - listener: { - portMapping: - { - port: 8080, - protocol: appmesh.Protocol.HTTP, - }, - }, + listeners: [appmesh.VirtualNodeListener.http({ + port: 8080, + })], backends: [ service2, ], }); const node3 = mesh.addVirtualNode('test-node3', { dnsHostName: 'test', - listener: { - portMapping: - { - port: 8080, - protocol: appmesh.Protocol.HTTP, - }, - }, + listeners: [appmesh.VirtualNodeListener.http({ + port: 8080, + })], backends: [ service1, ], @@ -337,13 +321,9 @@ export = { const node = mesh.addVirtualNode('test-node', { dnsHostName: 'test', - listener: { - portMapping: - { - port: 8080, - protocol: appmesh.Protocol.HTTP, - }, - }, + listeners: [appmesh.VirtualNodeListener.http({ + port: 8080, + })], backends: [ service1, ], From 544e80274a307df9009798aed928b90faf4554dc Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Wed, 11 Nov 2020 19:35:24 +0000 Subject: [PATCH 115/314] chore: automatically add missing libraries to more packages (#11428) The `create-missing-packages` script currently adds new libraries to `decdk`; this change does the same for our other "mega" packages that need some kind of dependency on each new service construct library. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../build-tools/create-missing-libraries.ts | 28 +++++++++++++------ .../cloudformation-include/package.json | 4 +-- packages/aws-cdk-lib/package.json | 2 +- 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/packages/@aws-cdk/cfnspec/build-tools/create-missing-libraries.ts b/packages/@aws-cdk/cfnspec/build-tools/create-missing-libraries.ts index 2bf2b707b6a09..55863ee5f8e13 100644 --- a/packages/@aws-cdk/cfnspec/build-tools/create-missing-libraries.ts +++ b/packages/@aws-cdk/cfnspec/build-tools/create-missing-libraries.ts @@ -298,19 +298,31 @@ async function main() { await fs.copy(path.join(templateDir, file), path.join(packagePath, file)); } - // update decdk - const decdkPkgJsonPath = path.join(__dirname, '..', '..', '..', 'decdk', 'package.json'); - const decdkPkg = JSON.parse(await fs.readFile(decdkPkgJsonPath, 'utf8')); + await addDependencyToMegaPackage(path.join('@aws-cdk', 'cloudformation-include'), packageName, version, ['dependencies', 'peerDependencies']); + await addDependencyToMegaPackage('aws-cdk-lib', packageName, version, ['devDependencies']); + await addDependencyToMegaPackage('monocdk', packageName, version, ['devDependencies']); + await addDependencyToMegaPackage('decdk', packageName, version, ['dependencies']); + } +} + +/** + * A few of our packages (e.g., decdk, aws-cdk-lib) require a dependency on every service package. + * This automates adding the dependency (and peer dependency) to the package.json. + */ +async function addDependencyToMegaPackage(megaPackageName: string, packageName: string, version: string, dependencyTypes: string[]) { + const packageJsonPath = path.join(__dirname, '..', '..', '..', megaPackageName, 'package.json'); + const packageJson = JSON.parse(await fs.readFile(packageJsonPath, 'utf8')); + dependencyTypes.forEach(dependencyType => { const unorderedDeps = { - ...decdkPkg.dependencies, + ...packageJson[dependencyType], [packageName]: version, }; - decdkPkg.dependencies = {}; + packageJson[dependencyType] = {}; Object.keys(unorderedDeps).sort().forEach(k => { - decdkPkg.dependencies[k] = unorderedDeps[k]; + packageJson[dependencyType][k] = unorderedDeps[k]; }); - await fs.writeFile(decdkPkgJsonPath, JSON.stringify(decdkPkg, null, 2) + '\n'); - } + }); + await fs.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\n'); } main().catch(e => { diff --git a/packages/@aws-cdk/cloudformation-include/package.json b/packages/@aws-cdk/cloudformation-include/package.json index a62d181f8243a..787e999447b0c 100644 --- a/packages/@aws-cdk/cloudformation-include/package.json +++ b/packages/@aws-cdk/cloudformation-include/package.json @@ -144,10 +144,10 @@ "@aws-cdk/aws-iotsitewise": "0.0.0", "@aws-cdk/aws-iotthingsgraph": "0.0.0", "@aws-cdk/aws-ivs": "0.0.0", + "@aws-cdk/aws-kendra": "0.0.0", "@aws-cdk/aws-kinesis": "0.0.0", "@aws-cdk/aws-kinesisanalytics": "0.0.0", "@aws-cdk/aws-kinesisfirehose": "0.0.0", - "@aws-cdk/aws-kendra": "0.0.0", "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-lakeformation": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", @@ -276,7 +276,7 @@ "@aws-cdk/aws-iotevents": "0.0.0", "@aws-cdk/aws-iotsitewise": "0.0.0", "@aws-cdk/aws-iotthingsgraph": "0.0.0", - "@aws-cdk/aws-ivs": "@aws-cdk/aws-ivs", + "@aws-cdk/aws-ivs": "0.0.0", "@aws-cdk/aws-kendra": "0.0.0", "@aws-cdk/aws-kinesis": "0.0.0", "@aws-cdk/aws-kinesisanalytics": "0.0.0", diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index c1b5e38a89280..9ab275a5198ba 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -193,10 +193,10 @@ "@aws-cdk/aws-iotsitewise": "0.0.0", "@aws-cdk/aws-iotthingsgraph": "0.0.0", "@aws-cdk/aws-ivs": "0.0.0", + "@aws-cdk/aws-kendra": "0.0.0", "@aws-cdk/aws-kinesis": "0.0.0", "@aws-cdk/aws-kinesisanalytics": "0.0.0", "@aws-cdk/aws-kinesisfirehose": "0.0.0", - "@aws-cdk/aws-kendra": "0.0.0", "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-lakeformation": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", From 6967f7da3b072196f11cccc2cd1d34d8f2975598 Mon Sep 17 00:00:00 2001 From: Matt Simpson Date: Thu, 12 Nov 2020 09:04:11 +1300 Subject: [PATCH 116/314] docs(lamba-event-sources): Fix code example in README.md (#11411) Fix missing parenthesis in Kinesis code example ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-lambda-event-sources/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-lambda-event-sources/README.md b/packages/@aws-cdk/aws-lambda-event-sources/README.md index b1fec3c4c78a7..656d09f56f448 100644 --- a/packages/@aws-cdk/aws-lambda-event-sources/README.md +++ b/packages/@aws-cdk/aws-lambda-event-sources/README.md @@ -202,7 +202,7 @@ const stream = new kinesis.Stream(this, 'MyStream'); myFunction.addEventSource(new KinesisEventSource(stream, { batchSize: 100, // default startingPosition: lambda.StartingPosition.TRIM_HORIZON -}); +})); ``` ## Roadmap From 5f3d646d9b7709becb6a033aae01cb09f8604c86 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 11 Nov 2020 22:29:14 +0000 Subject: [PATCH 117/314] chore(deps): bump aws-sdk from 2.789.0 to 2.790.0 (#11432) Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.789.0 to 2.790.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.789.0...v2.790.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- .../aws-cloudfront-origins/package.json | 2 +- packages/@aws-cdk/aws-cloudfront/package.json | 2 +- packages/@aws-cdk/aws-cloudtrail/package.json | 2 +- packages/@aws-cdk/aws-codebuild/package.json | 2 +- packages/@aws-cdk/aws-codecommit/package.json | 2 +- packages/@aws-cdk/aws-dynamodb/package.json | 2 +- packages/@aws-cdk/aws-eks/package.json | 2 +- .../@aws-cdk/aws-events-targets/package.json | 2 +- packages/@aws-cdk/aws-logs/package.json | 2 +- packages/@aws-cdk/aws-route53/package.json | 2 +- packages/@aws-cdk/aws-sqs/package.json | 2 +- .../@aws-cdk/custom-resources/package.json | 2 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- yarn.lock | 100 ++---------------- 15 files changed, 20 insertions(+), 108 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudfront-origins/package.json b/packages/@aws-cdk/aws-cloudfront-origins/package.json index 06e954237cdf8..3a2f8da53bcee 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/package.json +++ b/packages/@aws-cdk/aws-cloudfront-origins/package.json @@ -72,7 +72,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.790.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "pkglint": "0.0.0" diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index 587776d1d4edb..cbe98e36ec2cb 100644 --- a/packages/@aws-cdk/aws-cloudfront/package.json +++ b/packages/@aws-cdk/aws-cloudfront/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.790.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index 3146f7f682988..265bc78a5133d 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.790.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codebuild/package.json b/packages/@aws-cdk/aws-codebuild/package.json index 001cec43f99fd..fd8384c9da842 100644 --- a/packages/@aws-cdk/aws-codebuild/package.json +++ b/packages/@aws-cdk/aws-codebuild/package.json @@ -79,7 +79,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.790.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codecommit/package.json b/packages/@aws-cdk/aws-codecommit/package.json index 53beb4f72810b..df66b2582f1e4 100644 --- a/packages/@aws-cdk/aws-codecommit/package.json +++ b/packages/@aws-cdk/aws-codecommit/package.json @@ -79,7 +79,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.790.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index d4de8e8e1d2a0..3ff3fa0d1a859 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -74,7 +74,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/jest": "^26.0.15", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.790.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index f23de775f4ba2..dcbb43dceb5cb 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", "@types/yaml": "1.9.6", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.790.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index c9d8e2fd475b9..a0ba41f0e6682 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -75,7 +75,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-codecommit": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.790.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index 9034ee8214849..b64ccc157d4f1 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.790.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-route53/package.json b/packages/@aws-cdk/aws-route53/package.json index c2ae9cfcb68b6..2d71393f32bd8 100644 --- a/packages/@aws-cdk/aws-route53/package.json +++ b/packages/@aws-cdk/aws-route53/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.790.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-sqs/package.json b/packages/@aws-cdk/aws-sqs/package.json index f1a5ee11d78bb..ccd18a54f2ac9 100644 --- a/packages/@aws-cdk/aws-sqs/package.json +++ b/packages/@aws-cdk/aws-sqs/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.790.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index b8942190103fe..cdae20b2b13e1 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -79,7 +79,7 @@ "@types/aws-lambda": "^8.10.64", "@types/fs-extra": "^8.1.1", "@types/sinon": "^9.0.8", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.790.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 375fe4b4f9ff6..dc7c21a9bd21e 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -71,7 +71,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.790.0", "camelcase": "^6.2.0", "cdk-assets": "0.0.0", "colors": "^1.4.0", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index 6d82300abeb4d..0359545c0768b 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -47,7 +47,7 @@ "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.790.0", "glob": "^7.1.6", "yargs": "^16.1.0" }, diff --git a/yarn.lock b/yarn.lock index d401cd2040c16..a0e71abdf5ee2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3575,11 +3575,6 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" -app-root-path@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.2.1.tgz#d0df4a682ee408273583d43f6f79e9892624bc9a" - integrity sha512-91IFKeKk7FjfmezPKkwtaRvSpnUc4gDwPAjA1YZ9Gn0q0PPeW+vbeUsZuyDwjI7+QTHhcLen2v25fi/AmhvbJA== - append-transform@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab" @@ -3847,10 +3842,10 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" -aws-sdk@^2.596.0, aws-sdk@^2.637.0, aws-sdk@^2.789.0: - version "2.789.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.789.0.tgz#a1b0a8b8b4227a7947c04e8d75239ba27d2deb93" - integrity sha512-Jqq+M4N0EgkyS4OPf05UHa7IWUcpuBdnpwMRgBnu4Ju6PxpOTh1UQcmYepVmIN3m6YVpLwFctEYzAMJFM3LT1A== +aws-sdk@^2.637.0, aws-sdk@^2.790.0: + version "2.790.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.790.0.tgz#0c01634e59ff2a761e889808bee26dfd1ea28a2d" + integrity sha512-L278KsE+g/LsXIjLhpdtbvMcEZzZ/5dTBLIh6VIcNF0z63xlnDJQ4IWTDZ3Op5fK9B6vwQxlPT7XD5+egu+qoA== dependencies: buffer "4.9.2" events "1.1.1" @@ -5965,21 +5960,11 @@ dotenv-expand@^5.1.0: resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-5.1.0.tgz#3fbaf020bfd794884072ea26b1e9791d45a629f0" integrity sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA== -dotenv-json@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/dotenv-json/-/dotenv-json-1.0.0.tgz#fc7f672aafea04bed33818733b9f94662332815c" - integrity sha512-jAssr+6r4nKhKRudQ0HOzMskOFFi9+ubXWwmrSGJFgTvpjyPXCXsCsYbjif6mXp7uxA7xY3/LGaiTQukZzSbOQ== - dotenv@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-7.0.0.tgz#a2be3cd52736673206e8a85fb5210eea29628e7c" integrity sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g== -dotenv@^8.0.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" - integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== - dotgitignore@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/dotgitignore/-/dotgitignore-2.1.0.tgz#a4b15a4e4ef3cf383598aaf1dfa4a04bcc089b7b" @@ -6249,11 +6234,6 @@ escodegen@^1.11.0, escodegen@^1.14.1, escodegen@^1.8.1: optionalDependencies: source-map "~0.6.1" -eslint-config-standard@^14.1.1: - version "14.1.1" - resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz#830a8e44e7aef7de67464979ad06b406026c56ea" - integrity sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg== - eslint-import-resolver-node@^0.3.4: version "0.3.4" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" @@ -6281,14 +6261,6 @@ eslint-module-utils@^2.6.0: debug "^2.6.9" pkg-dir "^2.0.0" -eslint-plugin-es@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893" - integrity sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ== - dependencies: - eslint-utils "^2.0.0" - regexpp "^3.0.0" - eslint-plugin-import@^2.22.1: version "2.22.1" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz#0896c7e6a0cf44109a2d97b95903c2bb689d7702" @@ -6308,33 +6280,11 @@ eslint-plugin-import@^2.22.1: resolve "^1.17.0" tsconfig-paths "^3.9.0" -eslint-plugin-node@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d" - integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g== - dependencies: - eslint-plugin-es "^3.0.0" - eslint-utils "^2.0.0" - ignore "^5.1.1" - minimatch "^3.0.4" - resolve "^1.10.1" - semver "^6.1.0" - -eslint-plugin-promise@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz#845fd8b2260ad8f82564c1222fce44ad71d9418a" - integrity sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw== - eslint-plugin-rulesdir@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/eslint-plugin-rulesdir/-/eslint-plugin-rulesdir-0.1.0.tgz#ad144d7e98464fda82963eff3fab331aecb2bf08" integrity sha1-rRRNfphGT9qClj7/P6szGuyyvwg= -eslint-plugin-standard@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.1.0.tgz#0c3bf3a67e853f8bbbc580fb4945fbf16f41b7c5" - integrity sha512-ZL7+QRixjTR6/528YNGyDotyffm5OQst/sGxKDwGb9Uqs4In5Egi4+jbobhqJoyoCM6/7v/1A5fhQ7ScMtDjaQ== - eslint-scope@^5.0.0, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -7646,7 +7596,7 @@ ignore@^4.0.3, ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.1.1, ignore@^5.1.4, ignore@^5.1.8: +ignore@^5.1.4, ignore@^5.1.8: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== @@ -7878,13 +7828,6 @@ is-core-module@^2.0.0: dependencies: has "^1.0.3" -is-core-module@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.1.0.tgz#a4cc031d9b1aca63eecbd18a650e13cb4eeab946" - integrity sha512-YcV7BgVMRFRua2FqQzKtTDMz8iCuLEyGKjr70q8Zm1yy2qKcurbFEd79PAdHV77oL3NrAaOVQIbMmiHQCHB7ZA== - dependencies: - has "^1.0.3" - is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -9061,24 +9004,6 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== -lambda-leak@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lambda-leak/-/lambda-leak-2.0.0.tgz#771985d3628487f6e885afae2b54510dcfb2cd7e" - integrity sha1-dxmF02KEh/boha+uK1RRDc+yzX4= - -lambda-tester@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/lambda-tester/-/lambda-tester-3.6.0.tgz#ceb7d4f4f0da768487a05cff37dcd088508b5247" - integrity sha512-F2ZTGWCLyIR95o/jWK46V/WnOCFAEUG/m/V7/CLhPJ7PCM+pror1rZ6ujP3TkItSGxUfpJi0kqwidw+M/nEqWw== - dependencies: - app-root-path "^2.2.1" - dotenv "^8.0.0" - dotenv-json "^1.0.0" - lambda-leak "^2.0.0" - semver "^6.1.1" - uuid "^3.3.2" - vandium-utils "^1.1.1" - lazystream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" @@ -12024,14 +11949,6 @@ resolve@^1.1.6, resolve@^1.10.0, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.13 dependencies: path-parse "^1.0.6" -resolve@^1.10.1: - version "1.19.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" - integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== - dependencies: - is-core-module "^2.1.0" - path-parse "^1.0.6" - resolve@^1.18.1: version "1.18.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.18.1.tgz#018fcb2c5b207d2a6424aee361c5a266da8f4130" @@ -12232,7 +12149,7 @@ semver@7.x, semver@^7.1.1, semver@^7.2.1, semver@^7.3.2: resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== -semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.2.0, semver@^6.3.0: +semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -13845,11 +13762,6 @@ validate-npm-package-name@^3.0.0: dependencies: builtins "^1.0.3" -vandium-utils@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/vandium-utils/-/vandium-utils-1.2.0.tgz#44735de4b7641a05de59ebe945f174e582db4f59" - integrity sha1-RHNd5LdkGgXeWevpRfF05YLbT1k= - vendors@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.4.tgz#e2b800a53e7a29b93506c3cf41100d16c4c4ad8e" From e5c2e589f2e4f5f1d680b7df9e5a2da5ade01780 Mon Sep 17 00:00:00 2001 From: Nathan Peck Date: Wed, 11 Nov 2020 18:06:03 -0500 Subject: [PATCH 118/314] chore(ecs-service-extensions): Promoting the ecs-service-extensions package to stable (#11431) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk-containers/ecs-service-extensions/README.md | 4 +--- .../@aws-cdk-containers/ecs-service-extensions/package.json | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/README.md b/packages/@aws-cdk-containers/ecs-service-extensions/README.md index 9302b90e5d9a3..cbca327f0ee12 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/README.md +++ b/packages/@aws-cdk-containers/ecs-service-extensions/README.md @@ -2,9 +2,7 @@ --- -![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) - -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/package.json b/packages/@aws-cdk-containers/ecs-service-extensions/package.json index 4b1da71dd86fe..e33dc561b65b8 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/package.json +++ b/packages/@aws-cdk-containers/ecs-service-extensions/package.json @@ -99,6 +99,6 @@ "awscdkio": { "announce": false }, - "maturity": "experimental", - "stability": "experimental" -} + "maturity": "stable", + "stability": "stable" +} \ No newline at end of file From cc28485fd6333377258d0506bcaa63fb79d1da19 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 12 Nov 2020 00:51:22 +0000 Subject: [PATCH 119/314] chore(deps-dev): bump parcel from 2.0.0-nightly.443 to 2.0.0-nightly.444 (#11435) Bumps [parcel](https://github.com/parcel-bundler/parcel) from 2.0.0-nightly.443 to 2.0.0-nightly.444. - [Release notes](https://github.com/parcel-bundler/parcel/releases) - [Changelog](https://github.com/parcel-bundler/parcel/blob/v2/CHANGELOG.md) - [Commits](https://github.com/parcel-bundler/parcel/commits) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- .../@aws-cdk/aws-lambda-nodejs/package.json | 2 +- yarn.lock | 920 +++++++++--------- 2 files changed, 461 insertions(+), 461 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda-nodejs/package.json b/packages/@aws-cdk/aws-lambda-nodejs/package.json index de6ea3d7b31a8..cf929a95db74c 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/package.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/package.json @@ -67,7 +67,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "delay": "4.4.0", - "parcel": "2.0.0-nightly.443", + "parcel": "2.0.0-nightly.444", "pkglint": "0.0.0" }, "dependencies": { diff --git a/yarn.lock b/yarn.lock index a0e71abdf5ee2..4dc926663112b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2159,128 +2159,128 @@ dependencies: "@types/node" ">= 8" -"@parcel/babel-ast-utils@2.0.0-nightly.2067+adb92ee0": - version "2.0.0-nightly.2067" - resolved "https://registry.yarnpkg.com/@parcel/babel-ast-utils/-/babel-ast-utils-2.0.0-nightly.2067.tgz#bbb65a31eb2531a8d8bec1416b5d0047a74b57ac" - integrity sha512-1oWLszHqibl9giNCzzwd9DVePmivPridrcOlX+txSAkuQ2FG0mVSutv25XturJ6g/B6z78pL2tNV/fdVjf6lkA== +"@parcel/babel-ast-utils@2.0.0-nightly.2068+3bfef282": + version "2.0.0-nightly.2068" + resolved "https://registry.yarnpkg.com/@parcel/babel-ast-utils/-/babel-ast-utils-2.0.0-nightly.2068.tgz#3671e1a2fecfd521414e992cbdd9a60552b3a174" + integrity sha512-5tAgLraq10c8GY7iInEUAQbxGigWAM6+X6K4L5hgns4pw6QgD5+XtDsAbQ4r5x6cHsxXDsPpJWtRPUNrVPBoyQ== dependencies: "@babel/generator" "^7.0.0" "@babel/parser" "^7.0.0" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" -"@parcel/babel-preset-env@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/babel-preset-env/-/babel-preset-env-2.0.0-nightly.445.tgz#93ecf8ed29179c99e5e6d7e1534fcfae7a72a73e" - integrity sha512-fkYiZocLAsEyjz50nibkVIHULP0hwV9K2Qjl+/tqA1WJYh6/TMb1/EsaQ4T1CTY+zVsCh3TgRY4a+WqQ+OCu/A== +"@parcel/babel-preset-env@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/babel-preset-env/-/babel-preset-env-2.0.0-nightly.446.tgz#2a2718e9245762b1444970571fb373e5e419db92" + integrity sha512-vW18hGRxSw/Lul9GFm5p6+yJt7OIW6opCSIakza7Ed/D+fgCmCtrb1v+B0phpB9CgK/Q19BXY3INemELF/1G+w== dependencies: "@babel/preset-env" "^7.4.0" semver "^5.4.1" -"@parcel/babylon-walk@2.0.0-nightly.2067+adb92ee0": - version "2.0.0-nightly.2067" - resolved "https://registry.yarnpkg.com/@parcel/babylon-walk/-/babylon-walk-2.0.0-nightly.2067.tgz#102349d4f52d8046868429cb70f5fd4fe544957e" - integrity sha512-PlFGav6fC8HIsA1pS7moWTWgXuwL4OI+xH50Wee5Dc0Q3KNmfyqCJpnhRhCJTGmVe8KGYEgXF6MNwrvjVWUCbg== +"@parcel/babylon-walk@2.0.0-nightly.2068+3bfef282": + version "2.0.0-nightly.2068" + resolved "https://registry.yarnpkg.com/@parcel/babylon-walk/-/babylon-walk-2.0.0-nightly.2068.tgz#4e825d931124c340c4031964236942b50093287c" + integrity sha512-f5jj0MRGMR78whdcDKIRQ5mmhv0mJCRcrTAUibYz7qzaAdZaVR5uOQ0N+AzSN4v5S2F4uw7AtwWph5YnWCJKcA== dependencies: "@babel/types" "^7.0.0" lodash.clone "^4.5.0" -"@parcel/bundler-default@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.0.0-nightly.445.tgz#bac962673e7ebe6c8314e5cab7e89f03a00fca77" - integrity sha512-v6zhPfvte103vtZkAUh4mJkVLCLvX9ZjI8p6ZP3fDSI1Y5F8akWe4LWXOo1ATMjfELcwbcb317rOAKgwvV6fiQ== +"@parcel/bundler-default@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.0.0-nightly.446.tgz#e993ed9904771d517bb1b574eab3f668883e9828" + integrity sha512-MWeDM2i9SY5qgbtogzPeaWmR0lgBH+jyYlEjzPPb5QLEB3vPBAZxLOp2s8d7EHy/nNHmKy22znzHg7lsftCkqg== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/diagnostic" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" nullthrows "^1.1.1" -"@parcel/cache@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/cache/-/cache-2.0.0-nightly.445.tgz#ade1c56a3b8064223b5b4004d0f3a76116290617" - integrity sha512-HhOkWCCNRs8zdKRyiWUiYI63BZc4MjrgFCiNv00KxyDCtDXtZrD5yjzRdVbVMmJvoth8iAtNoSCrJ2hGsouPBQ== +"@parcel/cache@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/cache/-/cache-2.0.0-nightly.446.tgz#0cbcd98dc7c2896bc190809ced9bdb1a159b7f3c" + integrity sha512-Hqs+tA7pFm4EekHAv+QxUvqhwXclbafqTTYZKf1FXC3erQmhXeMdXBcpEeP6yZjJ1ZM5FEqjK+L8LOTcHoriWQ== dependencies: - "@parcel/logger" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/logger" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" -"@parcel/codeframe@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/codeframe/-/codeframe-2.0.0-nightly.445.tgz#4a89d283e26a0e24eb91954e499ecd80cf4472a2" - integrity sha512-lptg9/JUko0GXe4dbG39w7sIVyOhT414qVem6mOC7P7Fy0Us7Qat23nAlWGLICZ4iYavOO44B9yIRbwUv/WB7g== +"@parcel/codeframe@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/codeframe/-/codeframe-2.0.0-nightly.446.tgz#c017240ad1868ef3d68a62510fe6c1795da40ba2" + integrity sha512-78jYfjl7qWIsltPUTfdvhzZCQtrP2e4IKiKItc3ToJgBIfkFnA0RT6EXKqlaecZQsJxsD/L5aNMpMVtCc70Zag== dependencies: chalk "^2.4.2" emphasize "^2.1.0" slice-ansi "^4.0.0" string-width "^4.2.0" -"@parcel/config-default@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/config-default/-/config-default-2.0.0-nightly.445.tgz#d48b91629ccf3b065702ce1b893fd7011a3cb494" - integrity sha512-v7l35yN+KYLzuzMEGxdHr8WSaTXhZlY7FQKeoZ7XupFRXAB2QsOyoIpm74LMkSsRLAWZ3JOQej3Ii79bbTvFHQ== - dependencies: - "@parcel/bundler-default" "2.0.0-nightly.445+adb92ee0" - "@parcel/namer-default" "2.0.0-nightly.445+adb92ee0" - "@parcel/optimizer-cssnano" "2.0.0-nightly.445+adb92ee0" - "@parcel/optimizer-data-url" "2.0.0-nightly.445+adb92ee0" - "@parcel/optimizer-htmlnano" "2.0.0-nightly.445+adb92ee0" - "@parcel/optimizer-terser" "2.0.0-nightly.445+adb92ee0" - "@parcel/packager-css" "2.0.0-nightly.445+adb92ee0" - "@parcel/packager-html" "2.0.0-nightly.445+adb92ee0" - "@parcel/packager-js" "2.0.0-nightly.445+adb92ee0" - "@parcel/packager-raw" "2.0.0-nightly.445+adb92ee0" - "@parcel/packager-raw-url" "2.0.0-nightly.2067+adb92ee0" - "@parcel/packager-ts" "2.0.0-nightly.445+adb92ee0" - "@parcel/reporter-bundle-analyzer" "2.0.0-nightly.2067+adb92ee0" - "@parcel/reporter-bundle-buddy" "2.0.0-nightly.2067+adb92ee0" - "@parcel/reporter-cli" "2.0.0-nightly.445+adb92ee0" - "@parcel/reporter-dev-server" "2.0.0-nightly.445+adb92ee0" - "@parcel/resolver-default" "2.0.0-nightly.445+adb92ee0" - "@parcel/runtime-browser-hmr" "2.0.0-nightly.445+adb92ee0" - "@parcel/runtime-js" "2.0.0-nightly.445+adb92ee0" - "@parcel/runtime-react-refresh" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-babel" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-coffeescript" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-css" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-glsl" "2.0.0-nightly.2067+adb92ee0" - "@parcel/transformer-graphql" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-html" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-image" "2.0.0-nightly.2067+adb92ee0" - "@parcel/transformer-inline-string" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-js" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-json" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-jsonld" "2.0.0-nightly.2067+adb92ee0" - "@parcel/transformer-less" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-mdx" "2.0.0-nightly.2067+adb92ee0" - "@parcel/transformer-postcss" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-posthtml" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-pug" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-raw" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-react-refresh-babel" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-react-refresh-wrap" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-sass" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-stylus" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-sugarss" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-toml" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-typescript-types" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-vue" "2.0.0-nightly.2067+adb92ee0" - "@parcel/transformer-yaml" "2.0.0-nightly.445+adb92ee0" - -"@parcel/core@2.0.0-nightly.443+adb92ee0": - version "2.0.0-nightly.443" - resolved "https://registry.yarnpkg.com/@parcel/core/-/core-2.0.0-nightly.443.tgz#2aadb331972f97738d74e1032d8894cdd7b08fa1" - integrity sha512-tjxlSYwrR4X4244PvdKYQslAQf1jqsBSjVtb19tD+5r/B+nmWrZtVe3/S1JEu8rFVt54TGsgifrO4RyOOlvqVA== - dependencies: - "@parcel/cache" "2.0.0-nightly.445+adb92ee0" - "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" - "@parcel/events" "2.0.0-nightly.445+adb92ee0" - "@parcel/fs" "2.0.0-nightly.445+adb92ee0" - "@parcel/logger" "2.0.0-nightly.445+adb92ee0" - "@parcel/package-manager" "2.0.0-nightly.445+adb92ee0" - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" +"@parcel/config-default@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/config-default/-/config-default-2.0.0-nightly.446.tgz#b0e51e62144add5da02e6ecd00ab7740b632f15b" + integrity sha512-VZPqQ1E43DxYzs5eYD9V/h4QtWLENaP6oOiFUtKDVRUftBfPXHP43TldKaIYHcKcWFTRTz16D3rrvzCw3DYGOw== + dependencies: + "@parcel/bundler-default" "2.0.0-nightly.446+3bfef282" + "@parcel/namer-default" "2.0.0-nightly.446+3bfef282" + "@parcel/optimizer-cssnano" "2.0.0-nightly.446+3bfef282" + "@parcel/optimizer-data-url" "2.0.0-nightly.446+3bfef282" + "@parcel/optimizer-htmlnano" "2.0.0-nightly.446+3bfef282" + "@parcel/optimizer-terser" "2.0.0-nightly.446+3bfef282" + "@parcel/packager-css" "2.0.0-nightly.446+3bfef282" + "@parcel/packager-html" "2.0.0-nightly.446+3bfef282" + "@parcel/packager-js" "2.0.0-nightly.446+3bfef282" + "@parcel/packager-raw" "2.0.0-nightly.446+3bfef282" + "@parcel/packager-raw-url" "2.0.0-nightly.2068+3bfef282" + "@parcel/packager-ts" "2.0.0-nightly.446+3bfef282" + "@parcel/reporter-bundle-analyzer" "2.0.0-nightly.2068+3bfef282" + "@parcel/reporter-bundle-buddy" "2.0.0-nightly.2068+3bfef282" + "@parcel/reporter-cli" "2.0.0-nightly.446+3bfef282" + "@parcel/reporter-dev-server" "2.0.0-nightly.446+3bfef282" + "@parcel/resolver-default" "2.0.0-nightly.446+3bfef282" + "@parcel/runtime-browser-hmr" "2.0.0-nightly.446+3bfef282" + "@parcel/runtime-js" "2.0.0-nightly.446+3bfef282" + "@parcel/runtime-react-refresh" "2.0.0-nightly.446+3bfef282" + "@parcel/transformer-babel" "2.0.0-nightly.446+3bfef282" + "@parcel/transformer-coffeescript" "2.0.0-nightly.446+3bfef282" + "@parcel/transformer-css" "2.0.0-nightly.446+3bfef282" + "@parcel/transformer-glsl" "2.0.0-nightly.2068+3bfef282" + "@parcel/transformer-graphql" "2.0.0-nightly.446+3bfef282" + "@parcel/transformer-html" "2.0.0-nightly.446+3bfef282" + "@parcel/transformer-image" "2.0.0-nightly.2068+3bfef282" + "@parcel/transformer-inline-string" "2.0.0-nightly.446+3bfef282" + "@parcel/transformer-js" "2.0.0-nightly.446+3bfef282" + "@parcel/transformer-json" "2.0.0-nightly.446+3bfef282" + "@parcel/transformer-jsonld" "2.0.0-nightly.2068+3bfef282" + "@parcel/transformer-less" "2.0.0-nightly.446+3bfef282" + "@parcel/transformer-mdx" "2.0.0-nightly.2068+3bfef282" + "@parcel/transformer-postcss" "2.0.0-nightly.446+3bfef282" + "@parcel/transformer-posthtml" "2.0.0-nightly.446+3bfef282" + "@parcel/transformer-pug" "2.0.0-nightly.446+3bfef282" + "@parcel/transformer-raw" "2.0.0-nightly.446+3bfef282" + "@parcel/transformer-react-refresh-babel" "2.0.0-nightly.446+3bfef282" + "@parcel/transformer-react-refresh-wrap" "2.0.0-nightly.446+3bfef282" + "@parcel/transformer-sass" "2.0.0-nightly.446+3bfef282" + "@parcel/transformer-stylus" "2.0.0-nightly.446+3bfef282" + "@parcel/transformer-sugarss" "2.0.0-nightly.446+3bfef282" + "@parcel/transformer-toml" "2.0.0-nightly.446+3bfef282" + "@parcel/transformer-typescript-types" "2.0.0-nightly.446+3bfef282" + "@parcel/transformer-vue" "2.0.0-nightly.2068+3bfef282" + "@parcel/transformer-yaml" "2.0.0-nightly.446+3bfef282" + +"@parcel/core@2.0.0-nightly.444+3bfef282": + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/@parcel/core/-/core-2.0.0-nightly.444.tgz#cc652b318155cd3d228583efc2a607a05910af3c" + integrity sha512-zAOBus2xVDOcOebHBOHW7MEX7nvDUfBKWe3dSvgSu71STHQOU7rDvl/jTOx9fJ5JsQ7rD87xIhEmzvLXCOdfgw== + dependencies: + "@parcel/cache" "2.0.0-nightly.446+3bfef282" + "@parcel/diagnostic" "2.0.0-nightly.446+3bfef282" + "@parcel/events" "2.0.0-nightly.446+3bfef282" + "@parcel/fs" "2.0.0-nightly.446+3bfef282" + "@parcel/logger" "2.0.0-nightly.446+3bfef282" + "@parcel/package-manager" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/types" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" - "@parcel/workers" "2.0.0-nightly.445+adb92ee0" + "@parcel/types" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/workers" "2.0.0-nightly.446+3bfef282" abortcontroller-polyfill "^1.1.9" base-x "^3.0.8" browserslist "^4.6.6" @@ -2294,72 +2294,72 @@ querystring "^0.2.0" semver "^5.4.1" -"@parcel/diagnostic@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/diagnostic/-/diagnostic-2.0.0-nightly.445.tgz#9ee4346683445c7e6c05695d0c1e105dbc4a81ce" - integrity sha512-uURmdKGPQn5ZGHzJbuPTnTYDFWzsYlt6SBysVU5/OGoWXDlsW7nQ+MU7rfIQl9D5pgFtC9G+orwSPvjDmBi83w== +"@parcel/diagnostic@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/diagnostic/-/diagnostic-2.0.0-nightly.446.tgz#f0c0136bc9bf7e45491fe5789f4463a2a7922658" + integrity sha512-NPJNcbO5D1rpdiD57AJy77CmqgODq+Adjvk8ntt8yD/jVpzUp1ju21Ql3HbsuHDT5XFu8xEh2xUYgwuUy9KGAg== dependencies: json-source-map "^0.6.1" nullthrows "^1.1.1" -"@parcel/events@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/events/-/events-2.0.0-nightly.445.tgz#f8c7b0ab75bc9c2676bb65c428780467378f31ee" - integrity sha512-4w1NoPtP4lAl2IC0B3dNKEJgukSSArdnd/+D33Y57S6C9Ninw6nTrEQtfePmoZqNVcmEk/ztSBxixn484NE+IA== +"@parcel/events@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/events/-/events-2.0.0-nightly.446.tgz#82557b5f067b0adf17a391f028012ab6f21d7866" + integrity sha512-yShzChGKaDscBBIKcyy6eXX3/vXjne3pYkcBE+26vXATcDLhZr7ntN/LvBsgJ+/4a40lszymkc06aKDusBhCEA== -"@parcel/fs-write-stream-atomic@2.0.0-nightly.2067+adb92ee0": - version "2.0.0-nightly.2067" - resolved "https://registry.yarnpkg.com/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.0-nightly.2067.tgz#e868a6d75e791f66477f9fbc6b65763c0cd9f16c" - integrity sha512-zIKF9CfZQPi7iwbHTaulTY2k8ZUcnSj4tVeHKrd2XiX+5yv7Q80Kuk5GbpcnMw/FxSubxNvHX/x7oxbtFCiXeA== +"@parcel/fs-write-stream-atomic@2.0.0-nightly.2068+3bfef282": + version "2.0.0-nightly.2068" + resolved "https://registry.yarnpkg.com/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.0-nightly.2068.tgz#a28e376bda170365665f681127715bc1b16b294e" + integrity sha512-HtBdsaMrXMOFzE+5k/Hsji4IGGmuVhvEBKBGjqFo5FYvrlaYsqT3fX7rFIxg5su4qFMMEZU24RI6IXVlFSoAKw== dependencies: graceful-fs "^4.1.2" iferr "^1.0.2" imurmurhash "^0.1.4" readable-stream "1 || 2" -"@parcel/fs@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-2.0.0-nightly.445.tgz#28bc385de0dc9ab7a776a0329fad92a33c5bc074" - integrity sha512-iQL/gAC7PfS8N1Vt6GZeb7b6zjtr0umEFlyC7uQ6lyV/Ln2syqTJWQ+OKCdpURdi2PY3dqzqD9OyNqVFpp5+IA== +"@parcel/fs@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-2.0.0-nightly.446.tgz#82cf51e6d48e207661ecb93a4847cf02d8f2a87f" + integrity sha512-K5k+j/DPG9EP0XOr2LJp0mQAodrpscIwSjWGMOvdEvGbY25FP4NB8Sg2Xs00KCaZVNlsKsrMpOsJyohP3ePpbg== dependencies: - "@parcel/fs-write-stream-atomic" "2.0.0-nightly.2067+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/fs-write-stream-atomic" "2.0.0-nightly.2068+3bfef282" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" "@parcel/watcher" "2.0.0-alpha.8" - "@parcel/workers" "2.0.0-nightly.445+adb92ee0" + "@parcel/workers" "2.0.0-nightly.446+3bfef282" graceful-fs "^4.2.4" mkdirp "^0.5.1" ncp "^2.0.0" nullthrows "^1.1.1" rimraf "^3.0.2" -"@parcel/logger@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-2.0.0-nightly.445.tgz#5085896f9f4cd398b94ce2956e74a497886825f6" - integrity sha512-AtTE3ciR/xrqDSaEqEBgFd0zhUK5mCq+G7tXYeCu71+OphnCo30vSVe9NhsoZmWHoFvtOjCZ0M9ECfTJzVXRuw== +"@parcel/logger@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-2.0.0-nightly.446.tgz#38e46be237872d57d8a240776a478e576285b6bd" + integrity sha512-q3/yovljZeYMWfG9/ThC0z8RwUDzKVvJaYislfVt1k/BGVrvBy8Z3M65iut4ub0hTzTSzZKLTwHwmYbPU+pquQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" - "@parcel/events" "2.0.0-nightly.445+adb92ee0" + "@parcel/diagnostic" "2.0.0-nightly.446+3bfef282" + "@parcel/events" "2.0.0-nightly.446+3bfef282" -"@parcel/markdown-ansi@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/markdown-ansi/-/markdown-ansi-2.0.0-nightly.445.tgz#5a271162f65e2a2a3c5de5a2a95999d72336c01e" - integrity sha512-CoVZYc5JsdQfsgt3BVlR9u+36I6EBAwQOo7y4iR4nNiF/MWb8s30PGLTNjykYxyNxBI92YfHl8RTMgyeGuHCqw== +"@parcel/markdown-ansi@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/markdown-ansi/-/markdown-ansi-2.0.0-nightly.446.tgz#23538d1116393ff15e0de85300a5ae2e1e2c5fd7" + integrity sha512-FHXlTFPq9Iu6kuTOjrs0qMNFQ8REFBE96kFuSeTQ5omcOHL6eNIBO9VCIxima2Cz+9pQSNXhNlaUAUVRPCXJ2Q== dependencies: chalk "^2.4.2" -"@parcel/namer-default@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/namer-default/-/namer-default-2.0.0-nightly.445.tgz#19bd7440ac7c9510cf8b321838e39e5549d83dfb" - integrity sha512-hsYj0OCkh8LSshTSuW6HKR6O0YbHTPJydZ+5+XrV5v87PDOp1QBLeuDCR6hporRqx7KWBp20PROWrrXgjcvJmQ== +"@parcel/namer-default@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/namer-default/-/namer-default-2.0.0-nightly.446.tgz#3c43cabff1ea6615af53454a32d1ab9ea0eb69e0" + integrity sha512-DmqpV/GpgjtQerbVSO3rOW3gT+AaxslJWPqa9diFbtAQSrnzbJcuENnaxJzKWyGLT7TgMFoG86iqTiIWFnqfNA== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/diagnostic" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" nullthrows "^1.1.1" -"@parcel/node-libs-browser@2.0.0-nightly.2067+adb92ee0": - version "2.0.0-nightly.2067" - resolved "https://registry.yarnpkg.com/@parcel/node-libs-browser/-/node-libs-browser-2.0.0-nightly.2067.tgz#8b6195a0013f2c4018d637bcd9de7b778aaf6e42" - integrity sha512-0Q5ZwBM3bZM3tYsMvh7SEc3iMc5d3AgSkn5MG6+rRbLnFP3dwRQws/2qpCghX9//2ifTa9jNwU7cSqlMdVN/Ng== +"@parcel/node-libs-browser@2.0.0-nightly.2068+3bfef282": + version "2.0.0-nightly.2068" + resolved "https://registry.yarnpkg.com/@parcel/node-libs-browser/-/node-libs-browser-2.0.0-nightly.2068.tgz#6178b587cdb236126b26a53bdbf4376b47bb4ebc" + integrity sha512-BNTYCeaBKyLUUeEaB4NNiV4b86VaJRcpzm1ykBpZRGsDSi4ts4KE1dzxJPm6Pe9N9NkMEXYdZX4VQA9CpxHXjA== dependencies: assert "^2.0.0" browserify-zlib "^0.2.0" @@ -2384,71 +2384,71 @@ util "^0.12.3" vm-browserify "^1.1.2" -"@parcel/node-resolver-core@2.0.0-nightly.2067+adb92ee0": - version "2.0.0-nightly.2067" - resolved "https://registry.yarnpkg.com/@parcel/node-resolver-core/-/node-resolver-core-2.0.0-nightly.2067.tgz#27b083414d0a6f4ec532c67441f4b844bffde5c7" - integrity sha512-pXh5flmV49zo25nhZPxDzeIdQmuUNCX5okXELQC7aCbbSInLHZNwCAks0PaGCMXo+Cx5nWtzRaC50URn2LnJVA== +"@parcel/node-resolver-core@2.0.0-nightly.2068+3bfef282": + version "2.0.0-nightly.2068" + resolved "https://registry.yarnpkg.com/@parcel/node-resolver-core/-/node-resolver-core-2.0.0-nightly.2068.tgz#98537a4242537ed93aa0b1489c1a0870e57b1c49" + integrity sha512-BKa43I/Xi1j8TGn0XjvsM+BKPZeaJS7oLTy8GgZlA2Fk8cf5JFUem/t2iulF51qEb4B/CDQWHu63sEoC1IxarQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" - "@parcel/node-libs-browser" "2.0.0-nightly.2067+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/diagnostic" "2.0.0-nightly.446+3bfef282" + "@parcel/node-libs-browser" "2.0.0-nightly.2068+3bfef282" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" micromatch "^3.0.4" nullthrows "^1.1.1" querystring "^0.2.0" -"@parcel/optimizer-cssnano@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.0.0-nightly.445.tgz#b4e3e8a42dfbbfee6f3e93bfa794ea575ee17f6f" - integrity sha512-jD4AEtloLMmEN2kJ7wGD+bN6krv/7MFifNSQTLSjuHR4X5yE68LYanUDiFwZFLoA5PS6IN0k2MPV5uQx5b/Iag== +"@parcel/optimizer-cssnano@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.0.0-nightly.446.tgz#73700f47036776d2b51fed6615468f1d9f05e3fc" + integrity sha512-pSqJFhnE3SjNhDmqbmEu5EPfMDY4Ghx2W6FSgAohk6FJy8wd4tS2ghlVavUHKOZopbcvAia3+OHJXqhl2K802w== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" "@parcel/source-map" "2.0.0-alpha.4.16" cssnano "^4.1.10" postcss "^8.0.5" -"@parcel/optimizer-data-url@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-data-url/-/optimizer-data-url-2.0.0-nightly.445.tgz#ecf601c69be85a343d4d7889048163c9b06f71da" - integrity sha512-6aCjXaEBHcMtr9u/7FBNRd0v2de27CdG+AKcDUopHOeT7algwlam59dvFQK/cGqTFYjuoTRQcEZaC3R6tmLqwg== +"@parcel/optimizer-data-url@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-data-url/-/optimizer-data-url-2.0.0-nightly.446.tgz#d2feaf6e7cf40c21aae8d00758113b43ea611f3a" + integrity sha512-dCAutIyY0+shiTGFUfpTKTnixOg13sgjz/AAml6/iJHKWYcp4rvW6ilzXX2egi529OmfQkYq1hBFPaAMk5fcDA== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" isbinaryfile "^4.0.2" mime "^2.4.4" -"@parcel/optimizer-htmlnano@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.0.0-nightly.445.tgz#d056a71c0f5e29a9a7c3103579a5cb977733fa2d" - integrity sha512-RiPJEStbZ4OtQYvTPd8KKuXANsgy86viA76u4mnadInupxsM+MRlxj/7eUt7t+kSqE/z6yoH1HTF69kpUgwXYw== +"@parcel/optimizer-htmlnano@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.0.0-nightly.446.tgz#fcd42db64dd9736470baebe844f27e4f294d885a" + integrity sha512-GeUEx5QTcxcvGrWVnVwSDbCgCaGqrQtvTVUndGaAJAYPnGzTzPZH3KzubD7WvBXYARXrrpjEvWCXmEN6hNsfSA== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" htmlnano "^0.2.2" nullthrows "^1.1.1" posthtml "^0.11.3" -"@parcel/optimizer-terser@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-terser/-/optimizer-terser-2.0.0-nightly.445.tgz#3e48db6cc5725151b6ef2ed12c65b904a2422bfb" - integrity sha512-DH+0UZCcFmeBEwLlY64ZZWyvoHi1bjVnKW7WLaRauHPBwrT3xGVkIa+hN7QHQ+E2t4jDCQd7IpfoswzBqGohvA== +"@parcel/optimizer-terser@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-terser/-/optimizer-terser-2.0.0-nightly.446.tgz#9282e0a168b9b76b0380cc5aa32192ec4a38a6a0" + integrity sha512-lZXKeZLCTwTWf9aerhpENr5edc1xz8FmEGnyRPyqaln3VF1dJW7lLp/cCENh+8KyXwKvyxroZuIU+zTrNO0UDQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/diagnostic" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" nullthrows "^1.1.1" terser "^5.2.0" -"@parcel/package-manager@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/package-manager/-/package-manager-2.0.0-nightly.445.tgz#5eaa68935f96ac11a92ccea99323aaa218f721b7" - integrity sha512-DhGslnPGIk/jd1DS5sNL3JLxk59GqvDn9Q+gAicB6QvKjF2Lq3GQLlnl6bi4bXetZwOYjdRBdaXikweJmKBs4A== +"@parcel/package-manager@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/package-manager/-/package-manager-2.0.0-nightly.446.tgz#56abd6a81be4a67e227bdc8ca1e49ff0bfb66eec" + integrity sha512-k0DD0AN2plk6NzwIIBWF+8uGxYWMp4kp9hfzE3ERmoLl6VKN77PEINCq2aGkcENhiXF4omO8u2A5K5Ns+I8QaA== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" - "@parcel/fs" "2.0.0-nightly.445+adb92ee0" - "@parcel/logger" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" - "@parcel/workers" "2.0.0-nightly.445+adb92ee0" + "@parcel/diagnostic" "2.0.0-nightly.446+3bfef282" + "@parcel/fs" "2.0.0-nightly.446+3bfef282" + "@parcel/logger" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/workers" "2.0.0-nightly.446+3bfef282" command-exists "^1.2.6" cross-spawn "^6.0.4" nullthrows "^1.1.1" @@ -2456,91 +2456,91 @@ semver "^5.4.1" split2 "^3.1.1" -"@parcel/packager-css@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/packager-css/-/packager-css-2.0.0-nightly.445.tgz#688c2f1c96bd698325d8765c7acf3ebb049027ef" - integrity sha512-p1V4yBeF3RSds/o0e8V+Qs4/z+rDY32yakgdzBBYAtSYhPIIXUNaZMw0/DWqq7ClALeM6Xs+UQwFtT95worcIA== +"@parcel/packager-css@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/packager-css/-/packager-css-2.0.0-nightly.446.tgz#88d745452695bc09eb7e32039d61b196a928ff83" + integrity sha512-3SXRjRx5DD9QlcrICHINAWMaDxB/5Ki33eT4camu/1xDblpTvFcv7hRgYj37d1fXbyebKSUBKEzaUDjAUcwxOA== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" -"@parcel/packager-html@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/packager-html/-/packager-html-2.0.0-nightly.445.tgz#53fd08f3c9bd838940441a5098c2f70ac04a5099" - integrity sha512-LwOJELmGXX0yT0///njuzEzHSygjMZMDuDcJLMnMoiyA5MivoYWeVU/MTZvorTU8dzZ61SqiUIS1NbjDORp4vg== +"@parcel/packager-html@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/packager-html/-/packager-html-2.0.0-nightly.446.tgz#a2d4f92b69e1b0580a37515629fb18bcab70bc8b" + integrity sha512-qhNs0fcvSTsA6kNpjQq4MZYWFjTQETpDIXL9YSlSwgTAUwa7UEvn3a3C0W2X2OpgXaM+zqj/WifLuZQjrY0Qpg== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/types" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/types" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" nullthrows "^1.1.1" posthtml "^0.11.3" -"@parcel/packager-js@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/packager-js/-/packager-js-2.0.0-nightly.445.tgz#7ce928ed783c924457395d1a1adc48e56490dda4" - integrity sha512-ePZzrgLJgZW+RUDiX/qZLDme2UmkIsFUr/4Rhdyc2S/QBMDAHcmBgXb61bavItw9CdzmyWdabqSx7jDr6RqzMw== +"@parcel/packager-js@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/packager-js/-/packager-js-2.0.0-nightly.446.tgz#2fa64b00dd946c14eb14c01cae9fea2fbb4c4b35" + integrity sha512-UN/J+xGh2uGamxVb5NRYlsfQUkUeEClo7Mzm+mj9OFjTEbCKc768qhTPf1X2cEG5WtrD5xxIToYTPbdArAB/nw== dependencies: "@babel/traverse" "^7.2.3" - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/scope-hoisting" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/scope-hoisting" "2.0.0-nightly.446+3bfef282" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" nullthrows "^1.1.1" -"@parcel/packager-raw-url@2.0.0-nightly.2067+adb92ee0": - version "2.0.0-nightly.2067" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw-url/-/packager-raw-url-2.0.0-nightly.2067.tgz#5b93d627266ae4bd859c00c19da21a67cad56549" - integrity sha512-bCcOOrNAx17tOXMI5PJ1FtjJYj/idZokjmmeHZzrOmOjvppbGTNsDW92EyL3iBzB4aX0l9Dn9MSwV52/tWCVRA== +"@parcel/packager-raw-url@2.0.0-nightly.2068+3bfef282": + version "2.0.0-nightly.2068" + resolved "https://registry.yarnpkg.com/@parcel/packager-raw-url/-/packager-raw-url-2.0.0-nightly.2068.tgz#7359309410e1115ad820df0c33d3e45fbad8f8ad" + integrity sha512-nQfoCPewW57EjQRvHXXVhBqpU3qo8r4cpSmltKDb+7Mdb9KctYMy7AdO/bipXdIgvqk8H3k/KRvmhSi17MLBcw== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" -"@parcel/packager-raw@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw/-/packager-raw-2.0.0-nightly.445.tgz#a02bda8f218a03bcca9660e88f14e91e48c1830e" - integrity sha512-ZxZoWc9+5Bs+FXD6Kw2EP3DRp6F+Ya3qq4R2Jd+9EjjnfuH8leYOKwPghUio/G+AkSQEeOmBYgjhsE18o8ZpvA== +"@parcel/packager-raw@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/packager-raw/-/packager-raw-2.0.0-nightly.446.tgz#0d07aa9d453a5d00d2ead0e0a63bfe464b68c911" + integrity sha512-YrUwZDap0iwWYEvu2wYPp9gZw9eggnAt0r46s1+KvTWdSdJaB1M1Ctm+sF3BQvPuzvT3li69idVeMFA2T1Zodw== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" -"@parcel/packager-ts@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/packager-ts/-/packager-ts-2.0.0-nightly.445.tgz#04110a5ade9682fe90b26f6f547ff0da47f50af4" - integrity sha512-adNSvw8A736QEhjI7quvo5RzZOZW3Q14d/vmP86qx1nBrCSeHy/MFl/CyjeebQpJuZeGXnoiIHX8aWhz96kshQ== +"@parcel/packager-ts@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/packager-ts/-/packager-ts-2.0.0-nightly.446.tgz#2f062227ee2e436c5a51a463a9d94c6358f34a04" + integrity sha512-DdCaZk8kZpzdAIIbxoHia5ga8swe535lYiuAbrbKBB4O1lmzXAtDy3ko3yV4rSPjTDG49PAQD26r5Q8pVApZ2Q== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" -"@parcel/plugin@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/plugin/-/plugin-2.0.0-nightly.445.tgz#c9f5a2ed3ad214d78744d761d4c3301ab2ff9fa2" - integrity sha512-qxcX+BiKRdHyCYTpEjjMOzjzLjpZmhdXdmL6PwAESg0PjqA7KCx1pL6zVJHaR68mQ/WBXE2lX7hl++Nfg2vtbw== +"@parcel/plugin@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/plugin/-/plugin-2.0.0-nightly.446.tgz#7881c9a01a9641a0113925a6ec5e86ca7d7b115f" + integrity sha512-Rzi7MH5EeanlWdssuWXUx3wztdh1TApOFAP+XHDft+sBhlhdcuazywGyk6vzILAr1hIdKxO5DkUxnHR9Db1biQ== dependencies: - "@parcel/types" "2.0.0-nightly.445+adb92ee0" + "@parcel/types" "2.0.0-nightly.446+3bfef282" -"@parcel/reporter-bundle-analyzer@2.0.0-nightly.2067+adb92ee0": - version "2.0.0-nightly.2067" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.0.0-nightly.2067.tgz#ddf3984b2e088d33b2332c6e8b07b8286172e74c" - integrity sha512-GitRUuMGk4cf2Jais2mSVNUH2R3hmojCUMS9zrxmK9zu+W9Okl1V4yhEX6NbwSmuzKXEUOU2utMlqUYN12z1dg== +"@parcel/reporter-bundle-analyzer@2.0.0-nightly.2068+3bfef282": + version "2.0.0-nightly.2068" + resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.0.0-nightly.2068.tgz#cfd47198f4e608812c6aa06be26b0a41657a8c9b" + integrity sha512-rG2UhcbCQ/F32FzEGX/CnD0kNGz5+cUn9ZAZoQJgn6Rrsafv2Edh6TGWtRK4znj8l77h4E0Rc/yYMqfFzKCdCQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" nullthrows "^1.1.1" -"@parcel/reporter-bundle-buddy@2.0.0-nightly.2067+adb92ee0": - version "2.0.0-nightly.2067" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-buddy/-/reporter-bundle-buddy-2.0.0-nightly.2067.tgz#38e05ca74d0c8c342a7269dc1a1bb65c064599d8" - integrity sha512-DEazr+ZzSTnDoP/kOamsPmD77IqwE8Fbp/HvDIDA4DQvkobxHLIt0w0Qr8lJ2tAgwzLRuAxA6UAHOvX6qVB1IQ== +"@parcel/reporter-bundle-buddy@2.0.0-nightly.2068+3bfef282": + version "2.0.0-nightly.2068" + resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-buddy/-/reporter-bundle-buddy-2.0.0-nightly.2068.tgz#dabae907e36fedc14218644b7bdd42a25cffc983" + integrity sha512-GrF0CXwmsB/T8jafDeMpEmOfaab6/YVe+JPsBGcvz7qlLUhtw7+Os4yhFyC9fkHDEHQxEGE1s5aeKGIvEQ0URg== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" -"@parcel/reporter-cli@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/reporter-cli/-/reporter-cli-2.0.0-nightly.445.tgz#135ad99e1568ec2534d1d4553857b241537a6b9b" - integrity sha512-88oGRxN2Eimi3BqzEHb1fdITCh0XPRHf79EFxY7jUoxJobJwBIu967BzG+yy7NvARgYkm8aBa9+f+KyASrXPpw== +"@parcel/reporter-cli@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/reporter-cli/-/reporter-cli-2.0.0-nightly.446.tgz#7a8259fcbefebf1e62090938e3bd83f6aed0e9ff" + integrity sha512-aVTDkX5ID8pcSqjm+soA2urRgkpsraMC37k6dAKqO4IZQFyrOr1J8ZSTFboZkJpls4A3msdd6aKkpNSAniSpzQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/types" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/types" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" chalk "^3.0.0" filesize "^3.6.0" nullthrows "^1.1.1" @@ -2549,13 +2549,13 @@ strip-ansi "^6.0.0" term-size "^2.1.1" -"@parcel/reporter-dev-server@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/reporter-dev-server/-/reporter-dev-server-2.0.0-nightly.445.tgz#45b7d8d2bcf17609e4542e5c7b6872fa5aa15189" - integrity sha512-mYJ+t9KMCA52AaYvg0dxIMqdSZbnckxxunIM/uPe+J7Nd71ImfSNMv7K/xVx67RrSm/YD0gSgbGI4yfWX2/kGQ== +"@parcel/reporter-dev-server@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/reporter-dev-server/-/reporter-dev-server-2.0.0-nightly.446.tgz#675b4f68be8841e9c5b7806bf08905c2bed8f01c" + integrity sha512-/KF1QiNtEbwlCFl6+1hQNznKyt0npwvfgreo9ZJEgX9IWj04Sbdz0JhaPjESq5+3Kb/e3N94RZWc7+pysdgEYg== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" connect "^3.7.0" ejs "^2.6.1" http-proxy-middleware "^1.0.0" @@ -2563,54 +2563,54 @@ serve-handler "^6.0.0" ws "^6.2.0" -"@parcel/resolver-default@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/resolver-default/-/resolver-default-2.0.0-nightly.445.tgz#3aeff1e04f6005f019e93304ffbf29e01e38903a" - integrity sha512-A5hpAqtvFeA4AifeMSRBvUuJcKI5AnXotPXJ+ZoP6H8GjRcUbdkGSpObc+B6W4ZmMuYEtojGSHFA+eHcyVgQsg== +"@parcel/resolver-default@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/resolver-default/-/resolver-default-2.0.0-nightly.446.tgz#527780f91fd932e1a62d0e5742edf777ff046719" + integrity sha512-8ECX0H4g0KvEjgtnpP2BPNl+Ios0FEqUeg8/6pntsVKbFlKT6mfVsTwH2iXVq/96qCBfn/kuZUlKONrIzXbQ8A== dependencies: - "@parcel/node-resolver-core" "2.0.0-nightly.2067+adb92ee0" - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/node-resolver-core" "2.0.0-nightly.2068+3bfef282" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" -"@parcel/runtime-browser-hmr@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.0.0-nightly.445.tgz#04f2863e4a82a16a3f31f69535757d0077418899" - integrity sha512-kqUdNGh0oxHOM8UcMzxXW6EiDq6rSaAR3TGXam+HcLPyid9U5rPGUn0+476vtoiwH/mOrjKXRWEZJ0DsdfhnFw== +"@parcel/runtime-browser-hmr@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.0.0-nightly.446.tgz#8ae59b67cedbdf6070d98967ca1de44259192823" + integrity sha512-J4kfVfbmfVugL66Ttl1Ma9iCbY11cXEu3TzMg6SWxps2RV33gTBOhrkZ4b0BMKL7M5rHF9++DZkUpB2t1PJq3Q== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" -"@parcel/runtime-js@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/runtime-js/-/runtime-js-2.0.0-nightly.445.tgz#da86efc2f7c05ce0b6fd1f2d7c7935434f088b9c" - integrity sha512-/8HEZVm9Kc/mXM/wS3vyQxU3XLwKq/zEMiX8dKmWIrgFyqHBnKg06Xru1665mj1vhgpw1Viwr5DfrdjYVbuVVg== +"@parcel/runtime-js@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/runtime-js/-/runtime-js-2.0.0-nightly.446.tgz#39a93aec6c2e3d5f72b6391ab1e199c8bf86e112" + integrity sha512-R9BbQliTU09WR+r0Py2iPuaPvq3wyyl6LWVVM0RB0Ccn1QuVOEwng3Nk7Vn6wTLejARsgLs2koVHln35pX1JGg== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" nullthrows "^1.1.1" -"@parcel/runtime-react-refresh@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.0.0-nightly.445.tgz#ef0edf335e69c0c659213de7445242373fa62390" - integrity sha512-4V8Hf3XumyPcfKRehf8/3mfTZduuWWN/tz+A4fh/9WRh9u6Hz1ozAbTjS/fpd78HnzK5BUIglUkvMyD5inhxoQ== +"@parcel/runtime-react-refresh@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.0.0-nightly.446.tgz#5666360f5dba7db41716d5199ce40a438aeb394f" + integrity sha512-wXKmWbdFmlER3NHqoM8Rh+ObfAUNQZOMIxMWjVZE9W6bcRdfId4bGv5APHgn2Aed56oPKjbC2FOx3UYThCJOwQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" react-refresh "^0.9.0" -"@parcel/scope-hoisting@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/scope-hoisting/-/scope-hoisting-2.0.0-nightly.445.tgz#bfe8f3bc4b5020e71df0d5845944c00136783277" - integrity sha512-+S9Ud91ONAQzG/F6LTOyrZwNGXeT394vrI6/FqAtVVqnHWZXK6JmN26kPnou+8SB8oxkMbzGhMxzoft7mORQVQ== +"@parcel/scope-hoisting@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/scope-hoisting/-/scope-hoisting-2.0.0-nightly.446.tgz#f350b4650b84af0ede793fbc280ee48039b6de00" + integrity sha512-mmT7WqSEIRXYP4ChHai0fEXqofruAEQTWC9GwwEPE2iFjTgpGmF0NQW9H+PG/RQkeCbzG6rdYAZlIlJkhvuXKg== dependencies: "@babel/generator" "^7.3.3" "@babel/parser" "^7.0.0" "@babel/template" "^7.4.0" "@babel/traverse" "^7.2.3" "@babel/types" "^7.3.3" - "@parcel/babel-ast-utils" "2.0.0-nightly.2067+adb92ee0" - "@parcel/babylon-walk" "2.0.0-nightly.2067+adb92ee0" - "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" + "@parcel/babel-ast-utils" "2.0.0-nightly.2068+3bfef282" + "@parcel/babylon-walk" "2.0.0-nightly.2068+3bfef282" + "@parcel/diagnostic" "2.0.0-nightly.446+3bfef282" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" nullthrows "^1.1.1" "@parcel/source-map@2.0.0-alpha.4.16": @@ -2621,10 +2621,10 @@ node-addon-api "^3.0.0" node-gyp-build "^4.2.2" -"@parcel/transformer-babel@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-babel/-/transformer-babel-2.0.0-nightly.445.tgz#b12affbcd5df92597d91e8d404698fd7add574b0" - integrity sha512-+vf48c1BLe/4GAz7XXARc9+O92yhQVELmmFOX5uV1dnNy1bdSg6Ek7Ln/uHe3iabcMJF4YbYKBKXJMWiUdalWw== +"@parcel/transformer-babel@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/transformer-babel/-/transformer-babel-2.0.0-nightly.446.tgz#778dd03df21206e23032cafa867e67f362c74240" + integrity sha512-CB5qQZZl0YA+vqnRQq+5huVhWDEe2xd6BNSz8U6K55ez/O9PRSaRosxRkkVIcQJr2jGAI7YTXC4zC3relcvMWA== dependencies: "@babel/core" "^7.0.0" "@babel/generator" "^7.0.0" @@ -2634,85 +2634,85 @@ "@babel/preset-env" "^7.0.0" "@babel/preset-react" "^7.0.0" "@babel/traverse" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2067+adb92ee0" - "@parcel/babel-preset-env" "2.0.0-nightly.445+adb92ee0" - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/babel-ast-utils" "2.0.0-nightly.2068+3bfef282" + "@parcel/babel-preset-env" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" browserslist "^4.6.6" core-js "^3.2.1" nullthrows "^1.1.1" semver "^5.7.0" -"@parcel/transformer-coffeescript@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-coffeescript/-/transformer-coffeescript-2.0.0-nightly.445.tgz#b109291ec5d289cc3c02b3897aef64cb00a43358" - integrity sha512-81z83poTX4ZsoA7QnW0RqIsP7WXHsIz9X3+IXW78Gm12lmgXOXGD/cSY6QtlBi4oqFxtiE9gVgEWety4j8qcgw== +"@parcel/transformer-coffeescript@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/transformer-coffeescript/-/transformer-coffeescript-2.0.0-nightly.446.tgz#9315acf80e8a41726b0e8a9f7569e85895902a27" + integrity sha512-yJI5LvN9pVAv474Oz0OqbezegSzi+USMk7KLv9s7f+lCz870hoGXoxSX3u1WIvYT4j3VXblwDd895nBZ5KfV9g== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" coffeescript "^2.0.3" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-css@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-css/-/transformer-css-2.0.0-nightly.445.tgz#5c443563ae8e005af6be424b0de9ec5f81560ed6" - integrity sha512-g0tCf/U5PDVjbttEfS0OipXYkcJ9AgibkWt4K4BtP8q6t+lctB71eyinHamcNHFJoi/mKW0EzlObBER9pIV+4w== +"@parcel/transformer-css@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/transformer-css/-/transformer-css-2.0.0-nightly.446.tgz#5a904695c6f11bc68decfa06a5243b4582c484d1" + integrity sha512-mT6LJExHLeon7OXwfKpcxz1ATl1dsuAKYlDMo6F4pU82FcxdMFZD7dLUmvvsQ7rG43/ZPMermR5xlNPjfed+pA== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" postcss "^8.0.5" postcss-value-parser "^4.1.0" semver "^5.4.1" -"@parcel/transformer-glsl@2.0.0-nightly.2067+adb92ee0": - version "2.0.0-nightly.2067" - resolved "https://registry.yarnpkg.com/@parcel/transformer-glsl/-/transformer-glsl-2.0.0-nightly.2067.tgz#11599d0f5804e1503f8e28e750b260c8bbc08cd1" - integrity sha512-IG0dggCM8R3EycMmMgT3BAhtIENfLf2FsaMGFlTiKcF71IXn9JPLjjbx+Yn5yASJyAHP0dWgycw4xCjrxxg5yA== +"@parcel/transformer-glsl@2.0.0-nightly.2068+3bfef282": + version "2.0.0-nightly.2068" + resolved "https://registry.yarnpkg.com/@parcel/transformer-glsl/-/transformer-glsl-2.0.0-nightly.2068.tgz#55fce558f9b1ce40ed16a76c0f96b52088fc2ef0" + integrity sha512-Azf/840wQ/6R1uJV05+QxywA6cUdBDaqa9tU+LPNhonfvX1Cg8RyUMW3Guzs/Jrchuv1dW/YSDLFnNw5k6cepg== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" -"@parcel/transformer-graphql@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-graphql/-/transformer-graphql-2.0.0-nightly.445.tgz#fe311396f080a605810625fcaaa5a2238c2a74f6" - integrity sha512-i+lkzhzUp7DAOZeCWZbsa83+abzLRmijxMYVkMRKer8yaDNDlcqWfCVbzAcVFBI/wc6/mQ2nA/1erhePjqwfTA== +"@parcel/transformer-graphql@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/transformer-graphql/-/transformer-graphql-2.0.0-nightly.446.tgz#344270a83f7ccce671bf76ec2062df8430b5f74e" + integrity sha512-UrpBUzhnainKKUqauDAR1C7g5D6tHHNSz+226ZfoNJEVKCJ0C+dMH492yk4UqIU4PcPKCR6zRJCNA353G7x2NA== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" -"@parcel/transformer-html@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-html/-/transformer-html-2.0.0-nightly.445.tgz#561136797d7c6c476ab607f881dab34ca1b89d9e" - integrity sha512-sL1clzjug9xs25HN8VKyUnxKc1/wDfa9GBZNPUN7cysmbCCWGvPNiYd7LWp8EihMj+vEbyZ27rMF/hz6iN77UA== +"@parcel/transformer-html@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/transformer-html/-/transformer-html-2.0.0-nightly.446.tgz#ab9f94effe5e16ad3eaa0744440525ed92b33f96" + integrity sha512-5PIuqRj+CbqVeLFfSwbmaaDD6seRypNmp1A/+qxVgmz8ya/Wt7XwEHTT+4Mw2OAJykWl12Adp9qoRpWJCa20fw== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" nullthrows "^1.1.1" posthtml "^0.11.3" posthtml-parser "^0.4.1" posthtml-render "^1.1.5" semver "^5.4.1" -"@parcel/transformer-image@2.0.0-nightly.2067+adb92ee0": - version "2.0.0-nightly.2067" - resolved "https://registry.yarnpkg.com/@parcel/transformer-image/-/transformer-image-2.0.0-nightly.2067.tgz#2ed9c82340861742466235e3adef342f61b2c553" - integrity sha512-9b/539/IUMu/JAAzrwRP+1rZ5c1jcrobOY3hfT6gPc9dYsZPg6GAI5Zgri8k+D769Y/nxVzT3wHjx4asjOTy1g== +"@parcel/transformer-image@2.0.0-nightly.2068+3bfef282": + version "2.0.0-nightly.2068" + resolved "https://registry.yarnpkg.com/@parcel/transformer-image/-/transformer-image-2.0.0-nightly.2068.tgz#bc41cf314cb20639014c264c194f84cc1a056481" + integrity sha512-BFYM4eFn75RzSNt4t6Pmj33q6rcNypH+iExB5do1EB0Xv8he/s9O1ujO5nCy5AKJVdrR42ABjIR5/pl30ZRpLQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" -"@parcel/transformer-inline-string@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.0.0-nightly.445.tgz#4646777d25bad1964ceef442d45e2d1701a31d25" - integrity sha512-5q4+7gMhDMDXZrrDFGc7BSAr59bE9Mh6lYfqF4pPK70Gr5L5+ntUMGtscySnRl7IoIMd2T59SuHWZjxHdfNWHg== +"@parcel/transformer-inline-string@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.0.0-nightly.446.tgz#bcfbbbec8544a0c6c3a90a1cb05067ae5d0890a6" + integrity sha512-d7H1kxB7Qy0MW5tYnTjzA3dNpCaxNUSQjJqvWvBpYwn9vct0PzS/YHM3b36tku76p5mk7+YP4ZxC2aT6i3yq+g== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" -"@parcel/transformer-js@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.0.0-nightly.445.tgz#8fbae7bfb3b2a9a76a47219dcafd38948e4311c1" - integrity sha512-6/FN3GyBJAAsI5qR5rL1GNxdRCvnQli4p3lGvT2CGQZvy6FpScSw4KrtAKUzcGSTuJJM7P1fXkN0RYeR5RpD8w== +"@parcel/transformer-js@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.0.0-nightly.446.tgz#60af6368f0df6af66e0c9164567dfa9548f8143d" + integrity sha512-jO1dFhOHgwEb4nZ1lpBikPmM/3Nm/GXaqj3MbdTM3y8pSTGMUaLNZpzjJeL3NC8Ykqk1fjKA6cyLqjPlTPoisQ== dependencies: "@babel/core" "^7.0.0" "@babel/generator" "^7.0.0" @@ -2721,193 +2721,193 @@ "@babel/template" "^7.4.0" "@babel/traverse" "^7.0.0" "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2067+adb92ee0" - "@parcel/babylon-walk" "2.0.0-nightly.2067+adb92ee0" - "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/scope-hoisting" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/babel-ast-utils" "2.0.0-nightly.2068+3bfef282" + "@parcel/babylon-walk" "2.0.0-nightly.2068+3bfef282" + "@parcel/diagnostic" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/scope-hoisting" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" micromatch "^4.0.2" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-json@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-json/-/transformer-json-2.0.0-nightly.445.tgz#7a2218d38d392ef125f938c6093f7ef89d6fcda6" - integrity sha512-skEW2uwFs3NYSv56Nwa16rqKVnApYHbMrjv2DnuiNhlY3JP+f03aTvdYxtvoB8aQni5HzMUm68aRnBH+rEqypg== +"@parcel/transformer-json@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/transformer-json/-/transformer-json-2.0.0-nightly.446.tgz#63461c5537cf0b31edad814146ef397d48dbb570" + integrity sha512-xpyd+astuEqJG23oZzOCJCUd/UnqOPqKgeJ1YgZ7wxc42a8uQE/iObG+WT5HKlqxBOlBu9jEfJZug+fxWKkRGA== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" json5 "^2.1.0" -"@parcel/transformer-jsonld@2.0.0-nightly.2067+adb92ee0": - version "2.0.0-nightly.2067" - resolved "https://registry.yarnpkg.com/@parcel/transformer-jsonld/-/transformer-jsonld-2.0.0-nightly.2067.tgz#b45351918734cd1b8a39ebae224bdc29db47bd9b" - integrity sha512-nppjkCAqGTVyHDUgKmBIfTfKsiARpiVA1TCN9T2QBbW8FNU0duFDZBF+++NfH2pLtOt2KbRk7dRE/fimpMjAxA== +"@parcel/transformer-jsonld@2.0.0-nightly.2068+3bfef282": + version "2.0.0-nightly.2068" + resolved "https://registry.yarnpkg.com/@parcel/transformer-jsonld/-/transformer-jsonld-2.0.0-nightly.2068.tgz#5bbac69ccbbc3e89b27368ca1c024cfaa3c73815" + integrity sha512-bO8nK/Oj9uKOwLGGVjOGjBtG1lLIEK9wEqdVfUzJgeyEu6EUEJBy0iU0bKTEaGaGj//ZVChFp7n9vpuGnIATAw== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/types" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/types" "2.0.0-nightly.446+3bfef282" json5 "^2.1.2" -"@parcel/transformer-less@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-less/-/transformer-less-2.0.0-nightly.445.tgz#400612ba75ca3546b59c56807aaab415b751e27c" - integrity sha512-EjGK2ZsbGHQc5YD6CIVdVZn9hmL7sTM8SjuRU0/CFgKVQh3NI0e8vVjfA4UnMgRAsVAxFKDiyIc10pZuRrTBEQ== +"@parcel/transformer-less@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/transformer-less/-/transformer-less-2.0.0-nightly.446.tgz#b81cf260fe8c81c8e60de06e93766a83e584ff87" + integrity sha512-outojfO4ThAnMaMapVOwFRkJvkuBNQPh6jTUrtVCLeubXh4GdBcYSKWGy8JefbDe5tx2MqJx49JEiJjTlxyqHg== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" "@parcel/source-map" "2.0.0-alpha.4.16" -"@parcel/transformer-mdx@2.0.0-nightly.2067+adb92ee0": - version "2.0.0-nightly.2067" - resolved "https://registry.yarnpkg.com/@parcel/transformer-mdx/-/transformer-mdx-2.0.0-nightly.2067.tgz#4ac94a9a33c495ede3638d036d493999d6624e96" - integrity sha512-tRIJLA2W6EmxXjjvBc37t8xASNaR0ZmmFc4K0LmJbiO5kuHWfOjuw/npq6p+TShYUUZYTSgeVsN9HolCDw/v4g== +"@parcel/transformer-mdx@2.0.0-nightly.2068+3bfef282": + version "2.0.0-nightly.2068" + resolved "https://registry.yarnpkg.com/@parcel/transformer-mdx/-/transformer-mdx-2.0.0-nightly.2068.tgz#55a15598d8cb1f7a04ae88650a738b4982abeb12" + integrity sha512-L9Jl8REp3UjKPXJfppNAWmTNxKoLwYuYwd/F09lrQCKe5H0Isnku/yKHugl3wDODItn1aZPThfk7uuxzejoj8A== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" -"@parcel/transformer-postcss@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-postcss/-/transformer-postcss-2.0.0-nightly.445.tgz#18fd18252b035192ef2b53a4029bd3f29a75e2b3" - integrity sha512-vGfrP0zkbwo7eMLQmWd29K6JAmoyKUMRt3U8fOE3KMxWTR4EwR/jAnv9qwimlz5GoEDne7dsBv1eHcrqpl50uQ== +"@parcel/transformer-postcss@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/transformer-postcss/-/transformer-postcss-2.0.0-nightly.446.tgz#383fcc10d59794e85bc1a376cafa8efed00e613e" + integrity sha512-Yrux2pN3rUCkE5oyQmiahzyWmRYjAvEpK2FIYp2qlOsTghaI5ZBRNeduYO+XvZFE9PeeEP416JNsC0yomxXWjg== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" css-modules-loader-core "^1.1.0" nullthrows "^1.1.1" postcss-value-parser "^4.1.0" semver "^5.4.1" -"@parcel/transformer-posthtml@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-posthtml/-/transformer-posthtml-2.0.0-nightly.445.tgz#49d26ae8bf6f0d210066517972315fbb45a36a2b" - integrity sha512-jTUj+zyXKCTNgnJHNOKgjzmJgpcbmQgPEnac8TEwrW1iENaAxU+6gUChczf9xyzLpsV3WRT/4F8UheSiTqbpvw== +"@parcel/transformer-posthtml@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/transformer-posthtml/-/transformer-posthtml-2.0.0-nightly.446.tgz#d20f4be828f2c91c65c3698affe05176f5516452" + integrity sha512-JM9vWvPIY5twP/w5uhD0VQFe4eZzHQA2pMq3R819euD4wrIyIpuCa6g6r4iI9z/w3ygWcx1Z6cTEbBb+39Y5Hg== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" nullthrows "^1.1.1" posthtml "^0.11.3" posthtml-parser "^0.4.1" posthtml-render "^1.1.5" semver "^5.4.1" -"@parcel/transformer-pug@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-pug/-/transformer-pug-2.0.0-nightly.445.tgz#a3df420a1bcb441381fb291e8d81b53be61ae3d0" - integrity sha512-0oMbtawueZgnWVRUxUZNBSZipfJ5IpzIDE++PnIkqChSukVHNtCaYuSYrsButDSmJ1R9lcbCfwGD6jKYiNGqtQ== +"@parcel/transformer-pug@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/transformer-pug/-/transformer-pug-2.0.0-nightly.446.tgz#6d72b8780c6243696fbb11d3abc001fa2866027f" + integrity sha512-HvNJ2vNOxKLka6HNH9asGOECIwASY1jaB1oZn9Z9aQAW7s0+1PeuNVfXH9wwupCUjjziByuOS0fRh1BhoS9pPQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" -"@parcel/transformer-raw@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-raw/-/transformer-raw-2.0.0-nightly.445.tgz#ae26126a6e9100a0c2422f9bfdd205fe78b3b715" - integrity sha512-EpmlvQmEo0Efiq8UXw5zBB7N+cOUP8/2jT+Q3fTRO5dCwhVury/kE1dauApcrCoeUWyWNEyE19cQCirrdeNbZQ== +"@parcel/transformer-raw@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/transformer-raw/-/transformer-raw-2.0.0-nightly.446.tgz#2383d9d9ce24723e2c5e6306f84ee5953f7ea99e" + integrity sha512-1CMKCE1Lpc7Z9DiaiiGnz1mzpREg3Xa2FcmWoC3RlNWOfaKw6qd/wmucXY4wj5+4qAKYyHxjTZGy1tgcxfzDVw== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" -"@parcel/transformer-react-refresh-babel@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-babel/-/transformer-react-refresh-babel-2.0.0-nightly.445.tgz#742e48f22fc9bb1418bb0e75217f44276b0f6283" - integrity sha512-3bY1JfS2m/4yXQEO5Lu7IAGcWmAyGu5KzGAtNXlC9lQRB2xSkNaSDuuIaj2XdQ3MmJUssnwUNjI2J+BQO+/2HA== +"@parcel/transformer-react-refresh-babel@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-babel/-/transformer-react-refresh-babel-2.0.0-nightly.446.tgz#d688703f415ec296dcc6e1ff9faaaee929f4b6db" + integrity sha512-C/QN4lgzukcQWzayEUQqpdP2ijDzADB3yT7P9SfNtXCBocbbOY+NbwGLQtnJ4REcx+5uRbJ9GpKPB8417WnwDQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" react-refresh "^0.9.0" -"@parcel/transformer-react-refresh-wrap@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.0.0-nightly.445.tgz#0290c472f753b2b313dc2d04b75304513bec4911" - integrity sha512-9+97jl4sGdyMXKcVyqEQiHPdPjkyIa5bDWxGCuZ3JuefrTrFcghHTTl7Q/BenFV/m0iBkqmaQ5fFGmAUQWZ1OQ== +"@parcel/transformer-react-refresh-wrap@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.0.0-nightly.446.tgz#670e642972b8d8057dc46f324ebe15711b26ffae" + integrity sha512-8OE0hvbdXHlhExJNQXaecph2QbCjwHNQtgkazSSfqo80lVuZzDOdyQ9h9/c8hn+oj7fnt359Hw3syWLj+2O3OA== dependencies: "@babel/generator" "^7.0.0" "@babel/parser" "^7.0.0" "@babel/template" "^7.4.0" "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2067+adb92ee0" - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/babel-ast-utils" "2.0.0-nightly.2068+3bfef282" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" react-refresh "^0.9.0" semver "^5.4.1" -"@parcel/transformer-sass@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sass/-/transformer-sass-2.0.0-nightly.445.tgz#8d2e998f637ecb691f6f6c0062ccf2fdc74b04cf" - integrity sha512-Hioyt64523DpDq2dMK1Ww8PFyvnyReuTSuwEi4TCgXeZsUX0cmwZILe0X1e/nhYUsPZMPjnnQL3qnRNoxK3cVg== +"@parcel/transformer-sass@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/transformer-sass/-/transformer-sass-2.0.0-nightly.446.tgz#46f9ed91e8dea8effeea539054f1e13baacb6d01" + integrity sha512-9ezq2DHw1Qhvm/AAd2l/6Yk10I45osE0prxWa2MkC1xveGllbi14poDfbNhK3gxX0K7TV/S+ibyKc+naHAVEIw== dependencies: - "@parcel/fs" "2.0.0-nightly.445+adb92ee0" - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/fs" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" -"@parcel/transformer-stylus@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-stylus/-/transformer-stylus-2.0.0-nightly.445.tgz#b1d96c46207300a66e55c37fd9876f9550bc9f45" - integrity sha512-y1/dkOu37IwODQhKo0Bp01ouToO4OwTHO1Ibs6gojqTsc2T7ac0SeX02J20K1bmYvucj9rT/y4yyWuW6xk49KA== +"@parcel/transformer-stylus@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/transformer-stylus/-/transformer-stylus-2.0.0-nightly.446.tgz#b628ac5100177968740f204862a0d6709b9023db" + integrity sha512-tYjteN7dnw+g40ODbIGPUX33rdKnHojohAX8NXOtvf5S+eXHxshQLQM9UHTpUFRlZ5Il3hwbOFJFaLzm+EecrQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" -"@parcel/transformer-sugarss@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sugarss/-/transformer-sugarss-2.0.0-nightly.445.tgz#745d8862f895b3a98dc30f4be21f9a043994a639" - integrity sha512-256XNk0p8Kd5tEEVRN7KjGq+NDlNr+CrqFUAuNdr2C4tnxB+DrtNLRXh16UDdfD3jgWOxLHp4rmFjnqpLBHEHA== +"@parcel/transformer-sugarss@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/transformer-sugarss/-/transformer-sugarss-2.0.0-nightly.446.tgz#daa130f7959afb74f6af4b311eb1caa32f3273fb" + integrity sha512-D1mpHwxzA/sxQYA6Uc0nQSHYTUbe2Q6o32F72sABocZvV/ax0guYockl6aNONr+dwu07/5kY5maTyfYAZ/iM/g== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" postcss "^8.0.5" -"@parcel/transformer-toml@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-toml/-/transformer-toml-2.0.0-nightly.445.tgz#fd179834e5ff0b8219eeb926e41de0b08b05ce7c" - integrity sha512-wGTqFwVI4is8O3JWEvSDTk7Z/U58DlEHB49C2CwqR0xVSjCQbKuFt+fLOSaEhs7D4lTcr9U1dBwwXRgA38yBJg== +"@parcel/transformer-toml@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/transformer-toml/-/transformer-toml-2.0.0-nightly.446.tgz#981119cc34ecf49a891f4acce3221a1fa77e633c" + integrity sha512-leLjjKU2xXRw5cbXgFXHuaNKExn4Q3Fzne65nZj1G/3QHk+tiWnTms9msx5wDR2iZuQjWQc7cI1TZia+VRVUKA== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" -"@parcel/transformer-typescript-types@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.0.0-nightly.445.tgz#8dc435fdea20a1b8e84e48ce78762c4c5b0dcf45" - integrity sha512-NtcZOYLoSpoV3oVLxEDDGfZhziMKQS/znOxwVrNgy04pens2cQ028Tj42sdjL05V8vUEf3kVXVZlZGSyHFQhQQ== +"@parcel/transformer-typescript-types@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.0.0-nightly.446.tgz#7f3290031529726e7c768980777af61f45191ee4" + integrity sha512-Hk9sX3LKo21FS0YqeBthg9IiiCawXsuTXHuJj32hjmSacYEIRTTyLnkA3B0YTrjJgmojuoFi6CiSZU2gMR0uzg== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/ts-utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/ts-utils" "2.0.0-nightly.446+3bfef282" nullthrows "^1.1.1" -"@parcel/transformer-vue@2.0.0-nightly.2067+adb92ee0": - version "2.0.0-nightly.2067" - resolved "https://registry.yarnpkg.com/@parcel/transformer-vue/-/transformer-vue-2.0.0-nightly.2067.tgz#41bf71f2e6d5189fe40e9eaacf9f7871a51992b9" - integrity sha512-O8Yn74mwz5fiws1vDsc13xtNyFIKL83vebs+SrW6ALZUJzIndQr2J8WRvic5C25WF2NEtnUni+dUlUAUKUqXdg== +"@parcel/transformer-vue@2.0.0-nightly.2068+3bfef282": + version "2.0.0-nightly.2068" + resolved "https://registry.yarnpkg.com/@parcel/transformer-vue/-/transformer-vue-2.0.0-nightly.2068.tgz#7fd00e4e3524611aa5d313dabfced33649d475d9" + integrity sha512-oPouURopmkOUTwQAMFxOUfcPK3zKsopy5isR7QNyhkmWxsA72Cj2IWWUM/A0rHJPX0+FmxVvyOauIqUzkkcFhw== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/diagnostic" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-yaml@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-yaml/-/transformer-yaml-2.0.0-nightly.445.tgz#e23988b79c50039d581b1753e32272645ed87771" - integrity sha512-V7kMbEPf5NAjAPWY4c2hezX4D23VhZwiDkFycFKD0f3SuDfnSVa/taZcH15h9cu6mAVl11X3w4X2R/v+RZhA6A== +"@parcel/transformer-yaml@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/transformer-yaml/-/transformer-yaml-2.0.0-nightly.446.tgz#18edb6d64351acad5ef811022998c1c89bafbfce" + integrity sha512-HhL/0+wA1bfk7B5EWAlLiI5/Ys0oBIAI7tku3oR9ygbirTCUMvK9rIu+4RxXz60ePobSjRePNHD+QMrH8gt2iA== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.446+3bfef282" -"@parcel/ts-utils@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/ts-utils/-/ts-utils-2.0.0-nightly.445.tgz#ff958629a2389184cb37eac5a14ee91fd30da5f2" - integrity sha512-gSsShUlj/zw/Ds9MmcbTkjsFbe0Il2MZhITc1U6ID1dUxdGVaRehhkCgwN8562L+rjS9ZRZUZACR7fTGiacSZA== +"@parcel/ts-utils@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/ts-utils/-/ts-utils-2.0.0-nightly.446.tgz#75c998d0ebe3fdbc8229c070dca10dc2b8ff216d" + integrity sha512-yabMSQRMkZAsW8Mv3ovtS9eyR/mLDB5cw+7m1J8C7t4tNyAoJzKVGF6+7J+VdweJNrblslEKZ3HlcJiJxGZTbw== dependencies: nullthrows "^1.1.1" -"@parcel/types@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/types/-/types-2.0.0-nightly.445.tgz#835026da93994a76a12e9066b48956b4a4e7e627" - integrity sha512-sY6fx7C7RAmfB6hSoVayRm2W5+TB04sLw8OK/aRDu5xiwAKX0h4ebUX+2G9EtGYKUF8gfhiQ6njt/f/SevXGdw== +"@parcel/types@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/types/-/types-2.0.0-nightly.446.tgz#c35ffc4a6b09f7a8aeb5198615cb668635f7545e" + integrity sha512-wnfp5Yoom7wSWOhjv74/BqFgF4LgM+dpIbwEfBY8h9hwFXKEIpiGLzZm5QtDJ5cF9LjBzHeZfgJ6n9Hs1Dqemg== -"@parcel/utils@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-2.0.0-nightly.445.tgz#fdeedba16af79b05ff61ced710ce479f154c4a09" - integrity sha512-srgHWtlvd8Jua7EmVvEBVvzO1ZDB8qIE0u677g39WDIBe7OAJ90ybHyV+zJZVRUD4JSEo4R7AFv3L7L4gkX3Mw== +"@parcel/utils@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-2.0.0-nightly.446.tgz#45543a6822e0aadc356d007be0abfa31256435d0" + integrity sha512-TvvNo/bRXGFdV8qNFHwPy9AhhQI9UOX02xBoNIlf8H00hlLnMdWg1blZJikJz9S0o5/l0JbbD/bbyKD65HAPsg== dependencies: "@iarna/toml" "^2.2.0" - "@parcel/codeframe" "2.0.0-nightly.445+adb92ee0" - "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" - "@parcel/logger" "2.0.0-nightly.445+adb92ee0" - "@parcel/markdown-ansi" "2.0.0-nightly.445+adb92ee0" + "@parcel/codeframe" "2.0.0-nightly.446+3bfef282" + "@parcel/diagnostic" "2.0.0-nightly.446+3bfef282" + "@parcel/logger" "2.0.0-nightly.446+3bfef282" + "@parcel/markdown-ansi" "2.0.0-nightly.446+3bfef282" "@parcel/source-map" "2.0.0-alpha.4.16" ansi-html "^0.0.7" chalk "^2.4.2" @@ -2932,14 +2932,14 @@ node-addon-api "^3.0.0" node-gyp-build "^4.2.1" -"@parcel/workers@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-2.0.0-nightly.445.tgz#b3366b7c4abe4bcfaae954c4e9bb97727523d3c7" - integrity sha512-692D89hFYrqU36UxxA9VtVMzbGH4OXsWJshE1GibjurICJ8L149/pxu8v/oCsE/M8Ng1Hj9iIKdtiCrS6w6Z0w== +"@parcel/workers@2.0.0-nightly.446+3bfef282": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-2.0.0-nightly.446.tgz#064827fb164be593de4adaa20a5d7504ad875173" + integrity sha512-xgw3SnURvNLP5f2nJQF9/zWCdWhnvKEIQu9aPznE/MJouVKxeCW5ZQIFt7+dIBu2PzecEBmZOV3iR1TtYxn07A== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" - "@parcel/logger" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/diagnostic" "2.0.0-nightly.446+3bfef282" + "@parcel/logger" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" chrome-trace-event "^1.0.2" nullthrows "^1.1.1" @@ -10587,19 +10587,19 @@ parallel-transform@^1.1.0: inherits "^2.0.3" readable-stream "^2.1.5" -parcel@2.0.0-nightly.443: - version "2.0.0-nightly.443" - resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.0.0-nightly.443.tgz#40f709a86acf1a6c44db6dd60ef3e9006abe3fb1" - integrity sha512-teFdXNFYWh77eBc86RVHdeKTUJch+mU51/2r2Djn75qqXglgxG5gSn613Ul52YxEjaRjI7MeZzqtY5EeaAaJTA== - dependencies: - "@parcel/config-default" "2.0.0-nightly.445+adb92ee0" - "@parcel/core" "2.0.0-nightly.443+adb92ee0" - "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" - "@parcel/events" "2.0.0-nightly.445+adb92ee0" - "@parcel/fs" "2.0.0-nightly.445+adb92ee0" - "@parcel/logger" "2.0.0-nightly.445+adb92ee0" - "@parcel/package-manager" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" +parcel@2.0.0-nightly.444: + version "2.0.0-nightly.444" + resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.0.0-nightly.444.tgz#d6ce4f75fbed148dcca60821f9509eba34aeb875" + integrity sha512-T3ZK8QKxt0PHeGQZe1vhFu2KP229BRRH14qn8UkKforaSwIT5BWngaFxAuh7vQulXCc+lNi38xK5MtqH6TQ7zg== + dependencies: + "@parcel/config-default" "2.0.0-nightly.446+3bfef282" + "@parcel/core" "2.0.0-nightly.444+3bfef282" + "@parcel/diagnostic" "2.0.0-nightly.446+3bfef282" + "@parcel/events" "2.0.0-nightly.446+3bfef282" + "@parcel/fs" "2.0.0-nightly.446+3bfef282" + "@parcel/logger" "2.0.0-nightly.446+3bfef282" + "@parcel/package-manager" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.446+3bfef282" chalk "^2.1.0" commander "^2.19.0" get-port "^4.2.0" From b5c3f84c8be855107d3ea6738bbf8511f2ecdb8e Mon Sep 17 00:00:00 2001 From: Jan Brauer Date: Thu, 12 Nov 2020 02:50:52 +0100 Subject: [PATCH 120/314] feat(applicationautoscaling): Add KAFKA to ServiceNamespace (#11394) Add `KAFKA` to ServiceNamespace. This allows targeting MSK's autoscaling feature. Fixes https://github.com/aws/aws-cdk/issues/11366 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-applicationautoscaling/lib/scalable-target.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts b/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts index 14bf3f4913b34..9549ff5c6598c 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts +++ b/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts @@ -274,4 +274,9 @@ export enum ServiceNamespace { * Comprehend */ COMPREHEND = 'comprehend', + + /** + * Kafka + */ + KAFKA = 'kafka', } From 182abfc48228b51e4ce5fd2be1b2dfdbc5c8c9b5 Mon Sep 17 00:00:00 2001 From: Satoru Abe Date: Thu, 12 Nov 2020 13:04:20 +0900 Subject: [PATCH 121/314] docs: fix typo of package name `@aws-cdk/aws-apigatewayv2-integrations` in CHANGELOG (#11436) There is no module named `@aws-cdk/aws-apigatewayv2-integration` (`s` for plural form is missing) - https://github.com/aws/aws-cdk/tree/master/packages/%40aws-cdk/aws-apigatewayv2-integrations - https://www.npmjs.com/package/@aws-cdk/aws-apigatewayv2-integrations ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 941f81402e7d2..ed8d8f2fceb1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file. See [standa ### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **apigatewayv2:** `LambdaProxyIntegration` and `HttpProxyIntegration` -classes have moved to the `@aws-cdk/aws-apigatewayv2-integration` module. +classes have moved to the `@aws-cdk/aws-apigatewayv2-integrations` module. * **appmesh:** VirtualRouter's Listeners are no longer a struct; use the static factory methods of the `VirtualNodeListener` class to obtain instances of them * **appmesh:** VirtualRouter accepts a list of listeners instead of a single listener * **appmesh:** all `fromResourceName()` methods in the AppMesh module have been replaced with `fromResourceAttributes()` From f26a592e609674d528990aad14fb8884112ad64d Mon Sep 17 00:00:00 2001 From: Adam Elmore Date: Thu, 12 Nov 2020 02:32:17 -0600 Subject: [PATCH 122/314] fix(stepfunctions-tasks): encryption is required for AthenaStartQueryExecution (#11355) AthenaStartQueryExecution fails to deploy if resultConfiguration.encryptionConfiguration isn't specified. This configuration should be optional. --- .../lib/athena/start-query-execution.ts | 21 +++++--- .../test/athena/start-query-execution.test.ts | 52 +++++++++++++++++++ 2 files changed, 65 insertions(+), 8 deletions(-) diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts index 50dc1b03a24bc..44bccf9b2faca 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts @@ -167,6 +167,17 @@ export class AthenaStartQueryExecution extends sfn.TaskStateBase { return policyStatements; } + private renderEncryption(): any { + const encryptionConfiguration = this.props.resultConfiguration?.encryptionConfiguration !== undefined + ? { + EncryptionOption: this.props.resultConfiguration.encryptionConfiguration.encryptionOption, + KmsKey: this.props.resultConfiguration.encryptionConfiguration.encryptionKey, + } + : undefined; + + return encryptionConfiguration; + } + /** * Provides the Athena start query execution service integration task configuration */ @@ -185,10 +196,7 @@ export class AthenaStartQueryExecution extends sfn.TaskStateBase { Database: this.props.queryExecutionContext?.databaseName, }, ResultConfiguration: { - EncryptionConfiguration: { - EncryptionOption: this.props.resultConfiguration?.encryptionConfiguration?.encryptionOption, - KmsKey: this.props.resultConfiguration?.encryptionConfiguration?.encryptionKey, - }, + EncryptionConfiguration: this.renderEncryption(), OutputLocation: `s3://${this.props.resultConfiguration?.outputLocation?.bucketName}/${this.props.resultConfiguration?.outputLocation?.objectKey}/`, }, WorkGroup: this.props.workGroup, @@ -205,10 +213,7 @@ export class AthenaStartQueryExecution extends sfn.TaskStateBase { Database: this.props.queryExecutionContext?.databaseName, }, ResultConfiguration: { - EncryptionConfiguration: { - EncryptionOption: this.props.resultConfiguration?.encryptionConfiguration?.encryptionOption, - KmsKey: this.props.resultConfiguration?.encryptionConfiguration?.encryptionKey, - }, + EncryptionConfiguration: this.renderEncryption(), }, WorkGroup: this.props.workGroup, }), diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/start-query-execution.test.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/start-query-execution.test.ts index c96e4356c7a11..5742872286167 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/start-query-execution.test.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/start-query-execution.test.ts @@ -101,4 +101,56 @@ describe('Start Query Execution', () => { }, }); }); + + test('no encryptionConfiguration', () => { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + const task = new AthenaStartQueryExecution(stack, 'Query', { + queryString: 'CREATE DATABASE database', + clientRequestToken: 'unique-client-request-token', + queryExecutionContext: { + databaseName: 'mydatabase', + catalogName: 'AwsDataCatalog', + }, + resultConfiguration: { + outputLocation: { + bucketName: 'query-results-bucket', + objectKey: 'folder', + }, + }, + workGroup: 'primary', + }); + + // THEN + expect(stack.resolve(task.toStateJson())).toEqual({ + Type: 'Task', + Resource: { + 'Fn::Join': [ + '', + [ + 'arn:', + { + Ref: 'AWS::Partition', + }, + ':states:::athena:startQueryExecution', + ], + ], + }, + End: true, + Parameters: { + QueryString: 'CREATE DATABASE database', + ClientRequestToken: 'unique-client-request-token', + QueryExecutionContext: { + Database: 'mydatabase', + Catalog: 'AwsDataCatalog', + }, + ResultConfiguration: { + OutputLocation: 's3://query-results-bucket/folder/', + }, + WorkGroup: 'primary', + }, + }); + }); }); From 025992b0014aca493a669be518f4f423d3f39a57 Mon Sep 17 00:00:00 2001 From: AWS CDK Automation <43080478+aws-cdk-automation@users.noreply.github.com> Date: Thu, 12 Nov 2020 13:52:51 +0100 Subject: [PATCH 123/314] feat(cfnspec): cloudformation spec v20.2.0 (#11429) * feat: cloudformation spec v20.2.0 * Fixing Tags type for IoT DomainConfiguration Co-authored-by: AWS CDK Team Co-authored-by: Nick Lynch --- packages/@aws-cdk/cfnspec/CHANGELOG.md | 40 ++ packages/@aws-cdk/cfnspec/cfn.version | 2 +- ...0_CloudFormationResourceSpecification.json | 448 +++++++++++++++++- ...figuration_Tags_CorrectItemType_patch.json | 21 + 4 files changed, 507 insertions(+), 4 deletions(-) create mode 100644 packages/@aws-cdk/cfnspec/spec-source/690_IoT_DomainConfiguration_Tags_CorrectItemType_patch.json diff --git a/packages/@aws-cdk/cfnspec/CHANGELOG.md b/packages/@aws-cdk/cfnspec/CHANGELOG.md index 9c3b7d9e1e6d0..8a871d71fe7ce 100644 --- a/packages/@aws-cdk/cfnspec/CHANGELOG.md +++ b/packages/@aws-cdk/cfnspec/CHANGELOG.md @@ -1,3 +1,43 @@ +# CloudFormation Resource Specification v20.2.0 + +## New Resource Types + +* AWS::CloudWatch::MetricStream +* AWS::Events::Archive +* AWS::IoT::DomainConfiguration +* AWS::RDS::GlobalCluster + +## Attribute Changes + + +## Property Changes + +* AWS::CodeArtifact::Domain Tags (__added__) +* AWS::CodeArtifact::Repository Tags (__added__) +* AWS::Kendra::DataSource DataSourceConfiguration.Required (__changed__) + * Old: true + * New: false +* AWS::Kendra::DataSource RoleArn.Required (__changed__) + * Old: true + * New: false +* AWS::S3::Bucket IntelligentTieringConfigurations (__added__) +* AWS::S3::Bucket OwnershipControls (__added__) +* AWS::SecretsManager::ResourcePolicy BlockPublicPolicy (__added__) + +## Property Type Changes + +* AWS::Batch::JobDefinition.EvaluateOnExit (__added__) +* AWS::S3::Bucket.IntelligentTieringConfiguration (__added__) +* AWS::S3::Bucket.OwnershipControls (__added__) +* AWS::S3::Bucket.OwnershipControlsRule (__added__) +* AWS::S3::Bucket.Tiering (__added__) +* AWS::Batch::JobDefinition.RetryStrategy EvaluateOnExit (__added__) +* AWS::EC2::LaunchTemplate.CapacityReservationTarget CapacityReservationResourceGroupArn (__added__) +* AWS::EC2::LaunchTemplate.NetworkInterface AssociateCarrierIpAddress (__added__) +* AWS::EC2::LaunchTemplate.NetworkInterface NetworkCardIndex (__added__) +* AWS::Kendra::DataSource.S3DataSourceConfiguration InclusionPatterns (__added__) + + # CloudFormation Resource Specification v20.0.0 ## New Resource Types diff --git a/packages/@aws-cdk/cfnspec/cfn.version b/packages/@aws-cdk/cfnspec/cfn.version index e88320d7c3862..86d4688d0910a 100644 --- a/packages/@aws-cdk/cfnspec/cfn.version +++ b/packages/@aws-cdk/cfnspec/cfn.version @@ -1 +1 @@ -20.0.0 +20.2.0 diff --git a/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json b/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json index e5bb42cdaee87..e9a8d24f35f4f 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json +++ b/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json @@ -7346,6 +7346,35 @@ } } }, + "AWS::Batch::JobDefinition.EvaluateOnExit": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-evaluateonexit.html", + "Properties": { + "Action": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-evaluateonexit.html#cfn-batch-jobdefinition-evaluateonexit-action", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "OnExitCode": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-evaluateonexit.html#cfn-batch-jobdefinition-evaluateonexit-onexitcode", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "OnReason": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-evaluateonexit.html#cfn-batch-jobdefinition-evaluateonexit-onreason", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "OnStatusReason": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-evaluateonexit.html#cfn-batch-jobdefinition-evaluateonexit-onstatusreason", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::Batch::JobDefinition.LinuxParameters": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-containerproperties-linuxparameters.html", "Properties": { @@ -7502,6 +7531,13 @@ "PrimitiveType": "Integer", "Required": false, "UpdateType": "Mutable" + }, + "EvaluateOnExit": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-retrystrategy.html#cfn-batch-jobdefinition-retrystrategy-evaluateonexit", + "ItemType": "EvaluateOnExit", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" } } }, @@ -9419,6 +9455,17 @@ "Type": "List", "UpdateType": "Mutable" }, + "AWS::CloudWatch::MetricStream.MetricStreamFilter": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-metricstream-metricstreamfilter.html", + "Properties": { + "Namespace": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-metricstream-metricstreamfilter.html#cfn-cloudwatch-metricstream-metricstreamfilter-namespace", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::CodeBuild::Project.Artifacts": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html", "Properties": { @@ -13716,6 +13763,12 @@ "PrimitiveType": "String", "Required": false, "UpdateType": "Mutable" + }, + "CapacityReservationResourceGroupArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-capacityreservationtarget.html#cfn-ec2-launchtemplate-capacityreservationtarget-capacityreservationresourcegrouparn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" } } }, @@ -14095,6 +14148,12 @@ "AWS::EC2::LaunchTemplate.NetworkInterface": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-networkinterface.html", "Properties": { + "AssociateCarrierIpAddress": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-networkinterface.html#cfn-ec2-launchtemplate-networkinterface-associatecarrieripaddress", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, "AssociatePublicIpAddress": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-networkinterface.html#cfn-ec2-launchtemplate-networkinterface-associatepublicipaddress", "PrimitiveType": "Boolean", @@ -14145,6 +14204,12 @@ "Type": "List", "UpdateType": "Mutable" }, + "NetworkCardIndex": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-networkinterface.html#cfn-ec2-launchtemplate-networkinterface-networkcardindex", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, "NetworkInterfaceId": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-networkinterface.html#cfn-ec2-launchtemplate-networkinterface-networkinterfaceid", "PrimitiveType": "String", @@ -23365,6 +23430,58 @@ "AWS::IoT::Authorizer.TokenSigningPublicKeys": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-authorizer-tokensigningpublickeys.html" }, + "AWS::IoT::DomainConfiguration.AuthorizerConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-authorizerconfig.html", + "Properties": { + "AllowAuthorizerOverride": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-authorizerconfig.html#cfn-iot-domainconfiguration-authorizerconfig-allowauthorizeroverride", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "DefaultAuthorizerName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-authorizerconfig.html#cfn-iot-domainconfiguration-authorizerconfig-defaultauthorizername", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::IoT::DomainConfiguration.ServerCertificateSummary": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-servercertificatesummary.html", + "Properties": { + "ServerCertificateArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-servercertificatesummary.html#cfn-iot-domainconfiguration-servercertificatesummary-servercertificatearn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "ServerCertificateStatus": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-servercertificatesummary.html#cfn-iot-domainconfiguration-servercertificatesummary-servercertificatestatus", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "ServerCertificateStatusDetail": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-servercertificatesummary.html#cfn-iot-domainconfiguration-servercertificatesummary-servercertificatestatusdetail", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::IoT::DomainConfiguration.Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-tags.html", + "Properties": { + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-tags.html#cfn-iot-domainconfiguration-tags-tags", + "ItemType": "Json", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, "AWS::IoT::ProvisioningTemplate.ProvisioningHook": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-provisioningtemplate-provisioninghook.html", "Properties": { @@ -26241,6 +26358,12 @@ "Type": "DataSourceInclusionsExclusionsStrings", "UpdateType": "Mutable" }, + "InclusionPatterns": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-datasource-s3datasourceconfiguration.html#cfn-kendra-datasource-s3datasourceconfiguration-inclusionpatterns", + "Required": false, + "Type": "DataSourceInclusionsExclusionsStrings", + "UpdateType": "Mutable" + }, "InclusionPrefixes": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-datasource-s3datasourceconfiguration.html#cfn-kendra-datasource-s3datasourceconfiguration-inclusionprefixes", "Required": false, @@ -37946,6 +38069,45 @@ } } }, + "AWS::S3::Bucket.IntelligentTieringConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-intelligenttieringconfiguration.html", + "Properties": { + "Id": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-intelligenttieringconfiguration.html#cfn-s3-bucket-intelligenttieringconfiguration-id", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Prefix": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-intelligenttieringconfiguration.html#cfn-s3-bucket-intelligenttieringconfiguration-prefix", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Status": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-intelligenttieringconfiguration.html#cfn-s3-bucket-intelligenttieringconfiguration-status", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "TagFilters": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-intelligenttieringconfiguration.html#cfn-s3-bucket-intelligenttieringconfiguration-tagfilters", + "DuplicatesAllowed": false, + "ItemType": "TagFilter", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Tierings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-intelligenttieringconfiguration.html#cfn-s3-bucket-intelligenttieringconfiguration-tierings", + "DuplicatesAllowed": false, + "ItemType": "Tiering", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, "AWS::S3::Bucket.InventoryConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventoryconfiguration.html", "Properties": { @@ -38175,6 +38337,30 @@ } } }, + "AWS::S3::Bucket.OwnershipControls": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-ownershipcontrols.html", + "Properties": { + "Rules": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-ownershipcontrols.html#cfn-s3-bucket-ownershipcontrols-rules", + "DuplicatesAllowed": false, + "ItemType": "OwnershipControlsRule", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::S3::Bucket.OwnershipControlsRule": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-ownershipcontrolsrule.html", + "Properties": { + "ObjectOwnership": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-ownershipcontrolsrule.html#cfn-s3-bucket-ownershipcontrolsrule-objectownership", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::S3::Bucket.PublicAccessBlockConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-publicaccessblockconfiguration.html", "Properties": { @@ -38676,6 +38862,23 @@ } } }, + "AWS::S3::Bucket.Tiering": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-tiering.html", + "Properties": { + "AccessTier": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-tiering.html#cfn-s3-bucket-tiering-accesstier", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Days": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-tiering.html#cfn-s3-bucket-tiering-days", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::S3::Bucket.TopicConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-topicconfig.html", "Properties": { @@ -43071,7 +43274,7 @@ } } }, - "ResourceSpecificationVersion": "20.0.0", + "ResourceSpecificationVersion": "20.2.0", "ResourceTypes": { "AWS::ACMPCA::Certificate": { "Attributes": { @@ -48856,6 +49059,67 @@ } } }, + "AWS::CloudWatch::MetricStream": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "CreationDate": { + "PrimitiveType": "String" + }, + "LastUpdateDate": { + "PrimitiveType": "String" + }, + "State": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html", + "Properties": { + "ExcludeFilters": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-excludefilters", + "DuplicatesAllowed": false, + "ItemType": "MetricStreamFilter", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "FirehoseArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-firehosearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "IncludeFilters": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-includefilters", + "DuplicatesAllowed": false, + "ItemType": "MetricStreamFilter", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-name", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "RoleArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-rolearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, "AWS::CodeArtifact::Domain": { "Attributes": { "Arn": { @@ -48884,6 +49148,13 @@ "PrimitiveType": "Json", "Required": false, "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codeartifact-domain.html#cfn-codeartifact-domain-tags", + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" } } }, @@ -48929,6 +49200,13 @@ "Required": true, "UpdateType": "Immutable" }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codeartifact-repository.html#cfn-codeartifact-repository-tags", + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, "Upstreams": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codeartifact-repository.html#cfn-codeartifact-repository-upstreams", "PrimitiveItemType": "String", @@ -57006,6 +57284,43 @@ } } }, + "AWS::Events::Archive": { + "Attributes": { + "ArchiveName": { + "PrimitiveType": "String" + }, + "Arn": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-archive.html", + "Properties": { + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-archive.html#cfn-events-archive-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "EventPattern": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-archive.html#cfn-events-archive-eventpattern", + "PrimitiveType": "Json", + "Required": false, + "UpdateType": "Mutable" + }, + "RetentionDays": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-archive.html#cfn-events-archive-retentiondays", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "SourceArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-archive.html#cfn-events-archive-sourcearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, "AWS::Events::EventBus": { "Attributes": { "Arn": { @@ -60357,6 +60672,72 @@ } } }, + "AWS::IoT::DomainConfiguration": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "DomainType": { + "PrimitiveType": "String" + }, + "ServerCertificates": { + "ItemType": "ServerCertificateSummary", + "Type": "List" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html", + "Properties": { + "AuthorizerConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html#cfn-iot-domainconfiguration-authorizerconfig", + "Required": false, + "Type": "AuthorizerConfig", + "UpdateType": "Mutable" + }, + "DomainConfigurationName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html#cfn-iot-domainconfiguration-domainconfigurationname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "DomainConfigurationStatus": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html#cfn-iot-domainconfiguration-domainconfigurationstatus", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "DomainName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html#cfn-iot-domainconfiguration-domainname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "ServerCertificateArns": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html#cfn-iot-domainconfiguration-servercertificatearns", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Immutable" + }, + "ServiceType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html#cfn-iot-domainconfiguration-servicetype", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html#cfn-iot-domainconfiguration-tags", + "Required": false, + "Type": "Tags", + "UpdateType": "Mutable" + }, + "ValidationCertificateArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html#cfn-iot-domainconfiguration-validationcertificatearn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + } + } + }, "AWS::IoT::Policy": { "Attributes": { "Arn": { @@ -60952,7 +61333,7 @@ "Properties": { "DataSourceConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kendra-datasource.html#cfn-kendra-datasource-datasourceconfiguration", - "Required": true, + "Required": false, "Type": "DataSourceConfiguration", "UpdateType": "Mutable" }, @@ -60977,7 +61358,7 @@ "RoleArn": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kendra-datasource.html#cfn-kendra-datasource-rolearn", "PrimitiveType": "String", - "Required": true, + "Required": false, "UpdateType": "Mutable" }, "Schedule": { @@ -66302,6 +66683,47 @@ } } }, + "AWS::RDS::GlobalCluster": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-globalcluster.html", + "Properties": { + "DeletionProtection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-globalcluster.html#cfn-rds-globalcluster-deletionprotection", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "Engine": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-globalcluster.html#cfn-rds-globalcluster-engine", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "EngineVersion": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-globalcluster.html#cfn-rds-globalcluster-engineversion", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "GlobalClusterIdentifier": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-globalcluster.html#cfn-rds-globalcluster-globalclusteridentifier", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "SourceDBClusterIdentifier": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-globalcluster.html#cfn-rds-globalcluster-sourcedbclusteridentifier", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "StorageEncrypted": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-globalcluster.html#cfn-rds-globalcluster-storageencrypted", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Immutable" + } + } + }, "AWS::RDS::OptionGroup": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-optiongroup.html", "Properties": { @@ -67417,6 +67839,14 @@ "Type": "CorsConfiguration", "UpdateType": "Mutable" }, + "IntelligentTieringConfigurations": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-intelligenttieringconfigurations", + "DuplicatesAllowed": false, + "ItemType": "IntelligentTieringConfiguration", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, "InventoryConfigurations": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-inventoryconfigurations", "DuplicatesAllowed": false, @@ -67463,6 +67893,12 @@ "Required": false, "UpdateType": "Immutable" }, + "OwnershipControls": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-ownershipcontrols", + "Required": false, + "Type": "OwnershipControls", + "UpdateType": "Mutable" + }, "PublicAccessBlockConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-publicaccessblockconfiguration", "Required": false, @@ -68894,6 +69330,12 @@ "AWS::SecretsManager::ResourcePolicy": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-resourcepolicy.html", "Properties": { + "BlockPublicPolicy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-resourcepolicy.html#cfn-secretsmanager-resourcepolicy-blockpublicpolicy", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, "ResourcePolicy": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-resourcepolicy.html#cfn-secretsmanager-resourcepolicy-resourcepolicy", "PrimitiveType": "Json", diff --git a/packages/@aws-cdk/cfnspec/spec-source/690_IoT_DomainConfiguration_Tags_CorrectItemType_patch.json b/packages/@aws-cdk/cfnspec/spec-source/690_IoT_DomainConfiguration_Tags_CorrectItemType_patch.json new file mode 100644 index 0000000000000..5ffa659a47b46 --- /dev/null +++ b/packages/@aws-cdk/cfnspec/spec-source/690_IoT_DomainConfiguration_Tags_CorrectItemType_patch.json @@ -0,0 +1,21 @@ +{ + "PropertyTypes": { + "AWS::IoT::DomainConfiguration.Tags": { + "patch": { + "description": "AWS::IoT::DomainConfiguration.Tag.ItemType should have been PrimitiveItemType", + "operations": [ + { + "op": "remove", + "path": "/Properties/Tags/ItemType", + "value": "Json" + }, + { + "op": "add", + "path": "/Properties/Tags/PrimitiveItemType", + "value": "Json" + } + ] + } + } + } +} From 58efbad743464439ce8eb97a6c6c3e07b531d93c Mon Sep 17 00:00:00 2001 From: Meng Xin Zhu Date: Fri, 13 Nov 2020 05:11:15 +0800 Subject: [PATCH 124/314] feat(stepfunctions-tasks): support overriding all properties of CodeBuild StartBuild integration (#10356) closes #10302 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-codebuild/lib/project.ts | 61 ++-- .../aws-stepfunctions-tasks/README.md | 15 +- .../lib/codebuild/start-build.ts | 88 +++++- ...start-build-override-options.expected.json | 267 ++++++++++++++++++ .../integ.start-build-override-options.ts | 88 ++++++ .../test/codebuild/start-build.test.ts | 192 ++++++++++++- 6 files changed, 682 insertions(+), 29 deletions(-) create mode 100644 packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build-override-options.expected.json create mode 100644 packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build-override-options.ts diff --git a/packages/@aws-cdk/aws-codebuild/lib/project.ts b/packages/@aws-cdk/aws-codebuild/lib/project.ts index 8bfc8f38e09cf..8ac10c718953e 100644 --- a/packages/@aws-cdk/aws-codebuild/lib/project.ts +++ b/packages/@aws-cdk/aws-codebuild/lib/project.ts @@ -396,14 +396,11 @@ abstract class ProjectBase extends Resource implements IProject { } } -export interface CommonProjectProps { - /** - * A description of the project. Use the description to identify the purpose - * of the project. - * - * @default - No description. - */ - readonly description?: string; +/** + * Common override properties of the CodeBuild project + * TODO: add properties `queuedTimeoutInMinutes`, `logsConfig` + */ +interface CommonStartBuildOptions { /** * Filename or contents of buildspec in JSON format. @@ -413,13 +410,6 @@ export interface CommonProjectProps { */ readonly buildSpec?: BuildSpec; - /** - * Service Role to assume while running the build. - * - * @default - A role will be created. - */ - readonly role?: iam.IRole; - /** * Encryption key to use to read and write artifacts. * @@ -442,13 +432,11 @@ export interface CommonProjectProps { readonly environment?: BuildEnvironment; /** - * Indicates whether AWS CodeBuild generates a publicly accessible URL for - * your project's build badge. For more information, see Build Badges Sample - * in the AWS CodeBuild User Guide. + * Service Role to assume while running the build. * - * @default false + * @default - A role will be created. */ - readonly badge?: boolean; + readonly role?: iam.IRole; /** * The number of minutes after which AWS CodeBuild stops the build if it's @@ -465,6 +453,28 @@ export interface CommonProjectProps { * @default - No additional environment variables are specified. */ readonly environmentVariables?: { [name: string]: BuildEnvironmentVariable }; +} + +/** + * Common properties of the CodeBuild project + */ +export interface CommonProjectProps extends CommonStartBuildOptions { + /** + * A description of the project. Use the description to identify the purpose + * of the project. + * + * @default - No description. + */ + readonly description?: string; + + /** + * Indicates whether AWS CodeBuild generates a publicly accessible URL for + * your project's build badge. For more information, see Build Badges Sample + * in the AWS CodeBuild User Guide. + * + * @default false + */ + readonly badge?: boolean; /** * The physical, human-readable name of the CodeBuild Project. @@ -540,7 +550,10 @@ export interface CommonProjectProps { readonly grantReportGroupPermissions?: boolean; } -export interface ProjectProps extends CommonProjectProps { +/** + * Override properties of the CodeBuild project + */ +export interface StartBuildOptions extends CommonStartBuildOptions { /** * The source of the build. * *Note*: if {@link NoSource} is given as the source, @@ -577,6 +590,12 @@ export interface ProjectProps extends CommonProjectProps { readonly secondaryArtifacts?: IArtifacts[]; } +/** + * Properties of the CodeBuild project + */ +export interface ProjectProps extends StartBuildOptions, CommonProjectProps { +} + /** * The extra options passed to the {@link IProject.bindToCodePipeline} method. */ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/README.md b/packages/@aws-cdk/aws-stepfunctions-tasks/README.md index 269135eed0652..8a9a0866560e8 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/README.md +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/README.md @@ -342,11 +342,18 @@ const codebuildProject = new codebuild.Project(stack, 'Project', { const task = new tasks.CodeBuildStartBuild(stack, 'Task', { project: codebuildProject, integrationPattern: sfn.IntegrationPattern.RUN_JOB, - environmentVariablesOverride: { - ZONE: { - type: codebuild.BuildEnvironmentVariableType.PLAINTEXT, - value: sfn.JsonPath.stringAt('$.envVariables.zone'), + overrides: { + environmentVariables: { + ZONE: { + type: codebuild.BuildEnvironmentVariableType.PLAINTEXT, + value: sfn.JsonPath.stringAt('$.envVariables.zone'), + }, }, + source: codebuild.Source.gitHub({ + branchOrRef: sfn.JsonPath.stringAt('$.commitHash'), + owner, + repo, + }), }, }); ``` diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/codebuild/start-build.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/codebuild/start-build.ts index 939732e237d54..997d25b11a296 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/codebuild/start-build.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/codebuild/start-build.ts @@ -5,6 +5,26 @@ import * as cdk from '@aws-cdk/core'; import { Construct } from 'constructs'; import { integrationResourceArn, validatePatternSupported } from '../private/task-utils'; +/** + * Override properties for CodeBuildStartBuild + * + */ +export interface OverrideProjectProps extends codebuild.StartBuildOptions { + /** + * Specifies if session debugging is enabled for this build. + * + * @default - the session debugging is disabled. + */ + readonly debugSessionEnabled?: boolean; + + /** + * A unique, case sensitive identifier you provide to ensure the idempotency of the StartBuild request. + * + * @default - no idempotency token. + */ + readonly idempotencyToken?: string; +} + /** * Properties for CodeBuildStartBuild */ @@ -13,12 +33,21 @@ export interface CodeBuildStartBuildProps extends sfn.TaskStateBaseProps { * CodeBuild project to start */ readonly project: codebuild.IProject; + /** * A set of environment variables to be used for this build only. * + * @deprecated - use {@link OverrideProjectProps.environmentVariables} instead * @default - the latest environment variables already defined in the build project. */ readonly environmentVariablesOverride?: { [name: string]: codebuild.BuildEnvironmentVariable }; + + /** + * Override properties of the build of CodeBuild. + * + * @default - no override properties. + */ + readonly overrides?: OverrideProjectProps; } /** @@ -42,6 +71,7 @@ export class CodeBuildStartBuild extends sfn.TaskStateBase { this.integrationPattern = props.integrationPattern ?? sfn.IntegrationPattern.REQUEST_RESPONSE; validatePatternSupported(this.integrationPattern, CodeBuildStartBuild.SUPPORTED_INTEGRATION_PATTERNS); + this.validateOverridingParameters(props); this.taskMetrics = { metricPrefixSingular: 'CodeBuildProject', @@ -91,13 +121,52 @@ export class CodeBuildStartBuild extends sfn.TaskStateBase { * @internal */ protected _renderTask(): any { + const sourceConfig = this.props.overrides?.source?.bind(this.props.project.stack, this.props.project); + const secondarySources = this.props.overrides?.secondarySources?.map(source => source.bind(this.props.project.stack, this.props.project)); return { Resource: integrationResourceArn('codebuild', 'startBuild', this.integrationPattern), Parameters: sfn.FieldUtils.renderObject({ ProjectName: this.props.project.projectName, - EnvironmentVariablesOverride: this.props.environmentVariablesOverride - ? this.serializeEnvVariables(this.props.environmentVariablesOverride) - : undefined, + ArtifactsOverride: this.props.overrides?.artifacts?.bind(this.props.project.stack, this.props.project).artifactsProperty, + BuildspecOverride: this.props.overrides?.buildSpec?.toBuildSpec(), + BuildStatusConfigOverride: sourceConfig?.sourceProperty.buildStatusConfig, + ComputeTypeOverride: this.props.overrides?.environment?.computeType, + DebugSessionEnabled: this.props.overrides?.debugSessionEnabled, + EncryptionKeyOverride: this.props.overrides?.encryptionKey?.keyArn, + EnvironmentTypeOverride: this.props.overrides?.environment?.buildImage?.type, + EnvironmentVariablesOverride: this.props.overrides?.environmentVariables ? + this.serializeEnvVariables(this.props.overrides?.environmentVariables!) : + (this.props.environmentVariablesOverride + ? this.serializeEnvVariables(this.props.environmentVariablesOverride) + : undefined), + GitCloneDepthOverride: sourceConfig?.sourceProperty.gitCloneDepth, + GitSubmodulesConfigOverride: sourceConfig?.sourceProperty.gitSubmodulesConfig, + IdempotencyToken: this.props.overrides?.idempotencyToken, + ImageOverride: this.props.overrides?.environment?.buildImage?.imageId, + ImagePullCredentialsTypeOverride: this.props.overrides?.environment?.buildImage?.imagePullPrincipalType, + InsecureSslOverride: sourceConfig?.sourceProperty.insecureSsl, + PrivilegedModeOverride: this.props.overrides?.environment?.privileged, + RegistryCredentialOverride: this.props.overrides?.environment?.buildImage?.secretsManagerCredentials ? { + credentialProvider: 'SECRETS_MANAGER', + credential: this.props.overrides!.environment!.buildImage!.secretsManagerCredentials.secretArn, + } : undefined, + ReportBuildStatusOverride: sourceConfig?.sourceProperty.reportBuildStatus, + SecondaryArtifactsOverride: this.props.overrides?.secondaryArtifacts?.map(artifact => + artifact.bind(this.props.project.stack, this.props.project).artifactsProperty, + ), + SecondarySourcesOverride: secondarySources?.map(source => source.sourceProperty), + SecondarySourcesVersionOverride: secondarySources?.map(source => { + return { + sourceIdentifier: source.sourceProperty.sourceIdentifier, + sourceVersion: source.sourceVersion, + }; + }), + ServiceRoleOverride: this.props.overrides?.role?.roleArn, + SourceAuthOverride: sourceConfig?.sourceProperty.auth, + SourceLocationOverride: sourceConfig?.sourceProperty.location, + SourceTypeOverride: this.props.overrides?.source?.type, + SourceVersion: sourceConfig?.sourceVersion, + TimeoutInMinutesOverride: this.props.overrides?.timeout?.toMinutes(), }), }; } @@ -109,4 +178,17 @@ export class CodeBuildStartBuild extends sfn.TaskStateBase { Value: environmentVariables[name].value, })); } + + private validateOverridingParameters(props: CodeBuildStartBuildProps) { + if (props.overrides?.secondaryArtifacts && props.overrides!.secondaryArtifacts!.length > 12) { + throw new Error(`The maximum overrides that can be specified for 'secondaryArtifacts' is 12. Received: ${props.overrides!.secondaryArtifacts!.length}`); + } + if (props.overrides?.secondarySources && props.overrides!.secondarySources!.length > 12) { + throw new Error(`The maximum overrides that can be specified for 'secondarySources' is 12. Received: ${props.overrides!.secondarySources!.length}`); + } + if (props.overrides?.timeout && (props.overrides!.timeout!.toMinutes() < 5 + || props.overrides!.timeout!.toMinutes() > 480)) { + throw new Error('The value of override property "timeout" must be between 5 and 480 minutes.'); + } + } } diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build-override-options.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build-override-options.expected.json new file mode 100644 index 0000000000000..86d331d57d75e --- /dev/null +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build-override-options.expected.json @@ -0,0 +1,267 @@ +{ + "Resources": { + "ProjectRole4CCB274E": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "codebuild.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "ProjectRoleDefaultPolicy7F29461B": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":log-group:/aws/codebuild/", + { + "Ref": "ProjectC78D97AD" + } + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":log-group:/aws/codebuild/", + { + "Ref": "ProjectC78D97AD" + }, + ":*" + ] + ] + } + ] + }, + { + "Action": [ + "codebuild:CreateReportGroup", + "codebuild:CreateReport", + "codebuild:UpdateReport", + "codebuild:BatchPutTestCases", + "codebuild:BatchPutCodeCoverages" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":codebuild:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":report-group/", + { + "Ref": "ProjectC78D97AD" + }, + "-*" + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ProjectRoleDefaultPolicy7F29461B", + "Roles": [ + { + "Ref": "ProjectRole4CCB274E" + } + ] + } + }, + "ProjectC78D97AD": { + "Type": "AWS::CodeBuild::Project", + "Properties": { + "Artifacts": { + "Type": "NO_ARTIFACTS" + }, + "Environment": { + "ComputeType": "BUILD_GENERAL1_SMALL", + "EnvironmentVariables": [ + { + "Name": "zone", + "Type": "PLAINTEXT", + "Value": "defaultZone" + } + ], + "Image": "aws/codebuild/standard:1.0", + "ImagePullCredentialsType": "CODEBUILD", + "PrivilegedMode": false, + "Type": "LINUX_CONTAINER" + }, + "ServiceRole": { + "Fn::GetAtt": [ + "ProjectRole4CCB274E", + "Arn" + ] + }, + "Source": { + "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"echo \\\"Hello, CodeBuild!\\\"\"\n ]\n }\n }\n}", + "Type": "GITHUB", + "Location": "https://github.com/aws/aws-cdk.git", + "ReportBuildStatus": true + }, + "SourceVersion": "master", + "Name": "MyTestProject", + "EncryptionKey": "alias/aws/s3" + } + }, + "StateMachineRoleB840431D": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": { + "Fn::Join": [ + "", + [ + "states.", + { + "Ref": "AWS::Region" + }, + ".amazonaws.com" + ] + ] + } + } + } + ], + "Version": "2012-10-17" + } + } + }, + "StateMachineRoleDefaultPolicyDF1E6607": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "codebuild:StartBuild", + "codebuild:StopBuild", + "codebuild:BatchGetBuilds", + "codebuild:BatchGetReports" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "ProjectC78D97AD", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", + "Roles": [ + { + "Ref": "StateMachineRoleB840431D" + } + ] + } + }, + "StateMachine2E01A3A5": { + "Type": "AWS::StepFunctions::StateMachine", + "Properties": { + "RoleArn": { + "Fn::GetAtt": [ + "StateMachineRoleB840431D", + "Arn" + ] + }, + "DefinitionString": { + "Fn::Join": [ + "", + [ + "{\"StartAt\":\"Start\",\"States\":{\"Start\":{\"Type\":\"Pass\",\"Result\":{\"bar\":\"SomeValue\"},\"Next\":\"build-task\"},\"build-task\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"arn:", + { + "Ref": "AWS::Partition" + }, + ":states:::codebuild:startBuild\",\"Parameters\":{\"ProjectName\":\"", + { + "Ref": "ProjectC78D97AD" + }, + "\",\"ComputeTypeOverride\":\"BUILD_GENERAL1_2XLARGE\",\"EnvironmentVariablesOverride\":[{\"Name\":\"ZONE\",\"Type\":\"PLAINTEXT\",\"Value.$\":\"$.envVariables.zone\"}],\"ReportBuildStatusOverride\":true,\"SourceLocationOverride\":\"https://github.com/aws/aws-cdk.git\",\"SourceTypeOverride\":\"GITHUB\",\"SourceVersion.$\":\"$.sourceCommit\"}}}}" + ] + ] + } + }, + "DependsOn": [ + "StateMachineRoleDefaultPolicyDF1E6607", + "StateMachineRoleB840431D" + ] + } + }, + "Outputs": { + "ProjectName": { + "Value": { + "Ref": "ProjectC78D97AD" + } + }, + "StateMachineArn": { + "Value": { + "Ref": "StateMachine2E01A3A5" + } + } + } +} diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build-override-options.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build-override-options.ts new file mode 100644 index 0000000000000..7dba5af9551d9 --- /dev/null +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build-override-options.ts @@ -0,0 +1,88 @@ +import * as codebuild from '@aws-cdk/aws-codebuild'; +import * as sfn from '@aws-cdk/aws-stepfunctions'; +import * as cdk from '@aws-cdk/core'; +import * as tasks from '../../lib'; + +/* + * Stack verification steps: + * * aws stepfunctions start-execution --state-machine-arn : should return execution arn + * * aws codebuild list-builds-for-project --project-name : should return a list of projects with size greater than 0 + * * + * * aws codebuild batch-get-builds --ids --query 'builds[0].buildStatus': wait until the status is 'SUCCEEDED' + * * aws stepfunctions describe-execution --execution-arn --query 'status': should return status as SUCCEEDED + */ + +class StartBuildStack extends cdk.Stack { + constructor(scope: cdk.App, id: string, props: cdk.StackProps = {}) { + super(scope, id, props); + + const owner = 'aws'; + const repo = 'aws-cdk'; + const source = codebuild.Source.gitHub({ + owner, + repo, + branchOrRef: 'master', + }); + + let project = new codebuild.Project(this, 'Project', { + projectName: 'MyTestProject', + source, + buildSpec: codebuild.BuildSpec.fromObject({ + version: '0.2', + phases: { + build: { + commands: [ + 'echo "Hello, CodeBuild!"', + ], + }, + }, + }), + environmentVariables: { + zone: { + type: codebuild.BuildEnvironmentVariableType.PLAINTEXT, + value: 'defaultZone', + }, + }, + }); + + const sourceOverride = codebuild.Source.gitHub({ + branchOrRef: sfn.JsonPath.stringAt('$.sourceCommit'), + owner, + repo, + }); + let startBuild = new tasks.CodeBuildStartBuild(this, 'build-task', { + project: project, + overrides: { + source: sourceOverride, + environment: { + computeType: codebuild.ComputeType.X2_LARGE, + }, + environmentVariables: { + ZONE: { + type: codebuild.BuildEnvironmentVariableType.PLAINTEXT, + value: sfn.JsonPath.stringAt('$.envVariables.zone'), + }, + }, + }, + }); + + const definition = new sfn.Pass(this, 'Start', { + result: sfn.Result.fromObject({ bar: 'SomeValue' }), + }).next(startBuild); + + const stateMachine = new sfn.StateMachine(this, 'StateMachine', { + definition, + }); + + new cdk.CfnOutput(this, 'ProjectName', { + value: project.projectName, + }); + new cdk.CfnOutput(this, 'StateMachineArn', { + value: stateMachine.stateMachineArn, + }); + } +} + +const app = new cdk.App(); +new StartBuildStack(app, 'aws-stepfunctions-tasks-codebuild-start-build-integ'); +app.synth(); diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/start-build.test.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/start-build.test.ts index 0c71117392c5e..7dde84a1507f8 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/start-build.test.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/start-build.test.ts @@ -1,4 +1,5 @@ import * as codebuild from '@aws-cdk/aws-codebuild'; +import * as s3 from '@aws-cdk/aws-s3'; import * as sfn from '@aws-cdk/aws-stepfunctions'; import * as cdk from '@aws-cdk/core'; import { CodeBuildStartBuild } from '../../lib'; @@ -56,7 +57,53 @@ test('Task with only the required parameters', () => { }); }); -test('Task with all the parameters', () => { +test('Task with env variables parameters', () => { + // WHEN + const task = new CodeBuildStartBuild(stack, 'Task', { + project: codebuildProject, + integrationPattern: sfn.IntegrationPattern.RUN_JOB, + overrides: { + environmentVariables: { + env: { + type: codebuild.BuildEnvironmentVariableType.PLAINTEXT, + value: 'prod', + }, + }, + }, + }); + + // THEN + expect(stack.resolve(task.toStateJson())).toEqual({ + Type: 'Task', + Resource: { + 'Fn::Join': [ + '', + [ + 'arn:', + { + Ref: 'AWS::Partition', + }, + ':states:::codebuild:startBuild.sync', + ], + ], + }, + End: true, + Parameters: { + ProjectName: { + Ref: 'ProjectC78D97AD', + }, + EnvironmentVariablesOverride: [ + { + Name: 'env', + Type: codebuild.BuildEnvironmentVariableType.PLAINTEXT, + Value: 'prod', + }, + ], + }, + }); +}); + +test('Task with env variables parameters using the deprecated ', () => { // WHEN const task = new CodeBuildStartBuild(stack, 'Task', { project: codebuildProject, @@ -100,6 +147,149 @@ test('Task with all the parameters', () => { }); }); +test('Task with additional parameters(source, cache, artifacts and so on).', () => { + const bucket = new s3.Bucket(stack, 'Bucket'); + // WHEN + const task = new CodeBuildStartBuild(stack, 'Task', { + project: codebuildProject, + integrationPattern: sfn.IntegrationPattern.RUN_JOB, + overrides: { + timeout: cdk.Duration.seconds(60*60), + source: codebuild.Source.gitHub({ + branchOrRef: 'my-commit-hash', + owner: 'aws', + repo: 'aws-cdk', + }), + environment: { + computeType: codebuild.ComputeType.LARGE, + }, + secondaryArtifacts: [ + codebuild.Artifacts.s3({ + bucket, + }), + ], + secondarySources: [ + codebuild.Source.gitHub({ + owner: 'aws', + repo: 'aws-cdk', + cloneDepth: 1, + branchOrRef: 'feature-branch', + identifier: 'source2', + }), + ], + }, + }); + + // THEN + expect(stack.resolve(task.toStateJson())).toEqual({ + Type: 'Task', + Resource: { + 'Fn::Join': [ + '', + [ + 'arn:', + { + Ref: 'AWS::Partition', + }, + ':states:::codebuild:startBuild.sync', + ], + ], + }, + End: true, + Parameters: { + ComputeTypeOverride: 'BUILD_GENERAL1_LARGE', + ProjectName: { + Ref: 'ProjectC78D97AD', + }, + ReportBuildStatusOverride: true, + SecondaryArtifactsOverride: [ + { + type: 'S3', + location: { + Ref: 'Bucket83908E77', + }, + namespaceType: 'BUILD_ID', + overrideArtifactName: true, + packaging: 'ZIP', + }, + ], + SecondarySourcesOverride: [ + { + gitCloneDepth: 1, + location: 'https://github.com/aws/aws-cdk.git', + reportBuildStatus: true, + type: 'GITHUB', + sourceIdentifier: 'source2', + }, + ], + SecondarySourcesVersionOverride: [ + { + sourceIdentifier: 'source2', + sourceVersion: 'feature-branch', + }, + ], + SourceLocationOverride: 'https://github.com/aws/aws-cdk.git', + SourceTypeOverride: 'GITHUB', + SourceVersion: 'my-commit-hash', + TimeoutInMinutesOverride: 60, + }, + }); +}); + +test('Task with illegal queuedTimeoutInMinutesOverride parameter', () => { + expect(() => { + new CodeBuildStartBuild(stack, 'Task', { + project: codebuildProject, + overrides: { + timeout: cdk.Duration.seconds(180), + }, + }); + }).toThrow( + /The value of override property "timeout" must be between 5 and 480 minutes./, + ); + + expect(() => { + new CodeBuildStartBuild(stack, 'Task2', { + project: codebuildProject, + overrides: { + timeout: cdk.Duration.hours(10), + }, + }); + }).toThrow( + /The value of override property "timeout" must be between 5 and 480 minutes./, + ); +}); + +test('Task with illegal ovriride secondaryArtifacts parameter', () => { + expect(() => { + const bucket = new s3.Bucket(stack, 'Bucket'); + new CodeBuildStartBuild(stack, 'Task', { + project: codebuildProject, + overrides: { + secondaryArtifacts: Array.apply(null, Array(13)).map((_x, _i) => codebuild.Artifacts.s3({ bucket, path: _i.toString() })), + }, + }); + }).toThrow( + /The maximum overrides that can be specified for 'secondaryArtifacts' is 12. Received: 13/, + ); +}); + +test('Task with illegal ovriride secondarySources parameter', () => { + expect(() => { + new CodeBuildStartBuild(stack, 'Task', { + project: codebuildProject, + overrides: { + secondarySources: Array.apply(null, Array(14)).map((_x, _i) => codebuild.Source.gitHub({ + owner: 'aws', + repo: 'aws-cdk', + })), + }, + }); + }).toThrow( + /The maximum overrides that can be specified for 'secondarySources' is 12. Received: 14/, + ); +}); + test('supports tokens', () => { // WHEN const task = new CodeBuildStartBuild(stack, 'Task', { From 6d43bdaf7a84a0186435f10d5229557014f6f848 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 12 Nov 2020 22:29:09 +0000 Subject: [PATCH 125/314] chore(deps): bump aws-sdk from 2.790.0 to 2.791.0 (#11447) Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.790.0 to 2.791.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.790.0...v2.791.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/aws-cloudfront-origins/package.json | 2 +- packages/@aws-cdk/aws-cloudfront/package.json | 2 +- packages/@aws-cdk/aws-cloudtrail/package.json | 2 +- packages/@aws-cdk/aws-codebuild/package.json | 2 +- packages/@aws-cdk/aws-codecommit/package.json | 2 +- packages/@aws-cdk/aws-dynamodb/package.json | 2 +- packages/@aws-cdk/aws-eks/package.json | 2 +- packages/@aws-cdk/aws-events-targets/package.json | 2 +- packages/@aws-cdk/aws-logs/package.json | 2 +- packages/@aws-cdk/aws-route53/package.json | 2 +- packages/@aws-cdk/aws-sqs/package.json | 2 +- packages/@aws-cdk/custom-resources/package.json | 2 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- yarn.lock | 8 ++++---- 15 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudfront-origins/package.json b/packages/@aws-cdk/aws-cloudfront-origins/package.json index 3a2f8da53bcee..6891422fe274b 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/package.json +++ b/packages/@aws-cdk/aws-cloudfront-origins/package.json @@ -72,7 +72,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", - "aws-sdk": "^2.790.0", + "aws-sdk": "^2.791.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "pkglint": "0.0.0" diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index cbe98e36ec2cb..8cf3a2c5fc632 100644 --- a/packages/@aws-cdk/aws-cloudfront/package.json +++ b/packages/@aws-cdk/aws-cloudfront/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.790.0", + "aws-sdk": "^2.791.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index 265bc78a5133d..c31375fc5b528 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.790.0", + "aws-sdk": "^2.791.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codebuild/package.json b/packages/@aws-cdk/aws-codebuild/package.json index fd8384c9da842..f776977503df6 100644 --- a/packages/@aws-cdk/aws-codebuild/package.json +++ b/packages/@aws-cdk/aws-codebuild/package.json @@ -79,7 +79,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.790.0", + "aws-sdk": "^2.791.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codecommit/package.json b/packages/@aws-cdk/aws-codecommit/package.json index df66b2582f1e4..872966c9a78e6 100644 --- a/packages/@aws-cdk/aws-codecommit/package.json +++ b/packages/@aws-cdk/aws-codecommit/package.json @@ -79,7 +79,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.790.0", + "aws-sdk": "^2.791.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index 3ff3fa0d1a859..9ffc897f1b28a 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -74,7 +74,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/jest": "^26.0.15", - "aws-sdk": "^2.790.0", + "aws-sdk": "^2.791.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index dcbb43dceb5cb..0a5df12a22a81 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", "@types/yaml": "1.9.6", - "aws-sdk": "^2.790.0", + "aws-sdk": "^2.791.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index a0ba41f0e6682..cbd86ca1e61f5 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -75,7 +75,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-codecommit": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", - "aws-sdk": "^2.790.0", + "aws-sdk": "^2.791.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index b64ccc157d4f1..275a2cc729f49 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.790.0", + "aws-sdk": "^2.791.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-route53/package.json b/packages/@aws-cdk/aws-route53/package.json index 2d71393f32bd8..c0857a6fe8b85 100644 --- a/packages/@aws-cdk/aws-route53/package.json +++ b/packages/@aws-cdk/aws-route53/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.790.0", + "aws-sdk": "^2.791.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-sqs/package.json b/packages/@aws-cdk/aws-sqs/package.json index ccd18a54f2ac9..8abfea7aca109 100644 --- a/packages/@aws-cdk/aws-sqs/package.json +++ b/packages/@aws-cdk/aws-sqs/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.790.0", + "aws-sdk": "^2.791.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index cdae20b2b13e1..f1e07fa3ae06e 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -79,7 +79,7 @@ "@types/aws-lambda": "^8.10.64", "@types/fs-extra": "^8.1.1", "@types/sinon": "^9.0.8", - "aws-sdk": "^2.790.0", + "aws-sdk": "^2.791.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index dc7c21a9bd21e..475c599e4289a 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -71,7 +71,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.790.0", + "aws-sdk": "^2.791.0", "camelcase": "^6.2.0", "cdk-assets": "0.0.0", "colors": "^1.4.0", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index 0359545c0768b..15ccfe61cad61 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -47,7 +47,7 @@ "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.790.0", + "aws-sdk": "^2.791.0", "glob": "^7.1.6", "yargs": "^16.1.0" }, diff --git a/yarn.lock b/yarn.lock index 4dc926663112b..13a283b8b373f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3842,10 +3842,10 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" -aws-sdk@^2.637.0, aws-sdk@^2.790.0: - version "2.790.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.790.0.tgz#0c01634e59ff2a761e889808bee26dfd1ea28a2d" - integrity sha512-L278KsE+g/LsXIjLhpdtbvMcEZzZ/5dTBLIh6VIcNF0z63xlnDJQ4IWTDZ3Op5fK9B6vwQxlPT7XD5+egu+qoA== +aws-sdk@^2.637.0, aws-sdk@^2.791.0: + version "2.791.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.791.0.tgz#a85bedd46c97e0d262edb055651075c3171a171c" + integrity sha512-oIWu0hLKmDS+rOmjud2Z1CaDXtmxKSJF4937dSNLf/vNkxxjJA/6HapSfKqsraLnekI9DLP8uop5HnCHC++Abw== dependencies: buffer "4.9.2" events "1.1.1" From 58e6576a90f722929495b7cd9f1d67f93bf9c31e Mon Sep 17 00:00:00 2001 From: Amit Kumar <44288386+amitkumardeol@users.noreply.github.com> Date: Thu, 12 Nov 2020 22:57:50 +0000 Subject: [PATCH 126/314] fix(stepfunctions-tasks): incorrect policy for Athena prevents database deletions (#11427) Updated the resource name from `userdefinedfunction` to `userDefinedFunction`. closes #11357 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../lib/athena/start-query-execution.ts | 2 +- .../test/athena/integ.get-query-execution.expected.json | 4 ++-- .../test/athena/integ.get-query-results.expected.json | 4 ++-- .../test/athena/integ.start-query-execution.expected.json | 4 ++-- .../test/athena/integ.stop-query-execution.expected.json | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts index 44bccf9b2faca..893bb55af6b02 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts @@ -157,7 +157,7 @@ export class AthenaStartQueryExecution extends sfn.TaskStateBase { }), cdk.Stack.of(this).formatArn({ service: 'glue', - resource: 'userdefinedfunction', + resource: 'userDefinedFunction', resourceName: (this.props.queryExecutionContext?.databaseName ?? 'default') + '/*', // grant access to get all user defined functions for the particular database in the request or the default database https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awsglue.html }), ], diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.expected.json index 07442708a7080..2e06603d20af1 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.expected.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.expected.json @@ -89,7 +89,7 @@ "s3:ListBucket", "s3:GetBucketLocation", "s3:GetObject" - ], + ], "Effect": "Allow", "Resource": "*" }, @@ -208,7 +208,7 @@ { "Ref": "AWS::AccountId" }, - ":userdefinedfunction/mydatabase/*" + ":userDefinedFunction/mydatabase/*" ] ] } diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.expected.json index b11ec6cee2c3a..444c2edcf72de 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.expected.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.expected.json @@ -89,7 +89,7 @@ "s3:ListBucket", "s3:GetBucketLocation", "s3:GetObject" - ], + ], "Effect": "Allow", "Resource": "*" }, @@ -208,7 +208,7 @@ { "Ref": "AWS::AccountId" }, - ":userdefinedfunction/mydatabase/*" + ":userDefinedFunction/mydatabase/*" ] ] } diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.expected.json index 200fc56302b66..fb4d0e0169f51 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.expected.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.expected.json @@ -89,7 +89,7 @@ "s3:ListBucket", "s3:GetBucketLocation", "s3:GetObject" - ], + ], "Effect": "Allow", "Resource": "*" }, @@ -208,7 +208,7 @@ { "Ref": "AWS::AccountId" }, - ":userdefinedfunction/mydatabase/*" + ":userDefinedFunction/mydatabase/*" ] ] } diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.expected.json index a25e8d93b5bba..aa90bd274d85f 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.expected.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.expected.json @@ -89,7 +89,7 @@ "s3:ListBucket", "s3:GetBucketLocation", "s3:GetObject" - ], + ], "Effect": "Allow", "Resource": "*" }, @@ -208,7 +208,7 @@ { "Ref": "AWS::AccountId" }, - ":userdefinedfunction/mydatabase/*" + ":userDefinedFunction/mydatabase/*" ] ] } From 7d9d5757db2acedb507da8bb84c65cc06d018b91 Mon Sep 17 00:00:00 2001 From: Iiro Huikko Date: Fri, 13 Nov 2020 01:26:47 +0200 Subject: [PATCH 127/314] feat(codepipeline-actions): Add deployment timeout to EcsDeployAction (#11407) Add `DeploymentTimeout` configuration property to `EcsDeployAction`, described [here](https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference-ECS.html) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-codepipeline-actions/README.md | 1 + .../lib/ecs/deploy-action.ts | 20 +++++++- .../test/ecs/test.ecs-deploy-action.ts | 50 +++++++++++++++++++ .../integ.pipeline-ecs-deploy.expected.json | 3 +- .../test/integ.pipeline-ecs-deploy.ts | 1 + 5 files changed, 72 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/aws-codepipeline-actions/README.md b/packages/@aws-cdk/aws-codepipeline-actions/README.md index 6578110867b33..12e2bfa5437cf 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/README.md +++ b/packages/@aws-cdk/aws-codepipeline-actions/README.md @@ -646,6 +646,7 @@ const deployStage = pipeline.addStage({ // use the `imageFile` property, // and leave out the `input` property imageFile: buildOutput.atPath('imageDef.json'), + deploymentTimeout: cdk.Duration.minutes(60), // optional, default is 60 minutes }), ], }); diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/ecs/deploy-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/ecs/deploy-action.ts index eb2bd88a72100..ec5dfb7ad2999 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/ecs/deploy-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/ecs/deploy-action.ts @@ -1,7 +1,7 @@ import * as codepipeline from '@aws-cdk/aws-codepipeline'; import * as ecs from '@aws-cdk/aws-ecs'; import * as iam from '@aws-cdk/aws-iam'; -import { Construct } from '@aws-cdk/core'; +import { Construct, Duration } from '@aws-cdk/core'; import { Action } from '../action'; import { deployArtifactBounds } from '../common'; @@ -40,6 +40,14 @@ export interface EcsDeployActionProps extends codepipeline.CommonAwsActionProps * The ECS Service to deploy. */ readonly service: ecs.IBaseService; + + /** + * Timeout for the ECS deployment in minutes. Value must be between 1-60. + * + * @default - 60 minutes + * @see https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference-ECS.html + */ + readonly deploymentTimeout?: Duration; } /** @@ -47,6 +55,7 @@ export interface EcsDeployActionProps extends codepipeline.CommonAwsActionProps */ export class EcsDeployAction extends Action { private readonly props: EcsDeployActionProps; + private readonly deploymentTimeout?: number constructor(props: EcsDeployActionProps) { super({ @@ -58,7 +67,13 @@ export class EcsDeployAction extends Action { resource: props.service, }); + const deploymentTimeout = props.deploymentTimeout?.toMinutes({ integral: true }); + if (deploymentTimeout !== undefined && (deploymentTimeout < 1 || deploymentTimeout > 60)) { + throw new Error(`Deployment timeout must be between 1 and 60 minutes, got: ${deploymentTimeout}`); + } + this.props = props; + this.deploymentTimeout = deploymentTimeout; } protected bound(_scope: Construct, _stage: codepipeline.IStage, options: codepipeline.ActionBindOptions): @@ -96,7 +111,8 @@ export class EcsDeployAction extends Action { configuration: { ClusterName: this.props.service.cluster.clusterName, ServiceName: this.props.service.serviceName, - FileName: this.props.imageFile && this.props.imageFile.fileName, + FileName: this.props.imageFile?.fileName, + DeploymentTimeout: this.deploymentTimeout, }, }; } diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/ecs/test.ecs-deploy-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/ecs/test.ecs-deploy-action.ts index 8bc27b3a4a12e..1343850871206 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/ecs/test.ecs-deploy-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/ecs/test.ecs-deploy-action.ts @@ -68,6 +68,56 @@ export = { test.done(); }, + 'can be created with deploymentTimeout between 1-60 minutes'(test: Test) { + const service = anyEcsService(); + const artifact = new codepipeline.Artifact('Artifact'); + + test.doesNotThrow(() => { + new cpactions.EcsDeployAction({ + actionName: 'ECS', + service, + input: artifact, + deploymentTimeout: cdk.Duration.minutes(30), + }); + }); + + test.done(); + }, + + 'throws an exception if deploymentTimeout is out of bounds'(test: Test) { + const service = anyEcsService(); + const artifact = new codepipeline.Artifact('Artifact'); + + test.throws(() => { + new cpactions.EcsDeployAction({ + actionName: 'ECS', + service, + input: artifact, + deploymentTimeout: cdk.Duration.minutes(61), + }); + }, /timeout must be between 1 and 60 minutes/); + + test.throws(() => { + new cpactions.EcsDeployAction({ + actionName: 'ECS', + service, + input: artifact, + deploymentTimeout: cdk.Duration.minutes(0), + }); + }, /timeout must be between 1 and 60 minutes/); + + test.throws(() => { + new cpactions.EcsDeployAction({ + actionName: 'ECS', + service, + input: artifact, + deploymentTimeout: cdk.Duration.seconds(30), + }); + }, /cannot be converted into a whole number/); + + test.done(); + }, + "sets the target service as the action's backing resource"(test: Test) { const service = anyEcsService(); const artifact = new codepipeline.Artifact('Artifact'); diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.expected.json index 2d6b137036065..1114a3dc28356 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.expected.json +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.expected.json @@ -737,7 +737,8 @@ "FargateServiceAC2B3B85", "Name" ] - } + }, + "DeploymentTimeout": 60 }, "InputArtifacts": [ { diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts index e969e350482dc..08c5b970112b1 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts @@ -102,6 +102,7 @@ new codepipeline.Pipeline(stack, 'MyPipeline', { actionName: 'DeployAction', input: buildOutput, service, + deploymentTimeout: cdk.Duration.minutes(60), }), ], }, From 47e28d4c6ce79d84e307c2f8d33082d47a2cdabe Mon Sep 17 00:00:00 2001 From: Shiv Lakshminarayan Date: Thu, 12 Nov 2020 16:15:32 -0800 Subject: [PATCH 128/314] revert: "feat(stepfunctions-tasks): support overriding all properties of CodeBuild StartBuild integration (#10356)" (#11448) This reverts commit 58efbad743464439ce8eb97a6c6c3e07b531d93c. We have a latent issue which fails on generating the `Java` code with: > ProjectProps.java:[10,8] interface software.amazon.awscdk.services.codebuild.ProjectProps inherits unrelated defaults for getTimeout() from types software.amazon.awscdk.services.codebuild.StartBuildOptions and software.amazon.awscdk.services.codebuild.CommonProjectProps Reverting for now so we can sort the issue out and then we can re-introduce it. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-codebuild/lib/project.ts | 61 ++-- .../aws-stepfunctions-tasks/README.md | 15 +- .../lib/codebuild/start-build.ts | 88 +----- ...start-build-override-options.expected.json | 267 ------------------ .../integ.start-build-override-options.ts | 88 ------ .../test/codebuild/start-build.test.ts | 192 +------------ 6 files changed, 29 insertions(+), 682 deletions(-) delete mode 100644 packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build-override-options.expected.json delete mode 100644 packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build-override-options.ts diff --git a/packages/@aws-cdk/aws-codebuild/lib/project.ts b/packages/@aws-cdk/aws-codebuild/lib/project.ts index 8ac10c718953e..8bfc8f38e09cf 100644 --- a/packages/@aws-cdk/aws-codebuild/lib/project.ts +++ b/packages/@aws-cdk/aws-codebuild/lib/project.ts @@ -396,11 +396,14 @@ abstract class ProjectBase extends Resource implements IProject { } } -/** - * Common override properties of the CodeBuild project - * TODO: add properties `queuedTimeoutInMinutes`, `logsConfig` - */ -interface CommonStartBuildOptions { +export interface CommonProjectProps { + /** + * A description of the project. Use the description to identify the purpose + * of the project. + * + * @default - No description. + */ + readonly description?: string; /** * Filename or contents of buildspec in JSON format. @@ -410,6 +413,13 @@ interface CommonStartBuildOptions { */ readonly buildSpec?: BuildSpec; + /** + * Service Role to assume while running the build. + * + * @default - A role will be created. + */ + readonly role?: iam.IRole; + /** * Encryption key to use to read and write artifacts. * @@ -432,11 +442,13 @@ interface CommonStartBuildOptions { readonly environment?: BuildEnvironment; /** - * Service Role to assume while running the build. + * Indicates whether AWS CodeBuild generates a publicly accessible URL for + * your project's build badge. For more information, see Build Badges Sample + * in the AWS CodeBuild User Guide. * - * @default - A role will be created. + * @default false */ - readonly role?: iam.IRole; + readonly badge?: boolean; /** * The number of minutes after which AWS CodeBuild stops the build if it's @@ -453,28 +465,6 @@ interface CommonStartBuildOptions { * @default - No additional environment variables are specified. */ readonly environmentVariables?: { [name: string]: BuildEnvironmentVariable }; -} - -/** - * Common properties of the CodeBuild project - */ -export interface CommonProjectProps extends CommonStartBuildOptions { - /** - * A description of the project. Use the description to identify the purpose - * of the project. - * - * @default - No description. - */ - readonly description?: string; - - /** - * Indicates whether AWS CodeBuild generates a publicly accessible URL for - * your project's build badge. For more information, see Build Badges Sample - * in the AWS CodeBuild User Guide. - * - * @default false - */ - readonly badge?: boolean; /** * The physical, human-readable name of the CodeBuild Project. @@ -550,10 +540,7 @@ export interface CommonProjectProps extends CommonStartBuildOptions { readonly grantReportGroupPermissions?: boolean; } -/** - * Override properties of the CodeBuild project - */ -export interface StartBuildOptions extends CommonStartBuildOptions { +export interface ProjectProps extends CommonProjectProps { /** * The source of the build. * *Note*: if {@link NoSource} is given as the source, @@ -590,12 +577,6 @@ export interface StartBuildOptions extends CommonStartBuildOptions { readonly secondaryArtifacts?: IArtifacts[]; } -/** - * Properties of the CodeBuild project - */ -export interface ProjectProps extends StartBuildOptions, CommonProjectProps { -} - /** * The extra options passed to the {@link IProject.bindToCodePipeline} method. */ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/README.md b/packages/@aws-cdk/aws-stepfunctions-tasks/README.md index 8a9a0866560e8..269135eed0652 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/README.md +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/README.md @@ -342,18 +342,11 @@ const codebuildProject = new codebuild.Project(stack, 'Project', { const task = new tasks.CodeBuildStartBuild(stack, 'Task', { project: codebuildProject, integrationPattern: sfn.IntegrationPattern.RUN_JOB, - overrides: { - environmentVariables: { - ZONE: { - type: codebuild.BuildEnvironmentVariableType.PLAINTEXT, - value: sfn.JsonPath.stringAt('$.envVariables.zone'), - }, + environmentVariablesOverride: { + ZONE: { + type: codebuild.BuildEnvironmentVariableType.PLAINTEXT, + value: sfn.JsonPath.stringAt('$.envVariables.zone'), }, - source: codebuild.Source.gitHub({ - branchOrRef: sfn.JsonPath.stringAt('$.commitHash'), - owner, - repo, - }), }, }); ``` diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/codebuild/start-build.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/codebuild/start-build.ts index 997d25b11a296..939732e237d54 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/codebuild/start-build.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/codebuild/start-build.ts @@ -5,26 +5,6 @@ import * as cdk from '@aws-cdk/core'; import { Construct } from 'constructs'; import { integrationResourceArn, validatePatternSupported } from '../private/task-utils'; -/** - * Override properties for CodeBuildStartBuild - * - */ -export interface OverrideProjectProps extends codebuild.StartBuildOptions { - /** - * Specifies if session debugging is enabled for this build. - * - * @default - the session debugging is disabled. - */ - readonly debugSessionEnabled?: boolean; - - /** - * A unique, case sensitive identifier you provide to ensure the idempotency of the StartBuild request. - * - * @default - no idempotency token. - */ - readonly idempotencyToken?: string; -} - /** * Properties for CodeBuildStartBuild */ @@ -33,21 +13,12 @@ export interface CodeBuildStartBuildProps extends sfn.TaskStateBaseProps { * CodeBuild project to start */ readonly project: codebuild.IProject; - /** * A set of environment variables to be used for this build only. * - * @deprecated - use {@link OverrideProjectProps.environmentVariables} instead * @default - the latest environment variables already defined in the build project. */ readonly environmentVariablesOverride?: { [name: string]: codebuild.BuildEnvironmentVariable }; - - /** - * Override properties of the build of CodeBuild. - * - * @default - no override properties. - */ - readonly overrides?: OverrideProjectProps; } /** @@ -71,7 +42,6 @@ export class CodeBuildStartBuild extends sfn.TaskStateBase { this.integrationPattern = props.integrationPattern ?? sfn.IntegrationPattern.REQUEST_RESPONSE; validatePatternSupported(this.integrationPattern, CodeBuildStartBuild.SUPPORTED_INTEGRATION_PATTERNS); - this.validateOverridingParameters(props); this.taskMetrics = { metricPrefixSingular: 'CodeBuildProject', @@ -121,52 +91,13 @@ export class CodeBuildStartBuild extends sfn.TaskStateBase { * @internal */ protected _renderTask(): any { - const sourceConfig = this.props.overrides?.source?.bind(this.props.project.stack, this.props.project); - const secondarySources = this.props.overrides?.secondarySources?.map(source => source.bind(this.props.project.stack, this.props.project)); return { Resource: integrationResourceArn('codebuild', 'startBuild', this.integrationPattern), Parameters: sfn.FieldUtils.renderObject({ ProjectName: this.props.project.projectName, - ArtifactsOverride: this.props.overrides?.artifacts?.bind(this.props.project.stack, this.props.project).artifactsProperty, - BuildspecOverride: this.props.overrides?.buildSpec?.toBuildSpec(), - BuildStatusConfigOverride: sourceConfig?.sourceProperty.buildStatusConfig, - ComputeTypeOverride: this.props.overrides?.environment?.computeType, - DebugSessionEnabled: this.props.overrides?.debugSessionEnabled, - EncryptionKeyOverride: this.props.overrides?.encryptionKey?.keyArn, - EnvironmentTypeOverride: this.props.overrides?.environment?.buildImage?.type, - EnvironmentVariablesOverride: this.props.overrides?.environmentVariables ? - this.serializeEnvVariables(this.props.overrides?.environmentVariables!) : - (this.props.environmentVariablesOverride - ? this.serializeEnvVariables(this.props.environmentVariablesOverride) - : undefined), - GitCloneDepthOverride: sourceConfig?.sourceProperty.gitCloneDepth, - GitSubmodulesConfigOverride: sourceConfig?.sourceProperty.gitSubmodulesConfig, - IdempotencyToken: this.props.overrides?.idempotencyToken, - ImageOverride: this.props.overrides?.environment?.buildImage?.imageId, - ImagePullCredentialsTypeOverride: this.props.overrides?.environment?.buildImage?.imagePullPrincipalType, - InsecureSslOverride: sourceConfig?.sourceProperty.insecureSsl, - PrivilegedModeOverride: this.props.overrides?.environment?.privileged, - RegistryCredentialOverride: this.props.overrides?.environment?.buildImage?.secretsManagerCredentials ? { - credentialProvider: 'SECRETS_MANAGER', - credential: this.props.overrides!.environment!.buildImage!.secretsManagerCredentials.secretArn, - } : undefined, - ReportBuildStatusOverride: sourceConfig?.sourceProperty.reportBuildStatus, - SecondaryArtifactsOverride: this.props.overrides?.secondaryArtifacts?.map(artifact => - artifact.bind(this.props.project.stack, this.props.project).artifactsProperty, - ), - SecondarySourcesOverride: secondarySources?.map(source => source.sourceProperty), - SecondarySourcesVersionOverride: secondarySources?.map(source => { - return { - sourceIdentifier: source.sourceProperty.sourceIdentifier, - sourceVersion: source.sourceVersion, - }; - }), - ServiceRoleOverride: this.props.overrides?.role?.roleArn, - SourceAuthOverride: sourceConfig?.sourceProperty.auth, - SourceLocationOverride: sourceConfig?.sourceProperty.location, - SourceTypeOverride: this.props.overrides?.source?.type, - SourceVersion: sourceConfig?.sourceVersion, - TimeoutInMinutesOverride: this.props.overrides?.timeout?.toMinutes(), + EnvironmentVariablesOverride: this.props.environmentVariablesOverride + ? this.serializeEnvVariables(this.props.environmentVariablesOverride) + : undefined, }), }; } @@ -178,17 +109,4 @@ export class CodeBuildStartBuild extends sfn.TaskStateBase { Value: environmentVariables[name].value, })); } - - private validateOverridingParameters(props: CodeBuildStartBuildProps) { - if (props.overrides?.secondaryArtifacts && props.overrides!.secondaryArtifacts!.length > 12) { - throw new Error(`The maximum overrides that can be specified for 'secondaryArtifacts' is 12. Received: ${props.overrides!.secondaryArtifacts!.length}`); - } - if (props.overrides?.secondarySources && props.overrides!.secondarySources!.length > 12) { - throw new Error(`The maximum overrides that can be specified for 'secondarySources' is 12. Received: ${props.overrides!.secondarySources!.length}`); - } - if (props.overrides?.timeout && (props.overrides!.timeout!.toMinutes() < 5 - || props.overrides!.timeout!.toMinutes() > 480)) { - throw new Error('The value of override property "timeout" must be between 5 and 480 minutes.'); - } - } } diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build-override-options.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build-override-options.expected.json deleted file mode 100644 index 86d331d57d75e..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build-override-options.expected.json +++ /dev/null @@ -1,267 +0,0 @@ -{ - "Resources": { - "ProjectRole4CCB274E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ProjectRoleDefaultPolicy7F29461B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "ProjectC78D97AD" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "ProjectC78D97AD" - }, - ":*" - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:CreateReportGroup", - "codebuild:CreateReport", - "codebuild:UpdateReport", - "codebuild:BatchPutTestCases", - "codebuild:BatchPutCodeCoverages" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/", - { - "Ref": "ProjectC78D97AD" - }, - "-*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ProjectRoleDefaultPolicy7F29461B", - "Roles": [ - { - "Ref": "ProjectRole4CCB274E" - } - ] - } - }, - "ProjectC78D97AD": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "NO_ARTIFACTS" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "EnvironmentVariables": [ - { - "Name": "zone", - "Type": "PLAINTEXT", - "Value": "defaultZone" - } - ], - "Image": "aws/codebuild/standard:1.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "ProjectRole4CCB274E", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"echo \\\"Hello, CodeBuild!\\\"\"\n ]\n }\n }\n}", - "Type": "GITHUB", - "Location": "https://github.com/aws/aws-cdk.git", - "ReportBuildStatus": true - }, - "SourceVersion": "master", - "Name": "MyTestProject", - "EncryptionKey": "alias/aws/s3" - } - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:StartBuild", - "codebuild:StopBuild", - "codebuild:BatchGetBuilds", - "codebuild:BatchGetReports" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "ProjectC78D97AD", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Start\",\"States\":{\"Start\":{\"Type\":\"Pass\",\"Result\":{\"bar\":\"SomeValue\"},\"Next\":\"build-task\"},\"build-task\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::codebuild:startBuild\",\"Parameters\":{\"ProjectName\":\"", - { - "Ref": "ProjectC78D97AD" - }, - "\",\"ComputeTypeOverride\":\"BUILD_GENERAL1_2XLARGE\",\"EnvironmentVariablesOverride\":[{\"Name\":\"ZONE\",\"Type\":\"PLAINTEXT\",\"Value.$\":\"$.envVariables.zone\"}],\"ReportBuildStatusOverride\":true,\"SourceLocationOverride\":\"https://github.com/aws/aws-cdk.git\",\"SourceTypeOverride\":\"GITHUB\",\"SourceVersion.$\":\"$.sourceCommit\"}}}}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - }, - "Outputs": { - "ProjectName": { - "Value": { - "Ref": "ProjectC78D97AD" - } - }, - "StateMachineArn": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - } - } -} diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build-override-options.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build-override-options.ts deleted file mode 100644 index 7dba5af9551d9..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build-override-options.ts +++ /dev/null @@ -1,88 +0,0 @@ -import * as codebuild from '@aws-cdk/aws-codebuild'; -import * as sfn from '@aws-cdk/aws-stepfunctions'; -import * as cdk from '@aws-cdk/core'; -import * as tasks from '../../lib'; - -/* - * Stack verification steps: - * * aws stepfunctions start-execution --state-machine-arn : should return execution arn - * * aws codebuild list-builds-for-project --project-name : should return a list of projects with size greater than 0 - * * - * * aws codebuild batch-get-builds --ids --query 'builds[0].buildStatus': wait until the status is 'SUCCEEDED' - * * aws stepfunctions describe-execution --execution-arn --query 'status': should return status as SUCCEEDED - */ - -class StartBuildStack extends cdk.Stack { - constructor(scope: cdk.App, id: string, props: cdk.StackProps = {}) { - super(scope, id, props); - - const owner = 'aws'; - const repo = 'aws-cdk'; - const source = codebuild.Source.gitHub({ - owner, - repo, - branchOrRef: 'master', - }); - - let project = new codebuild.Project(this, 'Project', { - projectName: 'MyTestProject', - source, - buildSpec: codebuild.BuildSpec.fromObject({ - version: '0.2', - phases: { - build: { - commands: [ - 'echo "Hello, CodeBuild!"', - ], - }, - }, - }), - environmentVariables: { - zone: { - type: codebuild.BuildEnvironmentVariableType.PLAINTEXT, - value: 'defaultZone', - }, - }, - }); - - const sourceOverride = codebuild.Source.gitHub({ - branchOrRef: sfn.JsonPath.stringAt('$.sourceCommit'), - owner, - repo, - }); - let startBuild = new tasks.CodeBuildStartBuild(this, 'build-task', { - project: project, - overrides: { - source: sourceOverride, - environment: { - computeType: codebuild.ComputeType.X2_LARGE, - }, - environmentVariables: { - ZONE: { - type: codebuild.BuildEnvironmentVariableType.PLAINTEXT, - value: sfn.JsonPath.stringAt('$.envVariables.zone'), - }, - }, - }, - }); - - const definition = new sfn.Pass(this, 'Start', { - result: sfn.Result.fromObject({ bar: 'SomeValue' }), - }).next(startBuild); - - const stateMachine = new sfn.StateMachine(this, 'StateMachine', { - definition, - }); - - new cdk.CfnOutput(this, 'ProjectName', { - value: project.projectName, - }); - new cdk.CfnOutput(this, 'StateMachineArn', { - value: stateMachine.stateMachineArn, - }); - } -} - -const app = new cdk.App(); -new StartBuildStack(app, 'aws-stepfunctions-tasks-codebuild-start-build-integ'); -app.synth(); diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/start-build.test.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/start-build.test.ts index 7dde84a1507f8..0c71117392c5e 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/start-build.test.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/start-build.test.ts @@ -1,5 +1,4 @@ import * as codebuild from '@aws-cdk/aws-codebuild'; -import * as s3 from '@aws-cdk/aws-s3'; import * as sfn from '@aws-cdk/aws-stepfunctions'; import * as cdk from '@aws-cdk/core'; import { CodeBuildStartBuild } from '../../lib'; @@ -57,53 +56,7 @@ test('Task with only the required parameters', () => { }); }); -test('Task with env variables parameters', () => { - // WHEN - const task = new CodeBuildStartBuild(stack, 'Task', { - project: codebuildProject, - integrationPattern: sfn.IntegrationPattern.RUN_JOB, - overrides: { - environmentVariables: { - env: { - type: codebuild.BuildEnvironmentVariableType.PLAINTEXT, - value: 'prod', - }, - }, - }, - }); - - // THEN - expect(stack.resolve(task.toStateJson())).toEqual({ - Type: 'Task', - Resource: { - 'Fn::Join': [ - '', - [ - 'arn:', - { - Ref: 'AWS::Partition', - }, - ':states:::codebuild:startBuild.sync', - ], - ], - }, - End: true, - Parameters: { - ProjectName: { - Ref: 'ProjectC78D97AD', - }, - EnvironmentVariablesOverride: [ - { - Name: 'env', - Type: codebuild.BuildEnvironmentVariableType.PLAINTEXT, - Value: 'prod', - }, - ], - }, - }); -}); - -test('Task with env variables parameters using the deprecated ', () => { +test('Task with all the parameters', () => { // WHEN const task = new CodeBuildStartBuild(stack, 'Task', { project: codebuildProject, @@ -147,149 +100,6 @@ test('Task with env variables parameters using the deprecated ', () => { }); }); -test('Task with additional parameters(source, cache, artifacts and so on).', () => { - const bucket = new s3.Bucket(stack, 'Bucket'); - // WHEN - const task = new CodeBuildStartBuild(stack, 'Task', { - project: codebuildProject, - integrationPattern: sfn.IntegrationPattern.RUN_JOB, - overrides: { - timeout: cdk.Duration.seconds(60*60), - source: codebuild.Source.gitHub({ - branchOrRef: 'my-commit-hash', - owner: 'aws', - repo: 'aws-cdk', - }), - environment: { - computeType: codebuild.ComputeType.LARGE, - }, - secondaryArtifacts: [ - codebuild.Artifacts.s3({ - bucket, - }), - ], - secondarySources: [ - codebuild.Source.gitHub({ - owner: 'aws', - repo: 'aws-cdk', - cloneDepth: 1, - branchOrRef: 'feature-branch', - identifier: 'source2', - }), - ], - }, - }); - - // THEN - expect(stack.resolve(task.toStateJson())).toEqual({ - Type: 'Task', - Resource: { - 'Fn::Join': [ - '', - [ - 'arn:', - { - Ref: 'AWS::Partition', - }, - ':states:::codebuild:startBuild.sync', - ], - ], - }, - End: true, - Parameters: { - ComputeTypeOverride: 'BUILD_GENERAL1_LARGE', - ProjectName: { - Ref: 'ProjectC78D97AD', - }, - ReportBuildStatusOverride: true, - SecondaryArtifactsOverride: [ - { - type: 'S3', - location: { - Ref: 'Bucket83908E77', - }, - namespaceType: 'BUILD_ID', - overrideArtifactName: true, - packaging: 'ZIP', - }, - ], - SecondarySourcesOverride: [ - { - gitCloneDepth: 1, - location: 'https://github.com/aws/aws-cdk.git', - reportBuildStatus: true, - type: 'GITHUB', - sourceIdentifier: 'source2', - }, - ], - SecondarySourcesVersionOverride: [ - { - sourceIdentifier: 'source2', - sourceVersion: 'feature-branch', - }, - ], - SourceLocationOverride: 'https://github.com/aws/aws-cdk.git', - SourceTypeOverride: 'GITHUB', - SourceVersion: 'my-commit-hash', - TimeoutInMinutesOverride: 60, - }, - }); -}); - -test('Task with illegal queuedTimeoutInMinutesOverride parameter', () => { - expect(() => { - new CodeBuildStartBuild(stack, 'Task', { - project: codebuildProject, - overrides: { - timeout: cdk.Duration.seconds(180), - }, - }); - }).toThrow( - /The value of override property "timeout" must be between 5 and 480 minutes./, - ); - - expect(() => { - new CodeBuildStartBuild(stack, 'Task2', { - project: codebuildProject, - overrides: { - timeout: cdk.Duration.hours(10), - }, - }); - }).toThrow( - /The value of override property "timeout" must be between 5 and 480 minutes./, - ); -}); - -test('Task with illegal ovriride secondaryArtifacts parameter', () => { - expect(() => { - const bucket = new s3.Bucket(stack, 'Bucket'); - new CodeBuildStartBuild(stack, 'Task', { - project: codebuildProject, - overrides: { - secondaryArtifacts: Array.apply(null, Array(13)).map((_x, _i) => codebuild.Artifacts.s3({ bucket, path: _i.toString() })), - }, - }); - }).toThrow( - /The maximum overrides that can be specified for 'secondaryArtifacts' is 12. Received: 13/, - ); -}); - -test('Task with illegal ovriride secondarySources parameter', () => { - expect(() => { - new CodeBuildStartBuild(stack, 'Task', { - project: codebuildProject, - overrides: { - secondarySources: Array.apply(null, Array(14)).map((_x, _i) => codebuild.Source.gitHub({ - owner: 'aws', - repo: 'aws-cdk', - })), - }, - }); - }).toThrow( - /The maximum overrides that can be specified for 'secondarySources' is 12. Received: 14/, - ); -}); - test('supports tokens', () => { // WHEN const task = new CodeBuildStartBuild(stack, 'Task', { From af8cf13c346e3df0e62586a31e00d3a2b77d2523 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 13 Nov 2020 00:51:43 +0000 Subject: [PATCH 129/314] chore(deps-dev): bump parcel from 2.0.0-nightly.444 to 2.0.0-nightly.445 (#11449) Bumps [parcel](https://github.com/parcel-bundler/parcel) from 2.0.0-nightly.444 to 2.0.0-nightly.445. - [Release notes](https://github.com/parcel-bundler/parcel/releases) - [Changelog](https://github.com/parcel-bundler/parcel/blob/v2/CHANGELOG.md) - [Commits](https://github.com/parcel-bundler/parcel/commits) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- .../@aws-cdk/aws-lambda-nodejs/package.json | 2 +- yarn.lock | 920 +++++++++--------- 2 files changed, 461 insertions(+), 461 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda-nodejs/package.json b/packages/@aws-cdk/aws-lambda-nodejs/package.json index cf929a95db74c..7a60283364ac8 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/package.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/package.json @@ -67,7 +67,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "delay": "4.4.0", - "parcel": "2.0.0-nightly.444", + "parcel": "2.0.0-nightly.445", "pkglint": "0.0.0" }, "dependencies": { diff --git a/yarn.lock b/yarn.lock index 13a283b8b373f..9d88cd15951c2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2159,128 +2159,128 @@ dependencies: "@types/node" ">= 8" -"@parcel/babel-ast-utils@2.0.0-nightly.2068+3bfef282": - version "2.0.0-nightly.2068" - resolved "https://registry.yarnpkg.com/@parcel/babel-ast-utils/-/babel-ast-utils-2.0.0-nightly.2068.tgz#3671e1a2fecfd521414e992cbdd9a60552b3a174" - integrity sha512-5tAgLraq10c8GY7iInEUAQbxGigWAM6+X6K4L5hgns4pw6QgD5+XtDsAbQ4r5x6cHsxXDsPpJWtRPUNrVPBoyQ== +"@parcel/babel-ast-utils@2.0.0-nightly.2069+3df3153b": + version "2.0.0-nightly.2069" + resolved "https://registry.yarnpkg.com/@parcel/babel-ast-utils/-/babel-ast-utils-2.0.0-nightly.2069.tgz#40a56e7ad51b7e0c7ede4d1b661cf32ea9f78a0f" + integrity sha512-AWeNeJVJPf3U8KBf5TiB/ZNC0WvdnY3gAPhEpDoSOM4fpUiTsQSzDjfh+lCJarVnDgATudPIvQCXmQJXn6+dug== dependencies: "@babel/generator" "^7.0.0" "@babel/parser" "^7.0.0" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" -"@parcel/babel-preset-env@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/babel-preset-env/-/babel-preset-env-2.0.0-nightly.446.tgz#2a2718e9245762b1444970571fb373e5e419db92" - integrity sha512-vW18hGRxSw/Lul9GFm5p6+yJt7OIW6opCSIakza7Ed/D+fgCmCtrb1v+B0phpB9CgK/Q19BXY3INemELF/1G+w== +"@parcel/babel-preset-env@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/babel-preset-env/-/babel-preset-env-2.0.0-nightly.447.tgz#049c3b3d3a5f56885e5c50bb15673f92ad76e6f8" + integrity sha512-84Ya/ACzm65xyWQm+NiWNOeN3vR6dgQSl0BLPHOGVf08SrpNzfdt2qVotPp4lfPP/tEjuMTElcOWzwI3zD7EUQ== dependencies: "@babel/preset-env" "^7.4.0" semver "^5.4.1" -"@parcel/babylon-walk@2.0.0-nightly.2068+3bfef282": - version "2.0.0-nightly.2068" - resolved "https://registry.yarnpkg.com/@parcel/babylon-walk/-/babylon-walk-2.0.0-nightly.2068.tgz#4e825d931124c340c4031964236942b50093287c" - integrity sha512-f5jj0MRGMR78whdcDKIRQ5mmhv0mJCRcrTAUibYz7qzaAdZaVR5uOQ0N+AzSN4v5S2F4uw7AtwWph5YnWCJKcA== +"@parcel/babylon-walk@2.0.0-nightly.2069+3df3153b": + version "2.0.0-nightly.2069" + resolved "https://registry.yarnpkg.com/@parcel/babylon-walk/-/babylon-walk-2.0.0-nightly.2069.tgz#68c4ce70174031b1c8a3ddd0c079ab0704489968" + integrity sha512-B1ZO4c3pQWfB5D0TsVYzHMQ6R949yOvqxuS++WTxbGYEgDgwp2cyQt2Hurqn/fmnadxkCY/kwWaMPpasg+xSiQ== dependencies: "@babel/types" "^7.0.0" lodash.clone "^4.5.0" -"@parcel/bundler-default@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.0.0-nightly.446.tgz#e993ed9904771d517bb1b574eab3f668883e9828" - integrity sha512-MWeDM2i9SY5qgbtogzPeaWmR0lgBH+jyYlEjzPPb5QLEB3vPBAZxLOp2s8d7EHy/nNHmKy22znzHg7lsftCkqg== +"@parcel/bundler-default@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.0.0-nightly.447.tgz#9e9e6457fafdb922c0b292e856cea20c8808e8fb" + integrity sha512-FEKLVtPIef47YxMJFzw0xB3EWwBEn9dVlA18semsIEOGIp3wrpNLceEVU+IKstbMx3r/VjdpOeoquXrfMJUYLA== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.446+3bfef282" - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/diagnostic" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" nullthrows "^1.1.1" -"@parcel/cache@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/cache/-/cache-2.0.0-nightly.446.tgz#0cbcd98dc7c2896bc190809ced9bdb1a159b7f3c" - integrity sha512-Hqs+tA7pFm4EekHAv+QxUvqhwXclbafqTTYZKf1FXC3erQmhXeMdXBcpEeP6yZjJ1ZM5FEqjK+L8LOTcHoriWQ== +"@parcel/cache@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/cache/-/cache-2.0.0-nightly.447.tgz#02b84b134095738b4c6dcd1b64d2cc4d0bb5bdf1" + integrity sha512-GOr2zrrp39IKv+px7SEWRge+akUvXl7QlL3cXrqe01XngGc4ZEtnDZ6sI1B38zv+mIlIW/cPghfv8KTMZsGOPg== dependencies: - "@parcel/logger" "2.0.0-nightly.446+3bfef282" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/logger" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" -"@parcel/codeframe@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/codeframe/-/codeframe-2.0.0-nightly.446.tgz#c017240ad1868ef3d68a62510fe6c1795da40ba2" - integrity sha512-78jYfjl7qWIsltPUTfdvhzZCQtrP2e4IKiKItc3ToJgBIfkFnA0RT6EXKqlaecZQsJxsD/L5aNMpMVtCc70Zag== +"@parcel/codeframe@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/codeframe/-/codeframe-2.0.0-nightly.447.tgz#c5605048882a26d32b6715fd5523dcd9b420934c" + integrity sha512-XWJe+soRxSs/iwEBGlXYtOXE1X5ZkCR6St9XDgVMJZKTf/zT3PTU2i28ni8+TQForI3bugK1/UqnF5sOvsuXmw== dependencies: chalk "^2.4.2" emphasize "^2.1.0" slice-ansi "^4.0.0" string-width "^4.2.0" -"@parcel/config-default@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/config-default/-/config-default-2.0.0-nightly.446.tgz#b0e51e62144add5da02e6ecd00ab7740b632f15b" - integrity sha512-VZPqQ1E43DxYzs5eYD9V/h4QtWLENaP6oOiFUtKDVRUftBfPXHP43TldKaIYHcKcWFTRTz16D3rrvzCw3DYGOw== - dependencies: - "@parcel/bundler-default" "2.0.0-nightly.446+3bfef282" - "@parcel/namer-default" "2.0.0-nightly.446+3bfef282" - "@parcel/optimizer-cssnano" "2.0.0-nightly.446+3bfef282" - "@parcel/optimizer-data-url" "2.0.0-nightly.446+3bfef282" - "@parcel/optimizer-htmlnano" "2.0.0-nightly.446+3bfef282" - "@parcel/optimizer-terser" "2.0.0-nightly.446+3bfef282" - "@parcel/packager-css" "2.0.0-nightly.446+3bfef282" - "@parcel/packager-html" "2.0.0-nightly.446+3bfef282" - "@parcel/packager-js" "2.0.0-nightly.446+3bfef282" - "@parcel/packager-raw" "2.0.0-nightly.446+3bfef282" - "@parcel/packager-raw-url" "2.0.0-nightly.2068+3bfef282" - "@parcel/packager-ts" "2.0.0-nightly.446+3bfef282" - "@parcel/reporter-bundle-analyzer" "2.0.0-nightly.2068+3bfef282" - "@parcel/reporter-bundle-buddy" "2.0.0-nightly.2068+3bfef282" - "@parcel/reporter-cli" "2.0.0-nightly.446+3bfef282" - "@parcel/reporter-dev-server" "2.0.0-nightly.446+3bfef282" - "@parcel/resolver-default" "2.0.0-nightly.446+3bfef282" - "@parcel/runtime-browser-hmr" "2.0.0-nightly.446+3bfef282" - "@parcel/runtime-js" "2.0.0-nightly.446+3bfef282" - "@parcel/runtime-react-refresh" "2.0.0-nightly.446+3bfef282" - "@parcel/transformer-babel" "2.0.0-nightly.446+3bfef282" - "@parcel/transformer-coffeescript" "2.0.0-nightly.446+3bfef282" - "@parcel/transformer-css" "2.0.0-nightly.446+3bfef282" - "@parcel/transformer-glsl" "2.0.0-nightly.2068+3bfef282" - "@parcel/transformer-graphql" "2.0.0-nightly.446+3bfef282" - "@parcel/transformer-html" "2.0.0-nightly.446+3bfef282" - "@parcel/transformer-image" "2.0.0-nightly.2068+3bfef282" - "@parcel/transformer-inline-string" "2.0.0-nightly.446+3bfef282" - "@parcel/transformer-js" "2.0.0-nightly.446+3bfef282" - "@parcel/transformer-json" "2.0.0-nightly.446+3bfef282" - "@parcel/transformer-jsonld" "2.0.0-nightly.2068+3bfef282" - "@parcel/transformer-less" "2.0.0-nightly.446+3bfef282" - "@parcel/transformer-mdx" "2.0.0-nightly.2068+3bfef282" - "@parcel/transformer-postcss" "2.0.0-nightly.446+3bfef282" - "@parcel/transformer-posthtml" "2.0.0-nightly.446+3bfef282" - "@parcel/transformer-pug" "2.0.0-nightly.446+3bfef282" - "@parcel/transformer-raw" "2.0.0-nightly.446+3bfef282" - "@parcel/transformer-react-refresh-babel" "2.0.0-nightly.446+3bfef282" - "@parcel/transformer-react-refresh-wrap" "2.0.0-nightly.446+3bfef282" - "@parcel/transformer-sass" "2.0.0-nightly.446+3bfef282" - "@parcel/transformer-stylus" "2.0.0-nightly.446+3bfef282" - "@parcel/transformer-sugarss" "2.0.0-nightly.446+3bfef282" - "@parcel/transformer-toml" "2.0.0-nightly.446+3bfef282" - "@parcel/transformer-typescript-types" "2.0.0-nightly.446+3bfef282" - "@parcel/transformer-vue" "2.0.0-nightly.2068+3bfef282" - "@parcel/transformer-yaml" "2.0.0-nightly.446+3bfef282" - -"@parcel/core@2.0.0-nightly.444+3bfef282": - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/@parcel/core/-/core-2.0.0-nightly.444.tgz#cc652b318155cd3d228583efc2a607a05910af3c" - integrity sha512-zAOBus2xVDOcOebHBOHW7MEX7nvDUfBKWe3dSvgSu71STHQOU7rDvl/jTOx9fJ5JsQ7rD87xIhEmzvLXCOdfgw== - dependencies: - "@parcel/cache" "2.0.0-nightly.446+3bfef282" - "@parcel/diagnostic" "2.0.0-nightly.446+3bfef282" - "@parcel/events" "2.0.0-nightly.446+3bfef282" - "@parcel/fs" "2.0.0-nightly.446+3bfef282" - "@parcel/logger" "2.0.0-nightly.446+3bfef282" - "@parcel/package-manager" "2.0.0-nightly.446+3bfef282" - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" +"@parcel/config-default@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/config-default/-/config-default-2.0.0-nightly.447.tgz#82224b0981ebbfbd9f69886eaea0e491ea8a17b8" + integrity sha512-kpOQh5N9mdo2Se8ihOVvup3VoEFZAVtXsmEO69hylsdjugmM/v9cqnIZVY2ouVaVCI6ARpfie7l/zaPIHkJNyQ== + dependencies: + "@parcel/bundler-default" "2.0.0-nightly.447+3df3153b" + "@parcel/namer-default" "2.0.0-nightly.447+3df3153b" + "@parcel/optimizer-cssnano" "2.0.0-nightly.447+3df3153b" + "@parcel/optimizer-data-url" "2.0.0-nightly.447+3df3153b" + "@parcel/optimizer-htmlnano" "2.0.0-nightly.447+3df3153b" + "@parcel/optimizer-terser" "2.0.0-nightly.447+3df3153b" + "@parcel/packager-css" "2.0.0-nightly.447+3df3153b" + "@parcel/packager-html" "2.0.0-nightly.447+3df3153b" + "@parcel/packager-js" "2.0.0-nightly.447+3df3153b" + "@parcel/packager-raw" "2.0.0-nightly.447+3df3153b" + "@parcel/packager-raw-url" "2.0.0-nightly.2069+3df3153b" + "@parcel/packager-ts" "2.0.0-nightly.447+3df3153b" + "@parcel/reporter-bundle-analyzer" "2.0.0-nightly.2069+3df3153b" + "@parcel/reporter-bundle-buddy" "2.0.0-nightly.2069+3df3153b" + "@parcel/reporter-cli" "2.0.0-nightly.447+3df3153b" + "@parcel/reporter-dev-server" "2.0.0-nightly.447+3df3153b" + "@parcel/resolver-default" "2.0.0-nightly.447+3df3153b" + "@parcel/runtime-browser-hmr" "2.0.0-nightly.447+3df3153b" + "@parcel/runtime-js" "2.0.0-nightly.447+3df3153b" + "@parcel/runtime-react-refresh" "2.0.0-nightly.447+3df3153b" + "@parcel/transformer-babel" "2.0.0-nightly.447+3df3153b" + "@parcel/transformer-coffeescript" "2.0.0-nightly.447+3df3153b" + "@parcel/transformer-css" "2.0.0-nightly.447+3df3153b" + "@parcel/transformer-glsl" "2.0.0-nightly.2069+3df3153b" + "@parcel/transformer-graphql" "2.0.0-nightly.447+3df3153b" + "@parcel/transformer-html" "2.0.0-nightly.447+3df3153b" + "@parcel/transformer-image" "2.0.0-nightly.2069+3df3153b" + "@parcel/transformer-inline-string" "2.0.0-nightly.447+3df3153b" + "@parcel/transformer-js" "2.0.0-nightly.447+3df3153b" + "@parcel/transformer-json" "2.0.0-nightly.447+3df3153b" + "@parcel/transformer-jsonld" "2.0.0-nightly.2069+3df3153b" + "@parcel/transformer-less" "2.0.0-nightly.447+3df3153b" + "@parcel/transformer-mdx" "2.0.0-nightly.2069+3df3153b" + "@parcel/transformer-postcss" "2.0.0-nightly.447+3df3153b" + "@parcel/transformer-posthtml" "2.0.0-nightly.447+3df3153b" + "@parcel/transformer-pug" "2.0.0-nightly.447+3df3153b" + "@parcel/transformer-raw" "2.0.0-nightly.447+3df3153b" + "@parcel/transformer-react-refresh-babel" "2.0.0-nightly.447+3df3153b" + "@parcel/transformer-react-refresh-wrap" "2.0.0-nightly.447+3df3153b" + "@parcel/transformer-sass" "2.0.0-nightly.447+3df3153b" + "@parcel/transformer-stylus" "2.0.0-nightly.447+3df3153b" + "@parcel/transformer-sugarss" "2.0.0-nightly.447+3df3153b" + "@parcel/transformer-toml" "2.0.0-nightly.447+3df3153b" + "@parcel/transformer-typescript-types" "2.0.0-nightly.447+3df3153b" + "@parcel/transformer-vue" "2.0.0-nightly.2069+3df3153b" + "@parcel/transformer-yaml" "2.0.0-nightly.447+3df3153b" + +"@parcel/core@2.0.0-nightly.445+3df3153b": + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/@parcel/core/-/core-2.0.0-nightly.445.tgz#a1d337cdf33e7be7371e8001813afad9db7ef5dc" + integrity sha512-KLhER08w9dL2lgKu+NjkPs1OpFMiBZGdnvdy0A8T7rOTBqtApyTBm+x1NnlTQMywpTCODctPYLGf8vYAXo7ZKA== + dependencies: + "@parcel/cache" "2.0.0-nightly.447+3df3153b" + "@parcel/diagnostic" "2.0.0-nightly.447+3df3153b" + "@parcel/events" "2.0.0-nightly.447+3df3153b" + "@parcel/fs" "2.0.0-nightly.447+3df3153b" + "@parcel/logger" "2.0.0-nightly.447+3df3153b" + "@parcel/package-manager" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/types" "2.0.0-nightly.446+3bfef282" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" - "@parcel/workers" "2.0.0-nightly.446+3bfef282" + "@parcel/types" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/workers" "2.0.0-nightly.447+3df3153b" abortcontroller-polyfill "^1.1.9" base-x "^3.0.8" browserslist "^4.6.6" @@ -2294,72 +2294,72 @@ querystring "^0.2.0" semver "^5.4.1" -"@parcel/diagnostic@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/diagnostic/-/diagnostic-2.0.0-nightly.446.tgz#f0c0136bc9bf7e45491fe5789f4463a2a7922658" - integrity sha512-NPJNcbO5D1rpdiD57AJy77CmqgODq+Adjvk8ntt8yD/jVpzUp1ju21Ql3HbsuHDT5XFu8xEh2xUYgwuUy9KGAg== +"@parcel/diagnostic@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/diagnostic/-/diagnostic-2.0.0-nightly.447.tgz#f8de06669979e438b5985ee06585e0400a9acf2a" + integrity sha512-VMoMK4xc83/bKITgzkB4vzz2YlYlKVDgHAIXUijISVnE1pvZHFJP9Uyw4aQ2l4nA1uILa8fQER0J14ayIGouoQ== dependencies: json-source-map "^0.6.1" nullthrows "^1.1.1" -"@parcel/events@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/events/-/events-2.0.0-nightly.446.tgz#82557b5f067b0adf17a391f028012ab6f21d7866" - integrity sha512-yShzChGKaDscBBIKcyy6eXX3/vXjne3pYkcBE+26vXATcDLhZr7ntN/LvBsgJ+/4a40lszymkc06aKDusBhCEA== +"@parcel/events@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/events/-/events-2.0.0-nightly.447.tgz#2608cd24c70993028f04a2d150e11e41c0554af1" + integrity sha512-5f6/d8i8Gavc6/RTC8XNZY0X4wpwnjx/edWUchk74j+RQd9ddslvVV41sHRkFER0ZlxQsMStDUZwKk+rmLwn7g== -"@parcel/fs-write-stream-atomic@2.0.0-nightly.2068+3bfef282": - version "2.0.0-nightly.2068" - resolved "https://registry.yarnpkg.com/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.0-nightly.2068.tgz#a28e376bda170365665f681127715bc1b16b294e" - integrity sha512-HtBdsaMrXMOFzE+5k/Hsji4IGGmuVhvEBKBGjqFo5FYvrlaYsqT3fX7rFIxg5su4qFMMEZU24RI6IXVlFSoAKw== +"@parcel/fs-write-stream-atomic@2.0.0-nightly.2069+3df3153b": + version "2.0.0-nightly.2069" + resolved "https://registry.yarnpkg.com/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.0-nightly.2069.tgz#75c14d11ce7eec960202527dc5530c97b2f38463" + integrity sha512-T3k8rhynHVQL12BKbvb4HYi3FjpJh4bEMAAoPoPY/VYDZ3nox3hE1vZGFyRyJqgQBP5gFCggj8MUvd5DeLt4AQ== dependencies: graceful-fs "^4.1.2" iferr "^1.0.2" imurmurhash "^0.1.4" readable-stream "1 || 2" -"@parcel/fs@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-2.0.0-nightly.446.tgz#82cf51e6d48e207661ecb93a4847cf02d8f2a87f" - integrity sha512-K5k+j/DPG9EP0XOr2LJp0mQAodrpscIwSjWGMOvdEvGbY25FP4NB8Sg2Xs00KCaZVNlsKsrMpOsJyohP3ePpbg== +"@parcel/fs@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-2.0.0-nightly.447.tgz#73cade111d8a6944f891417de7e982db3d12ac41" + integrity sha512-WregzLdnoQ3bl3/UzZp6SJp1CklMoSQM7fqzbGsbdnfON9e/MalfvjSmKtOUqCpqcK2RzvI1LFLw6alOxqOuHg== dependencies: - "@parcel/fs-write-stream-atomic" "2.0.0-nightly.2068+3bfef282" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/fs-write-stream-atomic" "2.0.0-nightly.2069+3df3153b" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" "@parcel/watcher" "2.0.0-alpha.8" - "@parcel/workers" "2.0.0-nightly.446+3bfef282" + "@parcel/workers" "2.0.0-nightly.447+3df3153b" graceful-fs "^4.2.4" mkdirp "^0.5.1" ncp "^2.0.0" nullthrows "^1.1.1" rimraf "^3.0.2" -"@parcel/logger@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-2.0.0-nightly.446.tgz#38e46be237872d57d8a240776a478e576285b6bd" - integrity sha512-q3/yovljZeYMWfG9/ThC0z8RwUDzKVvJaYislfVt1k/BGVrvBy8Z3M65iut4ub0hTzTSzZKLTwHwmYbPU+pquQ== +"@parcel/logger@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-2.0.0-nightly.447.tgz#5b39252973dc175ea5e879c0852640f39b227400" + integrity sha512-nknzbNd+aCPLy9F5gOKbeHneGXQ3wcye0feVZK4JeBS1S5d0dx4kCE1K9oclDMwCVOQSVSoXP6JtUBG6xxFw0g== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.446+3bfef282" - "@parcel/events" "2.0.0-nightly.446+3bfef282" + "@parcel/diagnostic" "2.0.0-nightly.447+3df3153b" + "@parcel/events" "2.0.0-nightly.447+3df3153b" -"@parcel/markdown-ansi@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/markdown-ansi/-/markdown-ansi-2.0.0-nightly.446.tgz#23538d1116393ff15e0de85300a5ae2e1e2c5fd7" - integrity sha512-FHXlTFPq9Iu6kuTOjrs0qMNFQ8REFBE96kFuSeTQ5omcOHL6eNIBO9VCIxima2Cz+9pQSNXhNlaUAUVRPCXJ2Q== +"@parcel/markdown-ansi@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/markdown-ansi/-/markdown-ansi-2.0.0-nightly.447.tgz#cb063df65e44f34aa0b1ef1b7d12293ea60c798a" + integrity sha512-t070G7y5DZhuyEdWFWKwWivqxDdlyEmFTHh7FFvKcAWQUXQcoAUudsqcQhDTvnc3E+4jERPIi24wZy+Ymt5UpA== dependencies: chalk "^2.4.2" -"@parcel/namer-default@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/namer-default/-/namer-default-2.0.0-nightly.446.tgz#3c43cabff1ea6615af53454a32d1ab9ea0eb69e0" - integrity sha512-DmqpV/GpgjtQerbVSO3rOW3gT+AaxslJWPqa9diFbtAQSrnzbJcuENnaxJzKWyGLT7TgMFoG86iqTiIWFnqfNA== +"@parcel/namer-default@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/namer-default/-/namer-default-2.0.0-nightly.447.tgz#e1dab70d0833ea5d83128beb3203d480fedd587a" + integrity sha512-yymDEo2Idr43t6z/az73rBnTbuynGm9pau7LihV/pPISXh+ShNqyeAn3v8M4fb11uJIOUNo7zQIfKHCuyahS7A== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.446+3bfef282" - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/diagnostic" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" nullthrows "^1.1.1" -"@parcel/node-libs-browser@2.0.0-nightly.2068+3bfef282": - version "2.0.0-nightly.2068" - resolved "https://registry.yarnpkg.com/@parcel/node-libs-browser/-/node-libs-browser-2.0.0-nightly.2068.tgz#6178b587cdb236126b26a53bdbf4376b47bb4ebc" - integrity sha512-BNTYCeaBKyLUUeEaB4NNiV4b86VaJRcpzm1ykBpZRGsDSi4ts4KE1dzxJPm6Pe9N9NkMEXYdZX4VQA9CpxHXjA== +"@parcel/node-libs-browser@2.0.0-nightly.2069+3df3153b": + version "2.0.0-nightly.2069" + resolved "https://registry.yarnpkg.com/@parcel/node-libs-browser/-/node-libs-browser-2.0.0-nightly.2069.tgz#8e62d0240229edcf99f4363c6828ef0af7bf749d" + integrity sha512-3bOjrkoK7Q1aiftR0Z1MgdJqtrapxkTbCPx69XOUW+wV8f29Chi4KKhVrAIczEPLEmrboYhWfQ05flvkKgocuw== dependencies: assert "^2.0.0" browserify-zlib "^0.2.0" @@ -2384,71 +2384,71 @@ util "^0.12.3" vm-browserify "^1.1.2" -"@parcel/node-resolver-core@2.0.0-nightly.2068+3bfef282": - version "2.0.0-nightly.2068" - resolved "https://registry.yarnpkg.com/@parcel/node-resolver-core/-/node-resolver-core-2.0.0-nightly.2068.tgz#98537a4242537ed93aa0b1489c1a0870e57b1c49" - integrity sha512-BKa43I/Xi1j8TGn0XjvsM+BKPZeaJS7oLTy8GgZlA2Fk8cf5JFUem/t2iulF51qEb4B/CDQWHu63sEoC1IxarQ== +"@parcel/node-resolver-core@2.0.0-nightly.2069+3df3153b": + version "2.0.0-nightly.2069" + resolved "https://registry.yarnpkg.com/@parcel/node-resolver-core/-/node-resolver-core-2.0.0-nightly.2069.tgz#127ddbe7e528c8a3083610dd583f65cbc130e5b0" + integrity sha512-u/nFM7ZLy8s8WSuyxf4O9gjOCDk1aZSeRzSpEpK4RyvRayiF/c1D//aipZlH7HBQ4YxdXJ3ztciFjHAiHwnDiQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.446+3bfef282" - "@parcel/node-libs-browser" "2.0.0-nightly.2068+3bfef282" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/diagnostic" "2.0.0-nightly.447+3df3153b" + "@parcel/node-libs-browser" "2.0.0-nightly.2069+3df3153b" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" micromatch "^3.0.4" nullthrows "^1.1.1" querystring "^0.2.0" -"@parcel/optimizer-cssnano@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.0.0-nightly.446.tgz#73700f47036776d2b51fed6615468f1d9f05e3fc" - integrity sha512-pSqJFhnE3SjNhDmqbmEu5EPfMDY4Ghx2W6FSgAohk6FJy8wd4tS2ghlVavUHKOZopbcvAia3+OHJXqhl2K802w== +"@parcel/optimizer-cssnano@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.0.0-nightly.447.tgz#7d7c1f63d807d805a134556f61d678ca31d01bc3" + integrity sha512-l4Kdn0U/ozGmsGLZI5PlW/8H/t+gXhIT5ON9AFPiX0q0iGDKXrusdgpVglKRQwIICFslWXcvH3FcKqxabvu6pA== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" "@parcel/source-map" "2.0.0-alpha.4.16" cssnano "^4.1.10" postcss "^8.0.5" -"@parcel/optimizer-data-url@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-data-url/-/optimizer-data-url-2.0.0-nightly.446.tgz#d2feaf6e7cf40c21aae8d00758113b43ea611f3a" - integrity sha512-dCAutIyY0+shiTGFUfpTKTnixOg13sgjz/AAml6/iJHKWYcp4rvW6ilzXX2egi529OmfQkYq1hBFPaAMk5fcDA== +"@parcel/optimizer-data-url@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-data-url/-/optimizer-data-url-2.0.0-nightly.447.tgz#9bf7e3b58c1eccb7c5fd69a3c2a45bd59d8b3012" + integrity sha512-XmL0VtiUHRHWkzVh2qq/PQWa3gIa/AHUBcbefpSKexbu3V2ivd6pAlEyy5c78VRtbKKQ/BfJkYvFlaNJsRfQUg== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" isbinaryfile "^4.0.2" mime "^2.4.4" -"@parcel/optimizer-htmlnano@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.0.0-nightly.446.tgz#fcd42db64dd9736470baebe844f27e4f294d885a" - integrity sha512-GeUEx5QTcxcvGrWVnVwSDbCgCaGqrQtvTVUndGaAJAYPnGzTzPZH3KzubD7WvBXYARXrrpjEvWCXmEN6hNsfSA== +"@parcel/optimizer-htmlnano@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.0.0-nightly.447.tgz#2e114e8db03d44d5c60f67cd02ff608ab669936a" + integrity sha512-lCvjK2/Ts5XqE1UXMYV4gblwLiOifdh5Nvi/wv7hllvyASIyln2SIW58cIrR6J56iH0gpIs1+heQ30XkvoWvWg== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" htmlnano "^0.2.2" nullthrows "^1.1.1" posthtml "^0.11.3" -"@parcel/optimizer-terser@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-terser/-/optimizer-terser-2.0.0-nightly.446.tgz#9282e0a168b9b76b0380cc5aa32192ec4a38a6a0" - integrity sha512-lZXKeZLCTwTWf9aerhpENr5edc1xz8FmEGnyRPyqaln3VF1dJW7lLp/cCENh+8KyXwKvyxroZuIU+zTrNO0UDQ== +"@parcel/optimizer-terser@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-terser/-/optimizer-terser-2.0.0-nightly.447.tgz#1e2fa5b53cc9944b27d09303575ac72dd8ca0267" + integrity sha512-yRXsFokdTiePWi63TzQZ6Ia1tmejf6VotzlEx9HAtiMCfE0rwkZL4BPdY/ontaOr6uLMBgKfMJHfTOSYd7gV9g== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.446+3bfef282" - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/diagnostic" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" nullthrows "^1.1.1" terser "^5.2.0" -"@parcel/package-manager@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/package-manager/-/package-manager-2.0.0-nightly.446.tgz#56abd6a81be4a67e227bdc8ca1e49ff0bfb66eec" - integrity sha512-k0DD0AN2plk6NzwIIBWF+8uGxYWMp4kp9hfzE3ERmoLl6VKN77PEINCq2aGkcENhiXF4omO8u2A5K5Ns+I8QaA== +"@parcel/package-manager@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/package-manager/-/package-manager-2.0.0-nightly.447.tgz#c8ffcc3e4b315223c1245b4c8284c8c5e22246ec" + integrity sha512-zcOz79FKIve/QNzeN18CyOlSHcMKz4teMJYJVDg7IhgdeLOdDD/jStQO5h9vocXONTLr0umcqf+n/exFVlzQ1Q== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.446+3bfef282" - "@parcel/fs" "2.0.0-nightly.446+3bfef282" - "@parcel/logger" "2.0.0-nightly.446+3bfef282" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" - "@parcel/workers" "2.0.0-nightly.446+3bfef282" + "@parcel/diagnostic" "2.0.0-nightly.447+3df3153b" + "@parcel/fs" "2.0.0-nightly.447+3df3153b" + "@parcel/logger" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/workers" "2.0.0-nightly.447+3df3153b" command-exists "^1.2.6" cross-spawn "^6.0.4" nullthrows "^1.1.1" @@ -2456,91 +2456,91 @@ semver "^5.4.1" split2 "^3.1.1" -"@parcel/packager-css@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/packager-css/-/packager-css-2.0.0-nightly.446.tgz#88d745452695bc09eb7e32039d61b196a928ff83" - integrity sha512-3SXRjRx5DD9QlcrICHINAWMaDxB/5Ki33eT4camu/1xDblpTvFcv7hRgYj37d1fXbyebKSUBKEzaUDjAUcwxOA== +"@parcel/packager-css@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/packager-css/-/packager-css-2.0.0-nightly.447.tgz#574fbfd64161c12a26f262f848dd47d660f44f32" + integrity sha512-R0jYtiIUrDts7VDCStSg/5ew5YSijLQflPUCTXhcyxqQqglP9+oAvoLFoKV7WH3WsnN5sDw3le6V+eGBP+6QtQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" -"@parcel/packager-html@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/packager-html/-/packager-html-2.0.0-nightly.446.tgz#a2d4f92b69e1b0580a37515629fb18bcab70bc8b" - integrity sha512-qhNs0fcvSTsA6kNpjQq4MZYWFjTQETpDIXL9YSlSwgTAUwa7UEvn3a3C0W2X2OpgXaM+zqj/WifLuZQjrY0Qpg== +"@parcel/packager-html@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/packager-html/-/packager-html-2.0.0-nightly.447.tgz#48af24a3d04e4c741e1f34ec4f1853d7166178e2" + integrity sha512-+I77EZztonC2u5/Tq6Sy6KBjvRRYyFg/V4Ts1LfkG4eWKQSdezB+TKr6ccG8mYrN4LcdtHwRdc8SROMaodHEAA== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" - "@parcel/types" "2.0.0-nightly.446+3bfef282" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/types" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" nullthrows "^1.1.1" posthtml "^0.11.3" -"@parcel/packager-js@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/packager-js/-/packager-js-2.0.0-nightly.446.tgz#2fa64b00dd946c14eb14c01cae9fea2fbb4c4b35" - integrity sha512-UN/J+xGh2uGamxVb5NRYlsfQUkUeEClo7Mzm+mj9OFjTEbCKc768qhTPf1X2cEG5WtrD5xxIToYTPbdArAB/nw== +"@parcel/packager-js@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/packager-js/-/packager-js-2.0.0-nightly.447.tgz#d90a439980fdf2e15faec2e54d980ac978d79a0a" + integrity sha512-UKpiqjaP6EbFfkm30kQYornokxumN7KVMHfVwkYmjOpy2yQ4WgdCQ/ll8p8Rucu58mge6s7rVmdhsLyk7S/H8A== dependencies: "@babel/traverse" "^7.2.3" - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" - "@parcel/scope-hoisting" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/scope-hoisting" "2.0.0-nightly.447+3df3153b" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" nullthrows "^1.1.1" -"@parcel/packager-raw-url@2.0.0-nightly.2068+3bfef282": - version "2.0.0-nightly.2068" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw-url/-/packager-raw-url-2.0.0-nightly.2068.tgz#7359309410e1115ad820df0c33d3e45fbad8f8ad" - integrity sha512-nQfoCPewW57EjQRvHXXVhBqpU3qo8r4cpSmltKDb+7Mdb9KctYMy7AdO/bipXdIgvqk8H3k/KRvmhSi17MLBcw== +"@parcel/packager-raw-url@2.0.0-nightly.2069+3df3153b": + version "2.0.0-nightly.2069" + resolved "https://registry.yarnpkg.com/@parcel/packager-raw-url/-/packager-raw-url-2.0.0-nightly.2069.tgz#2644768f087350aa4130ae9c5c90a77b985aa1b1" + integrity sha512-2N68cU1Ij0EHZqszFjbz9L8zzbCQ3x11V3EsxHtS0cqlKjHggN5BDpz3ZUA3nEy6vBf5mo5JcqfYdlG8VTtKgA== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" -"@parcel/packager-raw@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw/-/packager-raw-2.0.0-nightly.446.tgz#0d07aa9d453a5d00d2ead0e0a63bfe464b68c911" - integrity sha512-YrUwZDap0iwWYEvu2wYPp9gZw9eggnAt0r46s1+KvTWdSdJaB1M1Ctm+sF3BQvPuzvT3li69idVeMFA2T1Zodw== +"@parcel/packager-raw@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/packager-raw/-/packager-raw-2.0.0-nightly.447.tgz#78b78df56ce00320d00731b54fd0339c8eb91fe3" + integrity sha512-NHVusjJCCaLlTw40eUcGisrLHM5VOYtejJfcbI0PmmQpfk4tltuMIDn8a7JaVBLP7fMYjuEbCnrr0AiEKR6bkQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" -"@parcel/packager-ts@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/packager-ts/-/packager-ts-2.0.0-nightly.446.tgz#2f062227ee2e436c5a51a463a9d94c6358f34a04" - integrity sha512-DdCaZk8kZpzdAIIbxoHia5ga8swe535lYiuAbrbKBB4O1lmzXAtDy3ko3yV4rSPjTDG49PAQD26r5Q8pVApZ2Q== +"@parcel/packager-ts@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/packager-ts/-/packager-ts-2.0.0-nightly.447.tgz#e1bceb09202a169bc8029b77c650b8e9416308b8" + integrity sha512-hGRhGiQDy/UT1ce4zGPuE6lqBV7XPQm4/tv+Po2IlmItqlhqMy21XqtW1dMrdeKq1b0lEmAKdxi3cbrP67F39g== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" -"@parcel/plugin@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/plugin/-/plugin-2.0.0-nightly.446.tgz#7881c9a01a9641a0113925a6ec5e86ca7d7b115f" - integrity sha512-Rzi7MH5EeanlWdssuWXUx3wztdh1TApOFAP+XHDft+sBhlhdcuazywGyk6vzILAr1hIdKxO5DkUxnHR9Db1biQ== +"@parcel/plugin@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/plugin/-/plugin-2.0.0-nightly.447.tgz#4a6b38c910298c3b15cceb0dbd39e04e0076692f" + integrity sha512-GKVmQjHbHW02XwPzpJkI+XYgsnLbV5C5v/zyjZyjrfmQqSRgPs1L0OqCnCLG9SoK71lelwAXA7YchpIo+DJqWQ== dependencies: - "@parcel/types" "2.0.0-nightly.446+3bfef282" + "@parcel/types" "2.0.0-nightly.447+3df3153b" -"@parcel/reporter-bundle-analyzer@2.0.0-nightly.2068+3bfef282": - version "2.0.0-nightly.2068" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.0.0-nightly.2068.tgz#cfd47198f4e608812c6aa06be26b0a41657a8c9b" - integrity sha512-rG2UhcbCQ/F32FzEGX/CnD0kNGz5+cUn9ZAZoQJgn6Rrsafv2Edh6TGWtRK4znj8l77h4E0Rc/yYMqfFzKCdCQ== +"@parcel/reporter-bundle-analyzer@2.0.0-nightly.2069+3df3153b": + version "2.0.0-nightly.2069" + resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.0.0-nightly.2069.tgz#9b6e6bd1db96bd727676c6fcddc9fc086261f44e" + integrity sha512-umwO5l1RiKm6rvLsAz48tulVdd2PrtOHvMUiasq1jJwwkKWO23Qql5Ag/HBSokMjDYRTJDYN8i8bLReWbNrK5g== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" nullthrows "^1.1.1" -"@parcel/reporter-bundle-buddy@2.0.0-nightly.2068+3bfef282": - version "2.0.0-nightly.2068" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-buddy/-/reporter-bundle-buddy-2.0.0-nightly.2068.tgz#dabae907e36fedc14218644b7bdd42a25cffc983" - integrity sha512-GrF0CXwmsB/T8jafDeMpEmOfaab6/YVe+JPsBGcvz7qlLUhtw7+Os4yhFyC9fkHDEHQxEGE1s5aeKGIvEQ0URg== +"@parcel/reporter-bundle-buddy@2.0.0-nightly.2069+3df3153b": + version "2.0.0-nightly.2069" + resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-buddy/-/reporter-bundle-buddy-2.0.0-nightly.2069.tgz#c658df5262d82866c455ae83a96fe24eade7fdf7" + integrity sha512-11n9gECbvOaEQ3LrXTzB6VpeHbnzxi+TMI/TlamUO7U1PNM9TSPVCN2OEwv1NgtQ4/wvQ2NPyDzgkxutLVbc7g== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" -"@parcel/reporter-cli@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/reporter-cli/-/reporter-cli-2.0.0-nightly.446.tgz#7a8259fcbefebf1e62090938e3bd83f6aed0e9ff" - integrity sha512-aVTDkX5ID8pcSqjm+soA2urRgkpsraMC37k6dAKqO4IZQFyrOr1J8ZSTFboZkJpls4A3msdd6aKkpNSAniSpzQ== +"@parcel/reporter-cli@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/reporter-cli/-/reporter-cli-2.0.0-nightly.447.tgz#14a77213f3e3d88402786ca612d7babc27a9b19e" + integrity sha512-3DhVXIo5JJ1jQsnkl2NQmA8ngVRxCRErJzhoBV7zM2fnjtPUkfbx3/HJBTDDqmkqCPDosbrSeF3srUMCt6n15g== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" - "@parcel/types" "2.0.0-nightly.446+3bfef282" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/types" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" chalk "^3.0.0" filesize "^3.6.0" nullthrows "^1.1.1" @@ -2549,13 +2549,13 @@ strip-ansi "^6.0.0" term-size "^2.1.1" -"@parcel/reporter-dev-server@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/reporter-dev-server/-/reporter-dev-server-2.0.0-nightly.446.tgz#675b4f68be8841e9c5b7806bf08905c2bed8f01c" - integrity sha512-/KF1QiNtEbwlCFl6+1hQNznKyt0npwvfgreo9ZJEgX9IWj04Sbdz0JhaPjESq5+3Kb/e3N94RZWc7+pysdgEYg== +"@parcel/reporter-dev-server@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/reporter-dev-server/-/reporter-dev-server-2.0.0-nightly.447.tgz#0f2eeae52ea0357fa6e1344da7fd15ff2d5c0055" + integrity sha512-HN43ip84zy0rH6uPXlnyhKa4qfbr66U0+OSUrusk8nKFpJG/vVj05nhvSEbYud/7xKx9L53moO/bNVLym83TjA== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" connect "^3.7.0" ejs "^2.6.1" http-proxy-middleware "^1.0.0" @@ -2563,54 +2563,54 @@ serve-handler "^6.0.0" ws "^6.2.0" -"@parcel/resolver-default@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/resolver-default/-/resolver-default-2.0.0-nightly.446.tgz#527780f91fd932e1a62d0e5742edf777ff046719" - integrity sha512-8ECX0H4g0KvEjgtnpP2BPNl+Ios0FEqUeg8/6pntsVKbFlKT6mfVsTwH2iXVq/96qCBfn/kuZUlKONrIzXbQ8A== +"@parcel/resolver-default@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/resolver-default/-/resolver-default-2.0.0-nightly.447.tgz#7ccca87db789e731e46687862732455bbfc3ec28" + integrity sha512-bfbvVOywPcBs0qwK5thUlcSADoPCul+DIQVPYqacvq8XFY8mZMVqP6erckaxK+Fe0dcYJmJB5wRi+LFK6OI2kQ== dependencies: - "@parcel/node-resolver-core" "2.0.0-nightly.2068+3bfef282" - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/node-resolver-core" "2.0.0-nightly.2069+3df3153b" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" -"@parcel/runtime-browser-hmr@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.0.0-nightly.446.tgz#8ae59b67cedbdf6070d98967ca1de44259192823" - integrity sha512-J4kfVfbmfVugL66Ttl1Ma9iCbY11cXEu3TzMg6SWxps2RV33gTBOhrkZ4b0BMKL7M5rHF9++DZkUpB2t1PJq3Q== +"@parcel/runtime-browser-hmr@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.0.0-nightly.447.tgz#1e5d449cbcfd5a5470ff7317189fdda3536c0e59" + integrity sha512-F3R7dtBqSVTlbM6dZc2mo0171hx9HR8frPPOoC0cNh/NPRZcL7AkVE6oPp9gD74J16uHktYuOZqeDjGL7otnJA== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" -"@parcel/runtime-js@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/runtime-js/-/runtime-js-2.0.0-nightly.446.tgz#39a93aec6c2e3d5f72b6391ab1e199c8bf86e112" - integrity sha512-R9BbQliTU09WR+r0Py2iPuaPvq3wyyl6LWVVM0RB0Ccn1QuVOEwng3Nk7Vn6wTLejARsgLs2koVHln35pX1JGg== +"@parcel/runtime-js@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/runtime-js/-/runtime-js-2.0.0-nightly.447.tgz#694b2f8f069484ab348a44bc74f74c5853698935" + integrity sha512-yqCBktSjxdmq1Z2t85CwdN33oPYTMQ9SUtXWJHCtLwbSLiKRnKl7JpLqFhcRPQ0EAf5H9/MYPGyA6M863M5zRg== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" nullthrows "^1.1.1" -"@parcel/runtime-react-refresh@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.0.0-nightly.446.tgz#5666360f5dba7db41716d5199ce40a438aeb394f" - integrity sha512-wXKmWbdFmlER3NHqoM8Rh+ObfAUNQZOMIxMWjVZE9W6bcRdfId4bGv5APHgn2Aed56oPKjbC2FOx3UYThCJOwQ== +"@parcel/runtime-react-refresh@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.0.0-nightly.447.tgz#8d3da34983d7b4d35297fc22a0dd362e51cc0d0a" + integrity sha512-7oF0NqOc4UBgaLm4FY58xyZS3zSNnCAhMNQPDvvglFGY83VLK2vWUKXxgVZzYO+TDPLuGr42E6m5f0eb241iqg== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" react-refresh "^0.9.0" -"@parcel/scope-hoisting@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/scope-hoisting/-/scope-hoisting-2.0.0-nightly.446.tgz#f350b4650b84af0ede793fbc280ee48039b6de00" - integrity sha512-mmT7WqSEIRXYP4ChHai0fEXqofruAEQTWC9GwwEPE2iFjTgpGmF0NQW9H+PG/RQkeCbzG6rdYAZlIlJkhvuXKg== +"@parcel/scope-hoisting@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/scope-hoisting/-/scope-hoisting-2.0.0-nightly.447.tgz#03142a49b96dd7134b2a196684d14630ff7144f7" + integrity sha512-sEXeDYbz6CQg5RmhAF4qkGVzrWiMuEtrEJ91b2LQYxNdJR4F7hApz+gh5qCFLfTIB2KfRZd1cUCyGh0GDE3EEQ== dependencies: "@babel/generator" "^7.3.3" "@babel/parser" "^7.0.0" "@babel/template" "^7.4.0" "@babel/traverse" "^7.2.3" "@babel/types" "^7.3.3" - "@parcel/babel-ast-utils" "2.0.0-nightly.2068+3bfef282" - "@parcel/babylon-walk" "2.0.0-nightly.2068+3bfef282" - "@parcel/diagnostic" "2.0.0-nightly.446+3bfef282" + "@parcel/babel-ast-utils" "2.0.0-nightly.2069+3df3153b" + "@parcel/babylon-walk" "2.0.0-nightly.2069+3df3153b" + "@parcel/diagnostic" "2.0.0-nightly.447+3df3153b" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" nullthrows "^1.1.1" "@parcel/source-map@2.0.0-alpha.4.16": @@ -2621,10 +2621,10 @@ node-addon-api "^3.0.0" node-gyp-build "^4.2.2" -"@parcel/transformer-babel@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/transformer-babel/-/transformer-babel-2.0.0-nightly.446.tgz#778dd03df21206e23032cafa867e67f362c74240" - integrity sha512-CB5qQZZl0YA+vqnRQq+5huVhWDEe2xd6BNSz8U6K55ez/O9PRSaRosxRkkVIcQJr2jGAI7YTXC4zC3relcvMWA== +"@parcel/transformer-babel@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/transformer-babel/-/transformer-babel-2.0.0-nightly.447.tgz#a936a737d4bdec282dc23cbb9142b0bc80d5fe0e" + integrity sha512-9wMqAV7kO4YcYb1in6YhM3PbmMz5GgNHcMI63aOtDhXCxqi4uYSo6gS1wHkPK3iv+naGqrPGxvNbopXmzcSkSw== dependencies: "@babel/core" "^7.0.0" "@babel/generator" "^7.0.0" @@ -2634,85 +2634,85 @@ "@babel/preset-env" "^7.0.0" "@babel/preset-react" "^7.0.0" "@babel/traverse" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2068+3bfef282" - "@parcel/babel-preset-env" "2.0.0-nightly.446+3bfef282" - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/babel-ast-utils" "2.0.0-nightly.2069+3df3153b" + "@parcel/babel-preset-env" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" browserslist "^4.6.6" core-js "^3.2.1" nullthrows "^1.1.1" semver "^5.7.0" -"@parcel/transformer-coffeescript@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/transformer-coffeescript/-/transformer-coffeescript-2.0.0-nightly.446.tgz#9315acf80e8a41726b0e8a9f7569e85895902a27" - integrity sha512-yJI5LvN9pVAv474Oz0OqbezegSzi+USMk7KLv9s7f+lCz870hoGXoxSX3u1WIvYT4j3VXblwDd895nBZ5KfV9g== +"@parcel/transformer-coffeescript@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/transformer-coffeescript/-/transformer-coffeescript-2.0.0-nightly.447.tgz#cae039862eb29c5f2e2a234e19dc2634e3ec489e" + integrity sha512-JrWad88HP1VsW6FTxOboS9wOr8b9AR+TwJEG5ps+Vu5iTmklyWuwnDDcJIos7Rk+ew58F1lWhqDN+/qxCdsv9Q== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" coffeescript "^2.0.3" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-css@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/transformer-css/-/transformer-css-2.0.0-nightly.446.tgz#5a904695c6f11bc68decfa06a5243b4582c484d1" - integrity sha512-mT6LJExHLeon7OXwfKpcxz1ATl1dsuAKYlDMo6F4pU82FcxdMFZD7dLUmvvsQ7rG43/ZPMermR5xlNPjfed+pA== +"@parcel/transformer-css@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/transformer-css/-/transformer-css-2.0.0-nightly.447.tgz#9c54780291b93ee7760553390a3f3fec8ab09dd0" + integrity sha512-/ImYwUPOKDZ3Bw/qXVDAkV7yKL82Qhrb6zOcjzyKm1Le27KJ82mGe6eGhCPHokKA/pFiIrj5xGiwCxNH3W67vA== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" postcss "^8.0.5" postcss-value-parser "^4.1.0" semver "^5.4.1" -"@parcel/transformer-glsl@2.0.0-nightly.2068+3bfef282": - version "2.0.0-nightly.2068" - resolved "https://registry.yarnpkg.com/@parcel/transformer-glsl/-/transformer-glsl-2.0.0-nightly.2068.tgz#55fce558f9b1ce40ed16a76c0f96b52088fc2ef0" - integrity sha512-Azf/840wQ/6R1uJV05+QxywA6cUdBDaqa9tU+LPNhonfvX1Cg8RyUMW3Guzs/Jrchuv1dW/YSDLFnNw5k6cepg== +"@parcel/transformer-glsl@2.0.0-nightly.2069+3df3153b": + version "2.0.0-nightly.2069" + resolved "https://registry.yarnpkg.com/@parcel/transformer-glsl/-/transformer-glsl-2.0.0-nightly.2069.tgz#62deacd5029604b826686c072cfeb8d21a12403c" + integrity sha512-qJabAfGUpl2V/tqnJFqOXemKFyyz3RGajVYSHvFVabNC4sO/pUiz4nFNQmqhO64UGJSbS5TxEWB115h5beGwaA== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" -"@parcel/transformer-graphql@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/transformer-graphql/-/transformer-graphql-2.0.0-nightly.446.tgz#344270a83f7ccce671bf76ec2062df8430b5f74e" - integrity sha512-UrpBUzhnainKKUqauDAR1C7g5D6tHHNSz+226ZfoNJEVKCJ0C+dMH492yk4UqIU4PcPKCR6zRJCNA353G7x2NA== +"@parcel/transformer-graphql@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/transformer-graphql/-/transformer-graphql-2.0.0-nightly.447.tgz#3859d22ee1af541e2a9178c5de362eff64f5b240" + integrity sha512-jG8f5pz7rytvhwDaAvxoh7JaleKeLnWwOSTfFCMwAWZJD6O4IeP7/D4Jrg1jbPkpl4H/v6zyHnERxJbQL3bjIg== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" -"@parcel/transformer-html@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/transformer-html/-/transformer-html-2.0.0-nightly.446.tgz#ab9f94effe5e16ad3eaa0744440525ed92b33f96" - integrity sha512-5PIuqRj+CbqVeLFfSwbmaaDD6seRypNmp1A/+qxVgmz8ya/Wt7XwEHTT+4Mw2OAJykWl12Adp9qoRpWJCa20fw== +"@parcel/transformer-html@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/transformer-html/-/transformer-html-2.0.0-nightly.447.tgz#4f169a9b2808ae76509e56a5afe039f32db04370" + integrity sha512-aKPyz5bkfTNw//wiltwKbpmtUT7bt7yVvdobAH70axj2z6xtjfHxYQdCu0DVRfDPt/OrRe9zBHzNY5moMaZcrw== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" nullthrows "^1.1.1" posthtml "^0.11.3" posthtml-parser "^0.4.1" posthtml-render "^1.1.5" semver "^5.4.1" -"@parcel/transformer-image@2.0.0-nightly.2068+3bfef282": - version "2.0.0-nightly.2068" - resolved "https://registry.yarnpkg.com/@parcel/transformer-image/-/transformer-image-2.0.0-nightly.2068.tgz#bc41cf314cb20639014c264c194f84cc1a056481" - integrity sha512-BFYM4eFn75RzSNt4t6Pmj33q6rcNypH+iExB5do1EB0Xv8he/s9O1ujO5nCy5AKJVdrR42ABjIR5/pl30ZRpLQ== +"@parcel/transformer-image@2.0.0-nightly.2069+3df3153b": + version "2.0.0-nightly.2069" + resolved "https://registry.yarnpkg.com/@parcel/transformer-image/-/transformer-image-2.0.0-nightly.2069.tgz#350557404818b48e692fabc83be3716ff0937368" + integrity sha512-bkZ7+I+EjIdzlsc1AzfYB/BLP7hxX14Go3JQHPCSoEshWCh1dPGrejFdicaBUNdlDCZpM0EXt0kvJ0AA4Ho22Q== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" -"@parcel/transformer-inline-string@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.0.0-nightly.446.tgz#bcfbbbec8544a0c6c3a90a1cb05067ae5d0890a6" - integrity sha512-d7H1kxB7Qy0MW5tYnTjzA3dNpCaxNUSQjJqvWvBpYwn9vct0PzS/YHM3b36tku76p5mk7+YP4ZxC2aT6i3yq+g== +"@parcel/transformer-inline-string@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.0.0-nightly.447.tgz#350955c01bff31971d8649abc576bfabc2e03460" + integrity sha512-qSRij/gO1DBH+JKEq2nhbADCUR/gxmVnivWVKKujB/Nc3P9BF2+oCM9NFYbgGdkuSOkAxiL0EUUMcONUXCStcw== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" -"@parcel/transformer-js@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.0.0-nightly.446.tgz#60af6368f0df6af66e0c9164567dfa9548f8143d" - integrity sha512-jO1dFhOHgwEb4nZ1lpBikPmM/3Nm/GXaqj3MbdTM3y8pSTGMUaLNZpzjJeL3NC8Ykqk1fjKA6cyLqjPlTPoisQ== +"@parcel/transformer-js@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.0.0-nightly.447.tgz#c7f8ed7cdd0d8a10c073cc48324c9fd3b78a7ad7" + integrity sha512-+1Feek8staUtc956JJwPoP9UKJdyLplFxozL/Qz/tJCfd30gyUwe6G1Ds5TvVZIxMbA+04kejSwVPbHBUatUNQ== dependencies: "@babel/core" "^7.0.0" "@babel/generator" "^7.0.0" @@ -2721,193 +2721,193 @@ "@babel/template" "^7.4.0" "@babel/traverse" "^7.0.0" "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2068+3bfef282" - "@parcel/babylon-walk" "2.0.0-nightly.2068+3bfef282" - "@parcel/diagnostic" "2.0.0-nightly.446+3bfef282" - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" - "@parcel/scope-hoisting" "2.0.0-nightly.446+3bfef282" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/babel-ast-utils" "2.0.0-nightly.2069+3df3153b" + "@parcel/babylon-walk" "2.0.0-nightly.2069+3df3153b" + "@parcel/diagnostic" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/scope-hoisting" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" micromatch "^4.0.2" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-json@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/transformer-json/-/transformer-json-2.0.0-nightly.446.tgz#63461c5537cf0b31edad814146ef397d48dbb570" - integrity sha512-xpyd+astuEqJG23oZzOCJCUd/UnqOPqKgeJ1YgZ7wxc42a8uQE/iObG+WT5HKlqxBOlBu9jEfJZug+fxWKkRGA== +"@parcel/transformer-json@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/transformer-json/-/transformer-json-2.0.0-nightly.447.tgz#8c63b72374cbe47c0517cd0be490d667b5c7ddd0" + integrity sha512-79aIUcQzlnw+/7EJj9dmZNgyLH8RRGCsqul7sreiZam1hfXLTtK8v9EyrgIDC9BvZbJPBe3fUyDRGzXXK54b1A== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" json5 "^2.1.0" -"@parcel/transformer-jsonld@2.0.0-nightly.2068+3bfef282": - version "2.0.0-nightly.2068" - resolved "https://registry.yarnpkg.com/@parcel/transformer-jsonld/-/transformer-jsonld-2.0.0-nightly.2068.tgz#5bbac69ccbbc3e89b27368ca1c024cfaa3c73815" - integrity sha512-bO8nK/Oj9uKOwLGGVjOGjBtG1lLIEK9wEqdVfUzJgeyEu6EUEJBy0iU0bKTEaGaGj//ZVChFp7n9vpuGnIATAw== +"@parcel/transformer-jsonld@2.0.0-nightly.2069+3df3153b": + version "2.0.0-nightly.2069" + resolved "https://registry.yarnpkg.com/@parcel/transformer-jsonld/-/transformer-jsonld-2.0.0-nightly.2069.tgz#b1b69e540b214fd2cf46d62304321c8f598de1d9" + integrity sha512-n3zAblC4I/XM67NvIgZdx5N3tsS5WYBay5BO0cwij36+dt/nF5aBGiYfomPXgV0fnoSFMbku5W3ZAGnMHoGURg== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" - "@parcel/types" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/types" "2.0.0-nightly.447+3df3153b" json5 "^2.1.2" -"@parcel/transformer-less@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/transformer-less/-/transformer-less-2.0.0-nightly.446.tgz#b81cf260fe8c81c8e60de06e93766a83e584ff87" - integrity sha512-outojfO4ThAnMaMapVOwFRkJvkuBNQPh6jTUrtVCLeubXh4GdBcYSKWGy8JefbDe5tx2MqJx49JEiJjTlxyqHg== +"@parcel/transformer-less@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/transformer-less/-/transformer-less-2.0.0-nightly.447.tgz#bc6ace825b022045222483ca072dca28243c3217" + integrity sha512-hcRxSjnqaNgi6O6bNltX0PTvMlO0D/yAhiI/T9YKbrlxvHhBTn8CL3YgCQjstfYNrO6G/g6cRZpRLFZo2SbCxw== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" "@parcel/source-map" "2.0.0-alpha.4.16" -"@parcel/transformer-mdx@2.0.0-nightly.2068+3bfef282": - version "2.0.0-nightly.2068" - resolved "https://registry.yarnpkg.com/@parcel/transformer-mdx/-/transformer-mdx-2.0.0-nightly.2068.tgz#55a15598d8cb1f7a04ae88650a738b4982abeb12" - integrity sha512-L9Jl8REp3UjKPXJfppNAWmTNxKoLwYuYwd/F09lrQCKe5H0Isnku/yKHugl3wDODItn1aZPThfk7uuxzejoj8A== +"@parcel/transformer-mdx@2.0.0-nightly.2069+3df3153b": + version "2.0.0-nightly.2069" + resolved "https://registry.yarnpkg.com/@parcel/transformer-mdx/-/transformer-mdx-2.0.0-nightly.2069.tgz#0aa3abc1c1aacf6027ee3a0314432b61ea0d4cc3" + integrity sha512-j/aDSFblTPkgF4i3x3k14EeK2/hMMEkXsdUpMpy9/z9Tmfw8snED9bJVZtDrxo1xd9T2+odixrmryjqzGPy+Tg== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" -"@parcel/transformer-postcss@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/transformer-postcss/-/transformer-postcss-2.0.0-nightly.446.tgz#383fcc10d59794e85bc1a376cafa8efed00e613e" - integrity sha512-Yrux2pN3rUCkE5oyQmiahzyWmRYjAvEpK2FIYp2qlOsTghaI5ZBRNeduYO+XvZFE9PeeEP416JNsC0yomxXWjg== +"@parcel/transformer-postcss@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/transformer-postcss/-/transformer-postcss-2.0.0-nightly.447.tgz#d92ed2ebb9517f510326911561297192e56333c7" + integrity sha512-VikvWEjYa8Y4pEIypd8FnI+SxIMjgcV0dFE5yjVI1OUfGtdlQCWrbXVLJhom572Wsz5yRrD1VH/WeFPrW+oM8g== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" css-modules-loader-core "^1.1.0" nullthrows "^1.1.1" postcss-value-parser "^4.1.0" semver "^5.4.1" -"@parcel/transformer-posthtml@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/transformer-posthtml/-/transformer-posthtml-2.0.0-nightly.446.tgz#d20f4be828f2c91c65c3698affe05176f5516452" - integrity sha512-JM9vWvPIY5twP/w5uhD0VQFe4eZzHQA2pMq3R819euD4wrIyIpuCa6g6r4iI9z/w3ygWcx1Z6cTEbBb+39Y5Hg== +"@parcel/transformer-posthtml@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/transformer-posthtml/-/transformer-posthtml-2.0.0-nightly.447.tgz#17af0da915e54ba7bc48d39830175a3b3c371034" + integrity sha512-ySg5FHlxoYJpEaASO6Sps7KIzYoH5bkJona5fqR6amdYuTdAJfJ6gR4LC+kH4BNyox+lwhjoQMyewGp3zBnpaQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" nullthrows "^1.1.1" posthtml "^0.11.3" posthtml-parser "^0.4.1" posthtml-render "^1.1.5" semver "^5.4.1" -"@parcel/transformer-pug@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/transformer-pug/-/transformer-pug-2.0.0-nightly.446.tgz#6d72b8780c6243696fbb11d3abc001fa2866027f" - integrity sha512-HvNJ2vNOxKLka6HNH9asGOECIwASY1jaB1oZn9Z9aQAW7s0+1PeuNVfXH9wwupCUjjziByuOS0fRh1BhoS9pPQ== +"@parcel/transformer-pug@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/transformer-pug/-/transformer-pug-2.0.0-nightly.447.tgz#c1b9f723c6ce600a774a0a95eb21374e5ff48555" + integrity sha512-oku+QaCVwchwoH/ggbdcM0KNxoOWLz4DVKkIbCLE+PHynd8WjBQlVz5PIpsQhonF+GXPtvBMzKYoashPaQQXhw== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" -"@parcel/transformer-raw@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/transformer-raw/-/transformer-raw-2.0.0-nightly.446.tgz#2383d9d9ce24723e2c5e6306f84ee5953f7ea99e" - integrity sha512-1CMKCE1Lpc7Z9DiaiiGnz1mzpREg3Xa2FcmWoC3RlNWOfaKw6qd/wmucXY4wj5+4qAKYyHxjTZGy1tgcxfzDVw== +"@parcel/transformer-raw@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/transformer-raw/-/transformer-raw-2.0.0-nightly.447.tgz#aab7a4a69645d8752e31c42c4aa0800dcc623faf" + integrity sha512-oLJPQO7gLRicpH8gNqQ7JvGR3/Gt/OUSsVRx89Q24pPsS45Ezi42Yw5KyF0Oe4o9S8LD45Ues5IDrfUB5OF8NA== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" -"@parcel/transformer-react-refresh-babel@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-babel/-/transformer-react-refresh-babel-2.0.0-nightly.446.tgz#d688703f415ec296dcc6e1ff9faaaee929f4b6db" - integrity sha512-C/QN4lgzukcQWzayEUQqpdP2ijDzADB3yT7P9SfNtXCBocbbOY+NbwGLQtnJ4REcx+5uRbJ9GpKPB8417WnwDQ== +"@parcel/transformer-react-refresh-babel@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-babel/-/transformer-react-refresh-babel-2.0.0-nightly.447.tgz#bed4fde19be51ae4ef62c180a040c8ec6c2c206d" + integrity sha512-IxNejXXl90cCFp/yg2qU8WoHx1HjistRcgS0kU1xJe5E771I1jR5MRSHblrgRf60d4qvXMNBHeoqLKCKAkjjKA== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" react-refresh "^0.9.0" -"@parcel/transformer-react-refresh-wrap@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.0.0-nightly.446.tgz#670e642972b8d8057dc46f324ebe15711b26ffae" - integrity sha512-8OE0hvbdXHlhExJNQXaecph2QbCjwHNQtgkazSSfqo80lVuZzDOdyQ9h9/c8hn+oj7fnt359Hw3syWLj+2O3OA== +"@parcel/transformer-react-refresh-wrap@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.0.0-nightly.447.tgz#037e529039756c9611381bf5df8910b06e887dcb" + integrity sha512-PJvGn6LEPl+r90FoGsc3VQ+AIO1OCxSXrUqnAt7yNTh5aFfWbfeYBjkjQc9akC7qwFa/uwJ6fep6p5f8mFVUJA== dependencies: "@babel/generator" "^7.0.0" "@babel/parser" "^7.0.0" "@babel/template" "^7.4.0" "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2068+3bfef282" - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/babel-ast-utils" "2.0.0-nightly.2069+3df3153b" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" react-refresh "^0.9.0" semver "^5.4.1" -"@parcel/transformer-sass@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sass/-/transformer-sass-2.0.0-nightly.446.tgz#46f9ed91e8dea8effeea539054f1e13baacb6d01" - integrity sha512-9ezq2DHw1Qhvm/AAd2l/6Yk10I45osE0prxWa2MkC1xveGllbi14poDfbNhK3gxX0K7TV/S+ibyKc+naHAVEIw== +"@parcel/transformer-sass@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/transformer-sass/-/transformer-sass-2.0.0-nightly.447.tgz#9fd3433ba146eaeae08db218905b2d765f7b3aad" + integrity sha512-JT2GQG1gsiVGUgmUI1Q8RHUvZvVC3rurTyTuunhD5knYXdc+s9wHgtxuGhG+lvf85Ye/yfUJqk3VYdNSm8zI2w== dependencies: - "@parcel/fs" "2.0.0-nightly.446+3bfef282" - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/fs" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" -"@parcel/transformer-stylus@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/transformer-stylus/-/transformer-stylus-2.0.0-nightly.446.tgz#b628ac5100177968740f204862a0d6709b9023db" - integrity sha512-tYjteN7dnw+g40ODbIGPUX33rdKnHojohAX8NXOtvf5S+eXHxshQLQM9UHTpUFRlZ5Il3hwbOFJFaLzm+EecrQ== +"@parcel/transformer-stylus@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/transformer-stylus/-/transformer-stylus-2.0.0-nightly.447.tgz#09b33292139020649b599e51523758974495c00c" + integrity sha512-hEkixaT6amarEzxlzNPWWRTWT0WSUnTUT9bFGS1o0MCorZwZJroPKMr9qlK8WCLY+xGzNKnSP2lWrCRLPFX7wA== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" -"@parcel/transformer-sugarss@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sugarss/-/transformer-sugarss-2.0.0-nightly.446.tgz#daa130f7959afb74f6af4b311eb1caa32f3273fb" - integrity sha512-D1mpHwxzA/sxQYA6Uc0nQSHYTUbe2Q6o32F72sABocZvV/ax0guYockl6aNONr+dwu07/5kY5maTyfYAZ/iM/g== +"@parcel/transformer-sugarss@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/transformer-sugarss/-/transformer-sugarss-2.0.0-nightly.447.tgz#fef45b98a6ee8cbd7c5757e54945c3f611ee2ae6" + integrity sha512-8AXGFGyPvpyS6IZPf+sEk/Y8oYdBU6U0bKqzZgCK1PX1+IcHAI43TW2kmS3WXTxRbmwfsXWXKNOFsVyIZa/XmA== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" postcss "^8.0.5" -"@parcel/transformer-toml@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/transformer-toml/-/transformer-toml-2.0.0-nightly.446.tgz#981119cc34ecf49a891f4acce3221a1fa77e633c" - integrity sha512-leLjjKU2xXRw5cbXgFXHuaNKExn4Q3Fzne65nZj1G/3QHk+tiWnTms9msx5wDR2iZuQjWQc7cI1TZia+VRVUKA== +"@parcel/transformer-toml@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/transformer-toml/-/transformer-toml-2.0.0-nightly.447.tgz#4cec07a505e307620dd9695c748e756ffe020d16" + integrity sha512-MHcdfpdhY7cMQN3pkvEe6K+2anunmtoZ+wUP7LnHT//itzRyRpm5zY8Tzbxgg+4whgNh8YK9CQw1Xt48fu3fzQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" -"@parcel/transformer-typescript-types@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.0.0-nightly.446.tgz#7f3290031529726e7c768980777af61f45191ee4" - integrity sha512-Hk9sX3LKo21FS0YqeBthg9IiiCawXsuTXHuJj32hjmSacYEIRTTyLnkA3B0YTrjJgmojuoFi6CiSZU2gMR0uzg== +"@parcel/transformer-typescript-types@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.0.0-nightly.447.tgz#2125b9828eb646861e01f279ae05cd84015bfae2" + integrity sha512-CeDyafYkCa/bm94q5Jia1IyE5Ar2ixOgN75ImlUh+W1MdbB0JPAmRoubIT/Fd5++/q79bqK1mL1sSoyEt//TAQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/ts-utils" "2.0.0-nightly.446+3bfef282" + "@parcel/ts-utils" "2.0.0-nightly.447+3df3153b" nullthrows "^1.1.1" -"@parcel/transformer-vue@2.0.0-nightly.2068+3bfef282": - version "2.0.0-nightly.2068" - resolved "https://registry.yarnpkg.com/@parcel/transformer-vue/-/transformer-vue-2.0.0-nightly.2068.tgz#7fd00e4e3524611aa5d313dabfced33649d475d9" - integrity sha512-oPouURopmkOUTwQAMFxOUfcPK3zKsopy5isR7QNyhkmWxsA72Cj2IWWUM/A0rHJPX0+FmxVvyOauIqUzkkcFhw== +"@parcel/transformer-vue@2.0.0-nightly.2069+3df3153b": + version "2.0.0-nightly.2069" + resolved "https://registry.yarnpkg.com/@parcel/transformer-vue/-/transformer-vue-2.0.0-nightly.2069.tgz#0d910b0c35e50ff31bf3a2b28d28b57e30dcafe6" + integrity sha512-atJXwGxKpACMJsNV1iQTCkf/ZviPMvzQAKs6DwgocVrrqfaLCC81oc4S3h+TjRJGLZWk08vlB9uJloeOwfkkpQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.446+3bfef282" - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/diagnostic" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-yaml@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/transformer-yaml/-/transformer-yaml-2.0.0-nightly.446.tgz#18edb6d64351acad5ef811022998c1c89bafbfce" - integrity sha512-HhL/0+wA1bfk7B5EWAlLiI5/Ys0oBIAI7tku3oR9ygbirTCUMvK9rIu+4RxXz60ePobSjRePNHD+QMrH8gt2iA== +"@parcel/transformer-yaml@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/transformer-yaml/-/transformer-yaml-2.0.0-nightly.447.tgz#b39860a7c8eb9ca396ce0241ee90d00c88d7edae" + integrity sha512-hUe9NBt24k1dUx49ThKbmvPSnsMZoxHOMGNslZhW2MV6QepDOuXj7xnXEMvyAkimuxDlcvGtkfhHJJD8RaGEWA== dependencies: - "@parcel/plugin" "2.0.0-nightly.446+3bfef282" + "@parcel/plugin" "2.0.0-nightly.447+3df3153b" -"@parcel/ts-utils@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/ts-utils/-/ts-utils-2.0.0-nightly.446.tgz#75c998d0ebe3fdbc8229c070dca10dc2b8ff216d" - integrity sha512-yabMSQRMkZAsW8Mv3ovtS9eyR/mLDB5cw+7m1J8C7t4tNyAoJzKVGF6+7J+VdweJNrblslEKZ3HlcJiJxGZTbw== +"@parcel/ts-utils@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/ts-utils/-/ts-utils-2.0.0-nightly.447.tgz#8a6f5e683b2cf03c6cbd655dfa710db280c3d385" + integrity sha512-5h53In5xgGewdOCqqtQaCZrrXp0CR13ADspBJ+l6NfJQRdcOSJS/j4C0TvxfZeM1SPg84EHRcfYVPhowQrMXaw== dependencies: nullthrows "^1.1.1" -"@parcel/types@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/types/-/types-2.0.0-nightly.446.tgz#c35ffc4a6b09f7a8aeb5198615cb668635f7545e" - integrity sha512-wnfp5Yoom7wSWOhjv74/BqFgF4LgM+dpIbwEfBY8h9hwFXKEIpiGLzZm5QtDJ5cF9LjBzHeZfgJ6n9Hs1Dqemg== +"@parcel/types@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/types/-/types-2.0.0-nightly.447.tgz#f3e71cd8c5590714169159c30dae9a6ad1e336bc" + integrity sha512-+ejywUnBj9g+iOLoFF7TguQi+P05JzZKmkkkX2hg6K5DvC511xIASZfPa/kxFWUK1vDvNmgP445i8TSgkuMyLA== -"@parcel/utils@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-2.0.0-nightly.446.tgz#45543a6822e0aadc356d007be0abfa31256435d0" - integrity sha512-TvvNo/bRXGFdV8qNFHwPy9AhhQI9UOX02xBoNIlf8H00hlLnMdWg1blZJikJz9S0o5/l0JbbD/bbyKD65HAPsg== +"@parcel/utils@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-2.0.0-nightly.447.tgz#0fccebed5482983b44d2ef46de283f7054850a6e" + integrity sha512-I/rSrHCjpRDtJXyNfkpfHVa4Uz8li1dsFBRoeTJ2mTmxiCig3Yc8WWlzZgP6Ltk4eLEL5hI5pcKAmDrljeM41Q== dependencies: "@iarna/toml" "^2.2.0" - "@parcel/codeframe" "2.0.0-nightly.446+3bfef282" - "@parcel/diagnostic" "2.0.0-nightly.446+3bfef282" - "@parcel/logger" "2.0.0-nightly.446+3bfef282" - "@parcel/markdown-ansi" "2.0.0-nightly.446+3bfef282" + "@parcel/codeframe" "2.0.0-nightly.447+3df3153b" + "@parcel/diagnostic" "2.0.0-nightly.447+3df3153b" + "@parcel/logger" "2.0.0-nightly.447+3df3153b" + "@parcel/markdown-ansi" "2.0.0-nightly.447+3df3153b" "@parcel/source-map" "2.0.0-alpha.4.16" ansi-html "^0.0.7" chalk "^2.4.2" @@ -2932,14 +2932,14 @@ node-addon-api "^3.0.0" node-gyp-build "^4.2.1" -"@parcel/workers@2.0.0-nightly.446+3bfef282": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-2.0.0-nightly.446.tgz#064827fb164be593de4adaa20a5d7504ad875173" - integrity sha512-xgw3SnURvNLP5f2nJQF9/zWCdWhnvKEIQu9aPznE/MJouVKxeCW5ZQIFt7+dIBu2PzecEBmZOV3iR1TtYxn07A== +"@parcel/workers@2.0.0-nightly.447+3df3153b": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-2.0.0-nightly.447.tgz#b5ab0a096b7bb18fdcaf1a61c43ffe875454be59" + integrity sha512-Ytgv5KfLzgouneaASrLWuAPGpbdPnyWyZimgjC8BpNvn4pSzFJ/TUKI/Yswhp9RbH6/lwT6efuwPOmGFrz3wkQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.446+3bfef282" - "@parcel/logger" "2.0.0-nightly.446+3bfef282" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" + "@parcel/diagnostic" "2.0.0-nightly.447+3df3153b" + "@parcel/logger" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" chrome-trace-event "^1.0.2" nullthrows "^1.1.1" @@ -10587,19 +10587,19 @@ parallel-transform@^1.1.0: inherits "^2.0.3" readable-stream "^2.1.5" -parcel@2.0.0-nightly.444: - version "2.0.0-nightly.444" - resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.0.0-nightly.444.tgz#d6ce4f75fbed148dcca60821f9509eba34aeb875" - integrity sha512-T3ZK8QKxt0PHeGQZe1vhFu2KP229BRRH14qn8UkKforaSwIT5BWngaFxAuh7vQulXCc+lNi38xK5MtqH6TQ7zg== - dependencies: - "@parcel/config-default" "2.0.0-nightly.446+3bfef282" - "@parcel/core" "2.0.0-nightly.444+3bfef282" - "@parcel/diagnostic" "2.0.0-nightly.446+3bfef282" - "@parcel/events" "2.0.0-nightly.446+3bfef282" - "@parcel/fs" "2.0.0-nightly.446+3bfef282" - "@parcel/logger" "2.0.0-nightly.446+3bfef282" - "@parcel/package-manager" "2.0.0-nightly.446+3bfef282" - "@parcel/utils" "2.0.0-nightly.446+3bfef282" +parcel@2.0.0-nightly.445: + version "2.0.0-nightly.445" + resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.0.0-nightly.445.tgz#bd76f4ace9455cdbda6938deee49366f72480379" + integrity sha512-i2FZrDKrNsmIw/Dwqs1MNXKjakymP62ZM/31gtEfdFlfRh/HJLxD8qVHbVW0q7fmhVD33dT5mtCuSTxAiqDQHg== + dependencies: + "@parcel/config-default" "2.0.0-nightly.447+3df3153b" + "@parcel/core" "2.0.0-nightly.445+3df3153b" + "@parcel/diagnostic" "2.0.0-nightly.447+3df3153b" + "@parcel/events" "2.0.0-nightly.447+3df3153b" + "@parcel/fs" "2.0.0-nightly.447+3df3153b" + "@parcel/logger" "2.0.0-nightly.447+3df3153b" + "@parcel/package-manager" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.447+3df3153b" chalk "^2.1.0" commander "^2.19.0" get-port "^4.2.0" From 809907de2ad2b300d4bcffe18b9e890700fd6c78 Mon Sep 17 00:00:00 2001 From: Somaya Date: Thu, 12 Nov 2020 22:36:04 -0800 Subject: [PATCH 130/314] chore: add new modules to auto label action (#11453) --- .github/workflows/issue-label-assign.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/issue-label-assign.yml b/.github/workflows/issue-label-assign.yml index 397709328e83e..60ba0a349eef8 100644 --- a/.github/workflows/issue-label-assign.yml +++ b/.github/workflows/issue-label-assign.yml @@ -24,6 +24,7 @@ jobs: {"keywords":["[@aws-cdk/aws-amplify]","[aws-amplify]","[amplify]"],"labels":["@aws-cdk/aws-amplify"],"assignees":["MrArnoldPalmer"]}, {"keywords":["[@aws-cdk/aws-apigateway]","[aws-apigateway]","[apigateway]","[api gateway]","[api-gateway]"],"labels":["@aws-cdk/aws-apigateway"],"assignees":["nija-at"]}, {"keywords":["[@aws-cdk/aws-apigatewayv2]","[aws-apigatewayv2]","[apigatewayv2]","[apigateway v2]","[api-gateway-v2]"],"labels":["@aws-cdk/aws-apigatewayv2"],"assignees":["nija-at"]}, + {"keywords":["[@aws-cdk/aws-apigatewayv2-integrations]","[aws-apigatewayv2-integrations]","[apigatewayv2-integrations]","[apigateway v2 integrations]","[api-gateway-v2-integrations]"],"labels":["@aws-cdk/aws-apigatewayv2-integrations"],"assignees":["nija-at"]}, {"keywords":["[@aws-cdk/aws-appconfig]","[aws-appconfig]","[appconfig]","[app config]","[app-config]"],"labels":["@aws-cdk/aws-appconfig"],"assignees":["MrArnoldPalmer"]}, {"keywords":["[@aws-cdk/aws-appflow]","[aws-appflow]","[appflow]","[app flow]","[app-flow]"],"labels":["@aws-cdk/aws-appflow"],"assignees":["skinny85"]}, {"keywords":["[@aws-cdk/aws-applicationautoscaling]","[aws-applicationautoscaling]","[applicationautoscaling]","[application autoscaling]","[application-autoscaling]"],"labels":["@aws-cdk/aws-applicationautoscaling"],"assignees":["NetaNir"]}, @@ -102,7 +103,9 @@ jobs: {"keywords":["[@aws-cdk/aws-iot1click]","[aws-iot1click]","[iot1click]","[iot 1click]"],"labels":["@aws-cdk/aws-iot1click"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-iotanalytics]","[aws-iotanalytics]","[iotanalytics]","[iot analytics]","[iot-analytics]"],"labels":["@aws-cdk/aws-iotanalytics"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-iotevents]","[aws-iotevents]","[iotevents]","[iot events]","[iot-events]"],"labels":["@aws-cdk/aws-iotevents"],"assignees":["shivlaks"]}, + {"keywords":["[@aws-cdk/aws-iotsitewise]","[aws-iotsitewise]","[iotsitewise]","[iot sitewise]","[iot-sitewise]","[iot-site-wise]",[iot site wise]"],"labels":["@aws-cdk/aws-iotsitewise"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-iotthingsgraph]","[aws-iotthingsgraph]","[iotthingsgraph]","[iot things graph]","[iot-things-graph]"],"labels":["@aws-cdk/aws-iotthingsgraph"],"assignees":["shivlaks"]}, + {"keywords":["[@aws-cdk/aws-ivs]","[aws-ivs]","[Interactive Video Service]","[ivs]"],"labels":["@aws-cdk/aws-ivs"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-kendra]","[aws-kendra]","[kendra]"],"labels":["@aws-cdk/aws-kendra"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-kinesis]","[aws-kinesis]","[kinesis]"],"labels":["@aws-cdk/aws-kinesis"],"assignees":["iliapolo"]}, {"keywords":["[@aws-cdk/aws-kinesisanalytics]","[aws-kinesisanalytics]","[kinesisanalytics]","[kinesis analytics]","[kinesis-analytics]"],"labels":["@aws-cdk/aws-kinesisanalytics"],"assignees":["iliapolo"]}, @@ -120,6 +123,7 @@ jobs: {"keywords":["[@aws-cdk/aws-mediaconvert]","[aws-mediaconvert]","[mediaconvert]","[media convert]","[media-convert]"],"labels":["@aws-cdk/aws-mediaconvert"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-medialive]","[aws-medialive]","[medialive]","[media live]","[media-live]"],"labels":["@aws-cdk/aws-medialive"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-mediastore]","[aws-mediastore]","[mediastore]","[media store]","[media-store]"],"labels":["@aws-cdk/aws-mediastore"],"assignees":["shivlaks"]}, + {"keywords":["[@aws-cdk/aws-mediapackage]","[aws-mediapackage]","[mediapackage]","[media package]","[media-package]"],"labels":["@aws-cdk/aws-mediapackage"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-msk]","[aws-msk]","[msk]"],"labels":["@aws-cdk/aws-msk"],"assignees":["iliapolo"]}, {"keywords":["[@aws-cdk/aws-neptune]","[aws-neptune]","[neptune]"],"labels":["@aws-cdk/aws-neptune"],"assignees":["njlynch"]}, {"keywords":["[@aws-cdk/aws-networkmanager]","[aws-networkmanager]","[networkmanager]","[network manager]","[network-manager]"],"labels":["@aws-cdk/aws-networkmanager"],"assignees":["shivlaks"]}, From 21ccfce514e10cfcdde36148b45f085d3494c540 Mon Sep 17 00:00:00 2001 From: Nick Law Date: Fri, 13 Nov 2020 18:06:21 +1100 Subject: [PATCH 131/314] feat(logs): Add KMS key support to LogGroup (#11363) This PR updates the `LogGroup` construct to support the ability to encrypt log groups on creation. Closes #11211 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-logs/README.md | 27 ++++++++++++++++--- packages/@aws-cdk/aws-logs/lib/log-group.ts | 9 +++++++ packages/@aws-cdk/aws-logs/package.json | 2 ++ .../@aws-cdk/aws-logs/test/test.loggroup.ts | 22 ++++++++++++++- 4 files changed, 56 insertions(+), 4 deletions(-) diff --git a/packages/@aws-cdk/aws-logs/README.md b/packages/@aws-cdk/aws-logs/README.md index 038b6db28c3a2..880113852e355 100644 --- a/packages/@aws-cdk/aws-logs/README.md +++ b/packages/@aws-cdk/aws-logs/README.md @@ -41,11 +41,32 @@ lambda](https://docs.aws.amazon.com/lambda/latest/dg/monitoring-cloudwatchlogs.h This is implemented using a [CloudFormation custom resource](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cfn-customresource.html) which pre-creates the log group if it doesn't exist, and sets the specified log retention period (never expire, by default). - + By default, the log group will be created in the same region as the stack. The `logGroupRegion` property can be used to configure log groups in other regions. This is typically useful when controlling retention for log groups auto-created by global services that publish their log group to a specific region, such as AWS Chatbot creating a log group in `us-east-1`. - + +### Encrypting Log Groups + +By default, log group data is always encrypted in CloudWatch Logs. You have the +option to encrypt log group data using a AWS KMS customer master key (CMK) should +you not wish to use the default AWS encryption. Keep in mind that if you decide to +encrypt a log group, any service or IAM identity that needs to read the encrypted +log streams in the future will require the same CMK to decrypt the data. + +Here's a simple example of creating an encrypted Log Group using a KMS CMK. + +```ts +import * as kms from '@aws-cdk/aws-kms'; + +new LogGroup(this, 'LogGroup', { + encryptionKey: new kms.Key(this, 'Key'), +}); +``` + +See the AWS documentation for more detailed information about [encrypting CloudWatch +Logs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/encrypt-log-data-kms.html). + ### Subscriptions and Destinations Log events matching a particular filter can be sent to either a Lambda function @@ -100,7 +121,7 @@ the name `Namespace/MetricName`. #### Exposing Metric on a Metric Filter -You can expose a metric on a metric filter by calling the `MetricFilter.metric()` API. +You can expose a metric on a metric filter by calling the `MetricFilter.metric()` API. This has a default of `statistic = 'avg'` if the statistic is not set in the `props`. ```ts diff --git a/packages/@aws-cdk/aws-logs/lib/log-group.ts b/packages/@aws-cdk/aws-logs/lib/log-group.ts index e041b16b29bbd..83c4a8e170b89 100644 --- a/packages/@aws-cdk/aws-logs/lib/log-group.ts +++ b/packages/@aws-cdk/aws-logs/lib/log-group.ts @@ -1,5 +1,6 @@ import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; import * as iam from '@aws-cdk/aws-iam'; +import * as kms from '@aws-cdk/aws-kms'; import { IResource, RemovalPolicy, Resource, Stack, Token } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { LogStream } from './log-stream'; @@ -273,6 +274,13 @@ export enum RetentionDays { * Properties for a LogGroup */ export interface LogGroupProps { + /** + * The KMS Key to encrypt the log group with. + * + * @default - log group is encrypted with the default master key + */ + readonly encryptionKey?: kms.IKey; + /** * Name of the log group. * @@ -363,6 +371,7 @@ export class LogGroup extends LogGroupBase { } const resource = new CfnLogGroup(this, 'Resource', { + kmsKeyId: props.encryptionKey?.keyArn, logGroupName: this.physicalName, retentionInDays, }); diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index 275a2cc729f49..f2e0056471229 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -86,6 +86,7 @@ "dependencies": { "@aws-cdk/aws-cloudwatch": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", + "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-s3-assets": "0.0.0", "@aws-cdk/core": "0.0.0", "constructs": "^3.2.0" @@ -94,6 +95,7 @@ "peerDependencies": { "@aws-cdk/aws-cloudwatch": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", + "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-s3-assets": "0.0.0", "@aws-cdk/core": "0.0.0", "constructs": "^3.2.0" diff --git a/packages/@aws-cdk/aws-logs/test/test.loggroup.ts b/packages/@aws-cdk/aws-logs/test/test.loggroup.ts index 22330ae0e3b1f..333ae71a976c3 100644 --- a/packages/@aws-cdk/aws-logs/test/test.loggroup.ts +++ b/packages/@aws-cdk/aws-logs/test/test.loggroup.ts @@ -1,10 +1,30 @@ import { expect, haveResource, matchTemplate } from '@aws-cdk/assert'; import * as iam from '@aws-cdk/aws-iam'; +import * as kms from '@aws-cdk/aws-kms'; import { CfnParameter, RemovalPolicy, Stack } from '@aws-cdk/core'; import { Test } from 'nodeunit'; import { LogGroup, RetentionDays } from '../lib'; export = { + 'set kms key when provided'(test: Test) { + // GIVEN + const stack = new Stack(); + const encryptionKey = new kms.Key(stack, 'Key'); + + // WHEN + new LogGroup(stack, 'LogGroup', { + encryptionKey, + }); + + // THEN + expect(stack).to(haveResource('AWS::Logs::LogGroup', { + KmsKeyId: { 'Fn::GetAtt': ['Key961B73FD', 'Arn'] }, + + })); + + test.done(); + }, + 'fixed retention'(test: Test) { // GIVEN const stack = new Stack(); @@ -326,4 +346,4 @@ function dataDrivenTests(cases: any[][], body: (test: Test, ...args: any[]) => v }; } return ret; -} \ No newline at end of file +} From d42b71b174cdce92f63a8ab6f2cd553e5d548292 Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Fri, 13 Nov 2020 10:31:28 +0000 Subject: [PATCH 132/314] chore: attributions for transitive bundled dependencies (#11442) Use `npm-bundled` package to identify transitive bundled dependencies. Specifically, these are dependencies of bundled dependencies. closes https://github.com/aws/cdk-ops/issues/578 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-ecr-assets/NOTICE | 68 ++++++++ packages/@aws-cdk/core/NOTICE | 142 +++++++++++++++ packages/aws-cdk-lib/NOTICE | 142 +++++++++++++++ packages/monocdk/NOTICE | 142 +++++++++++++++ tools/pkglint/lib/packagejson.ts | 9 +- tools/pkglint/lib/rules.ts | 2 +- tools/pkglint/package.json | 1 + tools/pkglint/test/fake-module.ts | 36 ++-- tools/pkglint/test/rules.test.ts | 220 +++++++++++++++++------- yarn.lock | 96 ++++++++++- 10 files changed, 760 insertions(+), 98 deletions(-) diff --git a/packages/@aws-cdk/aws-ecr-assets/NOTICE b/packages/@aws-cdk/aws-ecr-assets/NOTICE index c760ec779c75e..3441c3b03a3fd 100644 --- a/packages/@aws-cdk/aws-ecr-assets/NOTICE +++ b/packages/@aws-cdk/aws-ecr-assets/NOTICE @@ -21,3 +21,71 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------- + +** brace-expansion - https://www.npmjs.com/package/brace-expansion +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- + +** balanced-match - https://www.npmjs.com/package/balanced-match +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- + +** concat-map - https://www.npmjs.com/package/concat-map + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- \ No newline at end of file diff --git a/packages/@aws-cdk/core/NOTICE b/packages/@aws-cdk/core/NOTICE index 9ff5649eac07b..d23152578fbfd 100644 --- a/packages/@aws-cdk/core/NOTICE +++ b/packages/@aws-cdk/core/NOTICE @@ -86,3 +86,145 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- + +** at-least-node - https://www.npmjs.com/package/at-least-node +Copyright (c) 2020 Ryan Zimmerman + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---------------- + +** graceful-fs - https://www.npmjs.com/package/graceful-fs +Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors + + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---------------- + +** jsonfile - https://www.npmjs.com/package/jsonfile +Copyright (c) 2012-2015, JP Richardson + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files +(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** universalify - https://www.npmjs.com/package/universalify +Copyright (c) 2017, Ryan Zimmerman + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the 'Software'), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** brace-expansion - https://www.npmjs.com/package/brace-expansion +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- + +** balanced-match - https://www.npmjs.com/package/balanced-match +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- + +** concat-map - https://www.npmjs.com/package/concat-map + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- diff --git a/packages/aws-cdk-lib/NOTICE b/packages/aws-cdk-lib/NOTICE index 201344067fcb2..725bfc01ce553 100644 --- a/packages/aws-cdk-lib/NOTICE +++ b/packages/aws-cdk-lib/NOTICE @@ -193,3 +193,145 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- + +** at-least-node - https://www.npmjs.com/package/at-least-node +Copyright (c) 2020 Ryan Zimmerman + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---------------- + +** graceful-fs - https://www.npmjs.com/package/graceful-fs +Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors + + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---------------- + +** jsonfile - https://www.npmjs.com/package/jsonfile +Copyright (c) 2012-2015, JP Richardson + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files +(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** universalify - https://www.npmjs.com/package/universalify +Copyright (c) 2017, Ryan Zimmerman + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the 'Software'), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** brace-expansion - https://www.npmjs.com/package/brace-expansion +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- + +** balanced-match - https://www.npmjs.com/package/balanced-match +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- + +** concat-map - https://www.npmjs.com/package/concat-map + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- diff --git a/packages/monocdk/NOTICE b/packages/monocdk/NOTICE index 201344067fcb2..725bfc01ce553 100644 --- a/packages/monocdk/NOTICE +++ b/packages/monocdk/NOTICE @@ -193,3 +193,145 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- + +** at-least-node - https://www.npmjs.com/package/at-least-node +Copyright (c) 2020 Ryan Zimmerman + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---------------- + +** graceful-fs - https://www.npmjs.com/package/graceful-fs +Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors + + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---------------- + +** jsonfile - https://www.npmjs.com/package/jsonfile +Copyright (c) 2012-2015, JP Richardson + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files +(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** universalify - https://www.npmjs.com/package/universalify +Copyright (c) 2017, Ryan Zimmerman + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the 'Software'), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** brace-expansion - https://www.npmjs.com/package/brace-expansion +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- + +** balanced-match - https://www.npmjs.com/package/balanced-match +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- + +** concat-map - https://www.npmjs.com/package/concat-map + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- diff --git a/tools/pkglint/lib/packagejson.ts b/tools/pkglint/lib/packagejson.ts index 86be0b30cdc50..a59e8f1c6e307 100644 --- a/tools/pkglint/lib/packagejson.ts +++ b/tools/pkglint/lib/packagejson.ts @@ -1,6 +1,8 @@ import * as path from 'path'; import * as colors from 'colors/safe'; import * as fs from 'fs-extra'; +// eslint-disable-next-line @typescript-eslint/no-require-imports +const bundled = require('npm-bundled'); // do not descend into these directories when searching for `package.json` files. export const PKGLINT_IGNORES = ['node_modules', 'cdk.out', '.cdk.staging']; @@ -209,8 +211,11 @@ export class PackageJson { return Object.keys(this.json.dependencies || {}).filter(predicate).map(name => ({ name, version: this.json.dependencies[name] })); } - public getBundledDependencies(): string[] { - return this.json.bundledDependencies ?? []; + /** + * Retrieves all packages that are bundled in, including transitive bundled dependency of a bundled dependency. + */ + public getAllBundledDependencies(): string[] { + return bundled.sync({ path: this.packageRoot }); } /** diff --git a/tools/pkglint/lib/rules.ts b/tools/pkglint/lib/rules.ts index c669ce1efef31..28f72bd7e2133 100644 --- a/tools/pkglint/lib/rules.ts +++ b/tools/pkglint/lib/rules.ts @@ -146,7 +146,7 @@ export class ThirdPartyAttributions extends ValidationRule { if (pkg.json.private && !alwaysCheck.includes(pkg.json.name)) { return; } - const bundled = pkg.getBundledDependencies(); + const bundled = pkg.getAllBundledDependencies(); const lines = fs.readFileSync(path.join(pkg.packageRoot, 'NOTICE'), { encoding: 'utf8' }).split('\n'); const re = /^\*\* (\S+)/; diff --git a/tools/pkglint/package.json b/tools/pkglint/package.json index 3f6a213c666ab..e3b87b2a29d28 100644 --- a/tools/pkglint/package.json +++ b/tools/pkglint/package.json @@ -47,6 +47,7 @@ "colors": "^1.4.0", "fs-extra": "^9.0.1", "glob": "^7.1.6", + "npm-bundled": "^1.1.1", "semver": "^7.3.2", "yargs": "^16.1.0" } diff --git a/tools/pkglint/test/fake-module.ts b/tools/pkglint/test/fake-module.ts index 535805b2106d8..32cc8041afff7 100644 --- a/tools/pkglint/test/fake-module.ts +++ b/tools/pkglint/test/fake-module.ts @@ -4,23 +4,12 @@ import * as fs from 'fs-extra'; export interface FakeModuleProps { /** - * The contents of the package json. - * If an empty object, i.e. `{}`, is provided, an empty file is created. - * @default - no package json will be created + * The list of files to be created. + * The key specifies the path of the file relative to the package directory including the file name. + * If the value is a string, the string is written to the file. If object, the object is stringified + * using `JSON.stringify()` and written into the file. */ - readonly packagejson?: any; - /** - * The contents of the README.md file. Each item in the array represents a single line. - * If an empty list is provided, an empty file is created. - * @default - no README.md file will be created - */ - readonly readme?: string[]; - /** - * The contents of the NOTICE file. Each item in the array represents a single line. - * If an empty list is provided, an empty file is created. - * @default - no NOTICE file will be created - */ - readonly notice?: string[]; + readonly files?: { [key: string]: string | {} }; } export class FakeModule { @@ -35,17 +24,12 @@ export class FakeModule { throw new Error('Cannot re-create cleaned up fake module'); } if (!this._tmpdir) { - const tmpdir = await fs.mkdtemp(path.join(os.tmpdir(), 'pkglint-rules-test-')); - await fs.writeFile(path.join(tmpdir, 'package.json'), JSON.stringify(this.props.packagejson ?? {}), { encoding: 'utf8' }); - if (this.props.readme !== undefined) { - const contents = this.props.readme.join('\n'); - await fs.writeFile(path.join(tmpdir, 'README.md'), contents, { encoding: 'utf8' }); - } - if (this.props.notice !== undefined) { - const contents = this.props.notice.join('\n'); - await fs.writeFile(path.join(tmpdir, 'NOTICE'), contents, { encoding: 'utf8' }); + this._tmpdir = await fs.mkdtemp(path.join(os.tmpdir(), 'pkglint-rules-test-')); + for (const [key, value] of Object.entries(this.props.files ?? {})) { + await fs.mkdirp(path.join(this._tmpdir, path.dirname(key))); + const toWrite = typeof value === 'string' ? value : JSON.stringify(value); + await fs.writeFile(path.join(this._tmpdir, key), toWrite, { encoding: 'utf8' }); } - this._tmpdir = tmpdir; } return this._tmpdir; } diff --git a/tools/pkglint/test/rules.test.ts b/tools/pkglint/test/rules.test.ts index 70e8942697271..767dbe81b1e1d 100644 --- a/tools/pkglint/test/rules.test.ts +++ b/tools/pkglint/test/rules.test.ts @@ -19,15 +19,17 @@ describe('FeatureStabilityRule', () => { test('feature table is rendered', async () => { fakeModule = new FakeModule({ - packagejson: { - features: [ - { name: 'Experimental Feature', stability: 'Experimental' }, - { name: 'Stable Feature', stability: 'Stable' }, - { name: 'Dev Preview Feature', stability: 'Developer Preview' }, - { name: 'Not Implemented Feature', stability: 'Not Implemented' }, - ], + files: { + 'package.json': { + features: [ + { name: 'Experimental Feature', stability: 'Experimental' }, + { name: 'Stable Feature', stability: 'Stable' }, + { name: 'Dev Preview Feature', stability: 'Developer Preview' }, + { name: 'Not Implemented Feature', stability: 'Not Implemented' }, + ], + }, + 'README.md': '', }, - readme: [], }); const dirPath = await fakeModule.tmpdir(); const rule = new rules.FeatureStabilityRule(); @@ -47,11 +49,13 @@ describe('FeatureStabilityRule', () => { test('CFN Resources is rendered', async () => { fakeModule = new FakeModule({ - packagejson: { - 'cdk-build': { cloudformation: 'Foo::Bar' }, - 'features': [], + files: { + 'package.json': { + 'cdk-build': { cloudformation: 'Foo::Bar' }, + 'features': [], + }, + 'README.md': '', }, - readme: [], }); const dirPath = await fakeModule.tmpdir(); @@ -68,11 +72,13 @@ describe('FeatureStabilityRule', () => { describe('banner notices', () => { test('CFN Resources', async () => { fakeModule = new FakeModule({ - packagejson: { - 'cdk-build': { cloudformation: 'Foo::Bar' }, - 'features': [], + files: { + 'package.json': { + 'cdk-build': { cloudformation: 'Foo::Bar' }, + 'features': [], + }, + 'README.md': '', }, - readme: [], }); const dirPath = await fakeModule.tmpdir(); const rule = new rules.FeatureStabilityRule(); @@ -87,12 +93,14 @@ describe('FeatureStabilityRule', () => { test('experimental', async () => { fakeModule = new FakeModule({ - packagejson: { - features: [ - { name: 'Feature', stability: 'Experimental' }, - ], + files: { + 'package.json': { + features: [ + { name: 'Feature', stability: 'Experimental' }, + ], + }, + 'README.md': '', }, - readme: [], }); const dirPath = await fakeModule.tmpdir(); const rule = new rules.FeatureStabilityRule(); @@ -109,12 +117,14 @@ describe('FeatureStabilityRule', () => { test('developer preview', async () => { fakeModule = new FakeModule({ - packagejson: { - features: [ - { name: 'Feature', stability: 'Developer Preview' }, - ], + files: { + 'package.json': { + features: [ + { name: 'Feature', stability: 'Developer Preview' }, + ], + }, + 'README.md': '', }, - readme: [], }); const dirPath = await fakeModule.tmpdir(); const rule = new rules.FeatureStabilityRule(); @@ -131,12 +141,14 @@ describe('FeatureStabilityRule', () => { test('stable', async () => { fakeModule = new FakeModule({ - packagejson: { - features: [ - { name: 'Feature', stability: 'Stable' }, - ], + files: { + 'package.json': { + features: [ + { name: 'Feature', stability: 'Stable' }, + ], + }, + 'README.md': '', }, - readme: [], }); const dirPath = await fakeModule.tmpdir(); const rule = new rules.FeatureStabilityRule(); @@ -154,13 +166,15 @@ describe('FeatureStabilityRule', () => { test('skip if package private', async () => { fakeModule = new FakeModule({ - packagejson: { - private: true, - features: [ - { name: 'Experimental Feature', stability: 'Experimental' }, - ], + files: { + 'package.json': { + private: true, + features: [ + { name: 'Experimental Feature', stability: 'Experimental' }, + ], + }, + 'README.md': '', }, - readme: [], }); const dirPath = await fakeModule.tmpdir(); const rule = new rules.FeatureStabilityRule(); @@ -173,8 +187,10 @@ describe('FeatureStabilityRule', () => { test('skip if features is not specified', async () => { fakeModule = new FakeModule({ - packagejson: {}, - readme: [], + files: { + 'package.json': {}, + 'README.md': '', + }, }); const dirPath = await fakeModule.tmpdir(); const rule = new rules.FeatureStabilityRule(); @@ -187,10 +203,12 @@ describe('FeatureStabilityRule', () => { test('skip if README.md is missing', async () => { fakeModule = new FakeModule({ - packagejson: { - features: [ - { name: 'Experimental Feature', stability: 'Experimental' }, - ], + files: { + 'package.json': { + features: [ + { name: 'Experimental Feature', stability: 'Experimental' }, + ], + }, }, }); const dirPath = await fakeModule.tmpdir(); @@ -218,10 +236,14 @@ describe('ThirdPartyAttributions', () => { test('errors when attribution missing for bundled dependencies', async() => { fakeModule = new FakeModule({ - packagejson: { - bundledDependencies: ['dep1', 'dep2'], + files: { + 'package.json': { + bundledDependencies: ['dep1', 'dep2'], + }, + 'node_modules/dep1/package.json': {}, + 'node_modules/dep2/package.json': {}, + 'NOTICE': '', }, - notice: [], }); const dirPath = await fakeModule.tmpdir(); @@ -242,14 +264,17 @@ describe('ThirdPartyAttributions', () => { test('errors when there are excessive attributions', async() => { fakeModule = new FakeModule({ - packagejson: { - bundledDependencies: ['dep1'], + files: { + 'package.json': { + bundledDependencies: ['dep1'], + }, + 'node_modules/dep1/package.json': {}, + 'NOTICE': [ + '** dep1 - https://link-somewhere', + '** dep2 - https://link-elsewhere', + '** dep3-rev - https://link-elsewhere', + ].join('\n'), }, - notice: [ - '** dep1 - https://link-somewhere', - '** dep2 - https://link-elsewhere', - '** dep3-rev - https://link-elsewhere', - ], }); const dirPath = await fakeModule.tmpdir(); @@ -270,13 +295,17 @@ describe('ThirdPartyAttributions', () => { test('passes when attribution is present', async() => { fakeModule = new FakeModule({ - packagejson: { - bundledDependencies: ['dep1', 'dep2'], + files: { + 'package.json': { + bundledDependencies: ['dep1', 'dep2'], + }, + 'node_modules/dep1/package.json': {}, + 'node_modules/dep2/package.json': {}, + 'NOTICE': [ + '** dep1 - https://link-somewhere', + '** dep2 - https://link-elsewhere', + ].join('\n'), }, - notice: [ - '** dep1 - https://link-somewhere', - '** dep2 - https://link-elsewhere', - ], }); const dirPath = await fakeModule.tmpdir(); @@ -288,11 +317,68 @@ describe('ThirdPartyAttributions', () => { expect(pkgJson.hasReports).toBe(false); }); + test('passes when attribution for transitive bundled deps are present', async() => { + fakeModule = new FakeModule({ + files: { + 'package.json': { + bundledDependencies: ['dep1'], + }, + 'node_modules/dep1/package.json': { + dependencies: { dep2: '1.2.3' }, + }, + 'node_modules/dep2/package.json': {}, + 'NOTICE': [ + '** dep1 - https://link-somewhere', + '** dep2 - https://link-elsewhere', + ].join('\n'), + }, + }); + const dirPath = await fakeModule.tmpdir(); + + const rule = new rules.ThirdPartyAttributions(); + + const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); + rule.validate(pkgJson); + + expect(pkgJson.hasReports).toBe(false); + }); + + test('fails when attribution for transitive bundled deps are missing', async() => { + fakeModule = new FakeModule({ + files: { + 'package.json': { + bundledDependencies: ['dep1'], + }, + 'node_modules/dep1/package.json': { + dependencies: { dep2: '1.2.3' }, + }, + 'node_modules/dep2/package.json': {}, + 'NOTICE': [ + '** dep1 - https://link-somewhere', + ].join('\n'), + }, + }); + const dirPath = await fakeModule.tmpdir(); + + const rule = new rules.ThirdPartyAttributions(); + + const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); + rule.validate(pkgJson); + + expect(pkgJson.hasReports).toBe(true); + expect(pkgJson.reports.length).toEqual(1); + expect(pkgJson.reports[0].ruleName).toEqual('license/3p-attributions'); + expect(pkgJson.reports[0].message).toContain('Missing attribution'); + expect(pkgJson.reports[0].message).toContain('dep2'); + }); + test('skipped when no bundled dependencies', async() => { fakeModule = new FakeModule({ - packagejson: { + files: { + 'package.json': { + }, + 'NOTICE': '', }, - notice: [], }); const dirPath = await fakeModule.tmpdir(); @@ -306,11 +392,15 @@ describe('ThirdPartyAttributions', () => { test('skipped for private packages', async () => { fakeModule = new FakeModule({ - packagejson: { - private: true, - bundledDependencies: ['dep1', 'dep2'], + files: { + 'package.json': { + private: true, + bundledDependencies: ['dep1', 'dep2'], + }, + 'node_modules/dep1/package.json': {}, + 'node_modules/dep2/package.json': {}, + 'NOTICE': '', }, - notice: [], }); const dirPath = await fakeModule.tmpdir(); diff --git a/yarn.lock b/yarn.lock index 9d88cd15951c2..6df6d22d0470f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3575,6 +3575,11 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" +app-root-path@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.2.1.tgz#d0df4a682ee408273583d43f6f79e9892624bc9a" + integrity sha512-91IFKeKk7FjfmezPKkwtaRvSpnUc4gDwPAjA1YZ9Gn0q0PPeW+vbeUsZuyDwjI7+QTHhcLen2v25fi/AmhvbJA== + append-transform@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab" @@ -3842,7 +3847,7 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" -aws-sdk@^2.637.0, aws-sdk@^2.791.0: +aws-sdk@^2.596.0, aws-sdk@^2.637.0, aws-sdk@^2.791.0: version "2.791.0" resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.791.0.tgz#a85bedd46c97e0d262edb055651075c3171a171c" integrity sha512-oIWu0hLKmDS+rOmjud2Z1CaDXtmxKSJF4937dSNLf/vNkxxjJA/6HapSfKqsraLnekI9DLP8uop5HnCHC++Abw== @@ -5960,11 +5965,21 @@ dotenv-expand@^5.1.0: resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-5.1.0.tgz#3fbaf020bfd794884072ea26b1e9791d45a629f0" integrity sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA== +dotenv-json@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/dotenv-json/-/dotenv-json-1.0.0.tgz#fc7f672aafea04bed33818733b9f94662332815c" + integrity sha512-jAssr+6r4nKhKRudQ0HOzMskOFFi9+ubXWwmrSGJFgTvpjyPXCXsCsYbjif6mXp7uxA7xY3/LGaiTQukZzSbOQ== + dotenv@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-7.0.0.tgz#a2be3cd52736673206e8a85fb5210eea29628e7c" integrity sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g== +dotenv@^8.0.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" + integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== + dotgitignore@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/dotgitignore/-/dotgitignore-2.1.0.tgz#a4b15a4e4ef3cf383598aaf1dfa4a04bcc089b7b" @@ -6234,6 +6249,11 @@ escodegen@^1.11.0, escodegen@^1.14.1, escodegen@^1.8.1: optionalDependencies: source-map "~0.6.1" +eslint-config-standard@^14.1.1: + version "14.1.1" + resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz#830a8e44e7aef7de67464979ad06b406026c56ea" + integrity sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg== + eslint-import-resolver-node@^0.3.4: version "0.3.4" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" @@ -6261,6 +6281,14 @@ eslint-module-utils@^2.6.0: debug "^2.6.9" pkg-dir "^2.0.0" +eslint-plugin-es@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893" + integrity sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ== + dependencies: + eslint-utils "^2.0.0" + regexpp "^3.0.0" + eslint-plugin-import@^2.22.1: version "2.22.1" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz#0896c7e6a0cf44109a2d97b95903c2bb689d7702" @@ -6280,11 +6308,33 @@ eslint-plugin-import@^2.22.1: resolve "^1.17.0" tsconfig-paths "^3.9.0" +eslint-plugin-node@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d" + integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g== + dependencies: + eslint-plugin-es "^3.0.0" + eslint-utils "^2.0.0" + ignore "^5.1.1" + minimatch "^3.0.4" + resolve "^1.10.1" + semver "^6.1.0" + +eslint-plugin-promise@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz#845fd8b2260ad8f82564c1222fce44ad71d9418a" + integrity sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw== + eslint-plugin-rulesdir@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/eslint-plugin-rulesdir/-/eslint-plugin-rulesdir-0.1.0.tgz#ad144d7e98464fda82963eff3fab331aecb2bf08" integrity sha1-rRRNfphGT9qClj7/P6szGuyyvwg= +eslint-plugin-standard@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.1.0.tgz#0c3bf3a67e853f8bbbc580fb4945fbf16f41b7c5" + integrity sha512-ZL7+QRixjTR6/528YNGyDotyffm5OQst/sGxKDwGb9Uqs4In5Egi4+jbobhqJoyoCM6/7v/1A5fhQ7ScMtDjaQ== + eslint-scope@^5.0.0, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -7596,7 +7646,7 @@ ignore@^4.0.3, ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.1.4, ignore@^5.1.8: +ignore@^5.1.1, ignore@^5.1.4, ignore@^5.1.8: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== @@ -7828,6 +7878,13 @@ is-core-module@^2.0.0: dependencies: has "^1.0.3" +is-core-module@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.1.0.tgz#a4cc031d9b1aca63eecbd18a650e13cb4eeab946" + integrity sha512-YcV7BgVMRFRua2FqQzKtTDMz8iCuLEyGKjr70q8Zm1yy2qKcurbFEd79PAdHV77oL3NrAaOVQIbMmiHQCHB7ZA== + dependencies: + has "^1.0.3" + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -9004,6 +9061,24 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== +lambda-leak@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lambda-leak/-/lambda-leak-2.0.0.tgz#771985d3628487f6e885afae2b54510dcfb2cd7e" + integrity sha1-dxmF02KEh/boha+uK1RRDc+yzX4= + +lambda-tester@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/lambda-tester/-/lambda-tester-3.6.0.tgz#ceb7d4f4f0da768487a05cff37dcd088508b5247" + integrity sha512-F2ZTGWCLyIR95o/jWK46V/WnOCFAEUG/m/V7/CLhPJ7PCM+pror1rZ6ujP3TkItSGxUfpJi0kqwidw+M/nEqWw== + dependencies: + app-root-path "^2.2.1" + dotenv "^8.0.0" + dotenv-json "^1.0.0" + lambda-leak "^2.0.0" + semver "^6.1.1" + uuid "^3.3.2" + vandium-utils "^1.1.1" + lazystream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" @@ -10044,7 +10119,7 @@ normalize-url@^3.0.0, normalize-url@^3.3.0: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg== -npm-bundled@^1.0.1: +npm-bundled@^1.0.1, npm-bundled@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.1.tgz#1edd570865a94cdb1bc8220775e29466c9fb234b" integrity sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA== @@ -11949,6 +12024,14 @@ resolve@^1.1.6, resolve@^1.10.0, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.13 dependencies: path-parse "^1.0.6" +resolve@^1.10.1: + version "1.19.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" + integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== + dependencies: + is-core-module "^2.1.0" + path-parse "^1.0.6" + resolve@^1.18.1: version "1.18.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.18.1.tgz#018fcb2c5b207d2a6424aee361c5a266da8f4130" @@ -12149,7 +12232,7 @@ semver@7.x, semver@^7.1.1, semver@^7.2.1, semver@^7.3.2: resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== -semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: +semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -13762,6 +13845,11 @@ validate-npm-package-name@^3.0.0: dependencies: builtins "^1.0.3" +vandium-utils@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/vandium-utils/-/vandium-utils-1.2.0.tgz#44735de4b7641a05de59ebe945f174e582db4f59" + integrity sha1-RHNd5LdkGgXeWevpRfF05YLbT1k= + vendors@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.4.tgz#e2b800a53e7a29b93506c3cf41100d16c4c4ad8e" From c71a4e9644fdd64fa00a6d804c921b32bd1816d1 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Fri, 13 Nov 2020 14:08:05 +0100 Subject: [PATCH 133/314] feat(core): add easy importValue to CfnOutput (#11368) To transport values across Stages, users need to construct their own `{ Fn::ImportValue }` expressions, as we cannot properly do this for them in order to keep Stages deterministic and isolated. Add an expression constructor to make this API easier to use. Resolves #11360. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/core/lib/cfn-output.ts | 39 ++++++++++- packages/@aws-cdk/core/test/output.test.ts | 77 ++++++++++++++++++++-- 2 files changed, 110 insertions(+), 6 deletions(-) diff --git a/packages/@aws-cdk/core/lib/cfn-output.ts b/packages/@aws-cdk/core/lib/cfn-output.ts index ae1a52159244c..480de577db06c 100644 --- a/packages/@aws-cdk/core/lib/cfn-output.ts +++ b/packages/@aws-cdk/core/lib/cfn-output.ts @@ -103,7 +103,8 @@ export class CfnOutput extends CfnElement { /** * The name used to export the value of this output across stacks. * - * To import the value from another stack, use `Fn.importValue(exportName)`. + * To use the value in another stack, pass the value of + * `output.importValue` to it. * * @default - the output is not exported */ @@ -115,6 +116,38 @@ export class CfnOutput extends CfnElement { this._exportName = exportName; } + /** + * Return the `Fn.importValue` expression to import this value into another stack + * + * The returned value should not be used in the same stack, but in a + * different one. It must be deployed to the same environment, as + * CloudFormation exports can only be imported in the same Region and + * account. + * + * The is no automatic registration of dependencies between stacks when using + * this mechanism, so you should make sure to deploy them in the right order + * yourself. + * + * You can use this mechanism to share values across Stacks in different + * Stages. If you intend to share the value to another Stack inside the same + * Stage, the automatic cross-stack referencing mechanism is more convenient. + */ + public get importValue() { + // We made _exportName mutable so this will have to be lazy. + return Fn.importValue(Lazy.stringValue({ + produce: (ctx) => { + if (Stack.of(ctx.scope) === this.stack) { + throw new Error(`'importValue' property of '${this.node.path}' should only be used in a different Stack`); + } + if (!this._exportName) { + throw new Error(`Add an exportName to the CfnOutput at '${this.node.path}' in order to use 'output.importValue'`); + } + + return this._exportName; + }, + })); + } + /** * @internal */ @@ -133,3 +166,7 @@ export class CfnOutput extends CfnElement { } import { CfnCondition } from './cfn-condition'; +import { Fn } from './cfn-fn'; +import { Lazy } from './lazy'; +import { Stack } from './stack'; + diff --git a/packages/@aws-cdk/core/test/output.test.ts b/packages/@aws-cdk/core/test/output.test.ts index d7b509159a2bb..1179c3111c0c9 100644 --- a/packages/@aws-cdk/core/test/output.test.ts +++ b/packages/@aws-cdk/core/test/output.test.ts @@ -1,10 +1,16 @@ import { nodeunitShim, Test } from 'nodeunit-shim'; -import { CfnOutput, CfnResource, Stack } from '../lib'; +import { App, CfnOutput, CfnResource, Stack } from '../lib'; import { toCloudFormation } from './util'; +let app: App; +let stack: Stack; +beforeEach(() => { + app = new App(); + stack = new Stack(app, 'Stack'); +}); + nodeunitShim({ 'outputs can be added to the stack'(test: Test) { - const stack = new Stack(); const res = new CfnResource(stack, 'MyResource', { type: 'R' }); const ref = res.ref; @@ -29,9 +35,6 @@ nodeunitShim({ }, 'No export is created by default'(test: Test) { - // GIVEN - const stack = new Stack(); - // WHEN new CfnOutput(stack, 'SomeOutput', { value: 'x' }); @@ -46,4 +49,68 @@ nodeunitShim({ test.done(); }, + + 'importValue can be used to obtain a Fn::ImportValue expression'(test: Test) { + // GIVEN + const stack2 = new Stack(app, 'Stack2'); + + // WHEN + const output = new CfnOutput(stack, 'SomeOutput', { value: 'x', exportName: 'asdf' }); + new CfnResource(stack2, 'Resource', { + type: 'Some::Resource', + properties: { + input: output.importValue, + }, + }); + + // THEN + test.deepEqual(toCloudFormation(stack2), { + Resources: { + Resource: { + Type: 'Some::Resource', + Properties: { + input: { 'Fn::ImportValue': 'asdf' }, + }, + }, + }, + }); + + test.done(); + }, + + 'importValue used inside the same stack produces an error'(test: Test) { + // WHEN + const output = new CfnOutput(stack, 'SomeOutput', { value: 'x', exportName: 'asdf' }); + new CfnResource(stack, 'Resource', { + type: 'Some::Resource', + properties: { + input: output.importValue, + }, + }); + + // THEN + expect(() => toCloudFormation(stack)).toThrow(/should only be used in a different Stack/); + + test.done(); + }, + + 'error message if importValue is used and Output is not exported'(test: Test) { + // GIVEN + const stack2 = new Stack(app, 'Stack2'); + + // WHEN + const output = new CfnOutput(stack, 'SomeOutput', { value: 'x' }); + new CfnResource(stack2, 'Resource', { + type: 'Some::Resource', + properties: { + input: output.importValue, + }, + }); + + test.throws(() => { + toCloudFormation(stack2); + }, /Add an exportName to the CfnOutput/); + + test.done(); + }, }); From 39e277f65666e96fe1ad662254327967f666dbad Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Fri, 13 Nov 2020 20:30:24 +0100 Subject: [PATCH 134/314] fix(autoscaling): `targetRequestsPerSecond` is actually requests per minute (#11457) Scaling to a request rate per instance was advertised to scale to a rate/second, but the underlying API was actually expecting a rate/minute. Upscale the value of `targetRequestsPerSecond` by a factor of 60 to make its name actually correct, deprecate it, and add a `targetRequestsPerMinute` property which should have been the original API. Fixes #11446. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-autoscaling/lib/auto-scaling-group.ts | 28 ++++++++++- .../test/integ.asg-w-elbv2.expected.json | 2 +- .../aws-autoscaling/test/scaling.test.ts | 50 ++++++++++++++++++- 3 files changed, 76 insertions(+), 4 deletions(-) diff --git a/packages/@aws-cdk/aws-autoscaling/lib/auto-scaling-group.ts b/packages/@aws-cdk/aws-autoscaling/lib/auto-scaling-group.ts index 3b6ade93606be..cf5f6acbcbf71 100644 --- a/packages/@aws-cdk/aws-autoscaling/lib/auto-scaling-group.ts +++ b/packages/@aws-cdk/aws-autoscaling/lib/auto-scaling-group.ts @@ -10,6 +10,7 @@ import { Aws, CfnAutoScalingRollingUpdate, CfnCreationPolicy, CfnUpdatePolicy, Duration, Fn, IResource, Lazy, PhysicalName, Resource, Stack, Tags, + Token, Tokenization, withResolved, } from '@aws-cdk/core'; import { Construct } from 'constructs'; @@ -765,10 +766,24 @@ abstract class AutoScalingGroupBase extends Resource implements IAutoScalingGrou const resourceLabel = `${this.albTargetGroup.firstLoadBalancerFullName}/${this.albTargetGroup.targetGroupFullName}`; + if ((props.targetRequestsPerMinute === undefined) === (props.targetRequestsPerSecond === undefined)) { + throw new Error('Specify exactly one of \'targetRequestsPerMinute\' or \'targetRequestsPerSecond\''); + } + + let rpm: number; + if (props.targetRequestsPerSecond !== undefined) { + if (Token.isUnresolved(props.targetRequestsPerSecond)) { + throw new Error('\'targetRequestsPerSecond\' cannot be an unresolved value; use \'targetRequestsPerMinute\' instead.'); + } + rpm = props.targetRequestsPerSecond * 60; + } else { + rpm = props.targetRequestsPerMinute!; + } + const policy = new TargetTrackingScalingPolicy(this, `ScalingPolicy${id}`, { autoScalingGroup: this, predefinedMetric: PredefinedMetric.ALB_REQUEST_COUNT_PER_TARGET, - targetValue: props.targetRequestsPerSecond, + targetValue: rpm, resourceLabel, ...props, }); @@ -1603,8 +1618,17 @@ export interface NetworkUtilizationScalingProps extends BaseTargetTrackingProps export interface RequestCountScalingProps extends BaseTargetTrackingProps { /** * Target average requests/seconds on each instance + * + * @deprecated Use 'targetRequestsPerMinute' instead + * @default - Specify exactly one of 'targetRequestsPerSecond' and 'targetRequestsPerSecond' + */ + readonly targetRequestsPerSecond?: number; + + /** + * Target average requests/minute on each instance + * @default - Specify exactly one of 'targetRequestsPerSecond' and 'targetRequestsPerSecond' */ - readonly targetRequestsPerSecond: number; + readonly targetRequestsPerMinute?: number; } /** diff --git a/packages/@aws-cdk/aws-autoscaling/test/integ.asg-w-elbv2.expected.json b/packages/@aws-cdk/aws-autoscaling/test/integ.asg-w-elbv2.expected.json index e6dde4e4c0d4e..34f240a76559d 100644 --- a/packages/@aws-cdk/aws-autoscaling/test/integ.asg-w-elbv2.expected.json +++ b/packages/@aws-cdk/aws-autoscaling/test/integ.asg-w-elbv2.expected.json @@ -568,7 +568,7 @@ ] } }, - "TargetValue": 1 + "TargetValue": 60 } }, "DependsOn": [ diff --git a/packages/@aws-cdk/aws-autoscaling/test/scaling.test.ts b/packages/@aws-cdk/aws-autoscaling/test/scaling.test.ts index 10687702a56b1..86604a52d3404 100644 --- a/packages/@aws-cdk/aws-autoscaling/test/scaling.test.ts +++ b/packages/@aws-cdk/aws-autoscaling/test/scaling.test.ts @@ -75,7 +75,7 @@ nodeunitShim({ test.done(); }, - 'request count'(test: Test) { + 'request count per second'(test: Test) { // GIVEN const stack = new cdk.Stack(); const fixture = new ASGFixture(stack, 'Fixture'); @@ -99,6 +99,54 @@ nodeunitShim({ ], }; + expect(stack).to(haveResource('AWS::AutoScaling::ScalingPolicy', { + PolicyType: 'TargetTrackingScaling', + TargetTrackingConfiguration: { + TargetValue: 600, + PredefinedMetricSpecification: { + PredefinedMetricType: 'ALBRequestCountPerTarget', + ResourceLabel: { + 'Fn::Join': ['', [ + { 'Fn::Select': [1, arnParts] }, + '/', + { 'Fn::Select': [2, arnParts] }, + '/', + { 'Fn::Select': [3, arnParts] }, + '/', + { 'Fn::GetAtt': ['ALBListenerTargetsGroup01D7716A', 'TargetGroupFullName'] }, + ]], + }, + }, + }, + })); + + test.done(); + }, + + 'request count per minute'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const fixture = new ASGFixture(stack, 'Fixture'); + const alb = new elbv2.ApplicationLoadBalancer(stack, 'ALB', { vpc: fixture.vpc }); + const listener = alb.addListener('Listener', { port: 80 }); + listener.addTargets('Targets', { + port: 80, + targets: [fixture.asg], + }); + + // WHEN + fixture.asg.scaleOnRequestCount('ScaleRequest', { + targetRequestsPerMinute: 10, + }); + + // THEN + const arnParts = { + 'Fn::Split': [ + '/', + { Ref: 'ALBListener3B99FF85' }, + ], + }; + expect(stack).to(haveResource('AWS::AutoScaling::ScalingPolicy', { PolicyType: 'TargetTrackingScaling', TargetTrackingConfiguration: { From 3d4df34e76c1c7684e1457f4615b9025fadd3117 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 13 Nov 2020 20:15:49 +0000 Subject: [PATCH 135/314] chore(deps): bump aws-sdk from 2.791.0 to 2.792.0 (#11467) Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.791.0 to 2.792.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.791.0...v2.792.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- .../aws-cloudfront-origins/package.json | 2 +- packages/@aws-cdk/aws-cloudfront/package.json | 2 +- packages/@aws-cdk/aws-cloudtrail/package.json | 2 +- packages/@aws-cdk/aws-codebuild/package.json | 2 +- packages/@aws-cdk/aws-codecommit/package.json | 2 +- packages/@aws-cdk/aws-dynamodb/package.json | 2 +- packages/@aws-cdk/aws-eks/package.json | 2 +- .../@aws-cdk/aws-events-targets/package.json | 2 +- packages/@aws-cdk/aws-logs/package.json | 2 +- packages/@aws-cdk/aws-route53/package.json | 2 +- packages/@aws-cdk/aws-sqs/package.json | 2 +- .../@aws-cdk/custom-resources/package.json | 2 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- yarn.lock | 100 ++---------------- 15 files changed, 20 insertions(+), 108 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudfront-origins/package.json b/packages/@aws-cdk/aws-cloudfront-origins/package.json index 6891422fe274b..8d8b0c2b4d64f 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/package.json +++ b/packages/@aws-cdk/aws-cloudfront-origins/package.json @@ -72,7 +72,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", - "aws-sdk": "^2.791.0", + "aws-sdk": "^2.792.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "pkglint": "0.0.0" diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index 8cf3a2c5fc632..7a1649e201239 100644 --- a/packages/@aws-cdk/aws-cloudfront/package.json +++ b/packages/@aws-cdk/aws-cloudfront/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.791.0", + "aws-sdk": "^2.792.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index c31375fc5b528..462a90b482570 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.791.0", + "aws-sdk": "^2.792.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codebuild/package.json b/packages/@aws-cdk/aws-codebuild/package.json index f776977503df6..93ac42962e90c 100644 --- a/packages/@aws-cdk/aws-codebuild/package.json +++ b/packages/@aws-cdk/aws-codebuild/package.json @@ -79,7 +79,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.791.0", + "aws-sdk": "^2.792.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codecommit/package.json b/packages/@aws-cdk/aws-codecommit/package.json index 872966c9a78e6..aa76ed05a103f 100644 --- a/packages/@aws-cdk/aws-codecommit/package.json +++ b/packages/@aws-cdk/aws-codecommit/package.json @@ -79,7 +79,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.791.0", + "aws-sdk": "^2.792.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index 9ffc897f1b28a..6df9c614e864d 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -74,7 +74,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/jest": "^26.0.15", - "aws-sdk": "^2.791.0", + "aws-sdk": "^2.792.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index 0a5df12a22a81..39feb03c3f7db 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", "@types/yaml": "1.9.6", - "aws-sdk": "^2.791.0", + "aws-sdk": "^2.792.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index cbd86ca1e61f5..444131100fd25 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -75,7 +75,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-codecommit": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", - "aws-sdk": "^2.791.0", + "aws-sdk": "^2.792.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index f2e0056471229..d3df5c52c5a63 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.791.0", + "aws-sdk": "^2.792.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-route53/package.json b/packages/@aws-cdk/aws-route53/package.json index c0857a6fe8b85..301fee1bba9fe 100644 --- a/packages/@aws-cdk/aws-route53/package.json +++ b/packages/@aws-cdk/aws-route53/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.791.0", + "aws-sdk": "^2.792.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-sqs/package.json b/packages/@aws-cdk/aws-sqs/package.json index 8abfea7aca109..0a88a1730515f 100644 --- a/packages/@aws-cdk/aws-sqs/package.json +++ b/packages/@aws-cdk/aws-sqs/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.791.0", + "aws-sdk": "^2.792.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index f1e07fa3ae06e..8f17efcc963b9 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -79,7 +79,7 @@ "@types/aws-lambda": "^8.10.64", "@types/fs-extra": "^8.1.1", "@types/sinon": "^9.0.8", - "aws-sdk": "^2.791.0", + "aws-sdk": "^2.792.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 475c599e4289a..1a4edb29ad992 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -71,7 +71,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.791.0", + "aws-sdk": "^2.792.0", "camelcase": "^6.2.0", "cdk-assets": "0.0.0", "colors": "^1.4.0", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index 15ccfe61cad61..f42f0673a35a6 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -47,7 +47,7 @@ "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.791.0", + "aws-sdk": "^2.792.0", "glob": "^7.1.6", "yargs": "^16.1.0" }, diff --git a/yarn.lock b/yarn.lock index 6df6d22d0470f..aaec31d38eb86 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3575,11 +3575,6 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" -app-root-path@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.2.1.tgz#d0df4a682ee408273583d43f6f79e9892624bc9a" - integrity sha512-91IFKeKk7FjfmezPKkwtaRvSpnUc4gDwPAjA1YZ9Gn0q0PPeW+vbeUsZuyDwjI7+QTHhcLen2v25fi/AmhvbJA== - append-transform@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab" @@ -3847,10 +3842,10 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" -aws-sdk@^2.596.0, aws-sdk@^2.637.0, aws-sdk@^2.791.0: - version "2.791.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.791.0.tgz#a85bedd46c97e0d262edb055651075c3171a171c" - integrity sha512-oIWu0hLKmDS+rOmjud2Z1CaDXtmxKSJF4937dSNLf/vNkxxjJA/6HapSfKqsraLnekI9DLP8uop5HnCHC++Abw== +aws-sdk@^2.637.0, aws-sdk@^2.792.0: + version "2.792.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.792.0.tgz#d124a6074244a4675e0416887734e8f6934bdd30" + integrity sha512-h7oSlrCDtZkW5qNw/idKmMjjNJaaPlXFY+NbqtaTjejpCyVuIonUmFvm8GW16V58Avj/hujJfhpX9q0BMCg+VQ== dependencies: buffer "4.9.2" events "1.1.1" @@ -5965,21 +5960,11 @@ dotenv-expand@^5.1.0: resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-5.1.0.tgz#3fbaf020bfd794884072ea26b1e9791d45a629f0" integrity sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA== -dotenv-json@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/dotenv-json/-/dotenv-json-1.0.0.tgz#fc7f672aafea04bed33818733b9f94662332815c" - integrity sha512-jAssr+6r4nKhKRudQ0HOzMskOFFi9+ubXWwmrSGJFgTvpjyPXCXsCsYbjif6mXp7uxA7xY3/LGaiTQukZzSbOQ== - dotenv@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-7.0.0.tgz#a2be3cd52736673206e8a85fb5210eea29628e7c" integrity sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g== -dotenv@^8.0.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" - integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== - dotgitignore@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/dotgitignore/-/dotgitignore-2.1.0.tgz#a4b15a4e4ef3cf383598aaf1dfa4a04bcc089b7b" @@ -6249,11 +6234,6 @@ escodegen@^1.11.0, escodegen@^1.14.1, escodegen@^1.8.1: optionalDependencies: source-map "~0.6.1" -eslint-config-standard@^14.1.1: - version "14.1.1" - resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz#830a8e44e7aef7de67464979ad06b406026c56ea" - integrity sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg== - eslint-import-resolver-node@^0.3.4: version "0.3.4" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" @@ -6281,14 +6261,6 @@ eslint-module-utils@^2.6.0: debug "^2.6.9" pkg-dir "^2.0.0" -eslint-plugin-es@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893" - integrity sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ== - dependencies: - eslint-utils "^2.0.0" - regexpp "^3.0.0" - eslint-plugin-import@^2.22.1: version "2.22.1" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz#0896c7e6a0cf44109a2d97b95903c2bb689d7702" @@ -6308,33 +6280,11 @@ eslint-plugin-import@^2.22.1: resolve "^1.17.0" tsconfig-paths "^3.9.0" -eslint-plugin-node@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d" - integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g== - dependencies: - eslint-plugin-es "^3.0.0" - eslint-utils "^2.0.0" - ignore "^5.1.1" - minimatch "^3.0.4" - resolve "^1.10.1" - semver "^6.1.0" - -eslint-plugin-promise@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz#845fd8b2260ad8f82564c1222fce44ad71d9418a" - integrity sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw== - eslint-plugin-rulesdir@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/eslint-plugin-rulesdir/-/eslint-plugin-rulesdir-0.1.0.tgz#ad144d7e98464fda82963eff3fab331aecb2bf08" integrity sha1-rRRNfphGT9qClj7/P6szGuyyvwg= -eslint-plugin-standard@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.1.0.tgz#0c3bf3a67e853f8bbbc580fb4945fbf16f41b7c5" - integrity sha512-ZL7+QRixjTR6/528YNGyDotyffm5OQst/sGxKDwGb9Uqs4In5Egi4+jbobhqJoyoCM6/7v/1A5fhQ7ScMtDjaQ== - eslint-scope@^5.0.0, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -7646,7 +7596,7 @@ ignore@^4.0.3, ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.1.1, ignore@^5.1.4, ignore@^5.1.8: +ignore@^5.1.4, ignore@^5.1.8: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== @@ -7878,13 +7828,6 @@ is-core-module@^2.0.0: dependencies: has "^1.0.3" -is-core-module@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.1.0.tgz#a4cc031d9b1aca63eecbd18a650e13cb4eeab946" - integrity sha512-YcV7BgVMRFRua2FqQzKtTDMz8iCuLEyGKjr70q8Zm1yy2qKcurbFEd79PAdHV77oL3NrAaOVQIbMmiHQCHB7ZA== - dependencies: - has "^1.0.3" - is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -9061,24 +9004,6 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== -lambda-leak@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lambda-leak/-/lambda-leak-2.0.0.tgz#771985d3628487f6e885afae2b54510dcfb2cd7e" - integrity sha1-dxmF02KEh/boha+uK1RRDc+yzX4= - -lambda-tester@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/lambda-tester/-/lambda-tester-3.6.0.tgz#ceb7d4f4f0da768487a05cff37dcd088508b5247" - integrity sha512-F2ZTGWCLyIR95o/jWK46V/WnOCFAEUG/m/V7/CLhPJ7PCM+pror1rZ6ujP3TkItSGxUfpJi0kqwidw+M/nEqWw== - dependencies: - app-root-path "^2.2.1" - dotenv "^8.0.0" - dotenv-json "^1.0.0" - lambda-leak "^2.0.0" - semver "^6.1.1" - uuid "^3.3.2" - vandium-utils "^1.1.1" - lazystream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" @@ -12024,14 +11949,6 @@ resolve@^1.1.6, resolve@^1.10.0, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.13 dependencies: path-parse "^1.0.6" -resolve@^1.10.1: - version "1.19.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" - integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== - dependencies: - is-core-module "^2.1.0" - path-parse "^1.0.6" - resolve@^1.18.1: version "1.18.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.18.1.tgz#018fcb2c5b207d2a6424aee361c5a266da8f4130" @@ -12232,7 +12149,7 @@ semver@7.x, semver@^7.1.1, semver@^7.2.1, semver@^7.3.2: resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== -semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.2.0, semver@^6.3.0: +semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -13845,11 +13762,6 @@ validate-npm-package-name@^3.0.0: dependencies: builtins "^1.0.3" -vandium-utils@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/vandium-utils/-/vandium-utils-1.2.0.tgz#44735de4b7641a05de59ebe945f174e582db4f59" - integrity sha1-RHNd5LdkGgXeWevpRfF05YLbT1k= - vendors@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.4.tgz#e2b800a53e7a29b93506c3cf41100d16c4c4ad8e" From 03e7cd5ebaf07be22f8fff8edacbc384989ebf7c Mon Sep 17 00:00:00 2001 From: Jonathan Goldwasser Date: Fri, 13 Nov 2020 22:43:17 +0100 Subject: [PATCH 136/314] feat(ecs): secret JSON field for Fargate tasks (#11348) Fargate tasks running on platform version 1.4 can now reference a specific JSON field of a secret stored in Secrets Manager. Remove the error in `ContainerDefinition` and add a check on the platform version in `FargateService`. See https://aws.amazon.com/about-aws/whats-new/2020/11/aws-fargate-for-amazon-ecs-launches-features-focused-on-configuration-and-metrics/ See https://github.com/aws/containers-roadmap/issues/385#issuecomment-722696672 Closes #11341 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-ecs/README.md | 2 +- .../aws-ecs/lib/base/task-definition.ts | 13 ++++++++ .../aws-ecs/lib/container-definition.ts | 13 ++++++-- .../aws-ecs/lib/fargate/fargate-service.ts | 13 ++++++++ .../test/fargate/integ.secret.expected.json | 16 +++++++++- .../aws-ecs/test/fargate/integ.secret.ts | 1 + .../test/fargate/test.fargate-service.ts | 26 +++++++++++++++ .../aws-ecs/test/test.container-definition.ts | 32 ++++++++++++++++--- 8 files changed, 107 insertions(+), 9 deletions(-) diff --git a/packages/@aws-cdk/aws-ecs/README.md b/packages/@aws-cdk/aws-ecs/README.md index d63f9974cc76c..d0c7cce7965d2 100644 --- a/packages/@aws-cdk/aws-ecs/README.md +++ b/packages/@aws-cdk/aws-ecs/README.md @@ -298,7 +298,7 @@ taskDefinition.addContainer('container', { }, secrets: { // Retrieved from AWS Secrets Manager or AWS Systems Manager Parameter Store at container start-up. SECRET: ecs.Secret.fromSecretsManager(secret), - DB_PASSWORD: ecs.Secret.fromSecretsManager(dbSecret, 'password'), // Reference a specific JSON field + DB_PASSWORD: ecs.Secret.fromSecretsManager(dbSecret, 'password'), // Reference a specific JSON field, (requires platform version 1.4.0 or later for Fargate tasks) PARAMETER: ecs.Secret.fromSsmParameter(parameter), } }); diff --git a/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts b/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts index 948ce4ea8ae90..862193b11fe3b 100644 --- a/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts +++ b/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts @@ -261,6 +261,8 @@ export class TaskDefinition extends TaskDefinitionBase { private _executionRole?: iam.IRole; + private _referencesSecretJsonField?: boolean; + /** * Constructs a new instance of the TaskDefinition class. */ @@ -435,6 +437,9 @@ export class TaskDefinition extends TaskDefinitionBase { if (this.defaultContainer === undefined && container.essential) { this.defaultContainer = container; } + if (container.referencesSecretJsonField) { + this._referencesSecretJsonField = true; + } } /** @@ -476,6 +481,14 @@ export class TaskDefinition extends TaskDefinitionBase { return this._executionRole; } + /** + * Whether this task definition has at least a container that references a + * specific JSON field of a secret stored in Secrets Manager. + */ + public get referencesSecretJsonField(): boolean | undefined { + return this._referencesSecretJsonField; + } + /** * Validates the task definition. */ diff --git a/packages/@aws-cdk/aws-ecs/lib/container-definition.ts b/packages/@aws-cdk/aws-ecs/lib/container-definition.ts index 93fa347799d38..d8ceec33c4a1c 100644 --- a/packages/@aws-cdk/aws-ecs/lib/container-definition.ts +++ b/packages/@aws-cdk/aws-ecs/lib/container-definition.ts @@ -355,6 +355,12 @@ export class ContainerDefinition extends cdk.Construct { */ public readonly logDriverConfig?: LogDriverConfig; + /** + * Whether this container definition references a specific JSON field of a secret + * stored in Secrets Manager. + */ + public readonly referencesSecretJsonField?: boolean; + /** * The configured container links */ @@ -384,13 +390,12 @@ export class ContainerDefinition extends cdk.Construct { if (props.logging) { this.logDriverConfig = props.logging.bind(this, this); } - props.taskDefinition._linkContainer(this); if (props.secrets) { this.secrets = []; for (const [name, secret] of Object.entries(props.secrets)) { - if (this.taskDefinition.isFargateCompatible && secret.hasField) { - throw new Error(`Cannot specify secret JSON field for a task using the FARGATE launch type: '${name}' in container '${this.node.id}'`); + if (secret.hasField) { + this.referencesSecretJsonField = true; } secret.grantRead(this.taskDefinition.obtainExecutionRole()); this.secrets.push({ @@ -399,6 +404,8 @@ export class ContainerDefinition extends cdk.Construct { }); } } + + props.taskDefinition._linkContainer(this); } /** diff --git a/packages/@aws-cdk/aws-ecs/lib/fargate/fargate-service.ts b/packages/@aws-cdk/aws-ecs/lib/fargate/fargate-service.ts index e709b705dfa29..fd0c4bbac64b5 100644 --- a/packages/@aws-cdk/aws-ecs/lib/fargate/fargate-service.ts +++ b/packages/@aws-cdk/aws-ecs/lib/fargate/fargate-service.ts @@ -141,6 +141,12 @@ export class FargateService extends BaseService implements IFargateService { throw new Error('Only one of SecurityGroup or SecurityGroups can be populated.'); } + if (props.taskDefinition.referencesSecretJsonField + && props.platformVersion + && SECRET_JSON_FIELD_UNSUPPORTED_PLATFORM_VERSIONS.includes(props.platformVersion)) { + throw new Error(`The task definition of this service uses at least one container that references a secret JSON field. This feature requires platform version ${FargatePlatformVersion.VERSION1_4} or later.`); + } + const propagateTagsFromSource = props.propagateTaskTagsFrom !== undefined ? props.propagateTaskTagsFrom : (props.propagateTags !== undefined ? props.propagateTags : PropagatedTagSource.NONE); @@ -219,3 +225,10 @@ export enum FargatePlatformVersion { */ VERSION1_0 = '1.0.0', } + +const SECRET_JSON_FIELD_UNSUPPORTED_PLATFORM_VERSIONS = [ + FargatePlatformVersion.VERSION1_0, + FargatePlatformVersion.VERSION1_1, + FargatePlatformVersion.VERSION1_2, + FargatePlatformVersion.VERSION1_3, +]; diff --git a/packages/@aws-cdk/aws-ecs/test/fargate/integ.secret.expected.json b/packages/@aws-cdk/aws-ecs/test/fargate/integ.secret.expected.json index 39896001c0e67..2ef36fdc4d94a 100644 --- a/packages/@aws-cdk/aws-ecs/test/fargate/integ.secret.expected.json +++ b/packages/@aws-cdk/aws-ecs/test/fargate/integ.secret.expected.json @@ -40,6 +40,20 @@ "ValueFrom": { "Ref": "SecretA720EF05" } + }, + { + "Name": "PASSWORD", + "ValueFrom": { + "Fn::Join": [ + "", + [ + { + "Ref": "SecretA720EF05" + }, + ":password::" + ] + ] + } } ] } @@ -109,4 +123,4 @@ } } } -} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/fargate/integ.secret.ts b/packages/@aws-cdk/aws-ecs/test/fargate/integ.secret.ts index 7cc743c05209c..4e3599145dffd 100644 --- a/packages/@aws-cdk/aws-ecs/test/fargate/integ.secret.ts +++ b/packages/@aws-cdk/aws-ecs/test/fargate/integ.secret.ts @@ -18,6 +18,7 @@ taskDefinition.addContainer('web', { image: ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample'), secrets: { SECRET: ecs.Secret.fromSecretsManager(secret), + PASSWORD: ecs.Secret.fromSecretsManager(secret, 'password'), }, }); diff --git a/packages/@aws-cdk/aws-ecs/test/fargate/test.fargate-service.ts b/packages/@aws-cdk/aws-ecs/test/fargate/test.fargate-service.ts index be05fbbac3e9b..7b8dc6975bae1 100644 --- a/packages/@aws-cdk/aws-ecs/test/fargate/test.fargate-service.ts +++ b/packages/@aws-cdk/aws-ecs/test/fargate/test.fargate-service.ts @@ -3,6 +3,7 @@ import * as appscaling from '@aws-cdk/aws-applicationautoscaling'; import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; +import * as secretsmanager from '@aws-cdk/aws-secretsmanager'; import * as cloudmap from '@aws-cdk/aws-servicediscovery'; import * as cdk from '@aws-cdk/core'; import { Test } from 'nodeunit'; @@ -301,6 +302,31 @@ export = { test.done(); }, + 'throws whith secret json field on unsupported platform version'(test: Test) { + const stack = new cdk.Stack(); + const vpc = new ec2.Vpc(stack, 'MyVpc', {}); + const cluster = new ecs.Cluster(stack, 'EcsCluster', { vpc }); + const taskDefinition = new ecs.FargateTaskDefinition(stack, 'TaksDef'); + const secret = new secretsmanager.Secret(stack, 'Secret'); + taskDefinition.addContainer('BaseContainer', { + image: ecs.ContainerImage.fromRegistry('test'), + secrets: { + SECRET_KEY: ecs.Secret.fromSecretsManager(secret, 'specificKey'), + }, + }); + + // THEN + test.throws(() => { + new ecs.FargateService(stack, 'FargateService', { + cluster, + taskDefinition, + platformVersion: ecs.FargatePlatformVersion.VERSION1_3, + }); + }, new RegExp(`uses at least one container that references a secret JSON field.+platform version ${ecs.FargatePlatformVersion.VERSION1_4} or later`)); + + test.done(); + }, + 'ignore task definition and launch type if deployment controller is set to be EXTERNAL'(test: Test) { // GIVEN const stack = new cdk.Stack(); diff --git a/packages/@aws-cdk/aws-ecs/test/test.container-definition.ts b/packages/@aws-cdk/aws-ecs/test/test.container-definition.ts index 06acd4f620083..8f5c9f5de0c0f 100644 --- a/packages/@aws-cdk/aws-ecs/test/test.container-definition.ts +++ b/packages/@aws-cdk/aws-ecs/test/test.container-definition.ts @@ -846,21 +846,45 @@ export = { }, - 'throws when using a specific secret JSON field as environment variable for a Fargate task'(test: Test) { + 'use a specific secret JSON field as environment variable for a Fargate task'(test: Test) { // GIVEN const stack = new cdk.Stack(); const taskDefinition = new ecs.FargateTaskDefinition(stack, 'TaskDef'); const secret = new secretsmanager.Secret(stack, 'Secret'); - // THEN - test.throws(() => taskDefinition.addContainer('cont', { + // WHEN + taskDefinition.addContainer('cont', { image: ecs.ContainerImage.fromRegistry('test'), memoryLimitMiB: 1024, secrets: { SECRET_KEY: ecs.Secret.fromSecretsManager(secret, 'specificKey'), }, - }), /Cannot specify secret JSON field for a task using the FARGATE launch type/); + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::ECS::TaskDefinition', { + ContainerDefinitions: [ + { + Secrets: [ + { + Name: 'SECRET_KEY', + ValueFrom: { + 'Fn::Join': [ + '', + [ + { + Ref: 'SecretA720EF05', + }, + ':specificKey::', + ], + ], + }, + }, + ], + }, + ], + })); test.done(); }, From ab248c61e4d29c31c340993d7311701f1109a7d6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 14 Nov 2020 00:49:47 +0000 Subject: [PATCH 137/314] chore(deps-dev): bump parcel from 2.0.0-nightly.445 to 2.0.0-nightly.446 (#11469) Bumps [parcel](https://github.com/parcel-bundler/parcel) from 2.0.0-nightly.445 to 2.0.0-nightly.446. - [Release notes](https://github.com/parcel-bundler/parcel/releases) - [Changelog](https://github.com/parcel-bundler/parcel/blob/v2/CHANGELOG.md) - [Commits](https://github.com/parcel-bundler/parcel/commits) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- .../@aws-cdk/aws-lambda-nodejs/package.json | 2 +- yarn.lock | 920 +++++++++--------- 2 files changed, 461 insertions(+), 461 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda-nodejs/package.json b/packages/@aws-cdk/aws-lambda-nodejs/package.json index 7a60283364ac8..40d6d3d93dbce 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/package.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/package.json @@ -67,7 +67,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "delay": "4.4.0", - "parcel": "2.0.0-nightly.445", + "parcel": "2.0.0-nightly.446", "pkglint": "0.0.0" }, "dependencies": { diff --git a/yarn.lock b/yarn.lock index aaec31d38eb86..df2e87a342527 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2159,128 +2159,128 @@ dependencies: "@types/node" ">= 8" -"@parcel/babel-ast-utils@2.0.0-nightly.2069+3df3153b": - version "2.0.0-nightly.2069" - resolved "https://registry.yarnpkg.com/@parcel/babel-ast-utils/-/babel-ast-utils-2.0.0-nightly.2069.tgz#40a56e7ad51b7e0c7ede4d1b661cf32ea9f78a0f" - integrity sha512-AWeNeJVJPf3U8KBf5TiB/ZNC0WvdnY3gAPhEpDoSOM4fpUiTsQSzDjfh+lCJarVnDgATudPIvQCXmQJXn6+dug== +"@parcel/babel-ast-utils@2.0.0-nightly.2070+61001140": + version "2.0.0-nightly.2070" + resolved "https://registry.yarnpkg.com/@parcel/babel-ast-utils/-/babel-ast-utils-2.0.0-nightly.2070.tgz#ada4316f5ef2df8ddd795362383fc365dbd1629c" + integrity sha512-4NMO2W90IcQd8U15RhYPp8v33YekcKS4zqZELF8sdI12Iu5DdN5llo8mnAn2bRNZ/s3IK6RFrpkqvZndKTr9wQ== dependencies: "@babel/generator" "^7.0.0" "@babel/parser" "^7.0.0" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.448+61001140" -"@parcel/babel-preset-env@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/babel-preset-env/-/babel-preset-env-2.0.0-nightly.447.tgz#049c3b3d3a5f56885e5c50bb15673f92ad76e6f8" - integrity sha512-84Ya/ACzm65xyWQm+NiWNOeN3vR6dgQSl0BLPHOGVf08SrpNzfdt2qVotPp4lfPP/tEjuMTElcOWzwI3zD7EUQ== +"@parcel/babel-preset-env@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/babel-preset-env/-/babel-preset-env-2.0.0-nightly.448.tgz#f90703841f0ff19f2a0408d77e290ff6dcdca454" + integrity sha512-9pGTMjIV7l2qLDZdXhLFfbVUir6osHMCD4qPm746D2dHFTm0FlGefyiLN2b52ky8CfNixrfxX2qwpjaK7CdOuA== dependencies: "@babel/preset-env" "^7.4.0" semver "^5.4.1" -"@parcel/babylon-walk@2.0.0-nightly.2069+3df3153b": - version "2.0.0-nightly.2069" - resolved "https://registry.yarnpkg.com/@parcel/babylon-walk/-/babylon-walk-2.0.0-nightly.2069.tgz#68c4ce70174031b1c8a3ddd0c079ab0704489968" - integrity sha512-B1ZO4c3pQWfB5D0TsVYzHMQ6R949yOvqxuS++WTxbGYEgDgwp2cyQt2Hurqn/fmnadxkCY/kwWaMPpasg+xSiQ== +"@parcel/babylon-walk@2.0.0-nightly.2070+61001140": + version "2.0.0-nightly.2070" + resolved "https://registry.yarnpkg.com/@parcel/babylon-walk/-/babylon-walk-2.0.0-nightly.2070.tgz#3064eb2f8da6a8c88cd85a795898258f1f3292b8" + integrity sha512-XPiOe/lWsWkvfeEbXPHgYldGOnpuR1FhMEXgH6RKa9ZBrGUWBDdC3KuY9AFwxDx5TVZGZxHmuV4LgOE7wpwqSw== dependencies: "@babel/types" "^7.0.0" lodash.clone "^4.5.0" -"@parcel/bundler-default@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.0.0-nightly.447.tgz#9e9e6457fafdb922c0b292e856cea20c8808e8fb" - integrity sha512-FEKLVtPIef47YxMJFzw0xB3EWwBEn9dVlA18semsIEOGIp3wrpNLceEVU+IKstbMx3r/VjdpOeoquXrfMJUYLA== +"@parcel/bundler-default@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.0.0-nightly.448.tgz#295cf5e8001f67d593695939f196f0117dda0cfb" + integrity sha512-CIrn1pem9aEdKFeCzTNrRcjqC3W2ASIWCt1Aps73QWUjwmL+TUwDYQ/CuLSNpTUhfG0no4lZqPnBLwAcfoKZRA== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.447+3df3153b" - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/diagnostic" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.448+61001140" nullthrows "^1.1.1" -"@parcel/cache@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/cache/-/cache-2.0.0-nightly.447.tgz#02b84b134095738b4c6dcd1b64d2cc4d0bb5bdf1" - integrity sha512-GOr2zrrp39IKv+px7SEWRge+akUvXl7QlL3cXrqe01XngGc4ZEtnDZ6sI1B38zv+mIlIW/cPghfv8KTMZsGOPg== +"@parcel/cache@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/cache/-/cache-2.0.0-nightly.448.tgz#9fe492e17113df4494605fb475e9ec374e73fdfe" + integrity sha512-Q6Fbxpxc55dK/qz/Uv/uKTGcHoYLLQrHqRjK2K3xx22CYUzmyoXhXFlkpyEjiEVMW83USS5aAScEEX469qV7nQ== dependencies: - "@parcel/logger" "2.0.0-nightly.447+3df3153b" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/logger" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.448+61001140" -"@parcel/codeframe@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/codeframe/-/codeframe-2.0.0-nightly.447.tgz#c5605048882a26d32b6715fd5523dcd9b420934c" - integrity sha512-XWJe+soRxSs/iwEBGlXYtOXE1X5ZkCR6St9XDgVMJZKTf/zT3PTU2i28ni8+TQForI3bugK1/UqnF5sOvsuXmw== +"@parcel/codeframe@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/codeframe/-/codeframe-2.0.0-nightly.448.tgz#a4c2892a1c75ef49d3a4891e6e82a328a86b78e2" + integrity sha512-/m8vL2PYfc7v9QT9+lBYywQkM/oKHm6FnJxwDCIyxpwU+HSn9oeL8YQyEMG25hWzAZ/c9UK3chPk206JtHJ3iw== dependencies: chalk "^2.4.2" emphasize "^2.1.0" slice-ansi "^4.0.0" string-width "^4.2.0" -"@parcel/config-default@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/config-default/-/config-default-2.0.0-nightly.447.tgz#82224b0981ebbfbd9f69886eaea0e491ea8a17b8" - integrity sha512-kpOQh5N9mdo2Se8ihOVvup3VoEFZAVtXsmEO69hylsdjugmM/v9cqnIZVY2ouVaVCI6ARpfie7l/zaPIHkJNyQ== - dependencies: - "@parcel/bundler-default" "2.0.0-nightly.447+3df3153b" - "@parcel/namer-default" "2.0.0-nightly.447+3df3153b" - "@parcel/optimizer-cssnano" "2.0.0-nightly.447+3df3153b" - "@parcel/optimizer-data-url" "2.0.0-nightly.447+3df3153b" - "@parcel/optimizer-htmlnano" "2.0.0-nightly.447+3df3153b" - "@parcel/optimizer-terser" "2.0.0-nightly.447+3df3153b" - "@parcel/packager-css" "2.0.0-nightly.447+3df3153b" - "@parcel/packager-html" "2.0.0-nightly.447+3df3153b" - "@parcel/packager-js" "2.0.0-nightly.447+3df3153b" - "@parcel/packager-raw" "2.0.0-nightly.447+3df3153b" - "@parcel/packager-raw-url" "2.0.0-nightly.2069+3df3153b" - "@parcel/packager-ts" "2.0.0-nightly.447+3df3153b" - "@parcel/reporter-bundle-analyzer" "2.0.0-nightly.2069+3df3153b" - "@parcel/reporter-bundle-buddy" "2.0.0-nightly.2069+3df3153b" - "@parcel/reporter-cli" "2.0.0-nightly.447+3df3153b" - "@parcel/reporter-dev-server" "2.0.0-nightly.447+3df3153b" - "@parcel/resolver-default" "2.0.0-nightly.447+3df3153b" - "@parcel/runtime-browser-hmr" "2.0.0-nightly.447+3df3153b" - "@parcel/runtime-js" "2.0.0-nightly.447+3df3153b" - "@parcel/runtime-react-refresh" "2.0.0-nightly.447+3df3153b" - "@parcel/transformer-babel" "2.0.0-nightly.447+3df3153b" - "@parcel/transformer-coffeescript" "2.0.0-nightly.447+3df3153b" - "@parcel/transformer-css" "2.0.0-nightly.447+3df3153b" - "@parcel/transformer-glsl" "2.0.0-nightly.2069+3df3153b" - "@parcel/transformer-graphql" "2.0.0-nightly.447+3df3153b" - "@parcel/transformer-html" "2.0.0-nightly.447+3df3153b" - "@parcel/transformer-image" "2.0.0-nightly.2069+3df3153b" - "@parcel/transformer-inline-string" "2.0.0-nightly.447+3df3153b" - "@parcel/transformer-js" "2.0.0-nightly.447+3df3153b" - "@parcel/transformer-json" "2.0.0-nightly.447+3df3153b" - "@parcel/transformer-jsonld" "2.0.0-nightly.2069+3df3153b" - "@parcel/transformer-less" "2.0.0-nightly.447+3df3153b" - "@parcel/transformer-mdx" "2.0.0-nightly.2069+3df3153b" - "@parcel/transformer-postcss" "2.0.0-nightly.447+3df3153b" - "@parcel/transformer-posthtml" "2.0.0-nightly.447+3df3153b" - "@parcel/transformer-pug" "2.0.0-nightly.447+3df3153b" - "@parcel/transformer-raw" "2.0.0-nightly.447+3df3153b" - "@parcel/transformer-react-refresh-babel" "2.0.0-nightly.447+3df3153b" - "@parcel/transformer-react-refresh-wrap" "2.0.0-nightly.447+3df3153b" - "@parcel/transformer-sass" "2.0.0-nightly.447+3df3153b" - "@parcel/transformer-stylus" "2.0.0-nightly.447+3df3153b" - "@parcel/transformer-sugarss" "2.0.0-nightly.447+3df3153b" - "@parcel/transformer-toml" "2.0.0-nightly.447+3df3153b" - "@parcel/transformer-typescript-types" "2.0.0-nightly.447+3df3153b" - "@parcel/transformer-vue" "2.0.0-nightly.2069+3df3153b" - "@parcel/transformer-yaml" "2.0.0-nightly.447+3df3153b" - -"@parcel/core@2.0.0-nightly.445+3df3153b": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/core/-/core-2.0.0-nightly.445.tgz#a1d337cdf33e7be7371e8001813afad9db7ef5dc" - integrity sha512-KLhER08w9dL2lgKu+NjkPs1OpFMiBZGdnvdy0A8T7rOTBqtApyTBm+x1NnlTQMywpTCODctPYLGf8vYAXo7ZKA== - dependencies: - "@parcel/cache" "2.0.0-nightly.447+3df3153b" - "@parcel/diagnostic" "2.0.0-nightly.447+3df3153b" - "@parcel/events" "2.0.0-nightly.447+3df3153b" - "@parcel/fs" "2.0.0-nightly.447+3df3153b" - "@parcel/logger" "2.0.0-nightly.447+3df3153b" - "@parcel/package-manager" "2.0.0-nightly.447+3df3153b" - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" +"@parcel/config-default@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/config-default/-/config-default-2.0.0-nightly.448.tgz#e625d9ca0e07deeb3b1d8b2a45786ea81630e962" + integrity sha512-4PG03VHrqxJaczDQBoBbT1LP74RIgoBf/ZVI/5NxywiDFcUmTRptK79gQTpTGEqOKr16SKGtNcOfBHBrnEc2iw== + dependencies: + "@parcel/bundler-default" "2.0.0-nightly.448+61001140" + "@parcel/namer-default" "2.0.0-nightly.448+61001140" + "@parcel/optimizer-cssnano" "2.0.0-nightly.448+61001140" + "@parcel/optimizer-data-url" "2.0.0-nightly.448+61001140" + "@parcel/optimizer-htmlnano" "2.0.0-nightly.448+61001140" + "@parcel/optimizer-terser" "2.0.0-nightly.448+61001140" + "@parcel/packager-css" "2.0.0-nightly.448+61001140" + "@parcel/packager-html" "2.0.0-nightly.448+61001140" + "@parcel/packager-js" "2.0.0-nightly.448+61001140" + "@parcel/packager-raw" "2.0.0-nightly.448+61001140" + "@parcel/packager-raw-url" "2.0.0-nightly.2070+61001140" + "@parcel/packager-ts" "2.0.0-nightly.448+61001140" + "@parcel/reporter-bundle-analyzer" "2.0.0-nightly.2070+61001140" + "@parcel/reporter-bundle-buddy" "2.0.0-nightly.2070+61001140" + "@parcel/reporter-cli" "2.0.0-nightly.448+61001140" + "@parcel/reporter-dev-server" "2.0.0-nightly.448+61001140" + "@parcel/resolver-default" "2.0.0-nightly.448+61001140" + "@parcel/runtime-browser-hmr" "2.0.0-nightly.448+61001140" + "@parcel/runtime-js" "2.0.0-nightly.448+61001140" + "@parcel/runtime-react-refresh" "2.0.0-nightly.448+61001140" + "@parcel/transformer-babel" "2.0.0-nightly.448+61001140" + "@parcel/transformer-coffeescript" "2.0.0-nightly.448+61001140" + "@parcel/transformer-css" "2.0.0-nightly.448+61001140" + "@parcel/transformer-glsl" "2.0.0-nightly.2070+61001140" + "@parcel/transformer-graphql" "2.0.0-nightly.448+61001140" + "@parcel/transformer-html" "2.0.0-nightly.448+61001140" + "@parcel/transformer-image" "2.0.0-nightly.2070+61001140" + "@parcel/transformer-inline-string" "2.0.0-nightly.448+61001140" + "@parcel/transformer-js" "2.0.0-nightly.448+61001140" + "@parcel/transformer-json" "2.0.0-nightly.448+61001140" + "@parcel/transformer-jsonld" "2.0.0-nightly.2070+61001140" + "@parcel/transformer-less" "2.0.0-nightly.448+61001140" + "@parcel/transformer-mdx" "2.0.0-nightly.2070+61001140" + "@parcel/transformer-postcss" "2.0.0-nightly.448+61001140" + "@parcel/transformer-posthtml" "2.0.0-nightly.448+61001140" + "@parcel/transformer-pug" "2.0.0-nightly.448+61001140" + "@parcel/transformer-raw" "2.0.0-nightly.448+61001140" + "@parcel/transformer-react-refresh-babel" "2.0.0-nightly.448+61001140" + "@parcel/transformer-react-refresh-wrap" "2.0.0-nightly.448+61001140" + "@parcel/transformer-sass" "2.0.0-nightly.448+61001140" + "@parcel/transformer-stylus" "2.0.0-nightly.448+61001140" + "@parcel/transformer-sugarss" "2.0.0-nightly.448+61001140" + "@parcel/transformer-toml" "2.0.0-nightly.448+61001140" + "@parcel/transformer-typescript-types" "2.0.0-nightly.448+61001140" + "@parcel/transformer-vue" "2.0.0-nightly.2070+61001140" + "@parcel/transformer-yaml" "2.0.0-nightly.448+61001140" + +"@parcel/core@2.0.0-nightly.446+61001140": + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/@parcel/core/-/core-2.0.0-nightly.446.tgz#7e3da2766dcfcf75fc196d348ad727a2e827a737" + integrity sha512-+dNgVJzZyknoSaHOm826ShIZIWtW8TK0+C0Jiv75feqg91l3K6aqBhlTzuIbWkbF8xLVssPO2xK6WTJJY3J1NQ== + dependencies: + "@parcel/cache" "2.0.0-nightly.448+61001140" + "@parcel/diagnostic" "2.0.0-nightly.448+61001140" + "@parcel/events" "2.0.0-nightly.448+61001140" + "@parcel/fs" "2.0.0-nightly.448+61001140" + "@parcel/logger" "2.0.0-nightly.448+61001140" + "@parcel/package-manager" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.448+61001140" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/types" "2.0.0-nightly.447+3df3153b" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" - "@parcel/workers" "2.0.0-nightly.447+3df3153b" + "@parcel/types" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/workers" "2.0.0-nightly.448+61001140" abortcontroller-polyfill "^1.1.9" base-x "^3.0.8" browserslist "^4.6.6" @@ -2294,72 +2294,72 @@ querystring "^0.2.0" semver "^5.4.1" -"@parcel/diagnostic@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/diagnostic/-/diagnostic-2.0.0-nightly.447.tgz#f8de06669979e438b5985ee06585e0400a9acf2a" - integrity sha512-VMoMK4xc83/bKITgzkB4vzz2YlYlKVDgHAIXUijISVnE1pvZHFJP9Uyw4aQ2l4nA1uILa8fQER0J14ayIGouoQ== +"@parcel/diagnostic@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/diagnostic/-/diagnostic-2.0.0-nightly.448.tgz#a72226caebd76e6825bd85c3fe387a7400724a8f" + integrity sha512-ZMUHUFF/r7BtJWJZY5yKLm+9vt9Hk+YgXwOMTkVSwPvP23+bRkfSviJ0VlP0uPkf156X+sCJ+B1VV5ciVmz8NQ== dependencies: json-source-map "^0.6.1" nullthrows "^1.1.1" -"@parcel/events@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/events/-/events-2.0.0-nightly.447.tgz#2608cd24c70993028f04a2d150e11e41c0554af1" - integrity sha512-5f6/d8i8Gavc6/RTC8XNZY0X4wpwnjx/edWUchk74j+RQd9ddslvVV41sHRkFER0ZlxQsMStDUZwKk+rmLwn7g== +"@parcel/events@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/events/-/events-2.0.0-nightly.448.tgz#2f7ab992fc408466b20dbfac6ba52092acd39b61" + integrity sha512-mtI51poyfkI+VDIsq21PRvHr0v98PTDxOJp/r1j5Pw9Tb4XGA+nVXhTakxYtHylOTxKVzDQD+0EDHBPVLWE5xQ== -"@parcel/fs-write-stream-atomic@2.0.0-nightly.2069+3df3153b": - version "2.0.0-nightly.2069" - resolved "https://registry.yarnpkg.com/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.0-nightly.2069.tgz#75c14d11ce7eec960202527dc5530c97b2f38463" - integrity sha512-T3k8rhynHVQL12BKbvb4HYi3FjpJh4bEMAAoPoPY/VYDZ3nox3hE1vZGFyRyJqgQBP5gFCggj8MUvd5DeLt4AQ== +"@parcel/fs-write-stream-atomic@2.0.0-nightly.2070+61001140": + version "2.0.0-nightly.2070" + resolved "https://registry.yarnpkg.com/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.0-nightly.2070.tgz#d81f8e474b053d87a3dda403a00ed00ce4819ff2" + integrity sha512-lFRZn69fOWdDwZi7elHDS6vuUN8sCsvsKJZnLvZwMaQqvdOrjX5J5drlwhqTknRUr9lW38aq3+j6FJ6ZRpyF4A== dependencies: graceful-fs "^4.1.2" iferr "^1.0.2" imurmurhash "^0.1.4" readable-stream "1 || 2" -"@parcel/fs@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-2.0.0-nightly.447.tgz#73cade111d8a6944f891417de7e982db3d12ac41" - integrity sha512-WregzLdnoQ3bl3/UzZp6SJp1CklMoSQM7fqzbGsbdnfON9e/MalfvjSmKtOUqCpqcK2RzvI1LFLw6alOxqOuHg== +"@parcel/fs@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-2.0.0-nightly.448.tgz#4f9fd79f9c484a3a36aa64e800a45b6f865ccc85" + integrity sha512-UFQhgB8+YL645RXoWSu0hbCMxs2j9XhYcVF5jpHPEYAwWcvM0buoc/DEdURFqDWHuZSzH9MDXIlLkbBSqmlygA== dependencies: - "@parcel/fs-write-stream-atomic" "2.0.0-nightly.2069+3df3153b" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/fs-write-stream-atomic" "2.0.0-nightly.2070+61001140" + "@parcel/utils" "2.0.0-nightly.448+61001140" "@parcel/watcher" "2.0.0-alpha.8" - "@parcel/workers" "2.0.0-nightly.447+3df3153b" + "@parcel/workers" "2.0.0-nightly.448+61001140" graceful-fs "^4.2.4" mkdirp "^0.5.1" ncp "^2.0.0" nullthrows "^1.1.1" rimraf "^3.0.2" -"@parcel/logger@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-2.0.0-nightly.447.tgz#5b39252973dc175ea5e879c0852640f39b227400" - integrity sha512-nknzbNd+aCPLy9F5gOKbeHneGXQ3wcye0feVZK4JeBS1S5d0dx4kCE1K9oclDMwCVOQSVSoXP6JtUBG6xxFw0g== +"@parcel/logger@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-2.0.0-nightly.448.tgz#7dc2892121f1d3dab1e81f9916ee6bf8465a29df" + integrity sha512-N0tCrbhvqPlCjDCCrlZMpqXXSbfKLUr7XRrgD8dkNZS8HnQiq9n/pnjPf9igs8cjqjtwMB8sY2b5JCTYvsKyBA== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.447+3df3153b" - "@parcel/events" "2.0.0-nightly.447+3df3153b" + "@parcel/diagnostic" "2.0.0-nightly.448+61001140" + "@parcel/events" "2.0.0-nightly.448+61001140" -"@parcel/markdown-ansi@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/markdown-ansi/-/markdown-ansi-2.0.0-nightly.447.tgz#cb063df65e44f34aa0b1ef1b7d12293ea60c798a" - integrity sha512-t070G7y5DZhuyEdWFWKwWivqxDdlyEmFTHh7FFvKcAWQUXQcoAUudsqcQhDTvnc3E+4jERPIi24wZy+Ymt5UpA== +"@parcel/markdown-ansi@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/markdown-ansi/-/markdown-ansi-2.0.0-nightly.448.tgz#d1b85e6d1a464f4688a34cb6f7836628dad1febc" + integrity sha512-7RqTHs8BFHc3/ykZtznPoEitXcKrWeeL4qwrQDhwLHq1eZHEIP4O9YnWnhYwf0EB8S1p8i5dMhxfBdAkMFsZ9w== dependencies: chalk "^2.4.2" -"@parcel/namer-default@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/namer-default/-/namer-default-2.0.0-nightly.447.tgz#e1dab70d0833ea5d83128beb3203d480fedd587a" - integrity sha512-yymDEo2Idr43t6z/az73rBnTbuynGm9pau7LihV/pPISXh+ShNqyeAn3v8M4fb11uJIOUNo7zQIfKHCuyahS7A== +"@parcel/namer-default@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/namer-default/-/namer-default-2.0.0-nightly.448.tgz#60271e4a23e9166ec0806bacbc14675716839c2b" + integrity sha512-qHLuDrFAmnY0ZWL29tVTo/5Z6RyC3athnc99QNlQm8XILgCLy3rvH05JcUqbw+YHhfhfz6k+OTrrJFRZPhGiiQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.447+3df3153b" - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/diagnostic" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.448+61001140" nullthrows "^1.1.1" -"@parcel/node-libs-browser@2.0.0-nightly.2069+3df3153b": - version "2.0.0-nightly.2069" - resolved "https://registry.yarnpkg.com/@parcel/node-libs-browser/-/node-libs-browser-2.0.0-nightly.2069.tgz#8e62d0240229edcf99f4363c6828ef0af7bf749d" - integrity sha512-3bOjrkoK7Q1aiftR0Z1MgdJqtrapxkTbCPx69XOUW+wV8f29Chi4KKhVrAIczEPLEmrboYhWfQ05flvkKgocuw== +"@parcel/node-libs-browser@2.0.0-nightly.2070+61001140": + version "2.0.0-nightly.2070" + resolved "https://registry.yarnpkg.com/@parcel/node-libs-browser/-/node-libs-browser-2.0.0-nightly.2070.tgz#188bf0e01b89e9d96f999e6a309ab4494d512c80" + integrity sha512-4vAZKdBTlg25h0bliLyFbqFP6WHZdg9YyfOkp+lBpIqUGHuM+NZ2ZTsH6UFg5A/EvGa/xca8/Ey3SHB7YXNDXg== dependencies: assert "^2.0.0" browserify-zlib "^0.2.0" @@ -2384,71 +2384,71 @@ util "^0.12.3" vm-browserify "^1.1.2" -"@parcel/node-resolver-core@2.0.0-nightly.2069+3df3153b": - version "2.0.0-nightly.2069" - resolved "https://registry.yarnpkg.com/@parcel/node-resolver-core/-/node-resolver-core-2.0.0-nightly.2069.tgz#127ddbe7e528c8a3083610dd583f65cbc130e5b0" - integrity sha512-u/nFM7ZLy8s8WSuyxf4O9gjOCDk1aZSeRzSpEpK4RyvRayiF/c1D//aipZlH7HBQ4YxdXJ3ztciFjHAiHwnDiQ== +"@parcel/node-resolver-core@2.0.0-nightly.2070+61001140": + version "2.0.0-nightly.2070" + resolved "https://registry.yarnpkg.com/@parcel/node-resolver-core/-/node-resolver-core-2.0.0-nightly.2070.tgz#c30381c8e67241ee3fe53a1840f4c6de1d6f36da" + integrity sha512-W+pORF950wI8PTZn0oT3atTiiH3slIn2li8QKJ7igzQjPLcGJLkuJ27amcT5D7jZP7bsjg2SCcU4gT94yMGKzg== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.447+3df3153b" - "@parcel/node-libs-browser" "2.0.0-nightly.2069+3df3153b" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/diagnostic" "2.0.0-nightly.448+61001140" + "@parcel/node-libs-browser" "2.0.0-nightly.2070+61001140" + "@parcel/utils" "2.0.0-nightly.448+61001140" micromatch "^3.0.4" nullthrows "^1.1.1" querystring "^0.2.0" -"@parcel/optimizer-cssnano@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.0.0-nightly.447.tgz#7d7c1f63d807d805a134556f61d678ca31d01bc3" - integrity sha512-l4Kdn0U/ozGmsGLZI5PlW/8H/t+gXhIT5ON9AFPiX0q0iGDKXrusdgpVglKRQwIICFslWXcvH3FcKqxabvu6pA== +"@parcel/optimizer-cssnano@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.0.0-nightly.448.tgz#3538c50740bb815e62bcbef8eef4087a6508ddfa" + integrity sha512-4R8euOaGFq+4Vcl8mGHIAskPePTQZGvO77W07h4wgwRIq7pmBHJGUfzuzmNeXAwZACMbq5vxCIU85dxRFPpenA== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" "@parcel/source-map" "2.0.0-alpha.4.16" cssnano "^4.1.10" postcss "^8.0.5" -"@parcel/optimizer-data-url@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-data-url/-/optimizer-data-url-2.0.0-nightly.447.tgz#9bf7e3b58c1eccb7c5fd69a3c2a45bd59d8b3012" - integrity sha512-XmL0VtiUHRHWkzVh2qq/PQWa3gIa/AHUBcbefpSKexbu3V2ivd6pAlEyy5c78VRtbKKQ/BfJkYvFlaNJsRfQUg== +"@parcel/optimizer-data-url@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-data-url/-/optimizer-data-url-2.0.0-nightly.448.tgz#317ffb418cc8f49bf57260bfa7472e9cb72b31a2" + integrity sha512-yf7OeMqYAeVf9X2J0wNiCKKklyfR4HgtNgm5GZoMsSmrvgvKjRGgFzqOkPp2GZWzKQn8F9UjuBbBleDzSM6nJw== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.448+61001140" isbinaryfile "^4.0.2" mime "^2.4.4" -"@parcel/optimizer-htmlnano@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.0.0-nightly.447.tgz#2e114e8db03d44d5c60f67cd02ff608ab669936a" - integrity sha512-lCvjK2/Ts5XqE1UXMYV4gblwLiOifdh5Nvi/wv7hllvyASIyln2SIW58cIrR6J56iH0gpIs1+heQ30XkvoWvWg== +"@parcel/optimizer-htmlnano@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.0.0-nightly.448.tgz#10766700e0d023e1f14b655940a3f1d881af5ae5" + integrity sha512-uY7IJrlo9DqUnf9LpG4B73BSEah6KRQxGaHo9jPkeM4/V+lQwjVoW1GZIbGc2MO1CKy/8jchbIInuymkN97T7w== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.448+61001140" htmlnano "^0.2.2" nullthrows "^1.1.1" posthtml "^0.11.3" -"@parcel/optimizer-terser@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-terser/-/optimizer-terser-2.0.0-nightly.447.tgz#1e2fa5b53cc9944b27d09303575ac72dd8ca0267" - integrity sha512-yRXsFokdTiePWi63TzQZ6Ia1tmejf6VotzlEx9HAtiMCfE0rwkZL4BPdY/ontaOr6uLMBgKfMJHfTOSYd7gV9g== +"@parcel/optimizer-terser@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-terser/-/optimizer-terser-2.0.0-nightly.448.tgz#f2adf245de3de239c484994750f9e80687c291b1" + integrity sha512-uZEog58leFd7P7ezlAznv7r+45tUM6P2G2b5XH6tP6oiKaYyjw77n25Dnd22/mWU8CvPnVyQdsotR4AScgniig== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.447+3df3153b" - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/diagnostic" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.448+61001140" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.448+61001140" nullthrows "^1.1.1" terser "^5.2.0" -"@parcel/package-manager@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/package-manager/-/package-manager-2.0.0-nightly.447.tgz#c8ffcc3e4b315223c1245b4c8284c8c5e22246ec" - integrity sha512-zcOz79FKIve/QNzeN18CyOlSHcMKz4teMJYJVDg7IhgdeLOdDD/jStQO5h9vocXONTLr0umcqf+n/exFVlzQ1Q== +"@parcel/package-manager@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/package-manager/-/package-manager-2.0.0-nightly.448.tgz#2cdda14e0a51222ad16c13eea49f68f73412b144" + integrity sha512-e39qTXU5OGsXB/607JZslwFJhyW+wLxvvKnreYDXp+MW/R/klkzQd4TuAXdF2aqDtcaLFvug4HRrK2rji5YC4w== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.447+3df3153b" - "@parcel/fs" "2.0.0-nightly.447+3df3153b" - "@parcel/logger" "2.0.0-nightly.447+3df3153b" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" - "@parcel/workers" "2.0.0-nightly.447+3df3153b" + "@parcel/diagnostic" "2.0.0-nightly.448+61001140" + "@parcel/fs" "2.0.0-nightly.448+61001140" + "@parcel/logger" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/workers" "2.0.0-nightly.448+61001140" command-exists "^1.2.6" cross-spawn "^6.0.4" nullthrows "^1.1.1" @@ -2456,91 +2456,91 @@ semver "^5.4.1" split2 "^3.1.1" -"@parcel/packager-css@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/packager-css/-/packager-css-2.0.0-nightly.447.tgz#574fbfd64161c12a26f262f848dd47d660f44f32" - integrity sha512-R0jYtiIUrDts7VDCStSg/5ew5YSijLQflPUCTXhcyxqQqglP9+oAvoLFoKV7WH3WsnN5sDw3le6V+eGBP+6QtQ== +"@parcel/packager-css@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/packager-css/-/packager-css-2.0.0-nightly.448.tgz#cbb079321c319fa07025c4569f946fde06177030" + integrity sha512-gEx4nU6k8sAqkxBTnCbbTr6VolI7flbPcG00GXJrukmthKjuZT1N4jBkQHZIXP3RvgxbcKXGzzEKkU/v3SvnRg== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.448+61001140" -"@parcel/packager-html@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/packager-html/-/packager-html-2.0.0-nightly.447.tgz#48af24a3d04e4c741e1f34ec4f1853d7166178e2" - integrity sha512-+I77EZztonC2u5/Tq6Sy6KBjvRRYyFg/V4Ts1LfkG4eWKQSdezB+TKr6ccG8mYrN4LcdtHwRdc8SROMaodHEAA== +"@parcel/packager-html@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/packager-html/-/packager-html-2.0.0-nightly.448.tgz#9f5bcd24c8c24e88b00893ac20a0977783828bed" + integrity sha512-NA3fHpKHYBpfV5KuZzi0SD6gndZbzgSEld+8s3kxSfiO5kJtdh8tWCtGhr5Wx0CWAEbZBHd6c6AJUHCS5HlXUw== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" - "@parcel/types" "2.0.0-nightly.447+3df3153b" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/types" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.448+61001140" nullthrows "^1.1.1" posthtml "^0.11.3" -"@parcel/packager-js@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/packager-js/-/packager-js-2.0.0-nightly.447.tgz#d90a439980fdf2e15faec2e54d980ac978d79a0a" - integrity sha512-UKpiqjaP6EbFfkm30kQYornokxumN7KVMHfVwkYmjOpy2yQ4WgdCQ/ll8p8Rucu58mge6s7rVmdhsLyk7S/H8A== +"@parcel/packager-js@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/packager-js/-/packager-js-2.0.0-nightly.448.tgz#aa49cd99b2f7fcbc5ba9a835aeb0c90bc3d428c6" + integrity sha512-LlplwBJaxJvyDuE5ijb5UNLRwLNHg3UKTrt12K0k6hPVkKTjNr3MKs0w2omHpjC7pKS7SZdDE9JFcxG4Jx0bBw== dependencies: "@babel/traverse" "^7.2.3" - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" - "@parcel/scope-hoisting" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/scope-hoisting" "2.0.0-nightly.448+61001140" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.448+61001140" nullthrows "^1.1.1" -"@parcel/packager-raw-url@2.0.0-nightly.2069+3df3153b": - version "2.0.0-nightly.2069" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw-url/-/packager-raw-url-2.0.0-nightly.2069.tgz#2644768f087350aa4130ae9c5c90a77b985aa1b1" - integrity sha512-2N68cU1Ij0EHZqszFjbz9L8zzbCQ3x11V3EsxHtS0cqlKjHggN5BDpz3ZUA3nEy6vBf5mo5JcqfYdlG8VTtKgA== +"@parcel/packager-raw-url@2.0.0-nightly.2070+61001140": + version "2.0.0-nightly.2070" + resolved "https://registry.yarnpkg.com/@parcel/packager-raw-url/-/packager-raw-url-2.0.0-nightly.2070.tgz#a64aa1e712b6f51ad51b8d9f3e3c9ea6661a4e6b" + integrity sha512-ani2TWgt9xRDwOTcuJGwQCwigzDrvLD8M3Xk0WW4Cy9Ncf9Yi9LtrOEV6nmT4zmJyuSymvMpbAI7or1G4DhrNg== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.448+61001140" -"@parcel/packager-raw@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw/-/packager-raw-2.0.0-nightly.447.tgz#78b78df56ce00320d00731b54fd0339c8eb91fe3" - integrity sha512-NHVusjJCCaLlTw40eUcGisrLHM5VOYtejJfcbI0PmmQpfk4tltuMIDn8a7JaVBLP7fMYjuEbCnrr0AiEKR6bkQ== +"@parcel/packager-raw@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/packager-raw/-/packager-raw-2.0.0-nightly.448.tgz#8ddc7e4cd10f58dc89f5980b12309baee5b589a2" + integrity sha512-/oo/55HTmpcXo2RtDz9XuZodAorS59gaGJIALfcRAN6BeCS0MbbuSlIuB9txcElTal5YiKH2orkyUN57KL74Ng== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" -"@parcel/packager-ts@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/packager-ts/-/packager-ts-2.0.0-nightly.447.tgz#e1bceb09202a169bc8029b77c650b8e9416308b8" - integrity sha512-hGRhGiQDy/UT1ce4zGPuE6lqBV7XPQm4/tv+Po2IlmItqlhqMy21XqtW1dMrdeKq1b0lEmAKdxi3cbrP67F39g== +"@parcel/packager-ts@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/packager-ts/-/packager-ts-2.0.0-nightly.448.tgz#322e5c0339ae3fec5a5199cbefbed01ea476724e" + integrity sha512-aUVo0j7+WBkIw84Npoeki7SL+5kHsdnq/kBHmpzVdSbbA+0/5uPcnyQQLxOikxSjFaHlwYWtMjRcnTPlVT26BQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" -"@parcel/plugin@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/plugin/-/plugin-2.0.0-nightly.447.tgz#4a6b38c910298c3b15cceb0dbd39e04e0076692f" - integrity sha512-GKVmQjHbHW02XwPzpJkI+XYgsnLbV5C5v/zyjZyjrfmQqSRgPs1L0OqCnCLG9SoK71lelwAXA7YchpIo+DJqWQ== +"@parcel/plugin@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/plugin/-/plugin-2.0.0-nightly.448.tgz#421df2a9a994d32c794926ba9678f57e73bbc26e" + integrity sha512-OAzSe3lJcemLF3tlxcbDh8r9DmkYWq19cFkmL6ycWUWoFsFTSPF2hx9LTARKWdbnVKGTtkvXVfDWW9ns75Wzbw== dependencies: - "@parcel/types" "2.0.0-nightly.447+3df3153b" + "@parcel/types" "2.0.0-nightly.448+61001140" -"@parcel/reporter-bundle-analyzer@2.0.0-nightly.2069+3df3153b": - version "2.0.0-nightly.2069" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.0.0-nightly.2069.tgz#9b6e6bd1db96bd727676c6fcddc9fc086261f44e" - integrity sha512-umwO5l1RiKm6rvLsAz48tulVdd2PrtOHvMUiasq1jJwwkKWO23Qql5Ag/HBSokMjDYRTJDYN8i8bLReWbNrK5g== +"@parcel/reporter-bundle-analyzer@2.0.0-nightly.2070+61001140": + version "2.0.0-nightly.2070" + resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.0.0-nightly.2070.tgz#6c641bd74da01ea35f4dee4d422ad913dc159504" + integrity sha512-aL0FsrTPN4p16cui1zCk0OWZXhLMms3ZRHh+w+kWKPIVkjjqG1pwRWYjo0cBO0dJb94T79kRA3NeuteV2QGVaw== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.448+61001140" nullthrows "^1.1.1" -"@parcel/reporter-bundle-buddy@2.0.0-nightly.2069+3df3153b": - version "2.0.0-nightly.2069" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-buddy/-/reporter-bundle-buddy-2.0.0-nightly.2069.tgz#c658df5262d82866c455ae83a96fe24eade7fdf7" - integrity sha512-11n9gECbvOaEQ3LrXTzB6VpeHbnzxi+TMI/TlamUO7U1PNM9TSPVCN2OEwv1NgtQ4/wvQ2NPyDzgkxutLVbc7g== +"@parcel/reporter-bundle-buddy@2.0.0-nightly.2070+61001140": + version "2.0.0-nightly.2070" + resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-buddy/-/reporter-bundle-buddy-2.0.0-nightly.2070.tgz#355e45650a7d3602bf2bc66648277841427eb5e0" + integrity sha512-N/ctv0QmDZtm1PDxCJZebS+RgKSgQlM5kp5dAmIw29gxPvJarxI4y0K3IQaSf7PqJ9TXxB2AthToJOMO5lMD4A== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" -"@parcel/reporter-cli@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/reporter-cli/-/reporter-cli-2.0.0-nightly.447.tgz#14a77213f3e3d88402786ca612d7babc27a9b19e" - integrity sha512-3DhVXIo5JJ1jQsnkl2NQmA8ngVRxCRErJzhoBV7zM2fnjtPUkfbx3/HJBTDDqmkqCPDosbrSeF3srUMCt6n15g== +"@parcel/reporter-cli@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/reporter-cli/-/reporter-cli-2.0.0-nightly.448.tgz#50e1c76be7294d6d4cfacedd7cc940dde17f9343" + integrity sha512-SiinYZeuy+QBvWrw9NVQWi0vddxnB3VNFQ9Uk24V4bXeRMol6QfzeDWR6myErpdxdyWY08wdzwv+m+grWXL1wQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" - "@parcel/types" "2.0.0-nightly.447+3df3153b" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/types" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.448+61001140" chalk "^3.0.0" filesize "^3.6.0" nullthrows "^1.1.1" @@ -2549,13 +2549,13 @@ strip-ansi "^6.0.0" term-size "^2.1.1" -"@parcel/reporter-dev-server@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/reporter-dev-server/-/reporter-dev-server-2.0.0-nightly.447.tgz#0f2eeae52ea0357fa6e1344da7fd15ff2d5c0055" - integrity sha512-HN43ip84zy0rH6uPXlnyhKa4qfbr66U0+OSUrusk8nKFpJG/vVj05nhvSEbYud/7xKx9L53moO/bNVLym83TjA== +"@parcel/reporter-dev-server@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/reporter-dev-server/-/reporter-dev-server-2.0.0-nightly.448.tgz#bf36522a9118c68b07ce9cd0b9c5de984b2ea4fa" + integrity sha512-M3X+/d9FxGisqx6dxUt58AD0vr/a9PoJRfhsoN8RZq+sIDFzQjbXrqTPBO7OjcDSbxBTP5fKOWMDmx6qwHxyxw== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.448+61001140" connect "^3.7.0" ejs "^2.6.1" http-proxy-middleware "^1.0.0" @@ -2563,54 +2563,54 @@ serve-handler "^6.0.0" ws "^6.2.0" -"@parcel/resolver-default@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/resolver-default/-/resolver-default-2.0.0-nightly.447.tgz#7ccca87db789e731e46687862732455bbfc3ec28" - integrity sha512-bfbvVOywPcBs0qwK5thUlcSADoPCul+DIQVPYqacvq8XFY8mZMVqP6erckaxK+Fe0dcYJmJB5wRi+LFK6OI2kQ== +"@parcel/resolver-default@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/resolver-default/-/resolver-default-2.0.0-nightly.448.tgz#a40451311860b83ec130c8ed49cc3a27e1f857fe" + integrity sha512-+R1i+DoAR1Magj5biYSV3eFN+Imu51qHao84eLp2A8eUfungngoQ9FE30bZHIvyHj7+QJGMdALomImQd09ic1w== dependencies: - "@parcel/node-resolver-core" "2.0.0-nightly.2069+3df3153b" - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/node-resolver-core" "2.0.0-nightly.2070+61001140" + "@parcel/plugin" "2.0.0-nightly.448+61001140" -"@parcel/runtime-browser-hmr@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.0.0-nightly.447.tgz#1e5d449cbcfd5a5470ff7317189fdda3536c0e59" - integrity sha512-F3R7dtBqSVTlbM6dZc2mo0171hx9HR8frPPOoC0cNh/NPRZcL7AkVE6oPp9gD74J16uHktYuOZqeDjGL7otnJA== +"@parcel/runtime-browser-hmr@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.0.0-nightly.448.tgz#b5a87e9d7178e2c1a53a22237010af586a1611c7" + integrity sha512-L7VIoTyGyLt6jIMU/W5F1KfvgysS3coQOYvUYt1JKSqhdGH3yh7gB7DNmHpib9fRez7hFvRWqIjnMUUc0zS+zA== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.448+61001140" -"@parcel/runtime-js@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/runtime-js/-/runtime-js-2.0.0-nightly.447.tgz#694b2f8f069484ab348a44bc74f74c5853698935" - integrity sha512-yqCBktSjxdmq1Z2t85CwdN33oPYTMQ9SUtXWJHCtLwbSLiKRnKl7JpLqFhcRPQ0EAf5H9/MYPGyA6M863M5zRg== +"@parcel/runtime-js@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/runtime-js/-/runtime-js-2.0.0-nightly.448.tgz#8de0900812e02b03cf0efe4f0be4ce9001009771" + integrity sha512-oArigY5HHAQaqYXK+TXcIQfsyo5IqoHWC1ZE74dcZv1wAl6wedEcU6ynldLJmX2aE/aA+87UYQR8jpoGQtJd1Q== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.448+61001140" nullthrows "^1.1.1" -"@parcel/runtime-react-refresh@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.0.0-nightly.447.tgz#8d3da34983d7b4d35297fc22a0dd362e51cc0d0a" - integrity sha512-7oF0NqOc4UBgaLm4FY58xyZS3zSNnCAhMNQPDvvglFGY83VLK2vWUKXxgVZzYO+TDPLuGr42E6m5f0eb241iqg== +"@parcel/runtime-react-refresh@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.0.0-nightly.448.tgz#f2bb37ed81c60613ea1baacfe085cdaec333b88c" + integrity sha512-+OYBXFxlVpcG2ONCdy6y3QDj9s7T0PbKpxQz6MFT0T28vwhsjMlRD4mts0R5oemKtNSN/gse3HCb4gkMuDXayg== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" react-refresh "^0.9.0" -"@parcel/scope-hoisting@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/scope-hoisting/-/scope-hoisting-2.0.0-nightly.447.tgz#03142a49b96dd7134b2a196684d14630ff7144f7" - integrity sha512-sEXeDYbz6CQg5RmhAF4qkGVzrWiMuEtrEJ91b2LQYxNdJR4F7hApz+gh5qCFLfTIB2KfRZd1cUCyGh0GDE3EEQ== +"@parcel/scope-hoisting@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/scope-hoisting/-/scope-hoisting-2.0.0-nightly.448.tgz#5b30f89b667447b6bd48dfed7e16f0ec572a349c" + integrity sha512-Zh842WzUMgM7X2IdHBFhdkY3g9WyQ8govjuvtw6jc+7Q69np7MZ8rEB2s4BuNYVpj850QM3laxUZGi64JfuBhw== dependencies: "@babel/generator" "^7.3.3" "@babel/parser" "^7.0.0" "@babel/template" "^7.4.0" "@babel/traverse" "^7.2.3" "@babel/types" "^7.3.3" - "@parcel/babel-ast-utils" "2.0.0-nightly.2069+3df3153b" - "@parcel/babylon-walk" "2.0.0-nightly.2069+3df3153b" - "@parcel/diagnostic" "2.0.0-nightly.447+3df3153b" + "@parcel/babel-ast-utils" "2.0.0-nightly.2070+61001140" + "@parcel/babylon-walk" "2.0.0-nightly.2070+61001140" + "@parcel/diagnostic" "2.0.0-nightly.448+61001140" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.448+61001140" nullthrows "^1.1.1" "@parcel/source-map@2.0.0-alpha.4.16": @@ -2621,10 +2621,10 @@ node-addon-api "^3.0.0" node-gyp-build "^4.2.2" -"@parcel/transformer-babel@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/transformer-babel/-/transformer-babel-2.0.0-nightly.447.tgz#a936a737d4bdec282dc23cbb9142b0bc80d5fe0e" - integrity sha512-9wMqAV7kO4YcYb1in6YhM3PbmMz5GgNHcMI63aOtDhXCxqi4uYSo6gS1wHkPK3iv+naGqrPGxvNbopXmzcSkSw== +"@parcel/transformer-babel@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/transformer-babel/-/transformer-babel-2.0.0-nightly.448.tgz#cc8b5fcceed090c230be6304fd68084fc5e62325" + integrity sha512-9dPujGq9e90cYA3TM+aupWzw3Yz90PwqrY93KqRKWEkFYiwQed28hMGjS78uJerjnAmfKDBB1HFO/hFSnZf5/A== dependencies: "@babel/core" "^7.0.0" "@babel/generator" "^7.0.0" @@ -2634,85 +2634,85 @@ "@babel/preset-env" "^7.0.0" "@babel/preset-react" "^7.0.0" "@babel/traverse" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2069+3df3153b" - "@parcel/babel-preset-env" "2.0.0-nightly.447+3df3153b" - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/babel-ast-utils" "2.0.0-nightly.2070+61001140" + "@parcel/babel-preset-env" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.448+61001140" browserslist "^4.6.6" core-js "^3.2.1" nullthrows "^1.1.1" semver "^5.7.0" -"@parcel/transformer-coffeescript@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/transformer-coffeescript/-/transformer-coffeescript-2.0.0-nightly.447.tgz#cae039862eb29c5f2e2a234e19dc2634e3ec489e" - integrity sha512-JrWad88HP1VsW6FTxOboS9wOr8b9AR+TwJEG5ps+Vu5iTmklyWuwnDDcJIos7Rk+ew58F1lWhqDN+/qxCdsv9Q== +"@parcel/transformer-coffeescript@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/transformer-coffeescript/-/transformer-coffeescript-2.0.0-nightly.448.tgz#7273a9a58c2dd933eb8db967373539ee74efb7f2" + integrity sha512-4scl68ppphsAxsh9ad0jgTuIHHSB2ferxRsl8DQBIVF+rTL5q/VoLqwI4jTPmI7RZ77N6ec7M7hwro00MSFipQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.448+61001140" coffeescript "^2.0.3" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-css@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/transformer-css/-/transformer-css-2.0.0-nightly.447.tgz#9c54780291b93ee7760553390a3f3fec8ab09dd0" - integrity sha512-/ImYwUPOKDZ3Bw/qXVDAkV7yKL82Qhrb6zOcjzyKm1Le27KJ82mGe6eGhCPHokKA/pFiIrj5xGiwCxNH3W67vA== +"@parcel/transformer-css@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/transformer-css/-/transformer-css-2.0.0-nightly.448.tgz#0af630f67795d02f7a2508e7f05602c80115f8e9" + integrity sha512-vGE4B68Dl8Z8v2Cm3/2z5jjgX1hQHzLbghUNxwrI9YkzqKFsXBrxyeMeaRJMztD1jj4y4v/Dbj5pvY8TWZOpzw== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.448+61001140" postcss "^8.0.5" postcss-value-parser "^4.1.0" semver "^5.4.1" -"@parcel/transformer-glsl@2.0.0-nightly.2069+3df3153b": - version "2.0.0-nightly.2069" - resolved "https://registry.yarnpkg.com/@parcel/transformer-glsl/-/transformer-glsl-2.0.0-nightly.2069.tgz#62deacd5029604b826686c072cfeb8d21a12403c" - integrity sha512-qJabAfGUpl2V/tqnJFqOXemKFyyz3RGajVYSHvFVabNC4sO/pUiz4nFNQmqhO64UGJSbS5TxEWB115h5beGwaA== +"@parcel/transformer-glsl@2.0.0-nightly.2070+61001140": + version "2.0.0-nightly.2070" + resolved "https://registry.yarnpkg.com/@parcel/transformer-glsl/-/transformer-glsl-2.0.0-nightly.2070.tgz#aa0231c37e5fc86738fda62940d336dc749c92d5" + integrity sha512-vB4d7Yu8rL3rM23JfJJ42KWnPZlA/LcxkvSAF+NOwUzhnmd9B6toLPcPM124lg3VmuRb93gSyvACA5WrPIYpVg== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.448+61001140" -"@parcel/transformer-graphql@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/transformer-graphql/-/transformer-graphql-2.0.0-nightly.447.tgz#3859d22ee1af541e2a9178c5de362eff64f5b240" - integrity sha512-jG8f5pz7rytvhwDaAvxoh7JaleKeLnWwOSTfFCMwAWZJD6O4IeP7/D4Jrg1jbPkpl4H/v6zyHnERxJbQL3bjIg== +"@parcel/transformer-graphql@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/transformer-graphql/-/transformer-graphql-2.0.0-nightly.448.tgz#0060cc1404d5fc82a842cb61396aef79bf7c0021" + integrity sha512-OuCfnz51EMF3jboL/tdg3oUDin2OxIii6Yy8GzVuf7ETUs1Ztx7esVx4eZYTZIDm3y8AuMYasHl57ZIvcUAYKg== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" -"@parcel/transformer-html@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/transformer-html/-/transformer-html-2.0.0-nightly.447.tgz#4f169a9b2808ae76509e56a5afe039f32db04370" - integrity sha512-aKPyz5bkfTNw//wiltwKbpmtUT7bt7yVvdobAH70axj2z6xtjfHxYQdCu0DVRfDPt/OrRe9zBHzNY5moMaZcrw== +"@parcel/transformer-html@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/transformer-html/-/transformer-html-2.0.0-nightly.448.tgz#9de1e385b02cbe90258e11d711818a2159daa534" + integrity sha512-1am34PMszyH6A4pq5k/AbDUUP2jR5Z0OlvGUaW4m2lrUSvN+NKyUaU/S+2VpKPrHdfpQJ3h3UmhedxjK+LmZhA== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.448+61001140" nullthrows "^1.1.1" posthtml "^0.11.3" posthtml-parser "^0.4.1" posthtml-render "^1.1.5" semver "^5.4.1" -"@parcel/transformer-image@2.0.0-nightly.2069+3df3153b": - version "2.0.0-nightly.2069" - resolved "https://registry.yarnpkg.com/@parcel/transformer-image/-/transformer-image-2.0.0-nightly.2069.tgz#350557404818b48e692fabc83be3716ff0937368" - integrity sha512-bkZ7+I+EjIdzlsc1AzfYB/BLP7hxX14Go3JQHPCSoEshWCh1dPGrejFdicaBUNdlDCZpM0EXt0kvJ0AA4Ho22Q== +"@parcel/transformer-image@2.0.0-nightly.2070+61001140": + version "2.0.0-nightly.2070" + resolved "https://registry.yarnpkg.com/@parcel/transformer-image/-/transformer-image-2.0.0-nightly.2070.tgz#1d48841ee1863cce6ae0f2338eaf9b38988102bc" + integrity sha512-2LXpxC+tJr17sY0Y67g7G4ixhR8iXQki8tmqcCW8+/f6BTlyU9yaIJ6n8AmkpvXadI9PQ8zsrlDCMbAIzbAb7Q== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" -"@parcel/transformer-inline-string@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.0.0-nightly.447.tgz#350955c01bff31971d8649abc576bfabc2e03460" - integrity sha512-qSRij/gO1DBH+JKEq2nhbADCUR/gxmVnivWVKKujB/Nc3P9BF2+oCM9NFYbgGdkuSOkAxiL0EUUMcONUXCStcw== +"@parcel/transformer-inline-string@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.0.0-nightly.448.tgz#aa92bad18fbb02b1ac505edf4d2cb6358b0bd596" + integrity sha512-o9vcSp3xuvnp7r5mzTfcitT2zCVIA6yVzedfidcRuQSbzhmjC/zzz+mIMnhjWkYkFL955jLG5hp/4yE8r6oIHQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" -"@parcel/transformer-js@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.0.0-nightly.447.tgz#c7f8ed7cdd0d8a10c073cc48324c9fd3b78a7ad7" - integrity sha512-+1Feek8staUtc956JJwPoP9UKJdyLplFxozL/Qz/tJCfd30gyUwe6G1Ds5TvVZIxMbA+04kejSwVPbHBUatUNQ== +"@parcel/transformer-js@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.0.0-nightly.448.tgz#503bf70113eee3f08291f8d6843cae1bb13333fa" + integrity sha512-hm5lOGha+Ves/e1+lyK5JxREsqZToRO5W676/Qq60dINQilyiujt3mRwUr+xB2IJKcwT63W1JzmwkN0iOu6SeQ== dependencies: "@babel/core" "^7.0.0" "@babel/generator" "^7.0.0" @@ -2721,193 +2721,193 @@ "@babel/template" "^7.4.0" "@babel/traverse" "^7.0.0" "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2069+3df3153b" - "@parcel/babylon-walk" "2.0.0-nightly.2069+3df3153b" - "@parcel/diagnostic" "2.0.0-nightly.447+3df3153b" - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" - "@parcel/scope-hoisting" "2.0.0-nightly.447+3df3153b" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/babel-ast-utils" "2.0.0-nightly.2070+61001140" + "@parcel/babylon-walk" "2.0.0-nightly.2070+61001140" + "@parcel/diagnostic" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/scope-hoisting" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.448+61001140" micromatch "^4.0.2" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-json@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/transformer-json/-/transformer-json-2.0.0-nightly.447.tgz#8c63b72374cbe47c0517cd0be490d667b5c7ddd0" - integrity sha512-79aIUcQzlnw+/7EJj9dmZNgyLH8RRGCsqul7sreiZam1hfXLTtK8v9EyrgIDC9BvZbJPBe3fUyDRGzXXK54b1A== +"@parcel/transformer-json@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/transformer-json/-/transformer-json-2.0.0-nightly.448.tgz#356250f2a7455ab861f0a7f4bd6b820ce0f8464e" + integrity sha512-wGJfMpBNCV3Oz3emEPzk+mGl1i3YR/6V0ptDHrhHlgv3hIafMUew+MCpFsgoBkYPrs98bhhP/3QakfHcnCtmzQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" json5 "^2.1.0" -"@parcel/transformer-jsonld@2.0.0-nightly.2069+3df3153b": - version "2.0.0-nightly.2069" - resolved "https://registry.yarnpkg.com/@parcel/transformer-jsonld/-/transformer-jsonld-2.0.0-nightly.2069.tgz#b1b69e540b214fd2cf46d62304321c8f598de1d9" - integrity sha512-n3zAblC4I/XM67NvIgZdx5N3tsS5WYBay5BO0cwij36+dt/nF5aBGiYfomPXgV0fnoSFMbku5W3ZAGnMHoGURg== +"@parcel/transformer-jsonld@2.0.0-nightly.2070+61001140": + version "2.0.0-nightly.2070" + resolved "https://registry.yarnpkg.com/@parcel/transformer-jsonld/-/transformer-jsonld-2.0.0-nightly.2070.tgz#ff1c24a0c6dd530f08c83c110b2a50c04771d8ca" + integrity sha512-2cMHUf6mpug/ao5hgn/J9GzfW6IDB4/XLcPJNjvXz2QI7kVJ4Sz6jXf/1kAyw8OLTIyELjFjoxjxRt/r6Ktymw== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" - "@parcel/types" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/types" "2.0.0-nightly.448+61001140" json5 "^2.1.2" -"@parcel/transformer-less@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/transformer-less/-/transformer-less-2.0.0-nightly.447.tgz#bc6ace825b022045222483ca072dca28243c3217" - integrity sha512-hcRxSjnqaNgi6O6bNltX0PTvMlO0D/yAhiI/T9YKbrlxvHhBTn8CL3YgCQjstfYNrO6G/g6cRZpRLFZo2SbCxw== +"@parcel/transformer-less@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/transformer-less/-/transformer-less-2.0.0-nightly.448.tgz#b39837ed2301d97c9c8e0544663c9de16ecc4d57" + integrity sha512-OiTugud9sWxZsme4qeaS7g4AZfIhvapCf4Momj6Q9/ECoShZqYVlai6FlR3y+MspYS8ziyQpEeLVA2C90Wt71w== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" "@parcel/source-map" "2.0.0-alpha.4.16" -"@parcel/transformer-mdx@2.0.0-nightly.2069+3df3153b": - version "2.0.0-nightly.2069" - resolved "https://registry.yarnpkg.com/@parcel/transformer-mdx/-/transformer-mdx-2.0.0-nightly.2069.tgz#0aa3abc1c1aacf6027ee3a0314432b61ea0d4cc3" - integrity sha512-j/aDSFblTPkgF4i3x3k14EeK2/hMMEkXsdUpMpy9/z9Tmfw8snED9bJVZtDrxo1xd9T2+odixrmryjqzGPy+Tg== +"@parcel/transformer-mdx@2.0.0-nightly.2070+61001140": + version "2.0.0-nightly.2070" + resolved "https://registry.yarnpkg.com/@parcel/transformer-mdx/-/transformer-mdx-2.0.0-nightly.2070.tgz#e5a62c3423e744df12261ed606a65a57ea76ff4f" + integrity sha512-23efIf7gQimSu/S8JEQWxhFZozWSdbbYVtTM7L54qJaLhN3yFW0VG1/vKnY7wMJKtaP3K44mmtc/BQjd4HNpLg== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" -"@parcel/transformer-postcss@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/transformer-postcss/-/transformer-postcss-2.0.0-nightly.447.tgz#d92ed2ebb9517f510326911561297192e56333c7" - integrity sha512-VikvWEjYa8Y4pEIypd8FnI+SxIMjgcV0dFE5yjVI1OUfGtdlQCWrbXVLJhom572Wsz5yRrD1VH/WeFPrW+oM8g== +"@parcel/transformer-postcss@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/transformer-postcss/-/transformer-postcss-2.0.0-nightly.448.tgz#6ff15db706e4aadf0512a49ad2b3863eb5ea49d8" + integrity sha512-qWMmWSAhCZJklLBqNk1Q1dfXcEM2o7RYwyKgOIH9Ch0KOzf7nrkVUSFcoBARNhtzQTQlb6zyD+VI8yeG0Iz/Lg== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.448+61001140" css-modules-loader-core "^1.1.0" nullthrows "^1.1.1" postcss-value-parser "^4.1.0" semver "^5.4.1" -"@parcel/transformer-posthtml@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/transformer-posthtml/-/transformer-posthtml-2.0.0-nightly.447.tgz#17af0da915e54ba7bc48d39830175a3b3c371034" - integrity sha512-ySg5FHlxoYJpEaASO6Sps7KIzYoH5bkJona5fqR6amdYuTdAJfJ6gR4LC+kH4BNyox+lwhjoQMyewGp3zBnpaQ== +"@parcel/transformer-posthtml@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/transformer-posthtml/-/transformer-posthtml-2.0.0-nightly.448.tgz#384e2ff2e177a554253a9f7b9e950ec707dc5aa9" + integrity sha512-uKyHIXwZTRUwXtdbMPOKXqmaPX3t5sQdCDDaPlq9aZBv5cEflDZYN3+t0Na3tXPRcdotbT/vUkpP1kfdPKrFAg== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" nullthrows "^1.1.1" posthtml "^0.11.3" posthtml-parser "^0.4.1" posthtml-render "^1.1.5" semver "^5.4.1" -"@parcel/transformer-pug@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/transformer-pug/-/transformer-pug-2.0.0-nightly.447.tgz#c1b9f723c6ce600a774a0a95eb21374e5ff48555" - integrity sha512-oku+QaCVwchwoH/ggbdcM0KNxoOWLz4DVKkIbCLE+PHynd8WjBQlVz5PIpsQhonF+GXPtvBMzKYoashPaQQXhw== +"@parcel/transformer-pug@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/transformer-pug/-/transformer-pug-2.0.0-nightly.448.tgz#2991434b5ca082aa1738ba3d86e6c96ae04f9bfb" + integrity sha512-+Tzkd3tnwVoXAWD/ZV58nhBe8c5GuDKHmPHImm1x6KSCPYVhxd3L76wS5BJfP3oxAAZqznSDl61nl7rpDnAlfg== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" -"@parcel/transformer-raw@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/transformer-raw/-/transformer-raw-2.0.0-nightly.447.tgz#aab7a4a69645d8752e31c42c4aa0800dcc623faf" - integrity sha512-oLJPQO7gLRicpH8gNqQ7JvGR3/Gt/OUSsVRx89Q24pPsS45Ezi42Yw5KyF0Oe4o9S8LD45Ues5IDrfUB5OF8NA== +"@parcel/transformer-raw@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/transformer-raw/-/transformer-raw-2.0.0-nightly.448.tgz#01e08d920564c82113e18c528e1194f0c16c2181" + integrity sha512-8O8O09UMMelrwe5Lu95u/6xBVrQcrjQmb/Twahjx7hmkd3Q0/AA8MlnGiE26Yyt8fxeL8lVniGaJdRTIaesZrg== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" -"@parcel/transformer-react-refresh-babel@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-babel/-/transformer-react-refresh-babel-2.0.0-nightly.447.tgz#bed4fde19be51ae4ef62c180a040c8ec6c2c206d" - integrity sha512-IxNejXXl90cCFp/yg2qU8WoHx1HjistRcgS0kU1xJe5E771I1jR5MRSHblrgRf60d4qvXMNBHeoqLKCKAkjjKA== +"@parcel/transformer-react-refresh-babel@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-babel/-/transformer-react-refresh-babel-2.0.0-nightly.448.tgz#12ad681cf7679a8f0927a6ed1a55b873a72bd625" + integrity sha512-OwGSYDIHbvzsLG67jOqv1leglXaPqUAHSVU0JbNQGHxZYX6RdKbCLhr1wOEhWn4J+ja8+8uuC1gAdKf8h5nT2g== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" react-refresh "^0.9.0" -"@parcel/transformer-react-refresh-wrap@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.0.0-nightly.447.tgz#037e529039756c9611381bf5df8910b06e887dcb" - integrity sha512-PJvGn6LEPl+r90FoGsc3VQ+AIO1OCxSXrUqnAt7yNTh5aFfWbfeYBjkjQc9akC7qwFa/uwJ6fep6p5f8mFVUJA== +"@parcel/transformer-react-refresh-wrap@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.0.0-nightly.448.tgz#b4e627df0c9c4e61398cda9e10fc574b20185c4b" + integrity sha512-zwV372zAOK3gakOtwkotCUaBi0WoZaDcxZmNaImcjcXh8CzLMtGypV+i6XesvLrUygeiLnyhrUoJfIJL6+2Klg== dependencies: "@babel/generator" "^7.0.0" "@babel/parser" "^7.0.0" "@babel/template" "^7.4.0" "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2069+3df3153b" - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/babel-ast-utils" "2.0.0-nightly.2070+61001140" + "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.448+61001140" react-refresh "^0.9.0" semver "^5.4.1" -"@parcel/transformer-sass@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sass/-/transformer-sass-2.0.0-nightly.447.tgz#9fd3433ba146eaeae08db218905b2d765f7b3aad" - integrity sha512-JT2GQG1gsiVGUgmUI1Q8RHUvZvVC3rurTyTuunhD5knYXdc+s9wHgtxuGhG+lvf85Ye/yfUJqk3VYdNSm8zI2w== +"@parcel/transformer-sass@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/transformer-sass/-/transformer-sass-2.0.0-nightly.448.tgz#ff8bd034bc82f95fe960fab0247ae1a9d0129f13" + integrity sha512-s5E3Zv2GKjAF2sRdtw/0RxcS5xEcdVeAOaR5D7OEvq6QzAC5nldAOHtjV89wm9Ahp63liWsbb66x13njTWbKpQ== dependencies: - "@parcel/fs" "2.0.0-nightly.447+3df3153b" - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/fs" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.448+61001140" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.448+61001140" -"@parcel/transformer-stylus@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/transformer-stylus/-/transformer-stylus-2.0.0-nightly.447.tgz#09b33292139020649b599e51523758974495c00c" - integrity sha512-hEkixaT6amarEzxlzNPWWRTWT0WSUnTUT9bFGS1o0MCorZwZJroPKMr9qlK8WCLY+xGzNKnSP2lWrCRLPFX7wA== +"@parcel/transformer-stylus@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/transformer-stylus/-/transformer-stylus-2.0.0-nightly.448.tgz#2e195338c6573f02f25b20c00186fe78096527c5" + integrity sha512-1XEj/0Y5GyhwFbSTva/HKjgYRwmBrjNhUMs/IcIutOsCjlU6+p0ebO0LpKIc1aZkme13ja50/LLmb+jKh8abGQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.448+61001140" -"@parcel/transformer-sugarss@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sugarss/-/transformer-sugarss-2.0.0-nightly.447.tgz#fef45b98a6ee8cbd7c5757e54945c3f611ee2ae6" - integrity sha512-8AXGFGyPvpyS6IZPf+sEk/Y8oYdBU6U0bKqzZgCK1PX1+IcHAI43TW2kmS3WXTxRbmwfsXWXKNOFsVyIZa/XmA== +"@parcel/transformer-sugarss@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/transformer-sugarss/-/transformer-sugarss-2.0.0-nightly.448.tgz#f3d18ffd99c0301d70454aad2f9174964e859700" + integrity sha512-a7Qtj3Jak/hPc1c+zirN16Gh6BATI/qLyGRs8/0UpTjNfnJ/Bj1Mb4Lu8pu6t2vwwK4BM+kscaxeTAOS5QiSrg== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" postcss "^8.0.5" -"@parcel/transformer-toml@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/transformer-toml/-/transformer-toml-2.0.0-nightly.447.tgz#4cec07a505e307620dd9695c748e756ffe020d16" - integrity sha512-MHcdfpdhY7cMQN3pkvEe6K+2anunmtoZ+wUP7LnHT//itzRyRpm5zY8Tzbxgg+4whgNh8YK9CQw1Xt48fu3fzQ== +"@parcel/transformer-toml@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/transformer-toml/-/transformer-toml-2.0.0-nightly.448.tgz#cb1a96f75f251876ef134c68960cfdb65ae34814" + integrity sha512-FBv3LYCJ0SObDOM73BJ75axtQOrm4PoqwBHRjsVwi1h4JUbkdp0ySPOmf4fEVShz8HYUaWO5zJVe9nC7jT1E8g== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" -"@parcel/transformer-typescript-types@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.0.0-nightly.447.tgz#2125b9828eb646861e01f279ae05cd84015bfae2" - integrity sha512-CeDyafYkCa/bm94q5Jia1IyE5Ar2ixOgN75ImlUh+W1MdbB0JPAmRoubIT/Fd5++/q79bqK1mL1sSoyEt//TAQ== +"@parcel/transformer-typescript-types@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.0.0-nightly.448.tgz#fddbf25a5b55056e7e1e3036624dab3474288628" + integrity sha512-rX9uIPDTC4xJqwNKo1MQTX7p6DumCGo6vaYXxE3ZIneTgHgBfbGyNoC9Kn8tNosptZ3HHmoyp4vjZNcovGS2LA== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/ts-utils" "2.0.0-nightly.447+3df3153b" + "@parcel/ts-utils" "2.0.0-nightly.448+61001140" nullthrows "^1.1.1" -"@parcel/transformer-vue@2.0.0-nightly.2069+3df3153b": - version "2.0.0-nightly.2069" - resolved "https://registry.yarnpkg.com/@parcel/transformer-vue/-/transformer-vue-2.0.0-nightly.2069.tgz#0d910b0c35e50ff31bf3a2b28d28b57e30dcafe6" - integrity sha512-atJXwGxKpACMJsNV1iQTCkf/ZviPMvzQAKs6DwgocVrrqfaLCC81oc4S3h+TjRJGLZWk08vlB9uJloeOwfkkpQ== +"@parcel/transformer-vue@2.0.0-nightly.2070+61001140": + version "2.0.0-nightly.2070" + resolved "https://registry.yarnpkg.com/@parcel/transformer-vue/-/transformer-vue-2.0.0-nightly.2070.tgz#e707a838f05493f7cbb9912c83b7e711363cb59c" + integrity sha512-gpSh/ucbw5bHrqW69rvdCvWA9o5Bixed9/KPhXoFf15Gn/bAZ65QE+omBrfSkiTVbHl5dJvXR/Yq+539PM+tyQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.447+3df3153b" - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/diagnostic" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.448+61001140" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/utils" "2.0.0-nightly.448+61001140" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-yaml@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/transformer-yaml/-/transformer-yaml-2.0.0-nightly.447.tgz#b39860a7c8eb9ca396ce0241ee90d00c88d7edae" - integrity sha512-hUe9NBt24k1dUx49ThKbmvPSnsMZoxHOMGNslZhW2MV6QepDOuXj7xnXEMvyAkimuxDlcvGtkfhHJJD8RaGEWA== +"@parcel/transformer-yaml@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/transformer-yaml/-/transformer-yaml-2.0.0-nightly.448.tgz#9886798f6b3193091d5f7276fac703f7bf736b08" + integrity sha512-MfNDX5e1n3b2NaGly0pO5RjttOKP/pkJJHNJRE2RlEAUOagxQSxqK3xUeLua8bSV6KFnP4NYeCeds4YxGGkB8w== dependencies: - "@parcel/plugin" "2.0.0-nightly.447+3df3153b" + "@parcel/plugin" "2.0.0-nightly.448+61001140" -"@parcel/ts-utils@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/ts-utils/-/ts-utils-2.0.0-nightly.447.tgz#8a6f5e683b2cf03c6cbd655dfa710db280c3d385" - integrity sha512-5h53In5xgGewdOCqqtQaCZrrXp0CR13ADspBJ+l6NfJQRdcOSJS/j4C0TvxfZeM1SPg84EHRcfYVPhowQrMXaw== +"@parcel/ts-utils@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/ts-utils/-/ts-utils-2.0.0-nightly.448.tgz#e3e5c69725efe5f94813420676e6e2f36fd18165" + integrity sha512-cWXI9pTAVlnXm65LzWk1IfVTZzgbq+qramWqdmfxVEYiR3dZd3RwC4/AYz5yxJMJNrWYFSnuu82BO0ilcOnDww== dependencies: nullthrows "^1.1.1" -"@parcel/types@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/types/-/types-2.0.0-nightly.447.tgz#f3e71cd8c5590714169159c30dae9a6ad1e336bc" - integrity sha512-+ejywUnBj9g+iOLoFF7TguQi+P05JzZKmkkkX2hg6K5DvC511xIASZfPa/kxFWUK1vDvNmgP445i8TSgkuMyLA== +"@parcel/types@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/types/-/types-2.0.0-nightly.448.tgz#67e48bb912a57f43e1a2e6d89b840e8994c7d63c" + integrity sha512-AynPc+Up7eOJZxvwcANbJjzyTkgfXRmvuwE1nOLNuupV0wUi53RHf3+ibw/Vd/FZSW918IJgcHc3bXtp31OmJQ== -"@parcel/utils@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-2.0.0-nightly.447.tgz#0fccebed5482983b44d2ef46de283f7054850a6e" - integrity sha512-I/rSrHCjpRDtJXyNfkpfHVa4Uz8li1dsFBRoeTJ2mTmxiCig3Yc8WWlzZgP6Ltk4eLEL5hI5pcKAmDrljeM41Q== +"@parcel/utils@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-2.0.0-nightly.448.tgz#c1f21fc92f681da530ec3fb778cc1cb8432bda17" + integrity sha512-MrdjG8zTidg0YkgBCbsk7z74agA1TY2FTXNqMWAH1mPvMePsn3Cz5Xwt131JtOrul5we/HZszObRz/S5rb+pag== dependencies: "@iarna/toml" "^2.2.0" - "@parcel/codeframe" "2.0.0-nightly.447+3df3153b" - "@parcel/diagnostic" "2.0.0-nightly.447+3df3153b" - "@parcel/logger" "2.0.0-nightly.447+3df3153b" - "@parcel/markdown-ansi" "2.0.0-nightly.447+3df3153b" + "@parcel/codeframe" "2.0.0-nightly.448+61001140" + "@parcel/diagnostic" "2.0.0-nightly.448+61001140" + "@parcel/logger" "2.0.0-nightly.448+61001140" + "@parcel/markdown-ansi" "2.0.0-nightly.448+61001140" "@parcel/source-map" "2.0.0-alpha.4.16" ansi-html "^0.0.7" chalk "^2.4.2" @@ -2932,14 +2932,14 @@ node-addon-api "^3.0.0" node-gyp-build "^4.2.1" -"@parcel/workers@2.0.0-nightly.447+3df3153b": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-2.0.0-nightly.447.tgz#b5ab0a096b7bb18fdcaf1a61c43ffe875454be59" - integrity sha512-Ytgv5KfLzgouneaASrLWuAPGpbdPnyWyZimgjC8BpNvn4pSzFJ/TUKI/Yswhp9RbH6/lwT6efuwPOmGFrz3wkQ== +"@parcel/workers@2.0.0-nightly.448+61001140": + version "2.0.0-nightly.448" + resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-2.0.0-nightly.448.tgz#4a202add2214dc7468dcf313d8cdc760b1c1479b" + integrity sha512-lOiRhUW+B2hA6bZeoNOKPASgKj97+w50o0yZk03i1C9ohIHLhC8u2L2Ze/KqII8cjrVcK+skUfvNZ6UbZ+V3Cw== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.447+3df3153b" - "@parcel/logger" "2.0.0-nightly.447+3df3153b" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" + "@parcel/diagnostic" "2.0.0-nightly.448+61001140" + "@parcel/logger" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.448+61001140" chrome-trace-event "^1.0.2" nullthrows "^1.1.1" @@ -10587,19 +10587,19 @@ parallel-transform@^1.1.0: inherits "^2.0.3" readable-stream "^2.1.5" -parcel@2.0.0-nightly.445: - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.0.0-nightly.445.tgz#bd76f4ace9455cdbda6938deee49366f72480379" - integrity sha512-i2FZrDKrNsmIw/Dwqs1MNXKjakymP62ZM/31gtEfdFlfRh/HJLxD8qVHbVW0q7fmhVD33dT5mtCuSTxAiqDQHg== - dependencies: - "@parcel/config-default" "2.0.0-nightly.447+3df3153b" - "@parcel/core" "2.0.0-nightly.445+3df3153b" - "@parcel/diagnostic" "2.0.0-nightly.447+3df3153b" - "@parcel/events" "2.0.0-nightly.447+3df3153b" - "@parcel/fs" "2.0.0-nightly.447+3df3153b" - "@parcel/logger" "2.0.0-nightly.447+3df3153b" - "@parcel/package-manager" "2.0.0-nightly.447+3df3153b" - "@parcel/utils" "2.0.0-nightly.447+3df3153b" +parcel@2.0.0-nightly.446: + version "2.0.0-nightly.446" + resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.0.0-nightly.446.tgz#e40357f1e4a575b528c9497000c0a32d2c557590" + integrity sha512-EJIzoudyOn2KafmgcuSFQnqzKLWnQR/tpjdf7+E+vhu9Mwvu1X+fYmsGA7OAGRVWCx18dKwHCrgSDj0GQBpMbA== + dependencies: + "@parcel/config-default" "2.0.0-nightly.448+61001140" + "@parcel/core" "2.0.0-nightly.446+61001140" + "@parcel/diagnostic" "2.0.0-nightly.448+61001140" + "@parcel/events" "2.0.0-nightly.448+61001140" + "@parcel/fs" "2.0.0-nightly.448+61001140" + "@parcel/logger" "2.0.0-nightly.448+61001140" + "@parcel/package-manager" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.448+61001140" chalk "^2.1.0" commander "^2.19.0" get-port "^4.2.0" From d12fcd31ecad03e8e8721e0c64241362d853aa71 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 15 Nov 2020 00:58:39 +0000 Subject: [PATCH 138/314] chore(deps-dev): bump parcel from 2.0.0-nightly.446 to 2.0.0-nightly.447 (#11476) Bumps [parcel](https://github.com/parcel-bundler/parcel) from 2.0.0-nightly.446 to 2.0.0-nightly.447. - [Release notes](https://github.com/parcel-bundler/parcel/releases) - [Changelog](https://github.com/parcel-bundler/parcel/blob/v2/CHANGELOG.md) - [Commits](https://github.com/parcel-bundler/parcel/commits) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- .../@aws-cdk/aws-lambda-nodejs/package.json | 2 +- yarn.lock | 920 +++++++++--------- 2 files changed, 461 insertions(+), 461 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda-nodejs/package.json b/packages/@aws-cdk/aws-lambda-nodejs/package.json index 40d6d3d93dbce..8dcc7caa033d9 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/package.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/package.json @@ -67,7 +67,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "delay": "4.4.0", - "parcel": "2.0.0-nightly.446", + "parcel": "2.0.0-nightly.447", "pkglint": "0.0.0" }, "dependencies": { diff --git a/yarn.lock b/yarn.lock index df2e87a342527..9e50ce03d754b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2159,128 +2159,128 @@ dependencies: "@types/node" ">= 8" -"@parcel/babel-ast-utils@2.0.0-nightly.2070+61001140": - version "2.0.0-nightly.2070" - resolved "https://registry.yarnpkg.com/@parcel/babel-ast-utils/-/babel-ast-utils-2.0.0-nightly.2070.tgz#ada4316f5ef2df8ddd795362383fc365dbd1629c" - integrity sha512-4NMO2W90IcQd8U15RhYPp8v33YekcKS4zqZELF8sdI12Iu5DdN5llo8mnAn2bRNZ/s3IK6RFrpkqvZndKTr9wQ== +"@parcel/babel-ast-utils@2.0.0-nightly.2071+837d1fbd": + version "2.0.0-nightly.2071" + resolved "https://registry.yarnpkg.com/@parcel/babel-ast-utils/-/babel-ast-utils-2.0.0-nightly.2071.tgz#e2f0f84f9da701debb36d412fbe9b9f0a793f261" + integrity sha512-Y5qKBqvneFuDEMT0G9SZlbxJz5dEyF1+BIFyQC01zydNCzbrff/BVyLsEzFRBthSefzW6wUfTKnxUdWcpygTeQ== dependencies: "@babel/generator" "^7.0.0" "@babel/parser" "^7.0.0" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" -"@parcel/babel-preset-env@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/babel-preset-env/-/babel-preset-env-2.0.0-nightly.448.tgz#f90703841f0ff19f2a0408d77e290ff6dcdca454" - integrity sha512-9pGTMjIV7l2qLDZdXhLFfbVUir6osHMCD4qPm746D2dHFTm0FlGefyiLN2b52ky8CfNixrfxX2qwpjaK7CdOuA== +"@parcel/babel-preset-env@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/babel-preset-env/-/babel-preset-env-2.0.0-nightly.449.tgz#90b382dc53f040585a7f69b18c9c56003b24e7cd" + integrity sha512-xoUBvWrkft85Ch9bai4vLytgUeYshHJS/jRGJgbhaa4Vle6/R4QfP4i9mmq/Ai3Wbk2iErznlkFVS9T4gCQI/g== dependencies: "@babel/preset-env" "^7.4.0" semver "^5.4.1" -"@parcel/babylon-walk@2.0.0-nightly.2070+61001140": - version "2.0.0-nightly.2070" - resolved "https://registry.yarnpkg.com/@parcel/babylon-walk/-/babylon-walk-2.0.0-nightly.2070.tgz#3064eb2f8da6a8c88cd85a795898258f1f3292b8" - integrity sha512-XPiOe/lWsWkvfeEbXPHgYldGOnpuR1FhMEXgH6RKa9ZBrGUWBDdC3KuY9AFwxDx5TVZGZxHmuV4LgOE7wpwqSw== +"@parcel/babylon-walk@2.0.0-nightly.2071+837d1fbd": + version "2.0.0-nightly.2071" + resolved "https://registry.yarnpkg.com/@parcel/babylon-walk/-/babylon-walk-2.0.0-nightly.2071.tgz#f4d49163214074d2cd2bbc43cd2602eaf993cb53" + integrity sha512-MXStP3yWHGCY2nRGi6kh9ezeS3x9ITUCZn0zX80TJc183I/Cz1PHcJKqeS0lwXl8VtPFqDvjXVqoSBY8UCFQ9g== dependencies: "@babel/types" "^7.0.0" lodash.clone "^4.5.0" -"@parcel/bundler-default@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.0.0-nightly.448.tgz#295cf5e8001f67d593695939f196f0117dda0cfb" - integrity sha512-CIrn1pem9aEdKFeCzTNrRcjqC3W2ASIWCt1Aps73QWUjwmL+TUwDYQ/CuLSNpTUhfG0no4lZqPnBLwAcfoKZRA== +"@parcel/bundler-default@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.0.0-nightly.449.tgz#1898eb0a5b2bc42748a1b56eb695787ee4d808dc" + integrity sha512-92vgvqsBKPSamstAcfAkKDLCbw5r2IP9FL6PVSb0u6gmCuOKCUMM4JUtoiAWm0njSSmW1B3Zqtzbhfu2JlNflQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.448+61001140" - "@parcel/plugin" "2.0.0-nightly.448+61001140" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" nullthrows "^1.1.1" -"@parcel/cache@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/cache/-/cache-2.0.0-nightly.448.tgz#9fe492e17113df4494605fb475e9ec374e73fdfe" - integrity sha512-Q6Fbxpxc55dK/qz/Uv/uKTGcHoYLLQrHqRjK2K3xx22CYUzmyoXhXFlkpyEjiEVMW83USS5aAScEEX469qV7nQ== +"@parcel/cache@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/cache/-/cache-2.0.0-nightly.449.tgz#8d3cbcfd79657fc8a83a8fa920b14e985b57e878" + integrity sha512-SYtpAKL4+AuHINgxfqrKwdG26jxsAJgeETpk9ILm9FvwOw40H9ImktNYIiT5dYaehpmuOl35msVlkocNWWHOjA== dependencies: - "@parcel/logger" "2.0.0-nightly.448+61001140" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/logger" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" -"@parcel/codeframe@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/codeframe/-/codeframe-2.0.0-nightly.448.tgz#a4c2892a1c75ef49d3a4891e6e82a328a86b78e2" - integrity sha512-/m8vL2PYfc7v9QT9+lBYywQkM/oKHm6FnJxwDCIyxpwU+HSn9oeL8YQyEMG25hWzAZ/c9UK3chPk206JtHJ3iw== +"@parcel/codeframe@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/codeframe/-/codeframe-2.0.0-nightly.449.tgz#77c7ba848cdef8dd7cedfa122b422acf824fc821" + integrity sha512-GrA41h6DCM9zTwo0LRu6aWCoFhlAVIB5hsZO1i6GcKrl9hb5RxRWt56YSPdigN67S4FCY0XyfrS6M98yaHrb2w== dependencies: chalk "^2.4.2" emphasize "^2.1.0" slice-ansi "^4.0.0" string-width "^4.2.0" -"@parcel/config-default@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/config-default/-/config-default-2.0.0-nightly.448.tgz#e625d9ca0e07deeb3b1d8b2a45786ea81630e962" - integrity sha512-4PG03VHrqxJaczDQBoBbT1LP74RIgoBf/ZVI/5NxywiDFcUmTRptK79gQTpTGEqOKr16SKGtNcOfBHBrnEc2iw== - dependencies: - "@parcel/bundler-default" "2.0.0-nightly.448+61001140" - "@parcel/namer-default" "2.0.0-nightly.448+61001140" - "@parcel/optimizer-cssnano" "2.0.0-nightly.448+61001140" - "@parcel/optimizer-data-url" "2.0.0-nightly.448+61001140" - "@parcel/optimizer-htmlnano" "2.0.0-nightly.448+61001140" - "@parcel/optimizer-terser" "2.0.0-nightly.448+61001140" - "@parcel/packager-css" "2.0.0-nightly.448+61001140" - "@parcel/packager-html" "2.0.0-nightly.448+61001140" - "@parcel/packager-js" "2.0.0-nightly.448+61001140" - "@parcel/packager-raw" "2.0.0-nightly.448+61001140" - "@parcel/packager-raw-url" "2.0.0-nightly.2070+61001140" - "@parcel/packager-ts" "2.0.0-nightly.448+61001140" - "@parcel/reporter-bundle-analyzer" "2.0.0-nightly.2070+61001140" - "@parcel/reporter-bundle-buddy" "2.0.0-nightly.2070+61001140" - "@parcel/reporter-cli" "2.0.0-nightly.448+61001140" - "@parcel/reporter-dev-server" "2.0.0-nightly.448+61001140" - "@parcel/resolver-default" "2.0.0-nightly.448+61001140" - "@parcel/runtime-browser-hmr" "2.0.0-nightly.448+61001140" - "@parcel/runtime-js" "2.0.0-nightly.448+61001140" - "@parcel/runtime-react-refresh" "2.0.0-nightly.448+61001140" - "@parcel/transformer-babel" "2.0.0-nightly.448+61001140" - "@parcel/transformer-coffeescript" "2.0.0-nightly.448+61001140" - "@parcel/transformer-css" "2.0.0-nightly.448+61001140" - "@parcel/transformer-glsl" "2.0.0-nightly.2070+61001140" - "@parcel/transformer-graphql" "2.0.0-nightly.448+61001140" - "@parcel/transformer-html" "2.0.0-nightly.448+61001140" - "@parcel/transformer-image" "2.0.0-nightly.2070+61001140" - "@parcel/transformer-inline-string" "2.0.0-nightly.448+61001140" - "@parcel/transformer-js" "2.0.0-nightly.448+61001140" - "@parcel/transformer-json" "2.0.0-nightly.448+61001140" - "@parcel/transformer-jsonld" "2.0.0-nightly.2070+61001140" - "@parcel/transformer-less" "2.0.0-nightly.448+61001140" - "@parcel/transformer-mdx" "2.0.0-nightly.2070+61001140" - "@parcel/transformer-postcss" "2.0.0-nightly.448+61001140" - "@parcel/transformer-posthtml" "2.0.0-nightly.448+61001140" - "@parcel/transformer-pug" "2.0.0-nightly.448+61001140" - "@parcel/transformer-raw" "2.0.0-nightly.448+61001140" - "@parcel/transformer-react-refresh-babel" "2.0.0-nightly.448+61001140" - "@parcel/transformer-react-refresh-wrap" "2.0.0-nightly.448+61001140" - "@parcel/transformer-sass" "2.0.0-nightly.448+61001140" - "@parcel/transformer-stylus" "2.0.0-nightly.448+61001140" - "@parcel/transformer-sugarss" "2.0.0-nightly.448+61001140" - "@parcel/transformer-toml" "2.0.0-nightly.448+61001140" - "@parcel/transformer-typescript-types" "2.0.0-nightly.448+61001140" - "@parcel/transformer-vue" "2.0.0-nightly.2070+61001140" - "@parcel/transformer-yaml" "2.0.0-nightly.448+61001140" - -"@parcel/core@2.0.0-nightly.446+61001140": - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/@parcel/core/-/core-2.0.0-nightly.446.tgz#7e3da2766dcfcf75fc196d348ad727a2e827a737" - integrity sha512-+dNgVJzZyknoSaHOm826ShIZIWtW8TK0+C0Jiv75feqg91l3K6aqBhlTzuIbWkbF8xLVssPO2xK6WTJJY3J1NQ== - dependencies: - "@parcel/cache" "2.0.0-nightly.448+61001140" - "@parcel/diagnostic" "2.0.0-nightly.448+61001140" - "@parcel/events" "2.0.0-nightly.448+61001140" - "@parcel/fs" "2.0.0-nightly.448+61001140" - "@parcel/logger" "2.0.0-nightly.448+61001140" - "@parcel/package-manager" "2.0.0-nightly.448+61001140" - "@parcel/plugin" "2.0.0-nightly.448+61001140" +"@parcel/config-default@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/config-default/-/config-default-2.0.0-nightly.449.tgz#0b34f279469c3cf5b343da369b7c77b5472992c5" + integrity sha512-5gsByLMQbUmKAtLf79diY4AcP2mTkMd2ljuLZ6oJMNDL8viqG0pCFvp88KBC/xKg8NpU5gvj2mLrwG6pkOzu+Q== + dependencies: + "@parcel/bundler-default" "2.0.0-nightly.449+837d1fbd" + "@parcel/namer-default" "2.0.0-nightly.449+837d1fbd" + "@parcel/optimizer-cssnano" "2.0.0-nightly.449+837d1fbd" + "@parcel/optimizer-data-url" "2.0.0-nightly.449+837d1fbd" + "@parcel/optimizer-htmlnano" "2.0.0-nightly.449+837d1fbd" + "@parcel/optimizer-terser" "2.0.0-nightly.449+837d1fbd" + "@parcel/packager-css" "2.0.0-nightly.449+837d1fbd" + "@parcel/packager-html" "2.0.0-nightly.449+837d1fbd" + "@parcel/packager-js" "2.0.0-nightly.449+837d1fbd" + "@parcel/packager-raw" "2.0.0-nightly.449+837d1fbd" + "@parcel/packager-raw-url" "2.0.0-nightly.2071+837d1fbd" + "@parcel/packager-ts" "2.0.0-nightly.449+837d1fbd" + "@parcel/reporter-bundle-analyzer" "2.0.0-nightly.2071+837d1fbd" + "@parcel/reporter-bundle-buddy" "2.0.0-nightly.2071+837d1fbd" + "@parcel/reporter-cli" "2.0.0-nightly.449+837d1fbd" + "@parcel/reporter-dev-server" "2.0.0-nightly.449+837d1fbd" + "@parcel/resolver-default" "2.0.0-nightly.449+837d1fbd" + "@parcel/runtime-browser-hmr" "2.0.0-nightly.449+837d1fbd" + "@parcel/runtime-js" "2.0.0-nightly.449+837d1fbd" + "@parcel/runtime-react-refresh" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-babel" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-coffeescript" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-css" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-glsl" "2.0.0-nightly.2071+837d1fbd" + "@parcel/transformer-graphql" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-html" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-image" "2.0.0-nightly.2071+837d1fbd" + "@parcel/transformer-inline-string" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-js" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-json" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-jsonld" "2.0.0-nightly.2071+837d1fbd" + "@parcel/transformer-less" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-mdx" "2.0.0-nightly.2071+837d1fbd" + "@parcel/transformer-postcss" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-posthtml" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-pug" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-raw" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-react-refresh-babel" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-react-refresh-wrap" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-sass" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-stylus" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-sugarss" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-toml" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-typescript-types" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-vue" "2.0.0-nightly.2071+837d1fbd" + "@parcel/transformer-yaml" "2.0.0-nightly.449+837d1fbd" + +"@parcel/core@2.0.0-nightly.447+837d1fbd": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/core/-/core-2.0.0-nightly.447.tgz#ddf02b86f3a62b5f74259d9d97703592d8797ea6" + integrity sha512-UUL9+mytJo48Uze954POXkWEnv4l1NuPNFdP4FKunyeRSQp4hK8jBMFctLDigVYXXs/pQ8q0pxDIkWfucf86dg== + dependencies: + "@parcel/cache" "2.0.0-nightly.449+837d1fbd" + "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" + "@parcel/events" "2.0.0-nightly.449+837d1fbd" + "@parcel/fs" "2.0.0-nightly.449+837d1fbd" + "@parcel/logger" "2.0.0-nightly.449+837d1fbd" + "@parcel/package-manager" "2.0.0-nightly.449+837d1fbd" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/types" "2.0.0-nightly.448+61001140" - "@parcel/utils" "2.0.0-nightly.448+61001140" - "@parcel/workers" "2.0.0-nightly.448+61001140" + "@parcel/types" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" + "@parcel/workers" "2.0.0-nightly.449+837d1fbd" abortcontroller-polyfill "^1.1.9" base-x "^3.0.8" browserslist "^4.6.6" @@ -2294,72 +2294,72 @@ querystring "^0.2.0" semver "^5.4.1" -"@parcel/diagnostic@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/diagnostic/-/diagnostic-2.0.0-nightly.448.tgz#a72226caebd76e6825bd85c3fe387a7400724a8f" - integrity sha512-ZMUHUFF/r7BtJWJZY5yKLm+9vt9Hk+YgXwOMTkVSwPvP23+bRkfSviJ0VlP0uPkf156X+sCJ+B1VV5ciVmz8NQ== +"@parcel/diagnostic@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/diagnostic/-/diagnostic-2.0.0-nightly.449.tgz#5ea6f709fad1376ae833497b507422661115a95e" + integrity sha512-HUR5X9cDjBpTeWzB0kBhudv6enSTBPng1f5x2SJUnPKIK1EdpEKGXIei4xwvTH1Tz0oIHcIVhrx2k4AZtaALPg== dependencies: json-source-map "^0.6.1" nullthrows "^1.1.1" -"@parcel/events@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/events/-/events-2.0.0-nightly.448.tgz#2f7ab992fc408466b20dbfac6ba52092acd39b61" - integrity sha512-mtI51poyfkI+VDIsq21PRvHr0v98PTDxOJp/r1j5Pw9Tb4XGA+nVXhTakxYtHylOTxKVzDQD+0EDHBPVLWE5xQ== +"@parcel/events@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/events/-/events-2.0.0-nightly.449.tgz#e7e41c368c7f1357e118c1da4264e7add57b6475" + integrity sha512-gOGHFGWW3tvBXSmXj6fKGfCTsjVV0KHrka5mL0vrNpi6n0LUQgpPtsZJokyQy91U/B5neUtLX/ubQT0gordqjA== -"@parcel/fs-write-stream-atomic@2.0.0-nightly.2070+61001140": - version "2.0.0-nightly.2070" - resolved "https://registry.yarnpkg.com/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.0-nightly.2070.tgz#d81f8e474b053d87a3dda403a00ed00ce4819ff2" - integrity sha512-lFRZn69fOWdDwZi7elHDS6vuUN8sCsvsKJZnLvZwMaQqvdOrjX5J5drlwhqTknRUr9lW38aq3+j6FJ6ZRpyF4A== +"@parcel/fs-write-stream-atomic@2.0.0-nightly.2071+837d1fbd": + version "2.0.0-nightly.2071" + resolved "https://registry.yarnpkg.com/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.0-nightly.2071.tgz#e239927e1d6b55a7b8ae2445f3839483752e75d6" + integrity sha512-Liv3eXtB5Ap/HvLyAmbBNdil9K33YlPJkDcTQjji9vt9PS7K53rX4woHIgdBvFmzOk54jZMbBgfwwxr1Z3Qu1g== dependencies: graceful-fs "^4.1.2" iferr "^1.0.2" imurmurhash "^0.1.4" readable-stream "1 || 2" -"@parcel/fs@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-2.0.0-nightly.448.tgz#4f9fd79f9c484a3a36aa64e800a45b6f865ccc85" - integrity sha512-UFQhgB8+YL645RXoWSu0hbCMxs2j9XhYcVF5jpHPEYAwWcvM0buoc/DEdURFqDWHuZSzH9MDXIlLkbBSqmlygA== +"@parcel/fs@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-2.0.0-nightly.449.tgz#07822ea3db9a558015db223fa0dbb1edaca6a449" + integrity sha512-k2MiwJr0NSodBUKud1h2cxYurJXgscrYpFDZTPYnyoJk0YBPHZcjmQBivXkX0ImH9MwOYIpRg/7dPDwnSaykXg== dependencies: - "@parcel/fs-write-stream-atomic" "2.0.0-nightly.2070+61001140" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/fs-write-stream-atomic" "2.0.0-nightly.2071+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" "@parcel/watcher" "2.0.0-alpha.8" - "@parcel/workers" "2.0.0-nightly.448+61001140" + "@parcel/workers" "2.0.0-nightly.449+837d1fbd" graceful-fs "^4.2.4" mkdirp "^0.5.1" ncp "^2.0.0" nullthrows "^1.1.1" rimraf "^3.0.2" -"@parcel/logger@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-2.0.0-nightly.448.tgz#7dc2892121f1d3dab1e81f9916ee6bf8465a29df" - integrity sha512-N0tCrbhvqPlCjDCCrlZMpqXXSbfKLUr7XRrgD8dkNZS8HnQiq9n/pnjPf9igs8cjqjtwMB8sY2b5JCTYvsKyBA== +"@parcel/logger@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-2.0.0-nightly.449.tgz#0a088eacaa32fca33fc835d382feecda86b3d54c" + integrity sha512-ZEuV2tx3aPTW/Ceo2SzS9cQbyNPmkJHKESGwFx7SWke2hZaIsyh6BqgDNGpnNkzK6mD2fgMzgNajb+FeH0IJww== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.448+61001140" - "@parcel/events" "2.0.0-nightly.448+61001140" + "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" + "@parcel/events" "2.0.0-nightly.449+837d1fbd" -"@parcel/markdown-ansi@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/markdown-ansi/-/markdown-ansi-2.0.0-nightly.448.tgz#d1b85e6d1a464f4688a34cb6f7836628dad1febc" - integrity sha512-7RqTHs8BFHc3/ykZtznPoEitXcKrWeeL4qwrQDhwLHq1eZHEIP4O9YnWnhYwf0EB8S1p8i5dMhxfBdAkMFsZ9w== +"@parcel/markdown-ansi@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/markdown-ansi/-/markdown-ansi-2.0.0-nightly.449.tgz#27f75e203b4fa67bebfb0b34c4951319e32d4ea3" + integrity sha512-MaygzYxLEc9IzIttqe+W8W9XpgsthoSiPgkJOpWlY7ICvKr3yHAlbmPgawbbNpMukjSzqOrcgDTwe22F/wV5ww== dependencies: chalk "^2.4.2" -"@parcel/namer-default@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/namer-default/-/namer-default-2.0.0-nightly.448.tgz#60271e4a23e9166ec0806bacbc14675716839c2b" - integrity sha512-qHLuDrFAmnY0ZWL29tVTo/5Z6RyC3athnc99QNlQm8XILgCLy3rvH05JcUqbw+YHhfhfz6k+OTrrJFRZPhGiiQ== +"@parcel/namer-default@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/namer-default/-/namer-default-2.0.0-nightly.449.tgz#448a1ad3b0dc38f0431cf1ebdee8403d73d05519" + integrity sha512-KVskg+otIp5P2hRnezWqmPMN5h44Bgh2pJ/1gcktfsKJUVygYeb1oPz+4Z+l32dkYlLlR05A0/+oZTzhCb0KcA== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.448+61001140" - "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" nullthrows "^1.1.1" -"@parcel/node-libs-browser@2.0.0-nightly.2070+61001140": - version "2.0.0-nightly.2070" - resolved "https://registry.yarnpkg.com/@parcel/node-libs-browser/-/node-libs-browser-2.0.0-nightly.2070.tgz#188bf0e01b89e9d96f999e6a309ab4494d512c80" - integrity sha512-4vAZKdBTlg25h0bliLyFbqFP6WHZdg9YyfOkp+lBpIqUGHuM+NZ2ZTsH6UFg5A/EvGa/xca8/Ey3SHB7YXNDXg== +"@parcel/node-libs-browser@2.0.0-nightly.2071+837d1fbd": + version "2.0.0-nightly.2071" + resolved "https://registry.yarnpkg.com/@parcel/node-libs-browser/-/node-libs-browser-2.0.0-nightly.2071.tgz#08a3a1de1e3d3c4fdab4e302abbbc325c0e604e0" + integrity sha512-L+0XNhMbQUvHyra9X3vvV+k2SnO5YPlHvew/6sClQNh+osXWz/FW/Uxi0pVwyrjqJAPS+0PQ4xV8CynvqYZUTg== dependencies: assert "^2.0.0" browserify-zlib "^0.2.0" @@ -2384,71 +2384,71 @@ util "^0.12.3" vm-browserify "^1.1.2" -"@parcel/node-resolver-core@2.0.0-nightly.2070+61001140": - version "2.0.0-nightly.2070" - resolved "https://registry.yarnpkg.com/@parcel/node-resolver-core/-/node-resolver-core-2.0.0-nightly.2070.tgz#c30381c8e67241ee3fe53a1840f4c6de1d6f36da" - integrity sha512-W+pORF950wI8PTZn0oT3atTiiH3slIn2li8QKJ7igzQjPLcGJLkuJ27amcT5D7jZP7bsjg2SCcU4gT94yMGKzg== +"@parcel/node-resolver-core@2.0.0-nightly.2071+837d1fbd": + version "2.0.0-nightly.2071" + resolved "https://registry.yarnpkg.com/@parcel/node-resolver-core/-/node-resolver-core-2.0.0-nightly.2071.tgz#a725fa191419b2e1a64ef970ac1c08858c822cc3" + integrity sha512-3W1qH5QgExDLd82EJMF9EJkAd7vSN3B7u554CKjCnrv6+oUwwWYySI8o8pdPZNpDhlXx+amUhg76IMPfqfxWUw== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.448+61001140" - "@parcel/node-libs-browser" "2.0.0-nightly.2070+61001140" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" + "@parcel/node-libs-browser" "2.0.0-nightly.2071+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" micromatch "^3.0.4" nullthrows "^1.1.1" querystring "^0.2.0" -"@parcel/optimizer-cssnano@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.0.0-nightly.448.tgz#3538c50740bb815e62bcbef8eef4087a6508ddfa" - integrity sha512-4R8euOaGFq+4Vcl8mGHIAskPePTQZGvO77W07h4wgwRIq7pmBHJGUfzuzmNeXAwZACMbq5vxCIU85dxRFPpenA== +"@parcel/optimizer-cssnano@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.0.0-nightly.449.tgz#f22c22863df7b23a70fab857e89377fd2376ce3d" + integrity sha512-2iuro2UrzDbfJPgke0CpwmQpR+Nf9NiiUV31JvdM8m2uBRafhMVQV6DXlFUwqfvFu4WkBfgvt6tSOZtpaobKGA== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" "@parcel/source-map" "2.0.0-alpha.4.16" cssnano "^4.1.10" postcss "^8.0.5" -"@parcel/optimizer-data-url@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-data-url/-/optimizer-data-url-2.0.0-nightly.448.tgz#317ffb418cc8f49bf57260bfa7472e9cb72b31a2" - integrity sha512-yf7OeMqYAeVf9X2J0wNiCKKklyfR4HgtNgm5GZoMsSmrvgvKjRGgFzqOkPp2GZWzKQn8F9UjuBbBleDzSM6nJw== +"@parcel/optimizer-data-url@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-data-url/-/optimizer-data-url-2.0.0-nightly.449.tgz#afa33f9cc38b6f4f9b56b39e951529f5883f4549" + integrity sha512-RGFQ5KAv8/U05WnKA11vw7olWLAY5INuwIPZA22e6j1pr5mWNB0kdyHu3WgU4dAVmz7J7KcwWtPrBx+PgKvE6A== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" isbinaryfile "^4.0.2" mime "^2.4.4" -"@parcel/optimizer-htmlnano@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.0.0-nightly.448.tgz#10766700e0d023e1f14b655940a3f1d881af5ae5" - integrity sha512-uY7IJrlo9DqUnf9LpG4B73BSEah6KRQxGaHo9jPkeM4/V+lQwjVoW1GZIbGc2MO1CKy/8jchbIInuymkN97T7w== +"@parcel/optimizer-htmlnano@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.0.0-nightly.449.tgz#30ebdb834b2ac35fbd2ce8570e564c5c47a303f8" + integrity sha512-da4/qr+LlZn/QEyh+NAhkLY1rz64NjnHUR/49UweJSCmtTK4WKPmByawQPyg/++7fWVmeqUu39bKeZW7yzsqGA== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" htmlnano "^0.2.2" nullthrows "^1.1.1" posthtml "^0.11.3" -"@parcel/optimizer-terser@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-terser/-/optimizer-terser-2.0.0-nightly.448.tgz#f2adf245de3de239c484994750f9e80687c291b1" - integrity sha512-uZEog58leFd7P7ezlAznv7r+45tUM6P2G2b5XH6tP6oiKaYyjw77n25Dnd22/mWU8CvPnVyQdsotR4AScgniig== +"@parcel/optimizer-terser@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-terser/-/optimizer-terser-2.0.0-nightly.449.tgz#7834577cb4a87071ae99d82d4ff1bab0853fdb80" + integrity sha512-WpGIbULuwIPhxbPmJ7do1fyxxmhY+aluQomptwopZsL9tPB4jqceGH3LHPbghn+r25qneaQKvwt5mjtrOHcYvg== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.448+61001140" - "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" nullthrows "^1.1.1" terser "^5.2.0" -"@parcel/package-manager@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/package-manager/-/package-manager-2.0.0-nightly.448.tgz#2cdda14e0a51222ad16c13eea49f68f73412b144" - integrity sha512-e39qTXU5OGsXB/607JZslwFJhyW+wLxvvKnreYDXp+MW/R/klkzQd4TuAXdF2aqDtcaLFvug4HRrK2rji5YC4w== +"@parcel/package-manager@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/package-manager/-/package-manager-2.0.0-nightly.449.tgz#3374d94997d48bc55f0c2c284a4fdde3c154eccc" + integrity sha512-hhBg3CZSe07dGAddE8Ft0ZP1fbaJ1v3jMgWSIO3uMwVYCIHiOs2KkIqMsiFaqlMesbeEQrSR0QiovTyUa3FGJg== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.448+61001140" - "@parcel/fs" "2.0.0-nightly.448+61001140" - "@parcel/logger" "2.0.0-nightly.448+61001140" - "@parcel/utils" "2.0.0-nightly.448+61001140" - "@parcel/workers" "2.0.0-nightly.448+61001140" + "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" + "@parcel/fs" "2.0.0-nightly.449+837d1fbd" + "@parcel/logger" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" + "@parcel/workers" "2.0.0-nightly.449+837d1fbd" command-exists "^1.2.6" cross-spawn "^6.0.4" nullthrows "^1.1.1" @@ -2456,91 +2456,91 @@ semver "^5.4.1" split2 "^3.1.1" -"@parcel/packager-css@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/packager-css/-/packager-css-2.0.0-nightly.448.tgz#cbb079321c319fa07025c4569f946fde06177030" - integrity sha512-gEx4nU6k8sAqkxBTnCbbTr6VolI7flbPcG00GXJrukmthKjuZT1N4jBkQHZIXP3RvgxbcKXGzzEKkU/v3SvnRg== +"@parcel/packager-css@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/packager-css/-/packager-css-2.0.0-nightly.449.tgz#961e747e88dfcaf7037454887412b57f10532a4a" + integrity sha512-QPb67kErKKIVohmFKNiH9oysW/NoLRJMgOeZXmXzQ8wT2IYHdKmcBuer7DcWKegU4dCkrCd7IRx8dSnQcoQqAA== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" -"@parcel/packager-html@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/packager-html/-/packager-html-2.0.0-nightly.448.tgz#9f5bcd24c8c24e88b00893ac20a0977783828bed" - integrity sha512-NA3fHpKHYBpfV5KuZzi0SD6gndZbzgSEld+8s3kxSfiO5kJtdh8tWCtGhr5Wx0CWAEbZBHd6c6AJUHCS5HlXUw== +"@parcel/packager-html@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/packager-html/-/packager-html-2.0.0-nightly.449.tgz#3a8e07496ae23da802a217ed6c82df5b9529a0e1" + integrity sha512-x6IWTU4w0Mfc1m8jcHUradSM9XrRX2umPk7QjhQ5X+v07N0diBpPoqnVSd4ujO29VYFHjh9by5dm3uEkF3mBLg== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" - "@parcel/types" "2.0.0-nightly.448+61001140" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/types" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" nullthrows "^1.1.1" posthtml "^0.11.3" -"@parcel/packager-js@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/packager-js/-/packager-js-2.0.0-nightly.448.tgz#aa49cd99b2f7fcbc5ba9a835aeb0c90bc3d428c6" - integrity sha512-LlplwBJaxJvyDuE5ijb5UNLRwLNHg3UKTrt12K0k6hPVkKTjNr3MKs0w2omHpjC7pKS7SZdDE9JFcxG4Jx0bBw== +"@parcel/packager-js@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/packager-js/-/packager-js-2.0.0-nightly.449.tgz#ce9e8c165c8f3f0c2ba8c447cc3b55c523c892e0" + integrity sha512-D/ixE0TzZ+Iq7t1gSsSWrh/HUzohJ2eBggxQnim0E/ymkj3TxuGRh4NLTSweThEiA2xyR7EVeYhM6aq4rZp/pw== dependencies: "@babel/traverse" "^7.2.3" - "@parcel/plugin" "2.0.0-nightly.448+61001140" - "@parcel/scope-hoisting" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/scope-hoisting" "2.0.0-nightly.449+837d1fbd" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" nullthrows "^1.1.1" -"@parcel/packager-raw-url@2.0.0-nightly.2070+61001140": - version "2.0.0-nightly.2070" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw-url/-/packager-raw-url-2.0.0-nightly.2070.tgz#a64aa1e712b6f51ad51b8d9f3e3c9ea6661a4e6b" - integrity sha512-ani2TWgt9xRDwOTcuJGwQCwigzDrvLD8M3Xk0WW4Cy9Ncf9Yi9LtrOEV6nmT4zmJyuSymvMpbAI7or1G4DhrNg== +"@parcel/packager-raw-url@2.0.0-nightly.2071+837d1fbd": + version "2.0.0-nightly.2071" + resolved "https://registry.yarnpkg.com/@parcel/packager-raw-url/-/packager-raw-url-2.0.0-nightly.2071.tgz#6adda25e448f0edbf707b54a75129b21a4c99c44" + integrity sha512-sNAUDE35DCe/0yI3jjDC8Lfy8RY5xxT0RRBII89aVx2VxhpEqSAGSLw0xHSh2OsWPBxvFaLzGbyyLZ9TOe/Y6Q== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" -"@parcel/packager-raw@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw/-/packager-raw-2.0.0-nightly.448.tgz#8ddc7e4cd10f58dc89f5980b12309baee5b589a2" - integrity sha512-/oo/55HTmpcXo2RtDz9XuZodAorS59gaGJIALfcRAN6BeCS0MbbuSlIuB9txcElTal5YiKH2orkyUN57KL74Ng== +"@parcel/packager-raw@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/packager-raw/-/packager-raw-2.0.0-nightly.449.tgz#d3e14dc2d8c80d4ace8a01ce7a1718479c74dda6" + integrity sha512-PC5amaAv6cVzkP+CUDpgm58IKH0fS6AEHEJKuXbCUcLbYmnaDh2JUjDb2q6pXbTT7uITNUtC62FHTtXZdyHWCw== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" -"@parcel/packager-ts@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/packager-ts/-/packager-ts-2.0.0-nightly.448.tgz#322e5c0339ae3fec5a5199cbefbed01ea476724e" - integrity sha512-aUVo0j7+WBkIw84Npoeki7SL+5kHsdnq/kBHmpzVdSbbA+0/5uPcnyQQLxOikxSjFaHlwYWtMjRcnTPlVT26BQ== +"@parcel/packager-ts@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/packager-ts/-/packager-ts-2.0.0-nightly.449.tgz#8970151da387141a7d0328a3d41c7d1e09b545f5" + integrity sha512-GxxdUaHX6BvxFST7UEK1oJF/btaXfv4cBMixuA4Ii+ENvcISh/X4bhA8KlfKoquyFo0/58Enq0zo6u/psjkBlA== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" -"@parcel/plugin@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/plugin/-/plugin-2.0.0-nightly.448.tgz#421df2a9a994d32c794926ba9678f57e73bbc26e" - integrity sha512-OAzSe3lJcemLF3tlxcbDh8r9DmkYWq19cFkmL6ycWUWoFsFTSPF2hx9LTARKWdbnVKGTtkvXVfDWW9ns75Wzbw== +"@parcel/plugin@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/plugin/-/plugin-2.0.0-nightly.449.tgz#3299648d71296068a2f259803e241fcbcc034b26" + integrity sha512-FocqYaPUytyrC5AE1aYszb+e1gdsFAecHPgJYc/iEnVwM+eCIRArVbLqvudZoFBTcSM26F2uyBoIjMtiqhWpmg== dependencies: - "@parcel/types" "2.0.0-nightly.448+61001140" + "@parcel/types" "2.0.0-nightly.449+837d1fbd" -"@parcel/reporter-bundle-analyzer@2.0.0-nightly.2070+61001140": - version "2.0.0-nightly.2070" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.0.0-nightly.2070.tgz#6c641bd74da01ea35f4dee4d422ad913dc159504" - integrity sha512-aL0FsrTPN4p16cui1zCk0OWZXhLMms3ZRHh+w+kWKPIVkjjqG1pwRWYjo0cBO0dJb94T79kRA3NeuteV2QGVaw== +"@parcel/reporter-bundle-analyzer@2.0.0-nightly.2071+837d1fbd": + version "2.0.0-nightly.2071" + resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.0.0-nightly.2071.tgz#f4ff3848c0957c37dfe2c5107822268f86fce51e" + integrity sha512-V201PqmBwMy4JjuRaCDtMjKeTcQFB8QHaGRAtudD+FI2ulsms3m0yMTabmRrt2VAQH97gVF8HtqkHF5aKDU9rA== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" nullthrows "^1.1.1" -"@parcel/reporter-bundle-buddy@2.0.0-nightly.2070+61001140": - version "2.0.0-nightly.2070" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-buddy/-/reporter-bundle-buddy-2.0.0-nightly.2070.tgz#355e45650a7d3602bf2bc66648277841427eb5e0" - integrity sha512-N/ctv0QmDZtm1PDxCJZebS+RgKSgQlM5kp5dAmIw29gxPvJarxI4y0K3IQaSf7PqJ9TXxB2AthToJOMO5lMD4A== +"@parcel/reporter-bundle-buddy@2.0.0-nightly.2071+837d1fbd": + version "2.0.0-nightly.2071" + resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-buddy/-/reporter-bundle-buddy-2.0.0-nightly.2071.tgz#a3a93797ec9554da98292f960975565296b88a72" + integrity sha512-/UfvDyhwqNP8AoDrvFMkpKTZIJVKDTr7sRi/2gxxnhf2LW+qoLOpSsWSWue679tTntOKCqMhAUI/SS6YlNI0rQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" -"@parcel/reporter-cli@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/reporter-cli/-/reporter-cli-2.0.0-nightly.448.tgz#50e1c76be7294d6d4cfacedd7cc940dde17f9343" - integrity sha512-SiinYZeuy+QBvWrw9NVQWi0vddxnB3VNFQ9Uk24V4bXeRMol6QfzeDWR6myErpdxdyWY08wdzwv+m+grWXL1wQ== +"@parcel/reporter-cli@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/reporter-cli/-/reporter-cli-2.0.0-nightly.449.tgz#4d8df81dc6ad464b79c304ee4cfb1b52629af29a" + integrity sha512-GsgC96hWZPqVVU6xqj4o1ddAhSM+EoEu7LTm/41T6tyW3Qv9OmfprsKUbSMK+48HZLL1UVJ0mEK/T4f7K+dg0Q== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" - "@parcel/types" "2.0.0-nightly.448+61001140" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/types" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" chalk "^3.0.0" filesize "^3.6.0" nullthrows "^1.1.1" @@ -2549,13 +2549,13 @@ strip-ansi "^6.0.0" term-size "^2.1.1" -"@parcel/reporter-dev-server@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/reporter-dev-server/-/reporter-dev-server-2.0.0-nightly.448.tgz#bf36522a9118c68b07ce9cd0b9c5de984b2ea4fa" - integrity sha512-M3X+/d9FxGisqx6dxUt58AD0vr/a9PoJRfhsoN8RZq+sIDFzQjbXrqTPBO7OjcDSbxBTP5fKOWMDmx6qwHxyxw== +"@parcel/reporter-dev-server@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/reporter-dev-server/-/reporter-dev-server-2.0.0-nightly.449.tgz#5ec9ec25d3696f52ccc8c92018d78caff470e070" + integrity sha512-49s+jUBClCqdWMNTk2IvpAoRWf2axjXrB615mO5WGeVqBEZIHaSKA2WpfsaKb4mbJYmqNGKrBZbUqwK0lA2YlA== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" connect "^3.7.0" ejs "^2.6.1" http-proxy-middleware "^1.0.0" @@ -2563,54 +2563,54 @@ serve-handler "^6.0.0" ws "^6.2.0" -"@parcel/resolver-default@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/resolver-default/-/resolver-default-2.0.0-nightly.448.tgz#a40451311860b83ec130c8ed49cc3a27e1f857fe" - integrity sha512-+R1i+DoAR1Magj5biYSV3eFN+Imu51qHao84eLp2A8eUfungngoQ9FE30bZHIvyHj7+QJGMdALomImQd09ic1w== +"@parcel/resolver-default@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/resolver-default/-/resolver-default-2.0.0-nightly.449.tgz#9d3465c225614598b0ab68f62fae0dab4c0d71d5" + integrity sha512-+V9IjjZPhkjCF2GppU/QSlnnQkOLGd3WNvJkRPOEWZtIpVOVy7lzoL9rBPFoE94aHwM0m4BolqyuiYv/6nqTpg== dependencies: - "@parcel/node-resolver-core" "2.0.0-nightly.2070+61001140" - "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/node-resolver-core" "2.0.0-nightly.2071+837d1fbd" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" -"@parcel/runtime-browser-hmr@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.0.0-nightly.448.tgz#b5a87e9d7178e2c1a53a22237010af586a1611c7" - integrity sha512-L7VIoTyGyLt6jIMU/W5F1KfvgysS3coQOYvUYt1JKSqhdGH3yh7gB7DNmHpib9fRez7hFvRWqIjnMUUc0zS+zA== +"@parcel/runtime-browser-hmr@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.0.0-nightly.449.tgz#5bb4f08873193dd4cab8e134ec5ead1066d2509d" + integrity sha512-okbif6vgJ6bMbjGuJk6I/+zBnP/OJeT8eKWii9uvZmN2tZv1MoIgXrXIJdNsUgunBPHur9dozk5K8cO1zTazuQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" -"@parcel/runtime-js@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/runtime-js/-/runtime-js-2.0.0-nightly.448.tgz#8de0900812e02b03cf0efe4f0be4ce9001009771" - integrity sha512-oArigY5HHAQaqYXK+TXcIQfsyo5IqoHWC1ZE74dcZv1wAl6wedEcU6ynldLJmX2aE/aA+87UYQR8jpoGQtJd1Q== +"@parcel/runtime-js@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/runtime-js/-/runtime-js-2.0.0-nightly.449.tgz#26c4b28a1f05a26bddbbe95d45c9589048ed2086" + integrity sha512-GSUFxH/XxeN3tAezPOCHVS84NqYUJln2N1W8N8f1HRm1w52NB8VCIeB0mMuM0lGH1GM9le48oAHzISEixLkH4g== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" nullthrows "^1.1.1" -"@parcel/runtime-react-refresh@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.0.0-nightly.448.tgz#f2bb37ed81c60613ea1baacfe085cdaec333b88c" - integrity sha512-+OYBXFxlVpcG2ONCdy6y3QDj9s7T0PbKpxQz6MFT0T28vwhsjMlRD4mts0R5oemKtNSN/gse3HCb4gkMuDXayg== +"@parcel/runtime-react-refresh@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.0.0-nightly.449.tgz#e3903b5c6dbf46c296966f4787905553f853ea13" + integrity sha512-ltrrakt2uCZ5Q6tDST2l5Ums4KpB9dM0kuZcwa6qJCpn4+YCYb1fVO3VSgk4zIVNhRdVwZspB+TEF2xLlBlWzA== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" react-refresh "^0.9.0" -"@parcel/scope-hoisting@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/scope-hoisting/-/scope-hoisting-2.0.0-nightly.448.tgz#5b30f89b667447b6bd48dfed7e16f0ec572a349c" - integrity sha512-Zh842WzUMgM7X2IdHBFhdkY3g9WyQ8govjuvtw6jc+7Q69np7MZ8rEB2s4BuNYVpj850QM3laxUZGi64JfuBhw== +"@parcel/scope-hoisting@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/scope-hoisting/-/scope-hoisting-2.0.0-nightly.449.tgz#9fbe4b8bf479e7bfc96f076aef0308ae2545058e" + integrity sha512-R3lgrFVUccomYxN/A76qTCqav2+yU2OO5fb6qttUY7d0syQOuj72Vmj6X4djv8XD1wZMVpmGmWumr8if+UdqxQ== dependencies: "@babel/generator" "^7.3.3" "@babel/parser" "^7.0.0" "@babel/template" "^7.4.0" "@babel/traverse" "^7.2.3" "@babel/types" "^7.3.3" - "@parcel/babel-ast-utils" "2.0.0-nightly.2070+61001140" - "@parcel/babylon-walk" "2.0.0-nightly.2070+61001140" - "@parcel/diagnostic" "2.0.0-nightly.448+61001140" + "@parcel/babel-ast-utils" "2.0.0-nightly.2071+837d1fbd" + "@parcel/babylon-walk" "2.0.0-nightly.2071+837d1fbd" + "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" nullthrows "^1.1.1" "@parcel/source-map@2.0.0-alpha.4.16": @@ -2621,10 +2621,10 @@ node-addon-api "^3.0.0" node-gyp-build "^4.2.2" -"@parcel/transformer-babel@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/transformer-babel/-/transformer-babel-2.0.0-nightly.448.tgz#cc8b5fcceed090c230be6304fd68084fc5e62325" - integrity sha512-9dPujGq9e90cYA3TM+aupWzw3Yz90PwqrY93KqRKWEkFYiwQed28hMGjS78uJerjnAmfKDBB1HFO/hFSnZf5/A== +"@parcel/transformer-babel@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-babel/-/transformer-babel-2.0.0-nightly.449.tgz#099259ef4ac9f02f61cc5c6ff8102d07489345cf" + integrity sha512-BTuOrG892ZmAx7M3jT0WX+2Yxi/bLtbuDWP8SfH9lXgrCJtx6fPObk7mqIrTvdmefKjeLcRmig1nS7XcnFKJPA== dependencies: "@babel/core" "^7.0.0" "@babel/generator" "^7.0.0" @@ -2634,85 +2634,85 @@ "@babel/preset-env" "^7.0.0" "@babel/preset-react" "^7.0.0" "@babel/traverse" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2070+61001140" - "@parcel/babel-preset-env" "2.0.0-nightly.448+61001140" - "@parcel/plugin" "2.0.0-nightly.448+61001140" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/babel-ast-utils" "2.0.0-nightly.2071+837d1fbd" + "@parcel/babel-preset-env" "2.0.0-nightly.449+837d1fbd" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" browserslist "^4.6.6" core-js "^3.2.1" nullthrows "^1.1.1" semver "^5.7.0" -"@parcel/transformer-coffeescript@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/transformer-coffeescript/-/transformer-coffeescript-2.0.0-nightly.448.tgz#7273a9a58c2dd933eb8db967373539ee74efb7f2" - integrity sha512-4scl68ppphsAxsh9ad0jgTuIHHSB2ferxRsl8DQBIVF+rTL5q/VoLqwI4jTPmI7RZ77N6ec7M7hwro00MSFipQ== +"@parcel/transformer-coffeescript@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-coffeescript/-/transformer-coffeescript-2.0.0-nightly.449.tgz#a1bcf008ec744aa29875081808e6e7f4072b2c68" + integrity sha512-VxpRqifHbgUlNLcJRqcScdcquqSpQ+PUEevZuJmFsGa1SWIFisG0enfSgQL3eI6DbcT+a06tDMwkOTwm9Fx4+w== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" coffeescript "^2.0.3" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-css@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/transformer-css/-/transformer-css-2.0.0-nightly.448.tgz#0af630f67795d02f7a2508e7f05602c80115f8e9" - integrity sha512-vGE4B68Dl8Z8v2Cm3/2z5jjgX1hQHzLbghUNxwrI9YkzqKFsXBrxyeMeaRJMztD1jj4y4v/Dbj5pvY8TWZOpzw== +"@parcel/transformer-css@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-css/-/transformer-css-2.0.0-nightly.449.tgz#78b87be06020aed3463f2acaa8761c7e535e888d" + integrity sha512-YN3mVmIsNHDpNasxevaY0m9jSJzESyRWIfN4P6LkhS1al69KEWxIOmshGB5EV+r7GJ7MmealZP1x74mjJCzK1Q== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" postcss "^8.0.5" postcss-value-parser "^4.1.0" semver "^5.4.1" -"@parcel/transformer-glsl@2.0.0-nightly.2070+61001140": - version "2.0.0-nightly.2070" - resolved "https://registry.yarnpkg.com/@parcel/transformer-glsl/-/transformer-glsl-2.0.0-nightly.2070.tgz#aa0231c37e5fc86738fda62940d336dc749c92d5" - integrity sha512-vB4d7Yu8rL3rM23JfJJ42KWnPZlA/LcxkvSAF+NOwUzhnmd9B6toLPcPM124lg3VmuRb93gSyvACA5WrPIYpVg== +"@parcel/transformer-glsl@2.0.0-nightly.2071+837d1fbd": + version "2.0.0-nightly.2071" + resolved "https://registry.yarnpkg.com/@parcel/transformer-glsl/-/transformer-glsl-2.0.0-nightly.2071.tgz#fe62e491bff66fdc4817895600ba207cff582fb2" + integrity sha512-qfs82sSYbm6CspMvoQczi6Ec7KbvDJewubnxOG0xVA+1RokNbOrpWGXDf6QNhCVy91rPipd+w/stG4y4Qn3ACQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" -"@parcel/transformer-graphql@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/transformer-graphql/-/transformer-graphql-2.0.0-nightly.448.tgz#0060cc1404d5fc82a842cb61396aef79bf7c0021" - integrity sha512-OuCfnz51EMF3jboL/tdg3oUDin2OxIii6Yy8GzVuf7ETUs1Ztx7esVx4eZYTZIDm3y8AuMYasHl57ZIvcUAYKg== +"@parcel/transformer-graphql@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-graphql/-/transformer-graphql-2.0.0-nightly.449.tgz#6014a1ffd2f0d0af3c84b6c8616770c54f9c428b" + integrity sha512-vbsUYTpqLBVXHW0VoKxu+iXjdnwB7BPvxCxhIBa/iaNIZRiMuX5IPovLVY4AxL+9EjdbAN5K93GMP7hcsDxLMQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" -"@parcel/transformer-html@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/transformer-html/-/transformer-html-2.0.0-nightly.448.tgz#9de1e385b02cbe90258e11d711818a2159daa534" - integrity sha512-1am34PMszyH6A4pq5k/AbDUUP2jR5Z0OlvGUaW4m2lrUSvN+NKyUaU/S+2VpKPrHdfpQJ3h3UmhedxjK+LmZhA== +"@parcel/transformer-html@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-html/-/transformer-html-2.0.0-nightly.449.tgz#c24aff17cce228fdd85da8604756e1f7165c28cd" + integrity sha512-hr3p6meUM+tZ2xL8NPEnc5b+9TIkAJIUJreMC1wpgcEmj6jqxTsDg0wnWNNP8hyYGE26VSal3aVGpnY+ad+Nww== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" nullthrows "^1.1.1" posthtml "^0.11.3" posthtml-parser "^0.4.1" posthtml-render "^1.1.5" semver "^5.4.1" -"@parcel/transformer-image@2.0.0-nightly.2070+61001140": - version "2.0.0-nightly.2070" - resolved "https://registry.yarnpkg.com/@parcel/transformer-image/-/transformer-image-2.0.0-nightly.2070.tgz#1d48841ee1863cce6ae0f2338eaf9b38988102bc" - integrity sha512-2LXpxC+tJr17sY0Y67g7G4ixhR8iXQki8tmqcCW8+/f6BTlyU9yaIJ6n8AmkpvXadI9PQ8zsrlDCMbAIzbAb7Q== +"@parcel/transformer-image@2.0.0-nightly.2071+837d1fbd": + version "2.0.0-nightly.2071" + resolved "https://registry.yarnpkg.com/@parcel/transformer-image/-/transformer-image-2.0.0-nightly.2071.tgz#bc45d8ebe906fa91aa7b8d9a6735c78aad96a905" + integrity sha512-xqM71Gjl5AqTuZCXGw7dzJ7UDmQTJbAAJ/3A5OqOycl1iTPL0c2pAGSUkDRJRIX4380vplAgqYTco+FvBBvj3A== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" -"@parcel/transformer-inline-string@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.0.0-nightly.448.tgz#aa92bad18fbb02b1ac505edf4d2cb6358b0bd596" - integrity sha512-o9vcSp3xuvnp7r5mzTfcitT2zCVIA6yVzedfidcRuQSbzhmjC/zzz+mIMnhjWkYkFL955jLG5hp/4yE8r6oIHQ== +"@parcel/transformer-inline-string@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.0.0-nightly.449.tgz#015aca67e176adb080d324931053c2ce86d70441" + integrity sha512-HSgsZcUhPNY5d55TZDR7N8lMff1yyi7zNw1ONsQyQeRG0POfWA3kMWbCvnAaVbM+VA3+en0fLtpJ4Lurn6T7Mg== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" -"@parcel/transformer-js@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.0.0-nightly.448.tgz#503bf70113eee3f08291f8d6843cae1bb13333fa" - integrity sha512-hm5lOGha+Ves/e1+lyK5JxREsqZToRO5W676/Qq60dINQilyiujt3mRwUr+xB2IJKcwT63W1JzmwkN0iOu6SeQ== +"@parcel/transformer-js@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.0.0-nightly.449.tgz#abd06895e8b3c0f1348f17a28bac9c7e87c2610f" + integrity sha512-5fPgwfW0+mJN4uq6yYHI9nkyGrS4Pg9U0Rc9Td7Fcc1jt82qIGE5LovZSonudw3tqnbpP6oqNEe/J48KdLdpBQ== dependencies: "@babel/core" "^7.0.0" "@babel/generator" "^7.0.0" @@ -2721,193 +2721,193 @@ "@babel/template" "^7.4.0" "@babel/traverse" "^7.0.0" "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2070+61001140" - "@parcel/babylon-walk" "2.0.0-nightly.2070+61001140" - "@parcel/diagnostic" "2.0.0-nightly.448+61001140" - "@parcel/plugin" "2.0.0-nightly.448+61001140" - "@parcel/scope-hoisting" "2.0.0-nightly.448+61001140" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/babel-ast-utils" "2.0.0-nightly.2071+837d1fbd" + "@parcel/babylon-walk" "2.0.0-nightly.2071+837d1fbd" + "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/scope-hoisting" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" micromatch "^4.0.2" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-json@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/transformer-json/-/transformer-json-2.0.0-nightly.448.tgz#356250f2a7455ab861f0a7f4bd6b820ce0f8464e" - integrity sha512-wGJfMpBNCV3Oz3emEPzk+mGl1i3YR/6V0ptDHrhHlgv3hIafMUew+MCpFsgoBkYPrs98bhhP/3QakfHcnCtmzQ== +"@parcel/transformer-json@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-json/-/transformer-json-2.0.0-nightly.449.tgz#18c4e9181bf55dd85bbee016427bda3864e742d7" + integrity sha512-2OIxk/Kk1AFj3ZrOK0DztchFFgnxp+sZBejKac8tPGrXO7IgixTKpsW+8wNCTWXdK8ohcg0+eCvIRw8IKfJgkQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" json5 "^2.1.0" -"@parcel/transformer-jsonld@2.0.0-nightly.2070+61001140": - version "2.0.0-nightly.2070" - resolved "https://registry.yarnpkg.com/@parcel/transformer-jsonld/-/transformer-jsonld-2.0.0-nightly.2070.tgz#ff1c24a0c6dd530f08c83c110b2a50c04771d8ca" - integrity sha512-2cMHUf6mpug/ao5hgn/J9GzfW6IDB4/XLcPJNjvXz2QI7kVJ4Sz6jXf/1kAyw8OLTIyELjFjoxjxRt/r6Ktymw== +"@parcel/transformer-jsonld@2.0.0-nightly.2071+837d1fbd": + version "2.0.0-nightly.2071" + resolved "https://registry.yarnpkg.com/@parcel/transformer-jsonld/-/transformer-jsonld-2.0.0-nightly.2071.tgz#bb9d432d9efafb17c9832f848644e97e964e8ce6" + integrity sha512-cdbqRIefMSwbxIBsMoLjr1M8V30Bs1BpjdTsQ7gJsc9hMJsx59LdRtOg8Dx6iwyuJwdQrpIYdi1IyaUJVrKsag== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" - "@parcel/types" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/types" "2.0.0-nightly.449+837d1fbd" json5 "^2.1.2" -"@parcel/transformer-less@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/transformer-less/-/transformer-less-2.0.0-nightly.448.tgz#b39837ed2301d97c9c8e0544663c9de16ecc4d57" - integrity sha512-OiTugud9sWxZsme4qeaS7g4AZfIhvapCf4Momj6Q9/ECoShZqYVlai6FlR3y+MspYS8ziyQpEeLVA2C90Wt71w== +"@parcel/transformer-less@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-less/-/transformer-less-2.0.0-nightly.449.tgz#a4798842c463b7f4aa9b6e85dd790db55ef3a41b" + integrity sha512-cknM1CZjcbLIzbaUpi1kp7kjdkGFB7uxX0Dj7MKCVZKXOYFJlwGCycb/DXw1LRw+N4Tc6IjHaIsCGaw6Z7LGOw== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" "@parcel/source-map" "2.0.0-alpha.4.16" -"@parcel/transformer-mdx@2.0.0-nightly.2070+61001140": - version "2.0.0-nightly.2070" - resolved "https://registry.yarnpkg.com/@parcel/transformer-mdx/-/transformer-mdx-2.0.0-nightly.2070.tgz#e5a62c3423e744df12261ed606a65a57ea76ff4f" - integrity sha512-23efIf7gQimSu/S8JEQWxhFZozWSdbbYVtTM7L54qJaLhN3yFW0VG1/vKnY7wMJKtaP3K44mmtc/BQjd4HNpLg== +"@parcel/transformer-mdx@2.0.0-nightly.2071+837d1fbd": + version "2.0.0-nightly.2071" + resolved "https://registry.yarnpkg.com/@parcel/transformer-mdx/-/transformer-mdx-2.0.0-nightly.2071.tgz#ff7e77aec3897a9c80ffda3b21145545c9817fc9" + integrity sha512-LjnKXkUI6fTXRnT21uKVTRoPi7d4+o6kBS9O/ojEniDqe97zQ6qb4R2teSS2UuMtxVKWVp2ojXchC+V+frke/w== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" -"@parcel/transformer-postcss@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/transformer-postcss/-/transformer-postcss-2.0.0-nightly.448.tgz#6ff15db706e4aadf0512a49ad2b3863eb5ea49d8" - integrity sha512-qWMmWSAhCZJklLBqNk1Q1dfXcEM2o7RYwyKgOIH9Ch0KOzf7nrkVUSFcoBARNhtzQTQlb6zyD+VI8yeG0Iz/Lg== +"@parcel/transformer-postcss@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-postcss/-/transformer-postcss-2.0.0-nightly.449.tgz#d90d1ac841f253d04308603e78f21c93256b6705" + integrity sha512-QdAKy+dO9VEOAypJ7k75ah29zdPGgzECU7s6NqiAexcoAmgoOJEKQO9b3geVd7wyX7PBa+dHU1N1vnibUhA+ng== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" css-modules-loader-core "^1.1.0" nullthrows "^1.1.1" postcss-value-parser "^4.1.0" semver "^5.4.1" -"@parcel/transformer-posthtml@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/transformer-posthtml/-/transformer-posthtml-2.0.0-nightly.448.tgz#384e2ff2e177a554253a9f7b9e950ec707dc5aa9" - integrity sha512-uKyHIXwZTRUwXtdbMPOKXqmaPX3t5sQdCDDaPlq9aZBv5cEflDZYN3+t0Na3tXPRcdotbT/vUkpP1kfdPKrFAg== +"@parcel/transformer-posthtml@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-posthtml/-/transformer-posthtml-2.0.0-nightly.449.tgz#076f3b05d6d02b0391e48de126a8db12af761021" + integrity sha512-wpueXMbZRQxaRPlxP9qyYcJNPtfnVfpRcj2CneJ99gze+1eEO6GmjMdxrr4jq0ejruy+/qL7dTzXwcoQ3LllwQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" nullthrows "^1.1.1" posthtml "^0.11.3" posthtml-parser "^0.4.1" posthtml-render "^1.1.5" semver "^5.4.1" -"@parcel/transformer-pug@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/transformer-pug/-/transformer-pug-2.0.0-nightly.448.tgz#2991434b5ca082aa1738ba3d86e6c96ae04f9bfb" - integrity sha512-+Tzkd3tnwVoXAWD/ZV58nhBe8c5GuDKHmPHImm1x6KSCPYVhxd3L76wS5BJfP3oxAAZqznSDl61nl7rpDnAlfg== +"@parcel/transformer-pug@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-pug/-/transformer-pug-2.0.0-nightly.449.tgz#cdafcb2be4bf3726d8958ff630a93b6b4b804457" + integrity sha512-gxCUN5CM88DpEfo7w9/Rihs93vNAFkeb7kjFSLxVdMWdm7rRc0OBuwBGSkihOZpqalF7r6BVxmE+wEJUp775kQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" -"@parcel/transformer-raw@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/transformer-raw/-/transformer-raw-2.0.0-nightly.448.tgz#01e08d920564c82113e18c528e1194f0c16c2181" - integrity sha512-8O8O09UMMelrwe5Lu95u/6xBVrQcrjQmb/Twahjx7hmkd3Q0/AA8MlnGiE26Yyt8fxeL8lVniGaJdRTIaesZrg== +"@parcel/transformer-raw@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-raw/-/transformer-raw-2.0.0-nightly.449.tgz#bd7af800b97d7ea45771ff8a0662d51b2e93f736" + integrity sha512-batlnjTd3Nda40r8aWwMjlB6z2I5OHjHHpXcNj12DPJO3amUN/4PU0banRK0WZ6FV8ab7hUnNsQLiC+GGKmW7w== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" -"@parcel/transformer-react-refresh-babel@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-babel/-/transformer-react-refresh-babel-2.0.0-nightly.448.tgz#12ad681cf7679a8f0927a6ed1a55b873a72bd625" - integrity sha512-OwGSYDIHbvzsLG67jOqv1leglXaPqUAHSVU0JbNQGHxZYX6RdKbCLhr1wOEhWn4J+ja8+8uuC1gAdKf8h5nT2g== +"@parcel/transformer-react-refresh-babel@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-babel/-/transformer-react-refresh-babel-2.0.0-nightly.449.tgz#53bc3896bc88777115421b8f9dbd0c928493f153" + integrity sha512-qrBbT9jiUsAlEw7Q4qLgPmu7Qx8mc1YONarP06bC3hBv7fDE6nY40++mIpb9kxTwev9/CP0uYKBRyD3LrFk38w== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" react-refresh "^0.9.0" -"@parcel/transformer-react-refresh-wrap@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.0.0-nightly.448.tgz#b4e627df0c9c4e61398cda9e10fc574b20185c4b" - integrity sha512-zwV372zAOK3gakOtwkotCUaBi0WoZaDcxZmNaImcjcXh8CzLMtGypV+i6XesvLrUygeiLnyhrUoJfIJL6+2Klg== +"@parcel/transformer-react-refresh-wrap@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.0.0-nightly.449.tgz#4505f39499140bef21b9d2c9cf4cd8227f7591dd" + integrity sha512-3EwT7VFuWCB3qs4CaVEjw1y3vrMzNUFUYech5VZ673SP5tpOKg12+LOfJ3goEdhOZ8qvsknJhxOhpJzR/anbNQ== dependencies: "@babel/generator" "^7.0.0" "@babel/parser" "^7.0.0" "@babel/template" "^7.4.0" "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2070+61001140" - "@parcel/plugin" "2.0.0-nightly.448+61001140" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/babel-ast-utils" "2.0.0-nightly.2071+837d1fbd" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" react-refresh "^0.9.0" semver "^5.4.1" -"@parcel/transformer-sass@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sass/-/transformer-sass-2.0.0-nightly.448.tgz#ff8bd034bc82f95fe960fab0247ae1a9d0129f13" - integrity sha512-s5E3Zv2GKjAF2sRdtw/0RxcS5xEcdVeAOaR5D7OEvq6QzAC5nldAOHtjV89wm9Ahp63liWsbb66x13njTWbKpQ== +"@parcel/transformer-sass@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-sass/-/transformer-sass-2.0.0-nightly.449.tgz#6a5e6f3c0b77e5db1ce8665fda07687373f6b586" + integrity sha512-vxAGmRUu8/AvH2WXF43q2gwFJajitx/UM+Rz42cl/YNUJanzlYZpqLSg4rPjiWIO1h8pY5atC7x4XbrNDOY/BA== dependencies: - "@parcel/fs" "2.0.0-nightly.448+61001140" - "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/fs" "2.0.0-nightly.449+837d1fbd" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" -"@parcel/transformer-stylus@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/transformer-stylus/-/transformer-stylus-2.0.0-nightly.448.tgz#2e195338c6573f02f25b20c00186fe78096527c5" - integrity sha512-1XEj/0Y5GyhwFbSTva/HKjgYRwmBrjNhUMs/IcIutOsCjlU6+p0ebO0LpKIc1aZkme13ja50/LLmb+jKh8abGQ== +"@parcel/transformer-stylus@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-stylus/-/transformer-stylus-2.0.0-nightly.449.tgz#8c30eb821c59360e2901688993a423726f496518" + integrity sha512-MJimqbrHvGlkh1gKu9xoMKhi2Boztm3Hc75h68wBWVqTc+OmBHGl8eftpCNFvBgbMaTjhTDLY+GkOODi9Xe9NA== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" -"@parcel/transformer-sugarss@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sugarss/-/transformer-sugarss-2.0.0-nightly.448.tgz#f3d18ffd99c0301d70454aad2f9174964e859700" - integrity sha512-a7Qtj3Jak/hPc1c+zirN16Gh6BATI/qLyGRs8/0UpTjNfnJ/Bj1Mb4Lu8pu6t2vwwK4BM+kscaxeTAOS5QiSrg== +"@parcel/transformer-sugarss@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-sugarss/-/transformer-sugarss-2.0.0-nightly.449.tgz#5e577e3c6cb155ad3402e8366d50dcef35f71e6c" + integrity sha512-ccDVMSh5cvdHKT5lp2KKE+vyeqiRqQaVoBwW5S1QhVaAW7op/dHzhxCxA08SDQLaT/G5FzQC4lFGPfsTkeRQwA== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" postcss "^8.0.5" -"@parcel/transformer-toml@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/transformer-toml/-/transformer-toml-2.0.0-nightly.448.tgz#cb1a96f75f251876ef134c68960cfdb65ae34814" - integrity sha512-FBv3LYCJ0SObDOM73BJ75axtQOrm4PoqwBHRjsVwi1h4JUbkdp0ySPOmf4fEVShz8HYUaWO5zJVe9nC7jT1E8g== +"@parcel/transformer-toml@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-toml/-/transformer-toml-2.0.0-nightly.449.tgz#0141bedbc6746e702b31e3a64efc59bc211261a1" + integrity sha512-vDevoB6UP72FaoD6YybBbm8mVl8CVQFSS2Ef1XPHWWip0nYpWUA9CBnx7h7FRy4kvIzKU/Wq/Tn2W6gfySDjAQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" -"@parcel/transformer-typescript-types@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.0.0-nightly.448.tgz#fddbf25a5b55056e7e1e3036624dab3474288628" - integrity sha512-rX9uIPDTC4xJqwNKo1MQTX7p6DumCGo6vaYXxE3ZIneTgHgBfbGyNoC9Kn8tNosptZ3HHmoyp4vjZNcovGS2LA== +"@parcel/transformer-typescript-types@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.0.0-nightly.449.tgz#254f735f17c302141ee5e710e55ecf1adc9ac025" + integrity sha512-9jMcRXJ13bMiRg7R3DgPkVNVr6uLjoBkOr33OX6Aat0o9ep8wFKalG1UbDHjLnTmISBsG3FJm9v+qKyQyzwHmQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/ts-utils" "2.0.0-nightly.448+61001140" + "@parcel/ts-utils" "2.0.0-nightly.449+837d1fbd" nullthrows "^1.1.1" -"@parcel/transformer-vue@2.0.0-nightly.2070+61001140": - version "2.0.0-nightly.2070" - resolved "https://registry.yarnpkg.com/@parcel/transformer-vue/-/transformer-vue-2.0.0-nightly.2070.tgz#e707a838f05493f7cbb9912c83b7e711363cb59c" - integrity sha512-gpSh/ucbw5bHrqW69rvdCvWA9o5Bixed9/KPhXoFf15Gn/bAZ65QE+omBrfSkiTVbHl5dJvXR/Yq+539PM+tyQ== +"@parcel/transformer-vue@2.0.0-nightly.2071+837d1fbd": + version "2.0.0-nightly.2071" + resolved "https://registry.yarnpkg.com/@parcel/transformer-vue/-/transformer-vue-2.0.0-nightly.2071.tgz#37e4c6eb1bfb3af35d66bf9583c93deb32d97577" + integrity sha512-y2yzc8u//WyA9u/I0HNt9Dv4YueXWhTntNkL/TKuB+S4RaZyetUepQqEvUv0JWgzqbuj5XxXWZ5Lk74bNMHQVg== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.448+61001140" - "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-yaml@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/transformer-yaml/-/transformer-yaml-2.0.0-nightly.448.tgz#9886798f6b3193091d5f7276fac703f7bf736b08" - integrity sha512-MfNDX5e1n3b2NaGly0pO5RjttOKP/pkJJHNJRE2RlEAUOagxQSxqK3xUeLua8bSV6KFnP4NYeCeds4YxGGkB8w== +"@parcel/transformer-yaml@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-yaml/-/transformer-yaml-2.0.0-nightly.449.tgz#7ee792f2fca24d1c7591b63e225296a046d80caa" + integrity sha512-n1GNhTXWPOvOoG3QGP1TXRGlbcOmyihkJH8hC73F4COvWxLzE3RgkB+nCBy34KgBO+yzFMeMzNpmIcg9HnMezQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.448+61001140" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" -"@parcel/ts-utils@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/ts-utils/-/ts-utils-2.0.0-nightly.448.tgz#e3e5c69725efe5f94813420676e6e2f36fd18165" - integrity sha512-cWXI9pTAVlnXm65LzWk1IfVTZzgbq+qramWqdmfxVEYiR3dZd3RwC4/AYz5yxJMJNrWYFSnuu82BO0ilcOnDww== +"@parcel/ts-utils@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/ts-utils/-/ts-utils-2.0.0-nightly.449.tgz#1585e2e1a0c7a483936347cac5fc7f4c60c73e8d" + integrity sha512-jk/VoHAln8F6Q/qDSKosOPbxUwhJJw2dRptm3Zn0kznWXceWE8EYDmjzRB1JAUCjxJ5ux0n1EYjm+UcmwhbIbA== dependencies: nullthrows "^1.1.1" -"@parcel/types@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/types/-/types-2.0.0-nightly.448.tgz#67e48bb912a57f43e1a2e6d89b840e8994c7d63c" - integrity sha512-AynPc+Up7eOJZxvwcANbJjzyTkgfXRmvuwE1nOLNuupV0wUi53RHf3+ibw/Vd/FZSW918IJgcHc3bXtp31OmJQ== +"@parcel/types@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/types/-/types-2.0.0-nightly.449.tgz#549346dc2451927d5ad934a1179f031aadffebef" + integrity sha512-v4cpFFQtz5nUpsDxU+VsIPNlW1cV7pExYiv/oijAGH6S3XbY8GJ2XPX8lUHCH4Y6+WWQtnp3NJJCWzRtx4zEtA== -"@parcel/utils@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-2.0.0-nightly.448.tgz#c1f21fc92f681da530ec3fb778cc1cb8432bda17" - integrity sha512-MrdjG8zTidg0YkgBCbsk7z74agA1TY2FTXNqMWAH1mPvMePsn3Cz5Xwt131JtOrul5we/HZszObRz/S5rb+pag== +"@parcel/utils@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-2.0.0-nightly.449.tgz#575b88501650ce0ce1e3d34a5fc4e5bba3948471" + integrity sha512-eZn5+QV4BsNq9tEK4pylVJVNS8iH7xTKZIXssvM1i2dVLzpkjlRnky8PazLOyfk2ZkqwY73UvQ7Ltsq+MIEHYg== dependencies: "@iarna/toml" "^2.2.0" - "@parcel/codeframe" "2.0.0-nightly.448+61001140" - "@parcel/diagnostic" "2.0.0-nightly.448+61001140" - "@parcel/logger" "2.0.0-nightly.448+61001140" - "@parcel/markdown-ansi" "2.0.0-nightly.448+61001140" + "@parcel/codeframe" "2.0.0-nightly.449+837d1fbd" + "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" + "@parcel/logger" "2.0.0-nightly.449+837d1fbd" + "@parcel/markdown-ansi" "2.0.0-nightly.449+837d1fbd" "@parcel/source-map" "2.0.0-alpha.4.16" ansi-html "^0.0.7" chalk "^2.4.2" @@ -2932,14 +2932,14 @@ node-addon-api "^3.0.0" node-gyp-build "^4.2.1" -"@parcel/workers@2.0.0-nightly.448+61001140": - version "2.0.0-nightly.448" - resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-2.0.0-nightly.448.tgz#4a202add2214dc7468dcf313d8cdc760b1c1479b" - integrity sha512-lOiRhUW+B2hA6bZeoNOKPASgKj97+w50o0yZk03i1C9ohIHLhC8u2L2Ze/KqII8cjrVcK+skUfvNZ6UbZ+V3Cw== +"@parcel/workers@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-2.0.0-nightly.449.tgz#d9cf498864cf263abdcf53ddac21cf2f6f830327" + integrity sha512-d0+z/JhsCwRrKns5KvDkZg0UiLbLWvnrMT1Rw+N2bE3FdHlUlgckbOPUGFAM0LStaFartC3nsXnBwbSou1BKQg== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.448+61001140" - "@parcel/logger" "2.0.0-nightly.448+61001140" - "@parcel/utils" "2.0.0-nightly.448+61001140" + "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" + "@parcel/logger" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" chrome-trace-event "^1.0.2" nullthrows "^1.1.1" @@ -10587,19 +10587,19 @@ parallel-transform@^1.1.0: inherits "^2.0.3" readable-stream "^2.1.5" -parcel@2.0.0-nightly.446: - version "2.0.0-nightly.446" - resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.0.0-nightly.446.tgz#e40357f1e4a575b528c9497000c0a32d2c557590" - integrity sha512-EJIzoudyOn2KafmgcuSFQnqzKLWnQR/tpjdf7+E+vhu9Mwvu1X+fYmsGA7OAGRVWCx18dKwHCrgSDj0GQBpMbA== - dependencies: - "@parcel/config-default" "2.0.0-nightly.448+61001140" - "@parcel/core" "2.0.0-nightly.446+61001140" - "@parcel/diagnostic" "2.0.0-nightly.448+61001140" - "@parcel/events" "2.0.0-nightly.448+61001140" - "@parcel/fs" "2.0.0-nightly.448+61001140" - "@parcel/logger" "2.0.0-nightly.448+61001140" - "@parcel/package-manager" "2.0.0-nightly.448+61001140" - "@parcel/utils" "2.0.0-nightly.448+61001140" +parcel@2.0.0-nightly.447: + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.0.0-nightly.447.tgz#325e4f3797fe68d2e416ddfb9acbe80e818130a9" + integrity sha512-ZxUeUq+fudKskOXEpKKQCWgFRT1Y8b28AGes1Cd2uSgiioM5zhXC/5Jlu0W2QFTrPzt2TrUlU9ioFPV04T9Pgw== + dependencies: + "@parcel/config-default" "2.0.0-nightly.449+837d1fbd" + "@parcel/core" "2.0.0-nightly.447+837d1fbd" + "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" + "@parcel/events" "2.0.0-nightly.449+837d1fbd" + "@parcel/fs" "2.0.0-nightly.449+837d1fbd" + "@parcel/logger" "2.0.0-nightly.449+837d1fbd" + "@parcel/package-manager" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" chalk "^2.1.0" commander "^2.19.0" get-port "^4.2.0" From 2ca31a87a8cbf0c5267b3d3b39c8dc75b142488e Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Sun, 15 Nov 2020 09:13:51 +0100 Subject: [PATCH 139/314] fix(pipelines): synthesizes incorrect paths on Windows (#11464) Pipelines generates path references based on the local system's file tree, and uses `path.join()` (etc) to build those. On a Windows machine, those would use a `\\` as a path separator, but the path separator for CodePipeline and the Linux CodeBuild image we use should be a `/`. Translate them. Fixes #11359, fixes #11405, fixes #11424. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../lib/actions/deploy-cdk-stack-action.ts | 5 +++-- packages/@aws-cdk/pipelines/lib/private/fs.ts | 14 ++++++++++++++ .../pipelines/lib/synths/simple-synth-action.ts | 5 +++-- packages/@aws-cdk/pipelines/test/fs.test.ts | 11 +++++++++++ 4 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 packages/@aws-cdk/pipelines/lib/private/fs.ts create mode 100644 packages/@aws-cdk/pipelines/test/fs.test.ts diff --git a/packages/@aws-cdk/pipelines/lib/actions/deploy-cdk-stack-action.ts b/packages/@aws-cdk/pipelines/lib/actions/deploy-cdk-stack-action.ts index b491c9698e7a0..9fe520112931f 100644 --- a/packages/@aws-cdk/pipelines/lib/actions/deploy-cdk-stack-action.ts +++ b/packages/@aws-cdk/pipelines/lib/actions/deploy-cdk-stack-action.ts @@ -9,6 +9,7 @@ import { Aws, Stack } from '@aws-cdk/core'; import * as cxapi from '@aws-cdk/cx-api'; import { Construct, Node } from 'constructs'; import { appOf, assemblyBuilderOf } from '../private/construct-internals'; +import { toPosixPath } from '../private/fs'; // v2 - keep this import as a separate section to reduce merge conflict when forward merging with the v2 branch. // eslint-disable-next-line @@ -186,8 +187,8 @@ export class DeployCdkStackAction implements codepipeline.IAction { return new DeployCdkStackAction({ actionRole, cloudFormationExecutionRole, - templatePath: path.relative(appAsmRoot, fullTemplatePath), - templateConfigurationPath: fullConfigPath ? path.relative(appAsmRoot, fullConfigPath) : undefined, + templatePath: toPosixPath(path.relative(appAsmRoot, fullTemplatePath)), + templateConfigurationPath: fullConfigPath ? toPosixPath(path.relative(appAsmRoot, fullConfigPath)) : undefined, region, stackArtifactId: artifact.id, dependencyStackArtifactIds: artifact.dependencies.filter(isStackArtifact).map(s => s.id), diff --git a/packages/@aws-cdk/pipelines/lib/private/fs.ts b/packages/@aws-cdk/pipelines/lib/private/fs.ts new file mode 100644 index 0000000000000..b5f861a4abc76 --- /dev/null +++ b/packages/@aws-cdk/pipelines/lib/private/fs.ts @@ -0,0 +1,14 @@ +import * as path from 'path'; + +/** + * Convert a file path on the current system to a file path that can be used on Linux + * + * Takes the current OS' file separator and replaces all of them with a '/'. + * + * Relevant if the current system is a Windows machine but is generating + * commands for a Linux CodeBuild image. + */ +export function toPosixPath(osPath: string, currentSep?: string) { + const regex = new RegExp(`\\${currentSep ?? path.sep}`, 'g'); + return osPath.replace(regex, '/'); +} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/lib/synths/simple-synth-action.ts b/packages/@aws-cdk/pipelines/lib/synths/simple-synth-action.ts index 8365a3404e120..d04408b9175cd 100644 --- a/packages/@aws-cdk/pipelines/lib/synths/simple-synth-action.ts +++ b/packages/@aws-cdk/pipelines/lib/synths/simple-synth-action.ts @@ -8,6 +8,7 @@ import * as events from '@aws-cdk/aws-events'; import * as iam from '@aws-cdk/aws-iam'; import { Construct, Stack } from '@aws-cdk/core'; import { cloudAssemblyBuildSpecDir } from '../private/construct-internals'; +import { toPosixPath } from '../private/fs'; import { copyEnvironmentVariables, filterEmpty } from './_util'; /** @@ -373,7 +374,7 @@ export class SimpleSynthAction implements codepipeline.IAction, iam.IGrantable { // using secondary artifacts or not. const cloudAsmArtifactSpec = { - 'base-directory': path.join(self.props.subdirectory ?? '.', cloudAssemblyBuildSpecDir(scope)), + 'base-directory': toPosixPath(path.join(self.props.subdirectory ?? '.', cloudAssemblyBuildSpecDir(scope))), 'files': '**/*', }; @@ -388,7 +389,7 @@ export class SimpleSynthAction implements codepipeline.IAction, iam.IGrantable { throw new Error('You must give the output artifact a name'); } secondary[art.artifact.artifactName] = { - 'base-directory': path.join(self.props.subdirectory ?? '.', art.directory), + 'base-directory': toPosixPath(path.join(self.props.subdirectory ?? '.', art.directory)), 'files': '**/*', }; }); diff --git a/packages/@aws-cdk/pipelines/test/fs.test.ts b/packages/@aws-cdk/pipelines/test/fs.test.ts new file mode 100644 index 0000000000000..49cbe2458e64a --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/fs.test.ts @@ -0,0 +1,11 @@ +import * as path from 'path'; +import { toPosixPath } from '../lib/private/fs'; + +test('translate path.sep', () => { + expect(toPosixPath(`a${path.sep}b${path.sep}c`)).toEqual('a/b/c'); +}); + +test('windows path to posix path', () => { + const winPath = path.win32.join('a', 'b', 'c'); + expect(toPosixPath(winPath, path.win32.sep)).toEqual('a/b/c'); +}); \ No newline at end of file From b722f087af64621ddff5ecb3b38982b7ccfe964a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 15 Nov 2020 19:34:04 +0000 Subject: [PATCH 140/314] chore(deps): bump yargs from 16.1.0 to 16.1.1 (#11485) Bumps [yargs](https://github.com/yargs/yargs) from 16.1.0 to 16.1.1. - [Release notes](https://github.com/yargs/yargs/releases) - [Changelog](https://github.com/yargs/yargs/blob/master/CHANGELOG.md) - [Commits](https://github.com/yargs/yargs/compare/v16.1.0...v16.1.1) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/aws-cdk/package.json | 2 +- packages/awslint/package.json | 2 +- packages/cdk-assets/package.json | 2 +- packages/decdk/package.json | 2 +- tools/cdk-build-tools/package.json | 2 +- tools/cdk-integ-tools/package.json | 2 +- tools/cfn2ts/package.json | 2 +- tools/pkglint/package.json | 2 +- tools/pkgtools/package.json | 2 +- yarn.lock | 18 +++++++++--------- 10 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 1a4edb29ad992..2e8e5beea9f3d 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -87,7 +87,7 @@ "table": "^6.0.3", "uuid": "^8.3.1", "wrap-ansi": "^7.0.0", - "yargs": "^16.1.0" + "yargs": "^16.1.1" }, "repository": { "url": "https://github.com/aws/aws-cdk.git", diff --git a/packages/awslint/package.json b/packages/awslint/package.json index abe3c5a357ca1..393013289819a 100644 --- a/packages/awslint/package.json +++ b/packages/awslint/package.json @@ -21,7 +21,7 @@ "colors": "^1.4.0", "fs-extra": "^9.0.1", "jsii-reflect": "^1.14.1", - "yargs": "^16.1.0" + "yargs": "^16.1.1" }, "devDependencies": { "@types/fs-extra": "^8.1.1", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index f42f0673a35a6..52aadabc11688 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -49,7 +49,7 @@ "archiver": "^5.0.2", "aws-sdk": "^2.792.0", "glob": "^7.1.6", - "yargs": "^16.1.0" + "yargs": "^16.1.1" }, "repository": { "url": "https://github.com/aws/aws-cdk.git", diff --git a/packages/decdk/package.json b/packages/decdk/package.json index adc9732761f1f..29d9c38d5bedf 100644 --- a/packages/decdk/package.json +++ b/packages/decdk/package.json @@ -196,7 +196,7 @@ "jsii-reflect": "^1.14.1", "jsonschema": "^1.4.0", "yaml": "1.10.0", - "yargs": "^16.1.0" + "yargs": "^16.1.1" }, "devDependencies": { "@types/fs-extra": "^8.1.1", diff --git a/tools/cdk-build-tools/package.json b/tools/cdk-build-tools/package.json index 5877dba95bcef..65ced771af1aa 100644 --- a/tools/cdk-build-tools/package.json +++ b/tools/cdk-build-tools/package.json @@ -56,7 +56,7 @@ "nyc": "^15.1.0", "ts-jest": "^26.4.4", "typescript": "~3.9.7", - "yargs": "^16.1.0", + "yargs": "^16.1.1", "yarn-cling": "0.0.0" }, "keywords": [ diff --git a/tools/cdk-integ-tools/package.json b/tools/cdk-integ-tools/package.json index 6237634e6be3d..fae89fa59d2a9 100644 --- a/tools/cdk-integ-tools/package.json +++ b/tools/cdk-integ-tools/package.json @@ -40,7 +40,7 @@ "@aws-cdk/assert": "0.0.0", "aws-cdk": "0.0.0", "fs-extra": "^9.0.1", - "yargs": "^16.1.0" + "yargs": "^16.1.1" }, "keywords": [ "aws", diff --git a/tools/cfn2ts/package.json b/tools/cfn2ts/package.json index 7ef2c7f940205..6343ce98a7de5 100644 --- a/tools/cfn2ts/package.json +++ b/tools/cfn2ts/package.json @@ -33,7 +33,7 @@ "codemaker": "^1.14.1", "fast-json-patch": "^3.0.0-1", "fs-extra": "^9.0.1", - "yargs": "^16.1.0" + "yargs": "^16.1.1" }, "devDependencies": { "@types/fs-extra": "^8.1.1", diff --git a/tools/pkglint/package.json b/tools/pkglint/package.json index e3b87b2a29d28..4c387a03ea16d 100644 --- a/tools/pkglint/package.json +++ b/tools/pkglint/package.json @@ -49,6 +49,6 @@ "glob": "^7.1.6", "npm-bundled": "^1.1.1", "semver": "^7.3.2", - "yargs": "^16.1.0" + "yargs": "^16.1.1" } } diff --git a/tools/pkgtools/package.json b/tools/pkgtools/package.json index 0337051d556fb..278d8531c2375 100644 --- a/tools/pkgtools/package.json +++ b/tools/pkgtools/package.json @@ -36,7 +36,7 @@ }, "dependencies": { "fs-extra": "^9.0.1", - "yargs": "^16.1.0" + "yargs": "^16.1.1" }, "keywords": [ "aws", diff --git a/yarn.lock b/yarn.lock index 9e50ce03d754b..9e859c0963d8d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14094,10 +14094,10 @@ y18n@^4.0.0: resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== -y18n@^5.0.2: - version "5.0.4" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.4.tgz#0ab2db89dd5873b5ec4682d8e703e833373ea897" - integrity sha512-deLOfD+RvFgrpAmSZgfGdWYE+OKyHcVHaRQ7NphG/63scpRvTHHeQMAxGGvaLVGJ+HYVcCXlzcTK0ZehFf+eHQ== +y18n@^5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.5.tgz#8769ec08d03b1ea2df2500acef561743bbb9ab18" + integrity sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg== yallist@^2.1.2: version "2.1.2" @@ -14208,17 +14208,17 @@ yargs@^15.0.2, yargs@^15.3.1, yargs@^15.4.1: y18n "^4.0.0" yargs-parser "^18.1.2" -yargs@^16.0.3, yargs@^16.1.0: - version "16.1.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.1.0.tgz#fc333fe4791660eace5a894b39d42f851cd48f2a" - integrity sha512-upWFJOmDdHN0syLuESuvXDmrRcWd1QafJolHskzaw79uZa7/x53gxQKiR07W59GWY1tFhhU/Th9DrtSfpS782g== +yargs@^16.0.3, yargs@^16.1.0, yargs@^16.1.1: + version "16.1.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.1.1.tgz#5a4a095bd1ca806b0a50d0c03611d38034d219a1" + integrity sha512-hAD1RcFP/wfgfxgMVswPE+z3tlPFtxG8/yWUrG2i17sTWGCGqWnxKcLTF4cUKDUK8fzokwsmO9H0TDkRbMHy8w== dependencies: cliui "^7.0.2" escalade "^3.1.1" get-caller-file "^2.0.5" require-directory "^2.1.1" string-width "^4.2.0" - y18n "^5.0.2" + y18n "^5.0.5" yargs-parser "^20.2.2" yn@3.1.1: From 4768c4411b6ad334abdfc310dd754c9d5fe1c7e3 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 15 Nov 2020 21:21:28 +0000 Subject: [PATCH 141/314] chore(deps-dev): bump fast-check from 2.6.1 to 2.7.0 (#11486) Bumps [fast-check](https://github.com/dubzzz/fast-check) from 2.6.1 to 2.7.0. - [Release notes](https://github.com/dubzzz/fast-check/releases) - [Changelog](https://github.com/dubzzz/fast-check/blob/master/CHANGELOG.md) - [Commits](https://github.com/dubzzz/fast-check/compare/v2.6.1...v2.7.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/app-delivery/package.json | 2 +- .../aws-applicationautoscaling/package.json | 2 +- .../aws-autoscaling-common/package.json | 2 +- .../@aws-cdk/cloudformation-diff/package.json | 2 +- packages/@aws-cdk/core/package.json | 2 +- yarn.lock | 18 +++++++++--------- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/@aws-cdk/app-delivery/package.json b/packages/@aws-cdk/app-delivery/package.json index e0a95c03879eb..d860fe435fd24 100644 --- a/packages/@aws-cdk/app-delivery/package.json +++ b/packages/@aws-cdk/app-delivery/package.json @@ -63,7 +63,7 @@ "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "fast-check": "^2.6.1", + "fast-check": "^2.7.0", "nodeunit": "^0.11.3", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/aws-applicationautoscaling/package.json b/packages/@aws-cdk/aws-applicationautoscaling/package.json index 3072fda41400d..39693f2db0d30 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/package.json +++ b/packages/@aws-cdk/aws-applicationautoscaling/package.json @@ -75,7 +75,7 @@ "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", - "fast-check": "^2.6.1", + "fast-check": "^2.7.0", "nodeunit": "^0.11.3", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/aws-autoscaling-common/package.json b/packages/@aws-cdk/aws-autoscaling-common/package.json index 805460b6ef2ba..aa66b53be704c 100644 --- a/packages/@aws-cdk/aws-autoscaling-common/package.json +++ b/packages/@aws-cdk/aws-autoscaling-common/package.json @@ -67,7 +67,7 @@ "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "fast-check": "^2.6.1", + "fast-check": "^2.7.0", "nodeunit": "^0.11.3", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/cloudformation-diff/package.json b/packages/@aws-cdk/cloudformation-diff/package.json index 2fb02810b2182..e465c8aa10595 100644 --- a/packages/@aws-cdk/cloudformation-diff/package.json +++ b/packages/@aws-cdk/cloudformation-diff/package.json @@ -33,7 +33,7 @@ "@types/string-width": "^4.0.1", "@types/table": "^5.0.0", "cdk-build-tools": "0.0.0", - "fast-check": "^2.6.1", + "fast-check": "^2.7.0", "jest": "^26.6.3", "pkglint": "0.0.0", "ts-jest": "^26.4.4" diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json index c673193b26427..3dec43079144e 100644 --- a/packages/@aws-cdk/core/package.json +++ b/packages/@aws-cdk/core/package.json @@ -174,7 +174,7 @@ "@types/sinon": "^9.0.8", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", - "fast-check": "^2.6.1", + "fast-check": "^2.7.0", "lodash": "^4.17.20", "nodeunit-shim": "0.0.0", "pkglint": "0.0.0", diff --git a/yarn.lock b/yarn.lock index 9e859c0963d8d..529eef937524c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6550,12 +6550,12 @@ extsprintf@^1.2.0: resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= -fast-check@^2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-2.6.1.tgz#c9ff58b69c2eee872588985d8b93424c84359a6e" - integrity sha512-CauHEKfAjgAFpNDpFqSccu7C5kOlifCNfRxMjzY76MaAaH7ddkqqEzRE2Vm5bjpHJpndD0iVXiZC+d1rYzv5qg== +fast-check@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-2.7.0.tgz#d935243a43bc5e8ac4724ee2cb6c109533e8fd85" + integrity sha512-+frnWpxp43Egnx2wuqRVrbHj1YXpHRwLle6lhKJODnu7uH0krGjNRlUo+1oioKULA5jgQ6I6ctTrqFuaw4gZFA== dependencies: - pure-rand "^3.0.0" + pure-rand "^4.0.0" fast-deep-equal@^2.0.1: version "2.0.1" @@ -11472,10 +11472,10 @@ punycode@^2.0.0, punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -pure-rand@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-3.1.0.tgz#646b812635cbac86105c46b0b03aa5dac1c759b3" - integrity sha512-xkCSMNjEnLG/A8iTH9M5ayXN4SCWRP+ih3rxi09Q7Fu0b9jAP6V9H59pOtcB37IsVt3eHxf1FMy9n7YrqdDdSA== +pure-rand@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-4.0.0.tgz#df8f44bc1b82c4f3d0e245e8f7ced6f09c1e9dc4" + integrity sha512-5+HGyGi+6VygEcP1O4jMj0c5HyFgsP9lEy2uA4c+KBq84y21hpmv85wAzPZ/H+q1TUbP3mIMZhqFg08/HAOUqw== purgecss@^2.3.0: version "2.3.0" From a4a555a9f5e8844a377d8de5041219346d0eb65c Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Mon, 16 Nov 2020 10:47:13 +0100 Subject: [PATCH 142/314] fix(core): missing context in Stages is not filled by CLI (#11461) Missing context in Stages was reported at the inner-assembly level. Since the CLI only inspects the top-level assembly for missing context, it would never detect this and not query for it. Propagate the missing context up to the top-level assembly. Fixes #9226. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/core/test/stage.test.ts | 35 +++++++++++++++++++ .../@aws-cdk/cx-api/lib/cloud-assembly.ts | 12 +++++++ .../test/cloud-assembly-builder.test.ts | 22 ++++++++++++ 3 files changed, 69 insertions(+) diff --git a/packages/@aws-cdk/core/test/stage.test.ts b/packages/@aws-cdk/core/test/stage.test.ts index 8a4b27a4d412a..897b3513d6163 100644 --- a/packages/@aws-cdk/core/test/stage.test.ts +++ b/packages/@aws-cdk/core/test/stage.test.ts @@ -1,3 +1,4 @@ +import * as cxschema from '@aws-cdk/cloud-assembly-schema'; import * as cxapi from '@aws-cdk/cx-api'; import { nodeunitShim, Test } from 'nodeunit-shim'; import { App, CfnResource, Construct, IAspect, IConstruct, Stack, Stage, Aspects } from '../lib'; @@ -311,6 +312,40 @@ nodeunitShim({ }, }); +test('missing context in Stages is propagated up to root assembly', () => { + // GIVEN + const app = new App(); + const stage = new Stage(app, 'Stage', { + env: { account: 'account', region: 'region' }, + }); + const stack = new Stack(stage, 'Stack'); + new CfnResource(stack, 'Resource', { type: 'Something' }); + + // WHEN + stack.reportMissingContext({ + key: 'missing-context-key', + provider: cxschema.ContextProvider.AVAILABILITY_ZONE_PROVIDER, + props: { + account: 'account', + region: 'region', + }, + }); + + // THEN + const assembly = app.synth(); + + expect(assembly.manifest.missing).toEqual([ + { + key: 'missing-context-key', + provider: cxschema.ContextProvider.AVAILABILITY_ZONE_PROVIDER, + props: { + account: 'account', + region: 'region', + }, + }, + ]); +}); + class TouchingAspect implements IAspect { public readonly visits = new Array(); public visit(node: IConstruct): void { diff --git a/packages/@aws-cdk/cx-api/lib/cloud-assembly.ts b/packages/@aws-cdk/cx-api/lib/cloud-assembly.ts index df947f379ab46..53fafe3d37049 100644 --- a/packages/@aws-cdk/cx-api/lib/cloud-assembly.ts +++ b/packages/@aws-cdk/cx-api/lib/cloud-assembly.ts @@ -219,6 +219,13 @@ export interface CloudAssemblyBuilderProps { * @default - Same as the manifest outdir */ readonly assetOutdir?: string; + + /** + * If this builder is for a nested assembly, the parent assembly builder + * + * @default - This is a root assembly + */ + readonly parentBuilder?: CloudAssemblyBuilder; } /** @@ -237,6 +244,7 @@ export class CloudAssemblyBuilder { private readonly artifacts: { [id: string]: cxschema.ArtifactManifest } = { }; private readonly missing = new Array(); + private readonly parentBuilder?: CloudAssemblyBuilder; /** * Initializes a cloud assembly builder. @@ -245,6 +253,7 @@ export class CloudAssemblyBuilder { constructor(outdir?: string, props: CloudAssemblyBuilderProps = {}) { this.outdir = determineOutputDirectory(outdir); this.assetOutdir = props.assetOutdir ?? this.outdir; + this.parentBuilder = props.parentBuilder; // we leverage the fact that outdir is long-lived to avoid staging assets into it // that were already staged (copying can be expensive). this is achieved by the fact @@ -270,6 +279,8 @@ export class CloudAssemblyBuilder { if (this.missing.every(m => m.key !== missing.key)) { this.missing.push(missing); } + // Also report in parent + this.parentBuilder?.addMissing(missing); } /** @@ -320,6 +331,7 @@ export class CloudAssemblyBuilder { return new CloudAssemblyBuilder(innerAsmDir, { // Reuse the same asset output directory as the current Casm builder assetOutdir: this.assetOutdir, + parentBuilder: this, }); } } diff --git a/packages/@aws-cdk/cx-api/test/cloud-assembly-builder.test.ts b/packages/@aws-cdk/cx-api/test/cloud-assembly-builder.test.ts index fb7ad4d71a407..13b81c572a126 100644 --- a/packages/@aws-cdk/cx-api/test/cloud-assembly-builder.test.ts +++ b/packages/@aws-cdk/cx-api/test/cloud-assembly-builder.test.ts @@ -174,6 +174,28 @@ test('write and read nested cloud assembly artifact', () => { expect(nested?.artifacts.length).toEqual(0); }); +test('missing values are reported to top-level asm', () => { + // GIVEN + const outdir = fs.mkdtempSync(path.join(os.tmpdir(), 'cloud-assembly-builder-tests')); + const session = new cxapi.CloudAssemblyBuilder(outdir); + + const innerAsm = session.createNestedAssembly('hello', 'hello'); + + // WHEN + const props: cxschema.ContextQueryProperties = { + account: '1234', + region: 'asdf', + filter: { a: 'a' }, + }; + + innerAsm.addMissing({ key: 'foo', provider: cxschema.ContextProvider.VPC_PROVIDER, props }); + + // THEN + const assembly = session.buildAssembly(); + + expect(assembly.manifest.missing?.length).toEqual(1); +}); + test('artifcats are written in topological order', () => { // GIVEN const outdir = fs.mkdtempSync(path.join(os.tmpdir(), 'cloud-assembly-builder-tests')); From 715a0300ea44c7cfcb6ae9973bd4ca16585c8fa5 Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Mon, 16 Nov 2020 11:54:07 +0000 Subject: [PATCH 143/314] fix(lambda): failed to add permission to an imported lambda from another account (#11369) Originally, when a function was imported into an account agnostic stack, it was assumed that the function was from a different account and hence its permission cannot be modified. A subsequent change - 99111f72adc210f48e269db50f2b8e8b78d21252 - changed this behaviour to its opposite. When an account agnostic stack was encountered in the context of an imported function, it was assumed that the function was part of the same account. This has caused customers to report regressions - #11278, #11141. This change reverts this behaviour back to its original assumption, with the additional ability to configure this explicitly by the user if needed for an advanced use case. fixes #11141 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-lambda/lib/function-base.ts | 20 ++++++++++-- packages/@aws-cdk/aws-lambda/lib/function.ts | 2 +- .../@aws-cdk/aws-lambda/test/function.test.ts | 32 ++++++++++++++++++- 3 files changed, 49 insertions(+), 5 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda/lib/function-base.ts b/packages/@aws-cdk/aws-lambda/lib/function-base.ts index ab1012b6015bc..d02f355f0c5f3 100644 --- a/packages/@aws-cdk/aws-lambda/lib/function-base.ts +++ b/packages/@aws-cdk/aws-lambda/lib/function-base.ts @@ -149,6 +149,19 @@ export interface FunctionAttributes { * to this Lambda. */ readonly securityGroup?: ec2.ISecurityGroup; + + /** + * Setting this property informs the CDK that the imported function is in the same environment as the stack. + * This affects certain behaviours such as, whether this function's permission can be modified. + * When not configured, the CDK attempts to auto-determine this. For environment agnostic stacks, i.e., stacks + * where the account is not specified with the `env` property, this is determined to be false. + * + * Set this to property *ONLY IF* the imported function is in the same account as the stack + * it's imported in. + * @default - depends: true, if the Stack is configured with an explicit `env` (account and region) and the account is the same as this function. + * For environment-agnostic stacks this will default to `false`. + */ + readonly sameEnvironment?: boolean; } export abstract class FunctionBase extends Resource implements IFunction { @@ -301,7 +314,8 @@ export abstract class FunctionBase extends Resource implements IFunction { const permissionNode = this._functionNode().tryFindChild(identifier); if (!permissionNode) { - throw new Error('Cannot modify permission to lambda function. Function is either imported or $LATEST version.'); + throw new Error('Cannot modify permission to lambda function. Function is either imported or $LATEST version. ' + + 'If the function is imported from the same account use `fromFunctionAttributes()` API with the `allowPermissions` flag.'); } return { statementAdded: true, policyDependable: permissionNode }; }, @@ -361,13 +375,13 @@ export abstract class FunctionBase extends Resource implements IFunction { * ..which means that in order to extract the `account-id` component from the ARN, we can * split the ARN using ":" and select the component in index 4. * - * @returns true if account id of function matches this account, or the accounts are unresolved. + * @returns true if account id of function matches the account specified on the stack, false otherwise. * * @internal */ protected _isStackAccount(): boolean { if (Token.isUnresolved(this.stack.account) || Token.isUnresolved(this.functionArn)) { - return true; + return false; } return this.stack.parseArn(this.functionArn).account === this.stack.account; } diff --git a/packages/@aws-cdk/aws-lambda/lib/function.ts b/packages/@aws-cdk/aws-lambda/lib/function.ts index d44a14a3aa4f1..e2d81c064c894 100644 --- a/packages/@aws-cdk/aws-lambda/lib/function.ts +++ b/packages/@aws-cdk/aws-lambda/lib/function.ts @@ -383,7 +383,7 @@ export class Function extends FunctionBase { public readonly role = role; public readonly permissionsNode = this.node; - protected readonly canCreatePermissions = this._isStackAccount(); + protected readonly canCreatePermissions = attrs.sameEnvironment ?? this._isStackAccount(); constructor(s: Construct, i: string) { super(s, i); diff --git a/packages/@aws-cdk/aws-lambda/test/function.test.ts b/packages/@aws-cdk/aws-lambda/test/function.test.ts index 761a688762c48..038167a460423 100644 --- a/packages/@aws-cdk/aws-lambda/test/function.test.ts +++ b/packages/@aws-cdk/aws-lambda/test/function.test.ts @@ -269,6 +269,24 @@ describe('function', () => { principal: new iam.ServicePrincipal('cloudformation.amazonaws.com'), }); + // THEN + expect(stack).not.toHaveResource('AWS::Lambda::Permission'); + }); + + test('imported Function w/ unresolved account & allowPermissions set', () => { + // GIVEN + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'Imports'); + + // WHEN + const iFunc = lambda.Function.fromFunctionAttributes(stack, 'iFunc', { + functionArn: 'arn:aws:lambda:us-east-1:123456789012:function:BaseFunction', + sameEnvironment: true, // since this is false, by default, for env agnostic stacks + }); + iFunc.addPermission('iFunc', { + principal: new iam.ServicePrincipal('cloudformation.amazonaws.com'), + }); + // THEN expect(stack).toHaveResource('AWS::Lambda::Permission'); }); @@ -953,10 +971,22 @@ describe('function', () => { }); test('on an imported function (unresolved account)', () => { - // GIVEN const stack = new cdk.Stack(); const fn = lambda.Function.fromFunctionArn(stack, 'Function', 'arn:aws:lambda:us-east-1:123456789012:function:MyFn'); + expect( + () => fn.grantInvoke(new iam.ServicePrincipal('elasticloadbalancing.amazonaws.com')), + ).toThrow(/Cannot modify permission to lambda function/); + }); + + test('on an imported function (unresolved account & w/ allowPermissions)', () => { + // GIVEN + const stack = new cdk.Stack(); + const fn = lambda.Function.fromFunctionAttributes(stack, 'Function', { + functionArn: 'arn:aws:lambda:us-east-1:123456789012:function:MyFn', + sameEnvironment: true, + }); + // WHEN fn.grantInvoke(new iam.ServicePrincipal('elasticloadbalancing.amazonaws.com')); From a8c4f178e08cef4f306f54976076c21de2252a55 Mon Sep 17 00:00:00 2001 From: markus7811 Date: Mon, 16 Nov 2020 16:23:33 +0100 Subject: [PATCH 144/314] feat(iam): specify initial PolicyDocument for inline Policy (#11430) allow passing PolicyDocuments to Policys like it could be done right now for ManagedPolicys fixes #11236 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-iam/README.md | 10 ++++- packages/@aws-cdk/aws-iam/lib/policy.ts | 13 +++++++ packages/@aws-cdk/aws-iam/test/policy.test.ts | 38 ++++++++++++++++++- 3 files changed, 59 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-iam/README.md b/packages/@aws-cdk/aws-iam/README.md index 9e4db8498e2c1..1cc8740b89927 100644 --- a/packages/@aws-cdk/aws-iam/README.md +++ b/packages/@aws-cdk/aws-iam/README.md @@ -250,8 +250,16 @@ const policyDocument = { ] }; -const newPolicyDocument = PolicyDocument.fromJson(policyDocument); +const customPolicyDocument = PolicyDocument.fromJson(policyDocument); +// You can pass this document as an initial document to a ManagedPolicy +// or inline Policy. +const newManagedPolicy = new ManagedPolicy(stack, 'MyNewManagedPolicy', { + document: customPolicyDocument +}); +const newPolicy = new Policy(stack, 'MyNewPolicy', { + document: customPolicyDocument +}); ``` ### OpenID Connect Providers diff --git a/packages/@aws-cdk/aws-iam/lib/policy.ts b/packages/@aws-cdk/aws-iam/lib/policy.ts index c4fefd21b189d..45cd1fb138927 100644 --- a/packages/@aws-cdk/aws-iam/lib/policy.ts +++ b/packages/@aws-cdk/aws-iam/lib/policy.ts @@ -83,6 +83,15 @@ export interface PolicyProps { * @default false */ readonly force?: boolean; + + /** + * Initial PolicyDocument to use for this Policy. If omited, any + * `PolicyStatement` provided in the `statements` property will be applied + * against the empty default `PolicyDocument`. + * + * @default - An empty policy. + */ + readonly document?: PolicyDocument; } /** @@ -138,6 +147,10 @@ export class Policy extends Resource implements IPolicy { } } + if (props.document) { + this.document = props.document; + } + const resource = new CfnPolicyConditional(this, 'Resource', { policyDocument: this.document, policyName: this.physicalName, diff --git a/packages/@aws-cdk/aws-iam/test/policy.test.ts b/packages/@aws-cdk/aws-iam/test/policy.test.ts index 9facd4acd3973..d2ff50aa4dbb8 100644 --- a/packages/@aws-cdk/aws-iam/test/policy.test.ts +++ b/packages/@aws-cdk/aws-iam/test/policy.test.ts @@ -1,7 +1,7 @@ import { ResourcePart } from '@aws-cdk/assert'; import '@aws-cdk/assert/jest'; import { App, CfnResource, Stack } from '@aws-cdk/core'; -import { AnyPrincipal, CfnPolicy, Group, Policy, PolicyStatement, Role, ServicePrincipal, User } from '../lib'; +import { AnyPrincipal, CfnPolicy, Group, Policy, PolicyDocument, PolicyStatement, Role, ServicePrincipal, User } from '../lib'; /* eslint-disable quote-props */ @@ -52,6 +52,42 @@ describe('IAM policy', () => { }); }); + test('policy from policy document alone', () => { + const policy = new Policy(stack, 'MyPolicy', { + policyName: 'MyPolicyName', + document: PolicyDocument.fromJson({ + Statement: [ + { + Action: 'sqs:SendMessage', + Effect: 'Allow', + Resource: '*', + }, + ], + }), + }); + + const group = new Group(stack, 'MyGroup'); + group.attachInlinePolicy(policy); + + expect(stack).toMatchTemplate({ + Resources: { + MyPolicy39D66CF6: { + Type: 'AWS::IAM::Policy', + Properties: { + PolicyName: 'MyPolicyName', + Groups: [{ Ref: 'MyGroupCBA54B1B' }], + PolicyDocument: { + Statement: [ + { Action: 'sqs:SendMessage', Effect: 'Allow', Resource: '*' }, + ], + Version: '2012-10-17', + }, + }, + }, + MyGroupCBA54B1B: { Type: 'AWS::IAM::Group' }, + }, + }); + }); test('policy name can be omitted, in which case the logical id will be used', () => { const policy = new Policy(stack, 'MyPolicy'); policy.addStatements(new PolicyStatement({ resources: ['*'], actions: ['sqs:SendMessage'] })); From d5fe374dc971983d7484177d0d6f96fc2de6b6fd Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Mon, 16 Nov 2020 16:23:11 +0000 Subject: [PATCH 145/314] chore(ecr): use CloudFormation property for imageScanOnPush (#11490) CloudFormation now supports the `ImageScanningConfiguration` property. Switch out the custom resource workaround with the native support from CloudFormation. Testing Verified by deploying a stack with `scanOnPush` enabled and confirming on the console that `scanOnPush` is enabled. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-ecr-assets/package.json | 2 - packages/@aws-cdk/aws-ecr/lib/repository.ts | 34 +-- packages/@aws-cdk/aws-ecr/package.json | 2 - .../test/integ.imagescan.expected.json | 202 +----------------- .../@aws-cdk/aws-ecr/test/test.repository.ts | 8 +- 5 files changed, 13 insertions(+), 235 deletions(-) diff --git a/packages/@aws-cdk/aws-ecr-assets/package.json b/packages/@aws-cdk/aws-ecr-assets/package.json index fcf7739ca7254..093fecd65c662 100644 --- a/packages/@aws-cdk/aws-ecr-assets/package.json +++ b/packages/@aws-cdk/aws-ecr-assets/package.json @@ -77,7 +77,6 @@ "dependencies": { "@aws-cdk/aws-ecr": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", - "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/assets": "0.0.0", @@ -90,7 +89,6 @@ "@aws-cdk/aws-ecr": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/assets": "0.0.0", - "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/cx-api": "0.0.0", diff --git a/packages/@aws-cdk/aws-ecr/lib/repository.ts b/packages/@aws-cdk/aws-ecr/lib/repository.ts index de4034df584e1..53990d1e07934 100644 --- a/packages/@aws-cdk/aws-ecr/lib/repository.ts +++ b/packages/@aws-cdk/aws-ecr/lib/repository.ts @@ -1,7 +1,6 @@ import * as events from '@aws-cdk/aws-events'; import * as iam from '@aws-cdk/aws-iam'; import { IResource, Lazy, RemovalPolicy, Resource, Stack, Token } from '@aws-cdk/core'; -import * as cr from '@aws-cdk/custom-resources'; import { IConstruct, Construct } from 'constructs'; import { CfnRepository } from './ecr.generated'; import { LifecycleRule, TagStatus } from './lifecycle'; @@ -420,6 +419,9 @@ export class Repository extends RepositoryBase { // It says "Text", but they actually mean "Object". repositoryPolicyText: Lazy.anyValue({ produce: () => this.policyDocument }), lifecyclePolicy: Lazy.anyValue({ produce: () => this.renderLifecyclePolicy() }), + imageScanningConfiguration: !props.imageScanOnPush ? undefined : { + scanOnPush: true, + }, }); resource.applyRemovalPolicy(props.removalPolicy); @@ -435,36 +437,6 @@ export class Repository extends RepositoryBase { resource: 'repository', resourceName: this.physicalName, }); - - // image scanOnPush - if (props.imageScanOnPush) { - new cr.AwsCustomResource(this, 'ImageScanOnPush', { - resourceType: 'Custom::ECRImageScanOnPush', - onUpdate: { - service: 'ECR', - action: 'putImageScanningConfiguration', - parameters: { - repositoryName: this.repositoryName, - imageScanningConfiguration: { - scanOnPush: props.imageScanOnPush, - }, - }, - physicalResourceId: cr.PhysicalResourceId.of(this.repositoryArn), - }, - onDelete: { - service: 'ECR', - action: 'putImageScanningConfiguration', - parameters: { - repositoryName: this.repositoryName, - imageScanningConfiguration: { - scanOnPush: false, - }, - }, - physicalResourceId: cr.PhysicalResourceId.of(this.repositoryArn), - }, - policy: cr.AwsCustomResourcePolicy.fromSdkCalls({ resources: [this.repositoryArn] }), - }); - } } public addToResourcePolicy(statement: iam.PolicyStatement): iam.AddToResourcePolicyResult { diff --git a/packages/@aws-cdk/aws-ecr/package.json b/packages/@aws-cdk/aws-ecr/package.json index a7b56a5a00298..76833c3af96af 100644 --- a/packages/@aws-cdk/aws-ecr/package.json +++ b/packages/@aws-cdk/aws-ecr/package.json @@ -86,7 +86,6 @@ "dependencies": { "@aws-cdk/aws-events": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", - "@aws-cdk/custom-resources": "0.0.0", "@aws-cdk/core": "0.0.0", "constructs": "^3.2.0" }, @@ -94,7 +93,6 @@ "peerDependencies": { "@aws-cdk/aws-events": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", - "@aws-cdk/custom-resources": "0.0.0", "@aws-cdk/core": "0.0.0", "constructs": "^3.2.0" }, diff --git a/packages/@aws-cdk/aws-ecr/test/integ.imagescan.expected.json b/packages/@aws-cdk/aws-ecr/test/integ.imagescan.expected.json index 76cd5933128c1..5367d722f62c9 100644 --- a/packages/@aws-cdk/aws-ecr/test/integ.imagescan.expected.json +++ b/packages/@aws-cdk/aws-ecr/test/integ.imagescan.expected.json @@ -2,107 +2,13 @@ "Resources": { "Repo02AC86CF": { "Type": "AWS::ECR::Repository", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "RepoImageScanOnPush94CFD98F": { - "Type": "Custom::ECRImageScanOnPush", "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "service": "ECR", - "action": "putImageScanningConfiguration", - "parameters": { - "repositoryName": { - "Ref": "Repo02AC86CF" - }, - "imageScanningConfiguration": { - "scanOnPush": "TRUE:BOOLEAN" - } - }, - "physicalResourceId": { - "id": { - "Fn::GetAtt": [ - "Repo02AC86CF", - "Arn" - ] - } - } - }, - "Update": { - "service": "ECR", - "action": "putImageScanningConfiguration", - "parameters": { - "repositoryName": { - "Ref": "Repo02AC86CF" - }, - "imageScanningConfiguration": { - "scanOnPush": "TRUE:BOOLEAN" - } - }, - "physicalResourceId": { - "id": { - "Fn::GetAtt": [ - "Repo02AC86CF", - "Arn" - ] - } - } - }, - "Delete": { - "service": "ECR", - "action": "putImageScanningConfiguration", - "parameters": { - "repositoryName": { - "Ref": "Repo02AC86CF" - }, - "imageScanningConfiguration": { - "scanOnPush": "FALSE:BOOLEAN" - } - }, - "physicalResourceId": { - "id": { - "Fn::GetAtt": [ - "Repo02AC86CF", - "Arn" - ] - } - } - }, - "InstallLatestAwsSdk": true + "ImageScanningConfiguration": { + "scanOnPush": true + } }, "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete", - "DependsOn": [ - "RepoImageScanOnPushCustomResourcePolicy556E941E" - ] - }, - "RepoImageScanOnPushCustomResourcePolicy556E941E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action":"ecr:PutImageScanningConfiguration", - "Effect":"Allow", - "Resource": { - "Fn::GetAtt": [ - "Repo02AC86CF", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "RepoImageScanOnPushCustomResourcePolicy556E941E", - "Roles": [{"Ref":"AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2"}] - } + "DeletionPolicy": "Delete" }, "RepoImageScanComplete7BC71935": { "Type": "AWS::Events::Rule", @@ -127,106 +33,6 @@ }, "State": "ENABLED" } - }, - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AWS679f53fac002430cb0da5b7982bd22872D164C4C": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersd731b1475f16a318a48a76c83d255f7422cfa5f025c5bff93537b8f0b8e94557S3BucketA250C084" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersd731b1475f16a318a48a76c83d255f7422cfa5f025c5bff93537b8f0b8e94557S3VersionKeyDC4F0CD7" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersd731b1475f16a318a48a76c83d255f7422cfa5f025c5bff93537b8f0b8e94557S3VersionKeyDC4F0CD7" - } - ] - } - ] - } - ] - ] - } - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2", - "Arn" - ] - }, - "Runtime": "nodejs12.x", - "Timeout": 120 - }, - "DependsOn": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - ] - } - }, - "Parameters": { - "AssetParametersd731b1475f16a318a48a76c83d255f7422cfa5f025c5bff93537b8f0b8e94557S3BucketA250C084": { - "Type": "String", - "Description": "S3 bucket for asset \"d731b1475f16a318a48a76c83d255f7422cfa5f025c5bff93537b8f0b8e94557\"" - }, - "AssetParametersd731b1475f16a318a48a76c83d255f7422cfa5f025c5bff93537b8f0b8e94557S3VersionKeyDC4F0CD7": { - "Type": "String", - "Description": "S3 key for asset version \"d731b1475f16a318a48a76c83d255f7422cfa5f025c5bff93537b8f0b8e94557\"" - }, - "AssetParametersd731b1475f16a318a48a76c83d255f7422cfa5f025c5bff93537b8f0b8e94557ArtifactHash5701DE73": { - "Type": "String", - "Description": "Artifact hash for asset \"d731b1475f16a318a48a76c83d255f7422cfa5f025c5bff93537b8f0b8e94557\"" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-ecr/test/test.repository.ts b/packages/@aws-cdk/aws-ecr/test/test.repository.ts index 73e5f21d28115..20c53f1a3032a 100644 --- a/packages/@aws-cdk/aws-ecr/test/test.repository.ts +++ b/packages/@aws-cdk/aws-ecr/test/test.repository.ts @@ -28,7 +28,7 @@ export = { test.done(); }, - 'repository creation with imageScanOnPush creates custom resource'(test: Test) { + 'repository creation with imageScanOnPush'(test: Test) { // GIVEN const stack = new cdk.Stack(); @@ -36,7 +36,11 @@ export = { new ecr.Repository(stack, 'Repo', { imageScanOnPush: true }); // THEN - expect(stack).to(haveResource('Custom::ECRImageScanOnPush')); + expect(stack).to(haveResource('AWS::ECR::Repository', { + ImageScanningConfiguration: { + scanOnPush: true, + }, + })); test.done(); }, From 26ee52a742bee73a9b263ecfc28baa84af587411 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 16 Nov 2020 16:55:56 +0000 Subject: [PATCH 146/314] chore(deps-dev): bump @types/eslint from 7.2.4 to 7.2.5 (#11491) Bumps [@types/eslint](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/eslint) from 7.2.4 to 7.2.5. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/eslint) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- tools/eslint-plugin-cdk/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/eslint-plugin-cdk/package.json b/tools/eslint-plugin-cdk/package.json index e07a275ab288a..9de20764c4898 100644 --- a/tools/eslint-plugin-cdk/package.json +++ b/tools/eslint-plugin-cdk/package.json @@ -12,7 +12,7 @@ "build+test": "npm run build && npm test" }, "devDependencies": { - "@types/eslint": "^7.2.4", + "@types/eslint": "^7.2.5", "@types/fs-extra": "^8.1.1", "@types/jest": "^26.0.15", "@types/node": "^10.17.44", diff --git a/yarn.lock b/yarn.lock index 529eef937524c..a36e5ee846666 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3034,10 +3034,10 @@ resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== -"@types/eslint@^7.2.4": - version "7.2.4" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.2.4.tgz#d12eeed7741d2491b69808576ac2d20c14f74c41" - integrity sha512-YCY4kzHMsHoyKspQH+nwSe+70Kep7Vjt2X+dZe5Vs2vkRudqtoFoUIv1RlJmZB8Hbp7McneupoZij4PadxsK5Q== +"@types/eslint@^7.2.5": + version "7.2.5" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.2.5.tgz#92172ecf490c2fce4b076739693d75f30376d610" + integrity sha512-Dc6ar9x16BdaR3NSxSF7T4IjL9gxxViJq8RmFd+2UAyA+K6ck2W+gUwfgpG/y9TPyUuBL35109bbULpEynvltA== dependencies: "@types/estree" "*" "@types/json-schema" "*" From 10473b9562fb8c7e2e59f1b710c0e3f6bd1fd60e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 16 Nov 2020 19:05:37 +0000 Subject: [PATCH 147/314] chore(deps): bump @typescript-eslint/eslint-plugin from 4.7.0 to 4.8.0 (#11496) Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.7.0 to 4.8.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.8.0/packages/eslint-plugin) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- tools/cdk-build-tools/package.json | 2 +- yarn.lock | 61 +++++++++++++++++++++++------- 2 files changed, 49 insertions(+), 14 deletions(-) diff --git a/tools/cdk-build-tools/package.json b/tools/cdk-build-tools/package.json index 65ced771af1aa..c81340a9f7986 100644 --- a/tools/cdk-build-tools/package.json +++ b/tools/cdk-build-tools/package.json @@ -39,7 +39,7 @@ "pkglint": "0.0.0" }, "dependencies": { - "@typescript-eslint/eslint-plugin": "^4.7.0", + "@typescript-eslint/eslint-plugin": "^4.8.0", "@typescript-eslint/parser": "^4.7.0", "eslint-plugin-cdk": "0.0.0", "awslint": "0.0.0", diff --git a/yarn.lock b/yarn.lock index a36e5ee846666..d76198c99898f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3288,28 +3288,28 @@ resolved "https://registry.yarnpkg.com/@types/yarnpkg__lockfile/-/yarnpkg__lockfile-1.1.4.tgz#445251eb00bd9c1e751f82c7c6bf4f714edfd464" integrity sha512-/emrKCfQMQmFCqRqqBJ0JueHBT06jBRM3e8OgnvDUcvuExONujIk2hFA5dNsN9Nt41ljGVDdChvCydATZ+KOZw== -"@typescript-eslint/eslint-plugin@^4.7.0": - version "4.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.7.0.tgz#85c9bbda00c0cb604d3c241f7bc7fb171a2d3479" - integrity sha512-li9aiSVBBd7kU5VlQlT1AqP0uWGDK6JYKUQ9cVDnOg34VNnd9t4jr0Yqc/bKxJr/tDCPDaB4KzoSFN9fgVxe/Q== +"@typescript-eslint/eslint-plugin@^4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.8.0.tgz#ad12cba28e426b24295291ad4c43b1cdc8b9dbb1" + integrity sha512-nm80Yy5D7Ot00bomzBYodnGmGhNdePHS3iaxJ3Th0wxRWEI/6KCgbmL8PR78fF7MtT1VDcYNtY5y+YYyGlRhBg== dependencies: - "@typescript-eslint/experimental-utils" "4.7.0" - "@typescript-eslint/scope-manager" "4.7.0" + "@typescript-eslint/experimental-utils" "4.8.0" + "@typescript-eslint/scope-manager" "4.8.0" debug "^4.1.1" functional-red-black-tree "^1.0.1" regexpp "^3.0.0" semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@4.7.0": - version "4.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.7.0.tgz#8d1058c38bec3d3bbd9c898a1c32318d80faf3c5" - integrity sha512-cymzovXAiD4EF+YoHAB5Oh02MpnXjvyaOb+v+BdpY7lsJXZQN34oIETeUwVT2XfV9rSNpXaIcknDLfupO/tUoA== +"@typescript-eslint/experimental-utils@4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.8.0.tgz#ff035f917aec0698c156a6039166ecf9d7a24f57" + integrity sha512-1yOvI++HMdA9lpaAkXXQlVUwJjruNz7Z9K3lgpcU+JU/Szvsv42H6G6DECalAuz2Dd0KFU/MeUrPC0jXnuAvlA== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/scope-manager" "4.7.0" - "@typescript-eslint/types" "4.7.0" - "@typescript-eslint/typescript-estree" "4.7.0" + "@typescript-eslint/scope-manager" "4.8.0" + "@typescript-eslint/types" "4.8.0" + "@typescript-eslint/typescript-estree" "4.8.0" eslint-scope "^5.0.0" eslint-utils "^2.0.0" @@ -3331,11 +3331,24 @@ "@typescript-eslint/types" "4.7.0" "@typescript-eslint/visitor-keys" "4.7.0" +"@typescript-eslint/scope-manager@4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.8.0.tgz#f960b6c5df1a5b230b8488e71c5c04e58dd494e0" + integrity sha512-eJ+SV6w5WcyFusQ/Ru4A/c7E65HMGzWWGPJAqSuM/1EKEE6wOw9LUQTqAvLa6v2oIcaDo9F+/EyOPZgoD/BcLA== + dependencies: + "@typescript-eslint/types" "4.8.0" + "@typescript-eslint/visitor-keys" "4.8.0" + "@typescript-eslint/types@4.7.0": version "4.7.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.7.0.tgz#5e95ef5c740f43d942542b35811f87b62fccca69" integrity sha512-uLszFe0wExJc+I7q0Z/+BnP7wao/kzX0hB5vJn4LIgrfrMLgnB2UXoReV19lkJQS1a1mHWGGODSxnBx6JQC3Sg== +"@typescript-eslint/types@4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.8.0.tgz#87e73883637f662d9a638b0e9b01ed77edc44fb7" + integrity sha512-2/mGmXxr3sTxCvCT1mhR2b9rbfpMEBK41tiu0lMnMtZEbpphcUyrmgt2ogDFWNvsvyyeUxO1159eDrgFb7zV4Q== + "@typescript-eslint/typescript-estree@4.7.0": version "4.7.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.7.0.tgz#539531167f05ba20eb0b6785567076679e29d393" @@ -3350,6 +3363,20 @@ semver "^7.3.2" tsutils "^3.17.1" +"@typescript-eslint/typescript-estree@4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.8.0.tgz#b5160588495f18b739003b6078309b76fece0c55" + integrity sha512-jEdeERN8DIs7S8PlTdI7Sdy63Caxg2VtR21/RV7Z1Dtixiq/QEFSPrDXggMXKNOPPlrtMS+eCz7d7NV0HWLFVg== + dependencies: + "@typescript-eslint/types" "4.8.0" + "@typescript-eslint/visitor-keys" "4.8.0" + debug "^4.1.1" + globby "^11.0.1" + is-glob "^4.0.1" + lodash "^4.17.15" + semver "^7.3.2" + tsutils "^3.17.1" + "@typescript-eslint/visitor-keys@4.7.0": version "4.7.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.7.0.tgz#6783824f22acfc49e754970ed21b88ac03b80e6f" @@ -3358,6 +3385,14 @@ "@typescript-eslint/types" "4.7.0" eslint-visitor-keys "^2.0.0" +"@typescript-eslint/visitor-keys@4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.8.0.tgz#7786b92bbaf25c6aa9fb860eb8dbb1f7d3b7d0ad" + integrity sha512-JluNZLvnkRUr0h3L6MnQVLuy2rw9DpD0OyMC21FVbgcezr0LQkbBjDp9kyKZhuZrLrtq4mwPiIkpfRb8IRqneA== + dependencies: + "@typescript-eslint/types" "4.8.0" + eslint-visitor-keys "^2.0.0" + "@yarnpkg/lockfile@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" From 7127ff78ae9453185a0b02457d458fbbd439857d Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Mon, 16 Nov 2020 19:53:34 +0000 Subject: [PATCH 148/314] chore(pkglint): backport updates from v2 branch (#11497) A previous [commit] made a change to a couple pkglint rules on the `v2-main` branch. These can also be applied on `master` branch and can reduce merge conflicts. [commit]: https://github.com/aws/aws-cdk/commit/89c5f829b037ec4d6e7f3b508ea6d9ac12925bda#diff-3c38ae20cded2082ff30639f70bc5805053217bea1e14b540ac5d8989bb462fb ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- tools/pkglint/lib/rules.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tools/pkglint/lib/rules.ts b/tools/pkglint/lib/rules.ts index 28f72bd7e2133..78d2bc7ec436e 100644 --- a/tools/pkglint/lib/rules.ts +++ b/tools/pkglint/lib/rules.ts @@ -146,7 +146,7 @@ export class ThirdPartyAttributions extends ValidationRule { if (pkg.json.private && !alwaysCheck.includes(pkg.json.name)) { return; } - const bundled = pkg.getAllBundledDependencies(); + const bundled = pkg.getAllBundledDependencies().filter(dep => !dep.startsWith('@aws-cdk')); const lines = fs.readFileSync(path.join(pkg.packageRoot, 'NOTICE'), { encoding: 'utf8' }).split('\n'); const re = /^\*\* (\S+)/; @@ -1460,7 +1460,15 @@ export class JestSetup extends ValidationRule { export class UbergenPackageVisibility extends ValidationRule { public readonly name = 'ubergen/package-visibility'; - private readonly publicPackages = ['aws-cdk-lib', 'cdk', 'aws-cdk', 'awslint']; + private readonly publicPackages = [ + '@aws-cdk/cloud-assembly-schema', + '@aws-cdk/cloudformation-diff', + '@aws-cdk/cx-api', + 'aws-cdk-lib', + 'aws-cdk', + 'awslint', + 'cdk', + ]; public validate(pkg: PackageJson): void { // eslint-disable-next-line @typescript-eslint/no-require-imports From 7bb53bac1797eafed88f1f8fdc3e8597b74fb425 Mon Sep 17 00:00:00 2001 From: Somaya Date: Mon, 16 Nov 2020 14:14:41 -0800 Subject: [PATCH 149/314] chore: fix broken auto label action typo (#11466) Co-authored-by: Shiv Lakshminarayan --- .github/workflows/issue-label-assign.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/issue-label-assign.yml b/.github/workflows/issue-label-assign.yml index 60ba0a349eef8..6184e7c0580f5 100644 --- a/.github/workflows/issue-label-assign.yml +++ b/.github/workflows/issue-label-assign.yml @@ -103,7 +103,7 @@ jobs: {"keywords":["[@aws-cdk/aws-iot1click]","[aws-iot1click]","[iot1click]","[iot 1click]"],"labels":["@aws-cdk/aws-iot1click"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-iotanalytics]","[aws-iotanalytics]","[iotanalytics]","[iot analytics]","[iot-analytics]"],"labels":["@aws-cdk/aws-iotanalytics"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-iotevents]","[aws-iotevents]","[iotevents]","[iot events]","[iot-events]"],"labels":["@aws-cdk/aws-iotevents"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-iotsitewise]","[aws-iotsitewise]","[iotsitewise]","[iot sitewise]","[iot-sitewise]","[iot-site-wise]",[iot site wise]"],"labels":["@aws-cdk/aws-iotsitewise"],"assignees":["shivlaks"]}, + {"keywords":["[@aws-cdk/aws-iotsitewise]","[aws-iotsitewise]","[iotsitewise]","[iot sitewise]","[iot-sitewise]","[iot-site-wise]","[iot site wise]"],"labels":["@aws-cdk/aws-iotsitewise"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-iotthingsgraph]","[aws-iotthingsgraph]","[iotthingsgraph]","[iot things graph]","[iot-things-graph]"],"labels":["@aws-cdk/aws-iotthingsgraph"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-ivs]","[aws-ivs]","[Interactive Video Service]","[ivs]"],"labels":["@aws-cdk/aws-ivs"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-kendra]","[aws-kendra]","[kendra]"],"labels":["@aws-cdk/aws-kendra"],"assignees":["shivlaks"]}, From e86602fdf079d3688ea32c556dbffd31b345d12c Mon Sep 17 00:00:00 2001 From: AWS CDK Automation <43080478+aws-cdk-automation@users.noreply.github.com> Date: Tue, 17 Nov 2020 11:16:51 +0100 Subject: [PATCH 150/314] chore(release): 1.74.0 (#11508) See CHANGELOG --- .github/workflows/issue-label-assign.yml | 4 + CHANGELOG.md | 37 +- .../ecs-service-extensions/README.md | 4 +- .../lib/extensions/appmesh.ts | 25 +- .../ecs-service-extensions/package.json | 6 +- packages/@aws-cdk/app-delivery/package.json | 2 +- .../lib/scalable-target.ts | 5 + .../aws-applicationautoscaling/package.json | 2 +- packages/@aws-cdk/aws-appmesh/README.md | 25 +- packages/@aws-cdk/aws-appmesh/lib/index.ts | 1 + .../aws-appmesh/lib/shared-interfaces.ts | 38 - .../aws-appmesh/lib/virtual-node-listener.ts | 219 ++ .../@aws-cdk/aws-appmesh/lib/virtual-node.ts | 105 +- packages/@aws-cdk/aws-appmesh/package.json | 7 +- .../@aws-cdk/aws-appmesh/test/integ.mesh.ts | 14 +- .../aws-appmesh/test/test.health-check.ts | 30 +- .../@aws-cdk/aws-appmesh/test/test.mesh.ts | 38 +- .../aws-appmesh/test/test.virtual-node.ts | 228 +- .../aws-appmesh/test/test.virtual-router.ts | 50 +- .../aws-autoscaling-common/package.json | 2 +- .../aws-autoscaling/lib/auto-scaling-group.ts | 28 +- .../test/integ.asg-w-elbv2.expected.json | 2 +- .../aws-autoscaling/test/scaling.test.ts | 50 +- .../package.json | 8 +- .../aws-cloudfront-origins/package.json | 2 +- packages/@aws-cdk/aws-cloudfront/package.json | 2 +- packages/@aws-cdk/aws-cloudtrail/package.json | 2 +- packages/@aws-cdk/aws-codebuild/package.json | 2 +- packages/@aws-cdk/aws-codecommit/package.json | 2 +- .../aws-codepipeline-actions/README.md | 1 + .../lib/ecs/deploy-action.ts | 20 +- .../test/ecs/test.ecs-deploy-action.ts | 50 + .../integ.pipeline-ecs-deploy.expected.json | 3 +- .../test/integ.pipeline-ecs-deploy.ts | 1 + .../aws-global-table-coordinator/package.json | 6 +- packages/@aws-cdk/aws-dynamodb/package.json | 2 +- packages/@aws-cdk/aws-ec2/lib/vpc.ts | 7 + packages/@aws-cdk/aws-ecr-assets/NOTICE | 68 + packages/@aws-cdk/aws-ecr-assets/package.json | 2 - packages/@aws-cdk/aws-ecr/lib/repository.ts | 34 +- packages/@aws-cdk/aws-ecr/package.json | 2 - .../test/integ.imagescan.expected.json | 202 +- .../@aws-cdk/aws-ecr/test/test.repository.ts | 8 +- packages/@aws-cdk/aws-ecs/README.md | 2 +- .../aws-ecs/lib/base/task-definition.ts | 13 + .../aws-ecs/lib/container-definition.ts | 13 +- .../aws-ecs/lib/fargate/fargate-service.ts | 13 + .../test/fargate/integ.secret.expected.json | 16 +- .../aws-ecs/test/fargate/integ.secret.ts | 1 + .../test/fargate/test.fargate-service.ts | 26 + .../aws-ecs/test/test.container-definition.ts | 32 +- packages/@aws-cdk/aws-efs/README.md | 19 + packages/@aws-cdk/aws-efs/lib/access-point.ts | 123 +- .../@aws-cdk/aws-efs/lib/efs-file-system.ts | 53 +- .../aws-efs/test/access-point.test.ts | 85 +- packages/@aws-cdk/aws-eks/package.json | 2 +- .../@aws-cdk/aws-events-targets/package.json | 2 +- packages/@aws-cdk/aws-iam/README.md | 10 +- packages/@aws-cdk/aws-iam/lib/policy.ts | 13 + packages/@aws-cdk/aws-iam/test/policy.test.ts | 38 +- .../@aws-cdk/aws-iotsitewise/.eslintrc.js | 3 + packages/@aws-cdk/aws-iotsitewise/.gitignore | 19 + packages/@aws-cdk/aws-iotsitewise/.npmignore | 28 + packages/@aws-cdk/aws-iotsitewise/LICENSE | 201 ++ packages/@aws-cdk/aws-iotsitewise/NOTICE | 2 + packages/@aws-cdk/aws-iotsitewise/README.md | 16 + .../@aws-cdk/aws-iotsitewise/jest.config.js | 2 + .../@aws-cdk/aws-iotsitewise/lib/index.ts | 2 + .../@aws-cdk/aws-iotsitewise/package.json | 96 + .../aws-iotsitewise/test/iotsitewise.test.ts | 6 + packages/@aws-cdk/aws-ivs/.eslintrc.js | 3 + packages/@aws-cdk/aws-ivs/.gitignore | 19 + packages/@aws-cdk/aws-ivs/.npmignore | 28 + packages/@aws-cdk/aws-ivs/LICENSE | 201 ++ packages/@aws-cdk/aws-ivs/NOTICE | 2 + packages/@aws-cdk/aws-ivs/README.md | 16 + packages/@aws-cdk/aws-ivs/jest.config.js | 2 + packages/@aws-cdk/aws-ivs/lib/index.ts | 2 + packages/@aws-cdk/aws-ivs/package.json | 96 + packages/@aws-cdk/aws-ivs/test/ivs.test.ts | 6 + .../aws-lambda-event-sources/README.md | 2 +- .../@aws-cdk/aws-lambda-nodejs/package.json | 2 +- .../@aws-cdk/aws-lambda/lib/filesystem.ts | 2 +- .../@aws-cdk/aws-lambda/lib/function-base.ts | 20 +- packages/@aws-cdk/aws-lambda/lib/function.ts | 2 +- .../@aws-cdk/aws-lambda/test/function.test.ts | 32 +- .../integ.lambda.filesystem.expected.json | 258 +- .../test/integ.lambda.filesystem.ts | 42 +- packages/@aws-cdk/aws-logs/README.md | 27 +- packages/@aws-cdk/aws-logs/lib/log-group.ts | 9 + packages/@aws-cdk/aws-logs/package.json | 4 +- .../@aws-cdk/aws-logs/test/test.loggroup.ts | 22 +- .../@aws-cdk/aws-mediapackage/.eslintrc.js | 3 + packages/@aws-cdk/aws-mediapackage/.gitignore | 19 + packages/@aws-cdk/aws-mediapackage/.npmignore | 28 + packages/@aws-cdk/aws-mediapackage/LICENSE | 201 ++ packages/@aws-cdk/aws-mediapackage/NOTICE | 2 + packages/@aws-cdk/aws-mediapackage/README.md | 16 + .../@aws-cdk/aws-mediapackage/jest.config.js | 2 + .../@aws-cdk/aws-mediapackage/lib/index.ts | 2 + .../@aws-cdk/aws-mediapackage/package.json | 96 + .../test/mediapackage.test.ts | 6 + packages/@aws-cdk/aws-route53/package.json | 2 +- packages/@aws-cdk/aws-sqs/package.json | 2 +- .../lib/athena/start-query-execution.ts | 23 +- .../integ.get-query-execution.expected.json | 4 +- .../integ.get-query-results.expected.json | 4 +- .../integ.start-query-execution.expected.json | 4 +- .../integ.stop-query-execution.expected.json | 4 +- .../test/athena/start-query-execution.test.ts | 52 + packages/@aws-cdk/cfnspec/CHANGELOG.md | 192 ++ .../build-tools/create-missing-libraries.ts | 28 +- packages/@aws-cdk/cfnspec/cfn.version | 2 +- ...0_CloudFormationResourceSpecification.json | 2796 ++++++++++++++++- ...aPackage_PackagingConfiguration_patch.json | 29 + ...80_AutoScaling_AutoScalingGroup_patch.json | 31 + .../680_MediaPackage_Channel_patch.json | 15 + ...figuration_Tags_CorrectItemType_patch.json | 21 + .../@aws-cdk/cloudformation-diff/package.json | 2 +- .../cloudformation-include/package.json | 8 +- packages/@aws-cdk/core/NOTICE | 142 + packages/@aws-cdk/core/lib/cfn-output.ts | 39 +- packages/@aws-cdk/core/package.json | 2 +- packages/@aws-cdk/core/test/output.test.ts | 77 +- packages/@aws-cdk/core/test/stage.test.ts | 35 + .../@aws-cdk/custom-resources/package.json | 2 +- .../@aws-cdk/cx-api/lib/cloud-assembly.ts | 12 + .../test/cloud-assembly-builder.test.ts | 22 + .../lib/actions/deploy-cdk-stack-action.ts | 5 +- packages/@aws-cdk/pipelines/lib/private/fs.ts | 14 + .../lib/synths/simple-synth-action.ts | 5 +- packages/@aws-cdk/pipelines/test/fs.test.ts | 11 + packages/aws-cdk-lib/NOTICE | 142 + packages/aws-cdk-lib/package.json | 5 +- packages/aws-cdk/package.json | 4 +- packages/awslint/package.json | 2 +- packages/cdk-assets/package.json | 4 +- packages/decdk/package.json | 5 +- packages/monocdk/NOTICE | 142 + packages/monocdk/package.json | 5 +- scripts/script-tests/package.json | 2 +- tools/cdk-build-tools/package.json | 8 +- tools/cdk-integ-tools/package.json | 2 +- tools/cfn2ts/package.json | 2 +- tools/eslint-plugin-cdk/package.json | 6 +- tools/pkglint/lib/packagejson.ts | 9 +- tools/pkglint/lib/rules.ts | 55 +- tools/pkglint/package.json | 3 +- tools/pkglint/test/fake-module.ts | 36 +- tools/pkglint/test/rules.test.ts | 220 +- tools/pkgtools/package.json | 2 +- version.v1.json | 2 +- yarn.lock | 1086 +++---- 153 files changed, 7241 insertions(+), 1440 deletions(-) create mode 100644 packages/@aws-cdk/aws-appmesh/lib/virtual-node-listener.ts create mode 100644 packages/@aws-cdk/aws-iotsitewise/.eslintrc.js create mode 100644 packages/@aws-cdk/aws-iotsitewise/.gitignore create mode 100644 packages/@aws-cdk/aws-iotsitewise/.npmignore create mode 100644 packages/@aws-cdk/aws-iotsitewise/LICENSE create mode 100644 packages/@aws-cdk/aws-iotsitewise/NOTICE create mode 100644 packages/@aws-cdk/aws-iotsitewise/README.md create mode 100644 packages/@aws-cdk/aws-iotsitewise/jest.config.js create mode 100644 packages/@aws-cdk/aws-iotsitewise/lib/index.ts create mode 100644 packages/@aws-cdk/aws-iotsitewise/package.json create mode 100644 packages/@aws-cdk/aws-iotsitewise/test/iotsitewise.test.ts create mode 100644 packages/@aws-cdk/aws-ivs/.eslintrc.js create mode 100644 packages/@aws-cdk/aws-ivs/.gitignore create mode 100644 packages/@aws-cdk/aws-ivs/.npmignore create mode 100644 packages/@aws-cdk/aws-ivs/LICENSE create mode 100644 packages/@aws-cdk/aws-ivs/NOTICE create mode 100644 packages/@aws-cdk/aws-ivs/README.md create mode 100644 packages/@aws-cdk/aws-ivs/jest.config.js create mode 100644 packages/@aws-cdk/aws-ivs/lib/index.ts create mode 100644 packages/@aws-cdk/aws-ivs/package.json create mode 100644 packages/@aws-cdk/aws-ivs/test/ivs.test.ts create mode 100644 packages/@aws-cdk/aws-mediapackage/.eslintrc.js create mode 100644 packages/@aws-cdk/aws-mediapackage/.gitignore create mode 100644 packages/@aws-cdk/aws-mediapackage/.npmignore create mode 100644 packages/@aws-cdk/aws-mediapackage/LICENSE create mode 100644 packages/@aws-cdk/aws-mediapackage/NOTICE create mode 100644 packages/@aws-cdk/aws-mediapackage/README.md create mode 100644 packages/@aws-cdk/aws-mediapackage/jest.config.js create mode 100644 packages/@aws-cdk/aws-mediapackage/lib/index.ts create mode 100644 packages/@aws-cdk/aws-mediapackage/package.json create mode 100644 packages/@aws-cdk/aws-mediapackage/test/mediapackage.test.ts create mode 100644 packages/@aws-cdk/cfnspec/spec-source/670_MediaPackage_PackagingConfiguration_patch.json create mode 100644 packages/@aws-cdk/cfnspec/spec-source/680_AutoScaling_AutoScalingGroup_patch.json create mode 100644 packages/@aws-cdk/cfnspec/spec-source/680_MediaPackage_Channel_patch.json create mode 100644 packages/@aws-cdk/cfnspec/spec-source/690_IoT_DomainConfiguration_Tags_CorrectItemType_patch.json create mode 100644 packages/@aws-cdk/pipelines/lib/private/fs.ts create mode 100644 packages/@aws-cdk/pipelines/test/fs.test.ts diff --git a/.github/workflows/issue-label-assign.yml b/.github/workflows/issue-label-assign.yml index 397709328e83e..6184e7c0580f5 100644 --- a/.github/workflows/issue-label-assign.yml +++ b/.github/workflows/issue-label-assign.yml @@ -24,6 +24,7 @@ jobs: {"keywords":["[@aws-cdk/aws-amplify]","[aws-amplify]","[amplify]"],"labels":["@aws-cdk/aws-amplify"],"assignees":["MrArnoldPalmer"]}, {"keywords":["[@aws-cdk/aws-apigateway]","[aws-apigateway]","[apigateway]","[api gateway]","[api-gateway]"],"labels":["@aws-cdk/aws-apigateway"],"assignees":["nija-at"]}, {"keywords":["[@aws-cdk/aws-apigatewayv2]","[aws-apigatewayv2]","[apigatewayv2]","[apigateway v2]","[api-gateway-v2]"],"labels":["@aws-cdk/aws-apigatewayv2"],"assignees":["nija-at"]}, + {"keywords":["[@aws-cdk/aws-apigatewayv2-integrations]","[aws-apigatewayv2-integrations]","[apigatewayv2-integrations]","[apigateway v2 integrations]","[api-gateway-v2-integrations]"],"labels":["@aws-cdk/aws-apigatewayv2-integrations"],"assignees":["nija-at"]}, {"keywords":["[@aws-cdk/aws-appconfig]","[aws-appconfig]","[appconfig]","[app config]","[app-config]"],"labels":["@aws-cdk/aws-appconfig"],"assignees":["MrArnoldPalmer"]}, {"keywords":["[@aws-cdk/aws-appflow]","[aws-appflow]","[appflow]","[app flow]","[app-flow]"],"labels":["@aws-cdk/aws-appflow"],"assignees":["skinny85"]}, {"keywords":["[@aws-cdk/aws-applicationautoscaling]","[aws-applicationautoscaling]","[applicationautoscaling]","[application autoscaling]","[application-autoscaling]"],"labels":["@aws-cdk/aws-applicationautoscaling"],"assignees":["NetaNir"]}, @@ -102,7 +103,9 @@ jobs: {"keywords":["[@aws-cdk/aws-iot1click]","[aws-iot1click]","[iot1click]","[iot 1click]"],"labels":["@aws-cdk/aws-iot1click"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-iotanalytics]","[aws-iotanalytics]","[iotanalytics]","[iot analytics]","[iot-analytics]"],"labels":["@aws-cdk/aws-iotanalytics"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-iotevents]","[aws-iotevents]","[iotevents]","[iot events]","[iot-events]"],"labels":["@aws-cdk/aws-iotevents"],"assignees":["shivlaks"]}, + {"keywords":["[@aws-cdk/aws-iotsitewise]","[aws-iotsitewise]","[iotsitewise]","[iot sitewise]","[iot-sitewise]","[iot-site-wise]","[iot site wise]"],"labels":["@aws-cdk/aws-iotsitewise"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-iotthingsgraph]","[aws-iotthingsgraph]","[iotthingsgraph]","[iot things graph]","[iot-things-graph]"],"labels":["@aws-cdk/aws-iotthingsgraph"],"assignees":["shivlaks"]}, + {"keywords":["[@aws-cdk/aws-ivs]","[aws-ivs]","[Interactive Video Service]","[ivs]"],"labels":["@aws-cdk/aws-ivs"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-kendra]","[aws-kendra]","[kendra]"],"labels":["@aws-cdk/aws-kendra"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-kinesis]","[aws-kinesis]","[kinesis]"],"labels":["@aws-cdk/aws-kinesis"],"assignees":["iliapolo"]}, {"keywords":["[@aws-cdk/aws-kinesisanalytics]","[aws-kinesisanalytics]","[kinesisanalytics]","[kinesis analytics]","[kinesis-analytics]"],"labels":["@aws-cdk/aws-kinesisanalytics"],"assignees":["iliapolo"]}, @@ -120,6 +123,7 @@ jobs: {"keywords":["[@aws-cdk/aws-mediaconvert]","[aws-mediaconvert]","[mediaconvert]","[media convert]","[media-convert]"],"labels":["@aws-cdk/aws-mediaconvert"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-medialive]","[aws-medialive]","[medialive]","[media live]","[media-live]"],"labels":["@aws-cdk/aws-medialive"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-mediastore]","[aws-mediastore]","[mediastore]","[media store]","[media-store]"],"labels":["@aws-cdk/aws-mediastore"],"assignees":["shivlaks"]}, + {"keywords":["[@aws-cdk/aws-mediapackage]","[aws-mediapackage]","[mediapackage]","[media package]","[media-package]"],"labels":["@aws-cdk/aws-mediapackage"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-msk]","[aws-msk]","[msk]"],"labels":["@aws-cdk/aws-msk"],"assignees":["iliapolo"]}, {"keywords":["[@aws-cdk/aws-neptune]","[aws-neptune]","[neptune]"],"labels":["@aws-cdk/aws-neptune"],"assignees":["njlynch"]}, {"keywords":["[@aws-cdk/aws-networkmanager]","[aws-networkmanager]","[networkmanager]","[network manager]","[network-manager]"],"labels":["@aws-cdk/aws-networkmanager"],"assignees":["shivlaks"]}, diff --git a/CHANGELOG.md b/CHANGELOG.md index 941f81402e7d2..c1423ba20377a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,48 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.74.0](https://github.com/aws/aws-cdk/compare/v1.73.0...v1.74.0) (2020-11-17) + + +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES + +* **appmesh:** `IVirtualNode` no longer has the `addBackends()` method. A backend can be added to `VirtualNode` using the `addBackend()` method which accepts a single `IVirtualService` +* **appmesh**: `IVirtualNode` no longer has the `addListeners()` method. A listener can be added to `VirtualNode` using the `addListener()` method which accepts a single `VirtualNodeListener` +* **appmesh**: `VirtualNode` no longer has a default listener. It is valid to have a `VirtualNode` without any listeners +* **appmesh**: the construction property `listener` of `VirtualNode` has been renamed to `listeners`, and its type changed to an array of listeners +* **appmesh**: the struct `VirtualNodeListener` has been removed. To create Virtual Node listeners, use the static factory methods of the `VirtualNodeListener` class + +### Features + +* **applicationautoscaling:** Add KAFKA to ServiceNamespace ([#11394](https://github.com/aws/aws-cdk/issues/11394)) ([b5c3f84](https://github.com/aws/aws-cdk/commit/b5c3f84c8be855107d3ea6738bbf8511f2ecdb8e)) +* **appmesh:** add listener timeout to Virtual Nodes ([#10793](https://github.com/aws/aws-cdk/issues/10793)) ([62baa7b](https://github.com/aws/aws-cdk/commit/62baa7b51b49c1a669c7144e5883375fe9ab5d35)) +* **cfnspec:** cloudformation spec v20.0.0 ([#11319](https://github.com/aws/aws-cdk/issues/11319)) ([8c17a35](https://github.com/aws/aws-cdk/commit/8c17a35746271d38289f6e200aea35b201b8a93d)) +* **cfnspec:** cloudformation spec v20.2.0 ([#11429](https://github.com/aws/aws-cdk/issues/11429)) ([025992b](https://github.com/aws/aws-cdk/commit/025992b0014aca493a669be518f4f423d3f39a57)) +* **codepipeline-actions:** Add deployment timeout to EcsDeployAction ([#11407](https://github.com/aws/aws-cdk/issues/11407)) ([7d9d575](https://github.com/aws/aws-cdk/commit/7d9d5757db2acedb507da8bb84c65cc06d018b91)) +* **core:** add easy importValue to CfnOutput ([#11368](https://github.com/aws/aws-cdk/issues/11368)) ([c71a4e9](https://github.com/aws/aws-cdk/commit/c71a4e9644fdd64fa00a6d804c921b32bd1816d1)), closes [#11360](https://github.com/aws/aws-cdk/issues/11360) +* **ecs:** secret JSON field for Fargate tasks ([#11348](https://github.com/aws/aws-cdk/issues/11348)) ([03e7cd5](https://github.com/aws/aws-cdk/commit/03e7cd5ebaf07be22f8fff8edacbc384989ebf7c)), closes [/github.com/aws/containers-roadmap/issues/385#issuecomment-722696672](https://github.com/aws//github.com/aws/containers-roadmap/issues/385/issues/issuecomment-722696672) [#11341](https://github.com/aws/aws-cdk/issues/11341) +* **efs:** import access point - `fromAccessPointAttributes()` ([#10712](https://github.com/aws/aws-cdk/issues/10712)) ([ec72c85](https://github.com/aws/aws-cdk/commit/ec72c859c31a069406994433fe430f56ff0e5ff3)) +* **iam:** specify initial PolicyDocument for inline Policy ([#11430](https://github.com/aws/aws-cdk/issues/11430)) ([a8c4f17](https://github.com/aws/aws-cdk/commit/a8c4f178e08cef4f306f54976076c21de2252a55)), closes [#11236](https://github.com/aws/aws-cdk/issues/11236) +* **logs:** Add KMS key support to LogGroup ([#11363](https://github.com/aws/aws-cdk/issues/11363)) ([21ccfce](https://github.com/aws/aws-cdk/commit/21ccfce514e10cfcdde36148b45f085d3494c540)), closes [#11211](https://github.com/aws/aws-cdk/issues/11211) +* **stepfunctions-tasks:** support overriding all properties of CodeBuild StartBuild integration ([#10356](https://github.com/aws/aws-cdk/issues/10356)) ([58efbad](https://github.com/aws/aws-cdk/commit/58efbad743464439ce8eb97a6c6c3e07b531d93c)), closes [#10302](https://github.com/aws/aws-cdk/issues/10302) + + +### Bug Fixes + +* **autoscaling:** `targetRequestsPerSecond` is actually requests per minute ([#11457](https://github.com/aws/aws-cdk/issues/11457)) ([39e277f](https://github.com/aws/aws-cdk/commit/39e277f65666e96fe1ad662254327967f666dbad)), closes [#11446](https://github.com/aws/aws-cdk/issues/11446) +* **core:** missing context in Stages is not filled by CLI ([#11461](https://github.com/aws/aws-cdk/issues/11461)) ([a4a555a](https://github.com/aws/aws-cdk/commit/a4a555a9f5e8844a377d8de5041219346d0eb65c)), closes [#9226](https://github.com/aws/aws-cdk/issues/9226) +* **lambda:** failed to add permission to an imported lambda from another account ([#11369](https://github.com/aws/aws-cdk/issues/11369)) ([715a030](https://github.com/aws/aws-cdk/commit/715a0300ea44c7cfcb6ae9973bd4ca16585c8fa5)), closes [#11278](https://github.com/aws/aws-cdk/issues/11278) [#11141](https://github.com/aws/aws-cdk/issues/11141) [#11141](https://github.com/aws/aws-cdk/issues/11141) +* **pipelines:** synthesizes incorrect paths on Windows ([#11464](https://github.com/aws/aws-cdk/issues/11464)) ([2ca31a8](https://github.com/aws/aws-cdk/commit/2ca31a87a8cbf0c5267b3d3b39c8dc75b142488e)), closes [#11359](https://github.com/aws/aws-cdk/issues/11359) [#11405](https://github.com/aws/aws-cdk/issues/11405) [#11424](https://github.com/aws/aws-cdk/issues/11424) +* **stepfunctions-tasks:** encryption is required for AthenaStartQueryExecution ([#11355](https://github.com/aws/aws-cdk/issues/11355)) ([f26a592](https://github.com/aws/aws-cdk/commit/f26a592e609674d528990aad14fb8884112ad64d)) +* **stepfunctions-tasks:** incorrect policy for Athena prevents database deletions ([#11427](https://github.com/aws/aws-cdk/issues/11427)) ([58e6576](https://github.com/aws/aws-cdk/commit/58e6576a90f722929495b7cd9f1d67f93bf9c31e)), closes [#11357](https://github.com/aws/aws-cdk/issues/11357) + ## [1.73.0](https://github.com/aws/aws-cdk/compare/v1.72.0...v1.73.0) (2020-11-11) ### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **apigatewayv2:** `LambdaProxyIntegration` and `HttpProxyIntegration` -classes have moved to the `@aws-cdk/aws-apigatewayv2-integration` module. +classes have moved to the `@aws-cdk/aws-apigatewayv2-integrations` module. * **appmesh:** VirtualRouter's Listeners are no longer a struct; use the static factory methods of the `VirtualNodeListener` class to obtain instances of them * **appmesh:** VirtualRouter accepts a list of listeners instead of a single listener * **appmesh:** all `fromResourceName()` methods in the AppMesh module have been replaced with `fromResourceAttributes()` diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/README.md b/packages/@aws-cdk-containers/ecs-service-extensions/README.md index 9302b90e5d9a3..cbca327f0ee12 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/README.md +++ b/packages/@aws-cdk-containers/ecs-service-extensions/README.md @@ -2,9 +2,7 @@ --- -![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) - -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts index 583ca06435c09..614a1eeea2312 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts +++ b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts @@ -259,17 +259,28 @@ export class AppMeshExtension extends ServiceExtension { throw new Error('You must add a CloudMap namespace to the ECS cluster in order to use the AppMesh extension'); } + function addListener(protocol: appmesh.Protocol, port: number): appmesh.VirtualNodeListener { + switch (protocol) { + case appmesh.Protocol.HTTP : + return appmesh.VirtualNodeListener.http({ port }); + + case appmesh.Protocol.HTTP2 : + return appmesh.VirtualNodeListener.http2({ port }); + + case appmesh.Protocol.GRPC : + return appmesh.VirtualNodeListener.grpc({ port }); + + case appmesh.Protocol.TCP : + return appmesh.VirtualNodeListener.tcp({ port }); + } + } + // Create a virtual node for the name service this.virtualNode = new appmesh.VirtualNode(this.scope, `${this.parentService.id}-virtual-node`, { mesh: this.mesh, virtualNodeName: this.parentService.id, cloudMapService: service.cloudMapService, - listener: { - portMapping: { - port: containerextension.trafficPort, - protocol: this.protocol, - }, - }, + listeners: [addListener(this.protocol, containerextension.trafficPort)], }); // Create a virtual router for this service. This allows for retries @@ -326,7 +337,7 @@ export class AppMeshExtension extends ServiceExtension { // Next update the app mesh config so that the local Envoy // proxy on this service knows how to route traffic to // nodes from the other service. - this.virtualNode.addBackends(otherAppMesh.virtualService); + this.virtualNode.addBackend(otherAppMesh.virtualService); } private virtualRouterListener(port: number): appmesh.VirtualRouterListener { diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/package.json b/packages/@aws-cdk-containers/ecs-service-extensions/package.json index 4b1da71dd86fe..e33dc561b65b8 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/package.json +++ b/packages/@aws-cdk-containers/ecs-service-extensions/package.json @@ -99,6 +99,6 @@ "awscdkio": { "announce": false }, - "maturity": "experimental", - "stability": "experimental" -} + "maturity": "stable", + "stability": "stable" +} \ No newline at end of file diff --git a/packages/@aws-cdk/app-delivery/package.json b/packages/@aws-cdk/app-delivery/package.json index e0a95c03879eb..d860fe435fd24 100644 --- a/packages/@aws-cdk/app-delivery/package.json +++ b/packages/@aws-cdk/app-delivery/package.json @@ -63,7 +63,7 @@ "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "fast-check": "^2.6.1", + "fast-check": "^2.7.0", "nodeunit": "^0.11.3", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts b/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts index 14bf3f4913b34..9549ff5c6598c 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts +++ b/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts @@ -274,4 +274,9 @@ export enum ServiceNamespace { * Comprehend */ COMPREHEND = 'comprehend', + + /** + * Kafka + */ + KAFKA = 'kafka', } diff --git a/packages/@aws-cdk/aws-applicationautoscaling/package.json b/packages/@aws-cdk/aws-applicationautoscaling/package.json index 3072fda41400d..39693f2db0d30 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/package.json +++ b/packages/@aws-cdk/aws-applicationautoscaling/package.json @@ -75,7 +75,7 @@ "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", - "fast-check": "^2.6.1", + "fast-check": "^2.7.0", "nodeunit": "^0.11.3", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/aws-appmesh/README.md b/packages/@aws-cdk/aws-appmesh/README.md index 9c0a4b7f1da2e..dff8a6808c701 100644 --- a/packages/@aws-cdk/aws-appmesh/README.md +++ b/packages/@aws-cdk/aws-appmesh/README.md @@ -139,11 +139,8 @@ const service = namespace.createService('Svc'); const node = mesh.addVirtualNode('virtual-node', { cloudMapService: service, - listener: { - portMapping: { - port: 8081, - protocol: Protocol.HTTP, - }, + listeners: [appmesh.VirtualNodeListener.httpNodeListener({ + port: 8081, healthCheck: { healthyThreshold: 3, interval: Duration.seconds(5), // minimum @@ -153,9 +150,9 @@ const node = mesh.addVirtualNode('virtual-node', { timeout: Duration.seconds(2), // minimum unhealthyThreshold: 2, }, - }, + })], accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout'), -}) +}); ``` Create a `VirtualNode` with the the constructor and add tags. @@ -164,11 +161,8 @@ Create a `VirtualNode` with the the constructor and add tags. const node = new VirtualNode(this, 'node', { mesh, cloudMapService: service, - listener: { - portMapping: { - port: 8080, - protocol: Protocol.HTTP, - }, + listeners: [appmesh.VirtualNodeListener.httpNodeListener({ + port: 8080, healthCheck: { healthyThreshold: 3, interval: Duration.seconds(5), // min @@ -177,15 +171,18 @@ const node = new VirtualNode(this, 'node', { protocol: Protocol.HTTP, timeout: Duration.seconds(2), // min unhealthyThreshold: 2, + }, + timeout: { + idle: cdk.Duration.seconds(5), }, - }, + })], accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout'), }); cdk.Tag.add(node, 'Environment', 'Dev'); ``` -The listeners property can be left blank and added later with the `node.addListeners()` method. The `healthcheck` property is optional but if specifying a listener, the `portMappings` must contain at least one property. +The `listeners` property can be left blank and added later with the `node.addListener()` method. The `healthcheck` and `timeout` properties are optional but if specifying a listener, the `port` must be added. ## Adding a Route diff --git a/packages/@aws-cdk/aws-appmesh/lib/index.ts b/packages/@aws-cdk/aws-appmesh/lib/index.ts index d95c017c2071e..4c09b13ba730c 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/index.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/index.ts @@ -7,6 +7,7 @@ export * from './virtual-node'; export * from './virtual-router'; export * from './virtual-router-listener'; export * from './virtual-service'; +export * from './virtual-node-listener'; export * from './virtual-gateway'; export * from './virtual-gateway-listener'; export * from './gateway-route'; diff --git a/packages/@aws-cdk/aws-appmesh/lib/shared-interfaces.ts b/packages/@aws-cdk/aws-appmesh/lib/shared-interfaces.ts index 39111389b0a03..21ab96b6ce56a 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/shared-interfaces.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/shared-interfaces.ts @@ -68,44 +68,6 @@ export interface HealthCheck { readonly unhealthyThreshold?: number; } -/** - * Port mappings for resources that require these attributes, such as VirtualNodes and Routes - */ -export interface PortMapping { - /** - * Port mapped to the VirtualNode / Route - * - * @default 8080 - */ - readonly port: number; - - /** - * Protocol for the VirtualNode / Route, only GRPC, HTTP, HTTP2, or TCP is supported - * - * @default HTTP - */ - readonly protocol: Protocol; -} - -/** - * Represents the properties needed to define healthy and active listeners for nodes - */ -export interface VirtualNodeListener { - /** - * Array of PortMappingProps for the listener - * - * @default - HTTP port 8080 - */ - readonly portMapping?: PortMapping; - - /** - * Health checking strategy upstream nodes should use when communicating with the listener - * - * @default - no healthcheck - */ - readonly healthCheck?: HealthCheck; -} - /** * All Properties for Envoy Access logs for mesh endpoints */ diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-node-listener.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-node-listener.ts new file mode 100644 index 0000000000000..e3e433d8e25d8 --- /dev/null +++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-node-listener.ts @@ -0,0 +1,219 @@ +import * as cdk from '@aws-cdk/core'; +import { CfnVirtualNode } from './appmesh.generated'; +import { validateHealthChecks } from './private/utils'; +import { HealthCheck, Protocol } from './shared-interfaces'; + +/** + * Properties for a VirtualNode listener + */ +export interface VirtualNodeListenerConfig { + /** + * Single listener config for a VirtualNode + */ + readonly listener: CfnVirtualNode.ListenerProperty, +} + +/** + * Represents the properties needed to define a Listeners for a VirtualNode + */ +interface VirtualNodeListenerCommonOptions { + /** + * Port to listen for connections on + * + * @default - 8080 + */ + readonly port?: number + + /** + * The health check information for the listener + * + * @default - no healthcheck + */ + readonly healthCheck?: HealthCheck; +} + +/** + * Represent the HTTP Node Listener prorperty + */ +export interface HttpVirtualNodeListenerOptions extends VirtualNodeListenerCommonOptions { + /** + * Timeout for HTTP protocol + * + * @default - None + */ + readonly timeout?: HttpTimeout; +} + +/** + * Represent the GRPC Node Listener prorperty + */ +export interface GrpcVirtualNodeListenerOptions extends VirtualNodeListenerCommonOptions { + /** + * Timeout for GRPC protocol + * + * @default - None + */ + readonly timeout?: GrpcTimeout; +} + +/** + * Represent the TCP Node Listener prorperty + */ +export interface TcpVirtualNodeListenerOptions extends VirtualNodeListenerCommonOptions { + /** + * Timeout for TCP protocol + * + * @default - None + */ + readonly timeout?: TcpTimeout; +} + +/** + * Represents timeouts for HTTP protocols. + */ +export interface HttpTimeout { + /** + * Represents an idle timeout. The amount of time that a connection may be idle. + * + * @default - none + */ + readonly idle?: cdk.Duration; + + /** + * Represents per request timeout. + * + * @default - 15 s + */ + readonly perRequest?: cdk.Duration; +} + +/** + * Represents timeouts for GRPC protocols. + */ +export interface GrpcTimeout { + /** + * Represents an idle timeout. The amount of time that a connection may be idle. + * + * @default - none + */ + readonly idle?: cdk.Duration; + + /** + * Represents per request timeout. + * + * @default - 15 s + */ + readonly perRequest?: cdk.Duration; +} + +/** + * Represents timeouts for TCP protocols. + */ +export interface TcpTimeout { + /** + * Represents an idle timeout. The amount of time that a connection may be idle. + * + * @default - none + */ + readonly idle?: cdk.Duration; +} + +/** + * Defines listener for a VirtualNode + */ +export abstract class VirtualNodeListener { + /** + * Returns an HTTP Listener for a VirtualNode + */ + public static http(props: HttpVirtualNodeListenerOptions = {}): VirtualNodeListener { + return new VirtualNodeListenerImpl(Protocol.HTTP, props.healthCheck, props.timeout, props.port); + } + + /** + * Returns an HTTP2 Listener for a VirtualNode + */ + public static http2(props: HttpVirtualNodeListenerOptions = {}): VirtualNodeListener { + return new VirtualNodeListenerImpl(Protocol.HTTP2, props.healthCheck, props.timeout, props.port); + } + + /** + * Returns an GRPC Listener for a VirtualNode + */ + public static grpc(props: GrpcVirtualNodeListenerOptions = {}): VirtualNodeListener { + return new VirtualNodeListenerImpl(Protocol.GRPC, props.healthCheck, props.timeout, props.port); + } + + /** + * Returns an TCP Listener for a VirtualNode + */ + public static tcp(props: TcpVirtualNodeListenerOptions = {}): VirtualNodeListener { + return new VirtualNodeListenerImpl(Protocol.TCP, props.healthCheck, props.timeout, props.port); + } + + /** + * Binds the current object when adding Listener to a VirtualNode + */ + public abstract bind(scope: cdk.Construct): VirtualNodeListenerConfig; + +} + +class VirtualNodeListenerImpl extends VirtualNodeListener { + constructor(private readonly protocol: Protocol, + private readonly healthCheck: HealthCheck | undefined, + private readonly timeout: HttpTimeout | undefined, + private readonly port: number = 8080) { super(); } + + public bind(_scope: cdk.Construct): VirtualNodeListenerConfig { + return { + listener: { + portMapping: { + port: this.port, + protocol: this.protocol, + }, + healthCheck: this.healthCheck ? this.renderHealthCheck(this.healthCheck) : undefined, + timeout: this.timeout ? this.renderTimeout(this.timeout) : undefined, + }, + }; + } + + private renderHealthCheck(hc: HealthCheck): CfnVirtualNode.HealthCheckProperty | undefined { + if (hc === undefined) { return undefined; } + + if (hc.protocol === Protocol.TCP && hc.path) { + throw new Error('The path property cannot be set with Protocol.TCP'); + } + + if (hc.protocol === Protocol.GRPC && hc.path) { + throw new Error('The path property cannot be set with Protocol.GRPC'); + } + + const healthCheck: CfnVirtualNode.HealthCheckProperty = { + healthyThreshold: hc.healthyThreshold || 2, + intervalMillis: (hc.interval || cdk.Duration.seconds(5)).toMilliseconds(), // min + path: hc.path || (hc.protocol === Protocol.HTTP ? '/' : undefined), + port: hc.port || this.port, + protocol: hc.protocol || this.protocol, + timeoutMillis: (hc.timeout || cdk.Duration.seconds(2)).toMilliseconds(), + unhealthyThreshold: hc.unhealthyThreshold || 2, + }; + + validateHealthChecks(healthCheck); + + return healthCheck; + } + + private renderTimeout(timeout: HttpTimeout): CfnVirtualNode.ListenerTimeoutProperty { + return ({ + [this.protocol]: { + idle: timeout?.idle !== undefined ? { + unit: 'ms', + value: timeout?.idle.toMilliseconds(), + } : undefined, + perRequest: timeout?.perRequest !== undefined ? { + unit: 'ms', + value: timeout?.perRequest.toMilliseconds(), + } : undefined, + }, + }); + } +} diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts index b8b9da2026715..fd8b2cadc87db 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts @@ -3,8 +3,8 @@ import * as cdk from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnVirtualNode } from './appmesh.generated'; import { IMesh, Mesh } from './mesh'; -import { validateHealthChecks } from './private/utils'; -import { AccessLog, HealthCheck, PortMapping, Protocol, VirtualNodeListener } from './shared-interfaces'; +import { AccessLog } from './shared-interfaces'; +import { VirtualNodeListener, VirtualNodeListenerConfig } from './virtual-node-listener'; import { IVirtualService } from './virtual-service'; /** @@ -34,15 +34,6 @@ export interface IVirtualNode extends cdk.IResource { */ readonly mesh: IMesh; - /** - * Utility method to add backends for existing or new VirtualNodes - */ - addBackends(...props: IVirtualService[]): void; - - /** - * Utility method to add Node Listeners for new or existing VirtualNodes - */ - addListeners(...listeners: VirtualNodeListener[]): void; } /** @@ -95,7 +86,7 @@ export interface VirtualNodeBaseProps { * * @default - No listeners */ - readonly listener?: VirtualNodeListener; + readonly listeners?: VirtualNodeListener[]; /** * Access Logging Configuration for the virtual node @@ -130,71 +121,10 @@ abstract class VirtualNodeBase extends cdk.Resource implements IVirtualNode { * The Mesh which the VirtualNode belongs to */ public abstract readonly mesh: IMesh; - - protected readonly backends = new Array(); - protected readonly listeners = new Array(); - - /** - * Add a VirtualServices that this node is expected to send outbound traffic to - */ - public addBackends(...props: IVirtualService[]) { - for (const s of props) { - this.backends.push({ - virtualService: { - virtualServiceName: s.virtualServiceName, - }, - }); - } - } - - /** - * Utility method to add an inbound listener for this virtual node - */ - public addListeners(...listeners: VirtualNodeListener[]) { - if (this.listeners.length + listeners.length > 1) { - throw new Error('VirtualNode may have at most one listener'); - } - - for (const listener of listeners) { - const portMapping = listener.portMapping || { port: 8080, protocol: Protocol.HTTP }; - this.listeners.push({ - portMapping, - healthCheck: renderHealthCheck(listener.healthCheck, portMapping), - }); - } - } -} - -function renderHealthCheck(hc: HealthCheck | undefined, pm: PortMapping): CfnVirtualNode.HealthCheckProperty | undefined { - if (hc === undefined) { return undefined; } - - if (hc.protocol === Protocol.TCP && hc.path) { - throw new Error('The path property cannot be set with Protocol.TCP'); - } - - if (hc.protocol === Protocol.GRPC && hc.path) { - throw new Error('The path property cannot be set with Protocol.GRPC'); - } - - const protocol = hc.protocol ?? pm.protocol; - - const healthCheck: CfnVirtualNode.HealthCheckProperty = { - healthyThreshold: hc.healthyThreshold || 2, - intervalMillis: (hc.interval || cdk.Duration.seconds(5)).toMilliseconds(), // min - path: hc.path || (protocol === Protocol.HTTP ? '/' : undefined), - port: hc.port || pm.port, - protocol: hc.protocol || pm.protocol, - timeoutMillis: (hc.timeout || cdk.Duration.seconds(2)).toMilliseconds(), - unhealthyThreshold: hc.unhealthyThreshold || 2, - }; - - validateHealthChecks(healthCheck); - - return healthCheck; } /** - * VirtualNode represents a newly defined App Mesh VirtualNode + * VirtualNode represents a newly defined AppMesh VirtualNode * * Any inbound traffic that your virtual node expects should be specified as a * listener. Any outbound traffic that your virtual node expects to reach @@ -245,6 +175,9 @@ export class VirtualNode extends VirtualNodeBase { */ public readonly mesh: IMesh; + private readonly backends = new Array(); + private readonly listeners = new Array(); + constructor(scope: Construct, id: string, props: VirtualNodeProps) { super(scope, id, { physicalName: props.virtualNodeName || cdk.Lazy.stringValue({ produce: () => cdk.Names.uniqueId(this) }), @@ -252,8 +185,8 @@ export class VirtualNode extends VirtualNodeBase { this.mesh = props.mesh; - this.addBackends(...props.backends || []); - this.addListeners(...props.listener ? [props.listener] : []); + props.backends?.forEach(backend => this.addBackend(backend)); + props.listeners?.forEach(listener => this.addListener(listener)); const accessLogging = props.accessLog?.bind(this); const node = new CfnVirtualNode(this, 'Resource', { @@ -261,7 +194,7 @@ export class VirtualNode extends VirtualNodeBase { meshName: this.mesh.meshName, spec: { backends: cdk.Lazy.anyValue({ produce: () => this.backends }, { omitEmptyArray: true }), - listeners: cdk.Lazy.anyValue({ produce: () => this.listeners }, { omitEmptyArray: true }), + listeners: cdk.Lazy.anyValue({ produce: () => this.listeners.map(listener => listener.listener) }, { omitEmptyArray: true }), serviceDiscovery: { dns: props.dnsHostName !== undefined ? { hostname: props.dnsHostName } : undefined, awsCloudMap: props.cloudMapService !== undefined ? { @@ -283,6 +216,24 @@ export class VirtualNode extends VirtualNodeBase { resourceName: this.physicalName, }); } + + /** + * Utility method to add an inbound listener for this VirtualNode + */ + public addListener(listener: VirtualNodeListener) { + this.listeners.push(listener.bind(this)); + } + + /** + * Add a Virtual Services that this node is expected to send outbound traffic to + */ + public addBackend(virtualService: IVirtualService) { + this.backends.push({ + virtualService: { + virtualServiceName: virtualService.virtualServiceName, + }, + }); + } } function renderAttributes(attrs?: {[key: string]: string}) { diff --git a/packages/@aws-cdk/aws-appmesh/package.json b/packages/@aws-cdk/aws-appmesh/package.json index 2789d9085284c..6b58c9981965a 100644 --- a/packages/@aws-cdk/aws-appmesh/package.json +++ b/packages/@aws-cdk/aws-appmesh/package.json @@ -153,6 +153,7 @@ "resource-attribute:@aws-cdk/aws-appmesh.VirtualGateway.virtualGatewayResourceOwner", "resource-attribute:@aws-cdk/aws-appmesh.VirtualGateway.virtualGatewayUid", "resource-attribute:@aws-cdk/aws-appmesh.VirtualNode.virtualNodeMeshName", + "duration-prop-type:@aws-cdk/aws-appmesh.VirtualNodeListener.timeout", "resource-attribute:@aws-cdk/aws-appmesh.VirtualNode.virtualNodeMeshOwner", "resource-attribute:@aws-cdk/aws-appmesh.VirtualNode.virtualNodeResourceOwner", "resource-attribute:@aws-cdk/aws-appmesh.VirtualNode.virtualNodeUid", @@ -172,7 +173,11 @@ "props-default-doc:@aws-cdk/aws-appmesh.VirtualRouterAttributes.virtualRouterName", "docs-public-apis:@aws-cdk/aws-appmesh.Protocol.HTTP", "docs-public-apis:@aws-cdk/aws-appmesh.Protocol.HTTP2", - "docs-public-apis:@aws-cdk/aws-appmesh.Protocol.GRPC" + "docs-public-apis:@aws-cdk/aws-appmesh.Protocol.GRPC", + "duration-prop-type:@aws-cdk/aws-appmesh.GrpcVirtualNodeListenerOptions.timeout", + "duration-prop-type:@aws-cdk/aws-appmesh.HttpVirtualNodeListenerOptions.timeout", + "duration-prop-type:@aws-cdk/aws-appmesh.Http2VirtualNodeListenerOptions.timeout", + "duration-prop-type:@aws-cdk/aws-appmesh.TcpVirtualNodeListenerOptions.timeout" ] }, "stability": "experimental", diff --git a/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts b/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts index 3de6eb20c77d2..8bad51d706a32 100644 --- a/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts +++ b/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts @@ -31,18 +31,18 @@ const virtualService = mesh.addVirtualService('service', { const node = mesh.addVirtualNode('node', { dnsHostName: `node1.${namespace.namespaceName}`, - listener: { + listeners: [appmesh.VirtualNodeListener.http({ healthCheck: { healthyThreshold: 3, path: '/check-path', }, - }, + })], backends: [ virtualService, ], }); -node.addBackends(new appmesh.VirtualService(stack, 'service-2', { +node.addBackend(new appmesh.VirtualService(stack, 'service-2', { virtualServiceName: 'service2.domain.local', mesh, }), @@ -60,7 +60,7 @@ router.addRoute('route-1', { const node2 = mesh.addVirtualNode('node2', { dnsHostName: `node2.${namespace.namespaceName}`, - listener: { + listeners: [appmesh.VirtualNodeListener.http({ healthCheck: { healthyThreshold: 3, interval: cdk.Duration.seconds(5), @@ -70,7 +70,7 @@ const node2 = mesh.addVirtualNode('node2', { timeout: cdk.Duration.seconds(2), unhealthyThreshold: 2, }, - }, + })], backends: [ new appmesh.VirtualService(stack, 'service-3', { virtualServiceName: 'service3.domain.local', @@ -81,7 +81,7 @@ const node2 = mesh.addVirtualNode('node2', { const node3 = mesh.addVirtualNode('node3', { dnsHostName: `node3.${namespace.namespaceName}`, - listener: { + listeners: [appmesh.VirtualNodeListener.http({ healthCheck: { healthyThreshold: 3, interval: cdk.Duration.seconds(5), @@ -91,7 +91,7 @@ const node3 = mesh.addVirtualNode('node3', { timeout: cdk.Duration.seconds(2), unhealthyThreshold: 2, }, - }, + })], accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout'), }); diff --git a/packages/@aws-cdk/aws-appmesh/test/test.health-check.ts b/packages/@aws-cdk/aws-appmesh/test/test.health-check.ts index 6f33658598efa..d65177a124b70 100644 --- a/packages/@aws-cdk/aws-appmesh/test/test.health-check.ts +++ b/packages/@aws-cdk/aws-appmesh/test/test.health-check.ts @@ -21,9 +21,9 @@ export = { const [min, max] = [5000, 300000]; // WHEN - const toThrow = (millis: number) => getNode(stack).addListeners({ + const toThrow = (millis: number) => getNode(stack).addListener(appmesh.VirtualNodeListener.http2({ healthCheck: { interval: cdk.Duration.millis(millis) }, - }); + })); // THEN test.doesNotThrow(() => toThrow(min)); @@ -40,9 +40,9 @@ export = { const [min, max] = [2000, 60000]; // WHEN - const toThrow = (millis: number) => getNode(stack).addListeners({ + const toThrow = (millis: number) => getNode(stack).addListener(appmesh.VirtualNodeListener.http2({ healthCheck: { timeout: cdk.Duration.millis(millis) }, - }); + })); // THEN test.doesNotThrow(() => toThrow(min)); @@ -59,9 +59,9 @@ export = { const [min, max] = [1, 65535]; // WHEN - const toThrow = (port: number) => getNode(stack).addListeners({ + const toThrow = (port: number) => getNode(stack).addListener(appmesh.VirtualNodeListener.http({ healthCheck: { port }, - }); + })); // THEN test.doesNotThrow(() => toThrow(min)); @@ -79,9 +79,9 @@ export = { const [min, max] = [2, 10]; // WHEN - const toThrow = (healthyThreshold: number) => getNode(stack).addListeners({ + const toThrow = (healthyThreshold: number) => getNode(stack).addListener(appmesh.VirtualNodeListener.http({ healthCheck: { healthyThreshold }, - }); + })); // THEN test.doesNotThrow(() => toThrow(min)); @@ -98,9 +98,9 @@ export = { const [min, max] = [2, 10]; // WHEN - const toThrow = (unhealthyThreshold: number) => getNode(stack).addListeners({ + const toThrow = (unhealthyThreshold: number) => getNode(stack).addListener(appmesh.VirtualNodeListener.http({ healthCheck: { unhealthyThreshold }, - }); + })); // THEN test.doesNotThrow(() => toThrow(min)); @@ -115,12 +115,12 @@ export = { const stack = new cdk.Stack(); // WHEN - const toThrow = (protocol: appmesh.Protocol) => getNode(stack).addListeners({ + const toThrow = (protocol: appmesh.Protocol) => getNode(stack).addListener(appmesh.VirtualNodeListener.http({ healthCheck: { protocol, path: '/', }, - }); + })); // THEN test.doesNotThrow(() => toThrow(appmesh.Protocol.HTTP)); @@ -134,12 +134,12 @@ export = { const stack = new cdk.Stack(); // WHEN - const toThrow = (protocol: appmesh.Protocol) => getNode(stack).addListeners({ + const toThrow = (protocol: appmesh.Protocol) => getNode(stack).addListener(appmesh.VirtualNodeListener.http({ healthCheck: { protocol, path: '/', }, - }); + })); // THEN test.doesNotThrow(() => toThrow(appmesh.Protocol.HTTP)); @@ -148,4 +148,4 @@ export = { test.done(); }, -}; +}; \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appmesh/test/test.mesh.ts b/packages/@aws-cdk/aws-appmesh/test/test.mesh.ts index 690dce4a08ddc..1f67c708e561a 100644 --- a/packages/@aws-cdk/aws-appmesh/test/test.mesh.ts +++ b/packages/@aws-cdk/aws-appmesh/test/test.mesh.ts @@ -57,7 +57,7 @@ export = { 'When adding a Virtual Router to existing mesh': { 'with at least one complete port mappings': { - 'shoulld create proper router'(test: Test) { + 'should create proper router'(test: Test) { // GIVEN const stack = new cdk.Stack(); @@ -208,12 +208,9 @@ export = { const node = mesh.addVirtualNode('test-node', { dnsHostName: 'test.domain.local', - listener: { - portMapping: { - port: 8080, - protocol: appmesh.Protocol.HTTP, - }, - }, + listeners: [appmesh.VirtualNodeListener.http({ + port: 8080, + })], }); mesh.addVirtualService('service2', { @@ -287,12 +284,9 @@ export = { mesh.addVirtualNode('test-node', { dnsHostName: 'test.domain.local', - listener: { - portMapping: { - port: 8080, - protocol: appmesh.Protocol.HTTP, - }, - }, + listeners: [appmesh.VirtualNodeListener.http({ + port: 8080, + })], }); // THEN @@ -329,11 +323,8 @@ export = { mesh.addVirtualNode('test-node', { dnsHostName: 'test.domain.local', - listener: { - portMapping: { - port: 8080, - protocol: appmesh.Protocol.HTTP, - }, + listeners: [appmesh.VirtualNodeListener.http({ + port: 8080, healthCheck: { healthyThreshold: 3, path: '/', @@ -341,7 +332,7 @@ export = { timeout: cdk.Duration.seconds(2), // min unhealthyThreshold: 2, }, - }, + })], }); // THEN @@ -388,12 +379,9 @@ export = { mesh.addVirtualNode('test-node', { dnsHostName: 'test.domain.local', - listener: { - portMapping: { - port: 8080, - protocol: appmesh.Protocol.HTTP, - }, - }, + listeners: [appmesh.VirtualNodeListener.http({ + port: 8080, + })], backends: [ service1, ], diff --git a/packages/@aws-cdk/aws-appmesh/test/test.virtual-node.ts b/packages/@aws-cdk/aws-appmesh/test/test.virtual-node.ts index 06928a4a25351..75c7d0579e71b 100644 --- a/packages/@aws-cdk/aws-appmesh/test/test.virtual-node.ts +++ b/packages/@aws-cdk/aws-appmesh/test/test.virtual-node.ts @@ -28,41 +28,39 @@ export = { const node = new appmesh.VirtualNode(stack, 'test-node', { mesh, dnsHostName: 'test', - listener: {}, backends: [service1], }); - node.addBackends(service2); + node.addBackend(service2); // THEN - expect(stack).to( - haveResourceLike('AWS::AppMesh::VirtualNode', { - Spec: { - Backends: [ - { - VirtualService: { - VirtualServiceName: { - 'Fn::GetAtt': ['service1A48078CF', 'VirtualServiceName'], - }, + expect(stack).to(haveResourceLike('AWS::AppMesh::VirtualNode', { + Spec: { + Backends: [ + { + VirtualService: { + VirtualServiceName: { + 'Fn::GetAtt': ['service1A48078CF', 'VirtualServiceName'], }, }, - { - VirtualService: { - VirtualServiceName: { - 'Fn::GetAtt': ['service27C65CF7D', 'VirtualServiceName'], - }, + }, + { + VirtualService: { + VirtualServiceName: { + 'Fn::GetAtt': ['service27C65CF7D', 'VirtualServiceName'], }, }, - ], - }, - }), - ); + }, + ], + }, + })); test.done(); }, }, + 'when a single portmapping is added': { - 'should add the portmapping to the resoource'(test: Test) { + 'should add the portmapping to the resource'(test: Test) { // GIVEN const stack = new cdk.Stack(); @@ -75,28 +73,184 @@ export = { dnsHostName: 'test', }); - node.addListeners({ - portMapping: { - port: 8081, - protocol: appmesh.Protocol.TCP, + node.addListener(appmesh.VirtualNodeListener.tcp({ + port: 8081, + })); + + // THEN + expect(stack).to(haveResourceLike('AWS::AppMesh::VirtualNode', { + Spec: { + Listeners: [ + { + PortMapping: { + Port: 8081, + Protocol: 'tcp', + }, + }, + ], }, + })); + + test.done(); + }, + }, + + 'when a listener is added with timeout': { + 'should add the listener timeout to the resource'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + const mesh = new appmesh.Mesh(stack, 'mesh', { + meshName: 'test-mesh', + }); + + new appmesh.VirtualNode(stack, 'test-node', { + mesh, + dnsHostName: 'test', + listeners: [appmesh.VirtualNodeListener.grpc({ + port: 80, + timeout: { + idle: cdk.Duration.seconds(10), + perRequest: cdk.Duration.seconds(10), + }, + })], }); // THEN - expect(stack).to( - haveResourceLike('AWS::AppMesh::VirtualNode', { - Spec: { - Listeners: [ - { - PortMapping: { - Port: 8081, - Protocol: 'tcp', + expect(stack).to(haveResourceLike('AWS::AppMesh::VirtualNode', { + Spec: { + Listeners: [ + { + PortMapping: { + Port: 80, + Protocol: 'grpc', + }, + Timeout: { + GRPC: { + Idle: { + Unit: 'ms', + Value: 10000, + }, + PerRequest: { + Unit: 'ms', + Value: 10000, + }, }, }, - ], - }, - }), - ); + }, + ], + }, + })); + + test.done(); + }, + }, + + 'when a listener is added with healthcheck ': { + 'should add a default listener healthcheck to the resource'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + const mesh = new appmesh.Mesh(stack, 'mesh', { + meshName: 'test-mesh', + }); + + new appmesh.VirtualNode(stack, 'test-node', { + mesh, + dnsHostName: 'test', + listeners: [appmesh.VirtualNodeListener.http2({ + port: 80, + healthCheck: {}, + timeout: { idle: cdk.Duration.seconds(10) }, + })], + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::AppMesh::VirtualNode', { + Spec: { + Listeners: [ + { + HealthCheck: { + HealthyThreshold: 2, + IntervalMillis: 5000, + Port: 80, + Protocol: 'http2', + TimeoutMillis: 2000, + UnhealthyThreshold: 2, + }, + PortMapping: { + Port: 80, + Protocol: 'http2', + }, + Timeout: { + HTTP2: { + Idle: { + Unit: 'ms', + Value: 10000, + }, + }, + }, + }, + ], + }, + })); + + test.done(); + }, + }, + + 'when a listener is added with healthcheck with user defined props': { + 'should add a listener healthcheck to the resource'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + const mesh = new appmesh.Mesh(stack, 'mesh', { + meshName: 'test-mesh', + }); + + const node = new appmesh.VirtualNode(stack, 'test-node', { + mesh, + dnsHostName: 'test', + }); + + node.addListener(appmesh.VirtualNodeListener.tcp({ + port: 80, + healthCheck: { timeout: cdk.Duration.seconds(3) }, + timeout: { idle: cdk.Duration.seconds(10) }, + })); + + // THEN + expect(stack).to(haveResourceLike('AWS::AppMesh::VirtualNode', { + Spec: { + Listeners: [ + { + HealthCheck: { + HealthyThreshold: 2, + IntervalMillis: 5000, + Port: 80, + Protocol: 'tcp', + TimeoutMillis: 3000, + UnhealthyThreshold: 2, + }, + PortMapping: { + Port: 80, + Protocol: 'tcp', + }, + Timeout: { + TCP: { + Idle: { + Unit: 'ms', + Value: 10000, + }, + }, + }, + }, + ], + }, + })); test.done(); }, diff --git a/packages/@aws-cdk/aws-appmesh/test/test.virtual-router.ts b/packages/@aws-cdk/aws-appmesh/test/test.virtual-router.ts index 72510c83c4de2..56960564d6981 100644 --- a/packages/@aws-cdk/aws-appmesh/test/test.virtual-router.ts +++ b/packages/@aws-cdk/aws-appmesh/test/test.virtual-router.ts @@ -106,13 +106,9 @@ export = { const node = mesh.addVirtualNode('test-node', { dnsHostName: 'test', - listener: { - portMapping: - { - port: 8080, - protocol: appmesh.Protocol.HTTP, - }, - }, + listeners: [appmesh.VirtualNodeListener.http({ + port: 8080, + })], backends: [service1], }); @@ -179,39 +175,27 @@ export = { const node = mesh.addVirtualNode('test-node', { dnsHostName: 'test', - listener: { - portMapping: - { - port: 8080, - protocol: appmesh.Protocol.HTTP, - }, - }, + listeners: [appmesh.VirtualNodeListener.http({ + port: 8080, + })], backends: [ service1, ], }); const node2 = mesh.addVirtualNode('test-node2', { dnsHostName: 'test', - listener: { - portMapping: - { - port: 8080, - protocol: appmesh.Protocol.HTTP, - }, - }, + listeners: [appmesh.VirtualNodeListener.http({ + port: 8080, + })], backends: [ service2, ], }); const node3 = mesh.addVirtualNode('test-node3', { dnsHostName: 'test', - listener: { - portMapping: - { - port: 8080, - protocol: appmesh.Protocol.HTTP, - }, - }, + listeners: [appmesh.VirtualNodeListener.http({ + port: 8080, + })], backends: [ service1, ], @@ -337,13 +321,9 @@ export = { const node = mesh.addVirtualNode('test-node', { dnsHostName: 'test', - listener: { - portMapping: - { - port: 8080, - protocol: appmesh.Protocol.HTTP, - }, - }, + listeners: [appmesh.VirtualNodeListener.http({ + port: 8080, + })], backends: [ service1, ], diff --git a/packages/@aws-cdk/aws-autoscaling-common/package.json b/packages/@aws-cdk/aws-autoscaling-common/package.json index 805460b6ef2ba..aa66b53be704c 100644 --- a/packages/@aws-cdk/aws-autoscaling-common/package.json +++ b/packages/@aws-cdk/aws-autoscaling-common/package.json @@ -67,7 +67,7 @@ "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "fast-check": "^2.6.1", + "fast-check": "^2.7.0", "nodeunit": "^0.11.3", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/aws-autoscaling/lib/auto-scaling-group.ts b/packages/@aws-cdk/aws-autoscaling/lib/auto-scaling-group.ts index 3b6ade93606be..cf5f6acbcbf71 100644 --- a/packages/@aws-cdk/aws-autoscaling/lib/auto-scaling-group.ts +++ b/packages/@aws-cdk/aws-autoscaling/lib/auto-scaling-group.ts @@ -10,6 +10,7 @@ import { Aws, CfnAutoScalingRollingUpdate, CfnCreationPolicy, CfnUpdatePolicy, Duration, Fn, IResource, Lazy, PhysicalName, Resource, Stack, Tags, + Token, Tokenization, withResolved, } from '@aws-cdk/core'; import { Construct } from 'constructs'; @@ -765,10 +766,24 @@ abstract class AutoScalingGroupBase extends Resource implements IAutoScalingGrou const resourceLabel = `${this.albTargetGroup.firstLoadBalancerFullName}/${this.albTargetGroup.targetGroupFullName}`; + if ((props.targetRequestsPerMinute === undefined) === (props.targetRequestsPerSecond === undefined)) { + throw new Error('Specify exactly one of \'targetRequestsPerMinute\' or \'targetRequestsPerSecond\''); + } + + let rpm: number; + if (props.targetRequestsPerSecond !== undefined) { + if (Token.isUnresolved(props.targetRequestsPerSecond)) { + throw new Error('\'targetRequestsPerSecond\' cannot be an unresolved value; use \'targetRequestsPerMinute\' instead.'); + } + rpm = props.targetRequestsPerSecond * 60; + } else { + rpm = props.targetRequestsPerMinute!; + } + const policy = new TargetTrackingScalingPolicy(this, `ScalingPolicy${id}`, { autoScalingGroup: this, predefinedMetric: PredefinedMetric.ALB_REQUEST_COUNT_PER_TARGET, - targetValue: props.targetRequestsPerSecond, + targetValue: rpm, resourceLabel, ...props, }); @@ -1603,8 +1618,17 @@ export interface NetworkUtilizationScalingProps extends BaseTargetTrackingProps export interface RequestCountScalingProps extends BaseTargetTrackingProps { /** * Target average requests/seconds on each instance + * + * @deprecated Use 'targetRequestsPerMinute' instead + * @default - Specify exactly one of 'targetRequestsPerSecond' and 'targetRequestsPerSecond' + */ + readonly targetRequestsPerSecond?: number; + + /** + * Target average requests/minute on each instance + * @default - Specify exactly one of 'targetRequestsPerSecond' and 'targetRequestsPerSecond' */ - readonly targetRequestsPerSecond: number; + readonly targetRequestsPerMinute?: number; } /** diff --git a/packages/@aws-cdk/aws-autoscaling/test/integ.asg-w-elbv2.expected.json b/packages/@aws-cdk/aws-autoscaling/test/integ.asg-w-elbv2.expected.json index e6dde4e4c0d4e..34f240a76559d 100644 --- a/packages/@aws-cdk/aws-autoscaling/test/integ.asg-w-elbv2.expected.json +++ b/packages/@aws-cdk/aws-autoscaling/test/integ.asg-w-elbv2.expected.json @@ -568,7 +568,7 @@ ] } }, - "TargetValue": 1 + "TargetValue": 60 } }, "DependsOn": [ diff --git a/packages/@aws-cdk/aws-autoscaling/test/scaling.test.ts b/packages/@aws-cdk/aws-autoscaling/test/scaling.test.ts index 10687702a56b1..86604a52d3404 100644 --- a/packages/@aws-cdk/aws-autoscaling/test/scaling.test.ts +++ b/packages/@aws-cdk/aws-autoscaling/test/scaling.test.ts @@ -75,7 +75,7 @@ nodeunitShim({ test.done(); }, - 'request count'(test: Test) { + 'request count per second'(test: Test) { // GIVEN const stack = new cdk.Stack(); const fixture = new ASGFixture(stack, 'Fixture'); @@ -99,6 +99,54 @@ nodeunitShim({ ], }; + expect(stack).to(haveResource('AWS::AutoScaling::ScalingPolicy', { + PolicyType: 'TargetTrackingScaling', + TargetTrackingConfiguration: { + TargetValue: 600, + PredefinedMetricSpecification: { + PredefinedMetricType: 'ALBRequestCountPerTarget', + ResourceLabel: { + 'Fn::Join': ['', [ + { 'Fn::Select': [1, arnParts] }, + '/', + { 'Fn::Select': [2, arnParts] }, + '/', + { 'Fn::Select': [3, arnParts] }, + '/', + { 'Fn::GetAtt': ['ALBListenerTargetsGroup01D7716A', 'TargetGroupFullName'] }, + ]], + }, + }, + }, + })); + + test.done(); + }, + + 'request count per minute'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const fixture = new ASGFixture(stack, 'Fixture'); + const alb = new elbv2.ApplicationLoadBalancer(stack, 'ALB', { vpc: fixture.vpc }); + const listener = alb.addListener('Listener', { port: 80 }); + listener.addTargets('Targets', { + port: 80, + targets: [fixture.asg], + }); + + // WHEN + fixture.asg.scaleOnRequestCount('ScaleRequest', { + targetRequestsPerMinute: 10, + }); + + // THEN + const arnParts = { + 'Fn::Split': [ + '/', + { Ref: 'ALBListener3B99FF85' }, + ], + }; + expect(stack).to(haveResource('AWS::AutoScaling::ScalingPolicy', { PolicyType: 'TargetTrackingScaling', TargetTrackingConfiguration: { diff --git a/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json b/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json index 9f25bfc9d6683..85da591914c1d 100644 --- a/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json +++ b/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json @@ -29,15 +29,15 @@ "devDependencies": { "aws-sdk": "^2.596.0", "aws-sdk-mock": "^5.1.0", - "eslint": "^7.12.1", + "eslint": "^7.13.0", "eslint-config-standard": "^14.1.1", "eslint-plugin-import": "^2.22.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-standard": "^4.0.2", + "eslint-plugin-standard": "^4.1.0", "jest": "^26.6.3", "lambda-tester": "^3.6.0", - "nock": "^13.0.4", - "ts-jest": "^26.4.3" + "nock": "^13.0.5", + "ts-jest": "^26.4.4" } } diff --git a/packages/@aws-cdk/aws-cloudfront-origins/package.json b/packages/@aws-cdk/aws-cloudfront-origins/package.json index 06e954237cdf8..8d8b0c2b4d64f 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/package.json +++ b/packages/@aws-cdk/aws-cloudfront-origins/package.json @@ -72,7 +72,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.792.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "pkglint": "0.0.0" diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index 587776d1d4edb..7a1649e201239 100644 --- a/packages/@aws-cdk/aws-cloudfront/package.json +++ b/packages/@aws-cdk/aws-cloudfront/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.792.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index 3146f7f682988..462a90b482570 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.792.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codebuild/package.json b/packages/@aws-cdk/aws-codebuild/package.json index 001cec43f99fd..93ac42962e90c 100644 --- a/packages/@aws-cdk/aws-codebuild/package.json +++ b/packages/@aws-cdk/aws-codebuild/package.json @@ -79,7 +79,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.792.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codecommit/package.json b/packages/@aws-cdk/aws-codecommit/package.json index 53beb4f72810b..aa76ed05a103f 100644 --- a/packages/@aws-cdk/aws-codecommit/package.json +++ b/packages/@aws-cdk/aws-codecommit/package.json @@ -79,7 +79,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.792.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codepipeline-actions/README.md b/packages/@aws-cdk/aws-codepipeline-actions/README.md index 6578110867b33..12e2bfa5437cf 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/README.md +++ b/packages/@aws-cdk/aws-codepipeline-actions/README.md @@ -646,6 +646,7 @@ const deployStage = pipeline.addStage({ // use the `imageFile` property, // and leave out the `input` property imageFile: buildOutput.atPath('imageDef.json'), + deploymentTimeout: cdk.Duration.minutes(60), // optional, default is 60 minutes }), ], }); diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/ecs/deploy-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/ecs/deploy-action.ts index eb2bd88a72100..ec5dfb7ad2999 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/ecs/deploy-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/ecs/deploy-action.ts @@ -1,7 +1,7 @@ import * as codepipeline from '@aws-cdk/aws-codepipeline'; import * as ecs from '@aws-cdk/aws-ecs'; import * as iam from '@aws-cdk/aws-iam'; -import { Construct } from '@aws-cdk/core'; +import { Construct, Duration } from '@aws-cdk/core'; import { Action } from '../action'; import { deployArtifactBounds } from '../common'; @@ -40,6 +40,14 @@ export interface EcsDeployActionProps extends codepipeline.CommonAwsActionProps * The ECS Service to deploy. */ readonly service: ecs.IBaseService; + + /** + * Timeout for the ECS deployment in minutes. Value must be between 1-60. + * + * @default - 60 minutes + * @see https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference-ECS.html + */ + readonly deploymentTimeout?: Duration; } /** @@ -47,6 +55,7 @@ export interface EcsDeployActionProps extends codepipeline.CommonAwsActionProps */ export class EcsDeployAction extends Action { private readonly props: EcsDeployActionProps; + private readonly deploymentTimeout?: number constructor(props: EcsDeployActionProps) { super({ @@ -58,7 +67,13 @@ export class EcsDeployAction extends Action { resource: props.service, }); + const deploymentTimeout = props.deploymentTimeout?.toMinutes({ integral: true }); + if (deploymentTimeout !== undefined && (deploymentTimeout < 1 || deploymentTimeout > 60)) { + throw new Error(`Deployment timeout must be between 1 and 60 minutes, got: ${deploymentTimeout}`); + } + this.props = props; + this.deploymentTimeout = deploymentTimeout; } protected bound(_scope: Construct, _stage: codepipeline.IStage, options: codepipeline.ActionBindOptions): @@ -96,7 +111,8 @@ export class EcsDeployAction extends Action { configuration: { ClusterName: this.props.service.cluster.clusterName, ServiceName: this.props.service.serviceName, - FileName: this.props.imageFile && this.props.imageFile.fileName, + FileName: this.props.imageFile?.fileName, + DeploymentTimeout: this.deploymentTimeout, }, }; } diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/ecs/test.ecs-deploy-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/ecs/test.ecs-deploy-action.ts index 8bc27b3a4a12e..1343850871206 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/ecs/test.ecs-deploy-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/ecs/test.ecs-deploy-action.ts @@ -68,6 +68,56 @@ export = { test.done(); }, + 'can be created with deploymentTimeout between 1-60 minutes'(test: Test) { + const service = anyEcsService(); + const artifact = new codepipeline.Artifact('Artifact'); + + test.doesNotThrow(() => { + new cpactions.EcsDeployAction({ + actionName: 'ECS', + service, + input: artifact, + deploymentTimeout: cdk.Duration.minutes(30), + }); + }); + + test.done(); + }, + + 'throws an exception if deploymentTimeout is out of bounds'(test: Test) { + const service = anyEcsService(); + const artifact = new codepipeline.Artifact('Artifact'); + + test.throws(() => { + new cpactions.EcsDeployAction({ + actionName: 'ECS', + service, + input: artifact, + deploymentTimeout: cdk.Duration.minutes(61), + }); + }, /timeout must be between 1 and 60 minutes/); + + test.throws(() => { + new cpactions.EcsDeployAction({ + actionName: 'ECS', + service, + input: artifact, + deploymentTimeout: cdk.Duration.minutes(0), + }); + }, /timeout must be between 1 and 60 minutes/); + + test.throws(() => { + new cpactions.EcsDeployAction({ + actionName: 'ECS', + service, + input: artifact, + deploymentTimeout: cdk.Duration.seconds(30), + }); + }, /cannot be converted into a whole number/); + + test.done(); + }, + "sets the target service as the action's backing resource"(test: Test) { const service = anyEcsService(); const artifact = new codepipeline.Artifact('Artifact'); diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.expected.json index 2d6b137036065..1114a3dc28356 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.expected.json +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.expected.json @@ -737,7 +737,8 @@ "FargateServiceAC2B3B85", "Name" ] - } + }, + "DeploymentTimeout": 60 }, "InputArtifacts": [ { diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts index e969e350482dc..08c5b970112b1 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts @@ -102,6 +102,7 @@ new codepipeline.Pipeline(stack, 'MyPipeline', { actionName: 'DeployAction', input: buildOutput, service, + deploymentTimeout: cdk.Duration.minutes(60), }), ], }, diff --git a/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json b/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json index e19b1fe502b2d..2dc031452ab61 100644 --- a/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json +++ b/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json @@ -29,14 +29,14 @@ "devDependencies": { "aws-sdk": "^2.596.0", "aws-sdk-mock": "^5.1.0", - "eslint": "^7.12.1", + "eslint": "^7.13.0", "eslint-config-standard": "^14.1.1", "eslint-plugin-import": "^2.22.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-standard": "^4.0.2", + "eslint-plugin-standard": "^4.1.0", "jest": "^26.6.3", "lambda-tester": "^3.6.0", - "nock": "^13.0.4" + "nock": "^13.0.5" } } diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index d4de8e8e1d2a0..6df9c614e864d 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -74,7 +74,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/jest": "^26.0.15", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.792.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-ec2/lib/vpc.ts b/packages/@aws-cdk/aws-ec2/lib/vpc.ts index f73a3b4c08c2a..e46113b14c89a 100644 --- a/packages/@aws-cdk/aws-ec2/lib/vpc.ts +++ b/packages/@aws-cdk/aws-ec2/lib/vpc.ts @@ -1485,6 +1485,12 @@ export class Subnet extends Resource implements ISubnet { */ public readonly subnetIpv6CidrBlocks: string[]; + /** + * The Amazon Resource Name (ARN) of the Outpost for this subnet (if one exists). + * @attribute + */ + public readonly subnetOutpostArn: string; + /** * @attribute */ @@ -1525,6 +1531,7 @@ export class Subnet extends Resource implements ISubnet { this.subnetVpcId = subnet.attrVpcId; this.subnetAvailabilityZone = subnet.attrAvailabilityZone; this.subnetIpv6CidrBlocks = subnet.attrIpv6CidrBlocks; + this.subnetOutpostArn = subnet.attrOutpostArn; // subnet.attrNetworkAclAssociationId is the default ACL after the subnet // was just created. However, the ACL can be replaced at a later time. diff --git a/packages/@aws-cdk/aws-ecr-assets/NOTICE b/packages/@aws-cdk/aws-ecr-assets/NOTICE index c760ec779c75e..3441c3b03a3fd 100644 --- a/packages/@aws-cdk/aws-ecr-assets/NOTICE +++ b/packages/@aws-cdk/aws-ecr-assets/NOTICE @@ -21,3 +21,71 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------- + +** brace-expansion - https://www.npmjs.com/package/brace-expansion +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- + +** balanced-match - https://www.npmjs.com/package/balanced-match +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- + +** concat-map - https://www.npmjs.com/package/concat-map + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecr-assets/package.json b/packages/@aws-cdk/aws-ecr-assets/package.json index fcf7739ca7254..093fecd65c662 100644 --- a/packages/@aws-cdk/aws-ecr-assets/package.json +++ b/packages/@aws-cdk/aws-ecr-assets/package.json @@ -77,7 +77,6 @@ "dependencies": { "@aws-cdk/aws-ecr": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", - "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/assets": "0.0.0", @@ -90,7 +89,6 @@ "@aws-cdk/aws-ecr": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/assets": "0.0.0", - "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/cx-api": "0.0.0", diff --git a/packages/@aws-cdk/aws-ecr/lib/repository.ts b/packages/@aws-cdk/aws-ecr/lib/repository.ts index de4034df584e1..53990d1e07934 100644 --- a/packages/@aws-cdk/aws-ecr/lib/repository.ts +++ b/packages/@aws-cdk/aws-ecr/lib/repository.ts @@ -1,7 +1,6 @@ import * as events from '@aws-cdk/aws-events'; import * as iam from '@aws-cdk/aws-iam'; import { IResource, Lazy, RemovalPolicy, Resource, Stack, Token } from '@aws-cdk/core'; -import * as cr from '@aws-cdk/custom-resources'; import { IConstruct, Construct } from 'constructs'; import { CfnRepository } from './ecr.generated'; import { LifecycleRule, TagStatus } from './lifecycle'; @@ -420,6 +419,9 @@ export class Repository extends RepositoryBase { // It says "Text", but they actually mean "Object". repositoryPolicyText: Lazy.anyValue({ produce: () => this.policyDocument }), lifecyclePolicy: Lazy.anyValue({ produce: () => this.renderLifecyclePolicy() }), + imageScanningConfiguration: !props.imageScanOnPush ? undefined : { + scanOnPush: true, + }, }); resource.applyRemovalPolicy(props.removalPolicy); @@ -435,36 +437,6 @@ export class Repository extends RepositoryBase { resource: 'repository', resourceName: this.physicalName, }); - - // image scanOnPush - if (props.imageScanOnPush) { - new cr.AwsCustomResource(this, 'ImageScanOnPush', { - resourceType: 'Custom::ECRImageScanOnPush', - onUpdate: { - service: 'ECR', - action: 'putImageScanningConfiguration', - parameters: { - repositoryName: this.repositoryName, - imageScanningConfiguration: { - scanOnPush: props.imageScanOnPush, - }, - }, - physicalResourceId: cr.PhysicalResourceId.of(this.repositoryArn), - }, - onDelete: { - service: 'ECR', - action: 'putImageScanningConfiguration', - parameters: { - repositoryName: this.repositoryName, - imageScanningConfiguration: { - scanOnPush: false, - }, - }, - physicalResourceId: cr.PhysicalResourceId.of(this.repositoryArn), - }, - policy: cr.AwsCustomResourcePolicy.fromSdkCalls({ resources: [this.repositoryArn] }), - }); - } } public addToResourcePolicy(statement: iam.PolicyStatement): iam.AddToResourcePolicyResult { diff --git a/packages/@aws-cdk/aws-ecr/package.json b/packages/@aws-cdk/aws-ecr/package.json index a7b56a5a00298..76833c3af96af 100644 --- a/packages/@aws-cdk/aws-ecr/package.json +++ b/packages/@aws-cdk/aws-ecr/package.json @@ -86,7 +86,6 @@ "dependencies": { "@aws-cdk/aws-events": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", - "@aws-cdk/custom-resources": "0.0.0", "@aws-cdk/core": "0.0.0", "constructs": "^3.2.0" }, @@ -94,7 +93,6 @@ "peerDependencies": { "@aws-cdk/aws-events": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", - "@aws-cdk/custom-resources": "0.0.0", "@aws-cdk/core": "0.0.0", "constructs": "^3.2.0" }, diff --git a/packages/@aws-cdk/aws-ecr/test/integ.imagescan.expected.json b/packages/@aws-cdk/aws-ecr/test/integ.imagescan.expected.json index 76cd5933128c1..5367d722f62c9 100644 --- a/packages/@aws-cdk/aws-ecr/test/integ.imagescan.expected.json +++ b/packages/@aws-cdk/aws-ecr/test/integ.imagescan.expected.json @@ -2,107 +2,13 @@ "Resources": { "Repo02AC86CF": { "Type": "AWS::ECR::Repository", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "RepoImageScanOnPush94CFD98F": { - "Type": "Custom::ECRImageScanOnPush", "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "service": "ECR", - "action": "putImageScanningConfiguration", - "parameters": { - "repositoryName": { - "Ref": "Repo02AC86CF" - }, - "imageScanningConfiguration": { - "scanOnPush": "TRUE:BOOLEAN" - } - }, - "physicalResourceId": { - "id": { - "Fn::GetAtt": [ - "Repo02AC86CF", - "Arn" - ] - } - } - }, - "Update": { - "service": "ECR", - "action": "putImageScanningConfiguration", - "parameters": { - "repositoryName": { - "Ref": "Repo02AC86CF" - }, - "imageScanningConfiguration": { - "scanOnPush": "TRUE:BOOLEAN" - } - }, - "physicalResourceId": { - "id": { - "Fn::GetAtt": [ - "Repo02AC86CF", - "Arn" - ] - } - } - }, - "Delete": { - "service": "ECR", - "action": "putImageScanningConfiguration", - "parameters": { - "repositoryName": { - "Ref": "Repo02AC86CF" - }, - "imageScanningConfiguration": { - "scanOnPush": "FALSE:BOOLEAN" - } - }, - "physicalResourceId": { - "id": { - "Fn::GetAtt": [ - "Repo02AC86CF", - "Arn" - ] - } - } - }, - "InstallLatestAwsSdk": true + "ImageScanningConfiguration": { + "scanOnPush": true + } }, "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete", - "DependsOn": [ - "RepoImageScanOnPushCustomResourcePolicy556E941E" - ] - }, - "RepoImageScanOnPushCustomResourcePolicy556E941E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action":"ecr:PutImageScanningConfiguration", - "Effect":"Allow", - "Resource": { - "Fn::GetAtt": [ - "Repo02AC86CF", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "RepoImageScanOnPushCustomResourcePolicy556E941E", - "Roles": [{"Ref":"AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2"}] - } + "DeletionPolicy": "Delete" }, "RepoImageScanComplete7BC71935": { "Type": "AWS::Events::Rule", @@ -127,106 +33,6 @@ }, "State": "ENABLED" } - }, - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AWS679f53fac002430cb0da5b7982bd22872D164C4C": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersd731b1475f16a318a48a76c83d255f7422cfa5f025c5bff93537b8f0b8e94557S3BucketA250C084" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersd731b1475f16a318a48a76c83d255f7422cfa5f025c5bff93537b8f0b8e94557S3VersionKeyDC4F0CD7" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersd731b1475f16a318a48a76c83d255f7422cfa5f025c5bff93537b8f0b8e94557S3VersionKeyDC4F0CD7" - } - ] - } - ] - } - ] - ] - } - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2", - "Arn" - ] - }, - "Runtime": "nodejs12.x", - "Timeout": 120 - }, - "DependsOn": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - ] - } - }, - "Parameters": { - "AssetParametersd731b1475f16a318a48a76c83d255f7422cfa5f025c5bff93537b8f0b8e94557S3BucketA250C084": { - "Type": "String", - "Description": "S3 bucket for asset \"d731b1475f16a318a48a76c83d255f7422cfa5f025c5bff93537b8f0b8e94557\"" - }, - "AssetParametersd731b1475f16a318a48a76c83d255f7422cfa5f025c5bff93537b8f0b8e94557S3VersionKeyDC4F0CD7": { - "Type": "String", - "Description": "S3 key for asset version \"d731b1475f16a318a48a76c83d255f7422cfa5f025c5bff93537b8f0b8e94557\"" - }, - "AssetParametersd731b1475f16a318a48a76c83d255f7422cfa5f025c5bff93537b8f0b8e94557ArtifactHash5701DE73": { - "Type": "String", - "Description": "Artifact hash for asset \"d731b1475f16a318a48a76c83d255f7422cfa5f025c5bff93537b8f0b8e94557\"" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-ecr/test/test.repository.ts b/packages/@aws-cdk/aws-ecr/test/test.repository.ts index 73e5f21d28115..20c53f1a3032a 100644 --- a/packages/@aws-cdk/aws-ecr/test/test.repository.ts +++ b/packages/@aws-cdk/aws-ecr/test/test.repository.ts @@ -28,7 +28,7 @@ export = { test.done(); }, - 'repository creation with imageScanOnPush creates custom resource'(test: Test) { + 'repository creation with imageScanOnPush'(test: Test) { // GIVEN const stack = new cdk.Stack(); @@ -36,7 +36,11 @@ export = { new ecr.Repository(stack, 'Repo', { imageScanOnPush: true }); // THEN - expect(stack).to(haveResource('Custom::ECRImageScanOnPush')); + expect(stack).to(haveResource('AWS::ECR::Repository', { + ImageScanningConfiguration: { + scanOnPush: true, + }, + })); test.done(); }, diff --git a/packages/@aws-cdk/aws-ecs/README.md b/packages/@aws-cdk/aws-ecs/README.md index d63f9974cc76c..d0c7cce7965d2 100644 --- a/packages/@aws-cdk/aws-ecs/README.md +++ b/packages/@aws-cdk/aws-ecs/README.md @@ -298,7 +298,7 @@ taskDefinition.addContainer('container', { }, secrets: { // Retrieved from AWS Secrets Manager or AWS Systems Manager Parameter Store at container start-up. SECRET: ecs.Secret.fromSecretsManager(secret), - DB_PASSWORD: ecs.Secret.fromSecretsManager(dbSecret, 'password'), // Reference a specific JSON field + DB_PASSWORD: ecs.Secret.fromSecretsManager(dbSecret, 'password'), // Reference a specific JSON field, (requires platform version 1.4.0 or later for Fargate tasks) PARAMETER: ecs.Secret.fromSsmParameter(parameter), } }); diff --git a/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts b/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts index 948ce4ea8ae90..862193b11fe3b 100644 --- a/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts +++ b/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts @@ -261,6 +261,8 @@ export class TaskDefinition extends TaskDefinitionBase { private _executionRole?: iam.IRole; + private _referencesSecretJsonField?: boolean; + /** * Constructs a new instance of the TaskDefinition class. */ @@ -435,6 +437,9 @@ export class TaskDefinition extends TaskDefinitionBase { if (this.defaultContainer === undefined && container.essential) { this.defaultContainer = container; } + if (container.referencesSecretJsonField) { + this._referencesSecretJsonField = true; + } } /** @@ -476,6 +481,14 @@ export class TaskDefinition extends TaskDefinitionBase { return this._executionRole; } + /** + * Whether this task definition has at least a container that references a + * specific JSON field of a secret stored in Secrets Manager. + */ + public get referencesSecretJsonField(): boolean | undefined { + return this._referencesSecretJsonField; + } + /** * Validates the task definition. */ diff --git a/packages/@aws-cdk/aws-ecs/lib/container-definition.ts b/packages/@aws-cdk/aws-ecs/lib/container-definition.ts index 93fa347799d38..d8ceec33c4a1c 100644 --- a/packages/@aws-cdk/aws-ecs/lib/container-definition.ts +++ b/packages/@aws-cdk/aws-ecs/lib/container-definition.ts @@ -355,6 +355,12 @@ export class ContainerDefinition extends cdk.Construct { */ public readonly logDriverConfig?: LogDriverConfig; + /** + * Whether this container definition references a specific JSON field of a secret + * stored in Secrets Manager. + */ + public readonly referencesSecretJsonField?: boolean; + /** * The configured container links */ @@ -384,13 +390,12 @@ export class ContainerDefinition extends cdk.Construct { if (props.logging) { this.logDriverConfig = props.logging.bind(this, this); } - props.taskDefinition._linkContainer(this); if (props.secrets) { this.secrets = []; for (const [name, secret] of Object.entries(props.secrets)) { - if (this.taskDefinition.isFargateCompatible && secret.hasField) { - throw new Error(`Cannot specify secret JSON field for a task using the FARGATE launch type: '${name}' in container '${this.node.id}'`); + if (secret.hasField) { + this.referencesSecretJsonField = true; } secret.grantRead(this.taskDefinition.obtainExecutionRole()); this.secrets.push({ @@ -399,6 +404,8 @@ export class ContainerDefinition extends cdk.Construct { }); } } + + props.taskDefinition._linkContainer(this); } /** diff --git a/packages/@aws-cdk/aws-ecs/lib/fargate/fargate-service.ts b/packages/@aws-cdk/aws-ecs/lib/fargate/fargate-service.ts index e709b705dfa29..fd0c4bbac64b5 100644 --- a/packages/@aws-cdk/aws-ecs/lib/fargate/fargate-service.ts +++ b/packages/@aws-cdk/aws-ecs/lib/fargate/fargate-service.ts @@ -141,6 +141,12 @@ export class FargateService extends BaseService implements IFargateService { throw new Error('Only one of SecurityGroup or SecurityGroups can be populated.'); } + if (props.taskDefinition.referencesSecretJsonField + && props.platformVersion + && SECRET_JSON_FIELD_UNSUPPORTED_PLATFORM_VERSIONS.includes(props.platformVersion)) { + throw new Error(`The task definition of this service uses at least one container that references a secret JSON field. This feature requires platform version ${FargatePlatformVersion.VERSION1_4} or later.`); + } + const propagateTagsFromSource = props.propagateTaskTagsFrom !== undefined ? props.propagateTaskTagsFrom : (props.propagateTags !== undefined ? props.propagateTags : PropagatedTagSource.NONE); @@ -219,3 +225,10 @@ export enum FargatePlatformVersion { */ VERSION1_0 = '1.0.0', } + +const SECRET_JSON_FIELD_UNSUPPORTED_PLATFORM_VERSIONS = [ + FargatePlatformVersion.VERSION1_0, + FargatePlatformVersion.VERSION1_1, + FargatePlatformVersion.VERSION1_2, + FargatePlatformVersion.VERSION1_3, +]; diff --git a/packages/@aws-cdk/aws-ecs/test/fargate/integ.secret.expected.json b/packages/@aws-cdk/aws-ecs/test/fargate/integ.secret.expected.json index 39896001c0e67..2ef36fdc4d94a 100644 --- a/packages/@aws-cdk/aws-ecs/test/fargate/integ.secret.expected.json +++ b/packages/@aws-cdk/aws-ecs/test/fargate/integ.secret.expected.json @@ -40,6 +40,20 @@ "ValueFrom": { "Ref": "SecretA720EF05" } + }, + { + "Name": "PASSWORD", + "ValueFrom": { + "Fn::Join": [ + "", + [ + { + "Ref": "SecretA720EF05" + }, + ":password::" + ] + ] + } } ] } @@ -109,4 +123,4 @@ } } } -} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/fargate/integ.secret.ts b/packages/@aws-cdk/aws-ecs/test/fargate/integ.secret.ts index 7cc743c05209c..4e3599145dffd 100644 --- a/packages/@aws-cdk/aws-ecs/test/fargate/integ.secret.ts +++ b/packages/@aws-cdk/aws-ecs/test/fargate/integ.secret.ts @@ -18,6 +18,7 @@ taskDefinition.addContainer('web', { image: ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample'), secrets: { SECRET: ecs.Secret.fromSecretsManager(secret), + PASSWORD: ecs.Secret.fromSecretsManager(secret, 'password'), }, }); diff --git a/packages/@aws-cdk/aws-ecs/test/fargate/test.fargate-service.ts b/packages/@aws-cdk/aws-ecs/test/fargate/test.fargate-service.ts index be05fbbac3e9b..7b8dc6975bae1 100644 --- a/packages/@aws-cdk/aws-ecs/test/fargate/test.fargate-service.ts +++ b/packages/@aws-cdk/aws-ecs/test/fargate/test.fargate-service.ts @@ -3,6 +3,7 @@ import * as appscaling from '@aws-cdk/aws-applicationautoscaling'; import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; +import * as secretsmanager from '@aws-cdk/aws-secretsmanager'; import * as cloudmap from '@aws-cdk/aws-servicediscovery'; import * as cdk from '@aws-cdk/core'; import { Test } from 'nodeunit'; @@ -301,6 +302,31 @@ export = { test.done(); }, + 'throws whith secret json field on unsupported platform version'(test: Test) { + const stack = new cdk.Stack(); + const vpc = new ec2.Vpc(stack, 'MyVpc', {}); + const cluster = new ecs.Cluster(stack, 'EcsCluster', { vpc }); + const taskDefinition = new ecs.FargateTaskDefinition(stack, 'TaksDef'); + const secret = new secretsmanager.Secret(stack, 'Secret'); + taskDefinition.addContainer('BaseContainer', { + image: ecs.ContainerImage.fromRegistry('test'), + secrets: { + SECRET_KEY: ecs.Secret.fromSecretsManager(secret, 'specificKey'), + }, + }); + + // THEN + test.throws(() => { + new ecs.FargateService(stack, 'FargateService', { + cluster, + taskDefinition, + platformVersion: ecs.FargatePlatformVersion.VERSION1_3, + }); + }, new RegExp(`uses at least one container that references a secret JSON field.+platform version ${ecs.FargatePlatformVersion.VERSION1_4} or later`)); + + test.done(); + }, + 'ignore task definition and launch type if deployment controller is set to be EXTERNAL'(test: Test) { // GIVEN const stack = new cdk.Stack(); diff --git a/packages/@aws-cdk/aws-ecs/test/test.container-definition.ts b/packages/@aws-cdk/aws-ecs/test/test.container-definition.ts index 06acd4f620083..8f5c9f5de0c0f 100644 --- a/packages/@aws-cdk/aws-ecs/test/test.container-definition.ts +++ b/packages/@aws-cdk/aws-ecs/test/test.container-definition.ts @@ -846,21 +846,45 @@ export = { }, - 'throws when using a specific secret JSON field as environment variable for a Fargate task'(test: Test) { + 'use a specific secret JSON field as environment variable for a Fargate task'(test: Test) { // GIVEN const stack = new cdk.Stack(); const taskDefinition = new ecs.FargateTaskDefinition(stack, 'TaskDef'); const secret = new secretsmanager.Secret(stack, 'Secret'); - // THEN - test.throws(() => taskDefinition.addContainer('cont', { + // WHEN + taskDefinition.addContainer('cont', { image: ecs.ContainerImage.fromRegistry('test'), memoryLimitMiB: 1024, secrets: { SECRET_KEY: ecs.Secret.fromSecretsManager(secret, 'specificKey'), }, - }), /Cannot specify secret JSON field for a task using the FARGATE launch type/); + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::ECS::TaskDefinition', { + ContainerDefinitions: [ + { + Secrets: [ + { + Name: 'SECRET_KEY', + ValueFrom: { + 'Fn::Join': [ + '', + [ + { + Ref: 'SecretA720EF05', + }, + ':specificKey::', + ], + ], + }, + }, + ], + }, + ], + })); test.done(); }, diff --git a/packages/@aws-cdk/aws-efs/README.md b/packages/@aws-cdk/aws-efs/README.md index 853ae097327cb..6a598f1146624 100644 --- a/packages/@aws-cdk/aws-efs/README.md +++ b/packages/@aws-cdk/aws-efs/README.md @@ -56,6 +56,25 @@ the access point. You may specify custom path with the `path` property. If `path created with the settings defined in the `creationInfo`. See [Creating Access Points](https://docs.aws.amazon.com/efs/latest/ug/create-access-point.html) for more details. +Any access point that has been created outside the stack can be imported into your CDK app. + +Use the `fromAccessPointAttributes()` API to import an existing access point. + +```ts +efs.AccessPoint.fromAccessPointAttributes(this, 'ap', { + accessPointArn: 'fsap-1293c4d9832fo0912', + fileSystem: efs.FileSystem.fromFileSystemAttributes(this, 'efs', { + fileSystemId: 'fs-099d3e2f', + securityGroup: SecurityGroup.fromSecurityGroupId(this, 'sg', 'sg-51530134'), + }), +}); +``` + +⚠️ Notice: When importing an Access Point using `fromAccessPointAttributes()`, you must make sure the mount targets are deployed and their lifecycle state is `available`. Otherwise, you may encounter the following error when deploying: +> EFS file system referenced by access point has +mount targets created in all availability zones the function will execute in, but not all are in the available life cycle +state yet. Please wait for them to become available and try the request again. + ### Connecting To control who can access the EFS, use the `.connections` attribute. EFS has diff --git a/packages/@aws-cdk/aws-efs/lib/access-point.ts b/packages/@aws-cdk/aws-efs/lib/access-point.ts index 7f43d88523bf1..29d22a5ec6032 100644 --- a/packages/@aws-cdk/aws-efs/lib/access-point.ts +++ b/packages/@aws-cdk/aws-efs/lib/access-point.ts @@ -20,11 +20,16 @@ export interface IAccessPoint extends IResource { * @attribute */ readonly accessPointArn: string; + + /** + * The efs filesystem + */ + readonly fileSystem: IFileSystem; } /** * Permissions as POSIX ACL - */ +*/ export interface Acl { /** * Specifies the POSIX user ID to apply to the RootDirectory. Accepts values from 0 to 2^32 (4294967295). @@ -109,23 +114,71 @@ export interface AccessPointProps extends AccessPointOptions { readonly fileSystem: IFileSystem; } +/** + * Attributes that can be specified when importing an AccessPoint + */ +export interface AccessPointAttributes { + /** + * The ID of the AccessPoint + * One of this, of {@link accessPointArn} is required + * + * @default - determined based on accessPointArn + */ + readonly accessPointId?: string; + + /** + * The ARN of the AccessPoint + * One of this, of {@link accessPointId} is required + * + * @default - determined based on accessPointId + */ + readonly accessPointArn?: string; + + /** + * The EFS filesystem + * + * @default - no EFS filesystem + */ + readonly fileSystem?: IFileSystem; +} + +abstract class AccessPointBase extends Resource implements IAccessPoint { + /** + * The ARN of the Access Point + * @attribute + */ + public abstract readonly accessPointArn: string; + + /** + * The ID of the Access Point + * @attribute + */ + public abstract readonly accessPointId: string; + + /** + * The filesystem of the access point + */ + public abstract readonly fileSystem: IFileSystem; +} + /** * Represents the AccessPoint */ -export class AccessPoint extends Resource implements IAccessPoint { +export class AccessPoint extends AccessPointBase { /** - * Import an existing Access Point + * Import an existing Access Point by attributes + */ + public static fromAccessPointAttributes(scope: Construct, id: string, attrs: AccessPointAttributes): IAccessPoint { + return new ImportedAccessPoint(scope, id, attrs); + } + + /** + * Import an existing Access Point by id */ public static fromAccessPointId(scope: Construct, id: string, accessPointId: string): IAccessPoint { - class Import extends Resource implements IAccessPoint { - public readonly accessPointId = accessPointId; - public readonly accessPointArn = Stack.of(scope).formatArn({ - service: 'elasticfilesystem', - resource: 'access-point', - resourceName: accessPointId, - }); - } - return new Import(scope, id); + return new ImportedAccessPoint(scope, id, { + accessPointId: accessPointId, + }); } /** @@ -174,3 +227,49 @@ export class AccessPoint extends Resource implements IAccessPoint { this.fileSystem = props.fileSystem; } } + +class ImportedAccessPoint extends AccessPointBase { + public readonly accessPointId: string; + public readonly accessPointArn: string; + private readonly _fileSystem?: IFileSystem; + + constructor(scope: Construct, id: string, attrs: AccessPointAttributes) { + super(scope, id); + + if (!attrs.accessPointId) { + if (!attrs.accessPointArn) { + throw new Error('One of accessPointId or AccessPointArn is required!'); + } + + this.accessPointArn = attrs.accessPointArn; + let maybeApId = Stack.of(scope).parseArn(attrs.accessPointArn).resourceName; + + if (!maybeApId) { + throw new Error('ARN for AccessPoint must provide the resource name.'); + } + + this.accessPointId = maybeApId; + } else { + if (attrs.accessPointArn) { + throw new Error('Only one of accessPointId or AccessPointArn can be provided!'); + } + + this.accessPointId = attrs.accessPointId; + this.accessPointArn = Stack.of(scope).formatArn({ + service: 'elasticfilesystem', + resource: 'access-point', + resourceName: attrs.accessPointId, + }); + } + + this._fileSystem = attrs.fileSystem; + } + + public get fileSystem() { + if (!this._fileSystem) { + throw new Error("fileSystem is not available when 'fromAccessPointId()' is used. Use 'fromAccessPointAttributes()' instead"); + } + + return this._fileSystem; + } +} diff --git a/packages/@aws-cdk/aws-efs/lib/efs-file-system.ts b/packages/@aws-cdk/aws-efs/lib/efs-file-system.ts index 2c28375667fe4..8572d85bf920d 100644 --- a/packages/@aws-cdk/aws-efs/lib/efs-file-system.ts +++ b/packages/@aws-cdk/aws-efs/lib/efs-file-system.ts @@ -206,28 +206,18 @@ export interface FileSystemAttributes { * @resource AWS::EFS::FileSystem */ export class FileSystem extends Resource implements IFileSystem { + /** + * The default port File System listens on. + */ + public static readonly DEFAULT_PORT: number = 2049; /** * Import an existing File System from the given properties. */ public static fromFileSystemAttributes(scope: Construct, id: string, attrs: FileSystemAttributes): IFileSystem { - class Import extends Resource implements IFileSystem { - public readonly fileSystemId = attrs.fileSystemId; - public readonly connections = new ec2.Connections({ - securityGroups: [attrs.securityGroup], - defaultPort: ec2.Port.tcp(FileSystem.DEFAULT_PORT), - }); - public readonly mountTargetsAvailable = new ConcreteDependable(); - } - - return new Import(scope, id); + return new ImportedFileSystem(scope, id, attrs); } - /** - * The default port File System listens on. - */ - private static readonly DEFAULT_PORT: number = 2049; - /** * The security groups/rules used to allow network connections to the file system. */ @@ -303,3 +293,36 @@ export class FileSystem extends Resource implements IFileSystem { }); } } + + +class ImportedFileSystem extends Resource implements IFileSystem { + /** + * The security groups/rules used to allow network connections to the file system. + */ + public readonly connections: ec2.Connections; + + /** + * @attribute + */ + public readonly fileSystemId: string; + + /** + * Dependable that can be depended upon to ensure the mount targets of the filesystem are ready + */ + public readonly mountTargetsAvailable: IDependable; + + constructor(scope: Construct, id: string, attrs: FileSystemAttributes) { + super(scope, id); + + this.fileSystemId = attrs.fileSystemId; + + this.connections = new ec2.Connections({ + securityGroups: [attrs.securityGroup], + defaultPort: ec2.Port.tcp(FileSystem.DEFAULT_PORT), + }); + + this.mountTargetsAvailable = new ConcreteDependable(); + } + + +} diff --git a/packages/@aws-cdk/aws-efs/test/access-point.test.ts b/packages/@aws-cdk/aws-efs/test/access-point.test.ts index 761594507c779..29770d2077d2f 100644 --- a/packages/@aws-cdk/aws-efs/test/access-point.test.ts +++ b/packages/@aws-cdk/aws-efs/test/access-point.test.ts @@ -31,7 +31,7 @@ test('new AccessPoint correctly', () => { expectCDK(stack).to(haveResource('AWS::EFS::AccessPoint')); }); -test('import correctly', () => { +test('import an AccessPoint using fromAccessPointId', () => { // WHEN const ap = new AccessPoint(stack, 'MyAccessPoint', { fileSystem, @@ -41,6 +41,87 @@ test('import correctly', () => { expect(imported.accessPointId).toEqual(ap.accessPointId); }); +test('import an AccessPoint using fromAccessPointId', () => { + // WHEN + const ap = new AccessPoint(stack, 'MyAccessPoint', { + fileSystem, + }); + const imported = AccessPoint.fromAccessPointId(stack, 'ImportedAccessPoint', ap.accessPointId); + // THEN + expect(() => imported.fileSystem).toThrow(/fileSystem is not available when 'fromAccessPointId\(\)' is used. Use 'fromAccessPointAttributes\(\)' instead/); +}); + +test('import an AccessPoint using fromAccessPointAttributes and the accessPointId', () => { + // WHEN + const ap = new AccessPoint(stack, 'MyAccessPoint', { + fileSystem, + }); + const imported = AccessPoint.fromAccessPointAttributes(stack, 'ImportedAccessPoint', { + accessPointId: ap.accessPointId, + fileSystem: fileSystem, + }); + // THEN + expect(imported.accessPointId).toEqual(ap.accessPointId); + expect(imported.accessPointArn).toEqual(ap.accessPointArn); + expect(imported.fileSystem).toEqual(ap.fileSystem); +}); + +test('import an AccessPoint using fromAccessPointAttributes and the accessPointArn', () => { + // WHEN + const ap = new AccessPoint(stack, 'MyAccessPoint', { + fileSystem, + }); + const imported = AccessPoint.fromAccessPointAttributes(stack, 'ImportedAccessPoint', { + accessPointArn: ap.accessPointArn, + fileSystem: fileSystem, + }); + // THEN + expect(imported.accessPointId).toEqual(ap.accessPointId); + expect(imported.accessPointArn).toEqual(ap.accessPointArn); + expect(imported.fileSystem).toEqual(ap.fileSystem); +}); + +test('import using accessPointArn', () => { + // WHEN + const ap = new AccessPoint(stack, 'MyAccessPoint', { + fileSystem, + }); + const imported = AccessPoint.fromAccessPointAttributes(stack, 'ImportedAccessPoint', { + accessPointArn: ap.accessPointArn, + fileSystem: fileSystem, + }); + // THEN + expect(imported.accessPointId).toEqual(ap.accessPointId); + expect(imported.accessPointArn).toEqual(ap.accessPointArn); + expect(imported.fileSystem).toEqual(ap.fileSystem); +}); + +test('throw when import using accessPointArn and accessPointId', () => { + // WHEN + const ap = new AccessPoint(stack, 'MyAccessPoint', { + fileSystem, + }); + + // THEN + expect(() => AccessPoint.fromAccessPointAttributes(stack, 'ImportedAccessPoint', { + accessPointArn: ap.accessPointArn, + accessPointId: ap.accessPointId, + fileSystem: fileSystem, + })).toThrow(/Only one of accessPointId or AccessPointArn can be provided!/); +}); + +test('throw when import without accessPointArn or accessPointId', () => { + // WHEN + new AccessPoint(stack, 'MyAccessPoint', { + fileSystem, + }); + + // THEN + expect(() => AccessPoint.fromAccessPointAttributes(stack, 'ImportedAccessPoint', { + fileSystem: fileSystem, + })).toThrow(/One of accessPointId or AccessPointArn is required!/); +}); + test('custom access point is created correctly', () => { // WHEN new AccessPoint(stack, 'MyAccessPoint', { @@ -83,4 +164,4 @@ test('custom access point is created correctly', () => { Path: '/export/share', }, })); -}); \ No newline at end of file +}); diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index f23de775f4ba2..39feb03c3f7db 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", "@types/yaml": "1.9.6", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.792.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index c9d8e2fd475b9..444131100fd25 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -75,7 +75,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-codecommit": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.792.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-iam/README.md b/packages/@aws-cdk/aws-iam/README.md index 9e4db8498e2c1..1cc8740b89927 100644 --- a/packages/@aws-cdk/aws-iam/README.md +++ b/packages/@aws-cdk/aws-iam/README.md @@ -250,8 +250,16 @@ const policyDocument = { ] }; -const newPolicyDocument = PolicyDocument.fromJson(policyDocument); +const customPolicyDocument = PolicyDocument.fromJson(policyDocument); +// You can pass this document as an initial document to a ManagedPolicy +// or inline Policy. +const newManagedPolicy = new ManagedPolicy(stack, 'MyNewManagedPolicy', { + document: customPolicyDocument +}); +const newPolicy = new Policy(stack, 'MyNewPolicy', { + document: customPolicyDocument +}); ``` ### OpenID Connect Providers diff --git a/packages/@aws-cdk/aws-iam/lib/policy.ts b/packages/@aws-cdk/aws-iam/lib/policy.ts index c4fefd21b189d..45cd1fb138927 100644 --- a/packages/@aws-cdk/aws-iam/lib/policy.ts +++ b/packages/@aws-cdk/aws-iam/lib/policy.ts @@ -83,6 +83,15 @@ export interface PolicyProps { * @default false */ readonly force?: boolean; + + /** + * Initial PolicyDocument to use for this Policy. If omited, any + * `PolicyStatement` provided in the `statements` property will be applied + * against the empty default `PolicyDocument`. + * + * @default - An empty policy. + */ + readonly document?: PolicyDocument; } /** @@ -138,6 +147,10 @@ export class Policy extends Resource implements IPolicy { } } + if (props.document) { + this.document = props.document; + } + const resource = new CfnPolicyConditional(this, 'Resource', { policyDocument: this.document, policyName: this.physicalName, diff --git a/packages/@aws-cdk/aws-iam/test/policy.test.ts b/packages/@aws-cdk/aws-iam/test/policy.test.ts index 9facd4acd3973..d2ff50aa4dbb8 100644 --- a/packages/@aws-cdk/aws-iam/test/policy.test.ts +++ b/packages/@aws-cdk/aws-iam/test/policy.test.ts @@ -1,7 +1,7 @@ import { ResourcePart } from '@aws-cdk/assert'; import '@aws-cdk/assert/jest'; import { App, CfnResource, Stack } from '@aws-cdk/core'; -import { AnyPrincipal, CfnPolicy, Group, Policy, PolicyStatement, Role, ServicePrincipal, User } from '../lib'; +import { AnyPrincipal, CfnPolicy, Group, Policy, PolicyDocument, PolicyStatement, Role, ServicePrincipal, User } from '../lib'; /* eslint-disable quote-props */ @@ -52,6 +52,42 @@ describe('IAM policy', () => { }); }); + test('policy from policy document alone', () => { + const policy = new Policy(stack, 'MyPolicy', { + policyName: 'MyPolicyName', + document: PolicyDocument.fromJson({ + Statement: [ + { + Action: 'sqs:SendMessage', + Effect: 'Allow', + Resource: '*', + }, + ], + }), + }); + + const group = new Group(stack, 'MyGroup'); + group.attachInlinePolicy(policy); + + expect(stack).toMatchTemplate({ + Resources: { + MyPolicy39D66CF6: { + Type: 'AWS::IAM::Policy', + Properties: { + PolicyName: 'MyPolicyName', + Groups: [{ Ref: 'MyGroupCBA54B1B' }], + PolicyDocument: { + Statement: [ + { Action: 'sqs:SendMessage', Effect: 'Allow', Resource: '*' }, + ], + Version: '2012-10-17', + }, + }, + }, + MyGroupCBA54B1B: { Type: 'AWS::IAM::Group' }, + }, + }); + }); test('policy name can be omitted, in which case the logical id will be used', () => { const policy = new Policy(stack, 'MyPolicy'); policy.addStatements(new PolicyStatement({ resources: ['*'], actions: ['sqs:SendMessage'] })); diff --git a/packages/@aws-cdk/aws-iotsitewise/.eslintrc.js b/packages/@aws-cdk/aws-iotsitewise/.eslintrc.js new file mode 100644 index 0000000000000..61dd8dd001f63 --- /dev/null +++ b/packages/@aws-cdk/aws-iotsitewise/.eslintrc.js @@ -0,0 +1,3 @@ +const baseConfig = require('cdk-build-tools/config/eslintrc'); +baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-iotsitewise/.gitignore b/packages/@aws-cdk/aws-iotsitewise/.gitignore new file mode 100644 index 0000000000000..62ebc95d75ce6 --- /dev/null +++ b/packages/@aws-cdk/aws-iotsitewise/.gitignore @@ -0,0 +1,19 @@ +*.js +*.js.map +*.d.ts +tsconfig.json +node_modules +*.generated.ts +dist +.jsii + +.LAST_BUILD +.nyc_output +coverage +.nycrc +.LAST_PACKAGE +*.snk +nyc.config.js +!.eslintrc.js +!jest.config.js +junit.xml diff --git a/packages/@aws-cdk/aws-iotsitewise/.npmignore b/packages/@aws-cdk/aws-iotsitewise/.npmignore new file mode 100644 index 0000000000000..e4486030fcb17 --- /dev/null +++ b/packages/@aws-cdk/aws-iotsitewise/.npmignore @@ -0,0 +1,28 @@ +# Don't include original .ts files when doing `npm pack` +*.ts +!*.d.ts +coverage +.nyc_output +*.tgz + +dist +.LAST_PACKAGE +.LAST_BUILD +!*.js + +# Include .jsii +!.jsii + +*.snk + +*.tsbuildinfo + +tsconfig.json + +.eslintrc.js +jest.config.js + +# exclude cdk artifacts +**/cdk.out +junit.xml +test/ diff --git a/packages/@aws-cdk/aws-iotsitewise/LICENSE b/packages/@aws-cdk/aws-iotsitewise/LICENSE new file mode 100644 index 0000000000000..b71ec1688783a --- /dev/null +++ b/packages/@aws-cdk/aws-iotsitewise/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/@aws-cdk/aws-iotsitewise/NOTICE b/packages/@aws-cdk/aws-iotsitewise/NOTICE new file mode 100644 index 0000000000000..bfccac9a7f69c --- /dev/null +++ b/packages/@aws-cdk/aws-iotsitewise/NOTICE @@ -0,0 +1,2 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-iotsitewise/README.md b/packages/@aws-cdk/aws-iotsitewise/README.md new file mode 100644 index 0000000000000..c92df247f85b4 --- /dev/null +++ b/packages/@aws-cdk/aws-iotsitewise/README.md @@ -0,0 +1,16 @@ +## AWS::IoTSiteWise Construct Library + +--- + +![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) + +> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. + +--- + + +This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. + +```ts +import iotsitewise = require('@aws-cdk/aws-iotsitewise'); +``` diff --git a/packages/@aws-cdk/aws-iotsitewise/jest.config.js b/packages/@aws-cdk/aws-iotsitewise/jest.config.js new file mode 100644 index 0000000000000..54e28beb9798b --- /dev/null +++ b/packages/@aws-cdk/aws-iotsitewise/jest.config.js @@ -0,0 +1,2 @@ +const baseConfig = require('cdk-build-tools/config/jest.config'); +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-iotsitewise/lib/index.ts b/packages/@aws-cdk/aws-iotsitewise/lib/index.ts new file mode 100644 index 0000000000000..c31b4b7c13647 --- /dev/null +++ b/packages/@aws-cdk/aws-iotsitewise/lib/index.ts @@ -0,0 +1,2 @@ +// AWS::IoTSiteWise CloudFormation Resources: +export * from './iotsitewise.generated'; diff --git a/packages/@aws-cdk/aws-iotsitewise/package.json b/packages/@aws-cdk/aws-iotsitewise/package.json new file mode 100644 index 0000000000000..8291616094fca --- /dev/null +++ b/packages/@aws-cdk/aws-iotsitewise/package.json @@ -0,0 +1,96 @@ +{ + "name": "@aws-cdk/aws-iotsitewise", + "version": "0.0.0", + "description": "The CDK Construct Library for AWS::IoTSiteWise", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "jsii": { + "outdir": "dist", + "projectReferences": true, + "targets": { + "dotnet": { + "namespace": "Amazon.CDK.AWS.IoTSiteWise", + "packageId": "Amazon.CDK.AWS.IoTSiteWise", + "signAssembly": true, + "assemblyOriginatorKeyFile": "../../key.snk", + "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/master/logo/default-256-dark.png" + }, + "java": { + "package": "software.amazon.awscdk.services.iotsitewise", + "maven": { + "groupId": "software.amazon.awscdk", + "artifactId": "iotsitewise" + } + }, + "python": { + "classifiers": [ + "Framework :: AWS CDK", + "Framework :: AWS CDK :: 1" + ], + "distName": "aws-cdk.aws-iotsitewise", + "module": "aws_cdk.aws_iotsitewise" + } + } + }, + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk.git", + "directory": "packages/@aws-cdk/aws-iotsitewise" + }, + "homepage": "https://github.com/aws/aws-cdk", + "scripts": { + "build": "cdk-build", + "watch": "cdk-watch", + "lint": "cdk-lint", + "test": "cdk-test", + "integ": "cdk-integ", + "pkglint": "pkglint -f", + "package": "cdk-package", + "awslint": "cdk-awslint", + "cfn2ts": "cfn2ts", + "build+test+package": "npm run build+test && npm run package", + "build+test": "npm run build && npm test", + "compat": "cdk-compat", + "gen": "cfn2ts" + }, + "cdk-build": { + "cloudformation": "AWS::IoTSiteWise", + "jest": true, + "env": { + "AWSLINT_BASE_CONSTRUCT": "true" + } + }, + "keywords": [ + "aws", + "cdk", + "constructs", + "AWS::IoTSiteWise", + "aws-iotsitewise" + ], + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "license": "Apache-2.0", + "devDependencies": { + "@aws-cdk/assert": "0.0.0", + "cdk-build-tools": "0.0.0", + "cfn2ts": "0.0.0", + "pkglint": "0.0.0" + }, + "dependencies": { + "@aws-cdk/core": "0.0.0" + }, + "peerDependencies": { + "@aws-cdk/core": "0.0.0" + }, + "engines": { + "node": ">= 10.13.0 <13 || >=13.7.0" + }, + "stability": "experimental", + "maturity": "cfn-only", + "awscdkio": { + "announce": false + } +} diff --git a/packages/@aws-cdk/aws-iotsitewise/test/iotsitewise.test.ts b/packages/@aws-cdk/aws-iotsitewise/test/iotsitewise.test.ts new file mode 100644 index 0000000000000..e394ef336bfb4 --- /dev/null +++ b/packages/@aws-cdk/aws-iotsitewise/test/iotsitewise.test.ts @@ -0,0 +1,6 @@ +import '@aws-cdk/assert/jest'; +import {} from '../lib'; + +test('No tests are specified for this package', () => { + expect(true).toBe(true); +}); diff --git a/packages/@aws-cdk/aws-ivs/.eslintrc.js b/packages/@aws-cdk/aws-ivs/.eslintrc.js new file mode 100644 index 0000000000000..61dd8dd001f63 --- /dev/null +++ b/packages/@aws-cdk/aws-ivs/.eslintrc.js @@ -0,0 +1,3 @@ +const baseConfig = require('cdk-build-tools/config/eslintrc'); +baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-ivs/.gitignore b/packages/@aws-cdk/aws-ivs/.gitignore new file mode 100644 index 0000000000000..62ebc95d75ce6 --- /dev/null +++ b/packages/@aws-cdk/aws-ivs/.gitignore @@ -0,0 +1,19 @@ +*.js +*.js.map +*.d.ts +tsconfig.json +node_modules +*.generated.ts +dist +.jsii + +.LAST_BUILD +.nyc_output +coverage +.nycrc +.LAST_PACKAGE +*.snk +nyc.config.js +!.eslintrc.js +!jest.config.js +junit.xml diff --git a/packages/@aws-cdk/aws-ivs/.npmignore b/packages/@aws-cdk/aws-ivs/.npmignore new file mode 100644 index 0000000000000..e4486030fcb17 --- /dev/null +++ b/packages/@aws-cdk/aws-ivs/.npmignore @@ -0,0 +1,28 @@ +# Don't include original .ts files when doing `npm pack` +*.ts +!*.d.ts +coverage +.nyc_output +*.tgz + +dist +.LAST_PACKAGE +.LAST_BUILD +!*.js + +# Include .jsii +!.jsii + +*.snk + +*.tsbuildinfo + +tsconfig.json + +.eslintrc.js +jest.config.js + +# exclude cdk artifacts +**/cdk.out +junit.xml +test/ diff --git a/packages/@aws-cdk/aws-ivs/LICENSE b/packages/@aws-cdk/aws-ivs/LICENSE new file mode 100644 index 0000000000000..b71ec1688783a --- /dev/null +++ b/packages/@aws-cdk/aws-ivs/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/@aws-cdk/aws-ivs/NOTICE b/packages/@aws-cdk/aws-ivs/NOTICE new file mode 100644 index 0000000000000..bfccac9a7f69c --- /dev/null +++ b/packages/@aws-cdk/aws-ivs/NOTICE @@ -0,0 +1,2 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-ivs/README.md b/packages/@aws-cdk/aws-ivs/README.md new file mode 100644 index 0000000000000..0e8b591f39c21 --- /dev/null +++ b/packages/@aws-cdk/aws-ivs/README.md @@ -0,0 +1,16 @@ +## AWS::IVS Construct Library + +--- + +![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) + +> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. + +--- + + +This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. + +```ts +import ivs = require('@aws-cdk/aws-ivs'); +``` diff --git a/packages/@aws-cdk/aws-ivs/jest.config.js b/packages/@aws-cdk/aws-ivs/jest.config.js new file mode 100644 index 0000000000000..54e28beb9798b --- /dev/null +++ b/packages/@aws-cdk/aws-ivs/jest.config.js @@ -0,0 +1,2 @@ +const baseConfig = require('cdk-build-tools/config/jest.config'); +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-ivs/lib/index.ts b/packages/@aws-cdk/aws-ivs/lib/index.ts new file mode 100644 index 0000000000000..418b7c6157e85 --- /dev/null +++ b/packages/@aws-cdk/aws-ivs/lib/index.ts @@ -0,0 +1,2 @@ +// AWS::IVS CloudFormation Resources: +export * from './ivs.generated'; diff --git a/packages/@aws-cdk/aws-ivs/package.json b/packages/@aws-cdk/aws-ivs/package.json new file mode 100644 index 0000000000000..ea872b6960b3f --- /dev/null +++ b/packages/@aws-cdk/aws-ivs/package.json @@ -0,0 +1,96 @@ +{ + "name": "@aws-cdk/aws-ivs", + "version": "0.0.0", + "description": "The CDK Construct Library for AWS::IVS", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "jsii": { + "outdir": "dist", + "projectReferences": true, + "targets": { + "dotnet": { + "namespace": "Amazon.CDK.AWS.IVS", + "packageId": "Amazon.CDK.AWS.IVS", + "signAssembly": true, + "assemblyOriginatorKeyFile": "../../key.snk", + "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/master/logo/default-256-dark.png" + }, + "java": { + "package": "software.amazon.awscdk.services.ivs", + "maven": { + "groupId": "software.amazon.awscdk", + "artifactId": "ivs" + } + }, + "python": { + "classifiers": [ + "Framework :: AWS CDK", + "Framework :: AWS CDK :: 1" + ], + "distName": "aws-cdk.aws-ivs", + "module": "aws_cdk.aws_ivs" + } + } + }, + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk.git", + "directory": "packages/@aws-cdk/aws-ivs" + }, + "homepage": "https://github.com/aws/aws-cdk", + "scripts": { + "build": "cdk-build", + "watch": "cdk-watch", + "lint": "cdk-lint", + "test": "cdk-test", + "integ": "cdk-integ", + "pkglint": "pkglint -f", + "package": "cdk-package", + "awslint": "cdk-awslint", + "cfn2ts": "cfn2ts", + "build+test+package": "npm run build+test && npm run package", + "build+test": "npm run build && npm test", + "compat": "cdk-compat", + "gen": "cfn2ts" + }, + "cdk-build": { + "cloudformation": "AWS::IVS", + "jest": true, + "env": { + "AWSLINT_BASE_CONSTRUCT": "true" + } + }, + "keywords": [ + "aws", + "cdk", + "constructs", + "AWS::IVS", + "aws-ivs" + ], + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "license": "Apache-2.0", + "devDependencies": { + "@aws-cdk/assert": "0.0.0", + "cdk-build-tools": "0.0.0", + "cfn2ts": "0.0.0", + "pkglint": "0.0.0" + }, + "dependencies": { + "@aws-cdk/core": "0.0.0" + }, + "peerDependencies": { + "@aws-cdk/core": "0.0.0" + }, + "engines": { + "node": ">= 10.13.0 <13 || >=13.7.0" + }, + "stability": "experimental", + "maturity": "cfn-only", + "awscdkio": { + "announce": false + } +} diff --git a/packages/@aws-cdk/aws-ivs/test/ivs.test.ts b/packages/@aws-cdk/aws-ivs/test/ivs.test.ts new file mode 100644 index 0000000000000..e394ef336bfb4 --- /dev/null +++ b/packages/@aws-cdk/aws-ivs/test/ivs.test.ts @@ -0,0 +1,6 @@ +import '@aws-cdk/assert/jest'; +import {} from '../lib'; + +test('No tests are specified for this package', () => { + expect(true).toBe(true); +}); diff --git a/packages/@aws-cdk/aws-lambda-event-sources/README.md b/packages/@aws-cdk/aws-lambda-event-sources/README.md index b1fec3c4c78a7..656d09f56f448 100644 --- a/packages/@aws-cdk/aws-lambda-event-sources/README.md +++ b/packages/@aws-cdk/aws-lambda-event-sources/README.md @@ -202,7 +202,7 @@ const stream = new kinesis.Stream(this, 'MyStream'); myFunction.addEventSource(new KinesisEventSource(stream, { batchSize: 100, // default startingPosition: lambda.StartingPosition.TRIM_HORIZON -}); +})); ``` ## Roadmap diff --git a/packages/@aws-cdk/aws-lambda-nodejs/package.json b/packages/@aws-cdk/aws-lambda-nodejs/package.json index de6ea3d7b31a8..8dcc7caa033d9 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/package.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/package.json @@ -67,7 +67,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "delay": "4.4.0", - "parcel": "2.0.0-nightly.443", + "parcel": "2.0.0-nightly.447", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-lambda/lib/filesystem.ts b/packages/@aws-cdk/aws-lambda/lib/filesystem.ts index 20b0cb1fc130d..388db50e045ec 100644 --- a/packages/@aws-cdk/aws-lambda/lib/filesystem.ts +++ b/packages/@aws-cdk/aws-lambda/lib/filesystem.ts @@ -50,7 +50,7 @@ export class FileSystem { * @param ap the Amazon EFS access point * @param mountPath the target path in the lambda runtime environment */ - public static fromEfsAccessPoint(ap: efs.AccessPoint, mountPath: string): FileSystem { + public static fromEfsAccessPoint(ap: efs.IAccessPoint, mountPath: string): FileSystem { return new FileSystem({ localMountPath: mountPath, arn: ap.accessPointArn, diff --git a/packages/@aws-cdk/aws-lambda/lib/function-base.ts b/packages/@aws-cdk/aws-lambda/lib/function-base.ts index ab1012b6015bc..d02f355f0c5f3 100644 --- a/packages/@aws-cdk/aws-lambda/lib/function-base.ts +++ b/packages/@aws-cdk/aws-lambda/lib/function-base.ts @@ -149,6 +149,19 @@ export interface FunctionAttributes { * to this Lambda. */ readonly securityGroup?: ec2.ISecurityGroup; + + /** + * Setting this property informs the CDK that the imported function is in the same environment as the stack. + * This affects certain behaviours such as, whether this function's permission can be modified. + * When not configured, the CDK attempts to auto-determine this. For environment agnostic stacks, i.e., stacks + * where the account is not specified with the `env` property, this is determined to be false. + * + * Set this to property *ONLY IF* the imported function is in the same account as the stack + * it's imported in. + * @default - depends: true, if the Stack is configured with an explicit `env` (account and region) and the account is the same as this function. + * For environment-agnostic stacks this will default to `false`. + */ + readonly sameEnvironment?: boolean; } export abstract class FunctionBase extends Resource implements IFunction { @@ -301,7 +314,8 @@ export abstract class FunctionBase extends Resource implements IFunction { const permissionNode = this._functionNode().tryFindChild(identifier); if (!permissionNode) { - throw new Error('Cannot modify permission to lambda function. Function is either imported or $LATEST version.'); + throw new Error('Cannot modify permission to lambda function. Function is either imported or $LATEST version. ' + + 'If the function is imported from the same account use `fromFunctionAttributes()` API with the `allowPermissions` flag.'); } return { statementAdded: true, policyDependable: permissionNode }; }, @@ -361,13 +375,13 @@ export abstract class FunctionBase extends Resource implements IFunction { * ..which means that in order to extract the `account-id` component from the ARN, we can * split the ARN using ":" and select the component in index 4. * - * @returns true if account id of function matches this account, or the accounts are unresolved. + * @returns true if account id of function matches the account specified on the stack, false otherwise. * * @internal */ protected _isStackAccount(): boolean { if (Token.isUnresolved(this.stack.account) || Token.isUnresolved(this.functionArn)) { - return true; + return false; } return this.stack.parseArn(this.functionArn).account === this.stack.account; } diff --git a/packages/@aws-cdk/aws-lambda/lib/function.ts b/packages/@aws-cdk/aws-lambda/lib/function.ts index d44a14a3aa4f1..e2d81c064c894 100644 --- a/packages/@aws-cdk/aws-lambda/lib/function.ts +++ b/packages/@aws-cdk/aws-lambda/lib/function.ts @@ -383,7 +383,7 @@ export class Function extends FunctionBase { public readonly role = role; public readonly permissionsNode = this.node; - protected readonly canCreatePermissions = this._isStackAccount(); + protected readonly canCreatePermissions = attrs.sameEnvironment ?? this._isStackAccount(); constructor(s: Construct, i: string) { super(s, i); diff --git a/packages/@aws-cdk/aws-lambda/test/function.test.ts b/packages/@aws-cdk/aws-lambda/test/function.test.ts index 761a688762c48..038167a460423 100644 --- a/packages/@aws-cdk/aws-lambda/test/function.test.ts +++ b/packages/@aws-cdk/aws-lambda/test/function.test.ts @@ -269,6 +269,24 @@ describe('function', () => { principal: new iam.ServicePrincipal('cloudformation.amazonaws.com'), }); + // THEN + expect(stack).not.toHaveResource('AWS::Lambda::Permission'); + }); + + test('imported Function w/ unresolved account & allowPermissions set', () => { + // GIVEN + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'Imports'); + + // WHEN + const iFunc = lambda.Function.fromFunctionAttributes(stack, 'iFunc', { + functionArn: 'arn:aws:lambda:us-east-1:123456789012:function:BaseFunction', + sameEnvironment: true, // since this is false, by default, for env agnostic stacks + }); + iFunc.addPermission('iFunc', { + principal: new iam.ServicePrincipal('cloudformation.amazonaws.com'), + }); + // THEN expect(stack).toHaveResource('AWS::Lambda::Permission'); }); @@ -953,10 +971,22 @@ describe('function', () => { }); test('on an imported function (unresolved account)', () => { - // GIVEN const stack = new cdk.Stack(); const fn = lambda.Function.fromFunctionArn(stack, 'Function', 'arn:aws:lambda:us-east-1:123456789012:function:MyFn'); + expect( + () => fn.grantInvoke(new iam.ServicePrincipal('elasticloadbalancing.amazonaws.com')), + ).toThrow(/Cannot modify permission to lambda function/); + }); + + test('on an imported function (unresolved account & w/ allowPermissions)', () => { + // GIVEN + const stack = new cdk.Stack(); + const fn = lambda.Function.fromFunctionAttributes(stack, 'Function', { + functionArn: 'arn:aws:lambda:us-east-1:123456789012:function:MyFn', + sameEnvironment: true, + }); + // WHEN fn.grantInvoke(new iam.ServicePrincipal('elasticloadbalancing.amazonaws.com')); diff --git a/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.expected.json b/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.expected.json index ff7a04f8b7fd5..3d17a0e6ca6bf 100644 --- a/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.expected.json +++ b/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.expected.json @@ -736,7 +736,7 @@ "Type": "AWS::Lambda::Function", "Properties": { "Code": { - "ZipFile": "\nimport json\nimport os\nimport string\nimport random\nimport datetime\n\nMSG_FILE_PATH = '/mnt/msg/content'\n\ndef randomString(stringLength=10):\n letters = string.ascii_lowercase\n return ''.join(random.choice(letters) for i in range(stringLength))\n\ndef lambda_handler(event, context):\n with open(MSG_FILE_PATH, 'a') as f:\n f.write(f\"{datetime.datetime.utcnow():%Y-%m-%d-%H:%M:%S} \" + randomString(5) + ' ')\n\n file = open(MSG_FILE_PATH, \"r\")\n file_content = file.read()\n file.close()\n\n return {\n 'statusCode': 200,\n 'body': str(file_content)\n }\n " + "ZipFile": "\nimport json\nimport os\nimport string\nimport random\nimport datetime\n\nMSG_FILE_PATH = '/mnt/msg/content'\n\ndef randomString(stringLength=10):\n letters = string.ascii_lowercase\n return ''.join(random.choice(letters) for i in range(stringLength))\n\ndef lambda_handler(event, context):\n with open(MSG_FILE_PATH, 'a') as f:\n f.write(f\"{datetime.datetime.utcnow():%Y-%m-%d-%H:%M:%S} \" + randomString(5) + ' ')\n\n file = open(MSG_FILE_PATH, \"r\")\n file_content = file.read()\n file.close()\n\n return {\n 'statusCode': 200,\n 'body': str(file_content)\n }\n" }, "Handler": "index.lambda_handler", "Role": { @@ -746,6 +746,34 @@ ] }, "Runtime": "python3.7", + "FileSystemConfigs": [ + { + "LocalMountPath": "/mnt/msg", + "Arn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":elasticfilesystem:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":access-point/", + { + "Ref": "EfsAccessPointE419FED9" + } + ] + ] + } + } + ], "VpcConfig": { "SecurityGroupIds": [ { @@ -766,7 +794,203 @@ "Ref": "VpcPrivateSubnet3SubnetF258B56E" } ] + } + }, + "DependsOn": [ + "EfsEfsMountTarget195B2DD2E", + "EfsEfsMountTarget2315C927F", + "EfsEfsMountTarget36646B9A0", + "MyLambdaServiceRoleDefaultPolicy5BBC6F68", + "MyLambdaServiceRole4539ECB6" + ] + }, + "securityGroupfromawscdklambda1MyLambda2SecurityGroup7492F70D20498301D9D2": { + "Type": "AWS::EC2::SecurityGroupIngress", + "Properties": { + "IpProtocol": "tcp", + "Description": "from awscdklambda1MyLambda2SecurityGroup7492F70D:2049", + "FromPort": 2049, + "GroupId": { + "Fn::GetAtt": [ + "EfsEfsSecurityGroup6F40EA3B", + "GroupId" + ] + }, + "SourceSecurityGroupId": { + "Fn::GetAtt": [ + "MyLambda2SecurityGroup3C507954", + "GroupId" + ] + }, + "ToPort": 2049 + } + }, + "MyLambda2ServiceRoleD09B370C": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole" + ] + ] + } + ] + }, + "DependsOn": [ + "MyLambdaCCE802FB", + "MyLambdaSecurityGroup1E71A818", + "MyLambdaServiceRoleDefaultPolicy5BBC6F68", + "MyLambdaServiceRole4539ECB6" + ] + }, + "MyLambda2ServiceRoleDefaultPolicy2BECE79D": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "elasticfilesystem:ClientMount", + "Condition": { + "StringEquals": { + "elasticfilesystem:AccessPointArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":elasticfilesystem:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":access-point/", + { + "Ref": "EfsAccessPointE419FED9" + } + ] + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": "elasticfilesystem:ClientWrite", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":elasticfilesystem:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":file-system/", + { + "Ref": "Efs9E8BF36B" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "MyLambda2ServiceRoleDefaultPolicy2BECE79D", + "Roles": [ + { + "Ref": "MyLambda2ServiceRoleD09B370C" + } + ] + }, + "DependsOn": [ + "MyLambdaCCE802FB", + "MyLambdaSecurityGroup1E71A818", + "MyLambdaServiceRoleDefaultPolicy5BBC6F68", + "MyLambdaServiceRole4539ECB6" + ] + }, + "MyLambda2SecurityGroup3C507954": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "Automatic security group for Lambda Function awscdklambda1MyLambda232FB7CD2", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + }, + "DependsOn": [ + "MyLambdaCCE802FB", + "MyLambdaSecurityGroup1E71A818", + "MyLambdaServiceRoleDefaultPolicy5BBC6F68", + "MyLambdaServiceRole4539ECB6" + ] + }, + "MyLambda2254B54D5": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "\nimport json\nimport os\nimport string\nimport random\nimport datetime\n\nMSG_FILE_PATH = '/mnt/msg/content'\n\ndef randomString(stringLength=10):\n letters = string.ascii_lowercase\n return ''.join(random.choice(letters) for i in range(stringLength))\n\ndef lambda_handler(event, context):\n with open(MSG_FILE_PATH, 'a') as f:\n f.write(f\"{datetime.datetime.utcnow():%Y-%m-%d-%H:%M:%S} \" + randomString(5) + ' ')\n\n file = open(MSG_FILE_PATH, \"r\")\n file_content = file.read()\n file.close()\n\n return {\n 'statusCode': 200,\n 'body': str(file_content)\n }\n" + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "MyLambda2ServiceRoleD09B370C", + "Arn" + ] }, + "Runtime": "python3.7", "FileSystemConfigs": [ { "LocalMountPath": "/mnt/msg", @@ -794,14 +1018,36 @@ ] } } - ] + ], + "VpcConfig": { + "SecurityGroupIds": [ + { + "Fn::GetAtt": [ + "MyLambda2SecurityGroup3C507954", + "GroupId" + ] + } + ], + "SubnetIds": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + }, + { + "Ref": "VpcPrivateSubnet3SubnetF258B56E" + } + ] + } }, "DependsOn": [ - "EfsEfsMountTarget195B2DD2E", - "EfsEfsMountTarget2315C927F", - "EfsEfsMountTarget36646B9A0", + "MyLambdaCCE802FB", + "MyLambdaSecurityGroup1E71A818", "MyLambdaServiceRoleDefaultPolicy5BBC6F68", - "MyLambdaServiceRole4539ECB6" + "MyLambdaServiceRole4539ECB6", + "MyLambda2ServiceRoleDefaultPolicy2BECE79D", + "MyLambda2ServiceRoleD09B370C" ] } } diff --git a/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.ts b/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.ts index da6515233e770..c9441c1cd0a52 100644 --- a/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.ts +++ b/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.ts @@ -7,6 +7,7 @@ const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-cdk-lambda-1'); + const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 3, natGateways: 1, @@ -31,9 +32,7 @@ const accessPoint = fileSystem.addAccessPoint('AccessPoint', { }, }); -// this function will mount the access point to '/mnt/msg' and write content onto /mnt/msg/content -new lambda.Function(stack, 'MyLambda', { - code: new lambda.InlineCode(` +const lambdaCode = new lambda.InlineCode(` import json import os import string @@ -58,11 +57,46 @@ def lambda_handler(event, context): 'statusCode': 200, 'body': str(file_content) } - `), +`); + +// this function will mount the access point to '/mnt/msg' and write content onto /mnt/msg/content +const lambda1 = new lambda.Function(stack, 'MyLambda', { + code: lambdaCode, handler: 'index.lambda_handler', runtime: lambda.Runtime.PYTHON_3_7, vpc, filesystem: lambda.FileSystem.fromEfsAccessPoint(accessPoint, '/mnt/msg'), }); +let importedFileSystem = efs.FileSystem.fromFileSystemAttributes(stack, 'fileSystemImported', { + fileSystemId: fileSystem.fileSystemId, + securityGroup: ec2.SecurityGroup.fromSecurityGroupId( + stack, + 'securityGroup', + fileSystem.connections.securityGroups[0].securityGroupId, + ), +}); + +let importedAccessPoint = efs.AccessPoint.fromAccessPointAttributes(stack, 'AccessPointImported', { + accessPointId: accessPoint.accessPointId, + fileSystem: importedFileSystem, +}); + +// this function will mount the access point to '/mnt/msg' and write content onto /mnt/msg/content +const lambda2 = new lambda.Function(stack, 'MyLambda2', { + code: lambdaCode, + handler: 'index.lambda_handler', + runtime: lambda.Runtime.PYTHON_3_7, + vpc, + filesystem: lambda.FileSystem.fromEfsAccessPoint( + importedAccessPoint, + '/mnt/msg', + ), +}); + +// lambda2 doesn't have dependencies on MountTargets because the fileSystem is imported. +// Ideally, lambda2 would be deployed in another stack but integ doesn't support it. +// We are adding a dependency on the first lambda to simulate this situation. +lambda2.node.addDependency(lambda1); + app.synth(); diff --git a/packages/@aws-cdk/aws-logs/README.md b/packages/@aws-cdk/aws-logs/README.md index 038b6db28c3a2..880113852e355 100644 --- a/packages/@aws-cdk/aws-logs/README.md +++ b/packages/@aws-cdk/aws-logs/README.md @@ -41,11 +41,32 @@ lambda](https://docs.aws.amazon.com/lambda/latest/dg/monitoring-cloudwatchlogs.h This is implemented using a [CloudFormation custom resource](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cfn-customresource.html) which pre-creates the log group if it doesn't exist, and sets the specified log retention period (never expire, by default). - + By default, the log group will be created in the same region as the stack. The `logGroupRegion` property can be used to configure log groups in other regions. This is typically useful when controlling retention for log groups auto-created by global services that publish their log group to a specific region, such as AWS Chatbot creating a log group in `us-east-1`. - + +### Encrypting Log Groups + +By default, log group data is always encrypted in CloudWatch Logs. You have the +option to encrypt log group data using a AWS KMS customer master key (CMK) should +you not wish to use the default AWS encryption. Keep in mind that if you decide to +encrypt a log group, any service or IAM identity that needs to read the encrypted +log streams in the future will require the same CMK to decrypt the data. + +Here's a simple example of creating an encrypted Log Group using a KMS CMK. + +```ts +import * as kms from '@aws-cdk/aws-kms'; + +new LogGroup(this, 'LogGroup', { + encryptionKey: new kms.Key(this, 'Key'), +}); +``` + +See the AWS documentation for more detailed information about [encrypting CloudWatch +Logs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/encrypt-log-data-kms.html). + ### Subscriptions and Destinations Log events matching a particular filter can be sent to either a Lambda function @@ -100,7 +121,7 @@ the name `Namespace/MetricName`. #### Exposing Metric on a Metric Filter -You can expose a metric on a metric filter by calling the `MetricFilter.metric()` API. +You can expose a metric on a metric filter by calling the `MetricFilter.metric()` API. This has a default of `statistic = 'avg'` if the statistic is not set in the `props`. ```ts diff --git a/packages/@aws-cdk/aws-logs/lib/log-group.ts b/packages/@aws-cdk/aws-logs/lib/log-group.ts index e041b16b29bbd..83c4a8e170b89 100644 --- a/packages/@aws-cdk/aws-logs/lib/log-group.ts +++ b/packages/@aws-cdk/aws-logs/lib/log-group.ts @@ -1,5 +1,6 @@ import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; import * as iam from '@aws-cdk/aws-iam'; +import * as kms from '@aws-cdk/aws-kms'; import { IResource, RemovalPolicy, Resource, Stack, Token } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { LogStream } from './log-stream'; @@ -273,6 +274,13 @@ export enum RetentionDays { * Properties for a LogGroup */ export interface LogGroupProps { + /** + * The KMS Key to encrypt the log group with. + * + * @default - log group is encrypted with the default master key + */ + readonly encryptionKey?: kms.IKey; + /** * Name of the log group. * @@ -363,6 +371,7 @@ export class LogGroup extends LogGroupBase { } const resource = new CfnLogGroup(this, 'Resource', { + kmsKeyId: props.encryptionKey?.keyArn, logGroupName: this.physicalName, retentionInDays, }); diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index 9034ee8214849..d3df5c52c5a63 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.792.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", @@ -86,6 +86,7 @@ "dependencies": { "@aws-cdk/aws-cloudwatch": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", + "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-s3-assets": "0.0.0", "@aws-cdk/core": "0.0.0", "constructs": "^3.2.0" @@ -94,6 +95,7 @@ "peerDependencies": { "@aws-cdk/aws-cloudwatch": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", + "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-s3-assets": "0.0.0", "@aws-cdk/core": "0.0.0", "constructs": "^3.2.0" diff --git a/packages/@aws-cdk/aws-logs/test/test.loggroup.ts b/packages/@aws-cdk/aws-logs/test/test.loggroup.ts index 22330ae0e3b1f..333ae71a976c3 100644 --- a/packages/@aws-cdk/aws-logs/test/test.loggroup.ts +++ b/packages/@aws-cdk/aws-logs/test/test.loggroup.ts @@ -1,10 +1,30 @@ import { expect, haveResource, matchTemplate } from '@aws-cdk/assert'; import * as iam from '@aws-cdk/aws-iam'; +import * as kms from '@aws-cdk/aws-kms'; import { CfnParameter, RemovalPolicy, Stack } from '@aws-cdk/core'; import { Test } from 'nodeunit'; import { LogGroup, RetentionDays } from '../lib'; export = { + 'set kms key when provided'(test: Test) { + // GIVEN + const stack = new Stack(); + const encryptionKey = new kms.Key(stack, 'Key'); + + // WHEN + new LogGroup(stack, 'LogGroup', { + encryptionKey, + }); + + // THEN + expect(stack).to(haveResource('AWS::Logs::LogGroup', { + KmsKeyId: { 'Fn::GetAtt': ['Key961B73FD', 'Arn'] }, + + })); + + test.done(); + }, + 'fixed retention'(test: Test) { // GIVEN const stack = new Stack(); @@ -326,4 +346,4 @@ function dataDrivenTests(cases: any[][], body: (test: Test, ...args: any[]) => v }; } return ret; -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-mediapackage/.eslintrc.js b/packages/@aws-cdk/aws-mediapackage/.eslintrc.js new file mode 100644 index 0000000000000..61dd8dd001f63 --- /dev/null +++ b/packages/@aws-cdk/aws-mediapackage/.eslintrc.js @@ -0,0 +1,3 @@ +const baseConfig = require('cdk-build-tools/config/eslintrc'); +baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-mediapackage/.gitignore b/packages/@aws-cdk/aws-mediapackage/.gitignore new file mode 100644 index 0000000000000..62ebc95d75ce6 --- /dev/null +++ b/packages/@aws-cdk/aws-mediapackage/.gitignore @@ -0,0 +1,19 @@ +*.js +*.js.map +*.d.ts +tsconfig.json +node_modules +*.generated.ts +dist +.jsii + +.LAST_BUILD +.nyc_output +coverage +.nycrc +.LAST_PACKAGE +*.snk +nyc.config.js +!.eslintrc.js +!jest.config.js +junit.xml diff --git a/packages/@aws-cdk/aws-mediapackage/.npmignore b/packages/@aws-cdk/aws-mediapackage/.npmignore new file mode 100644 index 0000000000000..e4486030fcb17 --- /dev/null +++ b/packages/@aws-cdk/aws-mediapackage/.npmignore @@ -0,0 +1,28 @@ +# Don't include original .ts files when doing `npm pack` +*.ts +!*.d.ts +coverage +.nyc_output +*.tgz + +dist +.LAST_PACKAGE +.LAST_BUILD +!*.js + +# Include .jsii +!.jsii + +*.snk + +*.tsbuildinfo + +tsconfig.json + +.eslintrc.js +jest.config.js + +# exclude cdk artifacts +**/cdk.out +junit.xml +test/ diff --git a/packages/@aws-cdk/aws-mediapackage/LICENSE b/packages/@aws-cdk/aws-mediapackage/LICENSE new file mode 100644 index 0000000000000..b71ec1688783a --- /dev/null +++ b/packages/@aws-cdk/aws-mediapackage/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/@aws-cdk/aws-mediapackage/NOTICE b/packages/@aws-cdk/aws-mediapackage/NOTICE new file mode 100644 index 0000000000000..bfccac9a7f69c --- /dev/null +++ b/packages/@aws-cdk/aws-mediapackage/NOTICE @@ -0,0 +1,2 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-mediapackage/README.md b/packages/@aws-cdk/aws-mediapackage/README.md new file mode 100644 index 0000000000000..11d84261af563 --- /dev/null +++ b/packages/@aws-cdk/aws-mediapackage/README.md @@ -0,0 +1,16 @@ +## AWS::MediaPackage Construct Library + +--- + +![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) + +> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. + +--- + + +This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. + +```ts +import mediapackage = require('@aws-cdk/aws-mediapackage'); +``` diff --git a/packages/@aws-cdk/aws-mediapackage/jest.config.js b/packages/@aws-cdk/aws-mediapackage/jest.config.js new file mode 100644 index 0000000000000..54e28beb9798b --- /dev/null +++ b/packages/@aws-cdk/aws-mediapackage/jest.config.js @@ -0,0 +1,2 @@ +const baseConfig = require('cdk-build-tools/config/jest.config'); +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-mediapackage/lib/index.ts b/packages/@aws-cdk/aws-mediapackage/lib/index.ts new file mode 100644 index 0000000000000..730abc4ac52fc --- /dev/null +++ b/packages/@aws-cdk/aws-mediapackage/lib/index.ts @@ -0,0 +1,2 @@ +// AWS::MediaPackage CloudFormation Resources: +export * from './mediapackage.generated'; diff --git a/packages/@aws-cdk/aws-mediapackage/package.json b/packages/@aws-cdk/aws-mediapackage/package.json new file mode 100644 index 0000000000000..c3561ae1027bf --- /dev/null +++ b/packages/@aws-cdk/aws-mediapackage/package.json @@ -0,0 +1,96 @@ +{ + "name": "@aws-cdk/aws-mediapackage", + "version": "0.0.0", + "description": "The CDK Construct Library for AWS::MediaPackage", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "jsii": { + "outdir": "dist", + "projectReferences": true, + "targets": { + "dotnet": { + "namespace": "Amazon.CDK.AWS.MediaPackage", + "packageId": "Amazon.CDK.AWS.MediaPackage", + "signAssembly": true, + "assemblyOriginatorKeyFile": "../../key.snk", + "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/master/logo/default-256-dark.png" + }, + "java": { + "package": "software.amazon.awscdk.services.mediapackage", + "maven": { + "groupId": "software.amazon.awscdk", + "artifactId": "mediapackage" + } + }, + "python": { + "classifiers": [ + "Framework :: AWS CDK", + "Framework :: AWS CDK :: 1" + ], + "distName": "aws-cdk.aws-mediapackage", + "module": "aws_cdk.aws_mediapackage" + } + } + }, + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk.git", + "directory": "packages/@aws-cdk/aws-mediapackage" + }, + "homepage": "https://github.com/aws/aws-cdk", + "scripts": { + "build": "cdk-build", + "watch": "cdk-watch", + "lint": "cdk-lint", + "test": "cdk-test", + "integ": "cdk-integ", + "pkglint": "pkglint -f", + "package": "cdk-package", + "awslint": "cdk-awslint", + "cfn2ts": "cfn2ts", + "build+test+package": "npm run build+test && npm run package", + "build+test": "npm run build && npm test", + "compat": "cdk-compat", + "gen": "cfn2ts" + }, + "cdk-build": { + "cloudformation": "AWS::MediaPackage", + "jest": true, + "env": { + "AWSLINT_BASE_CONSTRUCT": "true" + } + }, + "keywords": [ + "aws", + "cdk", + "constructs", + "AWS::MediaPackage", + "aws-mediapackage" + ], + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "license": "Apache-2.0", + "devDependencies": { + "@aws-cdk/assert": "0.0.0", + "cdk-build-tools": "0.0.0", + "cfn2ts": "0.0.0", + "pkglint": "0.0.0" + }, + "dependencies": { + "@aws-cdk/core": "0.0.0" + }, + "peerDependencies": { + "@aws-cdk/core": "0.0.0" + }, + "engines": { + "node": ">= 10.13.0 <13 || >=13.7.0" + }, + "stability": "experimental", + "maturity": "cfn-only", + "awscdkio": { + "announce": false + } +} diff --git a/packages/@aws-cdk/aws-mediapackage/test/mediapackage.test.ts b/packages/@aws-cdk/aws-mediapackage/test/mediapackage.test.ts new file mode 100644 index 0000000000000..e394ef336bfb4 --- /dev/null +++ b/packages/@aws-cdk/aws-mediapackage/test/mediapackage.test.ts @@ -0,0 +1,6 @@ +import '@aws-cdk/assert/jest'; +import {} from '../lib'; + +test('No tests are specified for this package', () => { + expect(true).toBe(true); +}); diff --git a/packages/@aws-cdk/aws-route53/package.json b/packages/@aws-cdk/aws-route53/package.json index c2ae9cfcb68b6..301fee1bba9fe 100644 --- a/packages/@aws-cdk/aws-route53/package.json +++ b/packages/@aws-cdk/aws-route53/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.792.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-sqs/package.json b/packages/@aws-cdk/aws-sqs/package.json index f1a5ee11d78bb..0a88a1730515f 100644 --- a/packages/@aws-cdk/aws-sqs/package.json +++ b/packages/@aws-cdk/aws-sqs/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.792.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts index 50dc1b03a24bc..893bb55af6b02 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts @@ -157,7 +157,7 @@ export class AthenaStartQueryExecution extends sfn.TaskStateBase { }), cdk.Stack.of(this).formatArn({ service: 'glue', - resource: 'userdefinedfunction', + resource: 'userDefinedFunction', resourceName: (this.props.queryExecutionContext?.databaseName ?? 'default') + '/*', // grant access to get all user defined functions for the particular database in the request or the default database https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awsglue.html }), ], @@ -167,6 +167,17 @@ export class AthenaStartQueryExecution extends sfn.TaskStateBase { return policyStatements; } + private renderEncryption(): any { + const encryptionConfiguration = this.props.resultConfiguration?.encryptionConfiguration !== undefined + ? { + EncryptionOption: this.props.resultConfiguration.encryptionConfiguration.encryptionOption, + KmsKey: this.props.resultConfiguration.encryptionConfiguration.encryptionKey, + } + : undefined; + + return encryptionConfiguration; + } + /** * Provides the Athena start query execution service integration task configuration */ @@ -185,10 +196,7 @@ export class AthenaStartQueryExecution extends sfn.TaskStateBase { Database: this.props.queryExecutionContext?.databaseName, }, ResultConfiguration: { - EncryptionConfiguration: { - EncryptionOption: this.props.resultConfiguration?.encryptionConfiguration?.encryptionOption, - KmsKey: this.props.resultConfiguration?.encryptionConfiguration?.encryptionKey, - }, + EncryptionConfiguration: this.renderEncryption(), OutputLocation: `s3://${this.props.resultConfiguration?.outputLocation?.bucketName}/${this.props.resultConfiguration?.outputLocation?.objectKey}/`, }, WorkGroup: this.props.workGroup, @@ -205,10 +213,7 @@ export class AthenaStartQueryExecution extends sfn.TaskStateBase { Database: this.props.queryExecutionContext?.databaseName, }, ResultConfiguration: { - EncryptionConfiguration: { - EncryptionOption: this.props.resultConfiguration?.encryptionConfiguration?.encryptionOption, - KmsKey: this.props.resultConfiguration?.encryptionConfiguration?.encryptionKey, - }, + EncryptionConfiguration: this.renderEncryption(), }, WorkGroup: this.props.workGroup, }), diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.expected.json index 07442708a7080..2e06603d20af1 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.expected.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.expected.json @@ -89,7 +89,7 @@ "s3:ListBucket", "s3:GetBucketLocation", "s3:GetObject" - ], + ], "Effect": "Allow", "Resource": "*" }, @@ -208,7 +208,7 @@ { "Ref": "AWS::AccountId" }, - ":userdefinedfunction/mydatabase/*" + ":userDefinedFunction/mydatabase/*" ] ] } diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.expected.json index b11ec6cee2c3a..444c2edcf72de 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.expected.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.expected.json @@ -89,7 +89,7 @@ "s3:ListBucket", "s3:GetBucketLocation", "s3:GetObject" - ], + ], "Effect": "Allow", "Resource": "*" }, @@ -208,7 +208,7 @@ { "Ref": "AWS::AccountId" }, - ":userdefinedfunction/mydatabase/*" + ":userDefinedFunction/mydatabase/*" ] ] } diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.expected.json index 200fc56302b66..fb4d0e0169f51 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.expected.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.expected.json @@ -89,7 +89,7 @@ "s3:ListBucket", "s3:GetBucketLocation", "s3:GetObject" - ], + ], "Effect": "Allow", "Resource": "*" }, @@ -208,7 +208,7 @@ { "Ref": "AWS::AccountId" }, - ":userdefinedfunction/mydatabase/*" + ":userDefinedFunction/mydatabase/*" ] ] } diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.expected.json index a25e8d93b5bba..aa90bd274d85f 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.expected.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.expected.json @@ -89,7 +89,7 @@ "s3:ListBucket", "s3:GetBucketLocation", "s3:GetObject" - ], + ], "Effect": "Allow", "Resource": "*" }, @@ -208,7 +208,7 @@ { "Ref": "AWS::AccountId" }, - ":userdefinedfunction/mydatabase/*" + ":userDefinedFunction/mydatabase/*" ] ] } diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/start-query-execution.test.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/start-query-execution.test.ts index c96e4356c7a11..5742872286167 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/start-query-execution.test.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/start-query-execution.test.ts @@ -101,4 +101,56 @@ describe('Start Query Execution', () => { }, }); }); + + test('no encryptionConfiguration', () => { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + const task = new AthenaStartQueryExecution(stack, 'Query', { + queryString: 'CREATE DATABASE database', + clientRequestToken: 'unique-client-request-token', + queryExecutionContext: { + databaseName: 'mydatabase', + catalogName: 'AwsDataCatalog', + }, + resultConfiguration: { + outputLocation: { + bucketName: 'query-results-bucket', + objectKey: 'folder', + }, + }, + workGroup: 'primary', + }); + + // THEN + expect(stack.resolve(task.toStateJson())).toEqual({ + Type: 'Task', + Resource: { + 'Fn::Join': [ + '', + [ + 'arn:', + { + Ref: 'AWS::Partition', + }, + ':states:::athena:startQueryExecution', + ], + ], + }, + End: true, + Parameters: { + QueryString: 'CREATE DATABASE database', + ClientRequestToken: 'unique-client-request-token', + QueryExecutionContext: { + Database: 'mydatabase', + Catalog: 'AwsDataCatalog', + }, + ResultConfiguration: { + OutputLocation: 's3://query-results-bucket/folder/', + }, + WorkGroup: 'primary', + }, + }); + }); }); diff --git a/packages/@aws-cdk/cfnspec/CHANGELOG.md b/packages/@aws-cdk/cfnspec/CHANGELOG.md index 80dcd61c194ee..8a871d71fe7ce 100644 --- a/packages/@aws-cdk/cfnspec/CHANGELOG.md +++ b/packages/@aws-cdk/cfnspec/CHANGELOG.md @@ -1,3 +1,195 @@ +# CloudFormation Resource Specification v20.2.0 + +## New Resource Types + +* AWS::CloudWatch::MetricStream +* AWS::Events::Archive +* AWS::IoT::DomainConfiguration +* AWS::RDS::GlobalCluster + +## Attribute Changes + + +## Property Changes + +* AWS::CodeArtifact::Domain Tags (__added__) +* AWS::CodeArtifact::Repository Tags (__added__) +* AWS::Kendra::DataSource DataSourceConfiguration.Required (__changed__) + * Old: true + * New: false +* AWS::Kendra::DataSource RoleArn.Required (__changed__) + * Old: true + * New: false +* AWS::S3::Bucket IntelligentTieringConfigurations (__added__) +* AWS::S3::Bucket OwnershipControls (__added__) +* AWS::SecretsManager::ResourcePolicy BlockPublicPolicy (__added__) + +## Property Type Changes + +* AWS::Batch::JobDefinition.EvaluateOnExit (__added__) +* AWS::S3::Bucket.IntelligentTieringConfiguration (__added__) +* AWS::S3::Bucket.OwnershipControls (__added__) +* AWS::S3::Bucket.OwnershipControlsRule (__added__) +* AWS::S3::Bucket.Tiering (__added__) +* AWS::Batch::JobDefinition.RetryStrategy EvaluateOnExit (__added__) +* AWS::EC2::LaunchTemplate.CapacityReservationTarget CapacityReservationResourceGroupArn (__added__) +* AWS::EC2::LaunchTemplate.NetworkInterface AssociateCarrierIpAddress (__added__) +* AWS::EC2::LaunchTemplate.NetworkInterface NetworkCardIndex (__added__) +* AWS::Kendra::DataSource.S3DataSourceConfiguration InclusionPatterns (__added__) + + +# CloudFormation Resource Specification v20.0.0 + +## New Resource Types + +* AWS::IVS::Channel +* AWS::IVS::PlaybackKeyPair +* AWS::IVS::StreamKey +* AWS::IoTSiteWise::Asset +* AWS::IoTSiteWise::AssetModel +* AWS::IoTSiteWise::Gateway +* AWS::MediaPackage::Asset +* AWS::MediaPackage::Channel +* AWS::MediaPackage::OriginEndpoint +* AWS::MediaPackage::PackagingConfiguration +* AWS::MediaPackage::PackagingGroup + +## Attribute Changes + +* AWS::AutoScaling::AutoScalingGroup LaunchConfigurationName (__added__) +* AWS::AutoScaling::AutoScalingGroup LaunchTemplateSpecification (__added__) +* AWS::AutoScaling::AutoScalingGroup MixedInstancesPolicy (__added__) +* AWS::AutoScaling::AutoScalingGroup PlacementGroup (__added__) +* AWS::AutoScaling::AutoScalingGroup VPCZoneIdentifier (__added__) +* AWS::EC2::Subnet OutpostArn (__added__) + +## Property Changes + +* AWS::AmazonMQ::Broker LdapMetadata (__deleted__) +* AWS::AppSync::ApiKey ApiKeyId (__added__) +* AWS::AppSync::FunctionConfiguration SyncConfig (__added__) +* AWS::Athena::NamedQuery WorkGroup (__added__) +* AWS::AutoScaling::AutoScalingGroup CapacityRebalance (__added__) +* AWS::AutoScaling::LaunchConfiguration MetadataOptions (__added__) +* AWS::Batch::ComputeEnvironment Tags (__added__) +* AWS::Batch::JobDefinition Tags (__added__) +* AWS::Batch::JobQueue Tags (__added__) +* AWS::EC2::ClientVpnEndpoint SelfServicePortal (__added__) +* AWS::EC2::Route CarrierGatewayId (__added__) +* AWS::EC2::Route LocalGatewayId (__added__) +* AWS::EC2::Route VpcEndpointId (__added__) +* AWS::EC2::Subnet OutpostArn (__added__) +* AWS::EC2::VPCEndpointService ApplianceLoadBalancerArns (__deleted__) +* AWS::EMR::Cluster LogEncryptionKmsKeyId (__added__) +* AWS::EMR::Cluster ManagedScalingPolicy (__added__) +* AWS::EMR::Cluster StepConcurrencyLevel (__added__) +* AWS::ElastiCache::ReplicationGroup GlobalReplicationGroupId (__added__) +* AWS::ElastiCache::ReplicationGroup MultiAZEnabled.UpdateType (__changed__) + * Old: Immutable + * New: Mutable +* AWS::ElasticLoadBalancingV2::Listener Port.Required (__changed__) + * Old: true + * New: false +* AWS::ElasticLoadBalancingV2::Listener Protocol.Required (__changed__) + * Old: true + * New: false +* AWS::ElasticLoadBalancingV2::LoadBalancer SubnetMappings.UpdateType (__changed__) + * Old: Immutable + * New: Mutable +* AWS::GameLift::MatchmakingConfiguration FlexMatchMode (__added__) +* AWS::GameLift::MatchmakingConfiguration GameSessionQueueArns.Required (__changed__) + * Old: true + * New: false +* AWS::GlobalAccelerator::EndpointGroup PortOverrides (__added__) +* AWS::KinesisFirehose::DeliveryStream DeliveryStreamEncryptionConfigurationInput (__added__) +* AWS::KinesisFirehose::DeliveryStream Tags (__added__) +* AWS::KinesisFirehose::DeliveryStream KinesisStreamSourceConfiguration.UpdateType (__changed__) + * Old: Mutable + * New: Immutable +* AWS::LakeFormation::DataLakeSettings TrustedResourceOwners (__added__) +* AWS::Lambda::EventSourceMapping Queues (__added__) +* AWS::Lambda::EventSourceMapping SourceAccessConfigurations (__added__) +* AWS::Logs::LogGroup KmsKeyId (__added__) +* AWS::Logs::LogGroup LogGroupName.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html#cfn-cwl-loggroup-loggroupname + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html#cfn-logs-loggroup-loggroupname +* AWS::Logs::LogGroup RetentionInDays.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html#cfn-cwl-loggroup-retentionindays + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html#cfn-logs-loggroup-retentionindays +* AWS::RDS::DBCluster GlobalClusterIdentifier (__added__) +* AWS::RDS::DBCluster Engine.UpdateType (__changed__) + * Old: Immutable + * New: Conditional +* AWS::RDS::DBCluster EngineVersion.UpdateType (__changed__) + * Old: Immutable + * New: Mutable +* AWS::RDS::DBInstance Engine.UpdateType (__changed__) + * Old: Immutable + * New: Conditional +* AWS::SNS::Subscription SubscriptionRoleArn (__added__) +* AWS::SNS::Topic FifoTopic (__added__) + +## Property Type Changes + +* AWS::AmazonMQ::Broker.InterBrokerCred (__removed__) +* AWS::AmazonMQ::Broker.LdapMetadata (__removed__) +* AWS::AmazonMQ::Broker.ServerMetadata (__removed__) +* AWS::AppSync::FunctionConfiguration.LambdaConflictHandlerConfig (__added__) +* AWS::AppSync::FunctionConfiguration.SyncConfig (__added__) +* AWS::AutoScaling::LaunchConfiguration.MetadataOption (__added__) +* AWS::CloudFront::Distribution.OriginShield (__added__) +* AWS::EMR::Cluster.ComputeLimits (__added__) +* AWS::EMR::Cluster.ManagedScalingPolicy (__added__) +* AWS::EMR::Cluster.OnDemandProvisioningSpecification (__added__) +* AWS::EMR::InstanceFleetConfig.OnDemandProvisioningSpecification (__added__) +* AWS::Events::Rule.DeadLetterConfig (__added__) +* AWS::Events::Rule.RedshiftDataParameters (__added__) +* AWS::Events::Rule.RetryPolicy (__added__) +* AWS::GlobalAccelerator::EndpointGroup.PortOverride (__added__) +* AWS::KinesisFirehose::DeliveryStream.DeliveryStreamEncryptionConfigurationInput (__added__) +* AWS::Lambda::EventSourceMapping.SourceAccessConfiguration (__added__) +* AWS::SageMaker::Model.ImageConfig (__added__) +* AWS::Transfer::Server.SecurityGroupId (__added__) +* AWS::AutoScaling::AutoScalingGroup.LaunchTemplateOverrides LaunchTemplateSpecification (__added__) +* AWS::CloudFront::Distribution.Origin OriginShield (__added__) +* AWS::DLM::LifecyclePolicy.Parameters NoReboot (__added__) +* AWS::EC2::ClientVpnEndpoint.FederatedAuthenticationRequest SelfServiceSAMLProviderArn (__added__) +* AWS::EMR::Cluster.InstanceFleetProvisioningSpecifications OnDemandSpecification (__added__) +* AWS::EMR::Cluster.InstanceFleetProvisioningSpecifications SpotSpecification.Required (__changed__) + * Old: true + * New: false +* AWS::EMR::Cluster.SpotProvisioningSpecification AllocationStrategy (__added__) +* AWS::EMR::InstanceFleetConfig.InstanceFleetProvisioningSpecifications OnDemandSpecification (__added__) +* AWS::EMR::InstanceFleetConfig.InstanceFleetProvisioningSpecifications SpotSpecification.Required (__changed__) + * Old: true + * New: false +* AWS::EMR::InstanceFleetConfig.SpotProvisioningSpecification AllocationStrategy (__added__) +* AWS::ElasticLoadBalancingV2::LoadBalancer.SubnetMapping IPv6Address (__added__) +* AWS::ElasticLoadBalancingV2::TargetGroup.Matcher HttpCode.Required (__changed__) + * Old: true + * New: false +* AWS::Elasticsearch::Domain.ElasticsearchClusterConfig WarmCount (__added__) +* AWS::Elasticsearch::Domain.ElasticsearchClusterConfig WarmEnabled (__added__) +* AWS::Elasticsearch::Domain.ElasticsearchClusterConfig WarmType (__added__) +* AWS::Events::Rule.Target DeadLetterConfig (__added__) +* AWS::Events::Rule.Target RedshiftDataParameters (__added__) +* AWS::Events::Rule.Target RetryPolicy (__added__) +* AWS::KinesisFirehose::DeliveryStream.KinesisStreamSourceConfiguration KinesisStreamARN.UpdateType (__changed__) + * Old: Mutable + * New: Immutable +* AWS::KinesisFirehose::DeliveryStream.KinesisStreamSourceConfiguration RoleARN.UpdateType (__changed__) + * Old: Mutable + * New: Immutable +* AWS::S3::Bucket.Metrics EventThreshold.Required (__changed__) + * Old: true + * New: false +* AWS::S3::Bucket.SourceSelectionCriteria SseKmsEncryptedObjects.Required (__changed__) + * Old: true + * New: false +* AWS::SageMaker::Model.ContainerDefinition ImageConfig (__added__) +* AWS::Transfer::Server.EndpointDetails SecurityGroupIds (__added__) + + # CloudFormation Resource Specification v18.7.0 ## New Resource Types diff --git a/packages/@aws-cdk/cfnspec/build-tools/create-missing-libraries.ts b/packages/@aws-cdk/cfnspec/build-tools/create-missing-libraries.ts index 2bf2b707b6a09..55863ee5f8e13 100644 --- a/packages/@aws-cdk/cfnspec/build-tools/create-missing-libraries.ts +++ b/packages/@aws-cdk/cfnspec/build-tools/create-missing-libraries.ts @@ -298,19 +298,31 @@ async function main() { await fs.copy(path.join(templateDir, file), path.join(packagePath, file)); } - // update decdk - const decdkPkgJsonPath = path.join(__dirname, '..', '..', '..', 'decdk', 'package.json'); - const decdkPkg = JSON.parse(await fs.readFile(decdkPkgJsonPath, 'utf8')); + await addDependencyToMegaPackage(path.join('@aws-cdk', 'cloudformation-include'), packageName, version, ['dependencies', 'peerDependencies']); + await addDependencyToMegaPackage('aws-cdk-lib', packageName, version, ['devDependencies']); + await addDependencyToMegaPackage('monocdk', packageName, version, ['devDependencies']); + await addDependencyToMegaPackage('decdk', packageName, version, ['dependencies']); + } +} + +/** + * A few of our packages (e.g., decdk, aws-cdk-lib) require a dependency on every service package. + * This automates adding the dependency (and peer dependency) to the package.json. + */ +async function addDependencyToMegaPackage(megaPackageName: string, packageName: string, version: string, dependencyTypes: string[]) { + const packageJsonPath = path.join(__dirname, '..', '..', '..', megaPackageName, 'package.json'); + const packageJson = JSON.parse(await fs.readFile(packageJsonPath, 'utf8')); + dependencyTypes.forEach(dependencyType => { const unorderedDeps = { - ...decdkPkg.dependencies, + ...packageJson[dependencyType], [packageName]: version, }; - decdkPkg.dependencies = {}; + packageJson[dependencyType] = {}; Object.keys(unorderedDeps).sort().forEach(k => { - decdkPkg.dependencies[k] = unorderedDeps[k]; + packageJson[dependencyType][k] = unorderedDeps[k]; }); - await fs.writeFile(decdkPkgJsonPath, JSON.stringify(decdkPkg, null, 2) + '\n'); - } + }); + await fs.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\n'); } main().catch(e => { diff --git a/packages/@aws-cdk/cfnspec/cfn.version b/packages/@aws-cdk/cfnspec/cfn.version index fb67e3d517039..86d4688d0910a 100644 --- a/packages/@aws-cdk/cfnspec/cfn.version +++ b/packages/@aws-cdk/cfnspec/cfn.version @@ -1 +1 @@ -18.7.0 +20.2.0 diff --git a/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json b/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json index a118251db1d89..e9a8d24f35f4f 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json +++ b/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json @@ -236,41 +236,6 @@ } } }, - "AWS::AmazonMQ::Broker.InterBrokerCred": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-interbrokercred.html", - "Properties": { - "Password": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-interbrokercred.html#cfn-amazonmq-broker-interbrokercred-password", - "PrimitiveType": "String", - "Required": true, - "UpdateType": "Mutable" - }, - "Username": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-interbrokercred.html#cfn-amazonmq-broker-interbrokercred-username", - "PrimitiveType": "String", - "Required": true, - "UpdateType": "Mutable" - } - } - }, - "AWS::AmazonMQ::Broker.LdapMetadata": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-ldapmetadata.html", - "Properties": { - "InterBrokerCreds": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-ldapmetadata.html#cfn-amazonmq-broker-ldapmetadata-interbrokercreds", - "ItemType": "InterBrokerCred", - "Required": false, - "Type": "List", - "UpdateType": "Mutable" - }, - "ServerMetadata": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-ldapmetadata.html#cfn-amazonmq-broker-ldapmetadata-servermetadata", - "Required": true, - "Type": "ServerMetadata", - "UpdateType": "Mutable" - } - } - }, "AWS::AmazonMQ::Broker.LdapServerMetadata": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-ldapservermetadata.html", "Properties": { @@ -383,78 +348,6 @@ } } }, - "AWS::AmazonMQ::Broker.ServerMetadata": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-servermetadata.html", - "Properties": { - "Hosts": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-servermetadata.html#cfn-amazonmq-broker-servermetadata-hosts", - "PrimitiveItemType": "String", - "Required": true, - "Type": "List", - "UpdateType": "Mutable" - }, - "RoleBase": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-servermetadata.html#cfn-amazonmq-broker-servermetadata-rolebase", - "PrimitiveType": "String", - "Required": true, - "UpdateType": "Mutable" - }, - "RoleName": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-servermetadata.html#cfn-amazonmq-broker-servermetadata-rolename", - "PrimitiveType": "String", - "Required": false, - "UpdateType": "Mutable" - }, - "RoleSearchMatching": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-servermetadata.html#cfn-amazonmq-broker-servermetadata-rolesearchmatching", - "PrimitiveType": "String", - "Required": true, - "UpdateType": "Mutable" - }, - "RoleSearchSubtree": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-servermetadata.html#cfn-amazonmq-broker-servermetadata-rolesearchsubtree", - "PrimitiveType": "Boolean", - "Required": false, - "UpdateType": "Mutable" - }, - "ServiceAccountPassword": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-servermetadata.html#cfn-amazonmq-broker-servermetadata-serviceaccountpassword", - "PrimitiveType": "String", - "Required": true, - "UpdateType": "Mutable" - }, - "ServiceAccountUsername": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-servermetadata.html#cfn-amazonmq-broker-servermetadata-serviceaccountusername", - "PrimitiveType": "String", - "Required": true, - "UpdateType": "Mutable" - }, - "UserBase": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-servermetadata.html#cfn-amazonmq-broker-servermetadata-userbase", - "PrimitiveType": "String", - "Required": true, - "UpdateType": "Mutable" - }, - "UserRoleName": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-servermetadata.html#cfn-amazonmq-broker-servermetadata-userrolename", - "PrimitiveType": "String", - "Required": false, - "UpdateType": "Mutable" - }, - "UserSearchMatching": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-servermetadata.html#cfn-amazonmq-broker-servermetadata-usersearchmatching", - "PrimitiveType": "String", - "Required": true, - "UpdateType": "Mutable" - }, - "UserSearchSubtree": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-servermetadata.html#cfn-amazonmq-broker-servermetadata-usersearchsubtree", - "PrimitiveType": "Boolean", - "Required": false, - "UpdateType": "Mutable" - } - } - }, "AWS::AmazonMQ::Broker.TagsEntry": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-tagsentry.html", "Properties": { @@ -5284,6 +5177,40 @@ } } }, + "AWS::AppSync::FunctionConfiguration.LambdaConflictHandlerConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-functionconfiguration-lambdaconflicthandlerconfig.html", + "Properties": { + "LambdaConflictHandlerArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-functionconfiguration-lambdaconflicthandlerconfig.html#cfn-appsync-functionconfiguration-lambdaconflicthandlerconfig-lambdaconflicthandlerarn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::AppSync::FunctionConfiguration.SyncConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-functionconfiguration-syncconfig.html", + "Properties": { + "ConflictDetection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-functionconfiguration-syncconfig.html#cfn-appsync-functionconfiguration-syncconfig-conflictdetection", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "ConflictHandler": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-functionconfiguration-syncconfig.html#cfn-appsync-functionconfiguration-syncconfig-conflicthandler", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "LambdaConflictHandlerConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-functionconfiguration-syncconfig.html#cfn-appsync-functionconfiguration-syncconfig-lambdaconflicthandlerconfig", + "Required": false, + "Type": "LambdaConflictHandlerConfig", + "UpdateType": "Mutable" + } + } + }, "AWS::AppSync::GraphQLApi.AdditionalAuthenticationProvider": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-additionalauthenticationprovider.html", "Properties": { @@ -6255,6 +6182,12 @@ "Required": false, "UpdateType": "Mutable" }, + "LaunchTemplateSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-launchtemplatespecification", + "Required": false, + "Type": "LaunchTemplateSpecification", + "UpdateType": "Mutable" + }, "WeightedCapacity": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-weightedcapacity", "PrimitiveType": "String", @@ -6481,6 +6414,29 @@ } } }, + "AWS::AutoScaling::LaunchConfiguration.MetadataOption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfig-metadataoption.html", + "Properties": { + "HttpEndpoint": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfig-metadataoption.html#cfn-autoscaling-launchconfig-metadataoption-httpendpoint", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "HttpPutResponseHopLimit": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfig-metadataoption.html#cfn-autoscaling-launchconfig-metadataoption-httpputresponsehoplimit", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "HttpTokens": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfig-metadataoption.html#cfn-autoscaling-launchconfig-metadataoption-httptokens", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::AutoScaling::ScalingPolicy.CustomizedMetricSpecification": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-customizedmetricspecification.html", "Properties": { @@ -7390,6 +7346,35 @@ } } }, + "AWS::Batch::JobDefinition.EvaluateOnExit": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-evaluateonexit.html", + "Properties": { + "Action": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-evaluateonexit.html#cfn-batch-jobdefinition-evaluateonexit-action", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "OnExitCode": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-evaluateonexit.html#cfn-batch-jobdefinition-evaluateonexit-onexitcode", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "OnReason": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-evaluateonexit.html#cfn-batch-jobdefinition-evaluateonexit-onreason", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "OnStatusReason": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-evaluateonexit.html#cfn-batch-jobdefinition-evaluateonexit-onstatusreason", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::Batch::JobDefinition.LinuxParameters": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-containerproperties-linuxparameters.html", "Properties": { @@ -7546,6 +7531,13 @@ "PrimitiveType": "Integer", "Required": false, "UpdateType": "Mutable" + }, + "EvaluateOnExit": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-retrystrategy.html#cfn-batch-jobdefinition-retrystrategy-evaluateonexit", + "ItemType": "EvaluateOnExit", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" } } }, @@ -8812,6 +8804,12 @@ "Required": false, "UpdateType": "Mutable" }, + "OriginShield": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-origin.html#cfn-cloudfront-distribution-origin-originshield", + "Required": false, + "Type": "OriginShield", + "UpdateType": "Mutable" + }, "S3OriginConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-origin.html#cfn-cloudfront-distribution-origin-s3originconfig", "Required": false, @@ -8918,6 +8916,23 @@ } } }, + "AWS::CloudFront::Distribution.OriginShield": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-originshield.html", + "Properties": { + "Enabled": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-originshield.html#cfn-cloudfront-distribution-originshield-enabled", + "PrimitiveType": "Boolean", + "Required": true, + "UpdateType": "Mutable" + }, + "OriginShieldRegion": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-originshield.html#cfn-cloudfront-distribution-originshield-originshieldregion", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::CloudFront::Distribution.Restrictions": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-restrictions.html", "Properties": { @@ -9440,6 +9455,17 @@ "Type": "List", "UpdateType": "Mutable" }, + "AWS::CloudWatch::MetricStream.MetricStreamFilter": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-metricstream-metricstreamfilter.html", + "Properties": { + "Namespace": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-metricstream-metricstreamfilter.html#cfn-cloudwatch-metricstream-metricstreamfilter-namespace", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::CodeBuild::Project.Artifacts": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html", "Properties": { @@ -12194,6 +12220,12 @@ "PrimitiveType": "Boolean", "Required": false, "UpdateType": "Mutable" + }, + "NoReboot": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-parameters.html#cfn-dlm-lifecyclepolicy-parameters-noreboot", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" } } }, @@ -13016,6 +13048,12 @@ "PrimitiveType": "String", "Required": true, "UpdateType": "Mutable" + }, + "SelfServiceSAMLProviderArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-clientvpnendpoint-federatedauthenticationrequest.html#cfn-ec2-clientvpnendpoint-federatedauthenticationrequest-selfservicesamlproviderarn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" } } }, @@ -13725,6 +13763,12 @@ "PrimitiveType": "String", "Required": false, "UpdateType": "Mutable" + }, + "CapacityReservationResourceGroupArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-capacityreservationtarget.html#cfn-ec2-launchtemplate-capacityreservationtarget-capacityreservationresourcegrouparn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" } } }, @@ -14104,6 +14148,12 @@ "AWS::EC2::LaunchTemplate.NetworkInterface": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-networkinterface.html", "Properties": { + "AssociateCarrierIpAddress": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-networkinterface.html#cfn-ec2-launchtemplate-networkinterface-associatecarrieripaddress", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, "AssociatePublicIpAddress": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-networkinterface.html#cfn-ec2-launchtemplate-networkinterface-associatepublicipaddress", "PrimitiveType": "Boolean", @@ -14154,6 +14204,12 @@ "Type": "List", "UpdateType": "Mutable" }, + "NetworkCardIndex": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-networkinterface.html#cfn-ec2-launchtemplate-networkinterface-networkcardindex", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, "NetworkInterfaceId": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-networkinterface.html#cfn-ec2-launchtemplate-networkinterface-networkinterfaceid", "PrimitiveType": "String", @@ -16824,6 +16880,41 @@ } } }, + "AWS::EMR::Cluster.ComputeLimits": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-computelimits.html", + "Properties": { + "MaximumCapacityUnits": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-computelimits.html#cfn-elasticmapreduce-cluster-computelimits-maximumcapacityunits", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + }, + "MaximumCoreCapacityUnits": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-computelimits.html#cfn-elasticmapreduce-cluster-computelimits-maximumcorecapacityunits", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "MaximumOnDemandCapacityUnits": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-computelimits.html#cfn-elasticmapreduce-cluster-computelimits-maximumondemandcapacityunits", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "MinimumCapacityUnits": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-computelimits.html#cfn-elasticmapreduce-cluster-computelimits-minimumcapacityunits", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + }, + "UnitType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-computelimits.html#cfn-elasticmapreduce-cluster-computelimits-unittype", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::EMR::Cluster.Configuration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-configuration.html", "Properties": { @@ -16960,9 +17051,15 @@ "AWS::EMR::Cluster.InstanceFleetProvisioningSpecifications": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancefleetprovisioningspecifications.html", "Properties": { + "OnDemandSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancefleetprovisioningspecifications.html#cfn-elasticmapreduce-cluster-instancefleetprovisioningspecifications-ondemandspecification", + "Required": false, + "Type": "OnDemandProvisioningSpecification", + "UpdateType": "Mutable" + }, "SpotSpecification": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancefleetprovisioningspecifications.html#cfn-elasticmapreduce-cluster-instancefleetprovisioningspecifications-spotspecification", - "Required": true, + "Required": false, "Type": "SpotProvisioningSpecification", "UpdateType": "Mutable" } @@ -17225,6 +17322,17 @@ } } }, + "AWS::EMR::Cluster.ManagedScalingPolicy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-managedscalingpolicy.html", + "Properties": { + "ComputeLimits": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-managedscalingpolicy.html#cfn-elasticmapreduce-cluster-managedscalingpolicy-computelimits", + "Required": false, + "Type": "ComputeLimits", + "UpdateType": "Mutable" + } + } + }, "AWS::EMR::Cluster.MetricDimension": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-metricdimension.html", "Properties": { @@ -17242,6 +17350,17 @@ } } }, + "AWS::EMR::Cluster.OnDemandProvisioningSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-ondemandprovisioningspecification.html", + "Properties": { + "AllocationStrategy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-ondemandprovisioningspecification.html#cfn-elasticmapreduce-cluster-ondemandprovisioningspecification-allocationstrategy", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::EMR::Cluster.PlacementType": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-placementtype.html", "Properties": { @@ -17372,6 +17491,12 @@ "AWS::EMR::Cluster.SpotProvisioningSpecification": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-spotprovisioningspecification.html", "Properties": { + "AllocationStrategy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-spotprovisioningspecification.html#cfn-elasticmapreduce-cluster-spotprovisioningspecification-allocationstrategy", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "BlockDurationMinutes": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-spotprovisioningspecification.html#cfn-elasticmapreduce-cluster-spotprovisioningspecification-blockdurationminutes", "PrimitiveType": "Integer", @@ -17504,9 +17629,15 @@ "AWS::EMR::InstanceFleetConfig.InstanceFleetProvisioningSpecifications": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-instancefleetprovisioningspecifications.html", "Properties": { + "OnDemandSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-instancefleetprovisioningspecifications.html#cfn-elasticmapreduce-instancefleetconfig-instancefleetprovisioningspecifications-ondemandspecification", + "Required": false, + "Type": "OnDemandProvisioningSpecification", + "UpdateType": "Mutable" + }, "SpotSpecification": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-instancefleetprovisioningspecifications.html#cfn-elasticmapreduce-instancefleetconfig-instancefleetprovisioningspecifications-spotspecification", - "Required": true, + "Required": false, "Type": "SpotProvisioningSpecification", "UpdateType": "Mutable" } @@ -17555,9 +17686,26 @@ } } }, + "AWS::EMR::InstanceFleetConfig.OnDemandProvisioningSpecification": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-ondemandprovisioningspecification.html", + "Properties": { + "AllocationStrategy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-ondemandprovisioningspecification.html#cfn-elasticmapreduce-instancefleetconfig-ondemandprovisioningspecification-allocationstrategy", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::EMR::InstanceFleetConfig.SpotProvisioningSpecification": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-spotprovisioningspecification.html", "Properties": { + "AllocationStrategy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-spotprovisioningspecification.html#cfn-elasticmapreduce-instancefleetconfig-spotprovisioningspecification-allocationstrategy", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "BlockDurationMinutes": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-spotprovisioningspecification.html#cfn-elasticmapreduce-instancefleetconfig-spotprovisioningspecification-blockdurationminutes", "PrimitiveType": "Integer", @@ -19173,6 +19321,12 @@ "Required": false, "UpdateType": "Mutable" }, + "IPv6Address": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-loadbalancer-subnetmapping.html#cfn-elasticloadbalancingv2-loadbalancer-subnetmapping-ipv6address", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "PrivateIPv4Address": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-loadbalancer-subnetmapping.html#cfn-elasticloadbalancingv2-loadbalancer-subnetmapping-privateipv4address", "PrimitiveType": "String", @@ -19193,7 +19347,7 @@ "HttpCode": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-targetgroup-matcher.html#cfn-elasticloadbalancingv2-targetgroup-matcher-httpcode", "PrimitiveType": "String", - "Required": true, + "Required": false, "UpdateType": "Mutable" } } @@ -19369,6 +19523,24 @@ "Required": false, "UpdateType": "Mutable" }, + "WarmCount": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticsearch-domain-elasticsearchclusterconfig.html#cfn-elasticsearch-domain-elasticsearchclusterconfig-warmcount", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "WarmEnabled": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticsearch-domain-elasticsearchclusterconfig.html#cfn-elasticsearch-domain-elasticsearchclusterconfig-warmenabled", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "WarmType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticsearch-domain-elasticsearchclusterconfig.html#cfn-elasticsearch-domain-elasticsearchclusterconfig-warmtype", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "ZoneAwarenessConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticsearch-domain-elasticsearchclusterconfig.html#cfn-elasticsearch-domain-elasticsearchclusterconfig-zoneawarenessconfig", "Required": false, @@ -19646,6 +19818,17 @@ } } }, + "AWS::Events::Rule.DeadLetterConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-deadletterconfig.html", + "Properties": { + "Arn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-deadletterconfig.html#cfn-events-rule-deadletterconfig-arn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::Events::Rule.EcsParameters": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-ecsparameters.html", "Properties": { @@ -19757,6 +19940,64 @@ } } }, + "AWS::Events::Rule.RedshiftDataParameters": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-redshiftdataparameters.html", + "Properties": { + "Database": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-redshiftdataparameters.html#cfn-events-rule-redshiftdataparameters-database", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "DbUser": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-redshiftdataparameters.html#cfn-events-rule-redshiftdataparameters-dbuser", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "SecretManagerArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-redshiftdataparameters.html#cfn-events-rule-redshiftdataparameters-secretmanagerarn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Sql": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-redshiftdataparameters.html#cfn-events-rule-redshiftdataparameters-sql", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "StatementName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-redshiftdataparameters.html#cfn-events-rule-redshiftdataparameters-statementname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "WithEvent": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-redshiftdataparameters.html#cfn-events-rule-redshiftdataparameters-withevent", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::Events::Rule.RetryPolicy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-retrypolicy.html", + "Properties": { + "MaximumEventAgeInSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-retrypolicy.html#cfn-events-rule-retrypolicy-maximumeventageinseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "MaximumRetryAttempts": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-retrypolicy.html#cfn-events-rule-retrypolicy-maximumretryattempts", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::Events::Rule.RunCommandParameters": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-runcommandparameters.html", "Properties": { @@ -19815,6 +20056,12 @@ "Type": "BatchParameters", "UpdateType": "Mutable" }, + "DeadLetterConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-deadletterconfig", + "Required": false, + "Type": "DeadLetterConfig", + "UpdateType": "Mutable" + }, "EcsParameters": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-ecsparameters", "Required": false, @@ -19857,6 +20104,18 @@ "Type": "KinesisParameters", "UpdateType": "Mutable" }, + "RedshiftDataParameters": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-redshiftdataparameters", + "Required": false, + "Type": "RedshiftDataParameters", + "UpdateType": "Mutable" + }, + "RetryPolicy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-retrypolicy", + "Required": false, + "Type": "RetryPolicy", + "UpdateType": "Mutable" + }, "RoleArn": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-rolearn", "PrimitiveType": "String", @@ -20460,6 +20719,23 @@ } } }, + "AWS::GlobalAccelerator::EndpointGroup.PortOverride": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-endpointgroup-portoverride.html", + "Properties": { + "EndpointPort": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-endpointgroup-portoverride.html#cfn-globalaccelerator-endpointgroup-portoverride-endpointport", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + }, + "ListenerPort": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-endpointgroup-portoverride.html#cfn-globalaccelerator-endpointgroup-portoverride-listenerport", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::GlobalAccelerator::Listener.PortRange": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-listener-portrange.html", "Properties": { @@ -23154,6 +23430,58 @@ "AWS::IoT::Authorizer.TokenSigningPublicKeys": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-authorizer-tokensigningpublickeys.html" }, + "AWS::IoT::DomainConfiguration.AuthorizerConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-authorizerconfig.html", + "Properties": { + "AllowAuthorizerOverride": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-authorizerconfig.html#cfn-iot-domainconfiguration-authorizerconfig-allowauthorizeroverride", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "DefaultAuthorizerName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-authorizerconfig.html#cfn-iot-domainconfiguration-authorizerconfig-defaultauthorizername", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::IoT::DomainConfiguration.ServerCertificateSummary": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-servercertificatesummary.html", + "Properties": { + "ServerCertificateArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-servercertificatesummary.html#cfn-iot-domainconfiguration-servercertificatesummary-servercertificatearn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "ServerCertificateStatus": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-servercertificatesummary.html#cfn-iot-domainconfiguration-servercertificatesummary-servercertificatestatus", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "ServerCertificateStatusDetail": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-servercertificatesummary.html#cfn-iot-domainconfiguration-servercertificatesummary-servercertificatestatusdetail", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::IoT::DomainConfiguration.Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-tags.html", + "Properties": { + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-tags.html#cfn-iot-domainconfiguration-tags-tags", + "ItemType": "Json", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, "AWS::IoT::ProvisioningTemplate.ProvisioningHook": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-provisioningtemplate-provisioninghook.html", "Properties": { @@ -25378,6 +25706,281 @@ } } }, + "AWS::IoTSiteWise::Asset.AssetHierarchy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-asset-assethierarchy.html", + "Properties": { + "ChildAssetId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-asset-assethierarchy.html#cfn-iotsitewise-asset-assethierarchy-childassetid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "LogicalId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-asset-assethierarchy.html#cfn-iotsitewise-asset-assethierarchy-logicalid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::Asset.AssetProperty": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-asset-assetproperty.html", + "Properties": { + "Alias": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-asset-assetproperty.html#cfn-iotsitewise-asset-assetproperty-alias", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "LogicalId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-asset-assetproperty.html#cfn-iotsitewise-asset-assetproperty-logicalid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "NotificationState": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-asset-assetproperty.html#cfn-iotsitewise-asset-assetproperty-notificationstate", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::AssetModel.AssetModelHierarchy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelhierarchy.html", + "Properties": { + "ChildAssetModelId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelhierarchy.html#cfn-iotsitewise-assetmodel-assetmodelhierarchy-childassetmodelid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "LogicalId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelhierarchy.html#cfn-iotsitewise-assetmodel-assetmodelhierarchy-logicalid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelhierarchy.html#cfn-iotsitewise-assetmodel-assetmodelhierarchy-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::AssetModel.AssetModelProperty": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelproperty.html", + "Properties": { + "DataType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelproperty.html#cfn-iotsitewise-assetmodel-assetmodelproperty-datatype", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "LogicalId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelproperty.html#cfn-iotsitewise-assetmodel-assetmodelproperty-logicalid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelproperty.html#cfn-iotsitewise-assetmodel-assetmodelproperty-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Type": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelproperty.html#cfn-iotsitewise-assetmodel-assetmodelproperty-type", + "Required": true, + "Type": "PropertyType", + "UpdateType": "Mutable" + }, + "Unit": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-assetmodelproperty.html#cfn-iotsitewise-assetmodel-assetmodelproperty-unit", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::AssetModel.Attribute": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-attribute.html", + "Properties": { + "DefaultValue": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-attribute.html#cfn-iotsitewise-assetmodel-attribute-defaultvalue", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::AssetModel.ExpressionVariable": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-expressionvariable.html", + "Properties": { + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-expressionvariable.html#cfn-iotsitewise-assetmodel-expressionvariable-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-expressionvariable.html#cfn-iotsitewise-assetmodel-expressionvariable-value", + "Required": true, + "Type": "VariableValue", + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::AssetModel.Metric": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-metric.html", + "Properties": { + "Expression": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-metric.html#cfn-iotsitewise-assetmodel-metric-expression", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Variables": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-metric.html#cfn-iotsitewise-assetmodel-metric-variables", + "ItemType": "ExpressionVariable", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + }, + "Window": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-metric.html#cfn-iotsitewise-assetmodel-metric-window", + "Required": true, + "Type": "MetricWindow", + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::AssetModel.MetricWindow": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-metricwindow.html", + "Properties": { + "Tumbling": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-metricwindow.html#cfn-iotsitewise-assetmodel-metricwindow-tumbling", + "Required": false, + "Type": "TumblingWindow", + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::AssetModel.PropertyType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-propertytype.html", + "Properties": { + "Attribute": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-propertytype.html#cfn-iotsitewise-assetmodel-propertytype-attribute", + "Required": false, + "Type": "Attribute", + "UpdateType": "Mutable" + }, + "Metric": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-propertytype.html#cfn-iotsitewise-assetmodel-propertytype-metric", + "Required": false, + "Type": "Metric", + "UpdateType": "Mutable" + }, + "Transform": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-propertytype.html#cfn-iotsitewise-assetmodel-propertytype-transform", + "Required": false, + "Type": "Transform", + "UpdateType": "Mutable" + }, + "TypeName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-propertytype.html#cfn-iotsitewise-assetmodel-propertytype-typename", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::AssetModel.Transform": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-transform.html", + "Properties": { + "Expression": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-transform.html#cfn-iotsitewise-assetmodel-transform-expression", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Variables": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-transform.html#cfn-iotsitewise-assetmodel-transform-variables", + "ItemType": "ExpressionVariable", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::AssetModel.TumblingWindow": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-tumblingwindow.html", + "Properties": { + "Interval": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-tumblingwindow.html#cfn-iotsitewise-assetmodel-tumblingwindow-interval", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::AssetModel.VariableValue": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-variablevalue.html", + "Properties": { + "HierarchyLogicalId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-variablevalue.html#cfn-iotsitewise-assetmodel-variablevalue-hierarchylogicalid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "PropertyLogicalId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-assetmodel-variablevalue.html#cfn-iotsitewise-assetmodel-variablevalue-propertylogicalid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::Gateway.GatewayCapabilitySummary": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-gateway-gatewaycapabilitysummary.html", + "Properties": { + "CapabilityConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-gateway-gatewaycapabilitysummary.html#cfn-iotsitewise-gateway-gatewaycapabilitysummary-capabilityconfiguration", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "CapabilityNamespace": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-gateway-gatewaycapabilitysummary.html#cfn-iotsitewise-gateway-gatewaycapabilitysummary-capabilitynamespace", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::Gateway.GatewayPlatform": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-gateway-gatewayplatform.html", + "Properties": { + "Greengrass": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-gateway-gatewayplatform.html#cfn-iotsitewise-gateway-gatewayplatform-greengrass", + "Required": true, + "Type": "Greengrass", + "UpdateType": "Immutable" + } + } + }, + "AWS::IoTSiteWise::Gateway.Greengrass": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-gateway-greengrass.html", + "Properties": { + "GroupArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-gateway-greengrass.html#cfn-iotsitewise-gateway-greengrass-grouparn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, "AWS::IoTThingsGraph::FlowTemplate.DefinitionDocument": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotthingsgraph-flowtemplate-definitiondocument.html", "Properties": { @@ -25755,6 +26358,12 @@ "Type": "DataSourceInclusionsExclusionsStrings", "UpdateType": "Mutable" }, + "InclusionPatterns": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-datasource-s3datasourceconfiguration.html#cfn-kendra-datasource-s3datasourceconfiguration-inclusionpatterns", + "Required": false, + "Type": "DataSourceInclusionsExclusionsStrings", + "UpdateType": "Mutable" + }, "InclusionPrefixes": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-datasource-s3datasourceconfiguration.html#cfn-kendra-datasource-s3datasourceconfiguration-inclusionprefixes", "Required": false, @@ -27728,6 +28337,23 @@ } } }, + "AWS::KinesisFirehose::DeliveryStream.DeliveryStreamEncryptionConfigurationInput": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-deliverystreamencryptionconfigurationinput.html", + "Properties": { + "KeyARN": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-deliverystreamencryptionconfigurationinput.html#cfn-kinesisfirehose-deliverystream-deliverystreamencryptionconfigurationinput-keyarn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "KeyType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-deliverystreamencryptionconfigurationinput.html#cfn-kinesisfirehose-deliverystream-deliverystreamencryptionconfigurationinput-keytype", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::KinesisFirehose::DeliveryStream.Deserializer": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-deserializer.html", "Properties": { @@ -28110,13 +28736,13 @@ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-kinesisstreamsourceconfiguration.html#cfn-kinesisfirehose-deliverystream-kinesisstreamsourceconfiguration-kinesisstreamarn", "PrimitiveType": "String", "Required": true, - "UpdateType": "Mutable" + "UpdateType": "Immutable" }, "RoleARN": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-kinesisstreamsourceconfiguration.html#cfn-kinesisfirehose-deliverystream-kinesisstreamsourceconfiguration-rolearn", "PrimitiveType": "String", "Required": true, - "UpdateType": "Mutable" + "UpdateType": "Immutable" } } }, @@ -28894,6 +29520,23 @@ } } }, + "AWS::Lambda::EventSourceMapping.SourceAccessConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.html", + "Properties": { + "Type": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.html#cfn-lambda-eventsourcemapping-sourceaccessconfiguration-type", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "URI": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.html#cfn-lambda-eventsourcemapping-sourceaccessconfiguration-uri", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::Lambda::Function.Code": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html", "Properties": { @@ -33717,6 +34360,832 @@ } } }, + "AWS::MediaPackage::Asset.EgressEndpoint": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-asset-egressendpoint.html", + "Properties": { + "PackagingConfigurationId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-asset-egressendpoint.html#cfn-mediapackage-asset-egressendpoint-packagingconfigurationid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Url": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-asset-egressendpoint.html#cfn-mediapackage-asset-egressendpoint-url", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::Channel.HlsIngest": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-channel-hlsingest.html", + "Properties": { + "ingestEndpoints": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-channel-hlsingest.html#cfn-mediapackage-channel-hlsingest-ingestendpoints", + "ItemType": "IngestEndpoint", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::Channel.IngestEndpoint": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-channel-ingestendpoint.html", + "Properties": { + "Id": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-channel-ingestendpoint.html#cfn-mediapackage-channel-ingestendpoint-id", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Password": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-channel-ingestendpoint.html#cfn-mediapackage-channel-ingestendpoint-password", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Url": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-channel-ingestendpoint.html#cfn-mediapackage-channel-ingestendpoint-url", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Username": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-channel-ingestendpoint.html#cfn-mediapackage-channel-ingestendpoint-username", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::OriginEndpoint.Authorization": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-authorization.html", + "Properties": { + "CdnIdentifierSecret": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-authorization.html#cfn-mediapackage-originendpoint-authorization-cdnidentifiersecret", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "SecretsRoleArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-authorization.html#cfn-mediapackage-originendpoint-authorization-secretsrolearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::OriginEndpoint.CmafEncryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-cmafencryption.html", + "Properties": { + "KeyRotationIntervalSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-cmafencryption.html#cfn-mediapackage-originendpoint-cmafencryption-keyrotationintervalseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "SpekeKeyProvider": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-cmafencryption.html#cfn-mediapackage-originendpoint-cmafencryption-spekekeyprovider", + "Required": true, + "Type": "SpekeKeyProvider", + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::OriginEndpoint.CmafPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-cmafpackage.html", + "Properties": { + "Encryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-cmafpackage.html#cfn-mediapackage-originendpoint-cmafpackage-encryption", + "Required": false, + "Type": "CmafEncryption", + "UpdateType": "Mutable" + }, + "HlsManifests": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-cmafpackage.html#cfn-mediapackage-originendpoint-cmafpackage-hlsmanifests", + "ItemType": "HlsManifest", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "SegmentDurationSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-cmafpackage.html#cfn-mediapackage-originendpoint-cmafpackage-segmentdurationseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "SegmentPrefix": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-cmafpackage.html#cfn-mediapackage-originendpoint-cmafpackage-segmentprefix", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "StreamSelection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-cmafpackage.html#cfn-mediapackage-originendpoint-cmafpackage-streamselection", + "Required": false, + "Type": "StreamSelection", + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::OriginEndpoint.DashEncryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashencryption.html", + "Properties": { + "KeyRotationIntervalSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashencryption.html#cfn-mediapackage-originendpoint-dashencryption-keyrotationintervalseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "SpekeKeyProvider": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashencryption.html#cfn-mediapackage-originendpoint-dashencryption-spekekeyprovider", + "Required": true, + "Type": "SpekeKeyProvider", + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::OriginEndpoint.DashPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html", + "Properties": { + "AdTriggers": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html#cfn-mediapackage-originendpoint-dashpackage-adtriggers", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "AdsOnDeliveryRestrictions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html#cfn-mediapackage-originendpoint-dashpackage-adsondeliveryrestrictions", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Encryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html#cfn-mediapackage-originendpoint-dashpackage-encryption", + "Required": false, + "Type": "DashEncryption", + "UpdateType": "Mutable" + }, + "ManifestLayout": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html#cfn-mediapackage-originendpoint-dashpackage-manifestlayout", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "ManifestWindowSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html#cfn-mediapackage-originendpoint-dashpackage-manifestwindowseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "MinBufferTimeSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html#cfn-mediapackage-originendpoint-dashpackage-minbuffertimeseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "MinUpdatePeriodSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html#cfn-mediapackage-originendpoint-dashpackage-minupdateperiodseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "PeriodTriggers": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html#cfn-mediapackage-originendpoint-dashpackage-periodtriggers", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Profile": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html#cfn-mediapackage-originendpoint-dashpackage-profile", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "SegmentDurationSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html#cfn-mediapackage-originendpoint-dashpackage-segmentdurationseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "SegmentTemplateFormat": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html#cfn-mediapackage-originendpoint-dashpackage-segmenttemplateformat", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "StreamSelection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html#cfn-mediapackage-originendpoint-dashpackage-streamselection", + "Required": false, + "Type": "StreamSelection", + "UpdateType": "Mutable" + }, + "SuggestedPresentationDelaySeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-dashpackage.html#cfn-mediapackage-originendpoint-dashpackage-suggestedpresentationdelayseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::OriginEndpoint.HlsEncryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsencryption.html", + "Properties": { + "ConstantInitializationVector": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsencryption.html#cfn-mediapackage-originendpoint-hlsencryption-constantinitializationvector", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "EncryptionMethod": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsencryption.html#cfn-mediapackage-originendpoint-hlsencryption-encryptionmethod", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "KeyRotationIntervalSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsencryption.html#cfn-mediapackage-originendpoint-hlsencryption-keyrotationintervalseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "RepeatExtXKey": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsencryption.html#cfn-mediapackage-originendpoint-hlsencryption-repeatextxkey", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "SpekeKeyProvider": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsencryption.html#cfn-mediapackage-originendpoint-hlsencryption-spekekeyprovider", + "Required": true, + "Type": "SpekeKeyProvider", + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::OriginEndpoint.HlsManifest": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsmanifest.html", + "Properties": { + "AdMarkers": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsmanifest.html#cfn-mediapackage-originendpoint-hlsmanifest-admarkers", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "AdTriggers": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsmanifest.html#cfn-mediapackage-originendpoint-hlsmanifest-adtriggers", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "AdsOnDeliveryRestrictions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsmanifest.html#cfn-mediapackage-originendpoint-hlsmanifest-adsondeliveryrestrictions", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Id": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsmanifest.html#cfn-mediapackage-originendpoint-hlsmanifest-id", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "IncludeIframeOnlyStream": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsmanifest.html#cfn-mediapackage-originendpoint-hlsmanifest-includeiframeonlystream", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "ManifestName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsmanifest.html#cfn-mediapackage-originendpoint-hlsmanifest-manifestname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "PlaylistType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsmanifest.html#cfn-mediapackage-originendpoint-hlsmanifest-playlisttype", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "PlaylistWindowSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsmanifest.html#cfn-mediapackage-originendpoint-hlsmanifest-playlistwindowseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "ProgramDateTimeIntervalSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsmanifest.html#cfn-mediapackage-originendpoint-hlsmanifest-programdatetimeintervalseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "Url": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlsmanifest.html#cfn-mediapackage-originendpoint-hlsmanifest-url", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::OriginEndpoint.HlsPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlspackage.html", + "Properties": { + "AdMarkers": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlspackage.html#cfn-mediapackage-originendpoint-hlspackage-admarkers", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "AdTriggers": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlspackage.html#cfn-mediapackage-originendpoint-hlspackage-adtriggers", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "AdsOnDeliveryRestrictions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlspackage.html#cfn-mediapackage-originendpoint-hlspackage-adsondeliveryrestrictions", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Encryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlspackage.html#cfn-mediapackage-originendpoint-hlspackage-encryption", + "Required": false, + "Type": "HlsEncryption", + "UpdateType": "Mutable" + }, + "IncludeIframeOnlyStream": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlspackage.html#cfn-mediapackage-originendpoint-hlspackage-includeiframeonlystream", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "PlaylistType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlspackage.html#cfn-mediapackage-originendpoint-hlspackage-playlisttype", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "PlaylistWindowSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlspackage.html#cfn-mediapackage-originendpoint-hlspackage-playlistwindowseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "ProgramDateTimeIntervalSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlspackage.html#cfn-mediapackage-originendpoint-hlspackage-programdatetimeintervalseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "SegmentDurationSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlspackage.html#cfn-mediapackage-originendpoint-hlspackage-segmentdurationseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "StreamSelection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlspackage.html#cfn-mediapackage-originendpoint-hlspackage-streamselection", + "Required": false, + "Type": "StreamSelection", + "UpdateType": "Mutable" + }, + "UseAudioRenditionGroup": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-hlspackage.html#cfn-mediapackage-originendpoint-hlspackage-useaudiorenditiongroup", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::OriginEndpoint.MssEncryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-mssencryption.html", + "Properties": { + "SpekeKeyProvider": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-mssencryption.html#cfn-mediapackage-originendpoint-mssencryption-spekekeyprovider", + "Required": true, + "Type": "SpekeKeyProvider", + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::OriginEndpoint.MssPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-msspackage.html", + "Properties": { + "Encryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-msspackage.html#cfn-mediapackage-originendpoint-msspackage-encryption", + "Required": false, + "Type": "MssEncryption", + "UpdateType": "Mutable" + }, + "ManifestWindowSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-msspackage.html#cfn-mediapackage-originendpoint-msspackage-manifestwindowseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "SegmentDurationSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-msspackage.html#cfn-mediapackage-originendpoint-msspackage-segmentdurationseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "StreamSelection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-msspackage.html#cfn-mediapackage-originendpoint-msspackage-streamselection", + "Required": false, + "Type": "StreamSelection", + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::OriginEndpoint.SpekeKeyProvider": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-spekekeyprovider.html", + "Properties": { + "CertificateArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-spekekeyprovider.html#cfn-mediapackage-originendpoint-spekekeyprovider-certificatearn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "ResourceId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-spekekeyprovider.html#cfn-mediapackage-originendpoint-spekekeyprovider-resourceid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "RoleArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-spekekeyprovider.html#cfn-mediapackage-originendpoint-spekekeyprovider-rolearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "SystemIds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-spekekeyprovider.html#cfn-mediapackage-originendpoint-spekekeyprovider-systemids", + "PrimitiveItemType": "String", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + }, + "Url": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-spekekeyprovider.html#cfn-mediapackage-originendpoint-spekekeyprovider-url", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::OriginEndpoint.StreamSelection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-streamselection.html", + "Properties": { + "MaxVideoBitsPerSecond": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-streamselection.html#cfn-mediapackage-originendpoint-streamselection-maxvideobitspersecond", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "MinVideoBitsPerSecond": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-streamselection.html#cfn-mediapackage-originendpoint-streamselection-minvideobitspersecond", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "StreamOrder": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-streamselection.html#cfn-mediapackage-originendpoint-streamselection-streamorder", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration.CmafEncryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-cmafencryption.html", + "Properties": { + "SpekeKeyProvider": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-cmafencryption.html#cfn-mediapackage-packagingconfiguration-cmafencryption-spekekeyprovider", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration.CmafPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-cmafpackage.html", + "Properties": { + "Encryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-cmafpackage.html#cfn-mediapackage-packagingconfiguration-cmafpackage-encryption", + "Required": false, + "Type": "CmafEncryption", + "UpdateType": "Mutable" + }, + "HlsManifests": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-cmafpackage.html#cfn-mediapackage-packagingconfiguration-cmafpackage-hlsmanifests", + "ItemType": "HlsManifest", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + }, + "SegmentDurationSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-cmafpackage.html#cfn-mediapackage-packagingconfiguration-cmafpackage-segmentdurationseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration.DashEncryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashencryption.html", + "Properties": { + "SpekeKeyProvider": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashencryption.html#cfn-mediapackage-packagingconfiguration-dashencryption-spekekeyprovider", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration.DashManifest": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashmanifest.html", + "Properties": { + "ManifestLayout": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashmanifest.html#cfn-mediapackage-packagingconfiguration-dashmanifest-manifestlayout", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "ManifestName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashmanifest.html#cfn-mediapackage-packagingconfiguration-dashmanifest-manifestname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "MinBufferTimeSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashmanifest.html#cfn-mediapackage-packagingconfiguration-dashmanifest-minbuffertimeseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "Profile": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashmanifest.html#cfn-mediapackage-packagingconfiguration-dashmanifest-profile", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "StreamSelection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashmanifest.html#cfn-mediapackage-packagingconfiguration-dashmanifest-streamselection", + "Required": false, + "Type": "StreamSelection", + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration.DashPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashpackage.html", + "Properties": { + "DashManifests": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashpackage.html#cfn-mediapackage-packagingconfiguration-dashpackage-dashmanifests", + "ItemType": "DashManifest", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + }, + "Encryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashpackage.html#cfn-mediapackage-packagingconfiguration-dashpackage-encryption", + "Required": false, + "Type": "DashEncryption", + "UpdateType": "Mutable" + }, + "PeriodTriggers": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashpackage.html#cfn-mediapackage-packagingconfiguration-dashpackage-periodtriggers", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "SegmentDurationSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashpackage.html#cfn-mediapackage-packagingconfiguration-dashpackage-segmentdurationseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "SegmentTemplateFormat": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashpackage.html#cfn-mediapackage-packagingconfiguration-dashpackage-segmenttemplateformat", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration.HlsEncryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlsencryption.html", + "Properties": { + "ConstantInitializationVector": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlsencryption.html#cfn-mediapackage-packagingconfiguration-hlsencryption-constantinitializationvector", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "EncryptionMethod": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlsencryption.html#cfn-mediapackage-packagingconfiguration-hlsencryption-encryptionmethod", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "SpekeKeyProvider": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlsencryption.html#cfn-mediapackage-packagingconfiguration-hlsencryption-spekekeyprovider", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration.HlsManifest": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlsmanifest.html", + "Properties": { + "AdMarkers": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlsmanifest.html#cfn-mediapackage-packagingconfiguration-hlsmanifest-admarkers", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "IncludeIframeOnlyStream": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlsmanifest.html#cfn-mediapackage-packagingconfiguration-hlsmanifest-includeiframeonlystream", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "ManifestName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlsmanifest.html#cfn-mediapackage-packagingconfiguration-hlsmanifest-manifestname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "ProgramDateTimeIntervalSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlsmanifest.html#cfn-mediapackage-packagingconfiguration-hlsmanifest-programdatetimeintervalseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "RepeatExtXKey": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlsmanifest.html#cfn-mediapackage-packagingconfiguration-hlsmanifest-repeatextxkey", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "StreamSelection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlsmanifest.html#cfn-mediapackage-packagingconfiguration-hlsmanifest-streamselection", + "Required": false, + "Type": "StreamSelection", + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration.HlsPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlspackage.html", + "Properties": { + "Encryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlspackage.html#cfn-mediapackage-packagingconfiguration-hlspackage-encryption", + "Required": false, + "Type": "HlsEncryption", + "UpdateType": "Mutable" + }, + "HlsManifests": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlspackage.html#cfn-mediapackage-packagingconfiguration-hlspackage-hlsmanifests", + "ItemType": "HlsManifest", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + }, + "SegmentDurationSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlspackage.html#cfn-mediapackage-packagingconfiguration-hlspackage-segmentdurationseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "UseAudioRenditionGroup": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-hlspackage.html#cfn-mediapackage-packagingconfiguration-hlspackage-useaudiorenditiongroup", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration.MssEncryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-mssencryption.html", + "Properties": { + "SpekeKeyProvider": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-mssencryption.html#cfn-mediapackage-packagingconfiguration-mssencryption-spekekeyprovider", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration.MssManifest": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-mssmanifest.html", + "Properties": { + "ManifestName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-mssmanifest.html#cfn-mediapackage-packagingconfiguration-mssmanifest-manifestname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "StreamSelection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-mssmanifest.html#cfn-mediapackage-packagingconfiguration-mssmanifest-streamselection", + "Required": false, + "Type": "StreamSelection", + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration.MssPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-msspackage.html", + "Properties": { + "Encryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-msspackage.html#cfn-mediapackage-packagingconfiguration-msspackage-encryption", + "Required": false, + "Type": "MssEncryption", + "UpdateType": "Mutable" + }, + "MssManifests": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-msspackage.html#cfn-mediapackage-packagingconfiguration-msspackage-mssmanifests", + "ItemType": "MssManifest", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + }, + "SegmentDurationSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-msspackage.html#cfn-mediapackage-packagingconfiguration-msspackage-segmentdurationseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration.SpekeKeyProvider": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-spekekeyprovider.html", + "Properties": { + "RoleArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-spekekeyprovider.html#cfn-mediapackage-packagingconfiguration-spekekeyprovider-rolearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "SystemIds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-spekekeyprovider.html#cfn-mediapackage-packagingconfiguration-spekekeyprovider-systemids", + "PrimitiveItemType": "String", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + }, + "Url": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-spekekeyprovider.html#cfn-mediapackage-packagingconfiguration-spekekeyprovider-url", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration.StreamSelection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-streamselection.html", + "Properties": { + "MaxVideoBitsPerSecond": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-streamselection.html#cfn-mediapackage-packagingconfiguration-streamselection-maxvideobitspersecond", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "MinVideoBitsPerSecond": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-streamselection.html#cfn-mediapackage-packagingconfiguration-streamselection-minvideobitspersecond", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "StreamOrder": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-streamselection.html#cfn-mediapackage-packagingconfiguration-streamselection-streamorder", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingGroup.Authorization": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packaginggroup-authorization.html", + "Properties": { + "CdnIdentifierSecret": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packaginggroup-authorization.html#cfn-mediapackage-packaginggroup-authorization-cdnidentifiersecret", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "SecretsRoleArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packaginggroup-authorization.html#cfn-mediapackage-packaginggroup-authorization-secretsrolearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::MediaStore::Container.CorsRule": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediastore-container-corsrule.html", "Properties": { @@ -36600,6 +38069,45 @@ } } }, + "AWS::S3::Bucket.IntelligentTieringConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-intelligenttieringconfiguration.html", + "Properties": { + "Id": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-intelligenttieringconfiguration.html#cfn-s3-bucket-intelligenttieringconfiguration-id", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Prefix": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-intelligenttieringconfiguration.html#cfn-s3-bucket-intelligenttieringconfiguration-prefix", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Status": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-intelligenttieringconfiguration.html#cfn-s3-bucket-intelligenttieringconfiguration-status", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "TagFilters": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-intelligenttieringconfiguration.html#cfn-s3-bucket-intelligenttieringconfiguration-tagfilters", + "DuplicatesAllowed": false, + "ItemType": "TagFilter", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Tierings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-intelligenttieringconfiguration.html#cfn-s3-bucket-intelligenttieringconfiguration-tierings", + "DuplicatesAllowed": false, + "ItemType": "Tiering", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, "AWS::S3::Bucket.InventoryConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventoryconfiguration.html", "Properties": { @@ -36707,7 +38215,7 @@ "Properties": { "EventThreshold": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metrics.html#cfn-s3-bucket-metrics-eventthreshold", - "Required": true, + "Required": false, "Type": "ReplicationTimeValue", "UpdateType": "Mutable" }, @@ -36829,6 +38337,30 @@ } } }, + "AWS::S3::Bucket.OwnershipControls": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-ownershipcontrols.html", + "Properties": { + "Rules": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-ownershipcontrols.html#cfn-s3-bucket-ownershipcontrols-rules", + "DuplicatesAllowed": false, + "ItemType": "OwnershipControlsRule", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::S3::Bucket.OwnershipControlsRule": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-ownershipcontrolsrule.html", + "Properties": { + "ObjectOwnership": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-ownershipcontrolsrule.html#cfn-s3-bucket-ownershipcontrolsrule-objectownership", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::S3::Bucket.PublicAccessBlockConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-publicaccessblockconfiguration.html", "Properties": { @@ -37285,7 +38817,7 @@ "Properties": { "SseKmsEncryptedObjects": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-sourceselectioncriteria.html#cfn-s3-bucket-sourceselectioncriteria-ssekmsencryptedobjects", - "Required": true, + "Required": false, "Type": "SseKmsEncryptedObjects", "UpdateType": "Mutable" } @@ -37330,6 +38862,23 @@ } } }, + "AWS::S3::Bucket.Tiering": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-tiering.html", + "Properties": { + "AccessTier": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-tiering.html#cfn-s3-bucket-tiering-accesstier", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Days": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-tiering.html#cfn-s3-bucket-tiering-days", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::S3::Bucket.TopicConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-topicconfig.html", "Properties": { @@ -38478,6 +40027,12 @@ "Required": false, "UpdateType": "Immutable" }, + "ImageConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-model-containerdefinition.html#cfn-sagemaker-model-containerdefinition-imageconfig", + "Required": false, + "Type": "ImageConfig", + "UpdateType": "Immutable" + }, "Mode": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-model-containerdefinition.html#cfn-sagemaker-model-containerdefinition-mode", "PrimitiveType": "String", @@ -38498,6 +40053,17 @@ } } }, + "AWS::SageMaker::Model.ImageConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-model-containerdefinition-imageconfig.html", + "Properties": { + "RepositoryAccessMode": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-model-containerdefinition-imageconfig.html#cfn-sagemaker-model-containerdefinition-imageconfig-repositoryaccessmode", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, "AWS::SageMaker::Model.VpcConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-model-vpcconfig.html", "Properties": { @@ -39511,6 +41077,13 @@ "Type": "List", "UpdateType": "Conditional" }, + "SecurityGroupIds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-server-endpointdetails.html#cfn-transfer-server-endpointdetails-securitygroupids", + "ItemType": "SecurityGroupId", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, "SubnetIds": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-server-endpointdetails.html#cfn-transfer-server-endpointdetails-subnetids", "PrimitiveItemType": "String", @@ -39552,6 +41125,9 @@ "AWS::Transfer::Server.Protocol": { "PrimitiveType": "String" }, + "AWS::Transfer::Server.SecurityGroupId": { + "PrimitiveType": "String" + }, "AWS::Transfer::User.HomeDirectoryMapEntry": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-user-homedirectorymapentry.html", "Properties": { @@ -41698,7 +43274,7 @@ } } }, - "ResourceSpecificationVersion": "18.7.0", + "ResourceSpecificationVersion": "20.2.0", "ResourceTypes": { "AWS::ACMPCA::Certificate": { "Attributes": { @@ -41956,12 +43532,6 @@ "Required": true, "UpdateType": "Mutable" }, - "LdapMetadata": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amazonmq-broker.html#cfn-amazonmq-broker-ldapmetadata", - "Required": false, - "Type": "LdapMetadata", - "UpdateType": "Mutable" - }, "LdapServerMetadata": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amazonmq-broker.html#cfn-amazonmq-broker-ldapservermetadata", "Required": false, @@ -45088,6 +46658,12 @@ "Required": true, "UpdateType": "Immutable" }, + "ApiKeyId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-apikey.html#cfn-appsync-apikey-apikeyid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "Description": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-apikey.html#cfn-appsync-apikey-description", "PrimitiveType": "String", @@ -45245,6 +46821,12 @@ "PrimitiveType": "String", "Required": false, "UpdateType": "Mutable" + }, + "SyncConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-functionconfiguration.html#cfn-appsync-functionconfiguration-syncconfig", + "Required": false, + "Type": "SyncConfig", + "UpdateType": "Mutable" } } }, @@ -45666,6 +47248,12 @@ "PrimitiveType": "String", "Required": true, "UpdateType": "Immutable" + }, + "WorkGroup": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-athena-namedquery.html#cfn-athena-namedquery-workgroup", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" } } }, @@ -45722,6 +47310,23 @@ } }, "AWS::AutoScaling::AutoScalingGroup": { + "Attributes": { + "LaunchConfigurationName": { + "PrimitiveType": "String" + }, + "LaunchTemplateSpecification": { + "PrimitiveType": "String" + }, + "MixedInstancesPolicy": { + "PrimitiveType": "String" + }, + "PlacementGroup": { + "PrimitiveType": "String" + }, + "VPCZoneIdentifier": { + "PrimitiveType": "String" + } + }, "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html", "Properties": { "AutoScalingGroupName": { @@ -45738,6 +47343,12 @@ "Type": "List", "UpdateType": "Mutable" }, + "CapacityRebalance": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-capacityrebalance", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, "Cooldown": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-cooldown", "PrimitiveType": "String", @@ -45973,6 +47584,12 @@ "Required": false, "UpdateType": "Immutable" }, + "MetadataOptions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html#cfn-autoscaling-launchconfig-metadataoptions", + "Required": false, + "Type": "MetadataOption", + "UpdateType": "Immutable" + }, "PlacementTenancy": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html#cfn-as-launchconfig-placementtenancy", "PrimitiveType": "String", @@ -46323,6 +47940,12 @@ "Required": false, "UpdateType": "Mutable" }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-computeenvironment.html#cfn-batch-computeenvironment-tags", + "PrimitiveType": "Json", + "Required": false, + "UpdateType": "Immutable" + }, "Type": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-computeenvironment.html#cfn-batch-computeenvironment-type", "PrimitiveType": "String", @@ -46364,6 +47987,12 @@ "Type": "RetryStrategy", "UpdateType": "Mutable" }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobdefinition.html#cfn-batch-jobdefinition-tags", + "PrimitiveType": "Json", + "Required": false, + "UpdateType": "Immutable" + }, "Timeout": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobdefinition.html#cfn-batch-jobdefinition-timeout", "Required": false, @@ -46405,6 +48034,12 @@ "PrimitiveType": "String", "Required": false, "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobqueue.html#cfn-batch-jobqueue-tags", + "PrimitiveType": "Json", + "Required": false, + "UpdateType": "Immutable" } } }, @@ -47424,6 +49059,67 @@ } } }, + "AWS::CloudWatch::MetricStream": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "CreationDate": { + "PrimitiveType": "String" + }, + "LastUpdateDate": { + "PrimitiveType": "String" + }, + "State": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html", + "Properties": { + "ExcludeFilters": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-excludefilters", + "DuplicatesAllowed": false, + "ItemType": "MetricStreamFilter", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "FirehoseArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-firehosearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "IncludeFilters": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-includefilters", + "DuplicatesAllowed": false, + "ItemType": "MetricStreamFilter", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-name", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "RoleArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-rolearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, "AWS::CodeArtifact::Domain": { "Attributes": { "Arn": { @@ -47452,6 +49148,13 @@ "PrimitiveType": "Json", "Required": false, "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codeartifact-domain.html#cfn-codeartifact-domain-tags", + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" } } }, @@ -47497,6 +49200,13 @@ "Required": true, "UpdateType": "Immutable" }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codeartifact-repository.html#cfn-codeartifact-repository-tags", + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, "Upstreams": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codeartifact-repository.html#cfn-codeartifact-repository-upstreams", "PrimitiveItemType": "String", @@ -50651,6 +52361,12 @@ "Type": "List", "UpdateType": "Mutable" }, + "SelfServicePortal": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-clientvpnendpoint.html#cfn-ec2-clientvpnendpoint-selfserviceportal", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "ServerCertificateArn": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-clientvpnendpoint.html#cfn-ec2-clientvpnendpoint-servercertificatearn", "PrimitiveType": "String", @@ -51771,6 +53487,12 @@ "AWS::EC2::Route": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html", "Properties": { + "CarrierGatewayId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html#cfn-ec2-route-carriergatewayid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "DestinationCidrBlock": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html#cfn-ec2-route-destinationcidrblock", "PrimitiveType": "String", @@ -51801,6 +53523,12 @@ "Required": false, "UpdateType": "Mutable" }, + "LocalGatewayId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html#cfn-ec2-route-localgatewayid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "NatGatewayId": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html#cfn-ec2-route-natgatewayid", "PrimitiveType": "String", @@ -51825,6 +53553,12 @@ "Required": false, "UpdateType": "Mutable" }, + "VpcEndpointId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html#cfn-ec2-route-vpcendpointid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "VpcPeeringConnectionId": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html#cfn-ec2-route-vpcpeeringconnectionid", "PrimitiveType": "String", @@ -52066,6 +53800,9 @@ "NetworkAclAssociationId": { "PrimitiveType": "String" }, + "OutpostArn": { + "PrimitiveType": "String" + }, "VpcId": { "PrimitiveType": "String" } @@ -52102,6 +53839,12 @@ "Required": false, "UpdateType": "Mutable" }, + "OutpostArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet.html#cfn-ec2-subnet-outpostarn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, "Tags": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet.html#cfn-ec2-subnet-tags", "DuplicatesAllowed": true, @@ -52727,13 +54470,6 @@ "Required": false, "UpdateType": "Mutable" }, - "ApplianceLoadBalancerArns": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcendpointservice.html#cfn-ec2-vpcendpointservice-applianceloadbalancerarns", - "PrimitiveItemType": "String", - "Required": false, - "Type": "List", - "UpdateType": "Mutable" - }, "NetworkLoadBalancerArns": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcendpointservice.html#cfn-ec2-vpcendpointservice-networkloadbalancerarns", "PrimitiveItemType": "String", @@ -53941,12 +55677,24 @@ "Type": "KerberosAttributes", "UpdateType": "Immutable" }, + "LogEncryptionKmsKeyId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-logencryptionkmskeyid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, "LogUri": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-loguri", "PrimitiveType": "String", "Required": false, "UpdateType": "Immutable" }, + "ManagedScalingPolicy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-managedscalingpolicy", + "Required": false, + "Type": "ManagedScalingPolicy", + "UpdateType": "Mutable" + }, "Name": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-name", "PrimitiveType": "String", @@ -53977,6 +55725,12 @@ "Required": true, "UpdateType": "Immutable" }, + "StepConcurrencyLevel": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-stepconcurrencylevel", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, "Steps": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-steps", "DuplicatesAllowed": false, @@ -54442,6 +56196,12 @@ "Required": false, "UpdateType": "Mutable" }, + "GlobalReplicationGroupId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-globalreplicationgroupid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, "KmsKeyId": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-kmskeyid", "PrimitiveType": "String", @@ -54452,7 +56212,7 @@ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-multiazenabled", "PrimitiveType": "Boolean", "Required": false, - "UpdateType": "Immutable" + "UpdateType": "Mutable" }, "NodeGroupConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-nodegroupconfiguration", @@ -54986,13 +56746,13 @@ "Port": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listener.html#cfn-elasticloadbalancingv2-listener-port", "PrimitiveType": "Integer", - "Required": true, + "Required": false, "UpdateType": "Mutable" }, "Protocol": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listener.html#cfn-elasticloadbalancingv2-listener-protocol", "PrimitiveType": "String", - "Required": true, + "Required": false, "UpdateType": "Mutable" }, "SslPolicy": { @@ -55116,7 +56876,7 @@ "ItemType": "SubnetMapping", "Required": false, "Type": "List", - "UpdateType": "Immutable" + "UpdateType": "Mutable" }, "Subnets": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-loadbalancer.html#cfn-elasticloadbalancingv2-loadbalancer-subnets", @@ -55524,6 +57284,43 @@ } } }, + "AWS::Events::Archive": { + "Attributes": { + "ArchiveName": { + "PrimitiveType": "String" + }, + "Arn": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-archive.html", + "Properties": { + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-archive.html#cfn-events-archive-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "EventPattern": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-archive.html#cfn-events-archive-eventpattern", + "PrimitiveType": "Json", + "Required": false, + "UpdateType": "Mutable" + }, + "RetentionDays": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-archive.html#cfn-events-archive-retentiondays", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "SourceArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-archive.html#cfn-events-archive-sourcearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, "AWS::Events::EventBus": { "Attributes": { "Arn": { @@ -56184,6 +57981,12 @@ "Required": false, "UpdateType": "Mutable" }, + "FlexMatchMode": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-matchmakingconfiguration.html#cfn-gamelift-matchmakingconfiguration-flexmatchmode", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "GameProperties": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-matchmakingconfiguration.html#cfn-gamelift-matchmakingconfiguration-gameproperties", "ItemType": "GameProperty", @@ -56200,7 +58003,7 @@ "GameSessionQueueArns": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-matchmakingconfiguration.html#cfn-gamelift-matchmakingconfiguration-gamesessionqueuearns", "PrimitiveItemType": "String", - "Required": true, + "Required": false, "Type": "List", "UpdateType": "Mutable" }, @@ -56382,6 +58185,13 @@ "Required": true, "UpdateType": "Immutable" }, + "PortOverrides": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-endpointgroup.html#cfn-globalaccelerator-endpointgroup-portoverrides", + "ItemType": "PortOverride", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, "ThresholdCount": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-endpointgroup.html#cfn-globalaccelerator-endpointgroup-thresholdcount", "PrimitiveType": "Integer", @@ -58096,6 +59906,114 @@ } } }, + "AWS::IVS::Channel": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "IngestEndpoint": { + "PrimitiveType": "String" + }, + "PlaybackUrl": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-channel.html", + "Properties": { + "Authorized": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-channel.html#cfn-ivs-channel-authorized", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "LatencyMode": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-channel.html#cfn-ivs-channel-latencymode", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-channel.html#cfn-ivs-channel-name", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-channel.html#cfn-ivs-channel-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Type": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-channel.html#cfn-ivs-channel-type", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::IVS::PlaybackKeyPair": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "Fingerprint": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-playbackkeypair.html", + "Properties": { + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-playbackkeypair.html#cfn-ivs-playbackkeypair-name", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "PublicKeyMaterial": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-playbackkeypair.html#cfn-ivs-playbackkeypair-publickeymaterial", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-playbackkeypair.html#cfn-ivs-playbackkeypair-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::IVS::StreamKey": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "Value": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-streamkey.html", + "Properties": { + "ChannelArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-streamkey.html#cfn-ivs-streamkey-channelarn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-streamkey.html#cfn-ivs-streamkey-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, "AWS::ImageBuilder::Component": { "Attributes": { "Arn": { @@ -58754,6 +60672,72 @@ } } }, + "AWS::IoT::DomainConfiguration": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "DomainType": { + "PrimitiveType": "String" + }, + "ServerCertificates": { + "ItemType": "ServerCertificateSummary", + "Type": "List" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html", + "Properties": { + "AuthorizerConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html#cfn-iot-domainconfiguration-authorizerconfig", + "Required": false, + "Type": "AuthorizerConfig", + "UpdateType": "Mutable" + }, + "DomainConfigurationName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html#cfn-iot-domainconfiguration-domainconfigurationname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "DomainConfigurationStatus": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html#cfn-iot-domainconfiguration-domainconfigurationstatus", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "DomainName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html#cfn-iot-domainconfiguration-domainname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "ServerCertificateArns": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html#cfn-iot-domainconfiguration-servercertificatearns", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Immutable" + }, + "ServiceType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html#cfn-iot-domainconfiguration-servicetype", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html#cfn-iot-domainconfiguration-tags", + "Required": false, + "Type": "Tags", + "UpdateType": "Mutable" + }, + "ValidationCertificateArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html#cfn-iot-domainconfiguration-validationcertificatearn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + } + } + }, "AWS::IoT::Policy": { "Attributes": { "Arn": { @@ -59115,6 +61099,137 @@ } } }, + "AWS::IoTSiteWise::Asset": { + "Attributes": { + "AssetArn": { + "PrimitiveType": "String" + }, + "AssetId": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-asset.html", + "Properties": { + "AssetHierarchies": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-asset.html#cfn-iotsitewise-asset-assethierarchies", + "ItemType": "AssetHierarchy", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "AssetModelId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-asset.html#cfn-iotsitewise-asset-assetmodelid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "AssetName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-asset.html#cfn-iotsitewise-asset-assetname", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "AssetProperties": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-asset.html#cfn-iotsitewise-asset-assetproperties", + "ItemType": "AssetProperty", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-asset.html#cfn-iotsitewise-asset-tags", + "DuplicatesAllowed": true, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::AssetModel": { + "Attributes": { + "AssetModelArn": { + "PrimitiveType": "String" + }, + "AssetModelId": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-assetmodel.html", + "Properties": { + "AssetModelDescription": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-assetmodel.html#cfn-iotsitewise-assetmodel-assetmodeldescription", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "AssetModelHierarchies": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-assetmodel.html#cfn-iotsitewise-assetmodel-assetmodelhierarchies", + "ItemType": "AssetModelHierarchy", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "AssetModelName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-assetmodel.html#cfn-iotsitewise-assetmodel-assetmodelname", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "AssetModelProperties": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-assetmodel.html#cfn-iotsitewise-assetmodel-assetmodelproperties", + "ItemType": "AssetModelProperty", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-assetmodel.html#cfn-iotsitewise-assetmodel-tags", + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::IoTSiteWise::Gateway": { + "Attributes": { + "GatewayId": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-gateway.html", + "Properties": { + "GatewayCapabilitySummaries": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-gateway.html#cfn-iotsitewise-gateway-gatewaycapabilitysummaries", + "DuplicatesAllowed": false, + "ItemType": "GatewayCapabilitySummary", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "GatewayName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-gateway.html#cfn-iotsitewise-gateway-gatewayname", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "GatewayPlatform": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-gateway.html#cfn-iotsitewise-gateway-gatewayplatform", + "Required": true, + "Type": "GatewayPlatform", + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-gateway.html#cfn-iotsitewise-gateway-tags", + "DuplicatesAllowed": true, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, "AWS::IoTThingsGraph::FlowTemplate": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotthingsgraph-flowtemplate.html", "Properties": { @@ -59218,7 +61333,7 @@ "Properties": { "DataSourceConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kendra-datasource.html#cfn-kendra-datasource-datasourceconfiguration", - "Required": true, + "Required": false, "Type": "DataSourceConfiguration", "UpdateType": "Mutable" }, @@ -59243,7 +61358,7 @@ "RoleArn": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kendra-datasource.html#cfn-kendra-datasource-rolearn", "PrimitiveType": "String", - "Required": true, + "Required": false, "UpdateType": "Mutable" }, "Schedule": { @@ -59623,6 +61738,12 @@ }, "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesisfirehose-deliverystream.html", "Properties": { + "DeliveryStreamEncryptionConfigurationInput": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesisfirehose-deliverystream.html#cfn-kinesisfirehose-deliverystream-deliverystreamencryptionconfigurationinput", + "Required": false, + "Type": "DeliveryStreamEncryptionConfigurationInput", + "UpdateType": "Mutable" + }, "DeliveryStreamName": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesisfirehose-deliverystream.html#cfn-kinesisfirehose-deliverystream-deliverystreamname", "PrimitiveType": "String", @@ -59657,7 +61778,7 @@ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesisfirehose-deliverystream.html#cfn-kinesisfirehose-deliverystream-kinesisstreamsourceconfiguration", "Required": false, "Type": "KinesisStreamSourceConfiguration", - "UpdateType": "Mutable" + "UpdateType": "Immutable" }, "RedshiftDestinationConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesisfirehose-deliverystream.html#cfn-kinesisfirehose-deliverystream-redshiftdestinationconfiguration", @@ -59676,6 +61797,13 @@ "Required": false, "Type": "SplunkDestinationConfiguration", "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesisfirehose-deliverystream.html#cfn-kinesisfirehose-deliverystream-tags", + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" } } }, @@ -59687,6 +61815,13 @@ "Required": false, "Type": "Admins", "UpdateType": "Mutable" + }, + "TrustedResourceOwners": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lakeformation-datalakesettings.html#cfn-lakeformation-datalakesettings-trustedresourceowners", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" } } }, @@ -59888,6 +62023,22 @@ "Required": false, "UpdateType": "Mutable" }, + "Queues": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-queues", + "DuplicatesAllowed": false, + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "SourceAccessConfigurations": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-sourceaccessconfigurations", + "DuplicatesAllowed": false, + "ItemType": "SourceAccessConfiguration", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, "StartingPosition": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-startingposition", "PrimitiveType": "String", @@ -60204,14 +62355,20 @@ }, "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html", "Properties": { + "KmsKeyId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html#cfn-logs-loggroup-kmskeyid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "LogGroupName": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html#cfn-cwl-loggroup-loggroupname", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html#cfn-logs-loggroup-loggroupname", "PrimitiveType": "String", "Required": false, "UpdateType": "Immutable" }, "RetentionInDays": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html#cfn-cwl-loggroup-retentionindays", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html#cfn-logs-loggroup-retentionindays", "PrimitiveType": "Integer", "Required": false, "UpdateType": "Mutable" @@ -60899,6 +63056,284 @@ } } }, + "AWS::MediaPackage::Asset": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "CreatedAt": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-asset.html", + "Properties": { + "EgressEndpoints": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-asset.html#cfn-mediapackage-asset-egressendpoints", + "ItemType": "EgressEndpoint", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Id": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-asset.html#cfn-mediapackage-asset-id", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "PackagingGroupId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-asset.html#cfn-mediapackage-asset-packaginggroupid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "ResourceId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-asset.html#cfn-mediapackage-asset-resourceid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "SourceArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-asset.html#cfn-mediapackage-asset-sourcearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "SourceRoleArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-asset.html#cfn-mediapackage-asset-sourcerolearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-asset.html#cfn-mediapackage-asset-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::Channel": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "HlsIngest": { + "Type": "HlsIngest" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-channel.html", + "Properties": { + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-channel.html#cfn-mediapackage-channel-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Id": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-channel.html#cfn-mediapackage-channel-id", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-channel.html#cfn-mediapackage-channel-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Immutable" + } + } + }, + "AWS::MediaPackage::OriginEndpoint": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "Url": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html", + "Properties": { + "Authorization": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-authorization", + "Required": false, + "Type": "Authorization", + "UpdateType": "Mutable" + }, + "ChannelId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-channelid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "CmafPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-cmafpackage", + "Required": false, + "Type": "CmafPackage", + "UpdateType": "Mutable" + }, + "DashPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-dashpackage", + "Required": false, + "Type": "DashPackage", + "UpdateType": "Mutable" + }, + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "HlsPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-hlspackage", + "Required": false, + "Type": "HlsPackage", + "UpdateType": "Mutable" + }, + "Id": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-id", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "ManifestName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-manifestname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "MssPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-msspackage", + "Required": false, + "Type": "MssPackage", + "UpdateType": "Mutable" + }, + "Origination": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-origination", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "StartoverWindowSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-startoverwindowseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "TimeDelaySeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-timedelayseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "Whitelist": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-originendpoint.html#cfn-mediapackage-originendpoint-whitelist", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingConfiguration": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-packagingconfiguration.html", + "Properties": { + "CmafPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-packagingconfiguration.html#cfn-mediapackage-packagingconfiguration-cmafpackage", + "Required": false, + "Type": "CmafPackage", + "UpdateType": "Mutable" + }, + "DashPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-packagingconfiguration.html#cfn-mediapackage-packagingconfiguration-dashpackage", + "Required": false, + "Type": "DashPackage", + "UpdateType": "Mutable" + }, + "HlsPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-packagingconfiguration.html#cfn-mediapackage-packagingconfiguration-hlspackage", + "Required": false, + "Type": "HlsPackage", + "UpdateType": "Mutable" + }, + "Id": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-packagingconfiguration.html#cfn-mediapackage-packagingconfiguration-id", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "MssPackage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-packagingconfiguration.html#cfn-mediapackage-packagingconfiguration-msspackage", + "Required": false, + "Type": "MssPackage", + "UpdateType": "Mutable" + }, + "PackagingGroupId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-packagingconfiguration.html#cfn-mediapackage-packagingconfiguration-packaginggroupid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-packagingconfiguration.html#cfn-mediapackage-packagingconfiguration-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::MediaPackage::PackagingGroup": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "DomainName": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-packaginggroup.html", + "Properties": { + "Authorization": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-packaginggroup.html#cfn-mediapackage-packaginggroup-authorization", + "Required": false, + "Type": "Authorization", + "UpdateType": "Mutable" + }, + "Id": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-packaginggroup.html#cfn-mediapackage-packaginggroup-id", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-packaginggroup.html#cfn-mediapackage-packaginggroup-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Immutable" + } + } + }, "AWS::MediaStore::Container": { "Attributes": { "Endpoint": { @@ -63466,7 +65901,7 @@ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-engine", "PrimitiveType": "String", "Required": true, - "UpdateType": "Immutable" + "UpdateType": "Conditional" }, "EngineMode": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-enginemode", @@ -63478,7 +65913,13 @@ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-engineversion", "PrimitiveType": "String", "Required": false, - "UpdateType": "Immutable" + "UpdateType": "Mutable" + }, + "GlobalClusterIdentifier": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-globalclusteridentifier", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Conditional" }, "KmsKeyId": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-kmskeyid", @@ -63778,7 +66219,7 @@ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html#cfn-rds-dbinstance-engine", "PrimitiveType": "String", "Required": false, - "UpdateType": "Immutable" + "UpdateType": "Conditional" }, "EngineVersion": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html#cfn-rds-dbinstance-engineversion", @@ -64242,6 +66683,47 @@ } } }, + "AWS::RDS::GlobalCluster": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-globalcluster.html", + "Properties": { + "DeletionProtection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-globalcluster.html#cfn-rds-globalcluster-deletionprotection", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "Engine": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-globalcluster.html#cfn-rds-globalcluster-engine", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "EngineVersion": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-globalcluster.html#cfn-rds-globalcluster-engineversion", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "GlobalClusterIdentifier": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-globalcluster.html#cfn-rds-globalcluster-globalclusteridentifier", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "SourceDBClusterIdentifier": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-globalcluster.html#cfn-rds-globalcluster-sourcedbclusteridentifier", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "StorageEncrypted": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-globalcluster.html#cfn-rds-globalcluster-storageencrypted", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Immutable" + } + } + }, "AWS::RDS::OptionGroup": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-optiongroup.html", "Properties": { @@ -65357,6 +67839,14 @@ "Type": "CorsConfiguration", "UpdateType": "Mutable" }, + "IntelligentTieringConfigurations": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-intelligenttieringconfigurations", + "DuplicatesAllowed": false, + "ItemType": "IntelligentTieringConfiguration", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, "InventoryConfigurations": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-inventoryconfigurations", "DuplicatesAllowed": false, @@ -65403,6 +67893,12 @@ "Required": false, "UpdateType": "Immutable" }, + "OwnershipControls": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-ownershipcontrols", + "Required": false, + "Type": "OwnershipControls", + "UpdateType": "Mutable" + }, "PublicAccessBlockConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-publicaccessblockconfiguration", "Required": false, @@ -65594,6 +68090,12 @@ "Required": false, "UpdateType": "Mutable" }, + "SubscriptionRoleArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-subscription.html#cfn-sns-subscription-subscriptionrolearn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "TopicArn": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-subscription.html#topicarn", "PrimitiveType": "String", @@ -65622,6 +68124,12 @@ "Required": false, "UpdateType": "Mutable" }, + "FifoTopic": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-topic.html#cfn-sns-topic-fifotopic", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Immutable" + }, "KmsMasterKeyId": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-topic.html#cfn-sns-topic-kmsmasterkeyid", "PrimitiveType": "String", @@ -66822,6 +69330,12 @@ "AWS::SecretsManager::ResourcePolicy": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-resourcepolicy.html", "Properties": { + "BlockPublicPolicy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-resourcepolicy.html#cfn-secretsmanager-resourcepolicy-blockpublicpolicy", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, "ResourcePolicy": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-resourcepolicy.html#cfn-secretsmanager-resourcepolicy-resourcepolicy", "PrimitiveType": "Json", diff --git a/packages/@aws-cdk/cfnspec/spec-source/670_MediaPackage_PackagingConfiguration_patch.json b/packages/@aws-cdk/cfnspec/spec-source/670_MediaPackage_PackagingConfiguration_patch.json new file mode 100644 index 0000000000000..ed0f382b5ba59 --- /dev/null +++ b/packages/@aws-cdk/cfnspec/spec-source/670_MediaPackage_PackagingConfiguration_patch.json @@ -0,0 +1,29 @@ +{ + "PropertyTypes": { + "patch": { + "description": "missing type information for SpekeKeyProvider - mirrors patch in cfn-lint (https://github.com/aws-cloudformation/cfn-python-lint/pull/1751)", + "operations": [ + { + "op": "add", + "path": "/AWS::MediaPackage::PackagingConfiguration.CmafEncryption/Properties/SpekeKeyProvider/Type", + "value": "SpekeKeyProvider" + }, + { + "op": "add", + "path": "/AWS::MediaPackage::PackagingConfiguration.DashEncryption/Properties/SpekeKeyProvider/Type", + "value": "SpekeKeyProvider" + }, + { + "op": "add", + "path": "/AWS::MediaPackage::PackagingConfiguration.HlsEncryption/Properties/SpekeKeyProvider/Type", + "value": "SpekeKeyProvider" + }, + { + "op": "add", + "path": "/AWS::MediaPackage::PackagingConfiguration.MssEncryption/Properties/SpekeKeyProvider/Type", + "value": "SpekeKeyProvider" + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/cfnspec/spec-source/680_AutoScaling_AutoScalingGroup_patch.json b/packages/@aws-cdk/cfnspec/spec-source/680_AutoScaling_AutoScalingGroup_patch.json new file mode 100644 index 0000000000000..c79b21da417e1 --- /dev/null +++ b/packages/@aws-cdk/cfnspec/spec-source/680_AutoScaling_AutoScalingGroup_patch.json @@ -0,0 +1,31 @@ +{ + "ResourceTypes": { + "AWS::AutoScaling::AutoScalingGroup": { + "patch": { + "description": "remove (presumed accidentally included) new autoscaling group attributes", + "operations": [ + { + "op": "remove", + "path": "/Attributes/LaunchConfigurationName" + }, + { + "op": "remove", + "path": "/Attributes/LaunchTemplateSpecification" + }, + { + "op": "remove", + "path": "/Attributes/MixedInstancesPolicy" + }, + { + "op": "remove", + "path": "/Attributes/PlacementGroup" + }, + { + "op": "remove", + "path": "/Attributes/VPCZoneIdentifier" + } + ] + } + } + } +} diff --git a/packages/@aws-cdk/cfnspec/spec-source/680_MediaPackage_Channel_patch.json b/packages/@aws-cdk/cfnspec/spec-source/680_MediaPackage_Channel_patch.json new file mode 100644 index 0000000000000..5eb3d2a657645 --- /dev/null +++ b/packages/@aws-cdk/cfnspec/spec-source/680_MediaPackage_Channel_patch.json @@ -0,0 +1,15 @@ +{ + "ResourceTypes": { + "AWS::MediaPackage::Channel": { + "patch": { + "description": "remove the unusable attribute HlsIngest, which represents a complex type and cannot be directly converted to a primitive type", + "operations": [ + { + "op": "remove", + "path": "/Attributes/HlsIngest" + } + ] + } + } + } +} diff --git a/packages/@aws-cdk/cfnspec/spec-source/690_IoT_DomainConfiguration_Tags_CorrectItemType_patch.json b/packages/@aws-cdk/cfnspec/spec-source/690_IoT_DomainConfiguration_Tags_CorrectItemType_patch.json new file mode 100644 index 0000000000000..5ffa659a47b46 --- /dev/null +++ b/packages/@aws-cdk/cfnspec/spec-source/690_IoT_DomainConfiguration_Tags_CorrectItemType_patch.json @@ -0,0 +1,21 @@ +{ + "PropertyTypes": { + "AWS::IoT::DomainConfiguration.Tags": { + "patch": { + "description": "AWS::IoT::DomainConfiguration.Tag.ItemType should have been PrimitiveItemType", + "operations": [ + { + "op": "remove", + "path": "/Properties/Tags/ItemType", + "value": "Json" + }, + { + "op": "add", + "path": "/Properties/Tags/PrimitiveItemType", + "value": "Json" + } + ] + } + } + } +} diff --git a/packages/@aws-cdk/cloudformation-diff/package.json b/packages/@aws-cdk/cloudformation-diff/package.json index 2fb02810b2182..e465c8aa10595 100644 --- a/packages/@aws-cdk/cloudformation-diff/package.json +++ b/packages/@aws-cdk/cloudformation-diff/package.json @@ -33,7 +33,7 @@ "@types/string-width": "^4.0.1", "@types/table": "^5.0.0", "cdk-build-tools": "0.0.0", - "fast-check": "^2.6.1", + "fast-check": "^2.7.0", "jest": "^26.6.3", "pkglint": "0.0.0", "ts-jest": "^26.4.4" diff --git a/packages/@aws-cdk/cloudformation-include/package.json b/packages/@aws-cdk/cloudformation-include/package.json index 5504214ff2f62..787e999447b0c 100644 --- a/packages/@aws-cdk/cloudformation-include/package.json +++ b/packages/@aws-cdk/cloudformation-include/package.json @@ -141,11 +141,13 @@ "@aws-cdk/aws-iot1click": "0.0.0", "@aws-cdk/aws-iotanalytics": "0.0.0", "@aws-cdk/aws-iotevents": "0.0.0", + "@aws-cdk/aws-iotsitewise": "0.0.0", "@aws-cdk/aws-iotthingsgraph": "0.0.0", + "@aws-cdk/aws-ivs": "0.0.0", + "@aws-cdk/aws-kendra": "0.0.0", "@aws-cdk/aws-kinesis": "0.0.0", "@aws-cdk/aws-kinesisanalytics": "0.0.0", "@aws-cdk/aws-kinesisfirehose": "0.0.0", - "@aws-cdk/aws-kendra": "0.0.0", "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-lakeformation": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", @@ -154,6 +156,7 @@ "@aws-cdk/aws-managedblockchain": "0.0.0", "@aws-cdk/aws-mediaconvert": "0.0.0", "@aws-cdk/aws-medialive": "0.0.0", + "@aws-cdk/aws-mediapackage": "0.0.0", "@aws-cdk/aws-mediastore": "0.0.0", "@aws-cdk/aws-msk": "0.0.0", "@aws-cdk/aws-neptune": "0.0.0", @@ -271,7 +274,9 @@ "@aws-cdk/aws-iot1click": "0.0.0", "@aws-cdk/aws-iotanalytics": "0.0.0", "@aws-cdk/aws-iotevents": "0.0.0", + "@aws-cdk/aws-iotsitewise": "0.0.0", "@aws-cdk/aws-iotthingsgraph": "0.0.0", + "@aws-cdk/aws-ivs": "0.0.0", "@aws-cdk/aws-kendra": "0.0.0", "@aws-cdk/aws-kinesis": "0.0.0", "@aws-cdk/aws-kinesisanalytics": "0.0.0", @@ -284,6 +289,7 @@ "@aws-cdk/aws-managedblockchain": "0.0.0", "@aws-cdk/aws-mediaconvert": "0.0.0", "@aws-cdk/aws-medialive": "0.0.0", + "@aws-cdk/aws-mediapackage": "0.0.0", "@aws-cdk/aws-mediastore": "0.0.0", "@aws-cdk/aws-msk": "0.0.0", "@aws-cdk/aws-neptune": "0.0.0", diff --git a/packages/@aws-cdk/core/NOTICE b/packages/@aws-cdk/core/NOTICE index 9ff5649eac07b..d23152578fbfd 100644 --- a/packages/@aws-cdk/core/NOTICE +++ b/packages/@aws-cdk/core/NOTICE @@ -86,3 +86,145 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- + +** at-least-node - https://www.npmjs.com/package/at-least-node +Copyright (c) 2020 Ryan Zimmerman + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---------------- + +** graceful-fs - https://www.npmjs.com/package/graceful-fs +Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors + + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---------------- + +** jsonfile - https://www.npmjs.com/package/jsonfile +Copyright (c) 2012-2015, JP Richardson + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files +(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** universalify - https://www.npmjs.com/package/universalify +Copyright (c) 2017, Ryan Zimmerman + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the 'Software'), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** brace-expansion - https://www.npmjs.com/package/brace-expansion +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- + +** balanced-match - https://www.npmjs.com/package/balanced-match +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- + +** concat-map - https://www.npmjs.com/package/concat-map + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- diff --git a/packages/@aws-cdk/core/lib/cfn-output.ts b/packages/@aws-cdk/core/lib/cfn-output.ts index ae1a52159244c..480de577db06c 100644 --- a/packages/@aws-cdk/core/lib/cfn-output.ts +++ b/packages/@aws-cdk/core/lib/cfn-output.ts @@ -103,7 +103,8 @@ export class CfnOutput extends CfnElement { /** * The name used to export the value of this output across stacks. * - * To import the value from another stack, use `Fn.importValue(exportName)`. + * To use the value in another stack, pass the value of + * `output.importValue` to it. * * @default - the output is not exported */ @@ -115,6 +116,38 @@ export class CfnOutput extends CfnElement { this._exportName = exportName; } + /** + * Return the `Fn.importValue` expression to import this value into another stack + * + * The returned value should not be used in the same stack, but in a + * different one. It must be deployed to the same environment, as + * CloudFormation exports can only be imported in the same Region and + * account. + * + * The is no automatic registration of dependencies between stacks when using + * this mechanism, so you should make sure to deploy them in the right order + * yourself. + * + * You can use this mechanism to share values across Stacks in different + * Stages. If you intend to share the value to another Stack inside the same + * Stage, the automatic cross-stack referencing mechanism is more convenient. + */ + public get importValue() { + // We made _exportName mutable so this will have to be lazy. + return Fn.importValue(Lazy.stringValue({ + produce: (ctx) => { + if (Stack.of(ctx.scope) === this.stack) { + throw new Error(`'importValue' property of '${this.node.path}' should only be used in a different Stack`); + } + if (!this._exportName) { + throw new Error(`Add an exportName to the CfnOutput at '${this.node.path}' in order to use 'output.importValue'`); + } + + return this._exportName; + }, + })); + } + /** * @internal */ @@ -133,3 +166,7 @@ export class CfnOutput extends CfnElement { } import { CfnCondition } from './cfn-condition'; +import { Fn } from './cfn-fn'; +import { Lazy } from './lazy'; +import { Stack } from './stack'; + diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json index c673193b26427..3dec43079144e 100644 --- a/packages/@aws-cdk/core/package.json +++ b/packages/@aws-cdk/core/package.json @@ -174,7 +174,7 @@ "@types/sinon": "^9.0.8", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", - "fast-check": "^2.6.1", + "fast-check": "^2.7.0", "lodash": "^4.17.20", "nodeunit-shim": "0.0.0", "pkglint": "0.0.0", diff --git a/packages/@aws-cdk/core/test/output.test.ts b/packages/@aws-cdk/core/test/output.test.ts index d7b509159a2bb..1179c3111c0c9 100644 --- a/packages/@aws-cdk/core/test/output.test.ts +++ b/packages/@aws-cdk/core/test/output.test.ts @@ -1,10 +1,16 @@ import { nodeunitShim, Test } from 'nodeunit-shim'; -import { CfnOutput, CfnResource, Stack } from '../lib'; +import { App, CfnOutput, CfnResource, Stack } from '../lib'; import { toCloudFormation } from './util'; +let app: App; +let stack: Stack; +beforeEach(() => { + app = new App(); + stack = new Stack(app, 'Stack'); +}); + nodeunitShim({ 'outputs can be added to the stack'(test: Test) { - const stack = new Stack(); const res = new CfnResource(stack, 'MyResource', { type: 'R' }); const ref = res.ref; @@ -29,9 +35,6 @@ nodeunitShim({ }, 'No export is created by default'(test: Test) { - // GIVEN - const stack = new Stack(); - // WHEN new CfnOutput(stack, 'SomeOutput', { value: 'x' }); @@ -46,4 +49,68 @@ nodeunitShim({ test.done(); }, + + 'importValue can be used to obtain a Fn::ImportValue expression'(test: Test) { + // GIVEN + const stack2 = new Stack(app, 'Stack2'); + + // WHEN + const output = new CfnOutput(stack, 'SomeOutput', { value: 'x', exportName: 'asdf' }); + new CfnResource(stack2, 'Resource', { + type: 'Some::Resource', + properties: { + input: output.importValue, + }, + }); + + // THEN + test.deepEqual(toCloudFormation(stack2), { + Resources: { + Resource: { + Type: 'Some::Resource', + Properties: { + input: { 'Fn::ImportValue': 'asdf' }, + }, + }, + }, + }); + + test.done(); + }, + + 'importValue used inside the same stack produces an error'(test: Test) { + // WHEN + const output = new CfnOutput(stack, 'SomeOutput', { value: 'x', exportName: 'asdf' }); + new CfnResource(stack, 'Resource', { + type: 'Some::Resource', + properties: { + input: output.importValue, + }, + }); + + // THEN + expect(() => toCloudFormation(stack)).toThrow(/should only be used in a different Stack/); + + test.done(); + }, + + 'error message if importValue is used and Output is not exported'(test: Test) { + // GIVEN + const stack2 = new Stack(app, 'Stack2'); + + // WHEN + const output = new CfnOutput(stack, 'SomeOutput', { value: 'x' }); + new CfnResource(stack2, 'Resource', { + type: 'Some::Resource', + properties: { + input: output.importValue, + }, + }); + + test.throws(() => { + toCloudFormation(stack2); + }, /Add an exportName to the CfnOutput/); + + test.done(); + }, }); diff --git a/packages/@aws-cdk/core/test/stage.test.ts b/packages/@aws-cdk/core/test/stage.test.ts index 8a4b27a4d412a..897b3513d6163 100644 --- a/packages/@aws-cdk/core/test/stage.test.ts +++ b/packages/@aws-cdk/core/test/stage.test.ts @@ -1,3 +1,4 @@ +import * as cxschema from '@aws-cdk/cloud-assembly-schema'; import * as cxapi from '@aws-cdk/cx-api'; import { nodeunitShim, Test } from 'nodeunit-shim'; import { App, CfnResource, Construct, IAspect, IConstruct, Stack, Stage, Aspects } from '../lib'; @@ -311,6 +312,40 @@ nodeunitShim({ }, }); +test('missing context in Stages is propagated up to root assembly', () => { + // GIVEN + const app = new App(); + const stage = new Stage(app, 'Stage', { + env: { account: 'account', region: 'region' }, + }); + const stack = new Stack(stage, 'Stack'); + new CfnResource(stack, 'Resource', { type: 'Something' }); + + // WHEN + stack.reportMissingContext({ + key: 'missing-context-key', + provider: cxschema.ContextProvider.AVAILABILITY_ZONE_PROVIDER, + props: { + account: 'account', + region: 'region', + }, + }); + + // THEN + const assembly = app.synth(); + + expect(assembly.manifest.missing).toEqual([ + { + key: 'missing-context-key', + provider: cxschema.ContextProvider.AVAILABILITY_ZONE_PROVIDER, + props: { + account: 'account', + region: 'region', + }, + }, + ]); +}); + class TouchingAspect implements IAspect { public readonly visits = new Array(); public visit(node: IConstruct): void { diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index b8942190103fe..8f17efcc963b9 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -79,7 +79,7 @@ "@types/aws-lambda": "^8.10.64", "@types/fs-extra": "^8.1.1", "@types/sinon": "^9.0.8", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.792.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/cx-api/lib/cloud-assembly.ts b/packages/@aws-cdk/cx-api/lib/cloud-assembly.ts index df947f379ab46..53fafe3d37049 100644 --- a/packages/@aws-cdk/cx-api/lib/cloud-assembly.ts +++ b/packages/@aws-cdk/cx-api/lib/cloud-assembly.ts @@ -219,6 +219,13 @@ export interface CloudAssemblyBuilderProps { * @default - Same as the manifest outdir */ readonly assetOutdir?: string; + + /** + * If this builder is for a nested assembly, the parent assembly builder + * + * @default - This is a root assembly + */ + readonly parentBuilder?: CloudAssemblyBuilder; } /** @@ -237,6 +244,7 @@ export class CloudAssemblyBuilder { private readonly artifacts: { [id: string]: cxschema.ArtifactManifest } = { }; private readonly missing = new Array(); + private readonly parentBuilder?: CloudAssemblyBuilder; /** * Initializes a cloud assembly builder. @@ -245,6 +253,7 @@ export class CloudAssemblyBuilder { constructor(outdir?: string, props: CloudAssemblyBuilderProps = {}) { this.outdir = determineOutputDirectory(outdir); this.assetOutdir = props.assetOutdir ?? this.outdir; + this.parentBuilder = props.parentBuilder; // we leverage the fact that outdir is long-lived to avoid staging assets into it // that were already staged (copying can be expensive). this is achieved by the fact @@ -270,6 +279,8 @@ export class CloudAssemblyBuilder { if (this.missing.every(m => m.key !== missing.key)) { this.missing.push(missing); } + // Also report in parent + this.parentBuilder?.addMissing(missing); } /** @@ -320,6 +331,7 @@ export class CloudAssemblyBuilder { return new CloudAssemblyBuilder(innerAsmDir, { // Reuse the same asset output directory as the current Casm builder assetOutdir: this.assetOutdir, + parentBuilder: this, }); } } diff --git a/packages/@aws-cdk/cx-api/test/cloud-assembly-builder.test.ts b/packages/@aws-cdk/cx-api/test/cloud-assembly-builder.test.ts index fb7ad4d71a407..13b81c572a126 100644 --- a/packages/@aws-cdk/cx-api/test/cloud-assembly-builder.test.ts +++ b/packages/@aws-cdk/cx-api/test/cloud-assembly-builder.test.ts @@ -174,6 +174,28 @@ test('write and read nested cloud assembly artifact', () => { expect(nested?.artifacts.length).toEqual(0); }); +test('missing values are reported to top-level asm', () => { + // GIVEN + const outdir = fs.mkdtempSync(path.join(os.tmpdir(), 'cloud-assembly-builder-tests')); + const session = new cxapi.CloudAssemblyBuilder(outdir); + + const innerAsm = session.createNestedAssembly('hello', 'hello'); + + // WHEN + const props: cxschema.ContextQueryProperties = { + account: '1234', + region: 'asdf', + filter: { a: 'a' }, + }; + + innerAsm.addMissing({ key: 'foo', provider: cxschema.ContextProvider.VPC_PROVIDER, props }); + + // THEN + const assembly = session.buildAssembly(); + + expect(assembly.manifest.missing?.length).toEqual(1); +}); + test('artifcats are written in topological order', () => { // GIVEN const outdir = fs.mkdtempSync(path.join(os.tmpdir(), 'cloud-assembly-builder-tests')); diff --git a/packages/@aws-cdk/pipelines/lib/actions/deploy-cdk-stack-action.ts b/packages/@aws-cdk/pipelines/lib/actions/deploy-cdk-stack-action.ts index b491c9698e7a0..9fe520112931f 100644 --- a/packages/@aws-cdk/pipelines/lib/actions/deploy-cdk-stack-action.ts +++ b/packages/@aws-cdk/pipelines/lib/actions/deploy-cdk-stack-action.ts @@ -9,6 +9,7 @@ import { Aws, Stack } from '@aws-cdk/core'; import * as cxapi from '@aws-cdk/cx-api'; import { Construct, Node } from 'constructs'; import { appOf, assemblyBuilderOf } from '../private/construct-internals'; +import { toPosixPath } from '../private/fs'; // v2 - keep this import as a separate section to reduce merge conflict when forward merging with the v2 branch. // eslint-disable-next-line @@ -186,8 +187,8 @@ export class DeployCdkStackAction implements codepipeline.IAction { return new DeployCdkStackAction({ actionRole, cloudFormationExecutionRole, - templatePath: path.relative(appAsmRoot, fullTemplatePath), - templateConfigurationPath: fullConfigPath ? path.relative(appAsmRoot, fullConfigPath) : undefined, + templatePath: toPosixPath(path.relative(appAsmRoot, fullTemplatePath)), + templateConfigurationPath: fullConfigPath ? toPosixPath(path.relative(appAsmRoot, fullConfigPath)) : undefined, region, stackArtifactId: artifact.id, dependencyStackArtifactIds: artifact.dependencies.filter(isStackArtifact).map(s => s.id), diff --git a/packages/@aws-cdk/pipelines/lib/private/fs.ts b/packages/@aws-cdk/pipelines/lib/private/fs.ts new file mode 100644 index 0000000000000..b5f861a4abc76 --- /dev/null +++ b/packages/@aws-cdk/pipelines/lib/private/fs.ts @@ -0,0 +1,14 @@ +import * as path from 'path'; + +/** + * Convert a file path on the current system to a file path that can be used on Linux + * + * Takes the current OS' file separator and replaces all of them with a '/'. + * + * Relevant if the current system is a Windows machine but is generating + * commands for a Linux CodeBuild image. + */ +export function toPosixPath(osPath: string, currentSep?: string) { + const regex = new RegExp(`\\${currentSep ?? path.sep}`, 'g'); + return osPath.replace(regex, '/'); +} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/lib/synths/simple-synth-action.ts b/packages/@aws-cdk/pipelines/lib/synths/simple-synth-action.ts index 8365a3404e120..d04408b9175cd 100644 --- a/packages/@aws-cdk/pipelines/lib/synths/simple-synth-action.ts +++ b/packages/@aws-cdk/pipelines/lib/synths/simple-synth-action.ts @@ -8,6 +8,7 @@ import * as events from '@aws-cdk/aws-events'; import * as iam from '@aws-cdk/aws-iam'; import { Construct, Stack } from '@aws-cdk/core'; import { cloudAssemblyBuildSpecDir } from '../private/construct-internals'; +import { toPosixPath } from '../private/fs'; import { copyEnvironmentVariables, filterEmpty } from './_util'; /** @@ -373,7 +374,7 @@ export class SimpleSynthAction implements codepipeline.IAction, iam.IGrantable { // using secondary artifacts or not. const cloudAsmArtifactSpec = { - 'base-directory': path.join(self.props.subdirectory ?? '.', cloudAssemblyBuildSpecDir(scope)), + 'base-directory': toPosixPath(path.join(self.props.subdirectory ?? '.', cloudAssemblyBuildSpecDir(scope))), 'files': '**/*', }; @@ -388,7 +389,7 @@ export class SimpleSynthAction implements codepipeline.IAction, iam.IGrantable { throw new Error('You must give the output artifact a name'); } secondary[art.artifact.artifactName] = { - 'base-directory': path.join(self.props.subdirectory ?? '.', art.directory), + 'base-directory': toPosixPath(path.join(self.props.subdirectory ?? '.', art.directory)), 'files': '**/*', }; }); diff --git a/packages/@aws-cdk/pipelines/test/fs.test.ts b/packages/@aws-cdk/pipelines/test/fs.test.ts new file mode 100644 index 0000000000000..49cbe2458e64a --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/fs.test.ts @@ -0,0 +1,11 @@ +import * as path from 'path'; +import { toPosixPath } from '../lib/private/fs'; + +test('translate path.sep', () => { + expect(toPosixPath(`a${path.sep}b${path.sep}c`)).toEqual('a/b/c'); +}); + +test('windows path to posix path', () => { + const winPath = path.win32.join('a', 'b', 'c'); + expect(toPosixPath(winPath, path.win32.sep)).toEqual('a/b/c'); +}); \ No newline at end of file diff --git a/packages/aws-cdk-lib/NOTICE b/packages/aws-cdk-lib/NOTICE index 201344067fcb2..725bfc01ce553 100644 --- a/packages/aws-cdk-lib/NOTICE +++ b/packages/aws-cdk-lib/NOTICE @@ -193,3 +193,145 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- + +** at-least-node - https://www.npmjs.com/package/at-least-node +Copyright (c) 2020 Ryan Zimmerman + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---------------- + +** graceful-fs - https://www.npmjs.com/package/graceful-fs +Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors + + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---------------- + +** jsonfile - https://www.npmjs.com/package/jsonfile +Copyright (c) 2012-2015, JP Richardson + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files +(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** universalify - https://www.npmjs.com/package/universalify +Copyright (c) 2017, Ryan Zimmerman + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the 'Software'), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** brace-expansion - https://www.npmjs.com/package/brace-expansion +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- + +** balanced-match - https://www.npmjs.com/package/balanced-match +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- + +** concat-map - https://www.npmjs.com/package/concat-map + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index 113df7a9afce8..9ab275a5198ba 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -190,11 +190,13 @@ "@aws-cdk/aws-iot1click": "0.0.0", "@aws-cdk/aws-iotanalytics": "0.0.0", "@aws-cdk/aws-iotevents": "0.0.0", + "@aws-cdk/aws-iotsitewise": "0.0.0", "@aws-cdk/aws-iotthingsgraph": "0.0.0", + "@aws-cdk/aws-ivs": "0.0.0", + "@aws-cdk/aws-kendra": "0.0.0", "@aws-cdk/aws-kinesis": "0.0.0", "@aws-cdk/aws-kinesisanalytics": "0.0.0", "@aws-cdk/aws-kinesisfirehose": "0.0.0", - "@aws-cdk/aws-kendra": "0.0.0", "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-lakeformation": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", @@ -208,6 +210,7 @@ "@aws-cdk/aws-managedblockchain": "0.0.0", "@aws-cdk/aws-mediaconvert": "0.0.0", "@aws-cdk/aws-medialive": "0.0.0", + "@aws-cdk/aws-mediapackage": "0.0.0", "@aws-cdk/aws-mediastore": "0.0.0", "@aws-cdk/aws-msk": "0.0.0", "@aws-cdk/aws-neptune": "0.0.0", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 375fe4b4f9ff6..2e8e5beea9f3d 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -71,7 +71,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.792.0", "camelcase": "^6.2.0", "cdk-assets": "0.0.0", "colors": "^1.4.0", @@ -87,7 +87,7 @@ "table": "^6.0.3", "uuid": "^8.3.1", "wrap-ansi": "^7.0.0", - "yargs": "^16.1.0" + "yargs": "^16.1.1" }, "repository": { "url": "https://github.com/aws/aws-cdk.git", diff --git a/packages/awslint/package.json b/packages/awslint/package.json index abe3c5a357ca1..393013289819a 100644 --- a/packages/awslint/package.json +++ b/packages/awslint/package.json @@ -21,7 +21,7 @@ "colors": "^1.4.0", "fs-extra": "^9.0.1", "jsii-reflect": "^1.14.1", - "yargs": "^16.1.0" + "yargs": "^16.1.1" }, "devDependencies": { "@types/fs-extra": "^8.1.1", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index 6d82300abeb4d..52aadabc11688 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -47,9 +47,9 @@ "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.789.0", + "aws-sdk": "^2.792.0", "glob": "^7.1.6", - "yargs": "^16.1.0" + "yargs": "^16.1.1" }, "repository": { "url": "https://github.com/aws/aws-cdk.git", diff --git a/packages/decdk/package.json b/packages/decdk/package.json index 0871274f0b016..29d9c38d5bedf 100644 --- a/packages/decdk/package.json +++ b/packages/decdk/package.json @@ -117,7 +117,9 @@ "@aws-cdk/aws-iot1click": "0.0.0", "@aws-cdk/aws-iotanalytics": "0.0.0", "@aws-cdk/aws-iotevents": "0.0.0", + "@aws-cdk/aws-iotsitewise": "0.0.0", "@aws-cdk/aws-iotthingsgraph": "0.0.0", + "@aws-cdk/aws-ivs": "0.0.0", "@aws-cdk/aws-kendra": "0.0.0", "@aws-cdk/aws-kinesis": "0.0.0", "@aws-cdk/aws-kinesisanalytics": "0.0.0", @@ -135,6 +137,7 @@ "@aws-cdk/aws-managedblockchain": "0.0.0", "@aws-cdk/aws-mediaconvert": "0.0.0", "@aws-cdk/aws-medialive": "0.0.0", + "@aws-cdk/aws-mediapackage": "0.0.0", "@aws-cdk/aws-mediastore": "0.0.0", "@aws-cdk/aws-msk": "0.0.0", "@aws-cdk/aws-neptune": "0.0.0", @@ -193,7 +196,7 @@ "jsii-reflect": "^1.14.1", "jsonschema": "^1.4.0", "yaml": "1.10.0", - "yargs": "^16.1.0" + "yargs": "^16.1.1" }, "devDependencies": { "@types/fs-extra": "^8.1.1", diff --git a/packages/monocdk/NOTICE b/packages/monocdk/NOTICE index 201344067fcb2..725bfc01ce553 100644 --- a/packages/monocdk/NOTICE +++ b/packages/monocdk/NOTICE @@ -193,3 +193,145 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- + +** at-least-node - https://www.npmjs.com/package/at-least-node +Copyright (c) 2020 Ryan Zimmerman + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---------------- + +** graceful-fs - https://www.npmjs.com/package/graceful-fs +Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors + + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---------------- + +** jsonfile - https://www.npmjs.com/package/jsonfile +Copyright (c) 2012-2015, JP Richardson + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files +(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** universalify - https://www.npmjs.com/package/universalify +Copyright (c) 2017, Ryan Zimmerman + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the 'Software'), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** brace-expansion - https://www.npmjs.com/package/brace-expansion +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- + +** balanced-match - https://www.npmjs.com/package/balanced-match +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- + +** concat-map - https://www.npmjs.com/package/concat-map + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- diff --git a/packages/monocdk/package.json b/packages/monocdk/package.json index f6b5dc263a9fb..7123a4b0469e8 100644 --- a/packages/monocdk/package.json +++ b/packages/monocdk/package.json @@ -189,11 +189,13 @@ "@aws-cdk/aws-iot1click": "0.0.0", "@aws-cdk/aws-iotanalytics": "0.0.0", "@aws-cdk/aws-iotevents": "0.0.0", + "@aws-cdk/aws-iotsitewise": "0.0.0", "@aws-cdk/aws-iotthingsgraph": "0.0.0", + "@aws-cdk/aws-ivs": "0.0.0", + "@aws-cdk/aws-kendra": "0.0.0", "@aws-cdk/aws-kinesis": "0.0.0", "@aws-cdk/aws-kinesisanalytics": "0.0.0", "@aws-cdk/aws-kinesisfirehose": "0.0.0", - "@aws-cdk/aws-kendra": "0.0.0", "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-lakeformation": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", @@ -207,6 +209,7 @@ "@aws-cdk/aws-managedblockchain": "0.0.0", "@aws-cdk/aws-mediaconvert": "0.0.0", "@aws-cdk/aws-medialive": "0.0.0", + "@aws-cdk/aws-mediapackage": "0.0.0", "@aws-cdk/aws-mediastore": "0.0.0", "@aws-cdk/aws-msk": "0.0.0", "@aws-cdk/aws-neptune": "0.0.0", diff --git a/scripts/script-tests/package.json b/scripts/script-tests/package.json index 2c6d0ff48e94a..91bca5735c77a 100644 --- a/scripts/script-tests/package.json +++ b/scripts/script-tests/package.json @@ -10,6 +10,6 @@ "build+test+package": "npm run build+test" }, "devDependencies": { - "jest": "^26.6.2" + "jest": "^26.6.3" } } diff --git a/tools/cdk-build-tools/package.json b/tools/cdk-build-tools/package.json index 9504a4075cb86..c81340a9f7986 100644 --- a/tools/cdk-build-tools/package.json +++ b/tools/cdk-build-tools/package.json @@ -39,12 +39,12 @@ "pkglint": "0.0.0" }, "dependencies": { - "@typescript-eslint/eslint-plugin": "^4.7.0", - "@typescript-eslint/parser": "^4.6.1", + "@typescript-eslint/eslint-plugin": "^4.8.0", + "@typescript-eslint/parser": "^4.7.0", "eslint-plugin-cdk": "0.0.0", "awslint": "0.0.0", "colors": "^1.4.0", - "eslint": "^7.12.1", + "eslint": "^7.13.0", "eslint-import-resolver-node": "^0.3.4", "eslint-import-resolver-typescript": "^2.3.0", "eslint-plugin-import": "^2.22.1", @@ -56,7 +56,7 @@ "nyc": "^15.1.0", "ts-jest": "^26.4.4", "typescript": "~3.9.7", - "yargs": "^16.1.0", + "yargs": "^16.1.1", "yarn-cling": "0.0.0" }, "keywords": [ diff --git a/tools/cdk-integ-tools/package.json b/tools/cdk-integ-tools/package.json index 6237634e6be3d..fae89fa59d2a9 100644 --- a/tools/cdk-integ-tools/package.json +++ b/tools/cdk-integ-tools/package.json @@ -40,7 +40,7 @@ "@aws-cdk/assert": "0.0.0", "aws-cdk": "0.0.0", "fs-extra": "^9.0.1", - "yargs": "^16.1.0" + "yargs": "^16.1.1" }, "keywords": [ "aws", diff --git a/tools/cfn2ts/package.json b/tools/cfn2ts/package.json index 7ef2c7f940205..6343ce98a7de5 100644 --- a/tools/cfn2ts/package.json +++ b/tools/cfn2ts/package.json @@ -33,7 +33,7 @@ "codemaker": "^1.14.1", "fast-json-patch": "^3.0.0-1", "fs-extra": "^9.0.1", - "yargs": "^16.1.0" + "yargs": "^16.1.1" }, "devDependencies": { "@types/fs-extra": "^8.1.1", diff --git a/tools/eslint-plugin-cdk/package.json b/tools/eslint-plugin-cdk/package.json index 24c0c14813522..9de20764c4898 100644 --- a/tools/eslint-plugin-cdk/package.json +++ b/tools/eslint-plugin-cdk/package.json @@ -12,7 +12,7 @@ "build+test": "npm run build && npm test" }, "devDependencies": { - "@types/eslint": "^7.2.4", + "@types/eslint": "^7.2.5", "@types/fs-extra": "^8.1.1", "@types/jest": "^26.0.15", "@types/node": "^10.17.44", @@ -21,8 +21,8 @@ "typescript": "~3.9.7" }, "dependencies": { - "@typescript-eslint/parser": "^4.6.1", - "eslint": "^7.12.1", + "@typescript-eslint/parser": "^4.7.0", + "eslint": "^7.13.0", "fs-extra": "^9.0.1" }, "jest": { diff --git a/tools/pkglint/lib/packagejson.ts b/tools/pkglint/lib/packagejson.ts index 86be0b30cdc50..a59e8f1c6e307 100644 --- a/tools/pkglint/lib/packagejson.ts +++ b/tools/pkglint/lib/packagejson.ts @@ -1,6 +1,8 @@ import * as path from 'path'; import * as colors from 'colors/safe'; import * as fs from 'fs-extra'; +// eslint-disable-next-line @typescript-eslint/no-require-imports +const bundled = require('npm-bundled'); // do not descend into these directories when searching for `package.json` files. export const PKGLINT_IGNORES = ['node_modules', 'cdk.out', '.cdk.staging']; @@ -209,8 +211,11 @@ export class PackageJson { return Object.keys(this.json.dependencies || {}).filter(predicate).map(name => ({ name, version: this.json.dependencies[name] })); } - public getBundledDependencies(): string[] { - return this.json.bundledDependencies ?? []; + /** + * Retrieves all packages that are bundled in, including transitive bundled dependency of a bundled dependency. + */ + public getAllBundledDependencies(): string[] { + return bundled.sync({ path: this.packageRoot }); } /** diff --git a/tools/pkglint/lib/rules.ts b/tools/pkglint/lib/rules.ts index b3ae82fce7160..78d2bc7ec436e 100644 --- a/tools/pkglint/lib/rules.ts +++ b/tools/pkglint/lib/rules.ts @@ -146,7 +146,7 @@ export class ThirdPartyAttributions extends ValidationRule { if (pkg.json.private && !alwaysCheck.includes(pkg.json.name)) { return; } - const bundled = pkg.getBundledDependencies(); + const bundled = pkg.getAllBundledDependencies().filter(dep => !dep.startsWith('@aws-cdk')); const lines = fs.readFileSync(path.join(pkg.packageRoot, 'NOTICE'), { encoding: 'utf8' }).split('\n'); const re = /^\*\* (\S+)/; @@ -1460,24 +1460,51 @@ export class JestSetup extends ValidationRule { export class UbergenPackageVisibility extends ValidationRule { public readonly name = 'ubergen/package-visibility'; + private readonly publicPackages = [ + '@aws-cdk/cloud-assembly-schema', + '@aws-cdk/cloudformation-diff', + '@aws-cdk/cx-api', + 'aws-cdk-lib', + 'aws-cdk', + 'awslint', + 'cdk', + ]; public validate(pkg: PackageJson): void { // eslint-disable-next-line @typescript-eslint/no-require-imports const releaseJson = require(`${__dirname}/../../../release.json`); if (releaseJson.majorVersion === 2) { - // skip in v2 for now - return; - } - if (pkg.json.private && !pkg.json.ubergen?.exclude) { - pkg.report({ - ruleName: this.name, - message: 'ubergen.exclude must be configured for private packages', - fix: () => { - pkg.json.ubergen = { - exclude: true, - }; - }, - }); + // Only packages in the publicPackages list should be "public". Everything else should be private. + if (this.publicPackages.includes(pkg.json.name) && pkg.json.private === true) { + pkg.report({ + ruleName: this.name, + message: 'Package must be public', + fix: () => { + delete pkg.json.private; + }, + }); + } else if (!this.publicPackages.includes(pkg.json.name) && pkg.json.private !== true) { + pkg.report({ + ruleName: this.name, + message: 'Package must not be public', + fix: () => { + delete pkg.json.private; + pkg.json.private = true; + }, + }); + } + } else { + if (pkg.json.private && !pkg.json.ubergen?.exclude) { + pkg.report({ + ruleName: this.name, + message: 'ubergen.exclude must be configured for private packages', + fix: () => { + pkg.json.ubergen = { + exclude: true, + }; + }, + }); + } } } } diff --git a/tools/pkglint/package.json b/tools/pkglint/package.json index 3f6a213c666ab..4c387a03ea16d 100644 --- a/tools/pkglint/package.json +++ b/tools/pkglint/package.json @@ -47,7 +47,8 @@ "colors": "^1.4.0", "fs-extra": "^9.0.1", "glob": "^7.1.6", + "npm-bundled": "^1.1.1", "semver": "^7.3.2", - "yargs": "^16.1.0" + "yargs": "^16.1.1" } } diff --git a/tools/pkglint/test/fake-module.ts b/tools/pkglint/test/fake-module.ts index 535805b2106d8..32cc8041afff7 100644 --- a/tools/pkglint/test/fake-module.ts +++ b/tools/pkglint/test/fake-module.ts @@ -4,23 +4,12 @@ import * as fs from 'fs-extra'; export interface FakeModuleProps { /** - * The contents of the package json. - * If an empty object, i.e. `{}`, is provided, an empty file is created. - * @default - no package json will be created + * The list of files to be created. + * The key specifies the path of the file relative to the package directory including the file name. + * If the value is a string, the string is written to the file. If object, the object is stringified + * using `JSON.stringify()` and written into the file. */ - readonly packagejson?: any; - /** - * The contents of the README.md file. Each item in the array represents a single line. - * If an empty list is provided, an empty file is created. - * @default - no README.md file will be created - */ - readonly readme?: string[]; - /** - * The contents of the NOTICE file. Each item in the array represents a single line. - * If an empty list is provided, an empty file is created. - * @default - no NOTICE file will be created - */ - readonly notice?: string[]; + readonly files?: { [key: string]: string | {} }; } export class FakeModule { @@ -35,17 +24,12 @@ export class FakeModule { throw new Error('Cannot re-create cleaned up fake module'); } if (!this._tmpdir) { - const tmpdir = await fs.mkdtemp(path.join(os.tmpdir(), 'pkglint-rules-test-')); - await fs.writeFile(path.join(tmpdir, 'package.json'), JSON.stringify(this.props.packagejson ?? {}), { encoding: 'utf8' }); - if (this.props.readme !== undefined) { - const contents = this.props.readme.join('\n'); - await fs.writeFile(path.join(tmpdir, 'README.md'), contents, { encoding: 'utf8' }); - } - if (this.props.notice !== undefined) { - const contents = this.props.notice.join('\n'); - await fs.writeFile(path.join(tmpdir, 'NOTICE'), contents, { encoding: 'utf8' }); + this._tmpdir = await fs.mkdtemp(path.join(os.tmpdir(), 'pkglint-rules-test-')); + for (const [key, value] of Object.entries(this.props.files ?? {})) { + await fs.mkdirp(path.join(this._tmpdir, path.dirname(key))); + const toWrite = typeof value === 'string' ? value : JSON.stringify(value); + await fs.writeFile(path.join(this._tmpdir, key), toWrite, { encoding: 'utf8' }); } - this._tmpdir = tmpdir; } return this._tmpdir; } diff --git a/tools/pkglint/test/rules.test.ts b/tools/pkglint/test/rules.test.ts index 70e8942697271..767dbe81b1e1d 100644 --- a/tools/pkglint/test/rules.test.ts +++ b/tools/pkglint/test/rules.test.ts @@ -19,15 +19,17 @@ describe('FeatureStabilityRule', () => { test('feature table is rendered', async () => { fakeModule = new FakeModule({ - packagejson: { - features: [ - { name: 'Experimental Feature', stability: 'Experimental' }, - { name: 'Stable Feature', stability: 'Stable' }, - { name: 'Dev Preview Feature', stability: 'Developer Preview' }, - { name: 'Not Implemented Feature', stability: 'Not Implemented' }, - ], + files: { + 'package.json': { + features: [ + { name: 'Experimental Feature', stability: 'Experimental' }, + { name: 'Stable Feature', stability: 'Stable' }, + { name: 'Dev Preview Feature', stability: 'Developer Preview' }, + { name: 'Not Implemented Feature', stability: 'Not Implemented' }, + ], + }, + 'README.md': '', }, - readme: [], }); const dirPath = await fakeModule.tmpdir(); const rule = new rules.FeatureStabilityRule(); @@ -47,11 +49,13 @@ describe('FeatureStabilityRule', () => { test('CFN Resources is rendered', async () => { fakeModule = new FakeModule({ - packagejson: { - 'cdk-build': { cloudformation: 'Foo::Bar' }, - 'features': [], + files: { + 'package.json': { + 'cdk-build': { cloudformation: 'Foo::Bar' }, + 'features': [], + }, + 'README.md': '', }, - readme: [], }); const dirPath = await fakeModule.tmpdir(); @@ -68,11 +72,13 @@ describe('FeatureStabilityRule', () => { describe('banner notices', () => { test('CFN Resources', async () => { fakeModule = new FakeModule({ - packagejson: { - 'cdk-build': { cloudformation: 'Foo::Bar' }, - 'features': [], + files: { + 'package.json': { + 'cdk-build': { cloudformation: 'Foo::Bar' }, + 'features': [], + }, + 'README.md': '', }, - readme: [], }); const dirPath = await fakeModule.tmpdir(); const rule = new rules.FeatureStabilityRule(); @@ -87,12 +93,14 @@ describe('FeatureStabilityRule', () => { test('experimental', async () => { fakeModule = new FakeModule({ - packagejson: { - features: [ - { name: 'Feature', stability: 'Experimental' }, - ], + files: { + 'package.json': { + features: [ + { name: 'Feature', stability: 'Experimental' }, + ], + }, + 'README.md': '', }, - readme: [], }); const dirPath = await fakeModule.tmpdir(); const rule = new rules.FeatureStabilityRule(); @@ -109,12 +117,14 @@ describe('FeatureStabilityRule', () => { test('developer preview', async () => { fakeModule = new FakeModule({ - packagejson: { - features: [ - { name: 'Feature', stability: 'Developer Preview' }, - ], + files: { + 'package.json': { + features: [ + { name: 'Feature', stability: 'Developer Preview' }, + ], + }, + 'README.md': '', }, - readme: [], }); const dirPath = await fakeModule.tmpdir(); const rule = new rules.FeatureStabilityRule(); @@ -131,12 +141,14 @@ describe('FeatureStabilityRule', () => { test('stable', async () => { fakeModule = new FakeModule({ - packagejson: { - features: [ - { name: 'Feature', stability: 'Stable' }, - ], + files: { + 'package.json': { + features: [ + { name: 'Feature', stability: 'Stable' }, + ], + }, + 'README.md': '', }, - readme: [], }); const dirPath = await fakeModule.tmpdir(); const rule = new rules.FeatureStabilityRule(); @@ -154,13 +166,15 @@ describe('FeatureStabilityRule', () => { test('skip if package private', async () => { fakeModule = new FakeModule({ - packagejson: { - private: true, - features: [ - { name: 'Experimental Feature', stability: 'Experimental' }, - ], + files: { + 'package.json': { + private: true, + features: [ + { name: 'Experimental Feature', stability: 'Experimental' }, + ], + }, + 'README.md': '', }, - readme: [], }); const dirPath = await fakeModule.tmpdir(); const rule = new rules.FeatureStabilityRule(); @@ -173,8 +187,10 @@ describe('FeatureStabilityRule', () => { test('skip if features is not specified', async () => { fakeModule = new FakeModule({ - packagejson: {}, - readme: [], + files: { + 'package.json': {}, + 'README.md': '', + }, }); const dirPath = await fakeModule.tmpdir(); const rule = new rules.FeatureStabilityRule(); @@ -187,10 +203,12 @@ describe('FeatureStabilityRule', () => { test('skip if README.md is missing', async () => { fakeModule = new FakeModule({ - packagejson: { - features: [ - { name: 'Experimental Feature', stability: 'Experimental' }, - ], + files: { + 'package.json': { + features: [ + { name: 'Experimental Feature', stability: 'Experimental' }, + ], + }, }, }); const dirPath = await fakeModule.tmpdir(); @@ -218,10 +236,14 @@ describe('ThirdPartyAttributions', () => { test('errors when attribution missing for bundled dependencies', async() => { fakeModule = new FakeModule({ - packagejson: { - bundledDependencies: ['dep1', 'dep2'], + files: { + 'package.json': { + bundledDependencies: ['dep1', 'dep2'], + }, + 'node_modules/dep1/package.json': {}, + 'node_modules/dep2/package.json': {}, + 'NOTICE': '', }, - notice: [], }); const dirPath = await fakeModule.tmpdir(); @@ -242,14 +264,17 @@ describe('ThirdPartyAttributions', () => { test('errors when there are excessive attributions', async() => { fakeModule = new FakeModule({ - packagejson: { - bundledDependencies: ['dep1'], + files: { + 'package.json': { + bundledDependencies: ['dep1'], + }, + 'node_modules/dep1/package.json': {}, + 'NOTICE': [ + '** dep1 - https://link-somewhere', + '** dep2 - https://link-elsewhere', + '** dep3-rev - https://link-elsewhere', + ].join('\n'), }, - notice: [ - '** dep1 - https://link-somewhere', - '** dep2 - https://link-elsewhere', - '** dep3-rev - https://link-elsewhere', - ], }); const dirPath = await fakeModule.tmpdir(); @@ -270,13 +295,17 @@ describe('ThirdPartyAttributions', () => { test('passes when attribution is present', async() => { fakeModule = new FakeModule({ - packagejson: { - bundledDependencies: ['dep1', 'dep2'], + files: { + 'package.json': { + bundledDependencies: ['dep1', 'dep2'], + }, + 'node_modules/dep1/package.json': {}, + 'node_modules/dep2/package.json': {}, + 'NOTICE': [ + '** dep1 - https://link-somewhere', + '** dep2 - https://link-elsewhere', + ].join('\n'), }, - notice: [ - '** dep1 - https://link-somewhere', - '** dep2 - https://link-elsewhere', - ], }); const dirPath = await fakeModule.tmpdir(); @@ -288,11 +317,68 @@ describe('ThirdPartyAttributions', () => { expect(pkgJson.hasReports).toBe(false); }); + test('passes when attribution for transitive bundled deps are present', async() => { + fakeModule = new FakeModule({ + files: { + 'package.json': { + bundledDependencies: ['dep1'], + }, + 'node_modules/dep1/package.json': { + dependencies: { dep2: '1.2.3' }, + }, + 'node_modules/dep2/package.json': {}, + 'NOTICE': [ + '** dep1 - https://link-somewhere', + '** dep2 - https://link-elsewhere', + ].join('\n'), + }, + }); + const dirPath = await fakeModule.tmpdir(); + + const rule = new rules.ThirdPartyAttributions(); + + const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); + rule.validate(pkgJson); + + expect(pkgJson.hasReports).toBe(false); + }); + + test('fails when attribution for transitive bundled deps are missing', async() => { + fakeModule = new FakeModule({ + files: { + 'package.json': { + bundledDependencies: ['dep1'], + }, + 'node_modules/dep1/package.json': { + dependencies: { dep2: '1.2.3' }, + }, + 'node_modules/dep2/package.json': {}, + 'NOTICE': [ + '** dep1 - https://link-somewhere', + ].join('\n'), + }, + }); + const dirPath = await fakeModule.tmpdir(); + + const rule = new rules.ThirdPartyAttributions(); + + const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); + rule.validate(pkgJson); + + expect(pkgJson.hasReports).toBe(true); + expect(pkgJson.reports.length).toEqual(1); + expect(pkgJson.reports[0].ruleName).toEqual('license/3p-attributions'); + expect(pkgJson.reports[0].message).toContain('Missing attribution'); + expect(pkgJson.reports[0].message).toContain('dep2'); + }); + test('skipped when no bundled dependencies', async() => { fakeModule = new FakeModule({ - packagejson: { + files: { + 'package.json': { + }, + 'NOTICE': '', }, - notice: [], }); const dirPath = await fakeModule.tmpdir(); @@ -306,11 +392,15 @@ describe('ThirdPartyAttributions', () => { test('skipped for private packages', async () => { fakeModule = new FakeModule({ - packagejson: { - private: true, - bundledDependencies: ['dep1', 'dep2'], + files: { + 'package.json': { + private: true, + bundledDependencies: ['dep1', 'dep2'], + }, + 'node_modules/dep1/package.json': {}, + 'node_modules/dep2/package.json': {}, + 'NOTICE': '', }, - notice: [], }); const dirPath = await fakeModule.tmpdir(); diff --git a/tools/pkgtools/package.json b/tools/pkgtools/package.json index 0337051d556fb..278d8531c2375 100644 --- a/tools/pkgtools/package.json +++ b/tools/pkgtools/package.json @@ -36,7 +36,7 @@ }, "dependencies": { "fs-extra": "^9.0.1", - "yargs": "^16.1.0" + "yargs": "^16.1.1" }, "keywords": [ "aws", diff --git a/version.v1.json b/version.v1.json index 80ff54da9d296..9b48089bc1d8f 100644 --- a/version.v1.json +++ b/version.v1.json @@ -1,3 +1,3 @@ { - "version": "1.73.0" + "version": "1.74.0" } diff --git a/yarn.lock b/yarn.lock index aae1f4a455d64..d76198c99898f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2159,128 +2159,128 @@ dependencies: "@types/node" ">= 8" -"@parcel/babel-ast-utils@2.0.0-nightly.2067+adb92ee0": - version "2.0.0-nightly.2067" - resolved "https://registry.yarnpkg.com/@parcel/babel-ast-utils/-/babel-ast-utils-2.0.0-nightly.2067.tgz#bbb65a31eb2531a8d8bec1416b5d0047a74b57ac" - integrity sha512-1oWLszHqibl9giNCzzwd9DVePmivPridrcOlX+txSAkuQ2FG0mVSutv25XturJ6g/B6z78pL2tNV/fdVjf6lkA== +"@parcel/babel-ast-utils@2.0.0-nightly.2071+837d1fbd": + version "2.0.0-nightly.2071" + resolved "https://registry.yarnpkg.com/@parcel/babel-ast-utils/-/babel-ast-utils-2.0.0-nightly.2071.tgz#e2f0f84f9da701debb36d412fbe9b9f0a793f261" + integrity sha512-Y5qKBqvneFuDEMT0G9SZlbxJz5dEyF1+BIFyQC01zydNCzbrff/BVyLsEzFRBthSefzW6wUfTKnxUdWcpygTeQ== dependencies: "@babel/generator" "^7.0.0" "@babel/parser" "^7.0.0" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" -"@parcel/babel-preset-env@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/babel-preset-env/-/babel-preset-env-2.0.0-nightly.445.tgz#93ecf8ed29179c99e5e6d7e1534fcfae7a72a73e" - integrity sha512-fkYiZocLAsEyjz50nibkVIHULP0hwV9K2Qjl+/tqA1WJYh6/TMb1/EsaQ4T1CTY+zVsCh3TgRY4a+WqQ+OCu/A== +"@parcel/babel-preset-env@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/babel-preset-env/-/babel-preset-env-2.0.0-nightly.449.tgz#90b382dc53f040585a7f69b18c9c56003b24e7cd" + integrity sha512-xoUBvWrkft85Ch9bai4vLytgUeYshHJS/jRGJgbhaa4Vle6/R4QfP4i9mmq/Ai3Wbk2iErznlkFVS9T4gCQI/g== dependencies: "@babel/preset-env" "^7.4.0" semver "^5.4.1" -"@parcel/babylon-walk@2.0.0-nightly.2067+adb92ee0": - version "2.0.0-nightly.2067" - resolved "https://registry.yarnpkg.com/@parcel/babylon-walk/-/babylon-walk-2.0.0-nightly.2067.tgz#102349d4f52d8046868429cb70f5fd4fe544957e" - integrity sha512-PlFGav6fC8HIsA1pS7moWTWgXuwL4OI+xH50Wee5Dc0Q3KNmfyqCJpnhRhCJTGmVe8KGYEgXF6MNwrvjVWUCbg== +"@parcel/babylon-walk@2.0.0-nightly.2071+837d1fbd": + version "2.0.0-nightly.2071" + resolved "https://registry.yarnpkg.com/@parcel/babylon-walk/-/babylon-walk-2.0.0-nightly.2071.tgz#f4d49163214074d2cd2bbc43cd2602eaf993cb53" + integrity sha512-MXStP3yWHGCY2nRGi6kh9ezeS3x9ITUCZn0zX80TJc183I/Cz1PHcJKqeS0lwXl8VtPFqDvjXVqoSBY8UCFQ9g== dependencies: "@babel/types" "^7.0.0" lodash.clone "^4.5.0" -"@parcel/bundler-default@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.0.0-nightly.445.tgz#bac962673e7ebe6c8314e5cab7e89f03a00fca77" - integrity sha512-v6zhPfvte103vtZkAUh4mJkVLCLvX9ZjI8p6ZP3fDSI1Y5F8akWe4LWXOo1ATMjfELcwbcb317rOAKgwvV6fiQ== +"@parcel/bundler-default@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.0.0-nightly.449.tgz#1898eb0a5b2bc42748a1b56eb695787ee4d808dc" + integrity sha512-92vgvqsBKPSamstAcfAkKDLCbw5r2IP9FL6PVSb0u6gmCuOKCUMM4JUtoiAWm0njSSmW1B3Zqtzbhfu2JlNflQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" nullthrows "^1.1.1" -"@parcel/cache@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/cache/-/cache-2.0.0-nightly.445.tgz#ade1c56a3b8064223b5b4004d0f3a76116290617" - integrity sha512-HhOkWCCNRs8zdKRyiWUiYI63BZc4MjrgFCiNv00KxyDCtDXtZrD5yjzRdVbVMmJvoth8iAtNoSCrJ2hGsouPBQ== +"@parcel/cache@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/cache/-/cache-2.0.0-nightly.449.tgz#8d3cbcfd79657fc8a83a8fa920b14e985b57e878" + integrity sha512-SYtpAKL4+AuHINgxfqrKwdG26jxsAJgeETpk9ILm9FvwOw40H9ImktNYIiT5dYaehpmuOl35msVlkocNWWHOjA== dependencies: - "@parcel/logger" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/logger" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" -"@parcel/codeframe@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/codeframe/-/codeframe-2.0.0-nightly.445.tgz#4a89d283e26a0e24eb91954e499ecd80cf4472a2" - integrity sha512-lptg9/JUko0GXe4dbG39w7sIVyOhT414qVem6mOC7P7Fy0Us7Qat23nAlWGLICZ4iYavOO44B9yIRbwUv/WB7g== +"@parcel/codeframe@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/codeframe/-/codeframe-2.0.0-nightly.449.tgz#77c7ba848cdef8dd7cedfa122b422acf824fc821" + integrity sha512-GrA41h6DCM9zTwo0LRu6aWCoFhlAVIB5hsZO1i6GcKrl9hb5RxRWt56YSPdigN67S4FCY0XyfrS6M98yaHrb2w== dependencies: chalk "^2.4.2" emphasize "^2.1.0" slice-ansi "^4.0.0" string-width "^4.2.0" -"@parcel/config-default@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/config-default/-/config-default-2.0.0-nightly.445.tgz#d48b91629ccf3b065702ce1b893fd7011a3cb494" - integrity sha512-v7l35yN+KYLzuzMEGxdHr8WSaTXhZlY7FQKeoZ7XupFRXAB2QsOyoIpm74LMkSsRLAWZ3JOQej3Ii79bbTvFHQ== - dependencies: - "@parcel/bundler-default" "2.0.0-nightly.445+adb92ee0" - "@parcel/namer-default" "2.0.0-nightly.445+adb92ee0" - "@parcel/optimizer-cssnano" "2.0.0-nightly.445+adb92ee0" - "@parcel/optimizer-data-url" "2.0.0-nightly.445+adb92ee0" - "@parcel/optimizer-htmlnano" "2.0.0-nightly.445+adb92ee0" - "@parcel/optimizer-terser" "2.0.0-nightly.445+adb92ee0" - "@parcel/packager-css" "2.0.0-nightly.445+adb92ee0" - "@parcel/packager-html" "2.0.0-nightly.445+adb92ee0" - "@parcel/packager-js" "2.0.0-nightly.445+adb92ee0" - "@parcel/packager-raw" "2.0.0-nightly.445+adb92ee0" - "@parcel/packager-raw-url" "2.0.0-nightly.2067+adb92ee0" - "@parcel/packager-ts" "2.0.0-nightly.445+adb92ee0" - "@parcel/reporter-bundle-analyzer" "2.0.0-nightly.2067+adb92ee0" - "@parcel/reporter-bundle-buddy" "2.0.0-nightly.2067+adb92ee0" - "@parcel/reporter-cli" "2.0.0-nightly.445+adb92ee0" - "@parcel/reporter-dev-server" "2.0.0-nightly.445+adb92ee0" - "@parcel/resolver-default" "2.0.0-nightly.445+adb92ee0" - "@parcel/runtime-browser-hmr" "2.0.0-nightly.445+adb92ee0" - "@parcel/runtime-js" "2.0.0-nightly.445+adb92ee0" - "@parcel/runtime-react-refresh" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-babel" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-coffeescript" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-css" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-glsl" "2.0.0-nightly.2067+adb92ee0" - "@parcel/transformer-graphql" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-html" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-image" "2.0.0-nightly.2067+adb92ee0" - "@parcel/transformer-inline-string" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-js" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-json" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-jsonld" "2.0.0-nightly.2067+adb92ee0" - "@parcel/transformer-less" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-mdx" "2.0.0-nightly.2067+adb92ee0" - "@parcel/transformer-postcss" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-posthtml" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-pug" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-raw" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-react-refresh-babel" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-react-refresh-wrap" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-sass" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-stylus" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-sugarss" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-toml" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-typescript-types" "2.0.0-nightly.445+adb92ee0" - "@parcel/transformer-vue" "2.0.0-nightly.2067+adb92ee0" - "@parcel/transformer-yaml" "2.0.0-nightly.445+adb92ee0" - -"@parcel/core@2.0.0-nightly.443+adb92ee0": - version "2.0.0-nightly.443" - resolved "https://registry.yarnpkg.com/@parcel/core/-/core-2.0.0-nightly.443.tgz#2aadb331972f97738d74e1032d8894cdd7b08fa1" - integrity sha512-tjxlSYwrR4X4244PvdKYQslAQf1jqsBSjVtb19tD+5r/B+nmWrZtVe3/S1JEu8rFVt54TGsgifrO4RyOOlvqVA== - dependencies: - "@parcel/cache" "2.0.0-nightly.445+adb92ee0" - "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" - "@parcel/events" "2.0.0-nightly.445+adb92ee0" - "@parcel/fs" "2.0.0-nightly.445+adb92ee0" - "@parcel/logger" "2.0.0-nightly.445+adb92ee0" - "@parcel/package-manager" "2.0.0-nightly.445+adb92ee0" - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" +"@parcel/config-default@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/config-default/-/config-default-2.0.0-nightly.449.tgz#0b34f279469c3cf5b343da369b7c77b5472992c5" + integrity sha512-5gsByLMQbUmKAtLf79diY4AcP2mTkMd2ljuLZ6oJMNDL8viqG0pCFvp88KBC/xKg8NpU5gvj2mLrwG6pkOzu+Q== + dependencies: + "@parcel/bundler-default" "2.0.0-nightly.449+837d1fbd" + "@parcel/namer-default" "2.0.0-nightly.449+837d1fbd" + "@parcel/optimizer-cssnano" "2.0.0-nightly.449+837d1fbd" + "@parcel/optimizer-data-url" "2.0.0-nightly.449+837d1fbd" + "@parcel/optimizer-htmlnano" "2.0.0-nightly.449+837d1fbd" + "@parcel/optimizer-terser" "2.0.0-nightly.449+837d1fbd" + "@parcel/packager-css" "2.0.0-nightly.449+837d1fbd" + "@parcel/packager-html" "2.0.0-nightly.449+837d1fbd" + "@parcel/packager-js" "2.0.0-nightly.449+837d1fbd" + "@parcel/packager-raw" "2.0.0-nightly.449+837d1fbd" + "@parcel/packager-raw-url" "2.0.0-nightly.2071+837d1fbd" + "@parcel/packager-ts" "2.0.0-nightly.449+837d1fbd" + "@parcel/reporter-bundle-analyzer" "2.0.0-nightly.2071+837d1fbd" + "@parcel/reporter-bundle-buddy" "2.0.0-nightly.2071+837d1fbd" + "@parcel/reporter-cli" "2.0.0-nightly.449+837d1fbd" + "@parcel/reporter-dev-server" "2.0.0-nightly.449+837d1fbd" + "@parcel/resolver-default" "2.0.0-nightly.449+837d1fbd" + "@parcel/runtime-browser-hmr" "2.0.0-nightly.449+837d1fbd" + "@parcel/runtime-js" "2.0.0-nightly.449+837d1fbd" + "@parcel/runtime-react-refresh" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-babel" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-coffeescript" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-css" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-glsl" "2.0.0-nightly.2071+837d1fbd" + "@parcel/transformer-graphql" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-html" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-image" "2.0.0-nightly.2071+837d1fbd" + "@parcel/transformer-inline-string" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-js" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-json" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-jsonld" "2.0.0-nightly.2071+837d1fbd" + "@parcel/transformer-less" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-mdx" "2.0.0-nightly.2071+837d1fbd" + "@parcel/transformer-postcss" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-posthtml" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-pug" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-raw" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-react-refresh-babel" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-react-refresh-wrap" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-sass" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-stylus" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-sugarss" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-toml" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-typescript-types" "2.0.0-nightly.449+837d1fbd" + "@parcel/transformer-vue" "2.0.0-nightly.2071+837d1fbd" + "@parcel/transformer-yaml" "2.0.0-nightly.449+837d1fbd" + +"@parcel/core@2.0.0-nightly.447+837d1fbd": + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/@parcel/core/-/core-2.0.0-nightly.447.tgz#ddf02b86f3a62b5f74259d9d97703592d8797ea6" + integrity sha512-UUL9+mytJo48Uze954POXkWEnv4l1NuPNFdP4FKunyeRSQp4hK8jBMFctLDigVYXXs/pQ8q0pxDIkWfucf86dg== + dependencies: + "@parcel/cache" "2.0.0-nightly.449+837d1fbd" + "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" + "@parcel/events" "2.0.0-nightly.449+837d1fbd" + "@parcel/fs" "2.0.0-nightly.449+837d1fbd" + "@parcel/logger" "2.0.0-nightly.449+837d1fbd" + "@parcel/package-manager" "2.0.0-nightly.449+837d1fbd" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/types" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" - "@parcel/workers" "2.0.0-nightly.445+adb92ee0" + "@parcel/types" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" + "@parcel/workers" "2.0.0-nightly.449+837d1fbd" abortcontroller-polyfill "^1.1.9" base-x "^3.0.8" browserslist "^4.6.6" @@ -2294,72 +2294,72 @@ querystring "^0.2.0" semver "^5.4.1" -"@parcel/diagnostic@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/diagnostic/-/diagnostic-2.0.0-nightly.445.tgz#9ee4346683445c7e6c05695d0c1e105dbc4a81ce" - integrity sha512-uURmdKGPQn5ZGHzJbuPTnTYDFWzsYlt6SBysVU5/OGoWXDlsW7nQ+MU7rfIQl9D5pgFtC9G+orwSPvjDmBi83w== +"@parcel/diagnostic@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/diagnostic/-/diagnostic-2.0.0-nightly.449.tgz#5ea6f709fad1376ae833497b507422661115a95e" + integrity sha512-HUR5X9cDjBpTeWzB0kBhudv6enSTBPng1f5x2SJUnPKIK1EdpEKGXIei4xwvTH1Tz0oIHcIVhrx2k4AZtaALPg== dependencies: json-source-map "^0.6.1" nullthrows "^1.1.1" -"@parcel/events@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/events/-/events-2.0.0-nightly.445.tgz#f8c7b0ab75bc9c2676bb65c428780467378f31ee" - integrity sha512-4w1NoPtP4lAl2IC0B3dNKEJgukSSArdnd/+D33Y57S6C9Ninw6nTrEQtfePmoZqNVcmEk/ztSBxixn484NE+IA== +"@parcel/events@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/events/-/events-2.0.0-nightly.449.tgz#e7e41c368c7f1357e118c1da4264e7add57b6475" + integrity sha512-gOGHFGWW3tvBXSmXj6fKGfCTsjVV0KHrka5mL0vrNpi6n0LUQgpPtsZJokyQy91U/B5neUtLX/ubQT0gordqjA== -"@parcel/fs-write-stream-atomic@2.0.0-nightly.2067+adb92ee0": - version "2.0.0-nightly.2067" - resolved "https://registry.yarnpkg.com/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.0-nightly.2067.tgz#e868a6d75e791f66477f9fbc6b65763c0cd9f16c" - integrity sha512-zIKF9CfZQPi7iwbHTaulTY2k8ZUcnSj4tVeHKrd2XiX+5yv7Q80Kuk5GbpcnMw/FxSubxNvHX/x7oxbtFCiXeA== +"@parcel/fs-write-stream-atomic@2.0.0-nightly.2071+837d1fbd": + version "2.0.0-nightly.2071" + resolved "https://registry.yarnpkg.com/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.0-nightly.2071.tgz#e239927e1d6b55a7b8ae2445f3839483752e75d6" + integrity sha512-Liv3eXtB5Ap/HvLyAmbBNdil9K33YlPJkDcTQjji9vt9PS7K53rX4woHIgdBvFmzOk54jZMbBgfwwxr1Z3Qu1g== dependencies: graceful-fs "^4.1.2" iferr "^1.0.2" imurmurhash "^0.1.4" readable-stream "1 || 2" -"@parcel/fs@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-2.0.0-nightly.445.tgz#28bc385de0dc9ab7a776a0329fad92a33c5bc074" - integrity sha512-iQL/gAC7PfS8N1Vt6GZeb7b6zjtr0umEFlyC7uQ6lyV/Ln2syqTJWQ+OKCdpURdi2PY3dqzqD9OyNqVFpp5+IA== +"@parcel/fs@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-2.0.0-nightly.449.tgz#07822ea3db9a558015db223fa0dbb1edaca6a449" + integrity sha512-k2MiwJr0NSodBUKud1h2cxYurJXgscrYpFDZTPYnyoJk0YBPHZcjmQBivXkX0ImH9MwOYIpRg/7dPDwnSaykXg== dependencies: - "@parcel/fs-write-stream-atomic" "2.0.0-nightly.2067+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/fs-write-stream-atomic" "2.0.0-nightly.2071+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" "@parcel/watcher" "2.0.0-alpha.8" - "@parcel/workers" "2.0.0-nightly.445+adb92ee0" + "@parcel/workers" "2.0.0-nightly.449+837d1fbd" graceful-fs "^4.2.4" mkdirp "^0.5.1" ncp "^2.0.0" nullthrows "^1.1.1" rimraf "^3.0.2" -"@parcel/logger@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-2.0.0-nightly.445.tgz#5085896f9f4cd398b94ce2956e74a497886825f6" - integrity sha512-AtTE3ciR/xrqDSaEqEBgFd0zhUK5mCq+G7tXYeCu71+OphnCo30vSVe9NhsoZmWHoFvtOjCZ0M9ECfTJzVXRuw== +"@parcel/logger@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-2.0.0-nightly.449.tgz#0a088eacaa32fca33fc835d382feecda86b3d54c" + integrity sha512-ZEuV2tx3aPTW/Ceo2SzS9cQbyNPmkJHKESGwFx7SWke2hZaIsyh6BqgDNGpnNkzK6mD2fgMzgNajb+FeH0IJww== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" - "@parcel/events" "2.0.0-nightly.445+adb92ee0" + "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" + "@parcel/events" "2.0.0-nightly.449+837d1fbd" -"@parcel/markdown-ansi@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/markdown-ansi/-/markdown-ansi-2.0.0-nightly.445.tgz#5a271162f65e2a2a3c5de5a2a95999d72336c01e" - integrity sha512-CoVZYc5JsdQfsgt3BVlR9u+36I6EBAwQOo7y4iR4nNiF/MWb8s30PGLTNjykYxyNxBI92YfHl8RTMgyeGuHCqw== +"@parcel/markdown-ansi@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/markdown-ansi/-/markdown-ansi-2.0.0-nightly.449.tgz#27f75e203b4fa67bebfb0b34c4951319e32d4ea3" + integrity sha512-MaygzYxLEc9IzIttqe+W8W9XpgsthoSiPgkJOpWlY7ICvKr3yHAlbmPgawbbNpMukjSzqOrcgDTwe22F/wV5ww== dependencies: chalk "^2.4.2" -"@parcel/namer-default@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/namer-default/-/namer-default-2.0.0-nightly.445.tgz#19bd7440ac7c9510cf8b321838e39e5549d83dfb" - integrity sha512-hsYj0OCkh8LSshTSuW6HKR6O0YbHTPJydZ+5+XrV5v87PDOp1QBLeuDCR6hporRqx7KWBp20PROWrrXgjcvJmQ== +"@parcel/namer-default@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/namer-default/-/namer-default-2.0.0-nightly.449.tgz#448a1ad3b0dc38f0431cf1ebdee8403d73d05519" + integrity sha512-KVskg+otIp5P2hRnezWqmPMN5h44Bgh2pJ/1gcktfsKJUVygYeb1oPz+4Z+l32dkYlLlR05A0/+oZTzhCb0KcA== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" nullthrows "^1.1.1" -"@parcel/node-libs-browser@2.0.0-nightly.2067+adb92ee0": - version "2.0.0-nightly.2067" - resolved "https://registry.yarnpkg.com/@parcel/node-libs-browser/-/node-libs-browser-2.0.0-nightly.2067.tgz#8b6195a0013f2c4018d637bcd9de7b778aaf6e42" - integrity sha512-0Q5ZwBM3bZM3tYsMvh7SEc3iMc5d3AgSkn5MG6+rRbLnFP3dwRQws/2qpCghX9//2ifTa9jNwU7cSqlMdVN/Ng== +"@parcel/node-libs-browser@2.0.0-nightly.2071+837d1fbd": + version "2.0.0-nightly.2071" + resolved "https://registry.yarnpkg.com/@parcel/node-libs-browser/-/node-libs-browser-2.0.0-nightly.2071.tgz#08a3a1de1e3d3c4fdab4e302abbbc325c0e604e0" + integrity sha512-L+0XNhMbQUvHyra9X3vvV+k2SnO5YPlHvew/6sClQNh+osXWz/FW/Uxi0pVwyrjqJAPS+0PQ4xV8CynvqYZUTg== dependencies: assert "^2.0.0" browserify-zlib "^0.2.0" @@ -2384,71 +2384,71 @@ util "^0.12.3" vm-browserify "^1.1.2" -"@parcel/node-resolver-core@2.0.0-nightly.2067+adb92ee0": - version "2.0.0-nightly.2067" - resolved "https://registry.yarnpkg.com/@parcel/node-resolver-core/-/node-resolver-core-2.0.0-nightly.2067.tgz#27b083414d0a6f4ec532c67441f4b844bffde5c7" - integrity sha512-pXh5flmV49zo25nhZPxDzeIdQmuUNCX5okXELQC7aCbbSInLHZNwCAks0PaGCMXo+Cx5nWtzRaC50URn2LnJVA== +"@parcel/node-resolver-core@2.0.0-nightly.2071+837d1fbd": + version "2.0.0-nightly.2071" + resolved "https://registry.yarnpkg.com/@parcel/node-resolver-core/-/node-resolver-core-2.0.0-nightly.2071.tgz#a725fa191419b2e1a64ef970ac1c08858c822cc3" + integrity sha512-3W1qH5QgExDLd82EJMF9EJkAd7vSN3B7u554CKjCnrv6+oUwwWYySI8o8pdPZNpDhlXx+amUhg76IMPfqfxWUw== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" - "@parcel/node-libs-browser" "2.0.0-nightly.2067+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" + "@parcel/node-libs-browser" "2.0.0-nightly.2071+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" micromatch "^3.0.4" nullthrows "^1.1.1" querystring "^0.2.0" -"@parcel/optimizer-cssnano@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.0.0-nightly.445.tgz#b4e3e8a42dfbbfee6f3e93bfa794ea575ee17f6f" - integrity sha512-jD4AEtloLMmEN2kJ7wGD+bN6krv/7MFifNSQTLSjuHR4X5yE68LYanUDiFwZFLoA5PS6IN0k2MPV5uQx5b/Iag== +"@parcel/optimizer-cssnano@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.0.0-nightly.449.tgz#f22c22863df7b23a70fab857e89377fd2376ce3d" + integrity sha512-2iuro2UrzDbfJPgke0CpwmQpR+Nf9NiiUV31JvdM8m2uBRafhMVQV6DXlFUwqfvFu4WkBfgvt6tSOZtpaobKGA== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" "@parcel/source-map" "2.0.0-alpha.4.16" cssnano "^4.1.10" postcss "^8.0.5" -"@parcel/optimizer-data-url@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-data-url/-/optimizer-data-url-2.0.0-nightly.445.tgz#ecf601c69be85a343d4d7889048163c9b06f71da" - integrity sha512-6aCjXaEBHcMtr9u/7FBNRd0v2de27CdG+AKcDUopHOeT7algwlam59dvFQK/cGqTFYjuoTRQcEZaC3R6tmLqwg== +"@parcel/optimizer-data-url@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-data-url/-/optimizer-data-url-2.0.0-nightly.449.tgz#afa33f9cc38b6f4f9b56b39e951529f5883f4549" + integrity sha512-RGFQ5KAv8/U05WnKA11vw7olWLAY5INuwIPZA22e6j1pr5mWNB0kdyHu3WgU4dAVmz7J7KcwWtPrBx+PgKvE6A== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" isbinaryfile "^4.0.2" mime "^2.4.4" -"@parcel/optimizer-htmlnano@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.0.0-nightly.445.tgz#d056a71c0f5e29a9a7c3103579a5cb977733fa2d" - integrity sha512-RiPJEStbZ4OtQYvTPd8KKuXANsgy86viA76u4mnadInupxsM+MRlxj/7eUt7t+kSqE/z6yoH1HTF69kpUgwXYw== +"@parcel/optimizer-htmlnano@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.0.0-nightly.449.tgz#30ebdb834b2ac35fbd2ce8570e564c5c47a303f8" + integrity sha512-da4/qr+LlZn/QEyh+NAhkLY1rz64NjnHUR/49UweJSCmtTK4WKPmByawQPyg/++7fWVmeqUu39bKeZW7yzsqGA== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" htmlnano "^0.2.2" nullthrows "^1.1.1" posthtml "^0.11.3" -"@parcel/optimizer-terser@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-terser/-/optimizer-terser-2.0.0-nightly.445.tgz#3e48db6cc5725151b6ef2ed12c65b904a2422bfb" - integrity sha512-DH+0UZCcFmeBEwLlY64ZZWyvoHi1bjVnKW7WLaRauHPBwrT3xGVkIa+hN7QHQ+E2t4jDCQd7IpfoswzBqGohvA== +"@parcel/optimizer-terser@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-terser/-/optimizer-terser-2.0.0-nightly.449.tgz#7834577cb4a87071ae99d82d4ff1bab0853fdb80" + integrity sha512-WpGIbULuwIPhxbPmJ7do1fyxxmhY+aluQomptwopZsL9tPB4jqceGH3LHPbghn+r25qneaQKvwt5mjtrOHcYvg== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" nullthrows "^1.1.1" terser "^5.2.0" -"@parcel/package-manager@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/package-manager/-/package-manager-2.0.0-nightly.445.tgz#5eaa68935f96ac11a92ccea99323aaa218f721b7" - integrity sha512-DhGslnPGIk/jd1DS5sNL3JLxk59GqvDn9Q+gAicB6QvKjF2Lq3GQLlnl6bi4bXetZwOYjdRBdaXikweJmKBs4A== +"@parcel/package-manager@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/package-manager/-/package-manager-2.0.0-nightly.449.tgz#3374d94997d48bc55f0c2c284a4fdde3c154eccc" + integrity sha512-hhBg3CZSe07dGAddE8Ft0ZP1fbaJ1v3jMgWSIO3uMwVYCIHiOs2KkIqMsiFaqlMesbeEQrSR0QiovTyUa3FGJg== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" - "@parcel/fs" "2.0.0-nightly.445+adb92ee0" - "@parcel/logger" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" - "@parcel/workers" "2.0.0-nightly.445+adb92ee0" + "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" + "@parcel/fs" "2.0.0-nightly.449+837d1fbd" + "@parcel/logger" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" + "@parcel/workers" "2.0.0-nightly.449+837d1fbd" command-exists "^1.2.6" cross-spawn "^6.0.4" nullthrows "^1.1.1" @@ -2456,91 +2456,91 @@ semver "^5.4.1" split2 "^3.1.1" -"@parcel/packager-css@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/packager-css/-/packager-css-2.0.0-nightly.445.tgz#688c2f1c96bd698325d8765c7acf3ebb049027ef" - integrity sha512-p1V4yBeF3RSds/o0e8V+Qs4/z+rDY32yakgdzBBYAtSYhPIIXUNaZMw0/DWqq7ClALeM6Xs+UQwFtT95worcIA== +"@parcel/packager-css@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/packager-css/-/packager-css-2.0.0-nightly.449.tgz#961e747e88dfcaf7037454887412b57f10532a4a" + integrity sha512-QPb67kErKKIVohmFKNiH9oysW/NoLRJMgOeZXmXzQ8wT2IYHdKmcBuer7DcWKegU4dCkrCd7IRx8dSnQcoQqAA== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" -"@parcel/packager-html@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/packager-html/-/packager-html-2.0.0-nightly.445.tgz#53fd08f3c9bd838940441a5098c2f70ac04a5099" - integrity sha512-LwOJELmGXX0yT0///njuzEzHSygjMZMDuDcJLMnMoiyA5MivoYWeVU/MTZvorTU8dzZ61SqiUIS1NbjDORp4vg== +"@parcel/packager-html@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/packager-html/-/packager-html-2.0.0-nightly.449.tgz#3a8e07496ae23da802a217ed6c82df5b9529a0e1" + integrity sha512-x6IWTU4w0Mfc1m8jcHUradSM9XrRX2umPk7QjhQ5X+v07N0diBpPoqnVSd4ujO29VYFHjh9by5dm3uEkF3mBLg== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/types" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/types" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" nullthrows "^1.1.1" posthtml "^0.11.3" -"@parcel/packager-js@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/packager-js/-/packager-js-2.0.0-nightly.445.tgz#7ce928ed783c924457395d1a1adc48e56490dda4" - integrity sha512-ePZzrgLJgZW+RUDiX/qZLDme2UmkIsFUr/4Rhdyc2S/QBMDAHcmBgXb61bavItw9CdzmyWdabqSx7jDr6RqzMw== +"@parcel/packager-js@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/packager-js/-/packager-js-2.0.0-nightly.449.tgz#ce9e8c165c8f3f0c2ba8c447cc3b55c523c892e0" + integrity sha512-D/ixE0TzZ+Iq7t1gSsSWrh/HUzohJ2eBggxQnim0E/ymkj3TxuGRh4NLTSweThEiA2xyR7EVeYhM6aq4rZp/pw== dependencies: "@babel/traverse" "^7.2.3" - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/scope-hoisting" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/scope-hoisting" "2.0.0-nightly.449+837d1fbd" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" nullthrows "^1.1.1" -"@parcel/packager-raw-url@2.0.0-nightly.2067+adb92ee0": - version "2.0.0-nightly.2067" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw-url/-/packager-raw-url-2.0.0-nightly.2067.tgz#5b93d627266ae4bd859c00c19da21a67cad56549" - integrity sha512-bCcOOrNAx17tOXMI5PJ1FtjJYj/idZokjmmeHZzrOmOjvppbGTNsDW92EyL3iBzB4aX0l9Dn9MSwV52/tWCVRA== +"@parcel/packager-raw-url@2.0.0-nightly.2071+837d1fbd": + version "2.0.0-nightly.2071" + resolved "https://registry.yarnpkg.com/@parcel/packager-raw-url/-/packager-raw-url-2.0.0-nightly.2071.tgz#6adda25e448f0edbf707b54a75129b21a4c99c44" + integrity sha512-sNAUDE35DCe/0yI3jjDC8Lfy8RY5xxT0RRBII89aVx2VxhpEqSAGSLw0xHSh2OsWPBxvFaLzGbyyLZ9TOe/Y6Q== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" -"@parcel/packager-raw@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw/-/packager-raw-2.0.0-nightly.445.tgz#a02bda8f218a03bcca9660e88f14e91e48c1830e" - integrity sha512-ZxZoWc9+5Bs+FXD6Kw2EP3DRp6F+Ya3qq4R2Jd+9EjjnfuH8leYOKwPghUio/G+AkSQEeOmBYgjhsE18o8ZpvA== +"@parcel/packager-raw@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/packager-raw/-/packager-raw-2.0.0-nightly.449.tgz#d3e14dc2d8c80d4ace8a01ce7a1718479c74dda6" + integrity sha512-PC5amaAv6cVzkP+CUDpgm58IKH0fS6AEHEJKuXbCUcLbYmnaDh2JUjDb2q6pXbTT7uITNUtC62FHTtXZdyHWCw== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" -"@parcel/packager-ts@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/packager-ts/-/packager-ts-2.0.0-nightly.445.tgz#04110a5ade9682fe90b26f6f547ff0da47f50af4" - integrity sha512-adNSvw8A736QEhjI7quvo5RzZOZW3Q14d/vmP86qx1nBrCSeHy/MFl/CyjeebQpJuZeGXnoiIHX8aWhz96kshQ== +"@parcel/packager-ts@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/packager-ts/-/packager-ts-2.0.0-nightly.449.tgz#8970151da387141a7d0328a3d41c7d1e09b545f5" + integrity sha512-GxxdUaHX6BvxFST7UEK1oJF/btaXfv4cBMixuA4Ii+ENvcISh/X4bhA8KlfKoquyFo0/58Enq0zo6u/psjkBlA== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" -"@parcel/plugin@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/plugin/-/plugin-2.0.0-nightly.445.tgz#c9f5a2ed3ad214d78744d761d4c3301ab2ff9fa2" - integrity sha512-qxcX+BiKRdHyCYTpEjjMOzjzLjpZmhdXdmL6PwAESg0PjqA7KCx1pL6zVJHaR68mQ/WBXE2lX7hl++Nfg2vtbw== +"@parcel/plugin@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/plugin/-/plugin-2.0.0-nightly.449.tgz#3299648d71296068a2f259803e241fcbcc034b26" + integrity sha512-FocqYaPUytyrC5AE1aYszb+e1gdsFAecHPgJYc/iEnVwM+eCIRArVbLqvudZoFBTcSM26F2uyBoIjMtiqhWpmg== dependencies: - "@parcel/types" "2.0.0-nightly.445+adb92ee0" + "@parcel/types" "2.0.0-nightly.449+837d1fbd" -"@parcel/reporter-bundle-analyzer@2.0.0-nightly.2067+adb92ee0": - version "2.0.0-nightly.2067" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.0.0-nightly.2067.tgz#ddf3984b2e088d33b2332c6e8b07b8286172e74c" - integrity sha512-GitRUuMGk4cf2Jais2mSVNUH2R3hmojCUMS9zrxmK9zu+W9Okl1V4yhEX6NbwSmuzKXEUOU2utMlqUYN12z1dg== +"@parcel/reporter-bundle-analyzer@2.0.0-nightly.2071+837d1fbd": + version "2.0.0-nightly.2071" + resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.0.0-nightly.2071.tgz#f4ff3848c0957c37dfe2c5107822268f86fce51e" + integrity sha512-V201PqmBwMy4JjuRaCDtMjKeTcQFB8QHaGRAtudD+FI2ulsms3m0yMTabmRrt2VAQH97gVF8HtqkHF5aKDU9rA== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" nullthrows "^1.1.1" -"@parcel/reporter-bundle-buddy@2.0.0-nightly.2067+adb92ee0": - version "2.0.0-nightly.2067" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-buddy/-/reporter-bundle-buddy-2.0.0-nightly.2067.tgz#38e05ca74d0c8c342a7269dc1a1bb65c064599d8" - integrity sha512-DEazr+ZzSTnDoP/kOamsPmD77IqwE8Fbp/HvDIDA4DQvkobxHLIt0w0Qr8lJ2tAgwzLRuAxA6UAHOvX6qVB1IQ== +"@parcel/reporter-bundle-buddy@2.0.0-nightly.2071+837d1fbd": + version "2.0.0-nightly.2071" + resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-buddy/-/reporter-bundle-buddy-2.0.0-nightly.2071.tgz#a3a93797ec9554da98292f960975565296b88a72" + integrity sha512-/UfvDyhwqNP8AoDrvFMkpKTZIJVKDTr7sRi/2gxxnhf2LW+qoLOpSsWSWue679tTntOKCqMhAUI/SS6YlNI0rQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" -"@parcel/reporter-cli@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/reporter-cli/-/reporter-cli-2.0.0-nightly.445.tgz#135ad99e1568ec2534d1d4553857b241537a6b9b" - integrity sha512-88oGRxN2Eimi3BqzEHb1fdITCh0XPRHf79EFxY7jUoxJobJwBIu967BzG+yy7NvARgYkm8aBa9+f+KyASrXPpw== +"@parcel/reporter-cli@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/reporter-cli/-/reporter-cli-2.0.0-nightly.449.tgz#4d8df81dc6ad464b79c304ee4cfb1b52629af29a" + integrity sha512-GsgC96hWZPqVVU6xqj4o1ddAhSM+EoEu7LTm/41T6tyW3Qv9OmfprsKUbSMK+48HZLL1UVJ0mEK/T4f7K+dg0Q== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/types" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/types" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" chalk "^3.0.0" filesize "^3.6.0" nullthrows "^1.1.1" @@ -2549,13 +2549,13 @@ strip-ansi "^6.0.0" term-size "^2.1.1" -"@parcel/reporter-dev-server@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/reporter-dev-server/-/reporter-dev-server-2.0.0-nightly.445.tgz#45b7d8d2bcf17609e4542e5c7b6872fa5aa15189" - integrity sha512-mYJ+t9KMCA52AaYvg0dxIMqdSZbnckxxunIM/uPe+J7Nd71ImfSNMv7K/xVx67RrSm/YD0gSgbGI4yfWX2/kGQ== +"@parcel/reporter-dev-server@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/reporter-dev-server/-/reporter-dev-server-2.0.0-nightly.449.tgz#5ec9ec25d3696f52ccc8c92018d78caff470e070" + integrity sha512-49s+jUBClCqdWMNTk2IvpAoRWf2axjXrB615mO5WGeVqBEZIHaSKA2WpfsaKb4mbJYmqNGKrBZbUqwK0lA2YlA== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" connect "^3.7.0" ejs "^2.6.1" http-proxy-middleware "^1.0.0" @@ -2563,54 +2563,54 @@ serve-handler "^6.0.0" ws "^6.2.0" -"@parcel/resolver-default@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/resolver-default/-/resolver-default-2.0.0-nightly.445.tgz#3aeff1e04f6005f019e93304ffbf29e01e38903a" - integrity sha512-A5hpAqtvFeA4AifeMSRBvUuJcKI5AnXotPXJ+ZoP6H8GjRcUbdkGSpObc+B6W4ZmMuYEtojGSHFA+eHcyVgQsg== +"@parcel/resolver-default@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/resolver-default/-/resolver-default-2.0.0-nightly.449.tgz#9d3465c225614598b0ab68f62fae0dab4c0d71d5" + integrity sha512-+V9IjjZPhkjCF2GppU/QSlnnQkOLGd3WNvJkRPOEWZtIpVOVy7lzoL9rBPFoE94aHwM0m4BolqyuiYv/6nqTpg== dependencies: - "@parcel/node-resolver-core" "2.0.0-nightly.2067+adb92ee0" - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/node-resolver-core" "2.0.0-nightly.2071+837d1fbd" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" -"@parcel/runtime-browser-hmr@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.0.0-nightly.445.tgz#04f2863e4a82a16a3f31f69535757d0077418899" - integrity sha512-kqUdNGh0oxHOM8UcMzxXW6EiDq6rSaAR3TGXam+HcLPyid9U5rPGUn0+476vtoiwH/mOrjKXRWEZJ0DsdfhnFw== +"@parcel/runtime-browser-hmr@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.0.0-nightly.449.tgz#5bb4f08873193dd4cab8e134ec5ead1066d2509d" + integrity sha512-okbif6vgJ6bMbjGuJk6I/+zBnP/OJeT8eKWii9uvZmN2tZv1MoIgXrXIJdNsUgunBPHur9dozk5K8cO1zTazuQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" -"@parcel/runtime-js@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/runtime-js/-/runtime-js-2.0.0-nightly.445.tgz#da86efc2f7c05ce0b6fd1f2d7c7935434f088b9c" - integrity sha512-/8HEZVm9Kc/mXM/wS3vyQxU3XLwKq/zEMiX8dKmWIrgFyqHBnKg06Xru1665mj1vhgpw1Viwr5DfrdjYVbuVVg== +"@parcel/runtime-js@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/runtime-js/-/runtime-js-2.0.0-nightly.449.tgz#26c4b28a1f05a26bddbbe95d45c9589048ed2086" + integrity sha512-GSUFxH/XxeN3tAezPOCHVS84NqYUJln2N1W8N8f1HRm1w52NB8VCIeB0mMuM0lGH1GM9le48oAHzISEixLkH4g== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" nullthrows "^1.1.1" -"@parcel/runtime-react-refresh@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.0.0-nightly.445.tgz#ef0edf335e69c0c659213de7445242373fa62390" - integrity sha512-4V8Hf3XumyPcfKRehf8/3mfTZduuWWN/tz+A4fh/9WRh9u6Hz1ozAbTjS/fpd78HnzK5BUIglUkvMyD5inhxoQ== +"@parcel/runtime-react-refresh@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.0.0-nightly.449.tgz#e3903b5c6dbf46c296966f4787905553f853ea13" + integrity sha512-ltrrakt2uCZ5Q6tDST2l5Ums4KpB9dM0kuZcwa6qJCpn4+YCYb1fVO3VSgk4zIVNhRdVwZspB+TEF2xLlBlWzA== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" react-refresh "^0.9.0" -"@parcel/scope-hoisting@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/scope-hoisting/-/scope-hoisting-2.0.0-nightly.445.tgz#bfe8f3bc4b5020e71df0d5845944c00136783277" - integrity sha512-+S9Ud91ONAQzG/F6LTOyrZwNGXeT394vrI6/FqAtVVqnHWZXK6JmN26kPnou+8SB8oxkMbzGhMxzoft7mORQVQ== +"@parcel/scope-hoisting@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/scope-hoisting/-/scope-hoisting-2.0.0-nightly.449.tgz#9fbe4b8bf479e7bfc96f076aef0308ae2545058e" + integrity sha512-R3lgrFVUccomYxN/A76qTCqav2+yU2OO5fb6qttUY7d0syQOuj72Vmj6X4djv8XD1wZMVpmGmWumr8if+UdqxQ== dependencies: "@babel/generator" "^7.3.3" "@babel/parser" "^7.0.0" "@babel/template" "^7.4.0" "@babel/traverse" "^7.2.3" "@babel/types" "^7.3.3" - "@parcel/babel-ast-utils" "2.0.0-nightly.2067+adb92ee0" - "@parcel/babylon-walk" "2.0.0-nightly.2067+adb92ee0" - "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" + "@parcel/babel-ast-utils" "2.0.0-nightly.2071+837d1fbd" + "@parcel/babylon-walk" "2.0.0-nightly.2071+837d1fbd" + "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" nullthrows "^1.1.1" "@parcel/source-map@2.0.0-alpha.4.16": @@ -2621,10 +2621,10 @@ node-addon-api "^3.0.0" node-gyp-build "^4.2.2" -"@parcel/transformer-babel@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-babel/-/transformer-babel-2.0.0-nightly.445.tgz#b12affbcd5df92597d91e8d404698fd7add574b0" - integrity sha512-+vf48c1BLe/4GAz7XXARc9+O92yhQVELmmFOX5uV1dnNy1bdSg6Ek7Ln/uHe3iabcMJF4YbYKBKXJMWiUdalWw== +"@parcel/transformer-babel@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-babel/-/transformer-babel-2.0.0-nightly.449.tgz#099259ef4ac9f02f61cc5c6ff8102d07489345cf" + integrity sha512-BTuOrG892ZmAx7M3jT0WX+2Yxi/bLtbuDWP8SfH9lXgrCJtx6fPObk7mqIrTvdmefKjeLcRmig1nS7XcnFKJPA== dependencies: "@babel/core" "^7.0.0" "@babel/generator" "^7.0.0" @@ -2634,85 +2634,85 @@ "@babel/preset-env" "^7.0.0" "@babel/preset-react" "^7.0.0" "@babel/traverse" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2067+adb92ee0" - "@parcel/babel-preset-env" "2.0.0-nightly.445+adb92ee0" - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/babel-ast-utils" "2.0.0-nightly.2071+837d1fbd" + "@parcel/babel-preset-env" "2.0.0-nightly.449+837d1fbd" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" browserslist "^4.6.6" core-js "^3.2.1" nullthrows "^1.1.1" semver "^5.7.0" -"@parcel/transformer-coffeescript@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-coffeescript/-/transformer-coffeescript-2.0.0-nightly.445.tgz#b109291ec5d289cc3c02b3897aef64cb00a43358" - integrity sha512-81z83poTX4ZsoA7QnW0RqIsP7WXHsIz9X3+IXW78Gm12lmgXOXGD/cSY6QtlBi4oqFxtiE9gVgEWety4j8qcgw== +"@parcel/transformer-coffeescript@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-coffeescript/-/transformer-coffeescript-2.0.0-nightly.449.tgz#a1bcf008ec744aa29875081808e6e7f4072b2c68" + integrity sha512-VxpRqifHbgUlNLcJRqcScdcquqSpQ+PUEevZuJmFsGa1SWIFisG0enfSgQL3eI6DbcT+a06tDMwkOTwm9Fx4+w== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" coffeescript "^2.0.3" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-css@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-css/-/transformer-css-2.0.0-nightly.445.tgz#5c443563ae8e005af6be424b0de9ec5f81560ed6" - integrity sha512-g0tCf/U5PDVjbttEfS0OipXYkcJ9AgibkWt4K4BtP8q6t+lctB71eyinHamcNHFJoi/mKW0EzlObBER9pIV+4w== +"@parcel/transformer-css@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-css/-/transformer-css-2.0.0-nightly.449.tgz#78b87be06020aed3463f2acaa8761c7e535e888d" + integrity sha512-YN3mVmIsNHDpNasxevaY0m9jSJzESyRWIfN4P6LkhS1al69KEWxIOmshGB5EV+r7GJ7MmealZP1x74mjJCzK1Q== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" postcss "^8.0.5" postcss-value-parser "^4.1.0" semver "^5.4.1" -"@parcel/transformer-glsl@2.0.0-nightly.2067+adb92ee0": - version "2.0.0-nightly.2067" - resolved "https://registry.yarnpkg.com/@parcel/transformer-glsl/-/transformer-glsl-2.0.0-nightly.2067.tgz#11599d0f5804e1503f8e28e750b260c8bbc08cd1" - integrity sha512-IG0dggCM8R3EycMmMgT3BAhtIENfLf2FsaMGFlTiKcF71IXn9JPLjjbx+Yn5yASJyAHP0dWgycw4xCjrxxg5yA== +"@parcel/transformer-glsl@2.0.0-nightly.2071+837d1fbd": + version "2.0.0-nightly.2071" + resolved "https://registry.yarnpkg.com/@parcel/transformer-glsl/-/transformer-glsl-2.0.0-nightly.2071.tgz#fe62e491bff66fdc4817895600ba207cff582fb2" + integrity sha512-qfs82sSYbm6CspMvoQczi6Ec7KbvDJewubnxOG0xVA+1RokNbOrpWGXDf6QNhCVy91rPipd+w/stG4y4Qn3ACQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" -"@parcel/transformer-graphql@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-graphql/-/transformer-graphql-2.0.0-nightly.445.tgz#fe311396f080a605810625fcaaa5a2238c2a74f6" - integrity sha512-i+lkzhzUp7DAOZeCWZbsa83+abzLRmijxMYVkMRKer8yaDNDlcqWfCVbzAcVFBI/wc6/mQ2nA/1erhePjqwfTA== +"@parcel/transformer-graphql@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-graphql/-/transformer-graphql-2.0.0-nightly.449.tgz#6014a1ffd2f0d0af3c84b6c8616770c54f9c428b" + integrity sha512-vbsUYTpqLBVXHW0VoKxu+iXjdnwB7BPvxCxhIBa/iaNIZRiMuX5IPovLVY4AxL+9EjdbAN5K93GMP7hcsDxLMQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" -"@parcel/transformer-html@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-html/-/transformer-html-2.0.0-nightly.445.tgz#561136797d7c6c476ab607f881dab34ca1b89d9e" - integrity sha512-sL1clzjug9xs25HN8VKyUnxKc1/wDfa9GBZNPUN7cysmbCCWGvPNiYd7LWp8EihMj+vEbyZ27rMF/hz6iN77UA== +"@parcel/transformer-html@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-html/-/transformer-html-2.0.0-nightly.449.tgz#c24aff17cce228fdd85da8604756e1f7165c28cd" + integrity sha512-hr3p6meUM+tZ2xL8NPEnc5b+9TIkAJIUJreMC1wpgcEmj6jqxTsDg0wnWNNP8hyYGE26VSal3aVGpnY+ad+Nww== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" nullthrows "^1.1.1" posthtml "^0.11.3" posthtml-parser "^0.4.1" posthtml-render "^1.1.5" semver "^5.4.1" -"@parcel/transformer-image@2.0.0-nightly.2067+adb92ee0": - version "2.0.0-nightly.2067" - resolved "https://registry.yarnpkg.com/@parcel/transformer-image/-/transformer-image-2.0.0-nightly.2067.tgz#2ed9c82340861742466235e3adef342f61b2c553" - integrity sha512-9b/539/IUMu/JAAzrwRP+1rZ5c1jcrobOY3hfT6gPc9dYsZPg6GAI5Zgri8k+D769Y/nxVzT3wHjx4asjOTy1g== +"@parcel/transformer-image@2.0.0-nightly.2071+837d1fbd": + version "2.0.0-nightly.2071" + resolved "https://registry.yarnpkg.com/@parcel/transformer-image/-/transformer-image-2.0.0-nightly.2071.tgz#bc45d8ebe906fa91aa7b8d9a6735c78aad96a905" + integrity sha512-xqM71Gjl5AqTuZCXGw7dzJ7UDmQTJbAAJ/3A5OqOycl1iTPL0c2pAGSUkDRJRIX4380vplAgqYTco+FvBBvj3A== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" -"@parcel/transformer-inline-string@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.0.0-nightly.445.tgz#4646777d25bad1964ceef442d45e2d1701a31d25" - integrity sha512-5q4+7gMhDMDXZrrDFGc7BSAr59bE9Mh6lYfqF4pPK70Gr5L5+ntUMGtscySnRl7IoIMd2T59SuHWZjxHdfNWHg== +"@parcel/transformer-inline-string@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.0.0-nightly.449.tgz#015aca67e176adb080d324931053c2ce86d70441" + integrity sha512-HSgsZcUhPNY5d55TZDR7N8lMff1yyi7zNw1ONsQyQeRG0POfWA3kMWbCvnAaVbM+VA3+en0fLtpJ4Lurn6T7Mg== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" -"@parcel/transformer-js@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.0.0-nightly.445.tgz#8fbae7bfb3b2a9a76a47219dcafd38948e4311c1" - integrity sha512-6/FN3GyBJAAsI5qR5rL1GNxdRCvnQli4p3lGvT2CGQZvy6FpScSw4KrtAKUzcGSTuJJM7P1fXkN0RYeR5RpD8w== +"@parcel/transformer-js@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.0.0-nightly.449.tgz#abd06895e8b3c0f1348f17a28bac9c7e87c2610f" + integrity sha512-5fPgwfW0+mJN4uq6yYHI9nkyGrS4Pg9U0Rc9Td7Fcc1jt82qIGE5LovZSonudw3tqnbpP6oqNEe/J48KdLdpBQ== dependencies: "@babel/core" "^7.0.0" "@babel/generator" "^7.0.0" @@ -2721,193 +2721,193 @@ "@babel/template" "^7.4.0" "@babel/traverse" "^7.0.0" "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2067+adb92ee0" - "@parcel/babylon-walk" "2.0.0-nightly.2067+adb92ee0" - "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/scope-hoisting" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/babel-ast-utils" "2.0.0-nightly.2071+837d1fbd" + "@parcel/babylon-walk" "2.0.0-nightly.2071+837d1fbd" + "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/scope-hoisting" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" micromatch "^4.0.2" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-json@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-json/-/transformer-json-2.0.0-nightly.445.tgz#7a2218d38d392ef125f938c6093f7ef89d6fcda6" - integrity sha512-skEW2uwFs3NYSv56Nwa16rqKVnApYHbMrjv2DnuiNhlY3JP+f03aTvdYxtvoB8aQni5HzMUm68aRnBH+rEqypg== +"@parcel/transformer-json@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-json/-/transformer-json-2.0.0-nightly.449.tgz#18c4e9181bf55dd85bbee016427bda3864e742d7" + integrity sha512-2OIxk/Kk1AFj3ZrOK0DztchFFgnxp+sZBejKac8tPGrXO7IgixTKpsW+8wNCTWXdK8ohcg0+eCvIRw8IKfJgkQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" json5 "^2.1.0" -"@parcel/transformer-jsonld@2.0.0-nightly.2067+adb92ee0": - version "2.0.0-nightly.2067" - resolved "https://registry.yarnpkg.com/@parcel/transformer-jsonld/-/transformer-jsonld-2.0.0-nightly.2067.tgz#b45351918734cd1b8a39ebae224bdc29db47bd9b" - integrity sha512-nppjkCAqGTVyHDUgKmBIfTfKsiARpiVA1TCN9T2QBbW8FNU0duFDZBF+++NfH2pLtOt2KbRk7dRE/fimpMjAxA== +"@parcel/transformer-jsonld@2.0.0-nightly.2071+837d1fbd": + version "2.0.0-nightly.2071" + resolved "https://registry.yarnpkg.com/@parcel/transformer-jsonld/-/transformer-jsonld-2.0.0-nightly.2071.tgz#bb9d432d9efafb17c9832f848644e97e964e8ce6" + integrity sha512-cdbqRIefMSwbxIBsMoLjr1M8V30Bs1BpjdTsQ7gJsc9hMJsx59LdRtOg8Dx6iwyuJwdQrpIYdi1IyaUJVrKsag== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/types" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/types" "2.0.0-nightly.449+837d1fbd" json5 "^2.1.2" -"@parcel/transformer-less@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-less/-/transformer-less-2.0.0-nightly.445.tgz#400612ba75ca3546b59c56807aaab415b751e27c" - integrity sha512-EjGK2ZsbGHQc5YD6CIVdVZn9hmL7sTM8SjuRU0/CFgKVQh3NI0e8vVjfA4UnMgRAsVAxFKDiyIc10pZuRrTBEQ== +"@parcel/transformer-less@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-less/-/transformer-less-2.0.0-nightly.449.tgz#a4798842c463b7f4aa9b6e85dd790db55ef3a41b" + integrity sha512-cknM1CZjcbLIzbaUpi1kp7kjdkGFB7uxX0Dj7MKCVZKXOYFJlwGCycb/DXw1LRw+N4Tc6IjHaIsCGaw6Z7LGOw== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" "@parcel/source-map" "2.0.0-alpha.4.16" -"@parcel/transformer-mdx@2.0.0-nightly.2067+adb92ee0": - version "2.0.0-nightly.2067" - resolved "https://registry.yarnpkg.com/@parcel/transformer-mdx/-/transformer-mdx-2.0.0-nightly.2067.tgz#4ac94a9a33c495ede3638d036d493999d6624e96" - integrity sha512-tRIJLA2W6EmxXjjvBc37t8xASNaR0ZmmFc4K0LmJbiO5kuHWfOjuw/npq6p+TShYUUZYTSgeVsN9HolCDw/v4g== +"@parcel/transformer-mdx@2.0.0-nightly.2071+837d1fbd": + version "2.0.0-nightly.2071" + resolved "https://registry.yarnpkg.com/@parcel/transformer-mdx/-/transformer-mdx-2.0.0-nightly.2071.tgz#ff7e77aec3897a9c80ffda3b21145545c9817fc9" + integrity sha512-LjnKXkUI6fTXRnT21uKVTRoPi7d4+o6kBS9O/ojEniDqe97zQ6qb4R2teSS2UuMtxVKWVp2ojXchC+V+frke/w== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" -"@parcel/transformer-postcss@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-postcss/-/transformer-postcss-2.0.0-nightly.445.tgz#18fd18252b035192ef2b53a4029bd3f29a75e2b3" - integrity sha512-vGfrP0zkbwo7eMLQmWd29K6JAmoyKUMRt3U8fOE3KMxWTR4EwR/jAnv9qwimlz5GoEDne7dsBv1eHcrqpl50uQ== +"@parcel/transformer-postcss@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-postcss/-/transformer-postcss-2.0.0-nightly.449.tgz#d90d1ac841f253d04308603e78f21c93256b6705" + integrity sha512-QdAKy+dO9VEOAypJ7k75ah29zdPGgzECU7s6NqiAexcoAmgoOJEKQO9b3geVd7wyX7PBa+dHU1N1vnibUhA+ng== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" css-modules-loader-core "^1.1.0" nullthrows "^1.1.1" postcss-value-parser "^4.1.0" semver "^5.4.1" -"@parcel/transformer-posthtml@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-posthtml/-/transformer-posthtml-2.0.0-nightly.445.tgz#49d26ae8bf6f0d210066517972315fbb45a36a2b" - integrity sha512-jTUj+zyXKCTNgnJHNOKgjzmJgpcbmQgPEnac8TEwrW1iENaAxU+6gUChczf9xyzLpsV3WRT/4F8UheSiTqbpvw== +"@parcel/transformer-posthtml@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-posthtml/-/transformer-posthtml-2.0.0-nightly.449.tgz#076f3b05d6d02b0391e48de126a8db12af761021" + integrity sha512-wpueXMbZRQxaRPlxP9qyYcJNPtfnVfpRcj2CneJ99gze+1eEO6GmjMdxrr4jq0ejruy+/qL7dTzXwcoQ3LllwQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" nullthrows "^1.1.1" posthtml "^0.11.3" posthtml-parser "^0.4.1" posthtml-render "^1.1.5" semver "^5.4.1" -"@parcel/transformer-pug@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-pug/-/transformer-pug-2.0.0-nightly.445.tgz#a3df420a1bcb441381fb291e8d81b53be61ae3d0" - integrity sha512-0oMbtawueZgnWVRUxUZNBSZipfJ5IpzIDE++PnIkqChSukVHNtCaYuSYrsButDSmJ1R9lcbCfwGD6jKYiNGqtQ== +"@parcel/transformer-pug@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-pug/-/transformer-pug-2.0.0-nightly.449.tgz#cdafcb2be4bf3726d8958ff630a93b6b4b804457" + integrity sha512-gxCUN5CM88DpEfo7w9/Rihs93vNAFkeb7kjFSLxVdMWdm7rRc0OBuwBGSkihOZpqalF7r6BVxmE+wEJUp775kQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" -"@parcel/transformer-raw@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-raw/-/transformer-raw-2.0.0-nightly.445.tgz#ae26126a6e9100a0c2422f9bfdd205fe78b3b715" - integrity sha512-EpmlvQmEo0Efiq8UXw5zBB7N+cOUP8/2jT+Q3fTRO5dCwhVury/kE1dauApcrCoeUWyWNEyE19cQCirrdeNbZQ== +"@parcel/transformer-raw@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-raw/-/transformer-raw-2.0.0-nightly.449.tgz#bd7af800b97d7ea45771ff8a0662d51b2e93f736" + integrity sha512-batlnjTd3Nda40r8aWwMjlB6z2I5OHjHHpXcNj12DPJO3amUN/4PU0banRK0WZ6FV8ab7hUnNsQLiC+GGKmW7w== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" -"@parcel/transformer-react-refresh-babel@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-babel/-/transformer-react-refresh-babel-2.0.0-nightly.445.tgz#742e48f22fc9bb1418bb0e75217f44276b0f6283" - integrity sha512-3bY1JfS2m/4yXQEO5Lu7IAGcWmAyGu5KzGAtNXlC9lQRB2xSkNaSDuuIaj2XdQ3MmJUssnwUNjI2J+BQO+/2HA== +"@parcel/transformer-react-refresh-babel@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-babel/-/transformer-react-refresh-babel-2.0.0-nightly.449.tgz#53bc3896bc88777115421b8f9dbd0c928493f153" + integrity sha512-qrBbT9jiUsAlEw7Q4qLgPmu7Qx8mc1YONarP06bC3hBv7fDE6nY40++mIpb9kxTwev9/CP0uYKBRyD3LrFk38w== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" react-refresh "^0.9.0" -"@parcel/transformer-react-refresh-wrap@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.0.0-nightly.445.tgz#0290c472f753b2b313dc2d04b75304513bec4911" - integrity sha512-9+97jl4sGdyMXKcVyqEQiHPdPjkyIa5bDWxGCuZ3JuefrTrFcghHTTl7Q/BenFV/m0iBkqmaQ5fFGmAUQWZ1OQ== +"@parcel/transformer-react-refresh-wrap@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.0.0-nightly.449.tgz#4505f39499140bef21b9d2c9cf4cd8227f7591dd" + integrity sha512-3EwT7VFuWCB3qs4CaVEjw1y3vrMzNUFUYech5VZ673SP5tpOKg12+LOfJ3goEdhOZ8qvsknJhxOhpJzR/anbNQ== dependencies: "@babel/generator" "^7.0.0" "@babel/parser" "^7.0.0" "@babel/template" "^7.4.0" "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2067+adb92ee0" - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/babel-ast-utils" "2.0.0-nightly.2071+837d1fbd" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" react-refresh "^0.9.0" semver "^5.4.1" -"@parcel/transformer-sass@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sass/-/transformer-sass-2.0.0-nightly.445.tgz#8d2e998f637ecb691f6f6c0062ccf2fdc74b04cf" - integrity sha512-Hioyt64523DpDq2dMK1Ww8PFyvnyReuTSuwEi4TCgXeZsUX0cmwZILe0X1e/nhYUsPZMPjnnQL3qnRNoxK3cVg== +"@parcel/transformer-sass@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-sass/-/transformer-sass-2.0.0-nightly.449.tgz#6a5e6f3c0b77e5db1ce8665fda07687373f6b586" + integrity sha512-vxAGmRUu8/AvH2WXF43q2gwFJajitx/UM+Rz42cl/YNUJanzlYZpqLSg4rPjiWIO1h8pY5atC7x4XbrNDOY/BA== dependencies: - "@parcel/fs" "2.0.0-nightly.445+adb92ee0" - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/fs" "2.0.0-nightly.449+837d1fbd" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" -"@parcel/transformer-stylus@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-stylus/-/transformer-stylus-2.0.0-nightly.445.tgz#b1d96c46207300a66e55c37fd9876f9550bc9f45" - integrity sha512-y1/dkOu37IwODQhKo0Bp01ouToO4OwTHO1Ibs6gojqTsc2T7ac0SeX02J20K1bmYvucj9rT/y4yyWuW6xk49KA== +"@parcel/transformer-stylus@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-stylus/-/transformer-stylus-2.0.0-nightly.449.tgz#8c30eb821c59360e2901688993a423726f496518" + integrity sha512-MJimqbrHvGlkh1gKu9xoMKhi2Boztm3Hc75h68wBWVqTc+OmBHGl8eftpCNFvBgbMaTjhTDLY+GkOODi9Xe9NA== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" -"@parcel/transformer-sugarss@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sugarss/-/transformer-sugarss-2.0.0-nightly.445.tgz#745d8862f895b3a98dc30f4be21f9a043994a639" - integrity sha512-256XNk0p8Kd5tEEVRN7KjGq+NDlNr+CrqFUAuNdr2C4tnxB+DrtNLRXh16UDdfD3jgWOxLHp4rmFjnqpLBHEHA== +"@parcel/transformer-sugarss@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-sugarss/-/transformer-sugarss-2.0.0-nightly.449.tgz#5e577e3c6cb155ad3402e8366d50dcef35f71e6c" + integrity sha512-ccDVMSh5cvdHKT5lp2KKE+vyeqiRqQaVoBwW5S1QhVaAW7op/dHzhxCxA08SDQLaT/G5FzQC4lFGPfsTkeRQwA== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" postcss "^8.0.5" -"@parcel/transformer-toml@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-toml/-/transformer-toml-2.0.0-nightly.445.tgz#fd179834e5ff0b8219eeb926e41de0b08b05ce7c" - integrity sha512-wGTqFwVI4is8O3JWEvSDTk7Z/U58DlEHB49C2CwqR0xVSjCQbKuFt+fLOSaEhs7D4lTcr9U1dBwwXRgA38yBJg== +"@parcel/transformer-toml@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-toml/-/transformer-toml-2.0.0-nightly.449.tgz#0141bedbc6746e702b31e3a64efc59bc211261a1" + integrity sha512-vDevoB6UP72FaoD6YybBbm8mVl8CVQFSS2Ef1XPHWWip0nYpWUA9CBnx7h7FRy4kvIzKU/Wq/Tn2W6gfySDjAQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" -"@parcel/transformer-typescript-types@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.0.0-nightly.445.tgz#8dc435fdea20a1b8e84e48ce78762c4c5b0dcf45" - integrity sha512-NtcZOYLoSpoV3oVLxEDDGfZhziMKQS/znOxwVrNgy04pens2cQ028Tj42sdjL05V8vUEf3kVXVZlZGSyHFQhQQ== +"@parcel/transformer-typescript-types@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.0.0-nightly.449.tgz#254f735f17c302141ee5e710e55ecf1adc9ac025" + integrity sha512-9jMcRXJ13bMiRg7R3DgPkVNVr6uLjoBkOr33OX6Aat0o9ep8wFKalG1UbDHjLnTmISBsG3FJm9v+qKyQyzwHmQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/ts-utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/ts-utils" "2.0.0-nightly.449+837d1fbd" nullthrows "^1.1.1" -"@parcel/transformer-vue@2.0.0-nightly.2067+adb92ee0": - version "2.0.0-nightly.2067" - resolved "https://registry.yarnpkg.com/@parcel/transformer-vue/-/transformer-vue-2.0.0-nightly.2067.tgz#41bf71f2e6d5189fe40e9eaacf9f7871a51992b9" - integrity sha512-O8Yn74mwz5fiws1vDsc13xtNyFIKL83vebs+SrW6ALZUJzIndQr2J8WRvic5C25WF2NEtnUni+dUlUAUKUqXdg== +"@parcel/transformer-vue@2.0.0-nightly.2071+837d1fbd": + version "2.0.0-nightly.2071" + resolved "https://registry.yarnpkg.com/@parcel/transformer-vue/-/transformer-vue-2.0.0-nightly.2071.tgz#37e4c6eb1bfb3af35d66bf9583c93deb32d97577" + integrity sha512-y2yzc8u//WyA9u/I0HNt9Dv4YueXWhTntNkL/TKuB+S4RaZyetUepQqEvUv0JWgzqbuj5XxXWZ5Lk74bNMHQVg== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-yaml@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/transformer-yaml/-/transformer-yaml-2.0.0-nightly.445.tgz#e23988b79c50039d581b1753e32272645ed87771" - integrity sha512-V7kMbEPf5NAjAPWY4c2hezX4D23VhZwiDkFycFKD0f3SuDfnSVa/taZcH15h9cu6mAVl11X3w4X2R/v+RZhA6A== +"@parcel/transformer-yaml@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/transformer-yaml/-/transformer-yaml-2.0.0-nightly.449.tgz#7ee792f2fca24d1c7591b63e225296a046d80caa" + integrity sha512-n1GNhTXWPOvOoG3QGP1TXRGlbcOmyihkJH8hC73F4COvWxLzE3RgkB+nCBy34KgBO+yzFMeMzNpmIcg9HnMezQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.445+adb92ee0" + "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" -"@parcel/ts-utils@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/ts-utils/-/ts-utils-2.0.0-nightly.445.tgz#ff958629a2389184cb37eac5a14ee91fd30da5f2" - integrity sha512-gSsShUlj/zw/Ds9MmcbTkjsFbe0Il2MZhITc1U6ID1dUxdGVaRehhkCgwN8562L+rjS9ZRZUZACR7fTGiacSZA== +"@parcel/ts-utils@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/ts-utils/-/ts-utils-2.0.0-nightly.449.tgz#1585e2e1a0c7a483936347cac5fc7f4c60c73e8d" + integrity sha512-jk/VoHAln8F6Q/qDSKosOPbxUwhJJw2dRptm3Zn0kznWXceWE8EYDmjzRB1JAUCjxJ5ux0n1EYjm+UcmwhbIbA== dependencies: nullthrows "^1.1.1" -"@parcel/types@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/types/-/types-2.0.0-nightly.445.tgz#835026da93994a76a12e9066b48956b4a4e7e627" - integrity sha512-sY6fx7C7RAmfB6hSoVayRm2W5+TB04sLw8OK/aRDu5xiwAKX0h4ebUX+2G9EtGYKUF8gfhiQ6njt/f/SevXGdw== +"@parcel/types@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/types/-/types-2.0.0-nightly.449.tgz#549346dc2451927d5ad934a1179f031aadffebef" + integrity sha512-v4cpFFQtz5nUpsDxU+VsIPNlW1cV7pExYiv/oijAGH6S3XbY8GJ2XPX8lUHCH4Y6+WWQtnp3NJJCWzRtx4zEtA== -"@parcel/utils@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-2.0.0-nightly.445.tgz#fdeedba16af79b05ff61ced710ce479f154c4a09" - integrity sha512-srgHWtlvd8Jua7EmVvEBVvzO1ZDB8qIE0u677g39WDIBe7OAJ90ybHyV+zJZVRUD4JSEo4R7AFv3L7L4gkX3Mw== +"@parcel/utils@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-2.0.0-nightly.449.tgz#575b88501650ce0ce1e3d34a5fc4e5bba3948471" + integrity sha512-eZn5+QV4BsNq9tEK4pylVJVNS8iH7xTKZIXssvM1i2dVLzpkjlRnky8PazLOyfk2ZkqwY73UvQ7Ltsq+MIEHYg== dependencies: "@iarna/toml" "^2.2.0" - "@parcel/codeframe" "2.0.0-nightly.445+adb92ee0" - "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" - "@parcel/logger" "2.0.0-nightly.445+adb92ee0" - "@parcel/markdown-ansi" "2.0.0-nightly.445+adb92ee0" + "@parcel/codeframe" "2.0.0-nightly.449+837d1fbd" + "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" + "@parcel/logger" "2.0.0-nightly.449+837d1fbd" + "@parcel/markdown-ansi" "2.0.0-nightly.449+837d1fbd" "@parcel/source-map" "2.0.0-alpha.4.16" ansi-html "^0.0.7" chalk "^2.4.2" @@ -2932,14 +2932,14 @@ node-addon-api "^3.0.0" node-gyp-build "^4.2.1" -"@parcel/workers@2.0.0-nightly.445+adb92ee0": - version "2.0.0-nightly.445" - resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-2.0.0-nightly.445.tgz#b3366b7c4abe4bcfaae954c4e9bb97727523d3c7" - integrity sha512-692D89hFYrqU36UxxA9VtVMzbGH4OXsWJshE1GibjurICJ8L149/pxu8v/oCsE/M8Ng1Hj9iIKdtiCrS6w6Z0w== +"@parcel/workers@2.0.0-nightly.449+837d1fbd": + version "2.0.0-nightly.449" + resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-2.0.0-nightly.449.tgz#d9cf498864cf263abdcf53ddac21cf2f6f830327" + integrity sha512-d0+z/JhsCwRrKns5KvDkZg0UiLbLWvnrMT1Rw+N2bE3FdHlUlgckbOPUGFAM0LStaFartC3nsXnBwbSou1BKQg== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" - "@parcel/logger" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" + "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" + "@parcel/logger" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" chrome-trace-event "^1.0.2" nullthrows "^1.1.1" @@ -3034,10 +3034,10 @@ resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== -"@types/eslint@^7.2.4": - version "7.2.4" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.2.4.tgz#d12eeed7741d2491b69808576ac2d20c14f74c41" - integrity sha512-YCY4kzHMsHoyKspQH+nwSe+70Kep7Vjt2X+dZe5Vs2vkRudqtoFoUIv1RlJmZB8Hbp7McneupoZij4PadxsK5Q== +"@types/eslint@^7.2.5": + version "7.2.5" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.2.5.tgz#92172ecf490c2fce4b076739693d75f30376d610" + integrity sha512-Dc6ar9x16BdaR3NSxSF7T4IjL9gxxViJq8RmFd+2UAyA+K6ck2W+gUwfgpG/y9TPyUuBL35109bbULpEynvltA== dependencies: "@types/estree" "*" "@types/json-schema" "*" @@ -3288,49 +3288,41 @@ resolved "https://registry.yarnpkg.com/@types/yarnpkg__lockfile/-/yarnpkg__lockfile-1.1.4.tgz#445251eb00bd9c1e751f82c7c6bf4f714edfd464" integrity sha512-/emrKCfQMQmFCqRqqBJ0JueHBT06jBRM3e8OgnvDUcvuExONujIk2hFA5dNsN9Nt41ljGVDdChvCydATZ+KOZw== -"@typescript-eslint/eslint-plugin@^4.7.0": - version "4.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.7.0.tgz#85c9bbda00c0cb604d3c241f7bc7fb171a2d3479" - integrity sha512-li9aiSVBBd7kU5VlQlT1AqP0uWGDK6JYKUQ9cVDnOg34VNnd9t4jr0Yqc/bKxJr/tDCPDaB4KzoSFN9fgVxe/Q== +"@typescript-eslint/eslint-plugin@^4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.8.0.tgz#ad12cba28e426b24295291ad4c43b1cdc8b9dbb1" + integrity sha512-nm80Yy5D7Ot00bomzBYodnGmGhNdePHS3iaxJ3Th0wxRWEI/6KCgbmL8PR78fF7MtT1VDcYNtY5y+YYyGlRhBg== dependencies: - "@typescript-eslint/experimental-utils" "4.7.0" - "@typescript-eslint/scope-manager" "4.7.0" + "@typescript-eslint/experimental-utils" "4.8.0" + "@typescript-eslint/scope-manager" "4.8.0" debug "^4.1.1" functional-red-black-tree "^1.0.1" regexpp "^3.0.0" semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@4.7.0": - version "4.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.7.0.tgz#8d1058c38bec3d3bbd9c898a1c32318d80faf3c5" - integrity sha512-cymzovXAiD4EF+YoHAB5Oh02MpnXjvyaOb+v+BdpY7lsJXZQN34oIETeUwVT2XfV9rSNpXaIcknDLfupO/tUoA== +"@typescript-eslint/experimental-utils@4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.8.0.tgz#ff035f917aec0698c156a6039166ecf9d7a24f57" + integrity sha512-1yOvI++HMdA9lpaAkXXQlVUwJjruNz7Z9K3lgpcU+JU/Szvsv42H6G6DECalAuz2Dd0KFU/MeUrPC0jXnuAvlA== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/scope-manager" "4.7.0" - "@typescript-eslint/types" "4.7.0" - "@typescript-eslint/typescript-estree" "4.7.0" + "@typescript-eslint/scope-manager" "4.8.0" + "@typescript-eslint/types" "4.8.0" + "@typescript-eslint/typescript-estree" "4.8.0" eslint-scope "^5.0.0" eslint-utils "^2.0.0" -"@typescript-eslint/parser@^4.6.1": - version "4.6.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.6.1.tgz#b801bff67b536ecc4a840ac9289ba2be57e02428" - integrity sha512-lScKRPt1wM9UwyKkGKyQDqf0bh6jm8DQ5iN37urRIXDm16GEv+HGEmum2Fc423xlk5NUOkOpfTnKZc/tqKZkDQ== +"@typescript-eslint/parser@^4.7.0": + version "4.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.7.0.tgz#44bdab0f788b478178368baa65d3365fdc63da1c" + integrity sha512-+meGV8bMP1sJHBI2AFq1GeTwofcGiur8LoIr6v+rEmD9knyCqDlrQcFHR0KDDfldHIFDU/enZ53fla6ReF4wRw== dependencies: - "@typescript-eslint/scope-manager" "4.6.1" - "@typescript-eslint/types" "4.6.1" - "@typescript-eslint/typescript-estree" "4.6.1" + "@typescript-eslint/scope-manager" "4.7.0" + "@typescript-eslint/types" "4.7.0" + "@typescript-eslint/typescript-estree" "4.7.0" debug "^4.1.1" -"@typescript-eslint/scope-manager@4.6.1": - version "4.6.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.6.1.tgz#21872b91cbf7adfc7083f17b8041149148baf992" - integrity sha512-f95+80r6VdINYscJY1KDUEDcxZ3prAWHulL4qRDfNVD0I5QAVSGqFkwHERDoLYJJWmEAkUMdQVvx7/c2Hp+Bjg== - dependencies: - "@typescript-eslint/types" "4.6.1" - "@typescript-eslint/visitor-keys" "4.6.1" - "@typescript-eslint/scope-manager@4.7.0": version "4.7.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.7.0.tgz#2115526085fb72723ccdc1eeae75dec7126220ed" @@ -3339,29 +3331,23 @@ "@typescript-eslint/types" "4.7.0" "@typescript-eslint/visitor-keys" "4.7.0" -"@typescript-eslint/types@4.6.1": - version "4.6.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.6.1.tgz#d3ad7478f53f22e7339dc006ab61aac131231552" - integrity sha512-k2ZCHhJ96YZyPIsykickez+OMHkz06xppVLfJ+DY90i532/Cx2Z+HiRMH8YZQo7a4zVd/TwNBuRCdXlGK4yo8w== +"@typescript-eslint/scope-manager@4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.8.0.tgz#f960b6c5df1a5b230b8488e71c5c04e58dd494e0" + integrity sha512-eJ+SV6w5WcyFusQ/Ru4A/c7E65HMGzWWGPJAqSuM/1EKEE6wOw9LUQTqAvLa6v2oIcaDo9F+/EyOPZgoD/BcLA== + dependencies: + "@typescript-eslint/types" "4.8.0" + "@typescript-eslint/visitor-keys" "4.8.0" "@typescript-eslint/types@4.7.0": version "4.7.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.7.0.tgz#5e95ef5c740f43d942542b35811f87b62fccca69" integrity sha512-uLszFe0wExJc+I7q0Z/+BnP7wao/kzX0hB5vJn4LIgrfrMLgnB2UXoReV19lkJQS1a1mHWGGODSxnBx6JQC3Sg== -"@typescript-eslint/typescript-estree@4.6.1": - version "4.6.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.6.1.tgz#6025cce724329413f57e4959b2d676fceeca246f" - integrity sha512-/J/kxiyjQQKqEr5kuKLNQ1Finpfb8gf/NpbwqFFYEBjxOsZ621r9AqwS9UDRA1Rrr/eneX/YsbPAIhU2rFLjXQ== - dependencies: - "@typescript-eslint/types" "4.6.1" - "@typescript-eslint/visitor-keys" "4.6.1" - debug "^4.1.1" - globby "^11.0.1" - is-glob "^4.0.1" - lodash "^4.17.15" - semver "^7.3.2" - tsutils "^3.17.1" +"@typescript-eslint/types@4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.8.0.tgz#87e73883637f662d9a638b0e9b01ed77edc44fb7" + integrity sha512-2/mGmXxr3sTxCvCT1mhR2b9rbfpMEBK41tiu0lMnMtZEbpphcUyrmgt2ogDFWNvsvyyeUxO1159eDrgFb7zV4Q== "@typescript-eslint/typescript-estree@4.7.0": version "4.7.0" @@ -3377,13 +3363,19 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/visitor-keys@4.6.1": - version "4.6.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.6.1.tgz#6b125883402d8939df7b54528d879e88f7ba3614" - integrity sha512-owABze4toX7QXwOLT3/D5a8NecZEjEWU1srqxENTfqsY3bwVnl3YYbOh6s1rp2wQKO9RTHFGjKes08FgE7SVMw== +"@typescript-eslint/typescript-estree@4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.8.0.tgz#b5160588495f18b739003b6078309b76fece0c55" + integrity sha512-jEdeERN8DIs7S8PlTdI7Sdy63Caxg2VtR21/RV7Z1Dtixiq/QEFSPrDXggMXKNOPPlrtMS+eCz7d7NV0HWLFVg== dependencies: - "@typescript-eslint/types" "4.6.1" - eslint-visitor-keys "^2.0.0" + "@typescript-eslint/types" "4.8.0" + "@typescript-eslint/visitor-keys" "4.8.0" + debug "^4.1.1" + globby "^11.0.1" + is-glob "^4.0.1" + lodash "^4.17.15" + semver "^7.3.2" + tsutils "^3.17.1" "@typescript-eslint/visitor-keys@4.7.0": version "4.7.0" @@ -3393,6 +3385,14 @@ "@typescript-eslint/types" "4.7.0" eslint-visitor-keys "^2.0.0" +"@typescript-eslint/visitor-keys@4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.8.0.tgz#7786b92bbaf25c6aa9fb860eb8dbb1f7d3b7d0ad" + integrity sha512-JluNZLvnkRUr0h3L6MnQVLuy2rw9DpD0OyMC21FVbgcezr0LQkbBjDp9kyKZhuZrLrtq4mwPiIkpfRb8IRqneA== + dependencies: + "@typescript-eslint/types" "4.8.0" + eslint-visitor-keys "^2.0.0" + "@yarnpkg/lockfile@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" @@ -3877,10 +3877,10 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" -aws-sdk@^2.637.0, aws-sdk@^2.789.0: - version "2.789.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.789.0.tgz#a1b0a8b8b4227a7947c04e8d75239ba27d2deb93" - integrity sha512-Jqq+M4N0EgkyS4OPf05UHa7IWUcpuBdnpwMRgBnu4Ju6PxpOTh1UQcmYepVmIN3m6YVpLwFctEYzAMJFM3LT1A== +aws-sdk@^2.637.0, aws-sdk@^2.792.0: + version "2.792.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.792.0.tgz#d124a6074244a4675e0416887734e8f6934bdd30" + integrity sha512-h7oSlrCDtZkW5qNw/idKmMjjNJaaPlXFY+NbqtaTjejpCyVuIonUmFvm8GW16V58Avj/hujJfhpX9q0BMCg+VQ== dependencies: buffer "4.9.2" events "1.1.1" @@ -6345,10 +6345,10 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== -eslint@^7.12.1: - version "7.12.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.12.1.tgz#bd9a81fa67a6cfd51656cdb88812ce49ccec5801" - integrity sha512-HlMTEdr/LicJfN08LB3nM1rRYliDXOmfoO4vj39xN6BLpFzF00hbwBoqHk8UcJ2M/3nlARZWy/mslvGEuZFvsg== +eslint@^7.13.0: + version "7.13.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.13.0.tgz#7f180126c0dcdef327bfb54b211d7802decc08da" + integrity sha512-uCORMuOO8tUzJmsdRtrvcGq5qposf7Rw0LwkTJkoDbOycVQtQjmnhZSuLQnozLE4TmAzlMVV45eCHmQ1OpDKUQ== dependencies: "@babel/code-frame" "^7.0.0" "@eslint/eslintrc" "^0.2.1" @@ -6585,12 +6585,12 @@ extsprintf@^1.2.0: resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= -fast-check@^2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-2.6.1.tgz#c9ff58b69c2eee872588985d8b93424c84359a6e" - integrity sha512-CauHEKfAjgAFpNDpFqSccu7C5kOlifCNfRxMjzY76MaAaH7ddkqqEzRE2Vm5bjpHJpndD0iVXiZC+d1rYzv5qg== +fast-check@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-2.7.0.tgz#d935243a43bc5e8ac4724ee2cb6c109533e8fd85" + integrity sha512-+frnWpxp43Egnx2wuqRVrbHj1YXpHRwLle6lhKJODnu7uH0krGjNRlUo+1oioKULA5jgQ6I6ctTrqFuaw4gZFA== dependencies: - pure-rand "^3.0.0" + pure-rand "^4.0.0" fast-deep-equal@^2.0.1: version "2.0.1" @@ -8707,7 +8707,7 @@ jest-worker@^26.6.2: merge-stream "^2.0.0" supports-color "^7.0.0" -jest@^26.6.2, jest@^26.6.3: +jest@^26.6.3: version "26.6.3" resolved "https://registry.yarnpkg.com/jest/-/jest-26.6.3.tgz#40e8fdbe48f00dfa1f0ce8121ca74b88ac9148ef" integrity sha512-lGS5PXGAzR4RF7V5+XObhqz2KZIDUA1yD0DG6pBVmy10eh0ZIXQImRuzocsI/N2XZ1GrLFwTS27In2i2jlpq1Q== @@ -10079,7 +10079,7 @@ normalize-url@^3.0.0, normalize-url@^3.3.0: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg== -npm-bundled@^1.0.1: +npm-bundled@^1.0.1, npm-bundled@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.1.tgz#1edd570865a94cdb1bc8220775e29466c9fb234b" integrity sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA== @@ -10622,19 +10622,19 @@ parallel-transform@^1.1.0: inherits "^2.0.3" readable-stream "^2.1.5" -parcel@2.0.0-nightly.443: - version "2.0.0-nightly.443" - resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.0.0-nightly.443.tgz#40f709a86acf1a6c44db6dd60ef3e9006abe3fb1" - integrity sha512-teFdXNFYWh77eBc86RVHdeKTUJch+mU51/2r2Djn75qqXglgxG5gSn613Ul52YxEjaRjI7MeZzqtY5EeaAaJTA== - dependencies: - "@parcel/config-default" "2.0.0-nightly.445+adb92ee0" - "@parcel/core" "2.0.0-nightly.443+adb92ee0" - "@parcel/diagnostic" "2.0.0-nightly.445+adb92ee0" - "@parcel/events" "2.0.0-nightly.445+adb92ee0" - "@parcel/fs" "2.0.0-nightly.445+adb92ee0" - "@parcel/logger" "2.0.0-nightly.445+adb92ee0" - "@parcel/package-manager" "2.0.0-nightly.445+adb92ee0" - "@parcel/utils" "2.0.0-nightly.445+adb92ee0" +parcel@2.0.0-nightly.447: + version "2.0.0-nightly.447" + resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.0.0-nightly.447.tgz#325e4f3797fe68d2e416ddfb9acbe80e818130a9" + integrity sha512-ZxUeUq+fudKskOXEpKKQCWgFRT1Y8b28AGes1Cd2uSgiioM5zhXC/5Jlu0W2QFTrPzt2TrUlU9ioFPV04T9Pgw== + dependencies: + "@parcel/config-default" "2.0.0-nightly.449+837d1fbd" + "@parcel/core" "2.0.0-nightly.447+837d1fbd" + "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" + "@parcel/events" "2.0.0-nightly.449+837d1fbd" + "@parcel/fs" "2.0.0-nightly.449+837d1fbd" + "@parcel/logger" "2.0.0-nightly.449+837d1fbd" + "@parcel/package-manager" "2.0.0-nightly.449+837d1fbd" + "@parcel/utils" "2.0.0-nightly.449+837d1fbd" chalk "^2.1.0" commander "^2.19.0" get-port "^4.2.0" @@ -11507,10 +11507,10 @@ punycode@^2.0.0, punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -pure-rand@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-3.1.0.tgz#646b812635cbac86105c46b0b03aa5dac1c759b3" - integrity sha512-xkCSMNjEnLG/A8iTH9M5ayXN4SCWRP+ih3rxi09Q7Fu0b9jAP6V9H59pOtcB37IsVt3eHxf1FMy9n7YrqdDdSA== +pure-rand@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-4.0.0.tgz#df8f44bc1b82c4f3d0e245e8f7ced6f09c1e9dc4" + integrity sha512-5+HGyGi+6VygEcP1O4jMj0c5HyFgsP9lEy2uA4c+KBq84y21hpmv85wAzPZ/H+q1TUbP3mIMZhqFg08/HAOUqw== purgecss@^2.3.0: version "2.3.0" @@ -14129,10 +14129,10 @@ y18n@^4.0.0: resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== -y18n@^5.0.2: - version "5.0.4" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.4.tgz#0ab2db89dd5873b5ec4682d8e703e833373ea897" - integrity sha512-deLOfD+RvFgrpAmSZgfGdWYE+OKyHcVHaRQ7NphG/63scpRvTHHeQMAxGGvaLVGJ+HYVcCXlzcTK0ZehFf+eHQ== +y18n@^5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.5.tgz#8769ec08d03b1ea2df2500acef561743bbb9ab18" + integrity sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg== yallist@^2.1.2: version "2.1.2" @@ -14243,17 +14243,17 @@ yargs@^15.0.2, yargs@^15.3.1, yargs@^15.4.1: y18n "^4.0.0" yargs-parser "^18.1.2" -yargs@^16.0.3, yargs@^16.1.0: - version "16.1.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.1.0.tgz#fc333fe4791660eace5a894b39d42f851cd48f2a" - integrity sha512-upWFJOmDdHN0syLuESuvXDmrRcWd1QafJolHskzaw79uZa7/x53gxQKiR07W59GWY1tFhhU/Th9DrtSfpS782g== +yargs@^16.0.3, yargs@^16.1.0, yargs@^16.1.1: + version "16.1.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.1.1.tgz#5a4a095bd1ca806b0a50d0c03611d38034d219a1" + integrity sha512-hAD1RcFP/wfgfxgMVswPE+z3tlPFtxG8/yWUrG2i17sTWGCGqWnxKcLTF4cUKDUK8fzokwsmO9H0TDkRbMHy8w== dependencies: cliui "^7.0.2" escalade "^3.1.1" get-caller-file "^2.0.5" require-directory "^2.1.1" string-width "^4.2.0" - y18n "^5.0.2" + y18n "^5.0.5" yargs-parser "^20.2.2" yn@3.1.1: From c4fdc1fd4e87466ccc758838346c57d2fb0f8fec Mon Sep 17 00:00:00 2001 From: Colin Duggan Date: Tue, 17 Nov 2020 11:22:51 +0000 Subject: [PATCH 151/314] docs(apigateway): Augment API docs for LambdaIntegrationOptions proxy flag (#11400) Setting the proxy flag for LambdaIntegrationOptions circumvents the need for an integration response. However a common mistake is to omit HTTP Headers from backend lambda services when enabling Cors or returning JSON. This PR includes a link to the AWS Developer guide which highlights it is the responsibility of the backend service to return these HTTP headers. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-apigateway/lib/integrations/lambda.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/@aws-cdk/aws-apigateway/lib/integrations/lambda.ts b/packages/@aws-cdk/aws-apigateway/lib/integrations/lambda.ts index e0d6953707e82..895b36323f1d7 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/integrations/lambda.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/integrations/lambda.ts @@ -8,6 +8,8 @@ import { AwsIntegration } from './aws'; export interface LambdaIntegrationOptions extends IntegrationOptions { /** * Use proxy integration or normal (request/response mapping) integration. + * @see https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html#api-gateway-simple-proxy-for-lambda-output-format + * * @default true */ readonly proxy?: boolean; From 8cdc37cb532ae5b56fdeadce7af8be7991ae6299 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 17 Nov 2020 14:11:34 +0000 Subject: [PATCH 152/314] chore(deps): bump aws-sdk from 2.792.0 to 2.793.0 (#11499) Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.792.0 to 2.793.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.792.0...v2.793.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/aws-cloudfront-origins/package.json | 2 +- packages/@aws-cdk/aws-cloudfront/package.json | 2 +- packages/@aws-cdk/aws-cloudtrail/package.json | 2 +- packages/@aws-cdk/aws-codebuild/package.json | 2 +- packages/@aws-cdk/aws-codecommit/package.json | 2 +- packages/@aws-cdk/aws-dynamodb/package.json | 2 +- packages/@aws-cdk/aws-eks/package.json | 2 +- packages/@aws-cdk/aws-events-targets/package.json | 2 +- packages/@aws-cdk/aws-logs/package.json | 2 +- packages/@aws-cdk/aws-route53/package.json | 2 +- packages/@aws-cdk/aws-sqs/package.json | 2 +- packages/@aws-cdk/custom-resources/package.json | 2 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- yarn.lock | 8 ++++---- 15 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudfront-origins/package.json b/packages/@aws-cdk/aws-cloudfront-origins/package.json index 8d8b0c2b4d64f..dd2c547f76039 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/package.json +++ b/packages/@aws-cdk/aws-cloudfront-origins/package.json @@ -72,7 +72,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", - "aws-sdk": "^2.792.0", + "aws-sdk": "^2.793.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "pkglint": "0.0.0" diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index 7a1649e201239..499116431f544 100644 --- a/packages/@aws-cdk/aws-cloudfront/package.json +++ b/packages/@aws-cdk/aws-cloudfront/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.792.0", + "aws-sdk": "^2.793.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index 462a90b482570..3c7be1d126d61 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.792.0", + "aws-sdk": "^2.793.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codebuild/package.json b/packages/@aws-cdk/aws-codebuild/package.json index 93ac42962e90c..55c60875b9d4a 100644 --- a/packages/@aws-cdk/aws-codebuild/package.json +++ b/packages/@aws-cdk/aws-codebuild/package.json @@ -79,7 +79,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.792.0", + "aws-sdk": "^2.793.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codecommit/package.json b/packages/@aws-cdk/aws-codecommit/package.json index aa76ed05a103f..f2c3f949ebc9a 100644 --- a/packages/@aws-cdk/aws-codecommit/package.json +++ b/packages/@aws-cdk/aws-codecommit/package.json @@ -79,7 +79,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.792.0", + "aws-sdk": "^2.793.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index 6df9c614e864d..e5936f8fec955 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -74,7 +74,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/jest": "^26.0.15", - "aws-sdk": "^2.792.0", + "aws-sdk": "^2.793.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index 39feb03c3f7db..319fe0f3af0dc 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", "@types/yaml": "1.9.6", - "aws-sdk": "^2.792.0", + "aws-sdk": "^2.793.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index 444131100fd25..3d0a20de6c146 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -75,7 +75,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-codecommit": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", - "aws-sdk": "^2.792.0", + "aws-sdk": "^2.793.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index d3df5c52c5a63..284fb792a7ee9 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.792.0", + "aws-sdk": "^2.793.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-route53/package.json b/packages/@aws-cdk/aws-route53/package.json index 301fee1bba9fe..943e09ce94324 100644 --- a/packages/@aws-cdk/aws-route53/package.json +++ b/packages/@aws-cdk/aws-route53/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.792.0", + "aws-sdk": "^2.793.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-sqs/package.json b/packages/@aws-cdk/aws-sqs/package.json index 0a88a1730515f..32fbd11188eb7 100644 --- a/packages/@aws-cdk/aws-sqs/package.json +++ b/packages/@aws-cdk/aws-sqs/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.792.0", + "aws-sdk": "^2.793.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index 8f17efcc963b9..61e9b41c1a634 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -79,7 +79,7 @@ "@types/aws-lambda": "^8.10.64", "@types/fs-extra": "^8.1.1", "@types/sinon": "^9.0.8", - "aws-sdk": "^2.792.0", + "aws-sdk": "^2.793.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 2e8e5beea9f3d..05735a2c9dc82 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -71,7 +71,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.792.0", + "aws-sdk": "^2.793.0", "camelcase": "^6.2.0", "cdk-assets": "0.0.0", "colors": "^1.4.0", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index 52aadabc11688..b3a3cbea7bf39 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -47,7 +47,7 @@ "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.792.0", + "aws-sdk": "^2.793.0", "glob": "^7.1.6", "yargs": "^16.1.1" }, diff --git a/yarn.lock b/yarn.lock index d76198c99898f..f728c4651ad68 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3877,10 +3877,10 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" -aws-sdk@^2.637.0, aws-sdk@^2.792.0: - version "2.792.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.792.0.tgz#d124a6074244a4675e0416887734e8f6934bdd30" - integrity sha512-h7oSlrCDtZkW5qNw/idKmMjjNJaaPlXFY+NbqtaTjejpCyVuIonUmFvm8GW16V58Avj/hujJfhpX9q0BMCg+VQ== +aws-sdk@^2.637.0, aws-sdk@^2.793.0: + version "2.793.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.793.0.tgz#17f40a630fcbb37c6703701d73f92a2d3213e411" + integrity sha512-zBrDkYAUadS59+GVhhVT8f7medKv2FO/3sX3QDfgHt0ySUYi4umBwp3fXjoJU2oRG70IZ74Wclx4T4tynA+Gjg== dependencies: buffer "4.9.2" events "1.1.1" From 989d15f654bcf1ca5c4d2cc2e1b38a5513105e49 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 17 Nov 2020 14:53:31 +0000 Subject: [PATCH 153/314] chore(deps): bump @typescript-eslint/eslint-plugin from 4.8.0 to 4.8.1 (#11516) Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.8.0 to 4.8.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.8.1/packages/eslint-plugin) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- tools/cdk-build-tools/package.json | 2 +- yarn.lock | 68 +++++++++++++++--------------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/tools/cdk-build-tools/package.json b/tools/cdk-build-tools/package.json index c81340a9f7986..3d67efee3532a 100644 --- a/tools/cdk-build-tools/package.json +++ b/tools/cdk-build-tools/package.json @@ -39,7 +39,7 @@ "pkglint": "0.0.0" }, "dependencies": { - "@typescript-eslint/eslint-plugin": "^4.8.0", + "@typescript-eslint/eslint-plugin": "^4.8.1", "@typescript-eslint/parser": "^4.7.0", "eslint-plugin-cdk": "0.0.0", "awslint": "0.0.0", diff --git a/yarn.lock b/yarn.lock index f728c4651ad68..853cda4c94b77 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3288,28 +3288,28 @@ resolved "https://registry.yarnpkg.com/@types/yarnpkg__lockfile/-/yarnpkg__lockfile-1.1.4.tgz#445251eb00bd9c1e751f82c7c6bf4f714edfd464" integrity sha512-/emrKCfQMQmFCqRqqBJ0JueHBT06jBRM3e8OgnvDUcvuExONujIk2hFA5dNsN9Nt41ljGVDdChvCydATZ+KOZw== -"@typescript-eslint/eslint-plugin@^4.8.0": - version "4.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.8.0.tgz#ad12cba28e426b24295291ad4c43b1cdc8b9dbb1" - integrity sha512-nm80Yy5D7Ot00bomzBYodnGmGhNdePHS3iaxJ3Th0wxRWEI/6KCgbmL8PR78fF7MtT1VDcYNtY5y+YYyGlRhBg== +"@typescript-eslint/eslint-plugin@^4.8.1": + version "4.8.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.8.1.tgz#b362abe0ee478a6c6d06c14552a6497f0b480769" + integrity sha512-d7LeQ7dbUrIv5YVFNzGgaW3IQKMmnmKFneRWagRlGYOSfLJVaRbj/FrBNOBC1a3tVO+TgNq1GbHvRtg1kwL0FQ== dependencies: - "@typescript-eslint/experimental-utils" "4.8.0" - "@typescript-eslint/scope-manager" "4.8.0" + "@typescript-eslint/experimental-utils" "4.8.1" + "@typescript-eslint/scope-manager" "4.8.1" debug "^4.1.1" functional-red-black-tree "^1.0.1" regexpp "^3.0.0" semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@4.8.0": - version "4.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.8.0.tgz#ff035f917aec0698c156a6039166ecf9d7a24f57" - integrity sha512-1yOvI++HMdA9lpaAkXXQlVUwJjruNz7Z9K3lgpcU+JU/Szvsv42H6G6DECalAuz2Dd0KFU/MeUrPC0jXnuAvlA== +"@typescript-eslint/experimental-utils@4.8.1": + version "4.8.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.8.1.tgz#27275c20fa4336df99ebcf6195f7d7aa7aa9f22d" + integrity sha512-WigyLn144R3+lGATXW4nNcDJ9JlTkG8YdBWHkDlN0lC3gUGtDi7Pe3h5GPvFKMcRz8KbZpm9FJV9NTW8CpRHpg== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/scope-manager" "4.8.0" - "@typescript-eslint/types" "4.8.0" - "@typescript-eslint/typescript-estree" "4.8.0" + "@typescript-eslint/scope-manager" "4.8.1" + "@typescript-eslint/types" "4.8.1" + "@typescript-eslint/typescript-estree" "4.8.1" eslint-scope "^5.0.0" eslint-utils "^2.0.0" @@ -3331,23 +3331,23 @@ "@typescript-eslint/types" "4.7.0" "@typescript-eslint/visitor-keys" "4.7.0" -"@typescript-eslint/scope-manager@4.8.0": - version "4.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.8.0.tgz#f960b6c5df1a5b230b8488e71c5c04e58dd494e0" - integrity sha512-eJ+SV6w5WcyFusQ/Ru4A/c7E65HMGzWWGPJAqSuM/1EKEE6wOw9LUQTqAvLa6v2oIcaDo9F+/EyOPZgoD/BcLA== +"@typescript-eslint/scope-manager@4.8.1": + version "4.8.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.8.1.tgz#e343c475f8f1d15801b546cb17d7f309b768fdce" + integrity sha512-r0iUOc41KFFbZdPAdCS4K1mXivnSZqXS5D9oW+iykQsRlTbQRfuFRSW20xKDdYiaCoH+SkSLeIF484g3kWzwOQ== dependencies: - "@typescript-eslint/types" "4.8.0" - "@typescript-eslint/visitor-keys" "4.8.0" + "@typescript-eslint/types" "4.8.1" + "@typescript-eslint/visitor-keys" "4.8.1" "@typescript-eslint/types@4.7.0": version "4.7.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.7.0.tgz#5e95ef5c740f43d942542b35811f87b62fccca69" integrity sha512-uLszFe0wExJc+I7q0Z/+BnP7wao/kzX0hB5vJn4LIgrfrMLgnB2UXoReV19lkJQS1a1mHWGGODSxnBx6JQC3Sg== -"@typescript-eslint/types@4.8.0": - version "4.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.8.0.tgz#87e73883637f662d9a638b0e9b01ed77edc44fb7" - integrity sha512-2/mGmXxr3sTxCvCT1mhR2b9rbfpMEBK41tiu0lMnMtZEbpphcUyrmgt2ogDFWNvsvyyeUxO1159eDrgFb7zV4Q== +"@typescript-eslint/types@4.8.1": + version "4.8.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.8.1.tgz#23829c73c5fc6f4fcd5346a7780b274f72fee222" + integrity sha512-ave2a18x2Y25q5K05K/U3JQIe2Av4+TNi/2YuzyaXLAsDx6UZkz1boZ7nR/N6Wwae2PpudTZmHFXqu7faXfHmA== "@typescript-eslint/typescript-estree@4.7.0": version "4.7.0" @@ -3363,13 +3363,13 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/typescript-estree@4.8.0": - version "4.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.8.0.tgz#b5160588495f18b739003b6078309b76fece0c55" - integrity sha512-jEdeERN8DIs7S8PlTdI7Sdy63Caxg2VtR21/RV7Z1Dtixiq/QEFSPrDXggMXKNOPPlrtMS+eCz7d7NV0HWLFVg== +"@typescript-eslint/typescript-estree@4.8.1": + version "4.8.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.8.1.tgz#7307e3f2c9e95df7daa8dc0a34b8c43b7ec0dd32" + integrity sha512-bJ6Fn/6tW2g7WIkCWh3QRlaSU7CdUUK52shx36/J7T5oTQzANvi6raoTsbwGM11+7eBbeem8hCCKbyvAc0X3sQ== dependencies: - "@typescript-eslint/types" "4.8.0" - "@typescript-eslint/visitor-keys" "4.8.0" + "@typescript-eslint/types" "4.8.1" + "@typescript-eslint/visitor-keys" "4.8.1" debug "^4.1.1" globby "^11.0.1" is-glob "^4.0.1" @@ -3385,12 +3385,12 @@ "@typescript-eslint/types" "4.7.0" eslint-visitor-keys "^2.0.0" -"@typescript-eslint/visitor-keys@4.8.0": - version "4.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.8.0.tgz#7786b92bbaf25c6aa9fb860eb8dbb1f7d3b7d0ad" - integrity sha512-JluNZLvnkRUr0h3L6MnQVLuy2rw9DpD0OyMC21FVbgcezr0LQkbBjDp9kyKZhuZrLrtq4mwPiIkpfRb8IRqneA== +"@typescript-eslint/visitor-keys@4.8.1": + version "4.8.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.8.1.tgz#794f68ee292d1b2e3aa9690ebedfcb3a8c90e3c3" + integrity sha512-3nrwXFdEYALQh/zW8rFwP4QltqsanCDz4CwWMPiIZmwlk9GlvBeueEIbq05SEq4ganqM0g9nh02xXgv5XI3PeQ== dependencies: - "@typescript-eslint/types" "4.8.0" + "@typescript-eslint/types" "4.8.1" eslint-visitor-keys "^2.0.0" "@yarnpkg/lockfile@^1.1.0": From 9843e71219bfe8b5ca675ac322e3dc5b3ab6381c Mon Sep 17 00:00:00 2001 From: Jerry Kindall <52084730+Jerry-AWS@users.noreply.github.com> Date: Tue, 17 Nov 2020 07:51:44 -0800 Subject: [PATCH 154/314] fix(init): TypeScript code is not being recompiled automatically (#11470) The use of `npx ts-node` to run the app in the TypeScript init templates is intended to make sure the source code gets transpiled before every synth without the user needing to `npm run build` explicitly. I have had reports on the Hello World dev guide topic that an `npm run build` is still needed, even though it shouldn't be. I was able to reproduce this issue today (was not able to do so previously). The problem is that, by default, `ts-node` prefers resolving imports to JavaScript files. If a JavaScript file exists, as it would be after the first build, it is simply imported as-is. The corresponding TypeScript module is not transpiled. Therefore changes you make to the TS code are never picked up and stale JS code is used. The flag `--prefer-ts-exts` solves this issue. It causes module imports to prefer importing TypeScript files, which means that the modules will get recompiled if necessary. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-cdk/lib/init-templates/app/typescript/cdk.template.json | 2 +- .../lib/init-templates/app/typescript/package.template.json | 2 +- .../lib/init-templates/sample-app/typescript/cdk.template.json | 2 +- .../init-templates/sample-app/typescript/package.template.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/aws-cdk/lib/init-templates/app/typescript/cdk.template.json b/packages/aws-cdk/lib/init-templates/app/typescript/cdk.template.json index 8442bd8052356..4b132c728abd7 100644 --- a/packages/aws-cdk/lib/init-templates/app/typescript/cdk.template.json +++ b/packages/aws-cdk/lib/init-templates/app/typescript/cdk.template.json @@ -1,3 +1,3 @@ { - "app": "npx ts-node bin/%name%.ts" + "app": "npx ts-node --prefer-ts-exts bin/%name%.ts" } diff --git a/packages/aws-cdk/lib/init-templates/app/typescript/package.template.json b/packages/aws-cdk/lib/init-templates/app/typescript/package.template.json index 8aeb1df90f6b7..015a6d688d755 100644 --- a/packages/aws-cdk/lib/init-templates/app/typescript/package.template.json +++ b/packages/aws-cdk/lib/init-templates/app/typescript/package.template.json @@ -17,7 +17,7 @@ "jest": "^26.4.2", "ts-jest": "^26.2.0", "aws-cdk": "%cdk-version%", - "ts-node": "^8.1.0", + "ts-node": "^8.3.0", "typescript": "~3.9.7" }, "dependencies": { diff --git a/packages/aws-cdk/lib/init-templates/sample-app/typescript/cdk.template.json b/packages/aws-cdk/lib/init-templates/sample-app/typescript/cdk.template.json index 8442bd8052356..4b132c728abd7 100644 --- a/packages/aws-cdk/lib/init-templates/sample-app/typescript/cdk.template.json +++ b/packages/aws-cdk/lib/init-templates/sample-app/typescript/cdk.template.json @@ -1,3 +1,3 @@ { - "app": "npx ts-node bin/%name%.ts" + "app": "npx ts-node --prefer-ts-exts bin/%name%.ts" } diff --git a/packages/aws-cdk/lib/init-templates/sample-app/typescript/package.template.json b/packages/aws-cdk/lib/init-templates/sample-app/typescript/package.template.json index 77d515d129e3b..3f9e0309f07d1 100644 --- a/packages/aws-cdk/lib/init-templates/sample-app/typescript/package.template.json +++ b/packages/aws-cdk/lib/init-templates/sample-app/typescript/package.template.json @@ -17,7 +17,7 @@ "@types/node": "10.17.27", "jest": "^26.4.2", "ts-jest": "^26.2.0", - "ts-node": "^8.1.0", + "ts-node": "^8.3.0", "typescript": "~3.9.7" }, "dependencies": { From f17f38df0f5672445aa82f44600602fd030f56b8 Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Tue, 17 Nov 2020 16:47:34 +0000 Subject: [PATCH 155/314] chore: fix package visibility during merge forward (#11519) In v2, all packages not in an explicit allow-list need to marked as private. This causes problems in the merge-forward script, where new modules in v1 (which are public) need to be marked private for the v2 build to succeed. Running pkglint will automatically correct any `package.json` files. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- scripts/merge-forward.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/merge-forward.sh b/scripts/merge-forward.sh index 92d67a85da250..96b2a0da53586 100755 --- a/scripts/merge-forward.sh +++ b/scripts/merge-forward.sh @@ -5,4 +5,9 @@ set -exo pipefail git fetch --all git checkout -B v2-main origin/v2-main + +# Some package rules differ between v1 and v2, most notably which packages can be public vs private. +# These differences are fixable via 'pkglint', so we run that and commit the delta (if any). +lerna run pkglint && { git diff --quiet || git commit -am 'automatic pkglint fixes' } + git merge origin/master --no-edit From b08f651b59cca12a42351d67a469e8e8d607dd71 Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Tue, 17 Nov 2020 17:25:38 +0000 Subject: [PATCH 156/314] chore(pkglint): backport updates from v2 branch (#11520) A previous [commit] made a change to a couple pkglint rules on the `v2-main` branch. These can also be applied on `master` branch and can reduce merge conflicts. [commit]: https://github.com/aws/aws-cdk/commit/a367d2136c9fb7c3592b6efaed43790d14056ec4#diff-3c38ae20cded2082ff30639f70bc5805053217bea1e14b540ac5d8989bb462fb ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- tools/pkglint/lib/rules.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/pkglint/lib/rules.ts b/tools/pkglint/lib/rules.ts index 78d2bc7ec436e..79480e7995e44 100644 --- a/tools/pkglint/lib/rules.ts +++ b/tools/pkglint/lib/rules.ts @@ -1460,14 +1460,19 @@ export class JestSetup extends ValidationRule { export class UbergenPackageVisibility extends ValidationRule { public readonly name = 'ubergen/package-visibility'; + + // These include dependencies of the CDK CLI (aws-cdk). private readonly publicPackages = [ '@aws-cdk/cloud-assembly-schema', '@aws-cdk/cloudformation-diff', '@aws-cdk/cx-api', + '@aws-cdk/region-info', + '@aws-cdk/yaml-cfn', 'aws-cdk-lib', 'aws-cdk', 'awslint', 'cdk', + 'cdk-assets', ]; public validate(pkg: PackageJson): void { From 83c05431e4c254db173cd36dd564c360808ccbde Mon Sep 17 00:00:00 2001 From: Ayush Goyal Date: Wed, 18 Nov 2020 00:27:10 +0530 Subject: [PATCH 157/314] fix(stepfunctions): metric* helpers not available on imported state machines (#11509) fix(stepfunctions): metric* helpers not available on imported state machines ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-stepfunctions/lib/state-machine.ts | 213 +++++++++++------- .../test/state-machine-resources.test.ts | 26 +++ 2 files changed, 161 insertions(+), 78 deletions(-) diff --git a/packages/@aws-cdk/aws-stepfunctions/lib/state-machine.ts b/packages/@aws-cdk/aws-stepfunctions/lib/state-machine.ts index 52eecc773a3ad..55ca077bbf856 100644 --- a/packages/@aws-cdk/aws-stepfunctions/lib/state-machine.ts +++ b/packages/@aws-cdk/aws-stepfunctions/lib/state-machine.ts @@ -227,6 +227,85 @@ abstract class StateMachineBase extends Resource implements IStateMachine { }); } + + /** + * Return the given named metric for this State Machine's executions + * + * @default - sum over 5 minutes + */ + public metric(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return new cloudwatch.Metric({ + namespace: 'AWS/States', + metricName, + dimensions: { StateMachineArn: this.stateMachineArn }, + statistic: 'sum', + ...props, + }).attachTo(this); + } + + /** + * Metric for the number of executions that failed + * + * @default - sum over 5 minutes + */ + public metricFailed(props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return this.metric('ExecutionsFailed', props); + } + + /** + * Metric for the number of executions that were throttled + * + * @default - sum over 5 minutes + */ + public metricThrottled(props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return this.metric('ExecutionThrottled', props); + } + + /** + * Metric for the number of executions that were aborted + * + * @default - sum over 5 minutes + */ + public metricAborted(props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return this.metric('ExecutionsAborted', props); + } + + /** + * Metric for the number of executions that succeeded + * + * @default - sum over 5 minutes + */ + public metricSucceeded(props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return this.metric('ExecutionsSucceeded', props); + } + + /** + * Metric for the number of executions that timed out + * + * @default - sum over 5 minutes + */ + public metricTimedOut(props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return this.metric('ExecutionsTimedOut', props); + } + + /** + * Metric for the number of executions that were started + * + * @default - sum over 5 minutes + */ + public metricStarted(props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return this.metric('ExecutionsStarted', props); + } + + /** + * Metric for the interval, in milliseconds, between the time the execution starts and the time it closes + * + * @default - sum over 5 minutes + */ + public metricTime(props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return this.metric('ExecutionTime', props); + } + /** * Returns the pattern for the execution ARN's of the state machine */ @@ -311,84 +390,6 @@ export class StateMachine extends StateMachineBase { this.role.addToPrincipalPolicy(statement); } - /** - * Return the given named metric for this State Machine's executions - * - * @default sum over 5 minutes - */ - public metric(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return new cloudwatch.Metric({ - namespace: 'AWS/States', - metricName, - dimensions: { StateMachineArn: this.stateMachineArn }, - statistic: 'sum', - ...props, - }).attachTo(this); - } - - /** - * Metric for the number of executions that failed - * - * @default sum over 5 minutes - */ - public metricFailed(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('ExecutionsFailed', props); - } - - /** - * Metric for the number of executions that were throttled - * - * @default sum over 5 minutes - */ - public metricThrottled(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('ExecutionThrottled', props); - } - - /** - * Metric for the number of executions that were aborted - * - * @default sum over 5 minutes - */ - public metricAborted(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('ExecutionsAborted', props); - } - - /** - * Metric for the number of executions that succeeded - * - * @default sum over 5 minutes - */ - public metricSucceeded(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('ExecutionsSucceeded', props); - } - - /** - * Metric for the number of executions that timed out - * - * @default sum over 5 minutes - */ - public metricTimedOut(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('ExecutionsTimedOut', props); - } - - /** - * Metric for the number of executions that were started - * - * @default sum over 5 minutes - */ - public metricStarted(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('ExecutionsStarted', props); - } - - /** - * Metric for the interval, in milliseconds, between the time the execution starts and the time it closes - * - * @default sum over 5 minutes - */ - public metricTime(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('ExecutionTime', props); - } - private buildLoggingConfiguration(logOptions: LogOptions): CfnStateMachine.LoggingConfigurationProperty { // https://docs.aws.amazon.com/step-functions/latest/dg/cw-logs.html#cloudwatch-iam-policy this.addToRolePolicy(new iam.PolicyStatement({ @@ -481,4 +482,60 @@ export interface IStateMachine extends IResource { * @param actions The list of desired actions */ grant(identity: iam.IGrantable, ...actions: string[]): iam.Grant; + + /** + * Return the given named metric for this State Machine's executions + * + * @default - sum over 5 minutes + */ + metric(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric; + + /** + * Metric for the number of executions that failed + * + * @default - sum over 5 minutes + */ + metricFailed(props?: cloudwatch.MetricOptions): cloudwatch.Metric; + + /** + * Metric for the number of executions that were throttled + * + * @default sum over 5 minutes + */ + metricThrottled(props?: cloudwatch.MetricOptions): cloudwatch.Metric; + + /** + * Metric for the number of executions that were aborted + * + * @default - sum over 5 minutes + */ + metricAborted(props?: cloudwatch.MetricOptions): cloudwatch.Metric; + + /** + * Metric for the number of executions that succeeded + * + * @default - sum over 5 minutes + */ + metricSucceeded(props?: cloudwatch.MetricOptions): cloudwatch.Metric; + + /** + * Metric for the number of executions that timed out + * + * @default - sum over 5 minutes + */ + metricTimedOut(props?: cloudwatch.MetricOptions): cloudwatch.Metric; + + /** + * Metric for the number of executions that were started + * + * @default - sum over 5 minutes + */ + metricStarted(props?: cloudwatch.MetricOptions): cloudwatch.Metric; + + /** + * Metric for the interval, in milliseconds, between the time the execution starts and the time it closes + * + * @default - sum over 5 minutes + */ + metricTime(props?: cloudwatch.MetricOptions): cloudwatch.Metric; } diff --git a/packages/@aws-cdk/aws-stepfunctions/test/state-machine-resources.test.ts b/packages/@aws-cdk/aws-stepfunctions/test/state-machine-resources.test.ts index 5bba34c97cf66..08bc9d1ae4a63 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/state-machine-resources.test.ts +++ b/packages/@aws-cdk/aws-stepfunctions/test/state-machine-resources.test.ts @@ -1,5 +1,6 @@ import { arrayWith, objectLike, ResourcePart } from '@aws-cdk/assert'; import '@aws-cdk/assert/jest'; +import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; import * as iam from '@aws-cdk/aws-iam'; import * as cdk from '@aws-cdk/core'; import * as stepfunctions from '../lib'; @@ -587,6 +588,31 @@ describe('State Machine Resources', () => { }); }), + test('Imported state machine can provide metrics', () => { + // GIVEN + const stack = new cdk.Stack(); + const stateMachineArn = 'arn:aws:states:us-east-1:123456789012:stateMachine:my-state-machine'; + const stateMachine = stepfunctions.StateMachine.fromStateMachineArn(stack, 'StateMachine', stateMachineArn); + const color = '#00ff00'; + + // WHEN + const metrics = new Array(); + metrics.push(stateMachine.metricAborted({ color })); + metrics.push(stateMachine.metricFailed({ color })); + metrics.push(stateMachine.metricStarted({ color })); + metrics.push(stateMachine.metricSucceeded({ color })); + metrics.push(stateMachine.metricThrottled({ color })); + metrics.push(stateMachine.metricTime({ color })); + metrics.push(stateMachine.metricTimedOut({ color })); + + // THEN + for (const metric of metrics) { + expect(metric.namespace).toEqual('AWS/States'); + expect(metric.dimensions).toEqual({ StateMachineArn: stateMachineArn }); + expect(metric.color).toEqual(color); + } + }), + test('Pass should render InputPath / Parameters / OutputPath correctly', () => { // GIVEN const stack = new cdk.Stack(); From 58cef606cb4993db57d2bb614cd0b912003b4807 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 17 Nov 2020 20:01:57 +0000 Subject: [PATCH 158/314] chore(deps): bump aws-sdk from 2.793.0 to 2.794.0 (#11527) Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.793.0 to 2.794.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.793.0...v2.794.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/aws-cloudfront-origins/package.json | 2 +- packages/@aws-cdk/aws-cloudfront/package.json | 2 +- packages/@aws-cdk/aws-cloudtrail/package.json | 2 +- packages/@aws-cdk/aws-codebuild/package.json | 2 +- packages/@aws-cdk/aws-codecommit/package.json | 2 +- packages/@aws-cdk/aws-dynamodb/package.json | 2 +- packages/@aws-cdk/aws-eks/package.json | 2 +- packages/@aws-cdk/aws-events-targets/package.json | 2 +- packages/@aws-cdk/aws-logs/package.json | 2 +- packages/@aws-cdk/aws-route53/package.json | 2 +- packages/@aws-cdk/aws-sqs/package.json | 2 +- packages/@aws-cdk/custom-resources/package.json | 2 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- yarn.lock | 8 ++++---- 15 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudfront-origins/package.json b/packages/@aws-cdk/aws-cloudfront-origins/package.json index dd2c547f76039..dd5e28ec3d8e1 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/package.json +++ b/packages/@aws-cdk/aws-cloudfront-origins/package.json @@ -72,7 +72,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", - "aws-sdk": "^2.793.0", + "aws-sdk": "^2.794.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "pkglint": "0.0.0" diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index 499116431f544..aed89c78a0d06 100644 --- a/packages/@aws-cdk/aws-cloudfront/package.json +++ b/packages/@aws-cdk/aws-cloudfront/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.793.0", + "aws-sdk": "^2.794.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index 3c7be1d126d61..3161797ed505d 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.793.0", + "aws-sdk": "^2.794.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codebuild/package.json b/packages/@aws-cdk/aws-codebuild/package.json index 55c60875b9d4a..2ee822f548bfb 100644 --- a/packages/@aws-cdk/aws-codebuild/package.json +++ b/packages/@aws-cdk/aws-codebuild/package.json @@ -79,7 +79,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.793.0", + "aws-sdk": "^2.794.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codecommit/package.json b/packages/@aws-cdk/aws-codecommit/package.json index f2c3f949ebc9a..529806bbf8398 100644 --- a/packages/@aws-cdk/aws-codecommit/package.json +++ b/packages/@aws-cdk/aws-codecommit/package.json @@ -79,7 +79,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.793.0", + "aws-sdk": "^2.794.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index e5936f8fec955..d5d315f8afcfa 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -74,7 +74,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/jest": "^26.0.15", - "aws-sdk": "^2.793.0", + "aws-sdk": "^2.794.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index 319fe0f3af0dc..f98d484eb13bc 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", "@types/yaml": "1.9.6", - "aws-sdk": "^2.793.0", + "aws-sdk": "^2.794.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index 3d0a20de6c146..3e24b278048a6 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -75,7 +75,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-codecommit": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", - "aws-sdk": "^2.793.0", + "aws-sdk": "^2.794.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index 284fb792a7ee9..7d8dcc3ee2b74 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.793.0", + "aws-sdk": "^2.794.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-route53/package.json b/packages/@aws-cdk/aws-route53/package.json index 943e09ce94324..96775788cd901 100644 --- a/packages/@aws-cdk/aws-route53/package.json +++ b/packages/@aws-cdk/aws-route53/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.793.0", + "aws-sdk": "^2.794.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-sqs/package.json b/packages/@aws-cdk/aws-sqs/package.json index 32fbd11188eb7..6ae52400a41e6 100644 --- a/packages/@aws-cdk/aws-sqs/package.json +++ b/packages/@aws-cdk/aws-sqs/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.793.0", + "aws-sdk": "^2.794.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index 61e9b41c1a634..2637471357b7e 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -79,7 +79,7 @@ "@types/aws-lambda": "^8.10.64", "@types/fs-extra": "^8.1.1", "@types/sinon": "^9.0.8", - "aws-sdk": "^2.793.0", + "aws-sdk": "^2.794.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 05735a2c9dc82..7126d63bea2fc 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -71,7 +71,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.793.0", + "aws-sdk": "^2.794.0", "camelcase": "^6.2.0", "cdk-assets": "0.0.0", "colors": "^1.4.0", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index b3a3cbea7bf39..9bc2fd0f5ba14 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -47,7 +47,7 @@ "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.793.0", + "aws-sdk": "^2.794.0", "glob": "^7.1.6", "yargs": "^16.1.1" }, diff --git a/yarn.lock b/yarn.lock index 853cda4c94b77..a998aa6a53b8d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3877,10 +3877,10 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" -aws-sdk@^2.637.0, aws-sdk@^2.793.0: - version "2.793.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.793.0.tgz#17f40a630fcbb37c6703701d73f92a2d3213e411" - integrity sha512-zBrDkYAUadS59+GVhhVT8f7medKv2FO/3sX3QDfgHt0ySUYi4umBwp3fXjoJU2oRG70IZ74Wclx4T4tynA+Gjg== +aws-sdk@^2.637.0, aws-sdk@^2.794.0: + version "2.794.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.794.0.tgz#7eb1f2fa277a91731253c2e9fee57b6096230d15" + integrity sha512-Qqz8v0WfeGveaZTPo9+52nNUep/CTuo18OcdCwF4WrnNBv7bAxExUOwN9XkqhoxLjBDk/LuMmHGhOXRljFQgRw== dependencies: buffer "4.9.2" events "1.1.1" From 90f0b9d466772c4b049b6318c449a490ca7431d8 Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Tue, 17 Nov 2020 20:30:55 +0000 Subject: [PATCH 159/314] fix(cloudfront): origin ID exceeds undocumented 128 character limit (#11523) The CloudFront origin ID (and group origin IDs) have a 128-character limit, which may be exceeded by the auto-generated names. This fix takes the last 128 characters of the IDs to prevent deployment failures. fixes #11504 Related changes: * I noticed that the CloudFront module was still using the constructs-compat `Construct` instead of the `constructs` one. Instead of fighting the linter, I just fixed that as well. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-cloudfront/lib/distribution.ts | 6 ++- .../aws-cloudfront/test/distribution.test.ts | 40 ++++++++++++++++++- .../aws-cloudfront/test/test-origin.ts | 27 ++++++++++++- 3 files changed, 68 insertions(+), 5 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts b/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts index 43be41d7ae6bc..b3c9db91d700c 100644 --- a/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts +++ b/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts @@ -316,13 +316,15 @@ export class Distribution extends Resource implements IDistribution { } private addOrigin(origin: IOrigin, isFailoverOrigin: boolean = false): string { + const ORIGIN_ID_MAX_LENGTH = 128; + const existingOrigin = this.boundOrigins.find(boundOrigin => boundOrigin.origin === origin); if (existingOrigin) { return existingOrigin.originGroupId ?? existingOrigin.originId; } else { const originIndex = this.boundOrigins.length + 1; const scope = new CoreConstruct(this, `Origin${originIndex}`); - const originId = Names.uniqueId(scope); + const originId = Names.uniqueId(scope).slice(-ORIGIN_ID_MAX_LENGTH); const originBindConfig = origin.bind(scope, { originId }); if (!originBindConfig.failoverConfig) { this.boundOrigins.push({ origin, originId, ...originBindConfig }); @@ -331,7 +333,7 @@ export class Distribution extends Resource implements IDistribution { throw new Error('An Origin cannot use an Origin with its own failover configuration as its fallback origin!'); } const groupIndex = this.originGroups.length + 1; - const originGroupId = Names.uniqueId(new CoreConstruct(this, `OriginGroup${groupIndex}`)); + const originGroupId = Names.uniqueId(new CoreConstruct(this, `OriginGroup${groupIndex}`)).slice(-ORIGIN_ID_MAX_LENGTH); this.boundOrigins.push({ origin, originId, originGroupId, ...originBindConfig }); const failoverOriginId = this.addOrigin(originBindConfig.failoverConfig.failoverOrigin, true); diff --git a/packages/@aws-cdk/aws-cloudfront/test/distribution.test.ts b/packages/@aws-cdk/aws-cloudfront/test/distribution.test.ts index 6cba1e07295f1..fe0e218e1d407 100644 --- a/packages/@aws-cdk/aws-cloudfront/test/distribution.test.ts +++ b/packages/@aws-cdk/aws-cloudfront/test/distribution.test.ts @@ -1,11 +1,11 @@ -import { ABSENT } from '@aws-cdk/assert'; +import { ABSENT, objectLike } from '@aws-cdk/assert'; import '@aws-cdk/assert/jest'; import * as acm from '@aws-cdk/aws-certificatemanager'; import * as lambda from '@aws-cdk/aws-lambda'; import * as s3 from '@aws-cdk/aws-s3'; import { App, Duration, Stack } from '@aws-cdk/core'; import { CfnDistribution, Distribution, GeoRestriction, HttpVersion, IOrigin, LambdaEdgeEventType, PriceClass } from '../lib'; -import { defaultOrigin } from './test-origin'; +import { defaultOrigin, defaultOriginGroup } from './test-origin'; let app: App; let stack: Stack; @@ -708,3 +708,39 @@ test('escape hatches are supported', () => { }, }); }); + +describe('origin IDs', () => { + test('origin ID is limited to 128 characters', () => { + const nestedStack = new Stack(stack, 'LongNameThatWillEndUpGeneratingAUniqueNodeIdThatIsLongerThanTheOneHundredAndTwentyEightCharacterLimit'); + + new Distribution(nestedStack, 'AReallyAwesomeDistributionWithAMemorableNameThatIWillNeverForget', { + defaultBehavior: { origin: defaultOrigin() }, + }); + + expect(nestedStack).toHaveResourceLike('AWS::CloudFront::Distribution', { + DistributionConfig: { + Origins: [objectLike({ + Id: 'ngerThanTheOneHundredAndTwentyEightCharacterLimitAReallyAwesomeDistributionWithAMemorableNameThatIWillNeverForgetOrigin1D38031F9', + })], + }, + }); + }); + + test('origin group ID is limited to 128 characters', () => { + const nestedStack = new Stack(stack, 'LongNameThatWillEndUpGeneratingAUniqueNodeIdThatIsLongerThanTheOneHundredAndTwentyEightCharacterLimit'); + + new Distribution(nestedStack, 'AReallyAwesomeDistributionWithAMemorableNameThatIWillNeverForget', { + defaultBehavior: { origin: defaultOriginGroup() }, + }); + + expect(nestedStack).toHaveResourceLike('AWS::CloudFront::Distribution', { + DistributionConfig: { + OriginGroups: { + Items: [objectLike({ + Id: 'hanTheOneHundredAndTwentyEightCharacterLimitAReallyAwesomeDistributionWithAMemorableNameThatIWillNeverForgetOriginGroup1B5CE3FE6', + })], + }, + }, + }); + }); +}); diff --git a/packages/@aws-cdk/aws-cloudfront/test/test-origin.ts b/packages/@aws-cdk/aws-cloudfront/test/test-origin.ts index c39c632389e1b..1c6d3762add4f 100644 --- a/packages/@aws-cdk/aws-cloudfront/test/test-origin.ts +++ b/packages/@aws-cdk/aws-cloudfront/test/test-origin.ts @@ -1,4 +1,8 @@ -import { CfnDistribution, IOrigin, OriginBase, OriginProps, OriginProtocolPolicy } from '../lib'; +import { CfnDistribution, IOrigin, OriginBase, OriginBindConfig, OriginBindOptions, OriginProps, OriginProtocolPolicy } from '../lib'; + +// v2 - keep this import as a separate section to reduce merge conflict when forward merging with the v2 branch. +// eslint-disable-next-line +import { Construct } from '@aws-cdk/core'; /** Used for testing common Origin functionality */ export class TestOrigin extends OriginBase { @@ -8,6 +12,27 @@ export class TestOrigin extends OriginBase { } } +export class TestOriginGroup implements IOrigin { + constructor(private readonly primaryDomainName: string, private readonly secondaryDomainName: string) { } + /* eslint-disable cdk/no-core-construct */ + public bind(scope: Construct, options: OriginBindOptions): OriginBindConfig { + const primaryOrigin = new TestOrigin(this.primaryDomainName); + const secondaryOrigin = new TestOrigin(this.secondaryDomainName); + + const primaryOriginConfig = primaryOrigin.bind(scope, options); + return { + originProperty: primaryOriginConfig.originProperty, + failoverConfig: { + failoverOrigin: secondaryOrigin, + }, + }; + } +} + export function defaultOrigin(domainName?: string): IOrigin { return new TestOrigin(domainName ?? 'www.example.com'); } + +export function defaultOriginGroup(): IOrigin { + return new TestOriginGroup('www.example.com', 'foo.example.com'); +} From 3578d8434f842a5b5a7290b1d0108818cdaae0f6 Mon Sep 17 00:00:00 2001 From: Shiv Lakshminarayan Date: Tue, 17 Nov 2020 15:18:02 -0800 Subject: [PATCH 160/314] fix(efs): cannot use encryption key imported from another account (#11524) the `keyId` property supports using the ARN or the key ID. this change uses the ARN as it's more robust and allows usage of a key which is cross-account. It currently fails as the ID is looked up within the same account and not found. Closes #7641 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-efs/lib/efs-file-system.ts | 2 +- packages/@aws-cdk/aws-efs/test/efs-file-system.test.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-efs/lib/efs-file-system.ts b/packages/@aws-cdk/aws-efs/lib/efs-file-system.ts index 8572d85bf920d..e9ba1852a4006 100644 --- a/packages/@aws-cdk/aws-efs/lib/efs-file-system.ts +++ b/packages/@aws-cdk/aws-efs/lib/efs-file-system.ts @@ -244,7 +244,7 @@ export class FileSystem extends Resource implements IFileSystem { const filesystem = new CfnFileSystem(this, 'Resource', { encrypted: props.encrypted, - kmsKeyId: (props.kmsKey ? props.kmsKey.keyId : undefined), + kmsKeyId: props.kmsKey?.keyArn, lifecyclePolicies: (props.lifecyclePolicy ? [{ transitionToIa: props.lifecyclePolicy }] : undefined), performanceMode: props.performanceMode, throughputMode: props.throughputMode, diff --git a/packages/@aws-cdk/aws-efs/test/efs-file-system.test.ts b/packages/@aws-cdk/aws-efs/test/efs-file-system.test.ts index dfdb56bcc46f6..5b9f3c6539a45 100644 --- a/packages/@aws-cdk/aws-efs/test/efs-file-system.test.ts +++ b/packages/@aws-cdk/aws-efs/test/efs-file-system.test.ts @@ -70,7 +70,10 @@ test('encrypted file system is created correctly with custom KMS', () => { expectCDK(stack).to(haveResource('AWS::EFS::FileSystem', { Encrypted: true, KmsKeyId: { - Ref: 'customKeyFSDDB87C6D', + 'Fn::GetAtt': [ + 'customKeyFSDDB87C6D', + 'Arn', + ], }, })); }); From 3fbaae6a245090d2460d114d672f61f7c869d936 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 18 Nov 2020 00:25:42 +0000 Subject: [PATCH 161/314] chore(deps-dev): bump @types/node from 10.17.44 to 10.17.45 (#11530) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 10.17.44 to 10.17.45. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/core/package.json | 2 +- packages/@monocdk-experiment/assert/package.json | 2 +- packages/@monocdk-experiment/rewrite-imports/package.json | 2 +- packages/aws-cdk-lib/package.json | 2 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- packages/monocdk/package.json | 2 +- tools/eslint-plugin-cdk/package.json | 2 +- tools/nodeunit-shim/package.json | 2 +- tools/yarn-cling/package.json | 2 +- yarn.lock | 8 ++++---- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json index 3dec43079144e..5541f4fd530b1 100644 --- a/packages/@aws-cdk/core/package.json +++ b/packages/@aws-cdk/core/package.json @@ -170,7 +170,7 @@ "devDependencies": { "@types/lodash": "^4.14.165", "@types/minimatch": "^3.0.3", - "@types/node": "^10.17.44", + "@types/node": "^10.17.45", "@types/sinon": "^9.0.8", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@monocdk-experiment/assert/package.json b/packages/@monocdk-experiment/assert/package.json index d366f5c00f20b..90a03d5dc0c3c 100644 --- a/packages/@monocdk-experiment/assert/package.json +++ b/packages/@monocdk-experiment/assert/package.json @@ -35,7 +35,7 @@ "devDependencies": { "@monocdk-experiment/rewrite-imports": "0.0.0", "@types/jest": "^26.0.15", - "@types/node": "^10.17.44", + "@types/node": "^10.17.45", "cdk-build-tools": "0.0.0", "constructs": "^3.2.0", "jest": "^26.6.3", diff --git a/packages/@monocdk-experiment/rewrite-imports/package.json b/packages/@monocdk-experiment/rewrite-imports/package.json index ebd269363e9a4..4144dde3e2a18 100644 --- a/packages/@monocdk-experiment/rewrite-imports/package.json +++ b/packages/@monocdk-experiment/rewrite-imports/package.json @@ -37,7 +37,7 @@ "devDependencies": { "@types/glob": "^7.1.3", "@types/jest": "^26.0.15", - "@types/node": "^10.17.44", + "@types/node": "^10.17.45", "cdk-build-tools": "0.0.0", "pkglint": "0.0.0" }, diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index 9ab275a5198ba..1c370fb04e14f 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -265,7 +265,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "@types/fs-extra": "^8.1.1", - "@types/node": "^10.17.44", + "@types/node": "^10.17.45", "cdk-build-tools": "0.0.0", "constructs": "^3.2.0", "fs-extra": "^9.0.1", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 7126d63bea2fc..f21b67a7ad19e 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -45,7 +45,7 @@ "@types/jest": "^26.0.15", "@types/minimatch": "^3.0.3", "@types/mockery": "^1.4.29", - "@types/node": "^10.17.44", + "@types/node": "^10.17.45", "@types/promptly": "^3.0.0", "@types/semver": "^7.3.4", "@types/sinon": "^9.0.8", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index 9bc2fd0f5ba14..3abd7eb93da2a 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -35,7 +35,7 @@ "@types/jest": "^26.0.15", "@types/jszip": "^3.4.1", "@types/mock-fs": "^4.13.0", - "@types/node": "^10.17.44", + "@types/node": "^10.17.45", "@types/yargs": "^15.0.9", "cdk-build-tools": "0.0.0", "jest": "^26.6.3", diff --git a/packages/monocdk/package.json b/packages/monocdk/package.json index 7123a4b0469e8..47276c7839ec1 100644 --- a/packages/monocdk/package.json +++ b/packages/monocdk/package.json @@ -264,7 +264,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "@types/fs-extra": "^8.1.1", - "@types/node": "^10.17.44", + "@types/node": "^10.17.45", "cdk-build-tools": "0.0.0", "constructs": "^3.2.0", "fs-extra": "^9.0.1", diff --git a/tools/eslint-plugin-cdk/package.json b/tools/eslint-plugin-cdk/package.json index 9de20764c4898..8391a7f314311 100644 --- a/tools/eslint-plugin-cdk/package.json +++ b/tools/eslint-plugin-cdk/package.json @@ -15,7 +15,7 @@ "@types/eslint": "^7.2.5", "@types/fs-extra": "^8.1.1", "@types/jest": "^26.0.15", - "@types/node": "^10.17.44", + "@types/node": "^10.17.45", "eslint-plugin-rulesdir": "^0.1.0", "jest": "^26.6.3", "typescript": "~3.9.7" diff --git a/tools/nodeunit-shim/package.json b/tools/nodeunit-shim/package.json index 9019561be7df6..0f8aafa7afa8f 100644 --- a/tools/nodeunit-shim/package.json +++ b/tools/nodeunit-shim/package.json @@ -13,7 +13,7 @@ }, "devDependencies": { "@types/jest": "^26.0.15", - "@types/node": "^10.17.44", + "@types/node": "^10.17.45", "typescript": "~3.9.7" }, "dependencies": { diff --git a/tools/yarn-cling/package.json b/tools/yarn-cling/package.json index 9dbbd8dc51331..c78320196da57 100644 --- a/tools/yarn-cling/package.json +++ b/tools/yarn-cling/package.json @@ -39,7 +39,7 @@ }, "devDependencies": { "@types/jest": "^26.0.15", - "@types/node": "^10.17.44", + "@types/node": "^10.17.45", "@types/yarnpkg__lockfile": "^1.1.4", "jest": "^26.6.3", "pkglint": "0.0.0", diff --git a/yarn.lock b/yarn.lock index a998aa6a53b8d..9247670d70eee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3159,10 +3159,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.2.tgz#2de1ed6670439387da1c9f549a2ade2b0a799256" integrity sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA== -"@types/node@^10.17.44": - version "10.17.44" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.44.tgz#3945e6b702cb6403f22b779c8ea9e5c3f44ead40" - integrity sha512-vHPAyBX1ffLcy4fQHmDyIUMUb42gHZjPHU66nhvbMzAWJqHnySGZ6STwN3rwrnSd1FHB0DI/RWgGELgKSYRDmw== +"@types/node@^10.17.45": + version "10.17.45" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.45.tgz#62876db8db680f20f6114b9ae5683d74577d0c13" + integrity sha512-a+oe0zGtwRsSDynACia/z1e4gKPNnDhAV3G6GWY6ZNCzaujNCdKC7dE2JFkGHAlUhCRHgXNmWbh417bi9dEXBw== "@types/nodeunit@^0.0.31": version "0.0.31" From 33cc5ec63d648e3d93a51e78d396b6aee16e37ea Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 18 Nov 2020 01:10:50 +0000 Subject: [PATCH 162/314] chore(deps-dev): bump @types/yargs from 15.0.9 to 15.0.10 (#11532) Bumps [@types/yargs](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/yargs) from 15.0.9 to 15.0.10. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/yargs) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/aws-cdk/package.json | 2 +- packages/awslint/package.json | 2 +- packages/cdk-assets/package.json | 2 +- packages/decdk/package.json | 2 +- tools/cdk-build-tools/package.json | 2 +- tools/cdk-integ-tools/package.json | 2 +- tools/cfn2ts/package.json | 2 +- tools/pkglint/package.json | 2 +- tools/pkgtools/package.json | 2 +- yarn.lock | 15 ++++----------- 10 files changed, 13 insertions(+), 20 deletions(-) diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index f21b67a7ad19e..14c6de394a88f 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -52,7 +52,7 @@ "@types/table": "^5.0.0", "@types/uuid": "^8.3.0", "@types/wrap-ansi": "^3.0.0", - "@types/yargs": "^15.0.9", + "@types/yargs": "^15.0.10", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "jest": "^26.6.3", diff --git a/packages/awslint/package.json b/packages/awslint/package.json index 393013289819a..080ea907c06ea 100644 --- a/packages/awslint/package.json +++ b/packages/awslint/package.json @@ -25,7 +25,7 @@ }, "devDependencies": { "@types/fs-extra": "^8.1.1", - "@types/yargs": "^15.0.9", + "@types/yargs": "^15.0.10", "pkglint": "0.0.0", "typescript": "~3.9.7" }, diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index 3abd7eb93da2a..573bd90db27d5 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -36,7 +36,7 @@ "@types/jszip": "^3.4.1", "@types/mock-fs": "^4.13.0", "@types/node": "^10.17.45", - "@types/yargs": "^15.0.9", + "@types/yargs": "^15.0.10", "cdk-build-tools": "0.0.0", "jest": "^26.6.3", "jszip": "^3.5.0", diff --git a/packages/decdk/package.json b/packages/decdk/package.json index 29d9c38d5bedf..f7ff60585e9cd 100644 --- a/packages/decdk/package.json +++ b/packages/decdk/package.json @@ -202,7 +202,7 @@ "@types/fs-extra": "^8.1.1", "@types/jest": "^26.0.15", "@types/yaml": "1.9.7", - "@types/yargs": "^15.0.9", + "@types/yargs": "^15.0.10", "jest": "^26.6.3", "jsii": "^1.14.1" }, diff --git a/tools/cdk-build-tools/package.json b/tools/cdk-build-tools/package.json index 3d67efee3532a..f47c4c8e1bb91 100644 --- a/tools/cdk-build-tools/package.json +++ b/tools/cdk-build-tools/package.json @@ -35,7 +35,7 @@ "devDependencies": { "@types/fs-extra": "^8.1.1", "@types/jest": "^26.0.15", - "@types/yargs": "^15.0.9", + "@types/yargs": "^15.0.10", "pkglint": "0.0.0" }, "dependencies": { diff --git a/tools/cdk-integ-tools/package.json b/tools/cdk-integ-tools/package.json index fae89fa59d2a9..150ffb66dba19 100644 --- a/tools/cdk-integ-tools/package.json +++ b/tools/cdk-integ-tools/package.json @@ -30,7 +30,7 @@ "license": "Apache-2.0", "devDependencies": { "@types/fs-extra": "^8.1.1", - "@types/yargs": "^15.0.9", + "@types/yargs": "^15.0.10", "cdk-build-tools": "0.0.0", "pkglint": "0.0.0" }, diff --git a/tools/cfn2ts/package.json b/tools/cfn2ts/package.json index 6343ce98a7de5..7af8f556c615d 100644 --- a/tools/cfn2ts/package.json +++ b/tools/cfn2ts/package.json @@ -38,7 +38,7 @@ "devDependencies": { "@types/fs-extra": "^8.1.1", "@types/jest": "^26.0.15", - "@types/yargs": "^15.0.9", + "@types/yargs": "^15.0.10", "cdk-build-tools": "0.0.0", "jest": "^26.6.3", "pkglint": "0.0.0" diff --git a/tools/pkglint/package.json b/tools/pkglint/package.json index 4c387a03ea16d..59d5137c9e75a 100644 --- a/tools/pkglint/package.json +++ b/tools/pkglint/package.json @@ -37,7 +37,7 @@ "devDependencies": { "@types/fs-extra": "^8.1.1", "@types/semver": "^7.3.4", - "@types/yargs": "^15.0.9", + "@types/yargs": "^15.0.10", "eslint-plugin-cdk": "0.0.0", "jest": "^26.6.3", "typescript": "~3.9.7" diff --git a/tools/pkgtools/package.json b/tools/pkgtools/package.json index 278d8531c2375..056c886e1b4c9 100644 --- a/tools/pkgtools/package.json +++ b/tools/pkgtools/package.json @@ -30,7 +30,7 @@ "license": "Apache-2.0", "devDependencies": { "@types/fs-extra": "^8.1.1", - "@types/yargs": "^15.0.9", + "@types/yargs": "^15.0.10", "cdk-build-tools": "0.0.0", "pkglint": "0.0.0" }, diff --git a/yarn.lock b/yarn.lock index 9247670d70eee..64bb91d8baa2c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3269,17 +3269,10 @@ resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-15.0.0.tgz#cb3f9f741869e20cce330ffbeb9271590483882d" integrity sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw== -"@types/yargs@^15.0.0": - version "15.0.7" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.7.tgz#dad50a7a234a35ef9460737a56024287a3de1d2b" - integrity sha512-Gf4u3EjaPNcC9cTu4/j2oN14nSVhr8PQ+BvBcBQHAhDZfl0bVIiLgvnRXv/dn58XhTm9UXvBpvJpDlwV65QxOA== - dependencies: - "@types/yargs-parser" "*" - -"@types/yargs@^15.0.9": - version "15.0.9" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.9.tgz#524cd7998fe810cdb02f26101b699cccd156ff19" - integrity sha512-HmU8SeIRhZCWcnRskCs36Q1Q00KBV6Cqh/ora8WN1+22dY07AZdn6Gel8QZ3t26XYPImtcL8WV/eqjhVmMEw4g== +"@types/yargs@^15.0.0", "@types/yargs@^15.0.10": + version "15.0.10" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.10.tgz#0fe3c8173a0d5c3e780b389050140c3f5ea6ea74" + integrity sha512-z8PNtlhrj7eJNLmrAivM7rjBESG6JwC5xP3RVk12i/8HVP7Xnx/sEmERnRImyEuUaJfO942X0qMOYsoupaJbZQ== dependencies: "@types/yargs-parser" "*" From 32b1e19132d2b0fdfb0adbdb616adb360552e173 Mon Sep 17 00:00:00 2001 From: Hsing-Hui Hsu Date: Tue, 17 Nov 2020 17:30:25 -0800 Subject: [PATCH 163/314] Update packages/@aws-cdk/aws-ecs/lib/environment-file.ts --- packages/@aws-cdk/aws-ecs/lib/environment-file.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-ecs/lib/environment-file.ts b/packages/@aws-cdk/aws-ecs/lib/environment-file.ts index fee1dabf18562..0a5c8bb9de9cb 100644 --- a/packages/@aws-cdk/aws-ecs/lib/environment-file.ts +++ b/packages/@aws-cdk/aws-ecs/lib/environment-file.ts @@ -3,7 +3,7 @@ import { Asset, AssetOptions } from '@aws-cdk/aws-s3-assets'; import { Construct } from '@aws-cdk/core'; /** - * Constructs for types of environment filess + * Constructs for types of environment files */ export abstract class EnvironmentFile { /** @@ -125,4 +125,4 @@ export enum EnvironmentFileType { * Environment file hosted on S3, referenced by object ARN */ S3 = 's3', -} \ No newline at end of file +} From 0a8971c7112735eb70f04633411f3557d2412ff0 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Wed, 18 Nov 2020 07:36:15 +0100 Subject: [PATCH 164/314] fix(iam): attach policy to imported User (#11493) It was not possible to attach policies to imported `User` objects. This can be made to work though, as the underlying CloudFormation resource allows doing so. Make this work in the class library. Fixes #10913, closes #11046, closes #10527. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-iam/lib/user.ts | 6 ++- packages/@aws-cdk/aws-iam/test/user.test.ts | 60 ++++++++++++++++++++- 2 files changed, 63 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/aws-iam/lib/user.ts b/packages/@aws-cdk/aws-iam/lib/user.ts index aec5bf735c0ad..c6c0799d2bc8d 100644 --- a/packages/@aws-cdk/aws-iam/lib/user.ts +++ b/packages/@aws-cdk/aws-iam/lib/user.ts @@ -145,6 +145,7 @@ export class User extends Resource implements IIdentity, IUser { public readonly userArn: string = arn; public readonly assumeRoleAction: string = 'sts:AssumeRole'; public readonly policyFragment: PrincipalPolicyFragment = new ArnPrincipal(arn).policyFragment; + private readonly attachedPolicies = new AttachedPolicies(); private defaultPolicy?: Policy; public addToPolicy(statement: PolicyStatement): boolean { @@ -164,8 +165,9 @@ export class User extends Resource implements IIdentity, IUser { throw new Error('Cannot add imported User to Group'); } - public attachInlinePolicy(_policy: Policy): void { - throw new Error('Cannot add inline policy to imported User'); + public attachInlinePolicy(policy: Policy): void { + this.attachedPolicies.attach(policy); + policy.attachToUser(this); } public addManagedPolicy(_policy: IManagedPolicy): void { diff --git a/packages/@aws-cdk/aws-iam/test/user.test.ts b/packages/@aws-cdk/aws-iam/test/user.test.ts index f83a4be5751df..9908eeac2c6c7 100644 --- a/packages/@aws-cdk/aws-iam/test/user.test.ts +++ b/packages/@aws-cdk/aws-iam/test/user.test.ts @@ -1,6 +1,6 @@ import '@aws-cdk/assert/jest'; import { App, SecretValue, Stack } from '@aws-cdk/core'; -import { ManagedPolicy, User } from '../lib'; +import { ManagedPolicy, Policy, PolicyStatement, User } from '../lib'; describe('IAM user', () => { test('default user', () => { @@ -93,4 +93,62 @@ describe('IAM user', () => { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::', { Ref: 'AWS::AccountId' }, ':user/MyUserName']], }); }); + + test('add to policy of imported user', () => { + // GIVEN + const stack = new Stack(); + const user = User.fromUserName(stack, 'ImportedUser', 'john'); + + // WHEN + user.addToPrincipalPolicy(new PolicyStatement({ + actions: ['aws:Use'], + resources: ['*'], + })); + + // THEN + expect(stack).toHaveResource('AWS::IAM::Policy', { + Users: ['john'], + PolicyDocument: { + Statement: [ + { + Action: 'aws:Use', + Effect: 'Allow', + Resource: '*', + }, + ], + Version: '2012-10-17', + }, + }); + }); + + test('attach policy to imported user', () => { + // GIVEN + const stack = new Stack(); + const user = User.fromUserName(stack, 'ImportedUser', 'john'); + + // WHEN + user.attachInlinePolicy(new Policy(stack, 'Policy', { + statements: [ + new PolicyStatement({ + actions: ['aws:Use'], + resources: ['*'], + }), + ], + })); + + // THEN + expect(stack).toHaveResource('AWS::IAM::Policy', { + Users: ['john'], + PolicyDocument: { + Statement: [ + { + Action: 'aws:Use', + Effect: 'Allow', + Resource: '*', + }, + ], + Version: '2012-10-17', + }, + }); + }); }); From 7a82850d8bec45f18791e269e988c5261d5238d4 Mon Sep 17 00:00:00 2001 From: Jonathan Goldwasser Date: Wed, 18 Nov 2020 11:03:14 +0100 Subject: [PATCH 165/314] feat(lambda-nodejs): esbuild bundling (#11289) Replace Parcel with esbuild for bundling. esbuild offers [impressive performances](https://esbuild.github.io/) compared to Parcel. Moreover everything can be configured via the CLI. This means that we don't need to play with the user `package.json` file anymore. Add full Windows support for local bundling. Refactor and clean-up. Closes #10286 Closes #9130 Closes #9312 Resolves #11222 BREAKING CHANGE: local bundling now requires `esbuild` to be installed. * **lambda-nodejs**: `projectRoot` has been replaced by `depsLockFilePath`. It should point to your dependency lock file (`package-lock.json` or `yarn.lock`) * **lambda-nodejs**: `parcelEnvironment` has been renamed to `bundlingEnvironment` * **lambda-nodejs**: `sourceMaps` has been renamed to `sourceMap` --- .github/workflows/yarn-upgrade.yml | 5 +- package.json | 2 - packages/@aws-cdk/aws-lambda-nodejs/README.md | 63 +- .../@aws-cdk/aws-lambda-nodejs/jest.config.js | 10 +- .../{parcel => lib}/Dockerfile | 10 +- .../aws-lambda-nodejs/lib/bundlers.ts | 193 - .../aws-lambda-nodejs/lib/bundling.ts | 381 +- .../aws-lambda-nodejs/lib/function.ts | 73 +- .../@aws-cdk/aws-lambda-nodejs/lib/index.ts | 2 +- .../lib/package-json-manager.ts | 71 - .../@aws-cdk/aws-lambda-nodejs/lib/types.ts | 104 + .../@aws-cdk/aws-lambda-nodejs/lib/util.ts | 56 +- .../@aws-cdk/aws-lambda-nodejs/package.json | 2 +- .../aws-lambda-nodejs/test/bundling.test.ts | 259 +- .../aws-lambda-nodejs/test/docker.test.ts | 25 +- .../aws-lambda-nodejs/test/function.test.ts | 20 +- .../test/integ.dependencies.expected.json | 18 +- .../test/integ.function.expected.json | 36 +- .../aws-lambda-nodejs/test/util.test.ts | 180 +- yarn.lock | 4186 ++--------------- 20 files changed, 1044 insertions(+), 4652 deletions(-) rename packages/@aws-cdk/aws-lambda-nodejs/{parcel => lib}/Dockerfile (71%) delete mode 100644 packages/@aws-cdk/aws-lambda-nodejs/lib/bundlers.ts delete mode 100644 packages/@aws-cdk/aws-lambda-nodejs/lib/package-json-manager.ts create mode 100644 packages/@aws-cdk/aws-lambda-nodejs/lib/types.ts diff --git a/.github/workflows/yarn-upgrade.yml b/.github/workflows/yarn-upgrade.yml index 1adf83480d652..586e7f2c9357a 100644 --- a/.github/workflows/yarn-upgrade.yml +++ b/.github/workflows/yarn-upgrade.yml @@ -43,7 +43,6 @@ jobs: - name: Run "ncu -u" # We special-case @types/node because we want to stay on the current major (minimum supported node release) # We special-case @types/fs-extra because the current major (9.x) is broken with @types/node >= 10 - # We special-case parcel because we are currently on a pre-release and don't want to move to nightlies # We special-case aws-sdk because of breaking changes with TS interface exports in recent minor versions - https://github.com/aws/aws-sdk-js/issues/3453 # We special-case typescript because it's not semantically versionned # We special-case constructs because we want to stay in control of the minimum compatible version @@ -51,11 +50,11 @@ jobs: # Upgrade dependencies at repository root ncu --upgrade --filter=@types/node,@types/fs-extra --target=minor ncu --upgrade --filter=typescript --target=patch - ncu --upgrade --reject=@types/node,@types/fs-extra,constructs,parcel,typescript --target=minor + ncu --upgrade --reject=@types/node,@types/fs-extra,constructs,typescript --target=minor # Upgrade all the packages lerna exec --parallel ncu -- --upgrade --filter=@types/node,@types/fs-extra --target=minor lerna exec --parallel ncu -- --upgrade --filter=typescript --target=patch - lerna exec --parallel ncu -- --upgrade --reject='@types/node,@types/fs-extra,constructs,parcel,typescript,aws-sdk,${{ steps.list-packages.outputs.list }}' --target=minor + lerna exec --parallel ncu -- --upgrade --reject='@types/node,@types/fs-extra,constructs,typescript,aws-sdk,${{ steps.list-packages.outputs.list }}' --target=minor # This will create a brand new `yarn.lock` file (this is more efficient than `yarn install && yarn upgrade`) - name: Run "yarn install --force" run: yarn install --force diff --git a/package.json b/package.json index d387f40e0394b..e3757fe3f77b9 100644 --- a/package.json +++ b/package.json @@ -59,8 +59,6 @@ "@aws-cdk/aws-ecr-assets/minimatch/**", "@aws-cdk/aws-eks/yaml", "@aws-cdk/aws-eks/yaml/**", - "@aws-cdk/aws-lambda-nodejs/parcel-bundler", - "@aws-cdk/aws-lambda-nodejs/parcel-bundler/**", "@aws-cdk/cloud-assembly-schema/jsonschema", "@aws-cdk/cloud-assembly-schema/jsonschema/**", "@aws-cdk/cloud-assembly-schema/semver", diff --git a/packages/@aws-cdk/aws-lambda-nodejs/README.md b/packages/@aws-cdk/aws-lambda-nodejs/README.md index 7b1e260e53676..2797329f7de35 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/README.md +++ b/packages/@aws-cdk/aws-lambda-nodejs/README.md @@ -28,8 +28,7 @@ up the entry file: ├── stack.my-handler.ts # exports a function named 'handler' ``` -This file is used as "entry" for [Parcel](https://parceljs.org/). This means that your code is -automatically transpiled and bundled whether it's written in JavaScript or TypeScript. +This file is used as "entry" for [esbuild](https://esbuild.github.io/). This means that your code is automatically transpiled and bundled whether it's written in JavaScript or TypeScript. Alternatively, an entry file and handler can be specified: @@ -45,11 +44,11 @@ All other properties of `lambda.Function` are supported, see also the [AWS Lambd The `NodejsFunction` construct automatically [reuses existing connections](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/node-reusing-connections.html) when working with the AWS SDK for JavaScript. Set the `awsSdkConnectionReuse` prop to `false` to disable it. -Use the `parcelEnvironment` prop to define environments variables when Parcel runs: +Use the `bundlingEnvironment` prop to define environments variables when esbuild runs: ```ts new lambda.NodejsFunction(this, 'my-handler', { - parcelEnvironment: { + bundlingEnvironment: { NODE_ENV: 'production', }, }); @@ -73,37 +72,25 @@ new lambda.NodejsFunction(this, 'my-handler', { }); ``` -This image should have Parcel installed at `/`. If you plan to use `nodeModules` it +This image should have esbuild installed globally. If you plan to use `nodeModules` it should also have `npm` or `yarn` depending on the lock file you're using. -Use the [default image provided by `@aws-cdk/aws-lambda-nodejs`](https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-lambda-nodejs/parcel/Dockerfile) +Use the [default image provided by `@aws-cdk/aws-lambda-nodejs`](https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-lambda-nodejs/lib/Dockerfile) as a source of inspiration. -### Project root -The `NodejsFunction` tries to automatically determine your project root, that is -the root of your node project. This is usually where the top level `node_modules` -folder of your project is located. When bundling in a Docker container, the -project root is used as the source (`/asset-input`) for the volume mounted in -the container. +### Lock file +The `NodejsFunction` requires a dependencies lock file (`yarn.lock` or +`package-lock.json`). When bundling in a Docker container, the path containing this +lock file is used as the source (`/asset-input`) for the volume mounted in the +container. -The following folders are considered by walking up parent folders starting from -the current working directory (order matters): -* the folder containing your `.git` folder -* the folder containing a `yarn.lock` file -* the folder containing a `package-lock.json` file -* the folder containing a `package.json` file +By default, it will try to automatically determine your project lock file. +Alternatively, you can specify the `depsLockFilePath` prop manually. In this +case you need to ensure that this path includes `entry` and any module/dependencies +used by your function. Otherwise bundling will fail. -Alternatively, you can specify the `projectRoot` prop manually. In this case you -need to ensure that this path includes `entry` and any module/dependencies used -by your function. Otherwise bundling will fail. - -### Configuring Parcel -The `NodejsFunction` construct exposes some [Parcel](https://parceljs.org/) options via properties: `minify`, `sourceMaps` and `cacheDir`. - -Parcel transpiles your code (every internal module) with [@babel/preset-env](https://babeljs.io/docs/en/babel-preset-env) and uses the -runtime version of your Lambda function as target. - -Configuring Babel with Parcel is possible via a `.babelrc` or a `babel` config in `package.json`. +### Configuring esbuild +The `NodejsFunction` construct exposes some [esbuild](https://esbuild.github.io/) options via properties: `minify`, `sourceMaps` and `target`. ### Working with modules @@ -121,10 +108,10 @@ new lambda.NodejsFunction(this, 'my-handler', { ``` #### Install modules -By default, all node modules referenced in your Lambda code will be bundled by Parcel. +By default, all node modules referenced in your Lambda code will be bundled by esbuild. Use the `nodeModules` prop to specify a list of modules that should not be bundled but instead included in the `node_modules` folder of the Lambda package. This is useful -when working with native dependencies or when Parcel fails to bundle a module. +when working with native dependencies or when esbuild fails to bundle a module. ```ts new lambda.NodejsFunction(this, 'my-handler', { @@ -133,25 +120,25 @@ new lambda.NodejsFunction(this, 'my-handler', { ``` The modules listed in `nodeModules` must be present in the `package.json`'s dependencies. The -same version will be used for installation. If a lock file is detected (`package-lock.json` or -`yarn.lock`) it will be used along with the right installer (`npm` or `yarn`). +same version will be used for installation. The lock file (`yarn.lock` or `package-lock.json`) +will be used along with the right installer (`yarn` or `npm`). ### Local bundling -If Parcel v2.0.0-beta.1 is available it will be used to bundle your code in your environment. Otherwise, +If esbuild is available it will be used to bundle your code in your environment. Otherwise, bundling will happen in a [Lambda compatible Docker container](https://hub.docker.com/r/amazon/aws-sam-cli-build-image-nodejs12.x). -For macOS the recommendend approach is to install Parcel as Docker volume performance is really poor. +For macOS the recommendend approach is to install esbuild as Docker volume performance is really poor. -Parcel v2.0.0-beta.1 can be installed with: +esbuild can be installed with: ```bash -$ npm install --save-dev --save-exact parcel@2.0.0-beta.1 +$ npm install --save-dev esbuild@0 ``` OR ```bash -$ yarn add --dev --exact parcel@2.0.0-beta.1 +$ yarn add --dev esbuild@0 ``` To force bundling in a Docker container, set the `forceDockerBundling` prop to `true`. This diff --git a/packages/@aws-cdk/aws-lambda-nodejs/jest.config.js b/packages/@aws-cdk/aws-lambda-nodejs/jest.config.js index 11cf7330b303d..54e28beb9798b 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/jest.config.js +++ b/packages/@aws-cdk/aws-lambda-nodejs/jest.config.js @@ -1,10 +1,2 @@ const baseConfig = require('cdk-build-tools/config/jest.config'); -module.exports = { - ...baseConfig, - coverageThreshold: { - global: { - ...baseConfig.coverageThreshold.global, - branches: 50, - }, - }, -}; +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-lambda-nodejs/parcel/Dockerfile b/packages/@aws-cdk/aws-lambda-nodejs/lib/Dockerfile similarity index 71% rename from packages/@aws-cdk/aws-lambda-nodejs/parcel/Dockerfile rename to packages/@aws-cdk/aws-lambda-nodejs/lib/Dockerfile index fe715c72fa8f2..1ae008af898bb 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/parcel/Dockerfile +++ b/packages/@aws-cdk/aws-lambda-nodejs/lib/Dockerfile @@ -6,10 +6,10 @@ FROM $IMAGE # Install yarn RUN npm install --global yarn@1.22.5 -# Install parcel 2 (fix the version since it's still in beta) -# install at "/" so that node_modules will be in the path for /asset-input -ARG PARCEL_VERSION=2.0.0-beta.1 -RUN cd / && npm install parcel@$PARCEL_VERSION --no-package-lock +# Install esbuild +# (unsafe-perm because esbuild has a postinstall script) +ARG ESBUILD_VERSION=0 +RUN npm install --global --unsafe-perm=true esbuild@$ESBUILD_VERSION # Ensure all users can write to npm cache RUN mkdir /tmp/npm-cache && \ @@ -22,4 +22,4 @@ RUN npm config --global set update-notifier false # create non root user and change allow execute command for non root user RUN /sbin/useradd -u 1000 user && chmod 711 / -CMD [ "parcel" ] +CMD [ "esbuild" ] diff --git a/packages/@aws-cdk/aws-lambda-nodejs/lib/bundlers.ts b/packages/@aws-cdk/aws-lambda-nodejs/lib/bundlers.ts deleted file mode 100644 index 0ba132012ddc3..0000000000000 --- a/packages/@aws-cdk/aws-lambda-nodejs/lib/bundlers.ts +++ /dev/null @@ -1,193 +0,0 @@ -import { spawnSync } from 'child_process'; -import * as os from 'os'; -import * as path from 'path'; -import { Runtime } from '@aws-cdk/aws-lambda'; -import * as cdk from '@aws-cdk/core'; -import { exec } from './util'; - -const PARCEL_VERSION = '2.0.0-beta.1'; - -interface BundlerProps { - relativeEntryPath: string; - cacheDir?: string; - environment?: { [key: string]: string }; - dependencies?: { [key: string]: string }; - installer: Installer; - lockFile?: LockFile; -} - -interface LocalBundlerProps extends BundlerProps { - projectRoot: string; -} - -/** - * Local Parcel bundler - */ -export class LocalBundler implements cdk.ILocalBundling { - public static runsLocally(resolvePath: string): boolean { - if (LocalBundler._runsLocally[resolvePath] !== undefined) { - return LocalBundler._runsLocally[resolvePath]; - } - if (os.platform() === 'win32') { // TODO: add Windows support - return false; - } - try { - const parcel = spawnSync(require.resolve('parcel', { paths: [resolvePath] }), ['--version']); - const version = parcel.stdout.toString().trim(); - LocalBundler._runsLocally[resolvePath] = new RegExp(`^${PARCEL_VERSION}`).test(version); // Cache result to avoid unnecessary spawns - if (!LocalBundler._runsLocally[resolvePath]) { - process.stderr.write(`Incorrect parcel version detected: ${version} <> ${PARCEL_VERSION}. Switching to Docker bundling.\n`); - } - return LocalBundler._runsLocally[resolvePath]; - } catch (err) { - return false; - } - } - - public static clearRunsLocallyCache(): void { // for tests - LocalBundler._runsLocally = {}; - } - - private static _runsLocally: { [key: string]: boolean } = {}; - - constructor(private readonly props: LocalBundlerProps) {} - - public tryBundle(outputDir: string) { - if (!LocalBundler.runsLocally(this.props.projectRoot)) { - return false; - } - - const localCommand = createBundlingCommand({ - projectRoot: this.props.projectRoot, - relativeEntryPath: this.props.relativeEntryPath, - cacheDir: this.props.cacheDir, - outputDir, - dependencies: this.props.dependencies, - installer: this.props.installer, - lockFile: this.props.lockFile, - bundlingEnvironment: BundlingEnvironment.LOCAL, - }); - - exec('bash', ['-c', localCommand], { - env: { ...process.env, ...this.props.environment ?? {} }, - stdio: [ // show output - 'ignore', // ignore stdio - process.stderr, // redirect stdout to stderr - 'inherit', // inherit stderr - ], - cwd: path.dirname(path.join(this.props.projectRoot, this.props.relativeEntryPath)), - }); - return true; - } -} - -interface DockerBundlerProps extends BundlerProps { - bundlingDockerImage?: cdk.BundlingDockerImage; - buildImage?: boolean; - buildArgs?: { [key: string]: string }; - runtime: Runtime; - parcelVersion?: string; -} - -/** - * Docker bundler - */ -export class DockerBundler { - public readonly bundlingOptions: cdk.BundlingOptions; - - constructor(props: DockerBundlerProps) { - const image = props.buildImage - ? props.bundlingDockerImage ?? cdk.BundlingDockerImage.fromAsset(path.join(__dirname, '../parcel'), { - buildArgs: { - ...props.buildArgs ?? {}, - IMAGE: props.runtime.bundlingDockerImage.image, - PARCEL_VERSION: props.parcelVersion ?? PARCEL_VERSION, - }, - }) - : cdk.BundlingDockerImage.fromRegistry('dummy'); // Do not build if we don't need to - - const command = createBundlingCommand({ - projectRoot: cdk.AssetStaging.BUNDLING_INPUT_DIR, // project root is mounted at /asset-input - relativeEntryPath: props.relativeEntryPath, - cacheDir: props.cacheDir, - outputDir: cdk.AssetStaging.BUNDLING_OUTPUT_DIR, - installer: props.installer, - lockFile: props.lockFile, - dependencies: props.dependencies, - bundlingEnvironment: BundlingEnvironment.DOCKER, - }); - - this.bundlingOptions = { - image, - command: ['bash', '-c', command], - environment: props.environment, - workingDirectory: path.dirname(path.join(cdk.AssetStaging.BUNDLING_INPUT_DIR, props.relativeEntryPath)).replace(/\\/g, '/'), // Always use POSIX paths in the container, - }; - } -} - -interface BundlingCommandOptions extends LocalBundlerProps { - outputDir: string; - bundlingEnvironment: BundlingEnvironment; -} - -enum BundlingEnvironment { - DOCKER = 'docker', - LOCAL = 'local', -} - -/** - * Generates bundling command - */ -function createBundlingCommand(options: BundlingCommandOptions): string { - const entryPath = path.join(options.projectRoot, options.relativeEntryPath); - const distFile = path.basename(options.relativeEntryPath).replace(/\.(jsx|tsx?)$/, '.js'); - const parcelResolvePath = options.bundlingEnvironment === BundlingEnvironment.DOCKER - ? '/' // Force using parcel installed at / in the image - : entryPath; // Look up starting from entry path - - const parcelCommand: string = chain([ - [ - `$(node -p "require.resolve(\'parcel\', { paths: ['${parcelResolvePath}'] })")`, // Parcel is not globally installed, find its "bin" - 'build', entryPath.replace(/\\/g, '/'), // Always use POSIX paths in the container - '--target', 'cdk-lambda', - '--dist-dir', options.outputDir, // Output bundle in outputDir (will have the same name as the entry) - '--no-autoinstall', - '--no-scope-hoist', - ...options.cacheDir - ? ['--cache-dir', path.join(options.projectRoot, options.cacheDir)] - : [], - ].join(' '), - // Always rename dist file to index.js because Lambda doesn't support filenames - // with multiple dots and we can end up with multiple dots when using automatic - // entry lookup - distFile !== 'index.js' ? `mv ${options.outputDir}/${distFile} ${options.outputDir}/index.js` : '', - ]); - - let depsCommand = ''; - if (options.dependencies) { - // create dummy package.json, copy lock file if any and then install - depsCommand = chain([ - `echo '${JSON.stringify({ dependencies: options.dependencies })}' > ${options.outputDir}/package.json`, - options.lockFile ? `cp ${options.projectRoot}/${options.lockFile} ${options.outputDir}/${options.lockFile}` : '', - `cd ${options.outputDir}`, - `${options.installer} install`, - ]); - } - - return chain([parcelCommand, depsCommand]); -} - -export enum Installer { - NPM = 'npm', - YARN = 'yarn', -} - -export enum LockFile { - NPM = 'package-lock.json', - YARN = 'yarn.lock' -} - -function chain(commands: string[]): string { - return commands.filter(c => !!c).join(' && '); -} diff --git a/packages/@aws-cdk/aws-lambda-nodejs/lib/bundling.ts b/packages/@aws-cdk/aws-lambda-nodejs/lib/bundling.ts index 5160904878e11..be6789a1b3226 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/lib/bundling.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/lib/bundling.ts @@ -1,232 +1,241 @@ -import * as fs from 'fs'; +import * as os from 'os'; import * as path from 'path'; -import * as lambda from '@aws-cdk/aws-lambda'; +import { AssetCode, Code, Runtime } from '@aws-cdk/aws-lambda'; import * as cdk from '@aws-cdk/core'; -import { DockerBundler, Installer, LocalBundler, LockFile } from './bundlers'; -import { PackageJsonManager } from './package-json-manager'; -import { findUp } from './util'; +import { BundlingOptions } from './types'; +import { exec, extractDependencies, findUp, getEsBuildVersion, LockFile } from './util'; + +const ESBUILD_VERSION = '0'; /** - * Base options for Parcel bundling + * Bundling properties */ -export interface ParcelBaseOptions { +export interface BundlingProps extends BundlingOptions { /** - * Whether to minify files when bundling. - * - * @default false + * Path to lock file */ - readonly minify?: boolean; + readonly depsLockFilePath: string; /** - * Whether to include source maps when bundling. - * - * @default false + * Entry file */ - readonly sourceMaps?: boolean; + readonly entry: string; /** - * The cache directory (relative to the project root) - * - * Parcel uses a filesystem cache for fast rebuilds. - * - * @default - `.parcel-cache` in the working directory + * The runtime of the lambda function */ - readonly cacheDir?: string; + readonly runtime: Runtime; +} +/** + * Bundling with esbuild + */ +export class Bundling implements cdk.BundlingOptions { /** - * The root of the project. This will be used as the source for the volume - * mounted in the Docker container. If you specify this prop, ensure that - * this path includes `entry` and any module/dependencies used by your - * function otherwise bundling will not be possible. - * - * @default - the closest path containing a .git folder + * esbuild bundled Lambda asset code */ - readonly projectRoot?: string; + public static bundle(options: BundlingProps): AssetCode { + return Code.fromAsset(path.dirname(options.depsLockFilePath), { + assetHashType: cdk.AssetHashType.OUTPUT, + bundling: new Bundling(options), + }); + } - /** - * Environment variables defined when Parcel runs. - * - * @default - no environment variables are defined. - */ - readonly parcelEnvironment?: { [key: string]: string; }; + public static clearRunsLocallyCache(): void { + this.runsLocally = undefined; + } - /** - * A list of modules that should be considered as externals (already available - * in the runtime). - * - * @default ['aws-sdk'] - */ - readonly externalModules?: string[]; + private static runsLocally?: boolean; + + // Core bundling options + public readonly image: cdk.BundlingDockerImage; + public readonly command: string[]; + public readonly environment?: { [key: string]: string }; + public readonly local?: cdk.ILocalBundling; + + private readonly relativeEntryPath: string; + private readonly externals: string[]; + + constructor(private readonly props: BundlingProps) { + Bundling.runsLocally = Bundling.runsLocally + ?? getEsBuildVersion()?.startsWith(ESBUILD_VERSION) + ?? false; + + const projectRoot = path.dirname(props.depsLockFilePath); + this.relativeEntryPath = path.relative(projectRoot, path.resolve(props.entry)); + + this.externals = [ + ...this.props.externalModules ?? ['aws-sdk'], // Mark aws-sdk as external by default (available in the runtime) + ...this.props.nodeModules ?? [], // Mark the modules that we are going to install as externals also + ]; + + // Docker bundling + const shouldBuildImage = props.forceDockerBundling || !Bundling.runsLocally; + this.image = shouldBuildImage + ? props.bundlingDockerImage ?? cdk.BundlingDockerImage.fromAsset(path.join(__dirname, '../lib'), { + buildArgs: { + ...props.buildArgs ?? {}, + IMAGE: props.runtime.bundlingDockerImage.image, + ESBUILD_VERSION: props.esbuildVersion ?? ESBUILD_VERSION, + }, + }) + : cdk.BundlingDockerImage.fromRegistry('dummy'); // Do not build if we don't need to + + const bundlingCommand = this.createBundlingCommand(cdk.AssetStaging.BUNDLING_INPUT_DIR, cdk.AssetStaging.BUNDLING_OUTPUT_DIR); + this.command = ['bash', '-c', bundlingCommand]; + this.environment = props.bundlingEnvironment; + + // Local bundling + if (!props.forceDockerBundling) { // only if Docker is not forced + const osPlatform = os.platform(); + const createLocalCommand = (outputDir: string) => this.createBundlingCommand(projectRoot, outputDir, osPlatform); + + this.local = { + tryBundle(outputDir: string) { + if (Bundling.runsLocally === false) { + process.stderr.write('esbuild cannot run locally. Switching to Docker bundling.\n'); + return false; + } + + const localCommand = createLocalCommand(outputDir); + + exec( + osPlatform === 'win32' ? 'cmd' : 'bash', + [ + osPlatform === 'win32' ? '/c' : '-c', + localCommand, + ], + { + env: { ...process.env, ...props.bundlingEnvironment ?? {} }, + stdio: [ // show output + 'ignore', // ignore stdio + process.stderr, // redirect stdout to stderr + 'inherit', // inherit stderr + ], + cwd: path.dirname(props.entry), + windowsVerbatimArguments: osPlatform === 'win32', + }); + + return true; + }, + }; + } + } - /** - * A list of modules that should be installed instead of bundled. Modules are - * installed in a Lambda compatible environnment. - * - * @default - all modules are bundled - */ - readonly nodeModules?: string[]; + public createBundlingCommand(inputDir: string, outputDir: string, osPlatform: NodeJS.Platform = 'linux'): string { + const pathJoin = osPathJoin(osPlatform); + + const npx = osPlatform === 'win32' ? 'npx.cmd' : 'npx'; + const loaders = Object.entries(this.props.loader ?? {}); + + const esbuildCommand: string = [ + npx, 'esbuild', + '--bundle', pathJoin(inputDir, this.relativeEntryPath), + `--target=${this.props.target ?? toTarget(this.props.runtime)}`, + '--platform=node', + `--outfile=${pathJoin(outputDir, 'index.js')}`, + ...this.props.minify ? ['--minify'] : [], + ...this.props.sourceMap ? ['--sourcemap'] : [], + ...this.externals.map(external => `--external:${external}`), + ...loaders.map(([ext, name]) => `--loader:${ext}=${name}`), + ].join(' '); + + let depsCommand = ''; + if (this.props.nodeModules) { + // Find 'package.json' closest to entry folder, we are going to extract the + // modules versions from it. + const pkgPath = findUp('package.json', path.dirname(this.props.entry)); + if (!pkgPath) { + throw new Error('Cannot find a `package.json` in this project. Using `nodeModules` requires a `package.json`.'); + } - /** - * The version of Parcel to use when running in a Docker container. - * - * @default - 2.0.0-beta.1 - */ - readonly parcelVersion?: string; + // Determine dependencies versions, lock file and installer + const dependencies = extractDependencies(pkgPath, this.props.nodeModules); + let installer = Installer.NPM; + let lockFile = LockFile.NPM; + if (this.props.depsLockFilePath.endsWith(LockFile.YARN)) { + lockFile = LockFile.YARN; + installer = Installer.YARN; + } - /** - * Build arguments to pass when building the bundling image. - * - * @default - no build arguments are passed - */ - readonly buildArgs?: { [key:string] : string }; + const osCommand = new OsCommand(osPlatform); - /** - * Force bundling in a Docker container even if local bundling is - * possible.This is useful if your function relies on node modules - * that should be installed (`nodeModules`) in a Lambda compatible - * environment. - * - * @default false - */ - readonly forceDockerBundling?: boolean; + // Create dummy package.json, copy lock file if any and then install + depsCommand = chain([ + osCommand.writeJson(pathJoin(outputDir, 'package.json'), { dependencies }), + osCommand.copy(pathJoin(inputDir, lockFile), pathJoin(outputDir, lockFile)), + osCommand.changeDirectory(outputDir), + `${installer} install`, + ]); + } - /** - * A custom bundling Docker image. - * - * This image should have Parcel installed at `/`. If you plan to use `nodeModules` - * it should also have `npm` or `yarn` depending on the lock file you're using. - * - * See https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-lambda-nodejs/parcel/Dockerfile - * for the default image provided by @aws-cdk/aws-lambda-nodejs. - * - * @default - use the Docker image provided by @aws-cdk/aws-lambda-nodejs - */ - readonly bundlingDockerImage?: cdk.BundlingDockerImage; + return chain([esbuildCommand, depsCommand]); + } } -/** - * Options for Parcel bundling - */ -export interface ParcelOptions extends ParcelBaseOptions { - /** - * Entry file - */ - readonly entry: string; - - /** - * The runtime of the lambda function - */ - readonly runtime: lambda.Runtime; +enum Installer { + NPM = 'npm', + YARN = 'yarn', } /** - * Bundling + * OS agnostic command */ -export class Bundling { - /** - * Parcel bundled Lambda asset code - */ - public static parcel(options: ParcelOptions): lambda.AssetCode { - // Find project root - const projectRoot = options.projectRoot - ?? findUp(`.git${path.sep}`) - ?? findUp(LockFile.YARN) - ?? findUp(LockFile.NPM) - ?? findUp('package.json'); - if (!projectRoot) { - throw new Error('Cannot find project root. Please specify it with `projectRoot`.'); - } - const relativeEntryPath = path.relative(projectRoot, path.resolve(options.entry)); - - const packageJsonManager = new PackageJsonManager(path.dirname(options.entry)); - - // Collect external and install modules - let includeNodeModules: { [key: string]: boolean } | undefined; - let dependencies: { [key: string]: string } | undefined; - const externalModules = options.externalModules ?? ['aws-sdk']; - if (externalModules || options.nodeModules) { - const modules = [...externalModules, ...options.nodeModules ?? []]; - includeNodeModules = {}; - for (const mod of modules) { - includeNodeModules[mod] = false; - } - if (options.nodeModules) { - dependencies = packageJsonManager.getVersions(options.nodeModules); - } - } +class OsCommand { + constructor(private readonly osPlatform: NodeJS.Platform) {} - let installer = Installer.NPM; - let lockFile: LockFile | undefined; - if (dependencies) { - // Use npm unless we have a yarn.lock. - if (fs.existsSync(path.join(projectRoot, LockFile.YARN))) { - installer = Installer.YARN; - lockFile = LockFile.YARN; - } else if (fs.existsSync(path.join(projectRoot, LockFile.NPM))) { - lockFile = LockFile.NPM; - } + public writeJson(filePath: string, data: any): string { + const stringifiedData = JSON.stringify(data); + if (this.osPlatform === 'win32') { + return `echo ^${stringifiedData}^ > ${filePath}`; } - // Configure target in package.json for Parcel - packageJsonManager.update({ - targets: { - 'cdk-lambda': { - context: 'node', - includeNodeModules: includeNodeModules ?? true, - sourceMap: options.sourceMaps ?? false, - minify: options.minify ?? false, - engines: { - node: `>= ${runtimeVersion(options.runtime)}`, - }, - }, - }, - }); + return `echo '${stringifiedData}' > ${filePath}`; + } - // Local - let localBundler: cdk.ILocalBundling | undefined; - if (!options.forceDockerBundling) { - localBundler = new LocalBundler({ - projectRoot, - relativeEntryPath, - cacheDir: options.cacheDir, - environment: options.parcelEnvironment, - dependencies, - installer, - lockFile, - }); + public copy(src: string, dest: string): string { + if (this.osPlatform === 'win32') { + return `copy ${src} ${dest}`; } - // Docker - const dockerBundler = new DockerBundler({ - runtime: options.runtime, - relativeEntryPath, - cacheDir: options.cacheDir, - environment: options.parcelEnvironment, - bundlingDockerImage: options.bundlingDockerImage, - buildImage: !LocalBundler.runsLocally(projectRoot) || options.forceDockerBundling, // build image only if we can't run locally - buildArgs: options.buildArgs, - parcelVersion: options.parcelVersion, - dependencies, - installer, - lockFile, - }); + return `cp ${src} ${dest}`; + } - return lambda.Code.fromAsset(projectRoot, { - assetHashType: cdk.AssetHashType.OUTPUT, - bundling: { - local: localBundler, - ...dockerBundler.bundlingOptions, - }, - }); + public changeDirectory(dir: string): string { + return `cd ${dir}`; } } -function runtimeVersion(runtime: lambda.Runtime): string { +/** + * Chain commands + */ +function chain(commands: string[]): string { + return commands.filter(c => !!c).join(' && '); +} + +/** + * Platform specific path join + */ +function osPathJoin(platform: NodeJS.Platform) { + return function(...paths: string[]): string { + const joined = path.join(...paths); + // If we are on win32 but need posix style paths + if (os.platform() === 'win32' && platform !== 'win32') { + return joined.replace(/\\/g, '/'); + } + return joined; + }; +} + +/** + * Converts a runtime to an esbuild node target + */ +function toTarget(runtime: Runtime): string { const match = runtime.name.match(/nodejs(\d+)/); if (!match) { throw new Error('Cannot extract version from runtime.'); } - return match[1]; + return `node${match[1]}`; } diff --git a/packages/@aws-cdk/aws-lambda-nodejs/lib/function.ts b/packages/@aws-cdk/aws-lambda-nodejs/lib/function.ts index e768cf1afd43a..4145757cfcfb4 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/lib/function.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/lib/function.ts @@ -2,14 +2,14 @@ import * as fs from 'fs'; import * as path from 'path'; import * as lambda from '@aws-cdk/aws-lambda'; import * as cdk from '@aws-cdk/core'; -import { Bundling, ParcelBaseOptions } from './bundling'; -import { PackageJsonManager } from './package-json-manager'; -import { nodeMajorVersion, parseStackTrace } from './util'; +import { Bundling } from './bundling'; +import { BundlingOptions } from './types'; +import { findUp, LockFile, nodeMajorVersion, parseStackTrace } from './util'; /** * Properties for a NodejsFunction */ -export interface NodejsFunctionProps extends lambda.FunctionOptions, ParcelBaseOptions { +export interface NodejsFunctionProps extends lambda.FunctionOptions, BundlingOptions { /** * Path to the entry file (JavaScript or TypeScript). * @@ -48,10 +48,24 @@ export interface NodejsFunctionProps extends lambda.FunctionOptions, ParcelBaseO * @default true */ readonly awsSdkConnectionReuse?: boolean; + + /** + * The path to the dependencies lock file (`yarn.lock` or `package-lock.json`). + * + * This will be used as the source for the volume mounted in the Docker + * container. + * + * Modules specified in `nodeModules` will be installed using the right + * installer (`npm` or `yarn`) along with this lock file. + * + * @default - the path is found by walking up parent directories searching for + * a `yarn.lock` or `package-lock.json` file + */ + readonly depsLockFilePath?: string; } /** - * A Node.js Lambda function bundled using Parcel + * A Node.js Lambda function bundled using esbuild */ export class NodejsFunction extends lambda.Function { constructor(scope: cdk.Construct, id: string, props: NodejsFunctionProps = {}) { @@ -59,6 +73,21 @@ export class NodejsFunction extends lambda.Function { throw new Error('Only `NODEJS` runtimes are supported.'); } + // Find lock file + let depsLockFilePath: string; + if (props.depsLockFilePath) { + if (!fs.existsSync(props.depsLockFilePath)) { + throw new Error(`Lock file at ${props.depsLockFilePath} doesn't exist`); + } + depsLockFilePath = props.depsLockFilePath; + } else { + const lockFile = findUp(LockFile.YARN) ?? findUp(LockFile.NPM); + if (!lockFile) { + throw new Error('Cannot find a package lock file (`yarn.lock` or `package-lock.json`). Please specify it with `depsFileLockPath`.'); + } + depsLockFilePath = lockFile; + } + // Entry and defaults const entry = path.resolve(findEntry(id, props.entry)); const handler = props.handler ?? 'handler'; @@ -67,29 +96,21 @@ export class NodejsFunction extends lambda.Function { : lambda.Runtime.NODEJS_10_X; const runtime = props.runtime ?? defaultRunTime; - // Look for the closest package.json starting in the directory of the entry - // file. We need to restore it after bundling. - const packageJsonManager = new PackageJsonManager(path.dirname(entry)); - - try { - super(scope, id, { + super(scope, id, { + ...props, + runtime, + code: Bundling.bundle({ ...props, + entry, runtime, - code: Bundling.parcel({ - ...props, - entry, - runtime, - }), - handler: `index.${handler}`, - }); - - // Enable connection reuse for aws-sdk - if (props.awsSdkConnectionReuse ?? true) { - this.addEnvironment('AWS_NODEJS_CONNECTION_REUSE_ENABLED', '1', { removeInEdge: true }); - } - } finally { - // We can only restore after the code has been bound to the function - packageJsonManager.restore(); + depsLockFilePath, + }), + handler: `index.${handler}`, + }); + + // Enable connection reuse for aws-sdk + if (props.awsSdkConnectionReuse ?? true) { + this.addEnvironment('AWS_NODEJS_CONNECTION_REUSE_ENABLED', '1', { removeInEdge: true }); } } } diff --git a/packages/@aws-cdk/aws-lambda-nodejs/lib/index.ts b/packages/@aws-cdk/aws-lambda-nodejs/lib/index.ts index bcda298c2f5fe..f1fdff0ce2e4c 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/lib/index.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/lib/index.ts @@ -1,2 +1,2 @@ export * from './function'; -export * from './bundling'; +export * from './types'; diff --git a/packages/@aws-cdk/aws-lambda-nodejs/lib/package-json-manager.ts b/packages/@aws-cdk/aws-lambda-nodejs/lib/package-json-manager.ts deleted file mode 100644 index 07e7354d0ebe5..0000000000000 --- a/packages/@aws-cdk/aws-lambda-nodejs/lib/package-json-manager.ts +++ /dev/null @@ -1,71 +0,0 @@ -import * as fs from 'fs'; -import * as path from 'path'; -import { findUp } from './util'; - -/** - * A package.json manager to act on the closest package.json file. - * - * Configuring the bundler requires to manipulate the package.json and then - * restore it. - */ -export class PackageJsonManager { - private readonly pkgPath: string; - private readonly pkg: Buffer; - private readonly pkgJson: PackageJson; - - constructor(directory: string) { - const pkgPath = findUp('package.json', directory); - if (!pkgPath) { - throw new Error('Cannot find a `package.json` in this project.'); - } - this.pkgPath = path.join(pkgPath, 'package.json'); - this.pkg = fs.readFileSync(this.pkgPath); - this.pkgJson = JSON.parse(this.pkg.toString()); - } - - /** - * Update the package.json - */ - public update(data: any) { - fs.writeFileSync(this.pkgPath, JSON.stringify({ - ...this.pkgJson, - ...data, - }, null, 2)); - } - - /** - * Restore the package.json to the original - */ - public restore() { - fs.writeFileSync(this.pkgPath, this.pkg); - } - - /** - * Extract versions for a list of modules - */ - public getVersions(modules: string[]): { [key: string]: string } { - const dependencies: { [key: string]: string } = {}; - - const allDependencies = { - ...this.pkgJson.dependencies ?? {}, - ...this.pkgJson.devDependencies ?? {}, - ...this.pkgJson.peerDependencies ?? {}, - }; - - for (const mod of modules) { - if (!allDependencies[mod]) { - throw new Error(`Cannot extract version for ${mod} in package.json`); - } - dependencies[mod] = allDependencies[mod]; - } - - return dependencies; - - } -} - -interface PackageJson { - dependencies?: { [key: string]: string }; - devDependencies?: { [key: string]: string }; - peerDependencies?: { [key: string]: string }; -} diff --git a/packages/@aws-cdk/aws-lambda-nodejs/lib/types.ts b/packages/@aws-cdk/aws-lambda-nodejs/lib/types.ts new file mode 100644 index 0000000000000..78bc72d40df22 --- /dev/null +++ b/packages/@aws-cdk/aws-lambda-nodejs/lib/types.ts @@ -0,0 +1,104 @@ +import { BundlingDockerImage } from '@aws-cdk/core'; + +/** + * Bundling options + */ +export interface BundlingOptions { + /** + * Whether to minify files when bundling. + * + * @default false + */ + readonly minify?: boolean; + + /** + * Whether to include source maps when bundling. + * + * @default false + */ + readonly sourceMap?: boolean; + + /** + * Target environment for the generated JavaScript code. + * + * @see https://esbuild.github.io/api/#target + * + * @default - the node version of the runtime + */ + readonly target?: string; + + /** + * Use loaders to change how a given input file is interpreted. + * + * Configuring a loader for a given file type lets you load that file type with + * an `import` statement or a `require` call. + * + * @see https://esbuild.github.io/api/#loader + * + * @example { '.png': 'dataurl' } + * + * @default - use esbuild default loaders + */ + readonly loader?: { [ext: string]: string }; + + /** + * Environment variables defined when bundling runs. + * + * @default - no environment variables are defined. + */ + readonly bundlingEnvironment?: { [key: string]: string; }; + + /** + * A list of modules that should be considered as externals (already available + * in the runtime). + * + * @default ['aws-sdk'] + */ + readonly externalModules?: string[]; + + /** + * A list of modules that should be installed instead of bundled. Modules are + * installed in a Lambda compatible environnment only when bundling runs in + * Docker. + * + * @default - all modules are bundled + */ + readonly nodeModules?: string[]; + + /** + * The version of esbuild to use when running in a Docker container. + * + * @default - latest v0 + */ + readonly esbuildVersion?: string; + + /** + * Build arguments to pass when building the bundling image. + * + * @default - no build arguments are passed + */ + readonly buildArgs?: { [key:string] : string }; + + /** + * Force bundling in a Docker container even if local bundling is + * possible. This is useful if your function relies on node modules + * that should be installed (`nodeModules`) in a Lambda compatible + * environment. + * + * @default false + */ + readonly forceDockerBundling?: boolean; + + /** + * A custom bundling Docker image. + * + * This image should have esbuild installed globally. If you plan to use `nodeModules` + * it should also have `npm` or `yarn` depending on the lock file you're using. + * + * See https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-lambda-nodejs/lib/Dockerfile + * for the default image provided by @aws-cdk/aws-lambda-nodejs. + * + * @default - use the Docker image provided by @aws-cdk/aws-lambda-nodejs + */ + readonly bundlingDockerImage?: BundlingDockerImage; +} diff --git a/packages/@aws-cdk/aws-lambda-nodejs/lib/util.ts b/packages/@aws-cdk/aws-lambda-nodejs/lib/util.ts index 16c070fac400b..0ee96aa53f74c 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/lib/util.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/lib/util.ts @@ -1,5 +1,6 @@ import { spawnSync, SpawnSyncOptions } from 'child_process'; import * as fs from 'fs'; +import * as os from 'os'; import * as path from 'path'; // From https://github.com/errwischt/stacktrace-parser/blob/master/src/stack-trace-parser.js @@ -57,8 +58,9 @@ export function nodeMajorVersion(): number { export function findUp(name: string, directory: string = process.cwd()): string | undefined { const absoluteDirectory = path.resolve(directory); - if (fs.existsSync(path.join(directory, name))) { - return directory; + const file = path.join(directory, name); + if (fs.existsSync(file)) { + return file; } const { root } = path.parse(absoluteDirectory); @@ -88,3 +90,53 @@ export function exec(cmd: string, args: string[], options?: SpawnSyncOptions) { return proc; } + +/** + * Extract dependencies from a package.json + */ +export function extractDependencies(pkgPath: string, modules: string[]): { [key: string]: string } { + const dependencies: { [key: string]: string } = {}; + + // Use require for cache + const pkgJson = require(pkgPath); // eslint-disable-line @typescript-eslint/no-require-imports + + const pkgDependencies = { + ...pkgJson.dependencies ?? {}, + ...pkgJson.devDependencies ?? {}, + ...pkgJson.peerDependencies ?? {}, + }; + + for (const mod of modules) { + if (!pkgDependencies[mod]) { + throw new Error(`Cannot extract version for module '${mod}' in package.json`); + } + dependencies[mod] = pkgDependencies[mod]; + } + + return dependencies; +} + +/** + * Returns the installed esbuild version + */ +export function getEsBuildVersion(): string | undefined { + try { + // --no-install ensures that we are checking for an installed version + // (either locally or globally) + const npx = os.platform() === 'win32' ? 'npx.cmd' : 'npx'; + const esbuild = spawnSync(npx, ['--no-install', 'esbuild', '--version']); + + if (esbuild.status !== 0 || esbuild.error) { + return undefined; + } + + return esbuild.stdout.toString().trim(); + } catch (err) { + return undefined; + } +} + +export enum LockFile { + NPM = 'package-lock.json', + YARN = 'yarn.lock' +} diff --git a/packages/@aws-cdk/aws-lambda-nodejs/package.json b/packages/@aws-cdk/aws-lambda-nodejs/package.json index 8dcc7caa033d9..cf4f5aad77ce7 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/package.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/package.json @@ -67,7 +67,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "delay": "4.4.0", - "parcel": "2.0.0-nightly.447", + "esbuild": "^0.8.9", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/bundling.test.ts b/packages/@aws-cdk/aws-lambda-nodejs/test/bundling.test.ts index 654e3b49f9029..a88f55a41e842 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/bundling.test.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/bundling.test.ts @@ -1,204 +1,164 @@ import * as child_process from 'child_process'; -import * as fs from 'fs'; +import * as os from 'os'; import * as path from 'path'; import { Code, Runtime } from '@aws-cdk/aws-lambda'; import { AssetHashType, BundlingDockerImage } from '@aws-cdk/core'; import { version as delayVersion } from 'delay/package.json'; -import { LocalBundler, Installer, LockFile } from '../lib/bundlers'; import { Bundling } from '../lib/bundling'; import * as util from '../lib/util'; jest.mock('@aws-cdk/aws-lambda'); -const writeFileSyncMock = jest.spyOn(fs, 'writeFileSync').mockReturnValue(); -const existsSyncOriginal = fs.existsSync; -const existsSyncMock = jest.spyOn(fs, 'existsSync'); -const originalFindUp = util.findUp; -const fromAssetMock = jest.spyOn(BundlingDockerImage, 'fromAsset'); -let findUpMock: jest.SpyInstance; +// Mock BundlingDockerImage.fromAsset() to avoid building the image +let fromAssetMock = jest.spyOn(BundlingDockerImage, 'fromAsset'); +let getEsBuildVersionMock = jest.spyOn(util, 'getEsBuildVersion'); beforeEach(() => { jest.clearAllMocks(); - LocalBundler.clearRunsLocallyCache(); - findUpMock = jest.spyOn(util, 'findUp').mockImplementation((name: string, directory) => { - if (name === 'package.json') { - return path.join(__dirname, '..'); - } - return originalFindUp(name, directory); + jest.resetAllMocks(); + Bundling.clearRunsLocallyCache(); + getEsBuildVersionMock.mockReturnValue('0.8.8'); + fromAssetMock.mockReturnValue({ + image: 'built-image', + cp: () => {}, + run: () => {}, + toJSON: () => 'built-image', }); }); -test('Parcel bundling', () => { - Bundling.parcel({ - entry: '/project/folder/entry.ts', +let depsLockFilePath = '/project/yarn.lock'; +let entry = '/project/lib/handler.ts'; + +test('esbuild bundling in Docker', () => { + Bundling.bundle({ + entry, + depsLockFilePath, runtime: Runtime.NODEJS_12_X, - cacheDir: 'cache-dir', - projectRoot: '/project', - parcelEnvironment: { + bundlingEnvironment: { KEY: 'value', }, + loader: { + '.png': 'dataurl', + }, + forceDockerBundling: true, }); - // Correctly bundles with parcel - expect(Code.fromAsset).toHaveBeenCalledWith('/project', { + // Correctly bundles with esbuild + expect(Code.fromAsset).toHaveBeenCalledWith(path.dirname(depsLockFilePath), { assetHashType: AssetHashType.OUTPUT, bundling: expect.objectContaining({ - local: { - props: expect.objectContaining({ - projectRoot: '/project', - }), - }, environment: { KEY: 'value', }, - workingDirectory: '/asset-input/folder', command: [ 'bash', '-c', - [ - '$(node -p "require.resolve(\'parcel\', { paths: [\'/\'] })") build /asset-input/folder/entry.ts --target cdk-lambda --dist-dir /asset-output --no-autoinstall --no-scope-hoist --cache-dir /asset-input/cache-dir', - 'mv /asset-output/entry.js /asset-output/index.js', - ].join(' && '), + 'npx esbuild --bundle /asset-input/lib/handler.ts --target=node12 --platform=node --outfile=/asset-output/index.js --external:aws-sdk --loader:.png=dataurl', ], }), }); - - // Correctly updates package.json - const call: any = writeFileSyncMock.mock.calls[0]; - expect(call[0]).toMatch('package.json'); - expect(JSON.parse(call[1])).toEqual(expect.objectContaining({ - targets: { - 'cdk-lambda': { - context: 'node', - includeNodeModules: { - 'aws-sdk': false, - }, - sourceMap: false, - minify: false, - engines: { - node: '>= 12', - }, - }, - }, - })); - - // Searches for the package.json starting in the directory of the entry file - expect(findUpMock).toHaveBeenCalledWith('package.json', '/project/folder'); }); -test('Parcel bundling with handler named index.ts', () => { - Bundling.parcel({ - entry: '/project/folder/index.ts', +test('esbuild bundling with handler named index.ts', () => { + Bundling.bundle({ + entry: '/project/lib/index.ts', + depsLockFilePath, runtime: Runtime.NODEJS_12_X, - projectRoot: '/project', + forceDockerBundling: true, }); - // Correctly bundles with parcel + // Correctly bundles with esbuild expect(Code.fromAsset).toHaveBeenCalledWith('/project', { assetHashType: AssetHashType.OUTPUT, bundling: expect.objectContaining({ command: [ 'bash', '-c', - '$(node -p "require.resolve(\'parcel\', { paths: [\'/\'] })") build /asset-input/folder/index.ts --target cdk-lambda --dist-dir /asset-output --no-autoinstall --no-scope-hoist', + 'npx esbuild --bundle /asset-input/lib/index.ts --target=node12 --platform=node --outfile=/asset-output/index.js --external:aws-sdk', ], }), }); }); -test('Parcel bundling with tsx handler', () => { - Bundling.parcel({ - entry: '/project/folder/handler.tsx', +test('esbuild bundling with tsx handler', () => { + Bundling.bundle({ + entry: '/project/lib/handler.tsx', + depsLockFilePath, runtime: Runtime.NODEJS_12_X, - projectRoot: '/project', + forceDockerBundling: true, }); - // Correctly bundles with parcel + // Correctly bundles with esbuild expect(Code.fromAsset).toHaveBeenCalledWith('/project', { assetHashType: AssetHashType.OUTPUT, bundling: expect.objectContaining({ command: [ 'bash', '-c', - [ - '$(node -p "require.resolve(\'parcel\', { paths: [\'/\'] })") build /asset-input/folder/handler.tsx --target cdk-lambda --dist-dir /asset-output --no-autoinstall --no-scope-hoist', - 'mv /asset-output/handler.js /asset-output/index.js', - ].join(' && '), + 'npx esbuild --bundle /asset-input/lib/handler.tsx --target=node12 --platform=node --outfile=/asset-output/index.js --external:aws-sdk', ], }), }); }); -test('Parcel with Windows paths', () => { - Bundling.parcel({ +test('esbuild with Windows paths', () => { + const osPlatformMock = jest.spyOn(os, 'platform').mockReturnValue('win32'); + + Bundling.bundle({ entry: 'C:\\my-project\\lib\\entry.ts', runtime: Runtime.NODEJS_12_X, - projectRoot: 'C:\\my-project', + depsLockFilePath: 'C:\\my-project\\package-lock.json', + forceDockerBundling: true, }); - expect(Code.fromAsset).toHaveBeenCalledWith('C:\\my-project', expect.objectContaining({ + expect(Code.fromAsset).toHaveBeenCalledWith(expect.any(String), expect.objectContaining({ bundling: expect.objectContaining({ command: expect.arrayContaining([ expect.stringContaining('/lib/entry.ts'), ]), }), })); + + osPlatformMock.mockRestore(); }); -test('Parcel bundling with externals and dependencies', () => { - Bundling.parcel({ - entry: '/project/folder/entry.ts', +test('esbuild bundling with externals and dependencies', () => { + const packageLock = path.join(__dirname, '..', 'package-lock.json'); + Bundling.bundle({ + entry: __filename, + depsLockFilePath: packageLock, runtime: Runtime.NODEJS_12_X, - projectRoot: '/project', externalModules: ['abc'], nodeModules: ['delay'], + forceDockerBundling: true, }); - // Correctly bundles with parcel - expect(Code.fromAsset).toHaveBeenCalledWith('/project', { + // Correctly bundles with esbuild + expect(Code.fromAsset).toHaveBeenCalledWith(path.dirname(packageLock), { assetHashType: AssetHashType.OUTPUT, bundling: expect.objectContaining({ command: [ 'bash', '-c', [ - '$(node -p "require.resolve(\'parcel\', { paths: [\'/\'] })") build /asset-input/folder/entry.ts --target cdk-lambda --dist-dir /asset-output --no-autoinstall --no-scope-hoist', - 'mv /asset-output/entry.js /asset-output/index.js', + 'npx esbuild --bundle /asset-input/test/bundling.test.js --target=node12 --platform=node --outfile=/asset-output/index.js --external:abc --external:delay', `echo \'{\"dependencies\":{\"delay\":\"${delayVersion}\"}}\' > /asset-output/package.json`, + 'cp /asset-input/package-lock.json /asset-output/package-lock.json', 'cd /asset-output', 'npm install', ].join(' && '), ], }), }); - - // Correctly updates package.json - const call: any = writeFileSyncMock.mock.calls[0]; - expect(call[0]).toMatch('package.json'); - expect(JSON.parse(call[1])).toEqual(expect.objectContaining({ - targets: expect.objectContaining({ - 'cdk-lambda': expect.objectContaining({ - includeNodeModules: { - delay: false, - abc: false, - }, - }), - }), - })); }); test('Detects yarn.lock', () => { - existsSyncMock.mockImplementation((p: fs.PathLike) => { - if (/yarn.lock/.test(p.toString())) { - return true; - } - return existsSyncOriginal(p); - }); - - Bundling.parcel({ - entry: '/project/folder/entry.ts', + const yarnLock = path.join(__dirname, '..', 'yarn.lock'); + Bundling.bundle({ + entry: __filename, + depsLockFilePath: yarnLock, runtime: Runtime.NODEJS_12_X, - projectRoot: '/project', nodeModules: ['delay'], + forceDockerBundling: true, }); - // Correctly bundles with parcel - expect(Code.fromAsset).toHaveBeenCalledWith('/project', { + // Correctly bundles with esbuild + expect(Code.fromAsset).toHaveBeenCalledWith(path.dirname(yarnLock), { assetHashType: AssetHashType.OUTPUT, bundling: expect.objectContaining({ command: expect.arrayContaining([ @@ -209,17 +169,17 @@ test('Detects yarn.lock', () => { }); test('with Docker build args', () => { - Bundling.parcel({ - entry: '/project/folder/entry.ts', + Bundling.bundle({ + entry, + depsLockFilePath, runtime: Runtime.NODEJS_12_X, - projectRoot: '/project', buildArgs: { HELLO: 'WORLD', }, forceDockerBundling: true, }); - expect(fromAssetMock).toHaveBeenCalledWith(expect.stringMatching(/parcel$/), expect.objectContaining({ + expect(fromAssetMock).toHaveBeenCalledWith(expect.stringMatching(/lib$/), expect.objectContaining({ buildArgs: expect.objectContaining({ HELLO: 'WORLD', }), @@ -230,89 +190,62 @@ test('Local bundling', () => { const spawnSyncMock = jest.spyOn(child_process, 'spawnSync').mockReturnValue({ status: 0, stderr: Buffer.from('stderr'), - stdout: Buffer.from('2.0.0-beta.1'), + stdout: Buffer.from('stdout'), pid: 123, output: ['stdout', 'stderr'], signal: null, }); - const bundler = new LocalBundler({ - installer: Installer.NPM, - projectRoot: __dirname, - relativeEntryPath: 'folder/entry.ts', - dependencies: { - dep: 'version', - }, - environment: { + const bundler = new Bundling({ + entry, + depsLockFilePath, + runtime: Runtime.NODEJS_12_X, + bundlingEnvironment: { KEY: 'value', }, - lockFile: LockFile.NPM, }); - bundler.tryBundle('/outdir'); + expect(bundler.local).toBeDefined(); + + const tryBundle = bundler.local?.tryBundle('/outdir', { image: Runtime.NODEJS_12_X.bundlingDockerImage }); + expect(tryBundle).toBe(true); expect(spawnSyncMock).toHaveBeenCalledWith( 'bash', - expect.arrayContaining(['-c', expect.stringContaining(__dirname)]), + expect.arrayContaining(['-c', expect.stringContaining(entry)]), expect.objectContaining({ env: expect.objectContaining({ KEY: 'value' }), - cwd: expect.stringContaining(path.join(__dirname, 'folder')), + cwd: '/project/lib', }), ); // Docker image is not built expect(fromAssetMock).not.toHaveBeenCalled(); -}); -test('LocalBundler.runsLocally checks parcel version and caches results', () => { - const spawnSyncMock = jest.spyOn(child_process, 'spawnSync').mockReturnValue({ - status: 0, - stderr: Buffer.from('stderr'), - stdout: Buffer.from('2.0.0-beta.1'), - pid: 123, - output: ['stdout', 'stderr'], - signal: null, - }); - - expect(LocalBundler.runsLocally(__dirname)).toBe(true); - expect(LocalBundler.runsLocally(__dirname)).toBe(true); - expect(spawnSyncMock).toHaveBeenCalledTimes(1); - expect(spawnSyncMock).toHaveBeenCalledWith(expect.stringContaining('parcel'), ['--version']); + spawnSyncMock.mockRestore(); }); -test('LocalBundler.runsLocally with incorrect parcel version', () => { - jest.spyOn(child_process, 'spawnSync').mockReturnValue({ - status: 0, - stderr: Buffer.from('stderr'), - stdout: Buffer.from('3.5.1'), - pid: 123, - output: ['stdout', 'stderr'], - signal: null, - }); - - expect(LocalBundler.runsLocally(__dirname)).toBe(false); -}); -test('Project root detection', () => { - findUpMock.mockImplementation(() => undefined); +test('Incorrect esbuild version', () => { + getEsBuildVersionMock.mockReturnValueOnce('3.4.5'); - expect(() => Bundling.parcel({ - entry: '/project/folder/entry.ts', + const bundler = new Bundling({ + entry, + depsLockFilePath, runtime: Runtime.NODEJS_12_X, - })).toThrow(/Cannot find project root/); + }); - expect(findUpMock).toHaveBeenNthCalledWith(1, `.git${path.sep}`); - expect(findUpMock).toHaveBeenNthCalledWith(2, LockFile.YARN); - expect(findUpMock).toHaveBeenNthCalledWith(3, LockFile.NPM); - expect(findUpMock).toHaveBeenNthCalledWith(4, 'package.json'); + const tryBundle = bundler.local?.tryBundle('/outdir', { image: Runtime.NODEJS_12_X.bundlingDockerImage }); + expect(tryBundle).toBe(false); }); test('Custom bundling docker image', () => { - Bundling.parcel({ - entry: '/project/folder/entry.ts', - projectRoot: '/project', + Bundling.bundle({ + entry, + depsLockFilePath, runtime: Runtime.NODEJS_12_X, bundlingDockerImage: BundlingDockerImage.fromRegistry('my-custom-image'), + forceDockerBundling: true, }); expect(Code.fromAsset).toHaveBeenCalledWith('/project', { diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/docker.test.ts b/packages/@aws-cdk/aws-lambda-nodejs/test/docker.test.ts index 7e0ed9db2fb86..8dc9177cffd44 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/docker.test.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/docker.test.ts @@ -2,26 +2,13 @@ import { spawnSync } from 'child_process'; import * as path from 'path'; beforeAll(() => { - spawnSync('docker', ['build', '-t', 'parcel', path.join(__dirname, '../parcel')]); + spawnSync('docker', ['build', '-t', 'esbuild', path.join(__dirname, '../lib')]); }); -test('parcel is available', async () => { +test('esbuild is available', async () => { const proc = spawnSync('docker', [ - 'run', 'parcel', - 'bash', '-c', - '$(node -p "require.resolve(\'parcel\')") --version', - ]); - expect(proc.status).toEqual(0); -}); - -test('parcel is installed without a package-lock.json file', async () => { - // We don't want a lock file at / to prevent Parcel from considering that /asset-input - // is part of a monorepo. - // See https://github.com/aws/aws-cdk/pull/10039#issuecomment-682738396 - const proc = spawnSync('docker', [ - 'run', 'parcel', - 'bash', '-c', - 'test ! -f /package-lock.json', + 'run', 'esbuild', + 'esbuild', '--version', ]); expect(proc.status).toEqual(0); }); @@ -29,7 +16,7 @@ test('parcel is installed without a package-lock.json file', async () => { test('can npm install with non root user', async () => { const proc = spawnSync('docker', [ 'run', '-u', '1000:1000', - 'parcel', + 'esbuild', 'bash', '-c', [ 'mkdir /tmp/test', 'cd /tmp/test', @@ -42,7 +29,7 @@ test('can npm install with non root user', async () => { test('can yarn install with non root user', async () => { const proc = spawnSync('docker', [ 'run', '-u', '500:500', - 'parcel', + 'esbuild', 'bash', '-c', [ 'mkdir /tmp/test', 'cd /tmp/test', diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/function.test.ts b/packages/@aws-cdk/aws-lambda-nodejs/test/function.test.ts index 12d9e07e44382..0769f86ba7dc9 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/function.test.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/function.test.ts @@ -10,7 +10,7 @@ import { Bundling } from '../lib/bundling'; jest.mock('../lib/bundling', () => { return { Bundling: { - parcel: jest.fn().mockReturnValue({ + bundle: jest.fn().mockReturnValue({ bind: () => { return { inlineCode: 'code' }; }, @@ -30,7 +30,7 @@ test('NodejsFunction with .ts handler', () => { // WHEN new NodejsFunction(stack, 'handler1'); - expect(Bundling.parcel).toHaveBeenCalledWith(expect.objectContaining({ + expect(Bundling.bundle).toHaveBeenCalledWith(expect.objectContaining({ entry: expect.stringContaining('function.test.handler1.ts'), // Automatically finds .ts handler file })); @@ -44,7 +44,7 @@ test('NodejsFunction with .js handler', () => { new NodejsFunction(stack, 'handler2'); // THEN - expect(Bundling.parcel).toHaveBeenCalledWith(expect.objectContaining({ + expect(Bundling.bundle).toHaveBeenCalledWith(expect.objectContaining({ entry: expect.stringContaining('function.test.handler2.js'), // Automatically finds .ts handler file })); }); @@ -52,13 +52,13 @@ test('NodejsFunction with .js handler', () => { test('NodejsFunction with container env vars', () => { // WHEN new NodejsFunction(stack, 'handler1', { - parcelEnvironment: { + bundlingEnvironment: { KEY: 'VALUE', }, }); - expect(Bundling.parcel).toHaveBeenCalledWith(expect.objectContaining({ - parcelEnvironment: { + expect(Bundling.bundle).toHaveBeenCalledWith(expect.objectContaining({ + bundlingEnvironment: { KEY: 'VALUE', }, })); @@ -98,13 +98,19 @@ test('throws with the wrong runtime family', () => { })).toThrow(/Only `NODEJS` runtimes are supported/); }); +test('throws with non existing lock file', () => { + expect(() => new NodejsFunction(stack, 'handler1', { + depsLockFilePath: '/does/not/exist.lock', + })).toThrow(/Lock file at \/does\/not\/exist.lock doesn't exist/); +}); + test('resolves entry to an absolute path', () => { // WHEN new NodejsFunction(stack, 'fn', { entry: 'lib/index.ts', }); - expect(Bundling.parcel).toHaveBeenCalledWith(expect.objectContaining({ + expect(Bundling.bundle).toHaveBeenCalledWith(expect.objectContaining({ entry: expect.stringMatching(/@aws-cdk\/aws-lambda-nodejs\/lib\/index.ts$/), })); }); diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.dependencies.expected.json b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.dependencies.expected.json index 4858a05f7616e..89a8de563b17f 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.dependencies.expected.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.dependencies.expected.json @@ -36,7 +36,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParameters557a8fe55f50f0e327d9b0d8a093a6d25a35c8fd93e1484ad6bd22ed8bfcff4aS3Bucket45145ED2" + "Ref": "AssetParametersa366acc095e9c09f74bf0dd7cd338214dc3b201ad849c56e33912eb3c85785e1S3Bucket70E87BF4" }, "S3Key": { "Fn::Join": [ @@ -49,7 +49,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters557a8fe55f50f0e327d9b0d8a093a6d25a35c8fd93e1484ad6bd22ed8bfcff4aS3VersionKey14931918" + "Ref": "AssetParametersa366acc095e9c09f74bf0dd7cd338214dc3b201ad849c56e33912eb3c85785e1S3VersionKey888B2605" } ] } @@ -62,7 +62,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters557a8fe55f50f0e327d9b0d8a093a6d25a35c8fd93e1484ad6bd22ed8bfcff4aS3VersionKey14931918" + "Ref": "AssetParametersa366acc095e9c09f74bf0dd7cd338214dc3b201ad849c56e33912eb3c85785e1S3VersionKey888B2605" } ] } @@ -92,17 +92,17 @@ } }, "Parameters": { - "AssetParameters557a8fe55f50f0e327d9b0d8a093a6d25a35c8fd93e1484ad6bd22ed8bfcff4aS3Bucket45145ED2": { + "AssetParametersa366acc095e9c09f74bf0dd7cd338214dc3b201ad849c56e33912eb3c85785e1S3Bucket70E87BF4": { "Type": "String", - "Description": "S3 bucket for asset \"557a8fe55f50f0e327d9b0d8a093a6d25a35c8fd93e1484ad6bd22ed8bfcff4a\"" + "Description": "S3 bucket for asset \"a366acc095e9c09f74bf0dd7cd338214dc3b201ad849c56e33912eb3c85785e1\"" }, - "AssetParameters557a8fe55f50f0e327d9b0d8a093a6d25a35c8fd93e1484ad6bd22ed8bfcff4aS3VersionKey14931918": { + "AssetParametersa366acc095e9c09f74bf0dd7cd338214dc3b201ad849c56e33912eb3c85785e1S3VersionKey888B2605": { "Type": "String", - "Description": "S3 key for asset version \"557a8fe55f50f0e327d9b0d8a093a6d25a35c8fd93e1484ad6bd22ed8bfcff4a\"" + "Description": "S3 key for asset version \"a366acc095e9c09f74bf0dd7cd338214dc3b201ad849c56e33912eb3c85785e1\"" }, - "AssetParameters557a8fe55f50f0e327d9b0d8a093a6d25a35c8fd93e1484ad6bd22ed8bfcff4aArtifactHashC39788BB": { + "AssetParametersa366acc095e9c09f74bf0dd7cd338214dc3b201ad849c56e33912eb3c85785e1ArtifactHash01A9D743": { "Type": "String", - "Description": "Artifact hash for asset \"557a8fe55f50f0e327d9b0d8a093a6d25a35c8fd93e1484ad6bd22ed8bfcff4a\"" + "Description": "Artifact hash for asset \"a366acc095e9c09f74bf0dd7cd338214dc3b201ad849c56e33912eb3c85785e1\"" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.expected.json b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.expected.json index e88132489f9ae..121b96533388e 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.expected.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.expected.json @@ -36,7 +36,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParametersd2bd5cfe4dc136ef456512a7d596b27f2da67bf81f6f0e20d8e0328f5fc3e636S3Bucket24297AFB" + "Ref": "AssetParameters87629d6d123a6c9871926864abde04a406be93834dc008b18672bd287d37756eS3BucketDF2E98AE" }, "S3Key": { "Fn::Join": [ @@ -49,7 +49,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParametersd2bd5cfe4dc136ef456512a7d596b27f2da67bf81f6f0e20d8e0328f5fc3e636S3VersionKeyF5D64812" + "Ref": "AssetParameters87629d6d123a6c9871926864abde04a406be93834dc008b18672bd287d37756eS3VersionKey240B23FB" } ] } @@ -62,7 +62,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParametersd2bd5cfe4dc136ef456512a7d596b27f2da67bf81f6f0e20d8e0328f5fc3e636S3VersionKeyF5D64812" + "Ref": "AssetParameters87629d6d123a6c9871926864abde04a406be93834dc008b18672bd287d37756eS3VersionKey240B23FB" } ] } @@ -126,7 +126,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParametersa3bab04de14ffc364f4351c7019d484a5e36b66f74fc6b33a3ea208c20a8d6baS3Bucket796E4856" + "Ref": "AssetParameters565126ff75ab727f0b3a67e78cf0fa9996426d1458123e8d6ee81c7ea93a6cfaS3BucketDFAA619E" }, "S3Key": { "Fn::Join": [ @@ -139,7 +139,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParametersa3bab04de14ffc364f4351c7019d484a5e36b66f74fc6b33a3ea208c20a8d6baS3VersionKeyBCA2678F" + "Ref": "AssetParameters565126ff75ab727f0b3a67e78cf0fa9996426d1458123e8d6ee81c7ea93a6cfaS3VersionKey2DF01059" } ] } @@ -152,7 +152,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParametersa3bab04de14ffc364f4351c7019d484a5e36b66f74fc6b33a3ea208c20a8d6baS3VersionKeyBCA2678F" + "Ref": "AssetParameters565126ff75ab727f0b3a67e78cf0fa9996426d1458123e8d6ee81c7ea93a6cfaS3VersionKey2DF01059" } ] } @@ -182,29 +182,29 @@ } }, "Parameters": { - "AssetParametersd2bd5cfe4dc136ef456512a7d596b27f2da67bf81f6f0e20d8e0328f5fc3e636S3Bucket24297AFB": { + "AssetParameters87629d6d123a6c9871926864abde04a406be93834dc008b18672bd287d37756eS3BucketDF2E98AE": { "Type": "String", - "Description": "S3 bucket for asset \"d2bd5cfe4dc136ef456512a7d596b27f2da67bf81f6f0e20d8e0328f5fc3e636\"" + "Description": "S3 bucket for asset \"87629d6d123a6c9871926864abde04a406be93834dc008b18672bd287d37756e\"" }, - "AssetParametersd2bd5cfe4dc136ef456512a7d596b27f2da67bf81f6f0e20d8e0328f5fc3e636S3VersionKeyF5D64812": { + "AssetParameters87629d6d123a6c9871926864abde04a406be93834dc008b18672bd287d37756eS3VersionKey240B23FB": { "Type": "String", - "Description": "S3 key for asset version \"d2bd5cfe4dc136ef456512a7d596b27f2da67bf81f6f0e20d8e0328f5fc3e636\"" + "Description": "S3 key for asset version \"87629d6d123a6c9871926864abde04a406be93834dc008b18672bd287d37756e\"" }, - "AssetParametersd2bd5cfe4dc136ef456512a7d596b27f2da67bf81f6f0e20d8e0328f5fc3e636ArtifactHashBEFC24E5": { + "AssetParameters87629d6d123a6c9871926864abde04a406be93834dc008b18672bd287d37756eArtifactHashC957048B": { "Type": "String", - "Description": "Artifact hash for asset \"d2bd5cfe4dc136ef456512a7d596b27f2da67bf81f6f0e20d8e0328f5fc3e636\"" + "Description": "Artifact hash for asset \"87629d6d123a6c9871926864abde04a406be93834dc008b18672bd287d37756e\"" }, - "AssetParametersa3bab04de14ffc364f4351c7019d484a5e36b66f74fc6b33a3ea208c20a8d6baS3Bucket796E4856": { + "AssetParameters565126ff75ab727f0b3a67e78cf0fa9996426d1458123e8d6ee81c7ea93a6cfaS3BucketDFAA619E": { "Type": "String", - "Description": "S3 bucket for asset \"a3bab04de14ffc364f4351c7019d484a5e36b66f74fc6b33a3ea208c20a8d6ba\"" + "Description": "S3 bucket for asset \"565126ff75ab727f0b3a67e78cf0fa9996426d1458123e8d6ee81c7ea93a6cfa\"" }, - "AssetParametersa3bab04de14ffc364f4351c7019d484a5e36b66f74fc6b33a3ea208c20a8d6baS3VersionKeyBCA2678F": { + "AssetParameters565126ff75ab727f0b3a67e78cf0fa9996426d1458123e8d6ee81c7ea93a6cfaS3VersionKey2DF01059": { "Type": "String", - "Description": "S3 key for asset version \"a3bab04de14ffc364f4351c7019d484a5e36b66f74fc6b33a3ea208c20a8d6ba\"" + "Description": "S3 key for asset version \"565126ff75ab727f0b3a67e78cf0fa9996426d1458123e8d6ee81c7ea93a6cfa\"" }, - "AssetParametersa3bab04de14ffc364f4351c7019d484a5e36b66f74fc6b33a3ea208c20a8d6baArtifactHashFF9F139E": { + "AssetParameters565126ff75ab727f0b3a67e78cf0fa9996426d1458123e8d6ee81c7ea93a6cfaArtifactHashF74A21AB": { "Type": "String", - "Description": "Artifact hash for asset \"a3bab04de14ffc364f4351c7019d484a5e36b66f74fc6b33a3ea208c20a8d6ba\"" + "Description": "Artifact hash for asset \"565126ff75ab727f0b3a67e78cf0fa9996426d1458123e8d6ee81c7ea93a6cfa\"" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts b/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts index a85b0064cef85..e807997df749c 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts @@ -1,19 +1,175 @@ +import * as child_process from 'child_process'; +import * as os from 'os'; import * as path from 'path'; -import { findUp } from '../lib/util'; +import { exec, extractDependencies, findUp, getEsBuildVersion } from '../lib/util'; -test('findUp', () => { - // Starting at process.cwd() - expect(findUp('README.md')).toMatch(/aws-lambda-nodejs$/); +beforeEach(() => { + jest.clearAllMocks(); +}); + +describe('findUp', () => { + test('Starting at process.cwd()', () => { + expect(findUp('README.md')).toMatch(/aws-lambda-nodejs\/README.md$/); + }); + + test('Non existing file', () => { + expect(findUp('non-existing-file.unknown')).toBe(undefined); + }); + + test('Starting at a specific path', () => { + expect(findUp('util.test.ts', path.join(__dirname, 'integ-handlers'))).toMatch(/aws-lambda-nodejs\/test\/util.test.ts$/); + }); + + test('Non existing file starting at a non existing relative path', () => { + expect(findUp('not-to-be-found.txt', 'non-existing/relative/path')).toBe(undefined); + }); + + test('Starting at a relative path', () => { + expect(findUp('util.test.ts', 'test/integ-handlers')).toMatch(/aws-lambda-nodejs\/test\/util.test.ts$/); + }); +}); + +describe('exec', () => { + test('normal execution', () => { + const spawnSyncMock = jest.spyOn(child_process, 'spawnSync').mockReturnValue({ + status: 0, + stderr: Buffer.from('stderr'), + stdout: Buffer.from('stdout'), + pid: 123, + output: ['stdout', 'stderr'], + signal: null, + }); + + const proc = exec( + 'cmd', + ['arg1', 'arg2'], + { env: { KEY: 'value' } }, + ); + + expect(spawnSyncMock).toHaveBeenCalledWith( + 'cmd', + ['arg1', 'arg2'], + { env: { KEY: 'value' } }, + ); + expect(proc.stdout.toString()).toBe('stdout'); + + spawnSyncMock.mockRestore(); + }); + + test('non zero status', () => { + const spawnSyncMock = jest.spyOn(child_process, 'spawnSync').mockReturnValue({ + status: 999, + stderr: Buffer.from('error occured'), + stdout: Buffer.from('stdout'), + pid: 123, + output: ['stdout', 'stderr'], + signal: null, + }); + + expect(() => exec('cmd', ['arg1', 'arg2'])).toThrow('error occured'); + + spawnSyncMock.mockRestore(); + }); + + test('with error', () => { + const spawnSyncMock = jest.spyOn(child_process, 'spawnSync').mockReturnValue({ + error: new Error('bad error'), + status: 0, + stderr: Buffer.from('stderr'), + stdout: Buffer.from('stdout'), + pid: 123, + output: ['stdout', 'stderr'], + signal: null, + }); + + expect(() => exec('cmd', ['arg1', 'arg2'])).toThrow(new Error('bad error')); + + spawnSyncMock.mockRestore(); + }); +}); + +describe('extractDependencies', () => { + test('with depencies referenced in package.json', () => { + expect(extractDependencies( + path.join(__dirname, '../package.json'), + ['@aws-cdk/aws-lambda', '@aws-cdk/core'], + )).toEqual({ + '@aws-cdk/aws-lambda': '0.0.0', + '@aws-cdk/core': '0.0.0', + }); + }); + + test('with unknown dependency', () => { + expect(() => extractDependencies( + path.join(__dirname, '../package.json'), + ['unknown'], + )).toThrow(/Cannot extract version for module 'unknown' in package.json/); + }); +}); + +describe('getEsBuildVersion', () => { + test('returns the version', () => { + const spawnSyncMock = jest.spyOn(child_process, 'spawnSync').mockReturnValue({ + status: 0, + stderr: Buffer.from('stderr'), + stdout: Buffer.from('version'), + pid: 123, + output: ['stdout', 'stderr'], + signal: null, + }); + + expect(getEsBuildVersion()).toBe('version'); + expect(spawnSyncMock).toHaveBeenCalledWith('npx', ['--no-install', 'esbuild', '--version']); + + spawnSyncMock.mockRestore(); + }); + + test('returns undefined on non zero status', () => { + const spawnSyncMock = jest.spyOn(child_process, 'spawnSync').mockReturnValue({ + status: 127, // status error + stderr: Buffer.from('stderr'), + stdout: Buffer.from('stdout'), + pid: 123, + output: ['stdout', 'stderr'], + signal: null, + }); + + expect(getEsBuildVersion()).toBeUndefined(); + + spawnSyncMock.mockRestore(); + }); + + test('returns undefined on error', () => { + const spawnSyncMock = jest.spyOn(child_process, 'spawnSync').mockReturnValue({ + error: new Error('bad error'), + status: 0, + stderr: Buffer.from('stderr'), + stdout: Buffer.from('stdout'), + pid: 123, + output: ['stdout', 'stderr'], + signal: null, + }); + + expect(getEsBuildVersion()).toBeUndefined(); - // Non existing file - expect(findUp('non-existing-file.unknown')).toBe(undefined); + spawnSyncMock.mockRestore(); + }); - // Starting at a specific path - expect(findUp('util.test.ts', path.join(__dirname, 'integ-handlers'))).toMatch(/aws-lambda-nodejs\/test$/); + test('Windows', () => { + const spawnSyncMock = jest.spyOn(child_process, 'spawnSync').mockReturnValue({ + status: 0, + stderr: Buffer.from('stderr'), + stdout: Buffer.from('version'), + pid: 123, + output: ['stdout', 'stderr'], + signal: null, + }); + const osPlatformMock = jest.spyOn(os, 'platform').mockReturnValue('win32'); - // Non existing file starting at a non existing relative path - expect(findUp('not-to-be-found.txt', 'non-existing/relative/path')).toBe(undefined); + expect(getEsBuildVersion()).toBe('version'); + expect(spawnSyncMock).toHaveBeenCalledWith('npx.cmd', expect.any(Array)); - // Starting at a relative path - expect(findUp('util.test.ts', 'test/integ-handlers')).toMatch(/aws-lambda-nodejs\/test$/); + spawnSyncMock.mockRestore(); + osPlatformMock.mockRestore(); + }); }); diff --git a/yarn.lock b/yarn.lock index 64bb91d8baa2c..297210fcf0c32 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,16 +9,7 @@ dependencies: "@babel/highlight" "^7.10.4" -"@babel/compat-data@^7.10.4", "@babel/compat-data@^7.11.0": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.11.0.tgz#e9f73efe09af1355b723a7f39b11bad637d7c99c" - integrity sha512-TPSvJfv73ng0pfnEOh17bYMPQbI95+nGWc71Ss4vZdRBHTDqmM9Z8ZV4rYz8Ks7sfzc95n30k6ODIq5UGnXcYQ== - dependencies: - browserslist "^4.12.0" - invariant "^2.2.4" - semver "^5.5.0" - -"@babel/core@^7.0.0", "@babel/core@^7.1.0", "@babel/core@^7.7.5": +"@babel/core@^7.1.0", "@babel/core@^7.7.5": version "7.11.6" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.11.6.tgz#3a9455dc7387ff1bac45770650bc13ba04a15651" integrity sha512-Wpcv03AGnmkgm6uS6k8iwhIwTrcP0m17TL1n1sy7qD0qelDu4XNeW0dN0mHfa+Gei211yDaLoEe/VlbXQzM4Bg== @@ -40,7 +31,7 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.0.0", "@babel/generator@^7.11.5", "@babel/generator@^7.11.6", "@babel/generator@^7.3.3", "@babel/generator@^7.4.0": +"@babel/generator@^7.11.5", "@babel/generator@^7.11.6", "@babel/generator@^7.4.0": version "7.11.6" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.11.6.tgz#b868900f81b163b4d464ea24545c61cbac4dc620" integrity sha512-DWtQ1PV3r+cLbySoHrwn9RWEgKMBLLma4OBQloPRyDYvc5msJM9kvTLo1YnlJd1P/ZuKbdli3ijr5q3FvAF3uA== @@ -49,86 +40,6 @@ jsesc "^2.5.1" source-map "^0.5.0" -"@babel/helper-annotate-as-pure@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz#5bf0d495a3f757ac3bda48b5bf3b3ba309c72ba3" - integrity sha512-XQlqKQP4vXFB7BN8fEEerrmYvHp3fK/rBkRFz9jaJbzK0B1DSfej9Kc7ZzE8Z/OnId1jpJdNAZ3BFQjWG68rcA== - dependencies: - "@babel/types" "^7.10.4" - -"@babel/helper-builder-binary-assignment-operator-visitor@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.4.tgz#bb0b75f31bf98cbf9ff143c1ae578b87274ae1a3" - integrity sha512-L0zGlFrGWZK4PbT8AszSfLTM5sDU1+Az/En9VrdT8/LmEiJt4zXt+Jve9DCAnQcbqDhCI+29y/L93mrDzddCcg== - dependencies: - "@babel/helper-explode-assignable-expression" "^7.10.4" - "@babel/types" "^7.10.4" - -"@babel/helper-builder-react-jsx-experimental@^7.10.4", "@babel/helper-builder-react-jsx-experimental@^7.11.5": - version "7.11.5" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx-experimental/-/helper-builder-react-jsx-experimental-7.11.5.tgz#4ea43dd63857b0a35cd1f1b161dc29b43414e79f" - integrity sha512-Vc4aPJnRZKWfzeCBsqTBnzulVNjABVdahSPhtdMD3Vs80ykx4a87jTHtF/VR+alSrDmNvat7l13yrRHauGcHVw== - dependencies: - "@babel/helper-annotate-as-pure" "^7.10.4" - "@babel/helper-module-imports" "^7.10.4" - "@babel/types" "^7.11.5" - -"@babel/helper-builder-react-jsx@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.10.4.tgz#8095cddbff858e6fa9c326daee54a2f2732c1d5d" - integrity sha512-5nPcIZ7+KKDxT1427oBivl9V9YTal7qk0diccnh7RrcgrT/pGFOjgGw1dgryyx1GvHEpXVfoDF6Ak3rTiWh8Rg== - dependencies: - "@babel/helper-annotate-as-pure" "^7.10.4" - "@babel/types" "^7.10.4" - -"@babel/helper-compilation-targets@^7.10.4", "@babel/helper-compilation-targets@^7.8.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.10.4.tgz#804ae8e3f04376607cc791b9d47d540276332bd2" - integrity sha512-a3rYhlsGV0UHNDvrtOXBg8/OpfV0OKTkxKPzIplS1zpx7CygDcWWxckxZeDd3gzPzC4kUT0A4nVFDK0wGMh4MQ== - dependencies: - "@babel/compat-data" "^7.10.4" - browserslist "^4.12.0" - invariant "^2.2.4" - levenary "^1.1.1" - semver "^5.5.0" - -"@babel/helper-create-class-features-plugin@^7.10.4", "@babel/helper-create-class-features-plugin@^7.10.5": - version "7.10.5" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.10.5.tgz#9f61446ba80e8240b0a5c85c6fdac8459d6f259d" - integrity sha512-0nkdeijB7VlZoLT3r/mY3bUkw3T8WG/hNw+FATs/6+pG2039IJWjTYL0VTISqsNHMUTEnwbVnc89WIJX9Qed0A== - dependencies: - "@babel/helper-function-name" "^7.10.4" - "@babel/helper-member-expression-to-functions" "^7.10.5" - "@babel/helper-optimise-call-expression" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/helper-replace-supers" "^7.10.4" - "@babel/helper-split-export-declaration" "^7.10.4" - -"@babel/helper-create-regexp-features-plugin@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.10.4.tgz#fdd60d88524659a0b6959c0579925e425714f3b8" - integrity sha512-2/hu58IEPKeoLF45DBwx3XFqsbCXmkdAay4spVr2x0jYgRxrSNp+ePwvSsy9g6YSaNDcKIQVPXk1Ov8S2edk2g== - dependencies: - "@babel/helper-annotate-as-pure" "^7.10.4" - "@babel/helper-regex" "^7.10.4" - regexpu-core "^4.7.0" - -"@babel/helper-define-map@^7.10.4": - version "7.10.5" - resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.10.5.tgz#b53c10db78a640800152692b13393147acb9bb30" - integrity sha512-fMw4kgFB720aQFXSVaXr79pjjcW5puTCM16+rECJ/plGS+zByelE8l9nCpV1GibxTnFVmUuYG9U8wYfQHdzOEQ== - dependencies: - "@babel/helper-function-name" "^7.10.4" - "@babel/types" "^7.10.5" - lodash "^4.17.19" - -"@babel/helper-explode-assignable-expression@^7.10.4": - version "7.11.4" - resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.11.4.tgz#2d8e3470252cc17aba917ede7803d4a7a276a41b" - integrity sha512-ux9hm3zR4WV1Y3xXxXkdG/0gxF9nvI0YVmKVhvK9AfMoaQkemL3sJpXw+Xbz65azo8qJiEz2XVDUpK3KYhH3ZQ== - dependencies: - "@babel/types" "^7.10.4" - "@babel/helper-function-name@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz#d2d3b20c59ad8c47112fa7d2a94bc09d5ef82f1a" @@ -145,14 +56,7 @@ dependencies: "@babel/types" "^7.10.4" -"@babel/helper-hoist-variables@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.10.4.tgz#d49b001d1d5a68ca5e6604dda01a6297f7c9381e" - integrity sha512-wljroF5PgCk2juF69kanHVs6vrLwIPNp6DLD+Lrl3hoQ3PpPPikaDRNFA+0t81NOoMt2DL6WW/mdU8k4k6ZzuA== - dependencies: - "@babel/types" "^7.10.4" - -"@babel/helper-member-expression-to-functions@^7.10.4", "@babel/helper-member-expression-to-functions@^7.10.5": +"@babel/helper-member-expression-to-functions@^7.10.4": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.11.0.tgz#ae69c83d84ee82f4b42f96e2a09410935a8f26df" integrity sha512-JbFlKHFntRV5qKw3YC0CvQnDZ4XMwgzzBbld7Ly4Mj4cbFy3KywcR8NtNctRToMWJOVvLINJv525Gd6wwVEx/Q== @@ -166,7 +70,7 @@ dependencies: "@babel/types" "^7.10.4" -"@babel/helper-module-transforms@^7.10.4", "@babel/helper-module-transforms@^7.10.5", "@babel/helper-module-transforms@^7.11.0": +"@babel/helper-module-transforms@^7.11.0": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.11.0.tgz#b16f250229e47211abdd84b34b64737c2ab2d359" integrity sha512-02EVu8COMuTRO1TAzdMtpBPbe6aQ1w/8fePD2YgQmxZU4gpNWaL9gK3Jp7dxlkUlUCJOTaSeA+Hrm1BRQwqIhg== @@ -186,28 +90,11 @@ dependencies: "@babel/types" "^7.10.4" -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.8.0": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== -"@babel/helper-regex@^7.10.4": - version "7.10.5" - resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.10.5.tgz#32dfbb79899073c415557053a19bd055aae50ae0" - integrity sha512-68kdUAzDrljqBrio7DYAEgCoJHxppJOERHOgOrDN7WjOzP0ZQ1LsSDRXcemzVZaLvjaJsJEESb6qt+znNuENDg== - dependencies: - lodash "^4.17.19" - -"@babel/helper-remap-async-to-generator@^7.10.4": - version "7.11.4" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.11.4.tgz#4474ea9f7438f18575e30b0cac784045b402a12d" - integrity sha512-tR5vJ/vBa9wFy3m5LLv2faapJLnDFxNWff2SAYkSE4rLUdbp7CdObYFgI7wK4T/Mj4UzpjPwzR8Pzmr5m7MHGA== - dependencies: - "@babel/helper-annotate-as-pure" "^7.10.4" - "@babel/helper-wrap-function" "^7.10.4" - "@babel/template" "^7.10.4" - "@babel/types" "^7.10.4" - "@babel/helper-replace-supers@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.10.4.tgz#d585cd9388ea06e6031e4cd44b6713cbead9e6cf" @@ -226,14 +113,7 @@ "@babel/template" "^7.10.4" "@babel/types" "^7.10.4" -"@babel/helper-skip-transparent-expression-wrappers@^7.11.0": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.11.0.tgz#eec162f112c2f58d3af0af125e3bb57665146729" - integrity sha512-0XIdiQln4Elglgjbwo9wuJpL/K7AGCY26kmEt0+pRP0TAj4jjyNq1MjoRvikrTVqKcx4Gysxt4cXvVFXP/JO2Q== - dependencies: - "@babel/types" "^7.11.0" - -"@babel/helper-split-export-declaration@^7.10.4", "@babel/helper-split-export-declaration@^7.11.0": +"@babel/helper-split-export-declaration@^7.11.0": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz#f8a491244acf6a676158ac42072911ba83ad099f" integrity sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg== @@ -245,16 +125,6 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== -"@babel/helper-wrap-function@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.10.4.tgz#8a6f701eab0ff39f765b5a1cfef409990e624b87" - integrity sha512-6py45WvEF0MhiLrdxtRjKjufwLL1/ob2qDJgg5JgNdojBAZSAKnAjkyOCNug6n+OBl4VW76XjvgSFTdaMcW0Ug== - dependencies: - "@babel/helper-function-name" "^7.10.4" - "@babel/template" "^7.10.4" - "@babel/traverse" "^7.10.4" - "@babel/types" "^7.10.4" - "@babel/helpers@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.10.4.tgz#2abeb0d721aff7c0a97376b9e1f6f65d7a475044" @@ -273,119 +143,12 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.10.4", "@babel/parser@^7.11.5", "@babel/parser@^7.4.3": +"@babel/parser@^7.1.0", "@babel/parser@^7.10.4", "@babel/parser@^7.11.5", "@babel/parser@^7.4.3": version "7.11.5" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.11.5.tgz#c7ff6303df71080ec7a4f5b8c003c58f1cf51037" integrity sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q== -"@babel/plugin-proposal-async-generator-functions@^7.10.4": - version "7.10.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.10.5.tgz#3491cabf2f7c179ab820606cec27fed15e0e8558" - integrity sha512-cNMCVezQbrRGvXJwm9fu/1sJj9bHdGAgKodZdLqOQIpfoH3raqmRPBM17+lh7CzhiKRRBrGtZL9WcjxSoGYUSg== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/helper-remap-async-to-generator" "^7.10.4" - "@babel/plugin-syntax-async-generators" "^7.8.0" - -"@babel/plugin-proposal-class-properties@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.10.4.tgz#a33bf632da390a59c7a8c570045d1115cd778807" - integrity sha512-vhwkEROxzcHGNu2mzUC0OFFNXdZ4M23ib8aRRcJSsW8BZK9pQMD7QB7csl97NBbgGZO7ZyHUyKDnxzOaP4IrCg== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-proposal-dynamic-import@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.10.4.tgz#ba57a26cb98b37741e9d5bca1b8b0ddf8291f17e" - integrity sha512-up6oID1LeidOOASNXgv/CFbgBqTuKJ0cJjz6An5tWD+NVBNlp3VNSBxv2ZdU7SYl3NxJC7agAQDApZusV6uFwQ== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-dynamic-import" "^7.8.0" - -"@babel/plugin-proposal-export-namespace-from@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.10.4.tgz#570d883b91031637b3e2958eea3c438e62c05f54" - integrity sha512-aNdf0LY6/3WXkhh0Fdb6Zk9j1NMD8ovj3F6r0+3j837Pn1S1PdNtcwJ5EG9WkVPNHPxyJDaxMaAOVq4eki0qbg== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-export-namespace-from" "^7.8.3" - -"@babel/plugin-proposal-json-strings@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.10.4.tgz#593e59c63528160233bd321b1aebe0820c2341db" - integrity sha512-fCL7QF0Jo83uy1K0P2YXrfX11tj3lkpN7l4dMv9Y9VkowkhkQDwFHFd8IiwyK5MZjE8UpbgokkgtcReH88Abaw== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-json-strings" "^7.8.0" - -"@babel/plugin-proposal-logical-assignment-operators@^7.11.0": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.11.0.tgz#9f80e482c03083c87125dee10026b58527ea20c8" - integrity sha512-/f8p4z+Auz0Uaf+i8Ekf1iM7wUNLcViFUGiPxKeXvxTSl63B875YPiVdUDdem7hREcI0E0kSpEhS8tF5RphK7Q== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" - -"@babel/plugin-proposal-nullish-coalescing-operator@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.10.4.tgz#02a7e961fc32e6d5b2db0649e01bf80ddee7e04a" - integrity sha512-wq5n1M3ZUlHl9sqT2ok1T2/MTt6AXE0e1Lz4WzWBr95LsAZ5qDXe4KnFuauYyEyLiohvXFMdbsOTMyLZs91Zlw== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" - -"@babel/plugin-proposal-numeric-separator@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.10.4.tgz#ce1590ff0a65ad12970a609d78855e9a4c1aef06" - integrity sha512-73/G7QoRoeNkLZFxsoCCvlg4ezE4eM+57PnOqgaPOozd5myfj7p0muD1mRVJvbUWbOzD+q3No2bWbaKy+DJ8DA== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-numeric-separator" "^7.10.4" - -"@babel/plugin-proposal-object-rest-spread@^7.11.0": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.11.0.tgz#bd81f95a1f746760ea43b6c2d3d62b11790ad0af" - integrity sha512-wzch41N4yztwoRw0ak+37wxwJM2oiIiy6huGCoqkvSTA9acYWcPfn9Y4aJqmFFJ70KTJUu29f3DQ43uJ9HXzEA== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-object-rest-spread" "^7.8.0" - "@babel/plugin-transform-parameters" "^7.10.4" - -"@babel/plugin-proposal-optional-catch-binding@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.10.4.tgz#31c938309d24a78a49d68fdabffaa863758554dd" - integrity sha512-LflT6nPh+GK2MnFiKDyLiqSqVHkQnVf7hdoAvyTnnKj9xB3docGRsdPuxp6qqqW19ifK3xgc9U5/FwrSaCNX5g== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" - -"@babel/plugin-proposal-optional-chaining@^7.11.0": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.11.0.tgz#de5866d0646f6afdaab8a566382fe3a221755076" - integrity sha512-v9fZIu3Y8562RRwhm1BbMRxtqZNFmFA2EG+pT2diuU8PT3H6T/KXoZ54KgYisfOFZHV6PfvAiBIZ9Rcz+/JCxA== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/helper-skip-transparent-expression-wrappers" "^7.11.0" - "@babel/plugin-syntax-optional-chaining" "^7.8.0" - -"@babel/plugin-proposal-private-methods@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.10.4.tgz#b160d972b8fdba5c7d111a145fc8c421fc2a6909" - integrity sha512-wh5GJleuI8k3emgTg5KkJK6kHNsGEr0uBTDBuQUBJwckk9xs1ez79ioheEVVxMLyPscB0LfkbVHslQqIzWV6Bw== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-proposal-unicode-property-regex@^7.10.4", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.10.4.tgz#4483cda53041ce3413b7fe2f00022665ddfaa75d" - integrity sha512-H+3fOgPnEXFL9zGYtKQe4IDOPKYlZdF1kqFDQRRb8PK4B8af1vAGK04tF5iQAAsui+mHNBQSAtd2/ndEDe9wuA== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-async-generators@^7.8.0", "@babel/plugin-syntax-async-generators@^7.8.4": +"@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== @@ -399,34 +162,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-class-properties@^7.10.4", "@babel/plugin-syntax-class-properties@^7.8.3": +"@babel/plugin-syntax-class-properties@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.10.4.tgz#6644e6a0baa55a61f9e3231f6c9eeb6ee46c124c" integrity sha512-GCSBF7iUle6rNugfURwNmCGG3Z/2+opxAMLs1nND4bhEG5PuxTIggDBoeYYSujAlLtsupzOHYJQgPS3pivwXIA== dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-syntax-dynamic-import@^7.8.0": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3" - integrity sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-export-namespace-from@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz#028964a9ba80dbc094c915c487ad7c4e7a66465a" - integrity sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - -"@babel/plugin-syntax-flow@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.10.4.tgz#53351dd7ae01995e567d04ce42af1a6e0ba846a6" - integrity sha512-yxQsX1dJixF4qEEdzVbst3SZQ58Nrooz8NV9Z9GL4byTE25BvJgl5lf0RECUf0fh28rZBb/RYTWn/eeKwCMrZQ== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-import-meta@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" @@ -434,69 +176,55 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-syntax-json-strings@^7.8.0", "@babel/plugin-syntax-json-strings@^7.8.3": +"@babel/plugin-syntax-json-strings@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-jsx@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.10.4.tgz#39abaae3cbf710c4373d8429484e6ba21340166c" - integrity sha512-KCg9mio9jwiARCB7WAcQ7Y1q+qicILjoK8LP/VkPkEKaf5dkaZZK1EcTe91a3JJlZ3qy6L5s9X52boEYi8DM9g== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-logical-assignment-operators@^7.10.4", "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": +"@babel/plugin-syntax-logical-assignment-operators@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.0", "@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": +"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-numeric-separator@^7.10.4", "@babel/plugin-syntax-numeric-separator@^7.8.3": +"@babel/plugin-syntax-numeric-separator@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-syntax-object-rest-spread@^7.8.0", "@babel/plugin-syntax-object-rest-spread@^7.8.3": +"@babel/plugin-syntax-object-rest-spread@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-optional-catch-binding@^7.8.0", "@babel/plugin-syntax-optional-catch-binding@^7.8.3": +"@babel/plugin-syntax-optional-catch-binding@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-optional-chaining@^7.8.0", "@babel/plugin-syntax-optional-chaining@^7.8.3": +"@babel/plugin-syntax-optional-chaining@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-top-level-await@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.10.4.tgz#4bbeb8917b54fcf768364e0a81f560e33a3ef57d" - integrity sha512-ni1brg4lXEmWyafKr0ccFWkJG0CeMt4WV1oyeBW6EFObF4oOHclbkj5cARxAPQyAQ2UTuplJyK4nfkXIMMFvsQ== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-top-level-await@^7.8.3": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.1.tgz#dd6c0b357ac1bb142d98537450a319625d13d2a0" @@ -504,436 +232,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-syntax-typescript@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.10.4.tgz#2f55e770d3501e83af217d782cb7517d7bb34d25" - integrity sha512-oSAEz1YkBCAKr5Yiq8/BNtvSAPwkp/IyUnwZogd8p+F0RuYQQrLeRUzIQhueQTTBy/F+a40uS7OFKxnkRvmvFQ== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-arrow-functions@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.10.4.tgz#e22960d77e697c74f41c501d44d73dbf8a6a64cd" - integrity sha512-9J/oD1jV0ZCBcgnoFWFq1vJd4msoKb/TCpGNFyyLt0zABdcvgK3aYikZ8HjzB14c26bc7E3Q1yugpwGy2aTPNA== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-async-to-generator@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.10.4.tgz#41a5017e49eb6f3cda9392a51eef29405b245a37" - integrity sha512-F6nREOan7J5UXTLsDsZG3DXmZSVofr2tGNwfdrVwkDWHfQckbQXnXSPfD7iO+c/2HGqycwyLST3DnZ16n+cBJQ== - dependencies: - "@babel/helper-module-imports" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/helper-remap-async-to-generator" "^7.10.4" - -"@babel/plugin-transform-block-scoped-functions@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.10.4.tgz#1afa595744f75e43a91af73b0d998ecfe4ebc2e8" - integrity sha512-WzXDarQXYYfjaV1szJvN3AD7rZgZzC1JtjJZ8dMHUyiK8mxPRahynp14zzNjU3VkPqPsO38CzxiWO1c9ARZ8JA== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-block-scoping@^7.10.4": - version "7.11.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.11.1.tgz#5b7efe98852bef8d652c0b28144cd93a9e4b5215" - integrity sha512-00dYeDE0EVEHuuM+26+0w/SCL0BH2Qy7LwHuI4Hi4MH5gkC8/AqMN5uWFJIsoXZrAphiMm1iXzBw6L2T+eA0ew== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-classes@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.10.4.tgz#405136af2b3e218bc4a1926228bc917ab1a0adc7" - integrity sha512-2oZ9qLjt161dn1ZE0Ms66xBncQH4In8Sqw1YWgBUZuGVJJS5c0OFZXL6dP2MRHrkU/eKhWg8CzFJhRQl50rQxA== - dependencies: - "@babel/helper-annotate-as-pure" "^7.10.4" - "@babel/helper-define-map" "^7.10.4" - "@babel/helper-function-name" "^7.10.4" - "@babel/helper-optimise-call-expression" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/helper-replace-supers" "^7.10.4" - "@babel/helper-split-export-declaration" "^7.10.4" - globals "^11.1.0" - -"@babel/plugin-transform-computed-properties@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.10.4.tgz#9ded83a816e82ded28d52d4b4ecbdd810cdfc0eb" - integrity sha512-JFwVDXcP/hM/TbyzGq3l/XWGut7p46Z3QvqFMXTfk6/09m7xZHJUN9xHfsv7vqqD4YnfI5ueYdSJtXqqBLyjBw== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-destructuring@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.10.4.tgz#70ddd2b3d1bea83d01509e9bb25ddb3a74fc85e5" - integrity sha512-+WmfvyfsyF603iPa6825mq6Qrb7uLjTOsa3XOFzlYcYDHSS4QmpOWOL0NNBY5qMbvrcf3tq0Cw+v4lxswOBpgA== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-dotall-regex@^7.10.4", "@babel/plugin-transform-dotall-regex@^7.4.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.10.4.tgz#469c2062105c1eb6a040eaf4fac4b488078395ee" - integrity sha512-ZEAVvUTCMlMFAbASYSVQoxIbHm2OkG2MseW6bV2JjIygOjdVv8tuxrCTzj1+Rynh7ODb8GivUy7dzEXzEhuPaA== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-duplicate-keys@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.10.4.tgz#697e50c9fee14380fe843d1f306b295617431e47" - integrity sha512-GL0/fJnmgMclHiBTTWXNlYjYsA7rDrtsazHG6mglaGSTh0KsrW04qml+Bbz9FL0LcJIRwBWL5ZqlNHKTkU3xAA== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-exponentiation-operator@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.10.4.tgz#5ae338c57f8cf4001bdb35607ae66b92d665af2e" - integrity sha512-S5HgLVgkBcRdyQAHbKj+7KyuWx8C6t5oETmUuwz1pt3WTWJhsUV0WIIXuVvfXMxl/QQyHKlSCNNtaIamG8fysw== - dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-flow-strip-types@^7.0.0": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.10.4.tgz#c497957f09e86e3df7296271e9eb642876bf7788" - integrity sha512-XTadyuqNst88UWBTdLjM+wEY7BFnY2sYtPyAidfC7M/QaZnSuIZpMvLxqGT7phAcnGyWh/XQFLKcGf04CnvxSQ== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-flow" "^7.10.4" - -"@babel/plugin-transform-for-of@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.10.4.tgz#c08892e8819d3a5db29031b115af511dbbfebae9" - integrity sha512-ItdQfAzu9AlEqmusA/65TqJ79eRcgGmpPPFvBnGILXZH975G0LNjP1yjHvGgfuCxqrPPueXOPe+FsvxmxKiHHQ== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-function-name@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.10.4.tgz#6a467880e0fc9638514ba369111811ddbe2644b7" - integrity sha512-OcDCq2y5+E0dVD5MagT5X+yTRbcvFjDI2ZVAottGH6tzqjx/LKpgkUepu3hp/u4tZBzxxpNGwLsAvGBvQ2mJzg== - dependencies: - "@babel/helper-function-name" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-literals@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.10.4.tgz#9f42ba0841100a135f22712d0e391c462f571f3c" - integrity sha512-Xd/dFSTEVuUWnyZiMu76/InZxLTYilOSr1UlHV+p115Z/Le2Fi1KXkJUYz0b42DfndostYlPub3m8ZTQlMaiqQ== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-member-expression-literals@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.10.4.tgz#b1ec44fcf195afcb8db2c62cd8e551c881baf8b7" - integrity sha512-0bFOvPyAoTBhtcJLr9VcwZqKmSjFml1iVxvPL0ReomGU53CX53HsM4h2SzckNdkQcHox1bpAqzxBI1Y09LlBSw== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-modules-amd@^7.10.4": - version "7.10.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.10.5.tgz#1b9cddaf05d9e88b3aad339cb3e445c4f020a9b1" - integrity sha512-elm5uruNio7CTLFItVC/rIzKLfQ17+fX7EVz5W0TMgIHFo1zY0Ozzx+lgwhL4plzl8OzVn6Qasx5DeEFyoNiRw== - dependencies: - "@babel/helper-module-transforms" "^7.10.5" - "@babel/helper-plugin-utils" "^7.10.4" - babel-plugin-dynamic-import-node "^2.3.3" - -"@babel/plugin-transform-modules-commonjs@^7.0.0", "@babel/plugin-transform-modules-commonjs@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.10.4.tgz#66667c3eeda1ebf7896d41f1f16b17105a2fbca0" - integrity sha512-Xj7Uq5o80HDLlW64rVfDBhao6OX89HKUmb+9vWYaLXBZOma4gA6tw4Ni1O5qVDoZWUV0fxMYA0aYzOawz0l+1w== - dependencies: - "@babel/helper-module-transforms" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/helper-simple-access" "^7.10.4" - babel-plugin-dynamic-import-node "^2.3.3" - -"@babel/plugin-transform-modules-systemjs@^7.10.4": - version "7.10.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.10.5.tgz#6270099c854066681bae9e05f87e1b9cadbe8c85" - integrity sha512-f4RLO/OL14/FP1AEbcsWMzpbUz6tssRaeQg11RH1BP/XnPpRoVwgeYViMFacnkaw4k4wjRSjn3ip1Uw9TaXuMw== - dependencies: - "@babel/helper-hoist-variables" "^7.10.4" - "@babel/helper-module-transforms" "^7.10.5" - "@babel/helper-plugin-utils" "^7.10.4" - babel-plugin-dynamic-import-node "^2.3.3" - -"@babel/plugin-transform-modules-umd@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.10.4.tgz#9a8481fe81b824654b3a0b65da3df89f3d21839e" - integrity sha512-mohW5q3uAEt8T45YT7Qc5ws6mWgJAaL/8BfWD9Dodo1A3RKWli8wTS+WiQ/knF+tXlPirW/1/MqzzGfCExKECA== - dependencies: - "@babel/helper-module-transforms" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-named-capturing-groups-regex@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.10.4.tgz#78b4d978810b6f3bcf03f9e318f2fc0ed41aecb6" - integrity sha512-V6LuOnD31kTkxQPhKiVYzYC/Jgdq53irJC/xBSmqcNcqFGV+PER4l6rU5SH2Vl7bH9mLDHcc0+l9HUOe4RNGKA== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.10.4" - -"@babel/plugin-transform-new-target@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.10.4.tgz#9097d753cb7b024cb7381a3b2e52e9513a9c6888" - integrity sha512-YXwWUDAH/J6dlfwqlWsztI2Puz1NtUAubXhOPLQ5gjR/qmQ5U96DY4FQO8At33JN4XPBhrjB8I4eMmLROjjLjw== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-object-super@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.10.4.tgz#d7146c4d139433e7a6526f888c667e314a093894" - integrity sha512-5iTw0JkdRdJvr7sY0vHqTpnruUpTea32JHmq/atIWqsnNussbRzjEDyWep8UNztt1B5IusBYg8Irb0bLbiEBCQ== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/helper-replace-supers" "^7.10.4" - -"@babel/plugin-transform-parameters@^7.10.4": - version "7.10.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.10.5.tgz#59d339d58d0b1950435f4043e74e2510005e2c4a" - integrity sha512-xPHwUj5RdFV8l1wuYiu5S9fqWGM2DrYc24TMvUiRrPVm+SM3XeqU9BcokQX/kEUe+p2RBwy+yoiR1w/Blq6ubw== - dependencies: - "@babel/helper-get-function-arity" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-property-literals@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.10.4.tgz#f6fe54b6590352298785b83edd815d214c42e3c0" - integrity sha512-ofsAcKiUxQ8TY4sScgsGeR2vJIsfrzqvFb9GvJ5UdXDzl+MyYCaBj/FGzXuv7qE0aJcjWMILny1epqelnFlz8g== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-react-display-name@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.10.4.tgz#b5795f4e3e3140419c3611b7a2a3832b9aef328d" - integrity sha512-Zd4X54Mu9SBfPGnEcaGcOrVAYOtjT2on8QZkLKEq1S/tHexG39d9XXGZv19VfRrDjPJzFmPfTAqOQS1pfFOujw== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-react-jsx-development@^7.10.4": - version "7.11.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.11.5.tgz#e1439e6a57ee3d43e9f54ace363fb29cefe5d7b6" - integrity sha512-cImAmIlKJ84sDmpQzm4/0q/2xrXlDezQoixy3qoz1NJeZL/8PRon6xZtluvr4H4FzwlDGI5tCcFupMnXGtr+qw== - dependencies: - "@babel/helper-builder-react-jsx-experimental" "^7.11.5" - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-jsx" "^7.10.4" - -"@babel/plugin-transform-react-jsx-self@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.10.4.tgz#cd301a5fed8988c182ed0b9d55e9bd6db0bd9369" - integrity sha512-yOvxY2pDiVJi0axdTWHSMi5T0DILN+H+SaeJeACHKjQLezEzhLx9nEF9xgpBLPtkZsks9cnb5P9iBEi21En3gg== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-jsx" "^7.10.4" - -"@babel/plugin-transform-react-jsx-source@^7.10.4": - version "7.10.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.10.5.tgz#34f1779117520a779c054f2cdd9680435b9222b4" - integrity sha512-wTeqHVkN1lfPLubRiZH3o73f4rfon42HpgxUSs86Nc+8QIcm/B9s8NNVXu/gwGcOyd7yDib9ikxoDLxJP0UiDA== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-jsx" "^7.10.4" - -"@babel/plugin-transform-react-jsx@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.10.4.tgz#673c9f913948764a4421683b2bef2936968fddf2" - integrity sha512-L+MfRhWjX0eI7Js093MM6MacKU4M6dnCRa/QPDwYMxjljzSCzzlzKzj9Pk4P3OtrPcxr2N3znR419nr3Xw+65A== - dependencies: - "@babel/helper-builder-react-jsx" "^7.10.4" - "@babel/helper-builder-react-jsx-experimental" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-jsx" "^7.10.4" - -"@babel/plugin-transform-react-pure-annotations@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.10.4.tgz#3eefbb73db94afbc075f097523e445354a1c6501" - integrity sha512-+njZkqcOuS8RaPakrnR9KvxjoG1ASJWpoIv/doyWngId88JoFlPlISenGXjrVacZUIALGUr6eodRs1vmPnF23A== - dependencies: - "@babel/helper-annotate-as-pure" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-regenerator@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.10.4.tgz#2015e59d839074e76838de2159db421966fd8b63" - integrity sha512-3thAHwtor39A7C04XucbMg17RcZ3Qppfxr22wYzZNcVIkPHfpM9J0SO8zuCV6SZa265kxBJSrfKTvDCYqBFXGw== - dependencies: - regenerator-transform "^0.14.2" - -"@babel/plugin-transform-reserved-words@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.10.4.tgz#8f2682bcdcef9ed327e1b0861585d7013f8a54dd" - integrity sha512-hGsw1O6Rew1fkFbDImZIEqA8GoidwTAilwCyWqLBM9f+e/u/sQMQu7uX6dyokfOayRuuVfKOW4O7HvaBWM+JlQ== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-shorthand-properties@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.10.4.tgz#9fd25ec5cdd555bb7f473e5e6ee1c971eede4dd6" - integrity sha512-AC2K/t7o07KeTIxMoHneyX90v3zkm5cjHJEokrPEAGEy3UCp8sLKfnfOIGdZ194fyN4wfX/zZUWT9trJZ0qc+Q== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-spread@^7.11.0": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.11.0.tgz#fa84d300f5e4f57752fe41a6d1b3c554f13f17cc" - integrity sha512-UwQYGOqIdQJe4aWNyS7noqAnN2VbaczPLiEtln+zPowRNlD+79w3oi2TWfYe0eZgd+gjZCbsydN7lzWysDt+gw== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/helper-skip-transparent-expression-wrappers" "^7.11.0" - -"@babel/plugin-transform-sticky-regex@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.10.4.tgz#8f3889ee8657581130a29d9cc91d7c73b7c4a28d" - integrity sha512-Ddy3QZfIbEV0VYcVtFDCjeE4xwVTJWTmUtorAJkn6u/92Z/nWJNV+mILyqHKrUxXYKA2EoCilgoPePymKL4DvQ== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/helper-regex" "^7.10.4" - -"@babel/plugin-transform-template-literals@^7.10.4": - version "7.10.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.10.5.tgz#78bc5d626a6642db3312d9d0f001f5e7639fde8c" - integrity sha512-V/lnPGIb+KT12OQikDvgSuesRX14ck5FfJXt6+tXhdkJ+Vsd0lDCVtF6jcB4rNClYFzaB2jusZ+lNISDk2mMMw== - dependencies: - "@babel/helper-annotate-as-pure" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-typeof-symbol@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.10.4.tgz#9509f1a7eec31c4edbffe137c16cc33ff0bc5bfc" - integrity sha512-QqNgYwuuW0y0H+kUE/GWSR45t/ccRhe14Fs/4ZRouNNQsyd4o3PG4OtHiIrepbM2WKUBDAXKCAK/Lk4VhzTaGA== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-typescript@^7.4.5": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.11.0.tgz#2b4879676af37342ebb278216dd090ac67f13abb" - integrity sha512-edJsNzTtvb3MaXQwj8403B7mZoGu9ElDJQZOKjGUnvilquxBA3IQoEIOvkX/1O8xfAsnHS/oQhe2w/IXrr+w0w== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.10.5" - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-typescript" "^7.10.4" - -"@babel/plugin-transform-unicode-escapes@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.10.4.tgz#feae523391c7651ddac115dae0a9d06857892007" - integrity sha512-y5XJ9waMti2J+e7ij20e+aH+fho7Wb7W8rNuu72aKRwCHFqQdhkdU2lo3uZ9tQuboEJcUFayXdARhcxLQ3+6Fg== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-unicode-regex@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.10.4.tgz#e56d71f9282fac6db09c82742055576d5e6d80a8" - integrity sha512-wNfsc4s8N2qnIwpO/WP2ZiSyjfpTamT2C9V9FDH/Ljub9zw6P3SjkXcFmc0RQUt96k2fmIvtla2MMjgTwIAC+A== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/preset-env@^7.0.0", "@babel/preset-env@^7.4.0": - version "7.11.5" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.11.5.tgz#18cb4b9379e3e92ffea92c07471a99a2914e4272" - integrity sha512-kXqmW1jVcnB2cdueV+fyBM8estd5mlNfaQi6lwLgRwCby4edpavgbFhiBNjmWA3JpB/yZGSISa7Srf+TwxDQoA== - dependencies: - "@babel/compat-data" "^7.11.0" - "@babel/helper-compilation-targets" "^7.10.4" - "@babel/helper-module-imports" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-proposal-async-generator-functions" "^7.10.4" - "@babel/plugin-proposal-class-properties" "^7.10.4" - "@babel/plugin-proposal-dynamic-import" "^7.10.4" - "@babel/plugin-proposal-export-namespace-from" "^7.10.4" - "@babel/plugin-proposal-json-strings" "^7.10.4" - "@babel/plugin-proposal-logical-assignment-operators" "^7.11.0" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.10.4" - "@babel/plugin-proposal-numeric-separator" "^7.10.4" - "@babel/plugin-proposal-object-rest-spread" "^7.11.0" - "@babel/plugin-proposal-optional-catch-binding" "^7.10.4" - "@babel/plugin-proposal-optional-chaining" "^7.11.0" - "@babel/plugin-proposal-private-methods" "^7.10.4" - "@babel/plugin-proposal-unicode-property-regex" "^7.10.4" - "@babel/plugin-syntax-async-generators" "^7.8.0" - "@babel/plugin-syntax-class-properties" "^7.10.4" - "@babel/plugin-syntax-dynamic-import" "^7.8.0" - "@babel/plugin-syntax-export-namespace-from" "^7.8.3" - "@babel/plugin-syntax-json-strings" "^7.8.0" - "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" - "@babel/plugin-syntax-numeric-separator" "^7.10.4" - "@babel/plugin-syntax-object-rest-spread" "^7.8.0" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" - "@babel/plugin-syntax-optional-chaining" "^7.8.0" - "@babel/plugin-syntax-top-level-await" "^7.10.4" - "@babel/plugin-transform-arrow-functions" "^7.10.4" - "@babel/plugin-transform-async-to-generator" "^7.10.4" - "@babel/plugin-transform-block-scoped-functions" "^7.10.4" - "@babel/plugin-transform-block-scoping" "^7.10.4" - "@babel/plugin-transform-classes" "^7.10.4" - "@babel/plugin-transform-computed-properties" "^7.10.4" - "@babel/plugin-transform-destructuring" "^7.10.4" - "@babel/plugin-transform-dotall-regex" "^7.10.4" - "@babel/plugin-transform-duplicate-keys" "^7.10.4" - "@babel/plugin-transform-exponentiation-operator" "^7.10.4" - "@babel/plugin-transform-for-of" "^7.10.4" - "@babel/plugin-transform-function-name" "^7.10.4" - "@babel/plugin-transform-literals" "^7.10.4" - "@babel/plugin-transform-member-expression-literals" "^7.10.4" - "@babel/plugin-transform-modules-amd" "^7.10.4" - "@babel/plugin-transform-modules-commonjs" "^7.10.4" - "@babel/plugin-transform-modules-systemjs" "^7.10.4" - "@babel/plugin-transform-modules-umd" "^7.10.4" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.10.4" - "@babel/plugin-transform-new-target" "^7.10.4" - "@babel/plugin-transform-object-super" "^7.10.4" - "@babel/plugin-transform-parameters" "^7.10.4" - "@babel/plugin-transform-property-literals" "^7.10.4" - "@babel/plugin-transform-regenerator" "^7.10.4" - "@babel/plugin-transform-reserved-words" "^7.10.4" - "@babel/plugin-transform-shorthand-properties" "^7.10.4" - "@babel/plugin-transform-spread" "^7.11.0" - "@babel/plugin-transform-sticky-regex" "^7.10.4" - "@babel/plugin-transform-template-literals" "^7.10.4" - "@babel/plugin-transform-typeof-symbol" "^7.10.4" - "@babel/plugin-transform-unicode-escapes" "^7.10.4" - "@babel/plugin-transform-unicode-regex" "^7.10.4" - "@babel/preset-modules" "^0.1.3" - "@babel/types" "^7.11.5" - browserslist "^4.12.0" - core-js-compat "^3.6.2" - invariant "^2.2.2" - levenary "^1.1.1" - semver "^5.5.0" - -"@babel/preset-modules@^0.1.3": - version "0.1.4" - resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.4.tgz#362f2b68c662842970fdb5e254ffc8fc1c2e415e" - integrity sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" - "@babel/plugin-transform-dotall-regex" "^7.4.4" - "@babel/types" "^7.4.4" - esutils "^2.0.2" - -"@babel/preset-react@^7.0.0": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.10.4.tgz#92e8a66d816f9911d11d4cc935be67adfc82dbcf" - integrity sha512-BrHp4TgOIy4M19JAfO1LhycVXOPWdDbTRep7eVyatf174Hff+6Uk53sDyajqZPu8W1qXRBiYOfIamek6jA7YVw== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-transform-react-display-name" "^7.10.4" - "@babel/plugin-transform-react-jsx" "^7.10.4" - "@babel/plugin-transform-react-jsx-development" "^7.10.4" - "@babel/plugin-transform-react-jsx-self" "^7.10.4" - "@babel/plugin-transform-react-jsx-source" "^7.10.4" - "@babel/plugin-transform-react-pure-annotations" "^7.10.4" - -"@babel/runtime@^7.8.4": - version "7.11.2" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.11.2.tgz#f549c13c754cc40b87644b9fa9f09a6a95fe0736" - integrity sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw== - dependencies: - regenerator-runtime "^0.13.4" - "@babel/template@^7.10.4", "@babel/template@^7.3.3", "@babel/template@^7.4.0": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.10.4.tgz#3251996c4200ebc71d1a8fc405fba940f36ba278" @@ -943,7 +241,7 @@ "@babel/parser" "^7.10.4" "@babel/types" "^7.10.4" -"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.10.4", "@babel/traverse@^7.11.5", "@babel/traverse@^7.2.3", "@babel/traverse@^7.4.3": +"@babel/traverse@^7.1.0", "@babel/traverse@^7.10.4", "@babel/traverse@^7.11.5", "@babel/traverse@^7.4.3": version "7.11.5" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.11.5.tgz#be777b93b518eb6d76ee2e1ea1d143daa11e61c3" integrity sha512-EjiPXt+r7LiCZXEfRpSJd+jUMnBd4/9OUv7Nx3+0u9+eimMwJmG0Q98lw4/289JCoxSE8OolDMNZaaF/JZ69WQ== @@ -958,7 +256,7 @@ globals "^11.1.0" lodash "^4.17.19" -"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.11.0", "@babel/types@^7.11.5", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.0", "@babel/types@^7.4.4": +"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.11.0", "@babel/types@^7.11.5", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.0": version "7.11.5" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.11.5.tgz#d9de577d01252d77c6800cee039ee64faf75662d" integrity sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q== @@ -1075,11 +373,6 @@ unique-filename "^1.1.1" which "^1.3.1" -"@iarna/toml@^2.2.0": - version "2.2.5" - resolved "https://registry.yarnpkg.com/@iarna/toml/-/toml-2.2.5.tgz#b32366c89b43c6f8cefbdefac778b9c828e3ba8c" - integrity sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg== - "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -2126,822 +1419,38 @@ "@octokit/request-error" "^1.0.2" atob-lite "^2.0.0" before-after-hook "^2.0.0" - btoa-lite "^1.0.0" - deprecation "^2.0.0" - lodash.get "^4.4.2" - lodash.set "^4.3.2" - lodash.uniq "^4.5.0" - octokit-pagination-methods "^1.1.0" - once "^1.4.0" - universal-user-agent "^4.0.0" - -"@octokit/rest@^18.0.9": - version "18.0.9" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.9.tgz#964d707d914eb34b1787895fdcacff96de47844d" - integrity sha512-CC5+cIx974Ygx9lQNfUn7/oXDQ9kqGiKUC6j1A9bAVZZ7aoTF8K6yxu0pQhQrLBwSl92J6Z3iVDhGhGFgISCZg== - dependencies: - "@octokit/core" "^3.0.0" - "@octokit/plugin-paginate-rest" "^2.2.0" - "@octokit/plugin-request-log" "^1.0.0" - "@octokit/plugin-rest-endpoint-methods" "4.2.1" - -"@octokit/types@^2.0.0", "@octokit/types@^2.0.1": - version "2.16.2" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.16.2.tgz#4c5f8da3c6fecf3da1811aef678fda03edac35d2" - integrity sha512-O75k56TYvJ8WpAakWwYRN8Bgu60KrmX0z1KqFp1kNiFNkgW+JW+9EBKZ+S33PU6SLvbihqd+3drvPxKK68Ee8Q== - dependencies: - "@types/node" ">= 8" - -"@octokit/types@^5.0.0", "@octokit/types@^5.0.1", "@octokit/types@^5.5.0": - version "5.5.0" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-5.5.0.tgz#e5f06e8db21246ca102aa28444cdb13ae17a139b" - integrity sha512-UZ1pErDue6bZNjYOotCNveTXArOMZQFG6hKJfOnGnulVCMcVVi7YIIuuR4WfBhjo7zgpmzn/BkPDnUXtNx+PcQ== - dependencies: - "@types/node" ">= 8" - -"@parcel/babel-ast-utils@2.0.0-nightly.2071+837d1fbd": - version "2.0.0-nightly.2071" - resolved "https://registry.yarnpkg.com/@parcel/babel-ast-utils/-/babel-ast-utils-2.0.0-nightly.2071.tgz#e2f0f84f9da701debb36d412fbe9b9f0a793f261" - integrity sha512-Y5qKBqvneFuDEMT0G9SZlbxJz5dEyF1+BIFyQC01zydNCzbrff/BVyLsEzFRBthSefzW6wUfTKnxUdWcpygTeQ== - dependencies: - "@babel/generator" "^7.0.0" - "@babel/parser" "^7.0.0" - "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - -"@parcel/babel-preset-env@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/babel-preset-env/-/babel-preset-env-2.0.0-nightly.449.tgz#90b382dc53f040585a7f69b18c9c56003b24e7cd" - integrity sha512-xoUBvWrkft85Ch9bai4vLytgUeYshHJS/jRGJgbhaa4Vle6/R4QfP4i9mmq/Ai3Wbk2iErznlkFVS9T4gCQI/g== - dependencies: - "@babel/preset-env" "^7.4.0" - semver "^5.4.1" - -"@parcel/babylon-walk@2.0.0-nightly.2071+837d1fbd": - version "2.0.0-nightly.2071" - resolved "https://registry.yarnpkg.com/@parcel/babylon-walk/-/babylon-walk-2.0.0-nightly.2071.tgz#f4d49163214074d2cd2bbc43cd2602eaf993cb53" - integrity sha512-MXStP3yWHGCY2nRGi6kh9ezeS3x9ITUCZn0zX80TJc183I/Cz1PHcJKqeS0lwXl8VtPFqDvjXVqoSBY8UCFQ9g== - dependencies: - "@babel/types" "^7.0.0" - lodash.clone "^4.5.0" - -"@parcel/bundler-default@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.0.0-nightly.449.tgz#1898eb0a5b2bc42748a1b56eb695787ee4d808dc" - integrity sha512-92vgvqsBKPSamstAcfAkKDLCbw5r2IP9FL6PVSb0u6gmCuOKCUMM4JUtoiAWm0njSSmW1B3Zqtzbhfu2JlNflQ== - dependencies: - "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - nullthrows "^1.1.1" - -"@parcel/cache@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/cache/-/cache-2.0.0-nightly.449.tgz#8d3cbcfd79657fc8a83a8fa920b14e985b57e878" - integrity sha512-SYtpAKL4+AuHINgxfqrKwdG26jxsAJgeETpk9ILm9FvwOw40H9ImktNYIiT5dYaehpmuOl35msVlkocNWWHOjA== - dependencies: - "@parcel/logger" "2.0.0-nightly.449+837d1fbd" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - -"@parcel/codeframe@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/codeframe/-/codeframe-2.0.0-nightly.449.tgz#77c7ba848cdef8dd7cedfa122b422acf824fc821" - integrity sha512-GrA41h6DCM9zTwo0LRu6aWCoFhlAVIB5hsZO1i6GcKrl9hb5RxRWt56YSPdigN67S4FCY0XyfrS6M98yaHrb2w== - dependencies: - chalk "^2.4.2" - emphasize "^2.1.0" - slice-ansi "^4.0.0" - string-width "^4.2.0" - -"@parcel/config-default@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/config-default/-/config-default-2.0.0-nightly.449.tgz#0b34f279469c3cf5b343da369b7c77b5472992c5" - integrity sha512-5gsByLMQbUmKAtLf79diY4AcP2mTkMd2ljuLZ6oJMNDL8viqG0pCFvp88KBC/xKg8NpU5gvj2mLrwG6pkOzu+Q== - dependencies: - "@parcel/bundler-default" "2.0.0-nightly.449+837d1fbd" - "@parcel/namer-default" "2.0.0-nightly.449+837d1fbd" - "@parcel/optimizer-cssnano" "2.0.0-nightly.449+837d1fbd" - "@parcel/optimizer-data-url" "2.0.0-nightly.449+837d1fbd" - "@parcel/optimizer-htmlnano" "2.0.0-nightly.449+837d1fbd" - "@parcel/optimizer-terser" "2.0.0-nightly.449+837d1fbd" - "@parcel/packager-css" "2.0.0-nightly.449+837d1fbd" - "@parcel/packager-html" "2.0.0-nightly.449+837d1fbd" - "@parcel/packager-js" "2.0.0-nightly.449+837d1fbd" - "@parcel/packager-raw" "2.0.0-nightly.449+837d1fbd" - "@parcel/packager-raw-url" "2.0.0-nightly.2071+837d1fbd" - "@parcel/packager-ts" "2.0.0-nightly.449+837d1fbd" - "@parcel/reporter-bundle-analyzer" "2.0.0-nightly.2071+837d1fbd" - "@parcel/reporter-bundle-buddy" "2.0.0-nightly.2071+837d1fbd" - "@parcel/reporter-cli" "2.0.0-nightly.449+837d1fbd" - "@parcel/reporter-dev-server" "2.0.0-nightly.449+837d1fbd" - "@parcel/resolver-default" "2.0.0-nightly.449+837d1fbd" - "@parcel/runtime-browser-hmr" "2.0.0-nightly.449+837d1fbd" - "@parcel/runtime-js" "2.0.0-nightly.449+837d1fbd" - "@parcel/runtime-react-refresh" "2.0.0-nightly.449+837d1fbd" - "@parcel/transformer-babel" "2.0.0-nightly.449+837d1fbd" - "@parcel/transformer-coffeescript" "2.0.0-nightly.449+837d1fbd" - "@parcel/transformer-css" "2.0.0-nightly.449+837d1fbd" - "@parcel/transformer-glsl" "2.0.0-nightly.2071+837d1fbd" - "@parcel/transformer-graphql" "2.0.0-nightly.449+837d1fbd" - "@parcel/transformer-html" "2.0.0-nightly.449+837d1fbd" - "@parcel/transformer-image" "2.0.0-nightly.2071+837d1fbd" - "@parcel/transformer-inline-string" "2.0.0-nightly.449+837d1fbd" - "@parcel/transformer-js" "2.0.0-nightly.449+837d1fbd" - "@parcel/transformer-json" "2.0.0-nightly.449+837d1fbd" - "@parcel/transformer-jsonld" "2.0.0-nightly.2071+837d1fbd" - "@parcel/transformer-less" "2.0.0-nightly.449+837d1fbd" - "@parcel/transformer-mdx" "2.0.0-nightly.2071+837d1fbd" - "@parcel/transformer-postcss" "2.0.0-nightly.449+837d1fbd" - "@parcel/transformer-posthtml" "2.0.0-nightly.449+837d1fbd" - "@parcel/transformer-pug" "2.0.0-nightly.449+837d1fbd" - "@parcel/transformer-raw" "2.0.0-nightly.449+837d1fbd" - "@parcel/transformer-react-refresh-babel" "2.0.0-nightly.449+837d1fbd" - "@parcel/transformer-react-refresh-wrap" "2.0.0-nightly.449+837d1fbd" - "@parcel/transformer-sass" "2.0.0-nightly.449+837d1fbd" - "@parcel/transformer-stylus" "2.0.0-nightly.449+837d1fbd" - "@parcel/transformer-sugarss" "2.0.0-nightly.449+837d1fbd" - "@parcel/transformer-toml" "2.0.0-nightly.449+837d1fbd" - "@parcel/transformer-typescript-types" "2.0.0-nightly.449+837d1fbd" - "@parcel/transformer-vue" "2.0.0-nightly.2071+837d1fbd" - "@parcel/transformer-yaml" "2.0.0-nightly.449+837d1fbd" - -"@parcel/core@2.0.0-nightly.447+837d1fbd": - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/@parcel/core/-/core-2.0.0-nightly.447.tgz#ddf02b86f3a62b5f74259d9d97703592d8797ea6" - integrity sha512-UUL9+mytJo48Uze954POXkWEnv4l1NuPNFdP4FKunyeRSQp4hK8jBMFctLDigVYXXs/pQ8q0pxDIkWfucf86dg== - dependencies: - "@parcel/cache" "2.0.0-nightly.449+837d1fbd" - "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" - "@parcel/events" "2.0.0-nightly.449+837d1fbd" - "@parcel/fs" "2.0.0-nightly.449+837d1fbd" - "@parcel/logger" "2.0.0-nightly.449+837d1fbd" - "@parcel/package-manager" "2.0.0-nightly.449+837d1fbd" - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/types" "2.0.0-nightly.449+837d1fbd" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - "@parcel/workers" "2.0.0-nightly.449+837d1fbd" - abortcontroller-polyfill "^1.1.9" - base-x "^3.0.8" - browserslist "^4.6.6" - clone "^2.1.1" - dotenv "^7.0.0" - dotenv-expand "^5.1.0" - json-source-map "^0.6.1" - json5 "^1.0.1" - micromatch "^4.0.2" - nullthrows "^1.1.1" - querystring "^0.2.0" - semver "^5.4.1" - -"@parcel/diagnostic@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/diagnostic/-/diagnostic-2.0.0-nightly.449.tgz#5ea6f709fad1376ae833497b507422661115a95e" - integrity sha512-HUR5X9cDjBpTeWzB0kBhudv6enSTBPng1f5x2SJUnPKIK1EdpEKGXIei4xwvTH1Tz0oIHcIVhrx2k4AZtaALPg== - dependencies: - json-source-map "^0.6.1" - nullthrows "^1.1.1" - -"@parcel/events@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/events/-/events-2.0.0-nightly.449.tgz#e7e41c368c7f1357e118c1da4264e7add57b6475" - integrity sha512-gOGHFGWW3tvBXSmXj6fKGfCTsjVV0KHrka5mL0vrNpi6n0LUQgpPtsZJokyQy91U/B5neUtLX/ubQT0gordqjA== - -"@parcel/fs-write-stream-atomic@2.0.0-nightly.2071+837d1fbd": - version "2.0.0-nightly.2071" - resolved "https://registry.yarnpkg.com/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.0-nightly.2071.tgz#e239927e1d6b55a7b8ae2445f3839483752e75d6" - integrity sha512-Liv3eXtB5Ap/HvLyAmbBNdil9K33YlPJkDcTQjji9vt9PS7K53rX4woHIgdBvFmzOk54jZMbBgfwwxr1Z3Qu1g== - dependencies: - graceful-fs "^4.1.2" - iferr "^1.0.2" - imurmurhash "^0.1.4" - readable-stream "1 || 2" - -"@parcel/fs@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-2.0.0-nightly.449.tgz#07822ea3db9a558015db223fa0dbb1edaca6a449" - integrity sha512-k2MiwJr0NSodBUKud1h2cxYurJXgscrYpFDZTPYnyoJk0YBPHZcjmQBivXkX0ImH9MwOYIpRg/7dPDwnSaykXg== - dependencies: - "@parcel/fs-write-stream-atomic" "2.0.0-nightly.2071+837d1fbd" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - "@parcel/watcher" "2.0.0-alpha.8" - "@parcel/workers" "2.0.0-nightly.449+837d1fbd" - graceful-fs "^4.2.4" - mkdirp "^0.5.1" - ncp "^2.0.0" - nullthrows "^1.1.1" - rimraf "^3.0.2" - -"@parcel/logger@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-2.0.0-nightly.449.tgz#0a088eacaa32fca33fc835d382feecda86b3d54c" - integrity sha512-ZEuV2tx3aPTW/Ceo2SzS9cQbyNPmkJHKESGwFx7SWke2hZaIsyh6BqgDNGpnNkzK6mD2fgMzgNajb+FeH0IJww== - dependencies: - "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" - "@parcel/events" "2.0.0-nightly.449+837d1fbd" - -"@parcel/markdown-ansi@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/markdown-ansi/-/markdown-ansi-2.0.0-nightly.449.tgz#27f75e203b4fa67bebfb0b34c4951319e32d4ea3" - integrity sha512-MaygzYxLEc9IzIttqe+W8W9XpgsthoSiPgkJOpWlY7ICvKr3yHAlbmPgawbbNpMukjSzqOrcgDTwe22F/wV5ww== - dependencies: - chalk "^2.4.2" - -"@parcel/namer-default@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/namer-default/-/namer-default-2.0.0-nightly.449.tgz#448a1ad3b0dc38f0431cf1ebdee8403d73d05519" - integrity sha512-KVskg+otIp5P2hRnezWqmPMN5h44Bgh2pJ/1gcktfsKJUVygYeb1oPz+4Z+l32dkYlLlR05A0/+oZTzhCb0KcA== - dependencies: - "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - nullthrows "^1.1.1" - -"@parcel/node-libs-browser@2.0.0-nightly.2071+837d1fbd": - version "2.0.0-nightly.2071" - resolved "https://registry.yarnpkg.com/@parcel/node-libs-browser/-/node-libs-browser-2.0.0-nightly.2071.tgz#08a3a1de1e3d3c4fdab4e302abbbc325c0e604e0" - integrity sha512-L+0XNhMbQUvHyra9X3vvV+k2SnO5YPlHvew/6sClQNh+osXWz/FW/Uxi0pVwyrjqJAPS+0PQ4xV8CynvqYZUTg== - dependencies: - assert "^2.0.0" - browserify-zlib "^0.2.0" - buffer "^5.5.0" - console-browserify "^1.2.0" - constants-browserify "^1.0.0" - crypto-browserify "^3.12.0" - domain-browser "^3.5.0" - events "^3.1.0" - https-browserify "^1.0.0" - os-browserify "^0.3.0" - path-browserify "^1.0.0" - process "^0.11.10" - punycode "^1.4.1" - querystring-es3 "^0.2.1" - readable-stream "^3.6.0" - stream-http "^3.1.0" - string_decoder "^1.3.0" - timers-browserify "^2.0.11" - tty-browserify "^0.0.1" - url "^0.11.0" - util "^0.12.3" - vm-browserify "^1.1.2" - -"@parcel/node-resolver-core@2.0.0-nightly.2071+837d1fbd": - version "2.0.0-nightly.2071" - resolved "https://registry.yarnpkg.com/@parcel/node-resolver-core/-/node-resolver-core-2.0.0-nightly.2071.tgz#a725fa191419b2e1a64ef970ac1c08858c822cc3" - integrity sha512-3W1qH5QgExDLd82EJMF9EJkAd7vSN3B7u554CKjCnrv6+oUwwWYySI8o8pdPZNpDhlXx+amUhg76IMPfqfxWUw== - dependencies: - "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" - "@parcel/node-libs-browser" "2.0.0-nightly.2071+837d1fbd" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - micromatch "^3.0.4" - nullthrows "^1.1.1" - querystring "^0.2.0" - -"@parcel/optimizer-cssnano@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.0.0-nightly.449.tgz#f22c22863df7b23a70fab857e89377fd2376ce3d" - integrity sha512-2iuro2UrzDbfJPgke0CpwmQpR+Nf9NiiUV31JvdM8m2uBRafhMVQV6DXlFUwqfvFu4WkBfgvt6tSOZtpaobKGA== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/source-map" "2.0.0-alpha.4.16" - cssnano "^4.1.10" - postcss "^8.0.5" - -"@parcel/optimizer-data-url@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-data-url/-/optimizer-data-url-2.0.0-nightly.449.tgz#afa33f9cc38b6f4f9b56b39e951529f5883f4549" - integrity sha512-RGFQ5KAv8/U05WnKA11vw7olWLAY5INuwIPZA22e6j1pr5mWNB0kdyHu3WgU4dAVmz7J7KcwWtPrBx+PgKvE6A== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - isbinaryfile "^4.0.2" - mime "^2.4.4" - -"@parcel/optimizer-htmlnano@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.0.0-nightly.449.tgz#30ebdb834b2ac35fbd2ce8570e564c5c47a303f8" - integrity sha512-da4/qr+LlZn/QEyh+NAhkLY1rz64NjnHUR/49UweJSCmtTK4WKPmByawQPyg/++7fWVmeqUu39bKeZW7yzsqGA== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - htmlnano "^0.2.2" - nullthrows "^1.1.1" - posthtml "^0.11.3" - -"@parcel/optimizer-terser@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-terser/-/optimizer-terser-2.0.0-nightly.449.tgz#7834577cb4a87071ae99d82d4ff1bab0853fdb80" - integrity sha512-WpGIbULuwIPhxbPmJ7do1fyxxmhY+aluQomptwopZsL9tPB4jqceGH3LHPbghn+r25qneaQKvwt5mjtrOHcYvg== - dependencies: - "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - nullthrows "^1.1.1" - terser "^5.2.0" - -"@parcel/package-manager@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/package-manager/-/package-manager-2.0.0-nightly.449.tgz#3374d94997d48bc55f0c2c284a4fdde3c154eccc" - integrity sha512-hhBg3CZSe07dGAddE8Ft0ZP1fbaJ1v3jMgWSIO3uMwVYCIHiOs2KkIqMsiFaqlMesbeEQrSR0QiovTyUa3FGJg== - dependencies: - "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" - "@parcel/fs" "2.0.0-nightly.449+837d1fbd" - "@parcel/logger" "2.0.0-nightly.449+837d1fbd" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - "@parcel/workers" "2.0.0-nightly.449+837d1fbd" - command-exists "^1.2.6" - cross-spawn "^6.0.4" - nullthrows "^1.1.1" - resolve "^1.12.0" - semver "^5.4.1" - split2 "^3.1.1" - -"@parcel/packager-css@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/packager-css/-/packager-css-2.0.0-nightly.449.tgz#961e747e88dfcaf7037454887412b57f10532a4a" - integrity sha512-QPb67kErKKIVohmFKNiH9oysW/NoLRJMgOeZXmXzQ8wT2IYHdKmcBuer7DcWKegU4dCkrCd7IRx8dSnQcoQqAA== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - -"@parcel/packager-html@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/packager-html/-/packager-html-2.0.0-nightly.449.tgz#3a8e07496ae23da802a217ed6c82df5b9529a0e1" - integrity sha512-x6IWTU4w0Mfc1m8jcHUradSM9XrRX2umPk7QjhQ5X+v07N0diBpPoqnVSd4ujO29VYFHjh9by5dm3uEkF3mBLg== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/types" "2.0.0-nightly.449+837d1fbd" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - nullthrows "^1.1.1" - posthtml "^0.11.3" - -"@parcel/packager-js@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/packager-js/-/packager-js-2.0.0-nightly.449.tgz#ce9e8c165c8f3f0c2ba8c447cc3b55c523c892e0" - integrity sha512-D/ixE0TzZ+Iq7t1gSsSWrh/HUzohJ2eBggxQnim0E/ymkj3TxuGRh4NLTSweThEiA2xyR7EVeYhM6aq4rZp/pw== - dependencies: - "@babel/traverse" "^7.2.3" - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/scope-hoisting" "2.0.0-nightly.449+837d1fbd" - "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - nullthrows "^1.1.1" - -"@parcel/packager-raw-url@2.0.0-nightly.2071+837d1fbd": - version "2.0.0-nightly.2071" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw-url/-/packager-raw-url-2.0.0-nightly.2071.tgz#6adda25e448f0edbf707b54a75129b21a4c99c44" - integrity sha512-sNAUDE35DCe/0yI3jjDC8Lfy8RY5xxT0RRBII89aVx2VxhpEqSAGSLw0xHSh2OsWPBxvFaLzGbyyLZ9TOe/Y6Q== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - -"@parcel/packager-raw@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw/-/packager-raw-2.0.0-nightly.449.tgz#d3e14dc2d8c80d4ace8a01ce7a1718479c74dda6" - integrity sha512-PC5amaAv6cVzkP+CUDpgm58IKH0fS6AEHEJKuXbCUcLbYmnaDh2JUjDb2q6pXbTT7uITNUtC62FHTtXZdyHWCw== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - -"@parcel/packager-ts@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/packager-ts/-/packager-ts-2.0.0-nightly.449.tgz#8970151da387141a7d0328a3d41c7d1e09b545f5" - integrity sha512-GxxdUaHX6BvxFST7UEK1oJF/btaXfv4cBMixuA4Ii+ENvcISh/X4bhA8KlfKoquyFo0/58Enq0zo6u/psjkBlA== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - -"@parcel/plugin@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/plugin/-/plugin-2.0.0-nightly.449.tgz#3299648d71296068a2f259803e241fcbcc034b26" - integrity sha512-FocqYaPUytyrC5AE1aYszb+e1gdsFAecHPgJYc/iEnVwM+eCIRArVbLqvudZoFBTcSM26F2uyBoIjMtiqhWpmg== - dependencies: - "@parcel/types" "2.0.0-nightly.449+837d1fbd" - -"@parcel/reporter-bundle-analyzer@2.0.0-nightly.2071+837d1fbd": - version "2.0.0-nightly.2071" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.0.0-nightly.2071.tgz#f4ff3848c0957c37dfe2c5107822268f86fce51e" - integrity sha512-V201PqmBwMy4JjuRaCDtMjKeTcQFB8QHaGRAtudD+FI2ulsms3m0yMTabmRrt2VAQH97gVF8HtqkHF5aKDU9rA== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - nullthrows "^1.1.1" - -"@parcel/reporter-bundle-buddy@2.0.0-nightly.2071+837d1fbd": - version "2.0.0-nightly.2071" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-buddy/-/reporter-bundle-buddy-2.0.0-nightly.2071.tgz#a3a93797ec9554da98292f960975565296b88a72" - integrity sha512-/UfvDyhwqNP8AoDrvFMkpKTZIJVKDTr7sRi/2gxxnhf2LW+qoLOpSsWSWue679tTntOKCqMhAUI/SS6YlNI0rQ== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - -"@parcel/reporter-cli@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/reporter-cli/-/reporter-cli-2.0.0-nightly.449.tgz#4d8df81dc6ad464b79c304ee4cfb1b52629af29a" - integrity sha512-GsgC96hWZPqVVU6xqj4o1ddAhSM+EoEu7LTm/41T6tyW3Qv9OmfprsKUbSMK+48HZLL1UVJ0mEK/T4f7K+dg0Q== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/types" "2.0.0-nightly.449+837d1fbd" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - chalk "^3.0.0" - filesize "^3.6.0" - nullthrows "^1.1.1" - ora "^4.0.3" - string-width "^4.2.0" - strip-ansi "^6.0.0" - term-size "^2.1.1" - -"@parcel/reporter-dev-server@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/reporter-dev-server/-/reporter-dev-server-2.0.0-nightly.449.tgz#5ec9ec25d3696f52ccc8c92018d78caff470e070" - integrity sha512-49s+jUBClCqdWMNTk2IvpAoRWf2axjXrB615mO5WGeVqBEZIHaSKA2WpfsaKb4mbJYmqNGKrBZbUqwK0lA2YlA== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - connect "^3.7.0" - ejs "^2.6.1" - http-proxy-middleware "^1.0.0" - nullthrows "^1.1.1" - serve-handler "^6.0.0" - ws "^6.2.0" - -"@parcel/resolver-default@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/resolver-default/-/resolver-default-2.0.0-nightly.449.tgz#9d3465c225614598b0ab68f62fae0dab4c0d71d5" - integrity sha512-+V9IjjZPhkjCF2GppU/QSlnnQkOLGd3WNvJkRPOEWZtIpVOVy7lzoL9rBPFoE94aHwM0m4BolqyuiYv/6nqTpg== - dependencies: - "@parcel/node-resolver-core" "2.0.0-nightly.2071+837d1fbd" - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - -"@parcel/runtime-browser-hmr@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.0.0-nightly.449.tgz#5bb4f08873193dd4cab8e134ec5ead1066d2509d" - integrity sha512-okbif6vgJ6bMbjGuJk6I/+zBnP/OJeT8eKWii9uvZmN2tZv1MoIgXrXIJdNsUgunBPHur9dozk5K8cO1zTazuQ== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - -"@parcel/runtime-js@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/runtime-js/-/runtime-js-2.0.0-nightly.449.tgz#26c4b28a1f05a26bddbbe95d45c9589048ed2086" - integrity sha512-GSUFxH/XxeN3tAezPOCHVS84NqYUJln2N1W8N8f1HRm1w52NB8VCIeB0mMuM0lGH1GM9le48oAHzISEixLkH4g== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - nullthrows "^1.1.1" - -"@parcel/runtime-react-refresh@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.0.0-nightly.449.tgz#e3903b5c6dbf46c296966f4787905553f853ea13" - integrity sha512-ltrrakt2uCZ5Q6tDST2l5Ums4KpB9dM0kuZcwa6qJCpn4+YCYb1fVO3VSgk4zIVNhRdVwZspB+TEF2xLlBlWzA== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - react-refresh "^0.9.0" - -"@parcel/scope-hoisting@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/scope-hoisting/-/scope-hoisting-2.0.0-nightly.449.tgz#9fbe4b8bf479e7bfc96f076aef0308ae2545058e" - integrity sha512-R3lgrFVUccomYxN/A76qTCqav2+yU2OO5fb6qttUY7d0syQOuj72Vmj6X4djv8XD1wZMVpmGmWumr8if+UdqxQ== - dependencies: - "@babel/generator" "^7.3.3" - "@babel/parser" "^7.0.0" - "@babel/template" "^7.4.0" - "@babel/traverse" "^7.2.3" - "@babel/types" "^7.3.3" - "@parcel/babel-ast-utils" "2.0.0-nightly.2071+837d1fbd" - "@parcel/babylon-walk" "2.0.0-nightly.2071+837d1fbd" - "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" - "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - nullthrows "^1.1.1" - -"@parcel/source-map@2.0.0-alpha.4.16": - version "2.0.0-alpha.4.16" - resolved "https://registry.yarnpkg.com/@parcel/source-map/-/source-map-2.0.0-alpha.4.16.tgz#d311b82f352300a829d76ab6a9f9d0c63ed9490c" - integrity sha512-yA1ulttYIbmZVzwCO1EipQVqBqZAoiFK/yAhum/00nQfqBilz+1LdahKSZnQ0LSqk42o1qAULAb5UHo73/rRDA== - dependencies: - node-addon-api "^3.0.0" - node-gyp-build "^4.2.2" - -"@parcel/transformer-babel@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/transformer-babel/-/transformer-babel-2.0.0-nightly.449.tgz#099259ef4ac9f02f61cc5c6ff8102d07489345cf" - integrity sha512-BTuOrG892ZmAx7M3jT0WX+2Yxi/bLtbuDWP8SfH9lXgrCJtx6fPObk7mqIrTvdmefKjeLcRmig1nS7XcnFKJPA== - dependencies: - "@babel/core" "^7.0.0" - "@babel/generator" "^7.0.0" - "@babel/helper-compilation-targets" "^7.8.4" - "@babel/plugin-transform-flow-strip-types" "^7.0.0" - "@babel/plugin-transform-typescript" "^7.4.5" - "@babel/preset-env" "^7.0.0" - "@babel/preset-react" "^7.0.0" - "@babel/traverse" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2071+837d1fbd" - "@parcel/babel-preset-env" "2.0.0-nightly.449+837d1fbd" - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - browserslist "^4.6.6" - core-js "^3.2.1" - nullthrows "^1.1.1" - semver "^5.7.0" - -"@parcel/transformer-coffeescript@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/transformer-coffeescript/-/transformer-coffeescript-2.0.0-nightly.449.tgz#a1bcf008ec744aa29875081808e6e7f4072b2c68" - integrity sha512-VxpRqifHbgUlNLcJRqcScdcquqSpQ+PUEevZuJmFsGa1SWIFisG0enfSgQL3eI6DbcT+a06tDMwkOTwm9Fx4+w== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - coffeescript "^2.0.3" - nullthrows "^1.1.1" - semver "^5.4.1" - -"@parcel/transformer-css@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/transformer-css/-/transformer-css-2.0.0-nightly.449.tgz#78b87be06020aed3463f2acaa8761c7e535e888d" - integrity sha512-YN3mVmIsNHDpNasxevaY0m9jSJzESyRWIfN4P6LkhS1al69KEWxIOmshGB5EV+r7GJ7MmealZP1x74mjJCzK1Q== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - postcss "^8.0.5" - postcss-value-parser "^4.1.0" - semver "^5.4.1" - -"@parcel/transformer-glsl@2.0.0-nightly.2071+837d1fbd": - version "2.0.0-nightly.2071" - resolved "https://registry.yarnpkg.com/@parcel/transformer-glsl/-/transformer-glsl-2.0.0-nightly.2071.tgz#fe62e491bff66fdc4817895600ba207cff582fb2" - integrity sha512-qfs82sSYbm6CspMvoQczi6Ec7KbvDJewubnxOG0xVA+1RokNbOrpWGXDf6QNhCVy91rPipd+w/stG4y4Qn3ACQ== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - -"@parcel/transformer-graphql@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/transformer-graphql/-/transformer-graphql-2.0.0-nightly.449.tgz#6014a1ffd2f0d0af3c84b6c8616770c54f9c428b" - integrity sha512-vbsUYTpqLBVXHW0VoKxu+iXjdnwB7BPvxCxhIBa/iaNIZRiMuX5IPovLVY4AxL+9EjdbAN5K93GMP7hcsDxLMQ== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - -"@parcel/transformer-html@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/transformer-html/-/transformer-html-2.0.0-nightly.449.tgz#c24aff17cce228fdd85da8604756e1f7165c28cd" - integrity sha512-hr3p6meUM+tZ2xL8NPEnc5b+9TIkAJIUJreMC1wpgcEmj6jqxTsDg0wnWNNP8hyYGE26VSal3aVGpnY+ad+Nww== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - nullthrows "^1.1.1" - posthtml "^0.11.3" - posthtml-parser "^0.4.1" - posthtml-render "^1.1.5" - semver "^5.4.1" - -"@parcel/transformer-image@2.0.0-nightly.2071+837d1fbd": - version "2.0.0-nightly.2071" - resolved "https://registry.yarnpkg.com/@parcel/transformer-image/-/transformer-image-2.0.0-nightly.2071.tgz#bc45d8ebe906fa91aa7b8d9a6735c78aad96a905" - integrity sha512-xqM71Gjl5AqTuZCXGw7dzJ7UDmQTJbAAJ/3A5OqOycl1iTPL0c2pAGSUkDRJRIX4380vplAgqYTco+FvBBvj3A== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - -"@parcel/transformer-inline-string@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.0.0-nightly.449.tgz#015aca67e176adb080d324931053c2ce86d70441" - integrity sha512-HSgsZcUhPNY5d55TZDR7N8lMff1yyi7zNw1ONsQyQeRG0POfWA3kMWbCvnAaVbM+VA3+en0fLtpJ4Lurn6T7Mg== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - -"@parcel/transformer-js@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.0.0-nightly.449.tgz#abd06895e8b3c0f1348f17a28bac9c7e87c2610f" - integrity sha512-5fPgwfW0+mJN4uq6yYHI9nkyGrS4Pg9U0Rc9Td7Fcc1jt82qIGE5LovZSonudw3tqnbpP6oqNEe/J48KdLdpBQ== - dependencies: - "@babel/core" "^7.0.0" - "@babel/generator" "^7.0.0" - "@babel/parser" "^7.0.0" - "@babel/plugin-transform-modules-commonjs" "^7.0.0" - "@babel/template" "^7.4.0" - "@babel/traverse" "^7.0.0" - "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2071+837d1fbd" - "@parcel/babylon-walk" "2.0.0-nightly.2071+837d1fbd" - "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/scope-hoisting" "2.0.0-nightly.449+837d1fbd" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - micromatch "^4.0.2" - nullthrows "^1.1.1" - semver "^5.4.1" - -"@parcel/transformer-json@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/transformer-json/-/transformer-json-2.0.0-nightly.449.tgz#18c4e9181bf55dd85bbee016427bda3864e742d7" - integrity sha512-2OIxk/Kk1AFj3ZrOK0DztchFFgnxp+sZBejKac8tPGrXO7IgixTKpsW+8wNCTWXdK8ohcg0+eCvIRw8IKfJgkQ== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - json5 "^2.1.0" - -"@parcel/transformer-jsonld@2.0.0-nightly.2071+837d1fbd": - version "2.0.0-nightly.2071" - resolved "https://registry.yarnpkg.com/@parcel/transformer-jsonld/-/transformer-jsonld-2.0.0-nightly.2071.tgz#bb9d432d9efafb17c9832f848644e97e964e8ce6" - integrity sha512-cdbqRIefMSwbxIBsMoLjr1M8V30Bs1BpjdTsQ7gJsc9hMJsx59LdRtOg8Dx6iwyuJwdQrpIYdi1IyaUJVrKsag== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/types" "2.0.0-nightly.449+837d1fbd" - json5 "^2.1.2" - -"@parcel/transformer-less@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/transformer-less/-/transformer-less-2.0.0-nightly.449.tgz#a4798842c463b7f4aa9b6e85dd790db55ef3a41b" - integrity sha512-cknM1CZjcbLIzbaUpi1kp7kjdkGFB7uxX0Dj7MKCVZKXOYFJlwGCycb/DXw1LRw+N4Tc6IjHaIsCGaw6Z7LGOw== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/source-map" "2.0.0-alpha.4.16" - -"@parcel/transformer-mdx@2.0.0-nightly.2071+837d1fbd": - version "2.0.0-nightly.2071" - resolved "https://registry.yarnpkg.com/@parcel/transformer-mdx/-/transformer-mdx-2.0.0-nightly.2071.tgz#ff7e77aec3897a9c80ffda3b21145545c9817fc9" - integrity sha512-LjnKXkUI6fTXRnT21uKVTRoPi7d4+o6kBS9O/ojEniDqe97zQ6qb4R2teSS2UuMtxVKWVp2ojXchC+V+frke/w== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - -"@parcel/transformer-postcss@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/transformer-postcss/-/transformer-postcss-2.0.0-nightly.449.tgz#d90d1ac841f253d04308603e78f21c93256b6705" - integrity sha512-QdAKy+dO9VEOAypJ7k75ah29zdPGgzECU7s6NqiAexcoAmgoOJEKQO9b3geVd7wyX7PBa+dHU1N1vnibUhA+ng== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - css-modules-loader-core "^1.1.0" - nullthrows "^1.1.1" - postcss-value-parser "^4.1.0" - semver "^5.4.1" - -"@parcel/transformer-posthtml@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/transformer-posthtml/-/transformer-posthtml-2.0.0-nightly.449.tgz#076f3b05d6d02b0391e48de126a8db12af761021" - integrity sha512-wpueXMbZRQxaRPlxP9qyYcJNPtfnVfpRcj2CneJ99gze+1eEO6GmjMdxrr4jq0ejruy+/qL7dTzXwcoQ3LllwQ== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - nullthrows "^1.1.1" - posthtml "^0.11.3" - posthtml-parser "^0.4.1" - posthtml-render "^1.1.5" - semver "^5.4.1" - -"@parcel/transformer-pug@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/transformer-pug/-/transformer-pug-2.0.0-nightly.449.tgz#cdafcb2be4bf3726d8958ff630a93b6b4b804457" - integrity sha512-gxCUN5CM88DpEfo7w9/Rihs93vNAFkeb7kjFSLxVdMWdm7rRc0OBuwBGSkihOZpqalF7r6BVxmE+wEJUp775kQ== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + btoa-lite "^1.0.0" + deprecation "^2.0.0" + lodash.get "^4.4.2" + lodash.set "^4.3.2" + lodash.uniq "^4.5.0" + octokit-pagination-methods "^1.1.0" + once "^1.4.0" + universal-user-agent "^4.0.0" -"@parcel/transformer-raw@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/transformer-raw/-/transformer-raw-2.0.0-nightly.449.tgz#bd7af800b97d7ea45771ff8a0662d51b2e93f736" - integrity sha512-batlnjTd3Nda40r8aWwMjlB6z2I5OHjHHpXcNj12DPJO3amUN/4PU0banRK0WZ6FV8ab7hUnNsQLiC+GGKmW7w== +"@octokit/rest@^18.0.9": + version "18.0.9" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.9.tgz#964d707d914eb34b1787895fdcacff96de47844d" + integrity sha512-CC5+cIx974Ygx9lQNfUn7/oXDQ9kqGiKUC6j1A9bAVZZ7aoTF8K6yxu0pQhQrLBwSl92J6Z3iVDhGhGFgISCZg== dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" + "@octokit/core" "^3.0.0" + "@octokit/plugin-paginate-rest" "^2.2.0" + "@octokit/plugin-request-log" "^1.0.0" + "@octokit/plugin-rest-endpoint-methods" "4.2.1" -"@parcel/transformer-react-refresh-babel@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-babel/-/transformer-react-refresh-babel-2.0.0-nightly.449.tgz#53bc3896bc88777115421b8f9dbd0c928493f153" - integrity sha512-qrBbT9jiUsAlEw7Q4qLgPmu7Qx8mc1YONarP06bC3hBv7fDE6nY40++mIpb9kxTwev9/CP0uYKBRyD3LrFk38w== +"@octokit/types@^2.0.0", "@octokit/types@^2.0.1": + version "2.16.2" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.16.2.tgz#4c5f8da3c6fecf3da1811aef678fda03edac35d2" + integrity sha512-O75k56TYvJ8WpAakWwYRN8Bgu60KrmX0z1KqFp1kNiFNkgW+JW+9EBKZ+S33PU6SLvbihqd+3drvPxKK68Ee8Q== dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - react-refresh "^0.9.0" + "@types/node" ">= 8" -"@parcel/transformer-react-refresh-wrap@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.0.0-nightly.449.tgz#4505f39499140bef21b9d2c9cf4cd8227f7591dd" - integrity sha512-3EwT7VFuWCB3qs4CaVEjw1y3vrMzNUFUYech5VZ673SP5tpOKg12+LOfJ3goEdhOZ8qvsknJhxOhpJzR/anbNQ== +"@octokit/types@^5.0.0", "@octokit/types@^5.0.1", "@octokit/types@^5.5.0": + version "5.5.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-5.5.0.tgz#e5f06e8db21246ca102aa28444cdb13ae17a139b" + integrity sha512-UZ1pErDue6bZNjYOotCNveTXArOMZQFG6hKJfOnGnulVCMcVVi7YIIuuR4WfBhjo7zgpmzn/BkPDnUXtNx+PcQ== dependencies: - "@babel/generator" "^7.0.0" - "@babel/parser" "^7.0.0" - "@babel/template" "^7.4.0" - "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2071+837d1fbd" - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - react-refresh "^0.9.0" - semver "^5.4.1" - -"@parcel/transformer-sass@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sass/-/transformer-sass-2.0.0-nightly.449.tgz#6a5e6f3c0b77e5db1ce8665fda07687373f6b586" - integrity sha512-vxAGmRUu8/AvH2WXF43q2gwFJajitx/UM+Rz42cl/YNUJanzlYZpqLSg4rPjiWIO1h8pY5atC7x4XbrNDOY/BA== - dependencies: - "@parcel/fs" "2.0.0-nightly.449+837d1fbd" - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - -"@parcel/transformer-stylus@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/transformer-stylus/-/transformer-stylus-2.0.0-nightly.449.tgz#8c30eb821c59360e2901688993a423726f496518" - integrity sha512-MJimqbrHvGlkh1gKu9xoMKhi2Boztm3Hc75h68wBWVqTc+OmBHGl8eftpCNFvBgbMaTjhTDLY+GkOODi9Xe9NA== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - -"@parcel/transformer-sugarss@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sugarss/-/transformer-sugarss-2.0.0-nightly.449.tgz#5e577e3c6cb155ad3402e8366d50dcef35f71e6c" - integrity sha512-ccDVMSh5cvdHKT5lp2KKE+vyeqiRqQaVoBwW5S1QhVaAW7op/dHzhxCxA08SDQLaT/G5FzQC4lFGPfsTkeRQwA== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - postcss "^8.0.5" - -"@parcel/transformer-toml@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/transformer-toml/-/transformer-toml-2.0.0-nightly.449.tgz#0141bedbc6746e702b31e3a64efc59bc211261a1" - integrity sha512-vDevoB6UP72FaoD6YybBbm8mVl8CVQFSS2Ef1XPHWWip0nYpWUA9CBnx7h7FRy4kvIzKU/Wq/Tn2W6gfySDjAQ== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - -"@parcel/transformer-typescript-types@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.0.0-nightly.449.tgz#254f735f17c302141ee5e710e55ecf1adc9ac025" - integrity sha512-9jMcRXJ13bMiRg7R3DgPkVNVr6uLjoBkOr33OX6Aat0o9ep8wFKalG1UbDHjLnTmISBsG3FJm9v+qKyQyzwHmQ== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/ts-utils" "2.0.0-nightly.449+837d1fbd" - nullthrows "^1.1.1" - -"@parcel/transformer-vue@2.0.0-nightly.2071+837d1fbd": - version "2.0.0-nightly.2071" - resolved "https://registry.yarnpkg.com/@parcel/transformer-vue/-/transformer-vue-2.0.0-nightly.2071.tgz#37e4c6eb1bfb3af35d66bf9583c93deb32d97577" - integrity sha512-y2yzc8u//WyA9u/I0HNt9Dv4YueXWhTntNkL/TKuB+S4RaZyetUepQqEvUv0JWgzqbuj5XxXWZ5Lk74bNMHQVg== - dependencies: - "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - nullthrows "^1.1.1" - semver "^5.4.1" - -"@parcel/transformer-yaml@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/transformer-yaml/-/transformer-yaml-2.0.0-nightly.449.tgz#7ee792f2fca24d1c7591b63e225296a046d80caa" - integrity sha512-n1GNhTXWPOvOoG3QGP1TXRGlbcOmyihkJH8hC73F4COvWxLzE3RgkB+nCBy34KgBO+yzFMeMzNpmIcg9HnMezQ== - dependencies: - "@parcel/plugin" "2.0.0-nightly.449+837d1fbd" - -"@parcel/ts-utils@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/ts-utils/-/ts-utils-2.0.0-nightly.449.tgz#1585e2e1a0c7a483936347cac5fc7f4c60c73e8d" - integrity sha512-jk/VoHAln8F6Q/qDSKosOPbxUwhJJw2dRptm3Zn0kznWXceWE8EYDmjzRB1JAUCjxJ5ux0n1EYjm+UcmwhbIbA== - dependencies: - nullthrows "^1.1.1" - -"@parcel/types@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/types/-/types-2.0.0-nightly.449.tgz#549346dc2451927d5ad934a1179f031aadffebef" - integrity sha512-v4cpFFQtz5nUpsDxU+VsIPNlW1cV7pExYiv/oijAGH6S3XbY8GJ2XPX8lUHCH4Y6+WWQtnp3NJJCWzRtx4zEtA== - -"@parcel/utils@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-2.0.0-nightly.449.tgz#575b88501650ce0ce1e3d34a5fc4e5bba3948471" - integrity sha512-eZn5+QV4BsNq9tEK4pylVJVNS8iH7xTKZIXssvM1i2dVLzpkjlRnky8PazLOyfk2ZkqwY73UvQ7Ltsq+MIEHYg== - dependencies: - "@iarna/toml" "^2.2.0" - "@parcel/codeframe" "2.0.0-nightly.449+837d1fbd" - "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" - "@parcel/logger" "2.0.0-nightly.449+837d1fbd" - "@parcel/markdown-ansi" "2.0.0-nightly.449+837d1fbd" - "@parcel/source-map" "2.0.0-alpha.4.16" - ansi-html "^0.0.7" - chalk "^2.4.2" - clone "^2.1.1" - fast-glob "3.1.1" - fastest-levenshtein "^1.0.8" - is-glob "^4.0.0" - is-url "^1.2.2" - json5 "^1.0.1" - micromatch "^4.0.2" - node-forge "^0.10.0" - nullthrows "^1.1.1" - open "^7.0.3" - resolve "^1.12.0" - -"@parcel/watcher@2.0.0-alpha.8": - version "2.0.0-alpha.8" - resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.0.0-alpha.8.tgz#7aee9504b87eebc73c794c611a6673e58b81e0b1" - integrity sha512-9aQu1SFkR6t1UYo3Mj1Vg39/Scaa9i4xGZnZ5Ug/qLyVzHmdjyKDyAbsbUDAd1O2e+MUhr5GI1w1FzBI6J31Jw== - dependencies: - lint-staged "^10.0.8" - node-addon-api "^3.0.0" - node-gyp-build "^4.2.1" - -"@parcel/workers@2.0.0-nightly.449+837d1fbd": - version "2.0.0-nightly.449" - resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-2.0.0-nightly.449.tgz#d9cf498864cf263abdcf53ddac21cf2f6f830327" - integrity sha512-d0+z/JhsCwRrKns5KvDkZg0UiLbLWvnrMT1Rw+N2bE3FdHlUlgckbOPUGFAM0LStaFartC3nsXnBwbSou1BKQg== - dependencies: - "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" - "@parcel/logger" "2.0.0-nightly.449+837d1fbd" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - chrome-trace-event "^1.0.2" - nullthrows "^1.1.1" + "@types/node" ">= 8" "@sinonjs/commons@^1", "@sinonjs/commons@^1.6.0", "@sinonjs/commons@^1.7.0", "@sinonjs/commons@^1.8.1": version "1.8.1" @@ -3069,13 +1578,6 @@ dependencies: "@types/node" "*" -"@types/http-proxy@^1.17.4": - version "1.17.4" - resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.4.tgz#e7c92e3dbe3e13aa799440ff42e6d3a17a9d045b" - integrity sha512-IrSHl2u6AWXduUaDLqYpt45tLVCtYv7o4Z0s1KghBCDgIIS9oW5K1H8mZG/A2CfeLdEa7rTd1ACOiHBc1EMT2Q== - dependencies: - "@types/node" "*" - "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": version "2.0.3" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz#4ba8ddb720221f432e443bd5f9117fd22cfd4762" @@ -3174,11 +1676,6 @@ resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== -"@types/parse-json@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" - integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== - "@types/prettier@^2.0.0": version "2.1.1" resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.1.1.tgz#be148756d5480a84cde100324c03a86ae5739fb5" @@ -3201,11 +1698,6 @@ resolved "https://registry.yarnpkg.com/@types/punycode/-/punycode-2.1.0.tgz#89e4f3d09b3f92e87a80505af19be7e0c31d4e83" integrity sha512-PG5aLpW6PJOeV2fHRslP4IOMWn+G+Uq8CfnyJ+PDS8ndCbU+soO+fB3NKCKo0p/Jh2Y4aPaiQZsrOXFdzpcA6g== -"@types/q@^1.5.1": - version "1.5.4" - resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.4.tgz#15925414e0ad2cd765bfef58842f7e26a7accb24" - integrity sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug== - "@types/semver@^7.3.4": version "7.3.4" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.4.tgz#43d7168fec6fa0988bb1a513a697b29296721afb" @@ -3408,7 +1900,7 @@ JSONStream@^1.0.4, JSONStream@^1.3.4: jsonparse "^1.2.0" through ">=2.2.7 <3" -abab@^2.0.0, abab@^2.0.3: +abab@^2.0.3: version "2.0.5" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a" integrity sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q== @@ -3418,19 +1910,6 @@ abbrev@1: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== -abortcontroller-polyfill@^1.1.9: - version "1.5.0" - resolved "https://registry.yarnpkg.com/abortcontroller-polyfill/-/abortcontroller-polyfill-1.5.0.tgz#2c562f530869abbcf88d949a2b60d1d402e87a7c" - integrity sha512-O6Xk757Jb4o0LMzMOMdWvxpHWrQzruYBaUruFaIOfAQRnWFxfdXYobw12jrVHGtoXk6WiiyYzc0QWN9aL62HQA== - -acorn-globals@^4.3.0: - version "4.3.4" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.4.tgz#9fa1926addc11c97308c4e66d7add0d40c3272e7" - integrity sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A== - dependencies: - acorn "^6.0.1" - acorn-walk "^6.0.1" - acorn-globals@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-6.0.0.tgz#46cdd39f0f8ff08a876619b55f5ac8a6dc770b45" @@ -3444,21 +1923,11 @@ acorn-jsx@^5.2.0: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b" integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng== -acorn-walk@^6.0.1: - version "6.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.2.0.tgz#123cb8f3b84c2171f1f7fb252615b1c78a6b1a8c" - integrity sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA== - acorn-walk@^7.1.1: version "7.2.0" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== -acorn@^6.0.1, acorn@^6.0.4: - version "6.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" - integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== - acorn@^7.1.1, acorn@^7.4.0: version "7.4.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.0.tgz#e1ad486e6c54501634c6c397c5c121daa383607c" @@ -3515,11 +1984,6 @@ ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.3, ajv@^6.12.4: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -alphanum-sort@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" - integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM= - ansi-colors@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" @@ -3530,18 +1994,13 @@ ansi-escapes@^3.2.0: resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== -ansi-escapes@^4.2.1, ansi-escapes@^4.3.0: +ansi-escapes@^4.2.1: version "4.3.1" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61" integrity sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA== dependencies: type-fest "^0.11.0" -ansi-html@^0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" - integrity sha1-gTWEAhliqenm/QOflA0S9WynhZ4= - ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" @@ -3562,11 +2021,6 @@ ansi-regex@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= - ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -3603,6 +2057,11 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" +app-root-path@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.2.1.tgz#d0df4a682ee408273583d43f6f79e9892624bc9a" + integrity sha512-91IFKeKk7FjfmezPKkwtaRvSpnUc4gDwPAjA1YZ9Gn0q0PPeW+vbeUsZuyDwjI7+QTHhcLen2v25fi/AmhvbJA== + append-transform@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab" @@ -3701,11 +2160,6 @@ array-differ@^2.0.3: resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-2.1.0.tgz#4b9c1c3f14b906757082925769e8ab904f4801b1" integrity sha512-KbUpJgx909ZscOc/7CLATBFam7P1Z1QRQInvgT0UztM9Q72aGKCunKASAl7WNW0tnPmPyEMeMhdsfWhfmW037w== -array-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" - integrity sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM= - array-filter@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-1.0.0.tgz#baf79e62e6ef4c2a4c0b831232daffec251f9d83" @@ -3770,16 +2224,6 @@ asap@^2.0.0: resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= -asn1.js@^5.2.0: - version "5.4.1" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz#11a980b84ebb91781ce35b0fdc2ee294e3783f07" - integrity sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== - dependencies: - bn.js "^4.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - safer-buffer "^2.1.0" - asn1@~0.2.3: version "0.2.4" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" @@ -3792,16 +2236,6 @@ assert-plus@1.0.0, assert-plus@^1.0.0: resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= -assert@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/assert/-/assert-2.0.0.tgz#95fc1c616d48713510680f2eaf2d10dd22e02d32" - integrity sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A== - dependencies: - es6-object-assign "^1.1.0" - is-nan "^1.2.1" - object-is "^1.0.1" - util "^0.12.0" - assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" @@ -3824,11 +2258,6 @@ astral-regex@^2.0.0: resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== -async-limiter@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" - integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== - async@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/async/-/async-3.2.0.tgz#b3a2685c5ebb641d3de02d161002c60fc9f85720" @@ -3870,6 +2299,21 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" +aws-sdk@^2.596.0: + version "2.792.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.792.0.tgz#d124a6074244a4675e0416887734e8f6934bdd30" + integrity sha512-h7oSlrCDtZkW5qNw/idKmMjjNJaaPlXFY+NbqtaTjejpCyVuIonUmFvm8GW16V58Avj/hujJfhpX9q0BMCg+VQ== + dependencies: + buffer "4.9.2" + events "1.1.1" + ieee754 "1.1.13" + jmespath "0.15.0" + querystring "0.2.0" + sax "1.2.1" + url "0.10.3" + uuid "3.3.2" + xml2js "0.4.19" + aws-sdk@^2.637.0, aws-sdk@^2.794.0: version "2.794.0" resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.794.0.tgz#7eb1f2fa277a91731253c2e9fee57b6096230d15" @@ -3916,13 +2360,6 @@ babel-jest@^26.6.3: graceful-fs "^4.2.4" slash "^3.0.0" -babel-plugin-dynamic-import-node@^2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz#84fda19c976ec5c6defef57f9427b3def66e17a3" - integrity sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ== - dependencies: - object.assign "^4.1.0" - babel-plugin-istanbul@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz#e159ccdc9af95e0b570c75b4573b7c34d671d765" @@ -3975,13 +2412,6 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= -base-x@^3.0.8: - version "3.0.8" - resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.8.tgz#1e1106c2537f0162e8b52474a557ebb09000018d" - integrity sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA== - dependencies: - safe-buffer "^5.0.1" - base64-js@^1.0.2: version "1.3.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" @@ -4031,21 +2461,6 @@ bluebird@^3.5.0, bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.4.0: - version "4.11.9" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" - integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== - -bn.js@^5.1.1: - version "5.1.3" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.3.tgz#beca005408f642ebebea80b042b4d18d2ac0ee6b" - integrity sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ== - -boolbase@^1.0.0, boolbase@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" - integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= - brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -4077,87 +2492,11 @@ braces@^3.0.1: dependencies: fill-range "^7.0.1" -brorand@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= - browser-process-hrtime@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== -browserify-aes@^1.0.0, browserify-aes@^1.0.4: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -browserify-cipher@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" - integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== - dependencies: - browserify-aes "^1.0.4" - browserify-des "^1.0.0" - evp_bytestokey "^1.0.0" - -browserify-des@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" - integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== - dependencies: - cipher-base "^1.0.1" - des.js "^1.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" - integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= - dependencies: - bn.js "^4.1.0" - randombytes "^2.0.1" - -browserify-sign@^4.0.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.1.tgz#eaf4add46dd54be3bb3b36c0cf15abbeba7956c3" - integrity sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg== - dependencies: - bn.js "^5.1.1" - browserify-rsa "^4.0.1" - create-hash "^1.2.0" - create-hmac "^1.1.7" - elliptic "^6.5.3" - inherits "^2.0.4" - parse-asn1 "^5.1.5" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -browserify-zlib@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" - integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== - dependencies: - pako "~1.0.5" - -browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.6.6, browserslist@^4.8.5: - version "4.14.5" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.14.5.tgz#1c751461a102ddc60e40993639b709be7f2c4015" - integrity sha512-Z+vsCZIvCBvqLoYkBFTwEYH3v5MCQbsAjp50ERycpOjnPmolg1Gjy4+KaWWpm8QOJt9GHkhdqAl14NpCX73CWA== - dependencies: - caniuse-lite "^1.0.30001135" - electron-to-chromium "^1.3.571" - escalade "^3.1.0" - node-releases "^1.1.61" - bs-logger@0.x: version "0.2.6" resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" @@ -4187,11 +2526,6 @@ buffer-from@1.x, buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= - buffer@4.9.2: version "4.9.2" resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.2.tgz#230ead344002988644841ab0244af8c44bbe3ef8" @@ -4209,11 +2543,6 @@ buffer@^5.1.0, buffer@^5.5.0: base64-js "^1.0.2" ieee754 "^1.1.4" -builtin-status-codes@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" - integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= - builtins@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" @@ -4229,11 +2558,6 @@ byte-size@^5.0.1: resolved "https://registry.yarnpkg.com/byte-size/-/byte-size-5.0.1.tgz#4b651039a5ecd96767e71a3d7ed380e48bed4191" integrity sha512-/XuKeqWocKsYa/cBY1YbSJSWWqTi4cFgr9S6OyM7PBaPbr9zvNGwWP33vt0uqGhwDdN+y3yhbXVILEUpnwEWGw== -bytes@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" - integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= - bytes@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" @@ -4375,21 +2699,6 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== -caniuse-api@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-3.0.0.tgz#5e4d90e2274961d46291997df599e3ed008ee4c0" - integrity sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw== - dependencies: - browserslist "^4.0.0" - caniuse-lite "^1.0.0" - lodash.memoize "^4.1.2" - lodash.uniq "^4.5.0" - -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001135: - version "1.0.30001141" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001141.tgz#214a196d81aa938b268fb0cb6d8fab23fdf14378" - integrity sha512-EHfInJHoQTmlMdVZrEc5gmwPc0zyN/hVufmGHPbVNQwlk7tJfCmQ2ysRZMY2MeleBivALUTyyxXnQjK18XrVpA== - capture-exit@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" @@ -4428,18 +2737,7 @@ cdk8s@^0.33.0: json-stable-stringify "^1.0.1" yaml "2.0.0-1" -chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -chalk@^2.0.0, chalk@^2.1.0, chalk@^2.3.1, chalk@^2.4.0, chalk@^2.4.1, chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.3.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -4448,15 +2746,7 @@ chalk@^2.0.0, chalk@^2.1.0, chalk@^2.3.1, chalk@^2.4.0, chalk@^2.4.1, chalk@^2.4 escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" - integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chalk@^4.0.0, chalk@^4.1.0: +chalk@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== @@ -4484,26 +2774,11 @@ chownr@^1.1.1, chownr@^1.1.2: resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== -chrome-trace-event@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" - integrity sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ== - dependencies: - tslib "^1.9.0" - ci-info@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - cjs-module-lexer@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-0.6.0.tgz#4186fcca0eae175970aee870b9fe2d6cf8d5655f" @@ -4543,26 +2818,6 @@ cli-cursor@^2.1.0: dependencies: restore-cursor "^2.0.0" -cli-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" - integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== - dependencies: - restore-cursor "^3.1.0" - -cli-spinners@^2.2.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.4.0.tgz#c6256db216b878cfba4720e719cec7cf72685d7f" - integrity sha512-sJAofoarcm76ZGpuooaO0eDy8saEy+YoZBLjC4h8srt4jeBnkYeOgqxgsJQTpyt2LjI5PTfLJHSL+41Yu4fEJA== - -cli-truncate@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" - integrity sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg== - dependencies: - slice-ansi "^3.0.0" - string-width "^4.2.0" - cli-width@^2.0.0: version "2.2.1" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48" @@ -4609,7 +2864,7 @@ clone@^1.0.2: resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= -clone@^2.1.1, clone@^2.1.2: +clone@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= @@ -4619,15 +2874,6 @@ co@^4.6.0: resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= -coa@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/coa/-/coa-2.0.2.tgz#43f6c21151b4ef2bf57187db0d73de229e3e7ec3" - integrity sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA== - dependencies: - "@types/q" "^1.5.1" - chalk "^2.4.1" - q "^1.1.2" - code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" @@ -4642,11 +2888,6 @@ codemaker@^1.14.1: decamelize "^4.0.0" fs-extra "^9.0.1" -coffeescript@^2.0.3: - version "2.5.1" - resolved "https://registry.yarnpkg.com/coffeescript/-/coffeescript-2.5.1.tgz#b2442a1f2c806139669534a54adc35010559d16a" - integrity sha512-J2jRPX0eeFh5VKyVnoLrfVFgLZtnnmp96WQSLAS8OrLm2wtQLcnikYKe1gViJKDH7vucjuhHvBKKBP3rKcD1tQ== - collect-v8-coverage@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59" @@ -4660,7 +2901,7 @@ collection-visit@^1.0.0: map-visit "^1.0.0" object-visit "^1.0.0" -color-convert@^1.9.0, color-convert@^1.9.1: +color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== @@ -4679,37 +2920,16 @@ color-name@1.1.3: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= -color-name@^1.0.0, color-name@~1.1.4: +color-name@~1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -color-string@^1.5.2: - version "1.5.3" - resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.3.tgz#c9bbc5f01b58b5492f3d6857459cb6590ce204cc" - integrity sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw== - dependencies: - color-name "^1.0.0" - simple-swizzle "^0.2.2" - color-support@^1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== -color@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/color/-/color-3.1.2.tgz#68148e7f85d41ad7649c5fa8c8106f098d229e10" - integrity sha512-vXTJhHebByxZn3lDvDJYw4lR5+uB3vuoHsuYA5AKuxRVn5wzzIfQKGLBmgdVRHKTJYeK5rvJcHnrd0Li49CFpg== - dependencies: - color-convert "^1.9.1" - color-string "^1.5.2" - -colorette@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b" - integrity sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw== - colors@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" @@ -4730,26 +2950,6 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -command-exists@^1.2.6: - version "1.2.9" - resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" - integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== - -commander@^2.19.0, commander@^2.20.0: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -commander@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" - integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== - -commander@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-6.1.0.tgz#f8d722b78103141006b66f4c7ba1e97315ba75bc" - integrity sha512-wl7PNrYWd2y5mp1OK/LhTlv8Ff4kQJQRXXAvF+uU/TPNiVJUxZLRYGj/B0y/lPGAVcSbJqH2Za/cvHmrPMC8mA== - commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -4821,31 +3021,11 @@ config-chain@^1.1.11: ini "^1.3.4" proto-list "~1.2.1" -connect@^3.7.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/connect/-/connect-3.7.0.tgz#5d49348910caa5e07a01800b030d0c35f20484f8" - integrity sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ== - dependencies: - debug "2.6.9" - finalhandler "1.1.2" - parseurl "~1.3.3" - utils-merge "1.0.1" - -console-browserify@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" - integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== - console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= -constants-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" - integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= - constructs@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/constructs/-/constructs-3.2.0.tgz#c7a61dfb3bb8ad81f8d77e5dcdf5404129ce65d2" @@ -4856,11 +3036,6 @@ contains-path@^0.1.0: resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" integrity sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo= -content-disposition@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" - integrity sha1-DPaLud318r55YcOoUXjLhdunjLQ= - conventional-changelog-angular@^5.0.11, conventional-changelog-angular@^5.0.3: version "5.0.11" resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.11.tgz#99a3ca16e4a5305e0c2c2fae3ef74fd7631fc3fb" @@ -5237,25 +3412,12 @@ copy-descriptor@^0.1.0: resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= -core-js-compat@^3.6.2: - version "3.6.5" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.6.5.tgz#2a51d9a4e25dfd6e690251aa81f99e3c05481f1c" - integrity sha512-7ItTKOhOZbznhXAQ2g/slGg1PJV5zDO/WdkTwi7UEOJmkvsE32PWvx6mKtDjiMpjnR2CNf6BAD6sSxIlv7ptng== - dependencies: - browserslist "^4.8.5" - semver "7.0.0" - -core-js@^3.2.1: - version "3.6.5" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a" - integrity sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA== - core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= -cosmiconfig@^5.0.0, cosmiconfig@^5.1.0: +cosmiconfig@^5.1.0: version "5.2.1" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== @@ -5265,17 +3427,6 @@ cosmiconfig@^5.0.0, cosmiconfig@^5.1.0: js-yaml "^3.13.1" parse-json "^4.0.0" -cosmiconfig@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.0.tgz#ef9b44d773959cae63ddecd122de23853b60f8d3" - integrity sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA== - dependencies: - "@types/parse-json" "^4.0.0" - import-fresh "^3.2.1" - parse-json "^5.0.0" - path-type "^4.0.0" - yaml "^1.10.0" - coveralls@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.1.0.tgz#13c754d5e7a2dd8b44fe5269e21ca394fb4d615b" @@ -5313,37 +3464,6 @@ crc@^3.4.4: dependencies: buffer "^5.1.0" -create-ecdh@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" - integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== - dependencies: - bn.js "^4.1.0" - elliptic "^6.5.3" - -create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" - integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - md5.js "^1.3.4" - ripemd160 "^2.0.1" - sha.js "^2.4.0" - -create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" - integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - cross-spawn@^4: version "4.0.2" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41" @@ -5352,7 +3472,7 @@ cross-spawn@^4: lru-cache "^4.0.1" which "^1.2.9" -cross-spawn@^6.0.0, cross-spawn@^6.0.4: +cross-spawn@^6.0.0: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== @@ -5377,188 +3497,15 @@ crypt@0.0.2: resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" integrity sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs= -crypto-browserify@^3.12.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" - integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== - dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - randomfill "^1.0.3" - -css-color-names@0.0.4, css-color-names@^0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" - integrity sha1-gIrcLnnPhHOAabZGyyDsJ762KeA= - -css-declaration-sorter@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-4.0.1.tgz#c198940f63a76d7e36c1e71018b001721054cb22" - integrity sha512-BcxQSKTSEEQUftYpBVnsH4SF05NTuBokb19/sBt6asXGKZ/6VP7PLG1CBCkFDYOnhXhPh0jMhO6xZ71oYHXHBA== - dependencies: - postcss "^7.0.1" - timsort "^0.3.0" - -css-modules-loader-core@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/css-modules-loader-core/-/css-modules-loader-core-1.1.0.tgz#5908668294a1becd261ae0a4ce21b0b551f21d16" - integrity sha1-WQhmgpShvs0mGuCkziGwtVHyHRY= - dependencies: - icss-replace-symbols "1.1.0" - postcss "6.0.1" - postcss-modules-extract-imports "1.1.0" - postcss-modules-local-by-default "1.2.0" - postcss-modules-scope "1.1.0" - postcss-modules-values "1.3.0" - -css-select-base-adapter@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz#3b2ff4972cc362ab88561507a95408a1432135d7" - integrity sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w== - -css-select@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-2.1.0.tgz#6a34653356635934a81baca68d0255432105dbef" - integrity sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ== - dependencies: - boolbase "^1.0.0" - css-what "^3.2.1" - domutils "^1.7.0" - nth-check "^1.0.2" - -css-selector-tokenizer@^0.7.0: - version "0.7.3" - resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.7.3.tgz#735f26186e67c749aaf275783405cf0661fae8f1" - integrity sha512-jWQv3oCEL5kMErj4wRnK/OPoBi0D+P1FR2cDCKYPaMeD2eW3/mttav8HT4hT1CKopiJI/psEULjkClhvJo4Lvg== - dependencies: - cssesc "^3.0.0" - fastparse "^1.1.2" - -css-tree@1.0.0-alpha.37: - version "1.0.0-alpha.37" - resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.37.tgz#98bebd62c4c1d9f960ec340cf9f7522e30709a22" - integrity sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg== - dependencies: - mdn-data "2.0.4" - source-map "^0.6.1" - -css-tree@1.0.0-alpha.39: - version "1.0.0-alpha.39" - resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.39.tgz#2bff3ffe1bb3f776cf7eefd91ee5cba77a149eeb" - integrity sha512-7UvkEYgBAHRG9Nt980lYxjsTrCyHFN53ky3wVsDkiMdVqylqRt+Zc+jm5qw7/qyOvN2dHSYtX0e4MbCCExSvnA== - dependencies: - mdn-data "2.0.6" - source-map "^0.6.1" - -css-what@^3.2.1: - version "3.3.0" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-3.3.0.tgz#10fec696a9ece2e591ac772d759aacabac38cd39" - integrity sha512-pv9JPyatiPaQ6pf4OvD/dbfm0o5LviWmwxNWzblYf/1u9QZd0ihV+PMwy5jdQWQ3349kZmKEx9WXuSka2dM4cg== - -cssesc@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" - integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== - -cssnano-preset-default@^4.0.7: - version "4.0.7" - resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-4.0.7.tgz#51ec662ccfca0f88b396dcd9679cdb931be17f76" - integrity sha512-x0YHHx2h6p0fCl1zY9L9roD7rnlltugGu7zXSKQx6k2rYw0Hi3IqxcoAGF7u9Q5w1nt7vK0ulxV8Lo+EvllGsA== - dependencies: - css-declaration-sorter "^4.0.1" - cssnano-util-raw-cache "^4.0.1" - postcss "^7.0.0" - postcss-calc "^7.0.1" - postcss-colormin "^4.0.3" - postcss-convert-values "^4.0.1" - postcss-discard-comments "^4.0.2" - postcss-discard-duplicates "^4.0.2" - postcss-discard-empty "^4.0.1" - postcss-discard-overridden "^4.0.1" - postcss-merge-longhand "^4.0.11" - postcss-merge-rules "^4.0.3" - postcss-minify-font-values "^4.0.2" - postcss-minify-gradients "^4.0.2" - postcss-minify-params "^4.0.2" - postcss-minify-selectors "^4.0.2" - postcss-normalize-charset "^4.0.1" - postcss-normalize-display-values "^4.0.2" - postcss-normalize-positions "^4.0.2" - postcss-normalize-repeat-style "^4.0.2" - postcss-normalize-string "^4.0.2" - postcss-normalize-timing-functions "^4.0.2" - postcss-normalize-unicode "^4.0.1" - postcss-normalize-url "^4.0.1" - postcss-normalize-whitespace "^4.0.2" - postcss-ordered-values "^4.1.2" - postcss-reduce-initial "^4.0.3" - postcss-reduce-transforms "^4.0.2" - postcss-svgo "^4.0.2" - postcss-unique-selectors "^4.0.1" - -cssnano-util-get-arguments@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cssnano-util-get-arguments/-/cssnano-util-get-arguments-4.0.0.tgz#ed3a08299f21d75741b20f3b81f194ed49cc150f" - integrity sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8= - -cssnano-util-get-match@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cssnano-util-get-match/-/cssnano-util-get-match-4.0.0.tgz#c0e4ca07f5386bb17ec5e52250b4f5961365156d" - integrity sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0= - -cssnano-util-raw-cache@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/cssnano-util-raw-cache/-/cssnano-util-raw-cache-4.0.1.tgz#b26d5fd5f72a11dfe7a7846fb4c67260f96bf282" - integrity sha512-qLuYtWK2b2Dy55I8ZX3ky1Z16WYsx544Q0UWViebptpwn/xDBmog2TLg4f+DBMg1rJ6JDWtn96WHbOKDWt1WQA== - dependencies: - postcss "^7.0.0" - -cssnano-util-same-parent@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz#574082fb2859d2db433855835d9a8456ea18bbf3" - integrity sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q== - -cssnano@^4.1.10: - version "4.1.10" - resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-4.1.10.tgz#0ac41f0b13d13d465487e111b778d42da631b8b2" - integrity sha512-5wny+F6H4/8RgNlaqab4ktc3e0/blKutmq8yNlBFXA//nSFFAqAngjNVRzUvCgYROULmZZUoosL/KSoZo5aUaQ== - dependencies: - cosmiconfig "^5.0.0" - cssnano-preset-default "^4.0.7" - is-resolvable "^1.0.0" - postcss "^7.0.0" - -csso@^4.0.2: - version "4.0.3" - resolved "https://registry.yarnpkg.com/csso/-/csso-4.0.3.tgz#0d9985dc852c7cc2b2cacfbbe1079014d1a8e903" - integrity sha512-NL3spysxUkcrOgnpsT4Xdl2aiEiBG6bXswAABQVHcMrfjjBisFOKwLDOmf4wf32aPdcJws1zds2B0Rg+jqMyHQ== - dependencies: - css-tree "1.0.0-alpha.39" - -cssom@0.3.x, cssom@^0.3.4, cssom@~0.3.6: - version "0.3.8" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" - integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== - cssom@^0.4.4: version "0.4.4" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" integrity sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw== -cssstyle@^1.1.1: - version "1.4.0" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-1.4.0.tgz#9d31328229d3c565c61e586b02041a28fccdccf1" - integrity sha512-GBrLZYZ4X4x6/QEoBnIrqb8B/f5l4+8me2dkom/j1Gtbxy0kBv6OGzKuAsGM75bkGwGAFkt56Iwg28S3XTZgSA== - dependencies: - cssom "0.3.x" +cssom@~0.3.6: + version "0.3.8" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" + integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== cssstyle@^2.2.0: version "2.3.0" @@ -5596,16 +3543,7 @@ dashdash@^1.12.0: data-uri-to-buffer@3: version "3.0.1" resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz#594b8973938c5bc2c33046535785341abc4f3636" - integrity sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og== - -data-urls@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-1.1.0.tgz#15ee0582baa5e22bb59c77140da8f9c76963bbfe" - integrity sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ== - dependencies: - abab "^2.0.0" - whatwg-mimetype "^2.2.0" - whatwg-url "^7.0.0" + integrity sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og== data-urls@^2.0.0: version "2.0.0" @@ -5631,13 +3569,6 @@ dateformat@^3.0.0: resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== -debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - debug@3.1.0, debug@=3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" @@ -5652,6 +3583,13 @@ debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: dependencies: ms "2.1.2" +debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + debug@^3.1.0: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" @@ -5811,14 +3749,6 @@ deprecation@^2.0.0, deprecation@^2.3.1: resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== -des.js@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" - integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== - dependencies: - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - detect-indent@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" @@ -5867,15 +3797,6 @@ diff@^5.0.0: resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== -diffie-hellman@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" - integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" - difflib@~0.2.1: version "0.2.4" resolved "https://registry.yarnpkg.com/difflib/-/difflib-0.2.4.tgz#b5e30361a6db023176d562892db85940a718f47e" @@ -5912,41 +3833,11 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -dom-serializer@0: - version "0.2.2" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51" - integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g== - dependencies: - domelementtype "^2.0.1" - entities "^2.0.0" - domain-browser@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== -domain-browser@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-3.5.0.tgz#3a11f5df52fd9d60d7f1c79a62fde2d158c42b09" - integrity sha512-zrzUu6auyZWRexjCEPJnfWc30Hupxh2lJZOJAF3qa2bCuD4O/55t0FvQt3ZMhEw++gjNkwdkOVZh8yA32w/Vfw== - -domelementtype@1, domelementtype@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" - integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== - -domelementtype@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.0.2.tgz#f3b6e549201e46f588b59463dd77187131fe6971" - integrity sha512-wFwTwCVebUrMgGeAwRL/NhZtHAUyT9n9yg4IMDwf10+6iCMxSkVq9MGCVEH+QZWo1nNidy8kNvwmv4zWHDTqvA== - -domexception@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" - integrity sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug== - dependencies: - webidl-conversions "^4.0.2" - domexception@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/domexception/-/domexception-2.0.1.tgz#fb44aefba793e1574b0af6aed2801d057529f304" @@ -5954,21 +3845,6 @@ domexception@^2.0.1: dependencies: webidl-conversions "^5.0.0" -domhandler@^2.3.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" - integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== - dependencies: - domelementtype "1" - -domutils@^1.5.1, domutils@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" - integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== - dependencies: - dom-serializer "0" - domelementtype "1" - dot-prop@^4.2.0: version "4.2.1" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.1.tgz#45884194a71fc2cda71cbb4bceb3a4dd2f433ba4" @@ -5976,22 +3852,22 @@ dot-prop@^4.2.0: dependencies: is-obj "^1.0.0" -dot-prop@^5.1.0, dot-prop@^5.2.0: +dot-prop@^5.1.0: version "5.3.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" integrity sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q== dependencies: is-obj "^2.0.0" -dotenv-expand@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-5.1.0.tgz#3fbaf020bfd794884072ea26b1e9791d45a629f0" - integrity sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA== +dotenv-json@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/dotenv-json/-/dotenv-json-1.0.0.tgz#fc7f672aafea04bed33818733b9f94662332815c" + integrity sha512-jAssr+6r4nKhKRudQ0HOzMskOFFi9+ubXWwmrSGJFgTvpjyPXCXsCsYbjif6mXp7uxA7xY3/LGaiTQukZzSbOQ== -dotenv@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-7.0.0.tgz#a2be3cd52736673206e8a85fb5210eea29628e7c" - integrity sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g== +dotenv@^8.0.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" + integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== dotgitignore@^2.1.0: version "2.1.0" @@ -6031,34 +3907,11 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - -ejs@^2.5.2, ejs@^2.6.1: +ejs@^2.5.2: version "2.7.4" resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.7.4.tgz#48661287573dcc53e366c7a1ae52c3a120eec9ba" integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA== -electron-to-chromium@^1.3.571: - version "1.3.576" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.576.tgz#2e70234484e03d7c7e90310d7d79fd3775379c34" - integrity sha512-uSEI0XZ//5ic+0NdOqlxp0liCD44ck20OAGyLMSymIWTEAtHKVJi6JM18acOnRgUgX7Q65QqnI+sNncNvIy8ew== - -elliptic@^6.5.3: - version "6.5.3" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" - integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== - dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" - hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" - emittery@^0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.7.1.tgz#c02375a927a40948c0345cc903072597f5270451" @@ -6074,20 +3927,6 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== -emphasize@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/emphasize/-/emphasize-2.1.0.tgz#4dbb279f3df30822e8d9c6476b856f09706a0dd8" - integrity sha512-wRlO0Qulw2jieQynsS3STzTabIhHCyjTjZraSkchOiT8rdvWZlahJAJ69HRxwGkv2NThmci2MSnDfJ60jB39tw== - dependencies: - chalk "^2.4.0" - highlight.js "~9.12.0" - lowlight "~1.9.0" - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= - encoding@^0.1.11: version "0.1.13" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" @@ -6102,19 +3941,14 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: dependencies: once "^1.4.0" -enquirer@^2.3.5, enquirer@^2.3.6: +enquirer@^2.3.5: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== dependencies: ansi-colors "^4.1.1" -entities@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" - integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== - -entities@^2.0.0, entities@~2.0: +entities@~2.0: version "2.0.3" resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.3.tgz#5c487e5742ab93c15abb5da22759b8590ec03b7f" integrity sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ== @@ -6141,7 +3975,7 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.17.0, es-abstract@^1.17.0-next.1, es-abstract@^1.17.2, es-abstract@^1.17.4, es-abstract@^1.17.5: +es-abstract@^1.17.0, es-abstract@^1.17.0-next.1, es-abstract@^1.17.4, es-abstract@^1.17.5: version "1.17.7" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.7.tgz#a4de61b2f66989fc7421676c1cb9787573ace54c" integrity sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g== @@ -6208,11 +4042,6 @@ es6-error@^4.0.1: resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d" integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg== -es6-object-assign@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/es6-object-assign/-/es6-object-assign-1.1.0.tgz#c2c3582656247c39ea107cb1e6652b6f9f24523c" - integrity sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw= - es6-promise@^4.0.3: version "4.2.8" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" @@ -6225,17 +4054,17 @@ es6-promisify@^5.0.0: dependencies: es6-promise "^4.0.3" -escalade@^3.1.0, escalade@^3.1.1: +esbuild@^0.8.9: + version "0.8.9" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.8.9.tgz#e2b4254ee7aabb23e88c9d4abb38a16668856569" + integrity sha512-HAV4mKJqos0L8g6pL7evrw/ZPm478yFNtkuYhqJAeTrIW40XtBxhHrt4Pm2faYeRB8K6nA7dTDgmF+O0e9JCXQ== + +escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= - -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: +escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= @@ -6250,7 +4079,7 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -escodegen@^1.11.0, escodegen@^1.14.1, escodegen@^1.8.1: +escodegen@^1.14.1, escodegen@^1.8.1: version "1.14.3" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" integrity sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw== @@ -6262,6 +4091,11 @@ escodegen@^1.11.0, escodegen@^1.14.1, escodegen@^1.8.1: optionalDependencies: source-map "~0.6.1" +eslint-config-standard@^14.1.1: + version "14.1.1" + resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz#830a8e44e7aef7de67464979ad06b406026c56ea" + integrity sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg== + eslint-import-resolver-node@^0.3.4: version "0.3.4" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" @@ -6289,6 +4123,14 @@ eslint-module-utils@^2.6.0: debug "^2.6.9" pkg-dir "^2.0.0" +eslint-plugin-es@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893" + integrity sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ== + dependencies: + eslint-utils "^2.0.0" + regexpp "^3.0.0" + eslint-plugin-import@^2.22.1: version "2.22.1" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz#0896c7e6a0cf44109a2d97b95903c2bb689d7702" @@ -6308,11 +4150,33 @@ eslint-plugin-import@^2.22.1: resolve "^1.17.0" tsconfig-paths "^3.9.0" +eslint-plugin-node@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d" + integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g== + dependencies: + eslint-plugin-es "^3.0.0" + eslint-utils "^2.0.0" + ignore "^5.1.1" + minimatch "^3.0.4" + resolve "^1.10.1" + semver "^6.1.0" + +eslint-plugin-promise@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz#845fd8b2260ad8f82564c1222fce44ad71d9418a" + integrity sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw== + eslint-plugin-rulesdir@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/eslint-plugin-rulesdir/-/eslint-plugin-rulesdir-0.1.0.tgz#ad144d7e98464fda82963eff3fab331aecb2bf08" integrity sha1-rRRNfphGT9qClj7/P6szGuyyvwg= +eslint-plugin-standard@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.1.0.tgz#0c3bf3a67e853f8bbbc580fb4945fbf16f41b7c5" + integrity sha512-ZL7+QRixjTR6/528YNGyDotyffm5OQst/sGxKDwGb9Uqs4In5Egi4+jbobhqJoyoCM6/7v/1A5fhQ7ScMtDjaQ== + eslint-scope@^5.0.0, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -6434,11 +4298,6 @@ eventemitter3@^3.1.0: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== -eventemitter3@^4.0.0: - version "4.0.7" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" - integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== - events-to-array@^1.0.1: version "1.1.2" resolved "https://registry.yarnpkg.com/events-to-array/-/events-to-array-1.1.2.tgz#2d41f563e1fe400ed4962fe1a4d5c6a7539df7f6" @@ -6449,19 +4308,6 @@ events@1.1.1: resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" integrity sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ= -events@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.2.0.tgz#93b87c18f8efcd4202a461aec4dfc0556b639379" - integrity sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg== - -evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - exec-sh@^0.3.2: version "0.3.4" resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.4.tgz#3a018ceb526cc6f6df2bb504b2bfe8e3a4934ec5" @@ -6480,7 +4326,7 @@ execa@^1.0.0: signal-exit "^3.0.0" strip-eof "^1.0.0" -execa@^4.0.0, execa@^4.0.3: +execa@^4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/execa/-/execa-4.0.3.tgz#0a34dabbad6d66100bd6f2c576c8669403f317f2" integrity sha512-WFDXGHckXPWZX19t1kCsXzOpqX9LWYNqn4C+HqZlk/V0imTkzJZqf87ZBhvpHaftERYknpk0fjSylnXVlVgI0A== @@ -6595,17 +4441,6 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-glob@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.1.1.tgz#87ee30e9e9f3eb40d6f254a7997655da753d7c82" - integrity sha512-nTCREpBY8w8r+boyFYAx21iL6faSsQynliPHM4Uf56SbkyohCNxpVPEH9xrF5TXKy+IsjkPUHDKiUkzBVRXn9g== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.0" - merge2 "^1.3.0" - micromatch "^4.0.2" - fast-glob@^2.2.6: version "2.2.7" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.7.tgz#6953857c3afa475fff92ee6015d52da70a4cd39d" @@ -6652,23 +4487,6 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= -fast-url-parser@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/fast-url-parser/-/fast-url-parser-1.1.3.tgz#f4af3ea9f34d8a271cf58ad2b3759f431f0b318d" - integrity sha1-9K8+qfNNiicc9YrSs3WfQx8LMY0= - dependencies: - punycode "^1.3.2" - -fastest-levenshtein@^1.0.8: - version "1.0.12" - resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz#9990f7d3a88cc5a9ffd1f1745745251700d497e2" - integrity sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow== - -fastparse@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.2.tgz#91728c5a5942eced8531283c79441ee4122c35a9" - integrity sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ== - fastq@^1.6.0: version "1.8.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.8.0.tgz#550e1f9f59bbc65fe185cb6a9b4d95357107f481" @@ -6676,13 +4494,6 @@ fastq@^1.6.0: dependencies: reusify "^1.0.4" -fault@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/fault/-/fault-1.0.4.tgz#eafcfc0a6d214fc94601e170df29954a4f842f13" - integrity sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA== - dependencies: - format "^0.2.0" - fb-watchman@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.1.tgz#fc84fb39d2709cf3ff6d743706157bb5708a8a85" @@ -6702,7 +4513,7 @@ figures@^2.0.0: dependencies: escape-string-regexp "^1.0.5" -figures@^3.1.0, figures@^3.2.0: +figures@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== @@ -6721,11 +4532,6 @@ file-uri-to-path@2: resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-2.0.0.tgz#7b415aeba227d575851e0a5b0c640d7656403fba" integrity sha512-hjPFI8oE/2iQPVe4gbrJ73Pp+Xfub2+WI2LlXDbsaJBwT5wuMh35WNWVYYTpnz895shtwfyutMFLFywpQAFdLg== -filesize@^3.6.0: - version "3.6.1" - resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.6.1.tgz#090bb3ee01b6f801a8a8be99d31710b3422bb317" - integrity sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg== - fill-keys@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/fill-keys/-/fill-keys-1.0.2.tgz#9a8fa36f4e8ad634e3bf6b4f3c8882551452eb20" @@ -6751,19 +4557,6 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -finalhandler@1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" - integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.3" - statuses "~1.5.0" - unpipe "~1.0.0" - find-cache-dir@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" @@ -6841,7 +4634,7 @@ follow-redirects@1.5.10: dependencies: debug "=3.1.0" -follow-redirects@^1.0.0, follow-redirects@^1.11.0: +follow-redirects@^1.11.0: version "1.13.0" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.0.tgz#b42e8d93a2a7eea5ed88633676d6597bc8e384db" integrity sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA== @@ -6886,11 +4679,6 @@ form-data@~2.3.2: combined-stream "^1.0.6" mime-types "^2.1.12" -format@^0.2.0: - version "0.2.2" - resolved "https://registry.yarnpkg.com/format/-/format-0.2.2.tgz#d6170107e9efdc4ed30c9dc39016df942b5cb58b" - integrity sha1-1hcBB+nv3E7TDJ3DkBbflCtctYs= - fragment-cache@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" @@ -7026,11 +4814,6 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-own-enumerable-property-symbols@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664" - integrity sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g== - get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" @@ -7280,18 +5063,6 @@ hard-rejection@^2.1.0: resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= - dependencies: - ansi-regex "^2.0.0" - -has-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - integrity sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo= - has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -7343,30 +5114,13 @@ has-values@^1.0.0: is-number "^3.0.0" kind-of "^4.0.0" -has@^1.0.0, has@^1.0.3: +has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== dependencies: function-bind "^1.1.1" -hash-base@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" - integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== - dependencies: - inherits "^2.0.4" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - hasha@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/hasha/-/hasha-3.0.0.tgz#52a32fab8569d41ca69a61ff1a214f8eb7c8bd39" @@ -7387,25 +5141,6 @@ hasha@^5.0.0: resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.6.tgz#087e1f10b046932fc8594dd9e6d378afc9d1e5ac" integrity sha1-CH4fELBGky/IWU3Z5tN4r8nR5aw= -hex-color-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e" - integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ== - -highlight.js@~9.12.0: - version "9.12.0" - resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.12.0.tgz#e6d9dbe57cbefe60751f02af336195870c90c01e" - integrity sha1-5tnb5Xy+/mB1HwKvM2GVhwyQwB4= - -hmac-drbg@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - hosted-git-info@^2.1.4, hosted-git-info@^2.7.1: version "2.8.8" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" @@ -7418,28 +5153,6 @@ hosted-git-info@^3.0.6: dependencies: lru-cache "^6.0.0" -hsl-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/hsl-regex/-/hsl-regex-1.0.0.tgz#d49330c789ed819e276a4c0d272dffa30b18fe6e" - integrity sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4= - -hsla-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/hsla-regex/-/hsla-regex-1.0.0.tgz#c1ce7a3168c8c6614033a4b5f7877f3b225f9c38" - integrity sha1-wc56MWjIxmFAM6S194d/OyJfnDg= - -html-comment-regex@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.2.tgz#97d4688aeb5c81886a364faa0cad1dda14d433a7" - integrity sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ== - -html-encoding-sniffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8" - integrity sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw== - dependencies: - whatwg-encoding "^1.0.1" - html-encoding-sniffer@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz#42a6dc4fd33f00281176e8b23759ca4e4fa185f3" @@ -7452,37 +5165,6 @@ html-escaper@^2.0.0: resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== -html-tags@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/html-tags/-/html-tags-1.2.0.tgz#c78de65b5663aa597989dd2b7ab49200d7e4db98" - integrity sha1-x43mW1Zjqll5id0rerSSANfk25g= - -htmlnano@^0.2.2: - version "0.2.6" - resolved "https://registry.yarnpkg.com/htmlnano/-/htmlnano-0.2.6.tgz#d36e39729faa1dd5f8709d8963c67c7502e578b1" - integrity sha512-HUY/99maFsWX2LRoGJpZ/8QRLCkyY0UU1El3wgLLFAHQlD3mCxCJJNcWJk5SBqaU49MLhIWVDW6cGBeuemvaPQ== - dependencies: - cssnano "^4.1.10" - normalize-html-whitespace "^1.0.0" - posthtml "^0.13.1" - posthtml-render "^1.2.2" - purgecss "^2.3.0" - svgo "^1.3.2" - terser "^4.8.0" - uncss "^0.17.3" - -htmlparser2@^3.9.2: - version "3.10.1" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" - integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== - dependencies: - domelementtype "^1.3.1" - domhandler "^2.3.0" - domutils "^1.5.1" - entities "^1.1.1" - inherits "^2.0.1" - readable-stream "^3.1.1" - http-cache-semantics@^3.8.1: version "3.8.1" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" @@ -7516,26 +5198,6 @@ http-proxy-agent@^4.0.0, http-proxy-agent@^4.0.1: agent-base "6" debug "4" -http-proxy-middleware@^1.0.0: - version "1.0.6" - resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-1.0.6.tgz#0618557722f450375d3796d701a8ac5407b3b94e" - integrity sha512-NyL6ZB6cVni7pl+/IT2W0ni5ME00xR0sN27AQZZrpKn1b+qRh+mLbBxIq9Cq1oGfmTc7BUq4HB77mxwCaxAYNg== - dependencies: - "@types/http-proxy" "^1.17.4" - http-proxy "^1.18.1" - is-glob "^4.0.1" - lodash "^4.17.20" - micromatch "^4.0.2" - -http-proxy@^1.18.1: - version "1.18.1" - resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" - integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== - dependencies: - eventemitter3 "^4.0.0" - follow-redirects "^1.0.0" - requires-port "^1.0.0" - http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" @@ -7545,11 +5207,6 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" -https-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" - integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= - https-proxy-agent@5, https-proxy-agent@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" @@ -7592,11 +5249,6 @@ iconv-lite@^0.6.2: dependencies: safer-buffer ">= 2.1.2 < 3.0.0" -icss-replace-symbols@1.1.0, icss-replace-symbols@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" - integrity sha1-Bupvg2ead0njhs/h/oEq5dsiPe0= - ieee754@1.1.13, ieee754@^1.1.4: version "1.1.13" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" @@ -7607,11 +5259,6 @@ iferr@^0.1.5: resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= -iferr@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/iferr/-/iferr-1.0.2.tgz#e9fde49a9da06dc4a4194c6c9ed6d08305037a6d" - integrity sha512-9AfeLfji44r5TKInjhz3W9DyZI1zR1JAf2hVBMGhddAKPqBsupb89jGfbCTHIGZd6fGZl9WlHdn4AObygyMKwg== - ignore-walk@^3.0.1: version "3.0.3" resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37" @@ -7624,7 +5271,7 @@ ignore@^4.0.3, ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.1.4, ignore@^5.1.8: +ignore@^5.1.1, ignore@^5.1.4, ignore@^5.1.8: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== @@ -7688,11 +5335,6 @@ indent-string@^4.0.0: resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== -indexes-of@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" - integrity sha1-8w9xbI4r00bHtn0985FVZqfAVgc= - infer-owner@^1.0.3, infer-owner@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" @@ -7754,13 +5396,6 @@ interpret@^1.0.0: resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== -invariant@^2.2.2, invariant@^2.2.4: - version "2.2.4" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" - integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== - dependencies: - loose-envify "^1.0.0" - ip-regex@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" @@ -7771,16 +5406,6 @@ ip@1.1.5, ip@^1.1.5: resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= -is-absolute-url@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" - integrity sha1-UFMN+4T8yap9vnhS6Do3uTufKqY= - -is-absolute-url@^3.0.1: - version "3.0.3" - resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.3.tgz#96c6a22b6a23929b11ea0afb1836c36ad4a5d698" - integrity sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q== - is-accessor-descriptor@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" @@ -7805,11 +5430,6 @@ is-arrayish@^0.2.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= -is-arrayish@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" - integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== - is-bigint@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.0.tgz#73da8c33208d00f130e9b5e15d23eac9215601c4" @@ -7837,18 +5457,6 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" -is-color-stop@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-color-stop/-/is-color-stop-1.1.0.tgz#cfff471aee4dd5c9e158598fbe12967b5cdad345" - integrity sha1-z/9HGu5N1cnhWFmPvhKWe1za00U= - dependencies: - css-color-names "^0.0.4" - hex-color-regex "^1.1.0" - hsl-regex "^1.0.0" - hsla-regex "^1.0.0" - rgb-regex "^1.0.1" - rgba-regex "^1.0.0" - is-core-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.0.0.tgz#58531b70aed1db7c0e8d4eb1a0a2d1ddd64bd12d" @@ -7856,6 +5464,13 @@ is-core-module@^2.0.0: dependencies: has "^1.0.3" +is-core-module@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.1.0.tgz#a4cc031d9b1aca63eecbd18a650e13cb4eeab946" + integrity sha512-YcV7BgVMRFRua2FqQzKtTDMz8iCuLEyGKjr70q8Zm1yy2qKcurbFEd79PAdHV77oL3NrAaOVQIbMmiHQCHB7ZA== + dependencies: + has "^1.0.3" + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -7947,11 +5562,6 @@ is-generator-fn@^2.0.0: resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== -is-generator-function@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.7.tgz#d2132e529bb0000a7f80794d4bdf5cd5e5813522" - integrity sha512-YZc5EwyO4f2kWCax7oegfuSr9mFz1ZvieNYBEjmukLxgXfBUbxAWGVF7GZf0zidYtoBl3WvC07YK0wT76a+Rtw== - is-glob@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" @@ -7966,30 +5576,11 @@ is-glob@^4.0.0, is-glob@^4.0.1: dependencies: is-extglob "^2.1.1" -is-html@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-html/-/is-html-1.1.0.tgz#e04f1c18d39485111396f9a0273eab51af218464" - integrity sha1-4E8cGNOUhRETlvmgJz6rUa8hhGQ= - dependencies: - html-tags "^1.0.0" - -is-interactive@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" - integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== - is-map@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.1.tgz#520dafc4307bb8ebc33b813de5ce7c9400d644a1" integrity sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw== -is-nan@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/is-nan/-/is-nan-1.3.0.tgz#85d1f5482f7051c2019f5673ccebdb06f3b0db03" - integrity sha512-z7bbREymOqt2CCaZVly8aC4ML3Xhfi0ekuOnjO2L8vKdl+CttdVoGZQhd4adMFAsxQ5VeRVwORs4tU8RH+HFtQ== - dependencies: - define-properties "^1.1.3" - is-negative-zero@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.0.tgz#9553b121b0fac28869da9ed459e20c7543788461" @@ -8012,7 +5603,7 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== -is-obj@^1.0.0, is-obj@^1.0.1: +is-obj@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= @@ -8056,16 +5647,6 @@ is-regex@^1.1.1: dependencies: has-symbols "^1.0.1" -is-regexp@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" - integrity sha1-/S2INUXEa6xaYz57mgnof6LLUGk= - -is-resolvable@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" - integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg== - is-set@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.1.tgz#d1604afdab1724986d30091575f54945da7e5f43" @@ -8093,13 +5674,6 @@ is-string@^1.0.4, is-string@^1.0.5: resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== -is-svg@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-3.0.0.tgz#9321dbd29c212e5ca99c4fa9794c714bcafa2f75" - integrity sha512-gi4iHK53LR2ujhLVVj+37Ykh9GLqYHX6JOVXbLAucaG/Cqw9xwdFOjDM2qeifLs1sF1npXXFvDu0r5HNgCMrzQ== - dependencies: - html-comment-regex "^1.1.0" - is-symbol@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" @@ -8129,11 +5703,6 @@ is-typedarray@^1.0.0, is-typedarray@~1.0.0: resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= -is-url@^1.2.2: - version "1.2.4" - resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52" - integrity sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww== - is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" @@ -8154,7 +5723,7 @@ is-windows@^1.0.0, is-windows@^1.0.2: resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== -is-wsl@^2.1.1, is-wsl@^2.2.0: +is-wsl@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== @@ -8176,11 +5745,6 @@ isarray@^2.0.5: resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== -isbinaryfile@^4.0.2: - version "4.0.6" - resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-4.0.6.tgz#edcb62b224e2b4710830b67498c8e4e5a4d2610b" - integrity sha512-ORrEy+SNVqUhrCaal4hA4fBzhggQQ+BaLntyPOdoEiwlKZW9BZiJXjg3RMiruE4tPEI3pyVPpySHQF/dKWperg== - isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -8719,7 +6283,7 @@ js-base64@^2.1.9: resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.6.4.tgz#f4e686c5de1ea1f867dbcad3d46d969428df98c4" integrity sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ== -"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: +js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== @@ -8737,38 +6301,6 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= -jsdom@^14.1.0: - version "14.1.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-14.1.0.tgz#916463b6094956b0a6c1782c94e380cd30e1981b" - integrity sha512-O901mfJSuTdwU2w3Sn+74T+RnDVP+FuV5fH8tcPWyqrseRAb0s5xOtPgCFiPOtLcyK7CLIJwPyD83ZqQWvA5ng== - dependencies: - abab "^2.0.0" - acorn "^6.0.4" - acorn-globals "^4.3.0" - array-equal "^1.0.0" - cssom "^0.3.4" - cssstyle "^1.1.1" - data-urls "^1.1.0" - domexception "^1.0.1" - escodegen "^1.11.0" - html-encoding-sniffer "^1.0.2" - nwsapi "^2.1.3" - parse5 "5.1.0" - pn "^1.1.0" - request "^2.88.0" - request-promise-native "^1.0.5" - saxes "^3.1.9" - symbol-tree "^3.2.2" - tough-cookie "^2.5.0" - w3c-hr-time "^1.0.1" - w3c-xmlserializer "^1.1.2" - webidl-conversions "^4.0.2" - whatwg-encoding "^1.0.5" - whatwg-mimetype "^2.3.0" - whatwg-url "^7.0.0" - ws "^6.1.2" - xml-name-validator "^3.0.0" - jsdom@^16.4.0: version "16.4.0" resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.4.0.tgz#36005bde2d136f73eee1a830c6d45e55408edddb" @@ -8806,11 +6338,6 @@ jsesc@^2.5.1: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== -jsesc@~0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" - integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= - jsii-diff@^1.14.1: version "1.14.1" resolved "https://registry.yarnpkg.com/jsii-diff/-/jsii-diff-1.14.1.tgz#6ee1b6de68675a8cf8ad45b98474cbc7148c1aca" @@ -8911,11 +6438,6 @@ json-schema@0.2.3: resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= -json-source-map@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/json-source-map/-/json-source-map-0.6.1.tgz#e0b1f6f4ce13a9ad57e2ae165a24d06e62c79a0f" - integrity sha512-1QoztHPsMQqhDq0hlXY5ZqcEdUzxQEIxgFkKl4WUp2pgShObl+9ovi4kRh2TfvAfxAoHOJ9vIMEqk3k4iex7tg== - json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" @@ -8933,7 +6455,7 @@ json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= -json5@2.x, json5@^2.1.0, json5@^2.1.2: +json5@2.x, json5@^2.1.2: version "2.1.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43" integrity sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA== @@ -9032,6 +6554,24 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== +lambda-leak@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lambda-leak/-/lambda-leak-2.0.0.tgz#771985d3628487f6e885afae2b54510dcfb2cd7e" + integrity sha1-dxmF02KEh/boha+uK1RRDc+yzX4= + +lambda-tester@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/lambda-tester/-/lambda-tester-3.6.0.tgz#ceb7d4f4f0da768487a05cff37dcd088508b5247" + integrity sha512-F2ZTGWCLyIR95o/jWK46V/WnOCFAEUG/m/V7/CLhPJ7PCM+pror1rZ6ujP3TkItSGxUfpJi0kqwidw+M/nEqWw== + dependencies: + app-root-path "^2.2.1" + dotenv "^8.0.0" + dotenv-json "^1.0.0" + lambda-leak "^2.0.0" + semver "^6.1.1" + uuid "^3.3.2" + vandium-utils "^1.1.1" + lazystream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" @@ -9073,13 +6613,6 @@ leven@^3.1.0: resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== -levenary@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/levenary/-/levenary-1.1.1.tgz#842a9ee98d2075aa7faeedbe32679e9205f46f77" - integrity sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ== - dependencies: - leven "^3.1.0" - levn@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" @@ -9103,54 +6636,11 @@ lie@~3.3.0: dependencies: immediate "~3.0.5" -line-column@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/line-column/-/line-column-1.0.2.tgz#d25af2936b6f4849172b312e4792d1d987bc34a2" - integrity sha1-0lryk2tvSEkXKzEuR5LR2Ye8NKI= - dependencies: - isarray "^1.0.0" - isobject "^2.0.0" - lines-and-columns@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= -lint-staged@^10.0.8: - version "10.4.0" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.4.0.tgz#d18628f737328e0bbbf87d183f4020930e9a984e" - integrity sha512-uaiX4U5yERUSiIEQc329vhCTDDwUcSvKdRLsNomkYLRzijk3v8V9GWm2Nz0RMVB87VcuzLvtgy6OsjoH++QHIg== - dependencies: - chalk "^4.1.0" - cli-truncate "^2.1.0" - commander "^6.0.0" - cosmiconfig "^7.0.0" - debug "^4.1.1" - dedent "^0.7.0" - enquirer "^2.3.6" - execa "^4.0.3" - listr2 "^2.6.0" - log-symbols "^4.0.0" - micromatch "^4.0.2" - normalize-path "^3.0.0" - please-upgrade-node "^3.2.0" - string-argv "0.3.1" - stringify-object "^3.3.0" - -listr2@^2.6.0: - version "2.6.2" - resolved "https://registry.yarnpkg.com/listr2/-/listr2-2.6.2.tgz#4912eb01e1e2dd72ec37f3895a56bf2622d6f36a" - integrity sha512-6x6pKEMs8DSIpA/tixiYY2m/GcbgMplMVmhQAaLFxEtNSKLeWTGjtmU57xvv6QCm2XcqzyNXL/cTSVf4IChCRA== - dependencies: - chalk "^4.1.0" - cli-truncate "^2.1.0" - figures "^3.2.0" - indent-string "^4.0.0" - log-update "^4.0.0" - p-map "^4.0.0" - rxjs "^6.6.2" - through "^2.3.8" - load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" @@ -9221,11 +6711,6 @@ lodash._reinterpolate@^3.0.0: resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= -lodash.clone@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.clone/-/lodash.clone-4.5.0.tgz#195870450f5a13192478df4bc3d23d2dea1907b6" - integrity sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y= - lodash.clonedeep@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" @@ -9266,7 +6751,7 @@ lodash.isplainobject@^4.0.6: resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" integrity sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs= -lodash.memoize@4.x, lodash.memoize@^4.1.2: +lodash.memoize@4.x: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= @@ -9316,30 +6801,6 @@ log-driver@^1.2.7: resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8" integrity sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg== -log-symbols@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" - integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== - dependencies: - chalk "^2.4.2" - -log-symbols@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920" - integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA== - dependencies: - chalk "^4.0.0" - -log-update@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1" - integrity sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg== - dependencies: - ansi-escapes "^4.3.0" - cli-cursor "^3.1.0" - slice-ansi "^4.0.0" - wrap-ansi "^6.2.0" - log4js@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/log4js/-/log4js-6.3.0.tgz#10dfafbb434351a3e30277a00b9879446f715bcb" @@ -9351,13 +6812,6 @@ log4js@^6.3.0: rfdc "^1.1.4" streamroller "^2.2.4" -loose-envify@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" - integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== - dependencies: - js-tokens "^3.0.0 || ^4.0.0" - loud-rejection@^1.0.0: version "1.6.0" resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" @@ -9366,14 +6820,6 @@ loud-rejection@^1.0.0: currently-unhandled "^0.4.1" signal-exit "^3.0.0" -lowlight@~1.9.0: - version "1.9.2" - resolved "https://registry.yarnpkg.com/lowlight/-/lowlight-1.9.2.tgz#0b9127e3cec2c3021b7795dd81005c709a42fdd1" - integrity sha512-Ek18ElVCf/wF/jEm1b92gTnigh94CtBNWiZ2ad+vTgW7cTmQxUY3I98BjHK68gZAJEWmybGBZgx9qv3QxLQB/Q== - dependencies: - fault "^1.0.2" - highlight.js "~9.12.0" - lru-cache@^4.0.1: version "4.1.5" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" @@ -9485,16 +6931,7 @@ map-visit@^1.0.0: resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= dependencies: - object-visit "^1.0.0" - -md5.js@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" - integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" + object-visit "^1.0.0" md5@^2.3.0: version "2.3.0" @@ -9505,16 +6942,6 @@ md5@^2.3.0: crypt "0.0.2" is-buffer "~1.1.6" -mdn-data@2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.4.tgz#699b3c38ac6f1d728091a64650b65d388502fd5b" - integrity sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA== - -mdn-data@2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.6.tgz#852dc60fcaa5daa2e8cf6c9189c440ed3e042978" - integrity sha512-rQvjv71olwNHgiTbfPZFkJtjNMciWgswYeciZhtvWLO8bmX3TnhyA62I6sTWOyZssWHJJjY6/KiWwqQsWWsqOA== - mdurl@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" @@ -9607,7 +7034,7 @@ merge2@^1.2.3, merge2@^1.3.0: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: +micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -9634,31 +7061,11 @@ micromatch@^4.0.2: braces "^3.0.1" picomatch "^2.0.5" -miller-rabin@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" - integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - mime-db@1.44.0: version "1.44.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== -mime-db@~1.33.0: - version "1.33.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" - integrity sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ== - -mime-types@2.1.18: - version "2.1.18" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" - integrity sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ== - dependencies: - mime-db "~1.33.0" - mime-types@^2.1.12, mime-types@~2.1.19: version "2.1.27" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" @@ -9666,11 +7073,6 @@ mime-types@^2.1.12, mime-types@~2.1.19: dependencies: mime-db "1.44.0" -mime@^2.4.4: - version "2.4.6" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.6.tgz#e5b407c90db442f2beb5b162373d07b69affa4d1" - integrity sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA== - mimic-fn@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" @@ -9686,17 +7088,7 @@ min-indent@^1.0.0: resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" - integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - -minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= - -minimatch@3.0.4, minimatch@>=3.0, minimatch@^3.0.4: +minimatch@>=3.0, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== @@ -9783,7 +7175,7 @@ mkdirp@*, mkdirp@1.x, mkdirp@^1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: +mkdirp@^0.5.0, mkdirp@^0.5.1: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== @@ -9847,7 +7239,7 @@ mute-stream@0.0.7: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= -mute-stream@0.0.8, mute-stream@~0.0.4: +mute-stream@~0.0.4: version "0.0.8" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== @@ -9861,11 +7253,6 @@ mz@^2.5.0: object-assign "^4.0.1" thenify-all "^1.0.0" -nanoid@^3.1.12: - version "3.1.12" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.12.tgz#6f7736c62e8d39421601e4a0c77623a97ea69654" - integrity sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A== - nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -9888,11 +7275,6 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= -ncp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3" - integrity sha1-GVoh1sRuNh0vsSgbo4uR6d9727M= - neo-async@^2.6.0: version "2.6.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" @@ -9934,11 +7316,6 @@ nock@^13.0.5: lodash.set "^4.3.2" propagate "^2.0.0" -node-addon-api@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.0.2.tgz#04bc7b83fd845ba785bb6eae25bc857e1ef75681" - integrity sha512-+D4s2HCnxPd5PjjI0STKwncjXTUKKqm74MDMz9OPXavjsGmjkvwgLtA5yoxJUdmpj52+2u+RrXgPipahKczMKg== - node-fetch-npm@^2.0.2: version "2.0.4" resolved "https://registry.yarnpkg.com/node-fetch-npm/-/node-fetch-npm-2.0.4.tgz#6507d0e17a9ec0be3bec516958a497cec54bf5a4" @@ -9953,16 +7330,6 @@ node-fetch@^2.5.0, node-fetch@^2.6.1: resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== -node-forge@^0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.10.0.tgz#32dea2afb3e9926f02ee5ce8794902691a676bf3" - integrity sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA== - -node-gyp-build@^4.2.1, node-gyp-build@^4.2.2: - version "4.2.3" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.2.3.tgz#ce6277f853835f718829efb47db20f3e4d9c4739" - integrity sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg== - node-gyp@^5.0.2: version "5.1.1" resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-5.1.1.tgz#eb915f7b631c937d282e33aed44cb7a025f62a3e" @@ -10009,11 +7376,6 @@ node-preload@^0.2.1: dependencies: process-on-spawn "^1.0.0" -node-releases@^1.1.61: - version "1.1.61" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.61.tgz#707b0fca9ce4e11783612ba4a2fcba09047af16e" - integrity sha512-DD5vebQLg8jLCOzwupn954fbIiZht05DAZs0k2u8NStSe6h9XdsuIQL8hSRKYiU8WUQRznmSDrKGbv3ObOmC7g== - nodeunit@^0.11.3: version "0.11.3" resolved "https://registry.yarnpkg.com/nodeunit/-/nodeunit-0.11.3.tgz#313afae26cd11b407b731ff774b8e35e5d6f9568" @@ -10030,11 +7392,6 @@ nopt@^4.0.1: abbrev "1" osenv "^0.1.4" -normalize-html-whitespace@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/normalize-html-whitespace/-/normalize-html-whitespace-1.0.0.tgz#5e3c8e192f1b06c3b9eee4b7e7f28854c7601e34" - integrity sha512-9ui7CGtOOlehQu0t/OhhlmDyc71mKVlv+4vF+me4iZLPrNtRL2xoquEdfZxasC/bdQi/Hr3iTrpyRKIG+ocabA== - normalize-package-data@^2.0.0, normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5, normalize-package-data@^2.4.0, normalize-package-data@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" @@ -10067,7 +7424,7 @@ normalize-path@^3.0.0: resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -normalize-url@^3.0.0, normalize-url@^3.3.0: +normalize-url@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg== @@ -10150,29 +7507,17 @@ npmlog@^4.1.2: gauge "~2.7.3" set-blocking "~2.0.0" -nth-check@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" - integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== - dependencies: - boolbase "~1.0.0" - null-check@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/null-check/-/null-check-1.0.0.tgz#977dffd7176012b9ec30d2a39db5cf72a0439edd" integrity sha1-l33/1xdgErnsMNKjnbXPcqBDnt0= -nullthrows@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/nullthrows/-/nullthrows-1.1.1.tgz#7818258843856ae971eae4208ad7d7eb19a431b1" - integrity sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw== - number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= -nwsapi@^2.1.3, nwsapi@^2.2.0: +nwsapi@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" integrity sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ== @@ -10265,7 +7610,7 @@ object-inspect@^1.8.0: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.8.0.tgz#df807e5ecf53a609cc6bfe93eac3cc7be5b3a9d0" integrity sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA== -object-is@^1.0.1, object-is@^1.1.3: +object-is@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.3.tgz#2e3b9e65560137455ee3bd62aec4d90a2ea1cc81" integrity sha512-teyqLvFWzLkq5B9ki8FVWA902UER2qkxmdA4nLf+wjOLAWgxzCWZNCxpDq9MvE8MmhWNr+I8w3BN49Vx36Y6Xg== @@ -10285,7 +7630,7 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" -object.assign@^4.1.0, object.assign@^4.1.1: +object.assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.1.tgz#303867a666cdd41936ecdedfb1f8f3e32a478cdd" integrity sha512-VT/cxmx5yaoHSOTSyrCygIDFco+RsibY2NM0a4RdEeY/4KgqezwFtK1yr3U67xYhqJSlASm2pKhLVzPj2lr4bA== @@ -10295,7 +7640,7 @@ object.assign@^4.1.0, object.assign@^4.1.1: has-symbols "^1.0.1" object-keys "^1.1.1" -object.getownpropertydescriptors@^2.0.3, object.getownpropertydescriptors@^2.1.0: +object.getownpropertydescriptors@^2.0.3: version "2.1.0" resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" integrity sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg== @@ -10310,7 +7655,7 @@ object.pick@^1.3.0: dependencies: isobject "^3.0.1" -object.values@^1.1.0, object.values@^1.1.1: +object.values@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.1.tgz#68a99ecde356b7e9295a3c5e0ce31dc8c953de5e" integrity sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA== @@ -10325,13 +7670,6 @@ octokit-pagination-methods@^1.1.0: resolved "https://registry.yarnpkg.com/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz#cf472edc9d551055f9ef73f6e42b4dbb4c80bea4" integrity sha512-fZ4qZdQ2nxJvtcasX7Ghl+WlWS/d9IgnBIwFZXVNNZUmzpno91SX5bc5vuxiuKoCtK78XxGGNuSCrDC7xYB3OQ== -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= - dependencies: - ee-first "1.1.1" - once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -10358,14 +7696,6 @@ oo-ascii-tree@^1.14.1: resolved "https://registry.yarnpkg.com/oo-ascii-tree/-/oo-ascii-tree-1.14.1.tgz#cf3da9d7c9c944d3258b274e06aa0192aca20d6e" integrity sha512-dW0RFnYqUj8WQpvuYXVvjfA3ABoNQnScgSxnKa9lPPCvfcO4CBPshifk9M6hU3ksttcNGbQkFq6k2di2E23SVA== -open@^7.0.3: - version "7.3.0" - resolved "https://registry.yarnpkg.com/open/-/open-7.3.0.tgz#45461fdee46444f3645b6e14eb3ca94b82e1be69" - integrity sha512-mgLwQIx2F/ye9SmbrUkurZCnkoXyXyu9EbHtJZrICjVAJfyMArdHp3KkixGdZx1ZHFPNIwl0DDM1dFFqXbTLZw== - dependencies: - is-docker "^2.0.0" - is-wsl "^2.1.1" - opener@^1.5.1: version "1.5.2" resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" @@ -10395,25 +7725,6 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" -ora@^4.0.3: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ora/-/ora-4.1.1.tgz#566cc0348a15c36f5f0e979612842e02ba9dddbc" - integrity sha512-sjYP8QyVWBpBZWD6Vr1M/KwknSw6kJOz41tvGMlwWeClHBtYKTbHMki1PsLZnxKpXMPbTKv9b3pjQu3REib96A== - dependencies: - chalk "^3.0.0" - cli-cursor "^3.1.0" - cli-spinners "^2.2.0" - is-interactive "^1.0.0" - log-symbols "^3.0.0" - mute-stream "0.0.8" - strip-ansi "^6.0.0" - wcwidth "^1.0.1" - -os-browserify@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" - integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= - os-homedir@^1.0.0, os-homedir@^1.0.1, os-homedir@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" @@ -10516,13 +7827,6 @@ p-map@^3.0.0: dependencies: aggregate-error "^3.0.0" -p-map@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" - integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== - dependencies: - aggregate-error "^3.0.0" - p-pipe@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/p-pipe/-/p-pipe-1.2.0.tgz#4b1a11399a11520a67790ee5a0c1d5881d6befe9" @@ -10601,7 +7905,7 @@ package-hash@^4.0.0: lodash.flattendeep "^4.4.0" release-zalgo "^1.0.0" -pako@~1.0.2, pako@~1.0.5: +pako@~1.0.2: version "1.0.11" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== @@ -10615,24 +7919,6 @@ parallel-transform@^1.1.0: inherits "^2.0.3" readable-stream "^2.1.5" -parcel@2.0.0-nightly.447: - version "2.0.0-nightly.447" - resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.0.0-nightly.447.tgz#325e4f3797fe68d2e416ddfb9acbe80e818130a9" - integrity sha512-ZxUeUq+fudKskOXEpKKQCWgFRT1Y8b28AGes1Cd2uSgiioM5zhXC/5Jlu0W2QFTrPzt2TrUlU9ioFPV04T9Pgw== - dependencies: - "@parcel/config-default" "2.0.0-nightly.449+837d1fbd" - "@parcel/core" "2.0.0-nightly.447+837d1fbd" - "@parcel/diagnostic" "2.0.0-nightly.449+837d1fbd" - "@parcel/events" "2.0.0-nightly.449+837d1fbd" - "@parcel/fs" "2.0.0-nightly.449+837d1fbd" - "@parcel/logger" "2.0.0-nightly.449+837d1fbd" - "@parcel/package-manager" "2.0.0-nightly.449+837d1fbd" - "@parcel/utils" "2.0.0-nightly.449+837d1fbd" - chalk "^2.1.0" - commander "^2.19.0" - get-port "^4.2.0" - v8-compile-cache "^2.0.0" - parent-module@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" @@ -10640,17 +7926,6 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parse-asn1@^5.0.0, parse-asn1@^5.1.5: - version "5.1.6" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.6.tgz#385080a3ec13cb62a62d39409cb3e88844cdaed4" - integrity sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== - dependencies: - asn1.js "^5.2.0" - browserify-aes "^1.0.0" - evp_bytestokey "^1.0.0" - pbkdf2 "^3.0.3" - safe-buffer "^5.1.1" - parse-github-repo-url@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz#9e7d8bb252a6cb6ba42595060b7bf6df3dbc1f50" @@ -10699,31 +7974,16 @@ parse-url@^5.0.0: parse-path "^4.0.0" protocols "^1.4.0" -parse5@5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.0.tgz#c59341c9723f414c452975564c7c00a68d58acd2" - integrity sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ== - parse5@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" integrity sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug== -parseurl@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" - integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - pascalcase@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= -path-browserify@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd" - integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g== - path-dirname@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" @@ -10751,11 +8011,6 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-is-inside@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" - integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= - path-key@^2.0.0, path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" @@ -10771,11 +8026,6 @@ path-parse@^1.0.6: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== -path-to-regexp@2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-2.2.1.tgz#90b617025a16381a879bc82a38d4e8bdeb2bcf45" - integrity sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ== - path-to-regexp@^1.7.0: version "1.8.0" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.8.0.tgz#887b3ba9d84393e87a0a0b9f4cb756198b53548a" @@ -10788,518 +8038,98 @@ path-type@^1.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= dependencies: - graceful-fs "^4.1.2" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -path-type@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" - integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM= - dependencies: - pify "^2.0.0" - -path-type@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" - integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== - dependencies: - pify "^3.0.0" - -path-type@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" - integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== - -pbkdf2@^3.0.3: - version "3.1.1" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.1.tgz#cb8724b0fada984596856d1a6ebafd3584654b94" - integrity sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg== - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= - -picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" - integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== - -pify@^2.0.0, pify@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= - -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= - -pify@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" - integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== - -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= - -pirates@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.1.tgz#643a92caf894566f91b2b986d2c66950a8e2fb87" - integrity sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA== - dependencies: - node-modules-regexp "^1.0.0" - -pkg-dir@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" - integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= - dependencies: - find-up "^2.1.0" - -pkg-dir@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" - integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== - dependencies: - find-up "^3.0.0" - -pkg-dir@^4.1.0, pkg-dir@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - -please-upgrade-node@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942" - integrity sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg== - dependencies: - semver-compare "^1.0.0" - -pn@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" - integrity sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA== - -posix-character-classes@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= - -postcss-calc@^7.0.1: - version "7.0.4" - resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-7.0.4.tgz#5e177ddb417341e6d4a193c5d9fd8ada79094f8b" - integrity sha512-0I79VRAd1UTkaHzY9w83P39YGO/M3bG7/tNLrHGEunBolfoGM0hSjrGvjoeaj0JE/zIw5GsI2KZ0UwDJqv5hjw== - dependencies: - postcss "^7.0.27" - postcss-selector-parser "^6.0.2" - postcss-value-parser "^4.0.2" - -postcss-colormin@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-4.0.3.tgz#ae060bce93ed794ac71264f08132d550956bd381" - integrity sha512-WyQFAdDZpExQh32j0U0feWisZ0dmOtPl44qYmJKkq9xFWY3p+4qnRzCHeNrkeRhwPHz9bQ3mo0/yVkaply0MNw== - dependencies: - browserslist "^4.0.0" - color "^3.0.0" - has "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-convert-values@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-4.0.1.tgz#ca3813ed4da0f812f9d43703584e449ebe189a7f" - integrity sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ== - dependencies: - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-discard-comments@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-4.0.2.tgz#1fbabd2c246bff6aaad7997b2b0918f4d7af4033" - integrity sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg== - dependencies: - postcss "^7.0.0" - -postcss-discard-duplicates@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-4.0.2.tgz#3fe133cd3c82282e550fc9b239176a9207b784eb" - integrity sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ== - dependencies: - postcss "^7.0.0" - -postcss-discard-empty@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-4.0.1.tgz#c8c951e9f73ed9428019458444a02ad90bb9f765" - integrity sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w== - dependencies: - postcss "^7.0.0" - -postcss-discard-overridden@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-4.0.1.tgz#652aef8a96726f029f5e3e00146ee7a4e755ff57" - integrity sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg== - dependencies: - postcss "^7.0.0" - -postcss-merge-longhand@^4.0.11: - version "4.0.11" - resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-4.0.11.tgz#62f49a13e4a0ee04e7b98f42bb16062ca2549e24" - integrity sha512-alx/zmoeXvJjp7L4mxEMjh8lxVlDFX1gqWHzaaQewwMZiVhLo42TEClKaeHbRf6J7j82ZOdTJ808RtN0ZOZwvw== - dependencies: - css-color-names "0.0.4" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - stylehacks "^4.0.0" - -postcss-merge-rules@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-4.0.3.tgz#362bea4ff5a1f98e4075a713c6cb25aefef9a650" - integrity sha512-U7e3r1SbvYzO0Jr3UT/zKBVgYYyhAz0aitvGIYOYK5CPmkNih+WDSsS5tvPrJ8YMQYlEMvsZIiqmn7HdFUaeEQ== - dependencies: - browserslist "^4.0.0" - caniuse-api "^3.0.0" - cssnano-util-same-parent "^4.0.0" - postcss "^7.0.0" - postcss-selector-parser "^3.0.0" - vendors "^1.0.0" - -postcss-minify-font-values@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-4.0.2.tgz#cd4c344cce474343fac5d82206ab2cbcb8afd5a6" - integrity sha512-j85oO6OnRU9zPf04+PZv1LYIYOprWm6IA6zkXkrJXyRveDEuQggG6tvoy8ir8ZwjLxLuGfNkCZEQG7zan+Hbtg== - dependencies: - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-minify-gradients@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-4.0.2.tgz#93b29c2ff5099c535eecda56c4aa6e665a663471" - integrity sha512-qKPfwlONdcf/AndP1U8SJ/uzIJtowHlMaSioKzebAXSG4iJthlWC9iSWznQcX4f66gIWX44RSA841HTHj3wK+Q== - dependencies: - cssnano-util-get-arguments "^4.0.0" - is-color-stop "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-minify-params@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-4.0.2.tgz#6b9cef030c11e35261f95f618c90036d680db874" - integrity sha512-G7eWyzEx0xL4/wiBBJxJOz48zAKV2WG3iZOqVhPet/9geefm/Px5uo1fzlHu+DOjT+m0Mmiz3jkQzVHe6wxAWg== - dependencies: - alphanum-sort "^1.0.0" - browserslist "^4.0.0" - cssnano-util-get-arguments "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - uniqs "^2.0.0" - -postcss-minify-selectors@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-4.0.2.tgz#e2e5eb40bfee500d0cd9243500f5f8ea4262fbd8" - integrity sha512-D5S1iViljXBj9kflQo4YutWnJmwm8VvIsU1GeXJGiG9j8CIg9zs4voPMdQDUmIxetUOh60VilsNzCiAFTOqu3g== - dependencies: - alphanum-sort "^1.0.0" - has "^1.0.0" - postcss "^7.0.0" - postcss-selector-parser "^3.0.0" - -postcss-modules-extract-imports@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.1.0.tgz#b614c9720be6816eaee35fb3a5faa1dba6a05ddb" - integrity sha1-thTJcgvmgW6u41+zpfqh26agXds= - dependencies: - postcss "^6.0.1" - -postcss-modules-local-by-default@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz#f7d80c398c5a393fa7964466bd19500a7d61c069" - integrity sha1-99gMOYxaOT+nlkRmvRlQCn1hwGk= - dependencies: - css-selector-tokenizer "^0.7.0" - postcss "^6.0.1" - -postcss-modules-scope@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz#d6ea64994c79f97b62a72b426fbe6056a194bb90" - integrity sha1-1upkmUx5+XtipytCb75gVqGUu5A= - dependencies: - css-selector-tokenizer "^0.7.0" - postcss "^6.0.1" - -postcss-modules-values@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz#ecffa9d7e192518389f42ad0e83f72aec456ea20" - integrity sha1-7P+p1+GSUYOJ9CrQ6D9yrsRW6iA= - dependencies: - icss-replace-symbols "^1.1.0" - postcss "^6.0.1" - -postcss-normalize-charset@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz#8b35add3aee83a136b0471e0d59be58a50285dd4" - integrity sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g== - dependencies: - postcss "^7.0.0" - -postcss-normalize-display-values@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-display-values/-/postcss-normalize-display-values-4.0.2.tgz#0dbe04a4ce9063d4667ed2be476bb830c825935a" - integrity sha512-3F2jcsaMW7+VtRMAqf/3m4cPFhPD3EFRgNs18u+k3lTJJlVe7d0YPO+bnwqo2xg8YiRpDXJI2u8A0wqJxMsQuQ== - dependencies: - cssnano-util-get-match "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-normalize-positions@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-positions/-/postcss-normalize-positions-4.0.2.tgz#05f757f84f260437378368a91f8932d4b102917f" - integrity sha512-Dlf3/9AxpxE+NF1fJxYDeggi5WwV35MXGFnnoccP/9qDtFrTArZ0D0R+iKcg5WsUd8nUYMIl8yXDCtcrT8JrdA== - dependencies: - cssnano-util-get-arguments "^4.0.0" - has "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-normalize-repeat-style@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-4.0.2.tgz#c4ebbc289f3991a028d44751cbdd11918b17910c" - integrity sha512-qvigdYYMpSuoFs3Is/f5nHdRLJN/ITA7huIoCyqqENJe9PvPmLhNLMu7QTjPdtnVf6OcYYO5SHonx4+fbJE1+Q== - dependencies: - cssnano-util-get-arguments "^4.0.0" - cssnano-util-get-match "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-normalize-string@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-string/-/postcss-normalize-string-4.0.2.tgz#cd44c40ab07a0c7a36dc5e99aace1eca4ec2690c" - integrity sha512-RrERod97Dnwqq49WNz8qo66ps0swYZDSb6rM57kN2J+aoyEAJfZ6bMx0sx/F9TIEX0xthPGCmeyiam/jXif0eA== - dependencies: - has "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-normalize-timing-functions@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-4.0.2.tgz#8e009ca2a3949cdaf8ad23e6b6ab99cb5e7d28d9" - integrity sha512-acwJY95edP762e++00Ehq9L4sZCEcOPyaHwoaFOhIwWCDfik6YvqsYNxckee65JHLKzuNSSmAdxwD2Cud1Z54A== - dependencies: - cssnano-util-get-match "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-normalize-unicode@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-unicode/-/postcss-normalize-unicode-4.0.1.tgz#841bd48fdcf3019ad4baa7493a3d363b52ae1cfb" - integrity sha512-od18Uq2wCYn+vZ/qCOeutvHjB5jm57ToxRaMeNuf0nWVHaP9Hua56QyMF6fs/4FSUnVIw0CBPsU0K4LnBPwYwg== - dependencies: - browserslist "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-normalize-url@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-4.0.1.tgz#10e437f86bc7c7e58f7b9652ed878daaa95faae1" - integrity sha512-p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA== - dependencies: - is-absolute-url "^2.0.0" - normalize-url "^3.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-normalize-whitespace@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-whitespace/-/postcss-normalize-whitespace-4.0.2.tgz#bf1d4070fe4fcea87d1348e825d8cc0c5faa7d82" - integrity sha512-tO8QIgrsI3p95r8fyqKV+ufKlSHh9hMJqACqbv2XknufqEDhDvbguXGBBqxw9nsQoXWf0qOqppziKJKHMD4GtA== - dependencies: - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-ordered-values@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-4.1.2.tgz#0cf75c820ec7d5c4d280189559e0b571ebac0eee" - integrity sha512-2fCObh5UanxvSxeXrtLtlwVThBvHn6MQcu4ksNT2tsaV2Fg76R2CV98W7wNSlX+5/pFwEyaDwKLLoEV7uRybAw== - dependencies: - cssnano-util-get-arguments "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-reduce-initial@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-4.0.3.tgz#7fd42ebea5e9c814609639e2c2e84ae270ba48df" - integrity sha512-gKWmR5aUulSjbzOfD9AlJiHCGH6AEVLaM0AV+aSioxUDd16qXP1PCh8d1/BGVvpdWn8k/HiK7n6TjeoXN1F7DA== - dependencies: - browserslist "^4.0.0" - caniuse-api "^3.0.0" - has "^1.0.0" - postcss "^7.0.0" - -postcss-reduce-transforms@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-4.0.2.tgz#17efa405eacc6e07be3414a5ca2d1074681d4e29" - integrity sha512-EEVig1Q2QJ4ELpJXMZR8Vt5DQx8/mo+dGWSR7vWXqcob2gQLyQGsionYcGKATXvQzMPn6DSN1vTN7yFximdIAg== - dependencies: - cssnano-util-get-match "^4.0.0" - has "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-selector-parser@6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz#934cf799d016c83411859e09dcecade01286ec5c" - integrity sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg== - dependencies: - cssesc "^3.0.0" - indexes-of "^1.0.1" - uniq "^1.0.1" - -postcss-selector-parser@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz#b310f5c4c0fdaf76f94902bbaa30db6aa84f5270" - integrity sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA== - dependencies: - dot-prop "^5.2.0" - indexes-of "^1.0.1" - uniq "^1.0.1" + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" -postcss-selector-parser@^6.0.2: - version "6.0.4" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.4.tgz#56075a1380a04604c38b063ea7767a129af5c2b3" - integrity sha512-gjMeXBempyInaBqpp8gODmwZ52WaYsVOsfr4L4lDQ7n3ncD6mEyySiDtgzCT+NYC0mmeOLvtsF8iaEf0YT6dBw== +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM= dependencies: - cssesc "^3.0.0" - indexes-of "^1.0.1" - uniq "^1.0.1" - util-deprecate "^1.0.2" + pify "^2.0.0" -postcss-svgo@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-4.0.2.tgz#17b997bc711b333bab143aaed3b8d3d6e3d38258" - integrity sha512-C6wyjo3VwFm0QgBy+Fu7gCYOkCmgmClghO+pjcxvrcBKtiKt0uCF+hvbMO1fyv5BMImRK90SMb+dwUnfbGd+jw== +path-type@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== dependencies: - is-svg "^3.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - svgo "^1.0.0" + pify "^3.0.0" -postcss-unique-selectors@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-4.0.1.tgz#9446911f3289bfd64c6d680f073c03b1f9ee4bac" - integrity sha512-+JanVaryLo9QwZjKrmJgkI4Fn8SBgRO6WXQBJi7KiAVPlmxikB5Jzc4EvXMT2H0/m0RjrVVm9rGNhZddm/8Spg== - dependencies: - alphanum-sort "^1.0.0" - postcss "^7.0.0" - uniqs "^2.0.0" +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -postcss-value-parser@^3.0.0: - version "3.3.1" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" - integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -postcss-value-parser@^4.0.2, postcss-value-parser@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" - integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== +picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: + version "2.2.2" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" + integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== -postcss@6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.1.tgz#000dbd1f8eef217aa368b9a212c5fc40b2a8f3f2" - integrity sha1-AA29H47vIXqjaLmiEsX8QLKo8/I= - dependencies: - chalk "^1.1.3" - source-map "^0.5.6" - supports-color "^3.2.3" +pify@^2.0.0, pify@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= -postcss@7.0.32: - version "7.0.32" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.32.tgz#4310d6ee347053da3433db2be492883d62cec59d" - integrity sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw== - dependencies: - chalk "^2.4.2" - source-map "^0.6.1" - supports-color "^6.1.0" +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= -postcss@^6.0.1: - version "6.0.23" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.23.tgz#61c82cc328ac60e677645f979054eb98bc0e3324" - integrity sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag== - dependencies: - chalk "^2.4.1" - source-map "^0.6.1" - supports-color "^5.4.0" +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== -postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.17, postcss@^7.0.27: - version "7.0.35" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.35.tgz#d2be00b998f7f211d8a276974079f2e92b970e24" - integrity sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg== +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= dependencies: - chalk "^2.4.2" - source-map "^0.6.1" - supports-color "^6.1.0" + pinkie "^2.0.0" -postcss@^8.0.5: - version "8.1.2" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.1.2.tgz#9731fcaa4f7b0bef47121821bdae9eeb609a324c" - integrity sha512-mToqEVFq8jF9TFhlIK4HhE34zknFJuNTgqtsr60vUvrWn+9TIYugCwiV1JZRxCuOrej2jjstun1bn4Bc7/1HkA== - dependencies: - colorette "^1.2.1" - line-column "^1.0.2" - nanoid "^3.1.12" - source-map "^0.6.1" +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= -posthtml-parser@^0.4.1: - version "0.4.2" - resolved "https://registry.yarnpkg.com/posthtml-parser/-/posthtml-parser-0.4.2.tgz#a132bbdf0cd4bc199d34f322f5c1599385d7c6c1" - integrity sha512-BUIorsYJTvS9UhXxPTzupIztOMVNPa/HtAm9KHni9z6qEfiJ1bpOBL5DfUOL9XAc3XkLIEzBzpph+Zbm4AdRAg== +pirates@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.1.tgz#643a92caf894566f91b2b986d2c66950a8e2fb87" + integrity sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA== dependencies: - htmlparser2 "^3.9.2" + node-modules-regexp "^1.0.0" -posthtml-parser@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/posthtml-parser/-/posthtml-parser-0.5.0.tgz#571058a3b63c1704964ffc25bbe69ffda213244e" - integrity sha512-BsZFAqOeX9lkJJPKG2JmGgtm6t++WibU7FeS40FNNGZ1KS2szRSRQ8Wr2JLvikDgAecrQ/9V4sjugTAin2+KVw== +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= dependencies: - htmlparser2 "^3.9.2" - -posthtml-render@^1.1.5, posthtml-render@^1.2.2, posthtml-render@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/posthtml-render/-/posthtml-render-1.2.3.tgz#da1cf7ba4efb42cfe9c077f4f41669745de99b6d" - integrity sha512-rGGayND//VwTlsYKNqdILsA7U/XP0WJa6SMcdAEoqc2WRM5QExplGg/h9qbTuHz7mc2PvaXU+6iNxItvr5aHMg== + find-up "^2.1.0" -posthtml@^0.11.3: - version "0.11.6" - resolved "https://registry.yarnpkg.com/posthtml/-/posthtml-0.11.6.tgz#e349d51af7929d0683b9d8c3abd8166beecc90a8" - integrity sha512-C2hrAPzmRdpuL3iH0TDdQ6XCc9M7Dcc3zEW5BLerY65G4tWWszwv6nG/ksi6ul5i2mx22ubdljgktXCtNkydkw== +pkg-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" + integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== dependencies: - posthtml-parser "^0.4.1" - posthtml-render "^1.1.5" + find-up "^3.0.0" -posthtml@^0.13.1: - version "0.13.3" - resolved "https://registry.yarnpkg.com/posthtml/-/posthtml-0.13.3.tgz#9702d745108d532a9d5808985e0dafd81b09f7bd" - integrity sha512-5NL2bBc4ihAyoYnY0EAQrFQbJNE1UdvgC1wjYts0hph7jYeU2fa5ki3/9U45ce9V6M1vLMEgUX2NXe/bYL+bCQ== +pkg-dir@^4.1.0, pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== dependencies: - posthtml-parser "^0.5.0" - posthtml-render "^1.2.3" + find-up "^4.0.0" + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= prelude-ls@^1.2.1: version "1.2.1" @@ -11343,11 +8173,6 @@ process-on-spawn@^1.0.0: dependencies: fromentries "^1.2.0" -process@^0.11.10: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= - progress@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" @@ -11448,18 +8273,6 @@ psl@^1.1.28: resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== -public-encrypt@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" - integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== - dependencies: - bn.js "^4.1.0" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - parse-asn1 "^5.0.0" - randombytes "^2.0.1" - safe-buffer "^5.1.2" - pump@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" @@ -11490,11 +8303,6 @@ punycode@1.3.2: resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= -punycode@^1.3.2, punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= - punycode@^2.0.0, punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" @@ -11505,17 +8313,7 @@ pure-rand@^4.0.0: resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-4.0.0.tgz#df8f44bc1b82c4f3d0e245e8f7ced6f09c1e9dc4" integrity sha512-5+HGyGi+6VygEcP1O4jMj0c5HyFgsP9lEy2uA4c+KBq84y21hpmv85wAzPZ/H+q1TUbP3mIMZhqFg08/HAOUqw== -purgecss@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/purgecss/-/purgecss-2.3.0.tgz#5327587abf5795e6541517af8b190a6fb5488bb3" - integrity sha512-BE5CROfVGsx2XIhxGuZAT7rTH9lLeQx/6M0P7DTXQH4IUc3BBzs9JUzt4yzGf3JrH9enkeq6YJBe9CTtkm1WmQ== - dependencies: - commander "^5.0.0" - glob "^7.0.0" - postcss "7.0.32" - postcss-selector-parser "^6.0.2" - -q@^1.1.2, q@^1.5.1: +q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= @@ -11525,12 +8323,7 @@ qs@~6.5.2: resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== -querystring-es3@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" - integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= - -querystring@0.2.0, querystring@^0.2.0: +querystring@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= @@ -11545,26 +8338,6 @@ quick-lru@^4.0.1: resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -randomfill@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" - integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== - dependencies: - randombytes "^2.0.5" - safe-buffer "^5.1.0" - -range-parser@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" - integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4= - raw-body@^2.2.0: version "2.4.1" resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.1.tgz#30ac82f98bb5ae8c152e67149dac8d55153b168c" @@ -11585,11 +8358,6 @@ react-is@^17.0.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.1.tgz#5b3531bd76a645a4c9fb6e693ed36419e3301339" integrity sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA== -react-refresh@^0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.9.0.tgz#71863337adc3e5c2f8a6bfddd12ae3bfe32aafbf" - integrity sha512-Gvzk7OZpiqKSkxsQvO/mbTN1poglhmAV7gR/DdIrRrSMXraRQQlfikRJOr3Nb9GTMPC5kof948Zy6jJZIFtDvQ== - read-cmd-shim@^1.0.1: version "1.0.5" resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-1.0.5.tgz#87e43eba50098ba5a32d0ceb583ab8e43b961c16" @@ -11724,7 +8492,7 @@ readable-stream@1.1.x: isarray "0.0.1" string_decoder "~0.10.x" -"readable-stream@2 || 3", readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: +"readable-stream@2 || 3", readable-stream@3, readable-stream@^3.0.2, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -11781,30 +8549,6 @@ redent@^3.0.0: indent-string "^4.0.0" strip-indent "^3.0.0" -regenerate-unicode-properties@^8.2.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz#e5de7111d655e7ba60c057dbe9ff37c87e65cdec" - integrity sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA== - dependencies: - regenerate "^1.4.0" - -regenerate@^1.4.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.1.tgz#cad92ad8e6b591773485fbe05a485caf4f457e6f" - integrity sha512-j2+C8+NtXQgEKWk49MMP5P/u2GhnahTtVkRIHr5R5lVRlbKvmQ+oS+A5aLKWp2ma5VkT8sh6v+v4hbH0YHR66A== - -regenerator-runtime@^0.13.4: - version "0.13.7" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" - integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== - -regenerator-transform@^0.14.2: - version "0.14.5" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.5.tgz#c98da154683671c9c4dcb16ece736517e1b7feb4" - integrity sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw== - dependencies: - "@babel/runtime" "^7.8.4" - regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" @@ -11826,30 +8570,6 @@ regexpp@^3.0.0, regexpp@^3.1.0: resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== -regexpu-core@^4.7.0: - version "4.7.1" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.1.tgz#2dea5a9a07233298fbf0db91fa9abc4c6e0f8ad6" - integrity sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ== - dependencies: - regenerate "^1.4.0" - regenerate-unicode-properties "^8.2.0" - regjsgen "^0.5.1" - regjsparser "^0.6.4" - unicode-match-property-ecmascript "^1.0.4" - unicode-match-property-value-ecmascript "^1.2.0" - -regjsgen@^0.5.1: - version "0.5.2" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.2.tgz#92ff295fb1deecbf6ecdab2543d207e91aa33733" - integrity sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A== - -regjsparser@^0.6.4: - version "0.6.4" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.4.tgz#a769f8684308401a66e9b529d2436ff4d0666272" - integrity sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw== - dependencies: - jsesc "~0.5.0" - release-zalgo@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/release-zalgo/-/release-zalgo-1.0.0.tgz#09700b7e5074329739330e535c5a90fb67851730" @@ -11886,7 +8606,7 @@ request-promise-core@1.1.4: dependencies: lodash "^4.17.19" -request-promise-native@^1.0.5, request-promise-native@^1.0.8: +request-promise-native@^1.0.8: version "1.0.9" resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.9.tgz#e407120526a5efdc9a39b28a5679bf47b9d9dc28" integrity sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g== @@ -11931,11 +8651,6 @@ require-main-filename@^2.0.0: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== -requires-port@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= - resolve-cwd@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" @@ -11970,13 +8685,21 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.3.2: +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.11.1, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.3.2: version "1.17.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== dependencies: path-parse "^1.0.6" +resolve@^1.10.1: + version "1.19.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" + integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== + dependencies: + is-core-module "^2.1.0" + path-parse "^1.0.6" + resolve@^1.18.1: version "1.18.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.18.1.tgz#018fcb2c5b207d2a6424aee361c5a266da8f4130" @@ -11993,14 +8716,6 @@ restore-cursor@^2.0.0: onetime "^2.0.0" signal-exit "^3.0.2" -restore-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" - integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== - dependencies: - onetime "^5.1.0" - signal-exit "^3.0.2" - ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" @@ -12021,16 +8736,6 @@ rfdc@^1.1.4: resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.1.4.tgz#ba72cc1367a0ccd9cf81a870b3b58bd3ad07f8c2" integrity sha512-5C9HXdzK8EAqN7JDif30jqsBzavB7wLpaubisuQIGHWf2gUXSpzy6ArX/+Da8RjFpagWsCn+pIgxTMAmKw9Zug== -rgb-regex@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/rgb-regex/-/rgb-regex-1.0.1.tgz#c0e0d6882df0e23be254a475e8edd41915feaeb1" - integrity sha1-wODWiC3w4jviVKR16O3UGRX+rrE= - -rgba-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/rgba-regex/-/rgba-regex-1.0.0.tgz#43374e2e2ca0968b0ef1523460b7d730ff22eeb3" - integrity sha1-QzdOLiyglosO8VI0YLfXMP8i7rM= - rimraf@2.6.3: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" @@ -12045,21 +8750,13 @@ rimraf@^2.5.4, rimraf@^2.6.2, rimraf@^2.6.3: dependencies: glob "^7.1.3" -rimraf@^3.0.0, rimraf@^3.0.2: +rimraf@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== dependencies: glob "^7.1.3" -ripemd160@^2.0.0, ripemd160@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" - integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - rsvp@^4.8.4: version "4.8.5" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" @@ -12082,14 +8779,14 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" -rxjs@^6.4.0, rxjs@^6.6.2: +rxjs@^6.4.0: version "6.6.3" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552" integrity sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ== dependencies: tslib "^1.9.0" -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: +safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -12131,18 +8828,11 @@ sax@1.2.1: resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" integrity sha1-e45lYZCyKOgaZq6nSEgNgozS03o= -sax@>=0.6.0, sax@~1.2.4: +sax@>=0.6.0: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== -saxes@^3.1.9: - version "3.1.11" - resolved "https://registry.yarnpkg.com/saxes/-/saxes-3.1.11.tgz#d59d1fd332ec92ad98a2e0b2ee644702384b1c5b" - integrity sha512-Ydydq3zC+WYDJK1+gRxRapLIED9PWeSuuS41wqyoRmzvhhh9nc+QQrVMKJYzJFULazeGhzSV0QleN2wD3boh2g== - dependencies: - xmlchars "^2.1.1" - saxes@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d" @@ -12150,11 +8840,6 @@ saxes@^5.0.0: dependencies: xmlchars "^2.2.0" -semver-compare@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" - integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= - semver-intersect@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/semver-intersect/-/semver-intersect-1.4.0.tgz#bdd9c06bedcdd2fedb8cd352c3c43ee8c61321f3" @@ -12167,35 +8852,16 @@ semver-intersect@^1.4.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" - integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== - semver@7.x, semver@^7.1.1, semver@^7.2.1, semver@^7.3.2: version "7.3.2" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== -semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: +semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -serve-handler@^6.0.0: - version "6.1.3" - resolved "https://registry.yarnpkg.com/serve-handler/-/serve-handler-6.1.3.tgz#1bf8c5ae138712af55c758477533b9117f6435e8" - integrity sha512-FosMqFBNrLyeiIDvP1zgO6YoTzFYHxLDEIavhlmQ+knB2Z7l1t+kGLHkZIDN7UVWqQAmKI3D20A6F6jo3nDd4w== - dependencies: - bytes "3.0.0" - content-disposition "0.5.2" - fast-url-parser "1.1.3" - mime-types "2.1.18" - minimatch "3.0.4" - path-is-inside "1.0.2" - path-to-regexp "2.2.1" - range-parser "1.2.0" - set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -12216,24 +8882,11 @@ set-value@^2.0.0, set-value@^2.0.1: is-plain-object "^2.0.3" split-string "^3.0.1" -setimmediate@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= - setprototypeof@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== -sha.js@^2.4.0, sha.js@^2.4.8: - version "2.4.11" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" - integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - shallow-clone@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" @@ -12292,13 +8945,6 @@ signal-exit@^3.0.0, signal-exit@^3.0.2: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== -simple-swizzle@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" - integrity sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo= - dependencies: - is-arrayish "^0.3.1" - sinon@^9.0.1: version "9.2.0" resolved "https://registry.yarnpkg.com/sinon/-/sinon-9.2.0.tgz#1d333967e30023609f7347351ebc0dc964c0f3c9" @@ -12349,15 +8995,6 @@ slice-ansi@^2.1.0: astral-regex "^1.0.0" is-fullwidth-code-point "^2.0.0" -slice-ansi@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787" - integrity sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ== - dependencies: - ansi-styles "^4.0.0" - astral-regex "^2.0.0" - is-fullwidth-code-point "^3.0.0" - slice-ansi@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" @@ -12467,7 +9104,7 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@^0.5.10, source-map-support@^0.5.17, source-map-support@^0.5.19, source-map-support@^0.5.6, source-map-support@~0.5.12, source-map-support@~0.5.19: +source-map-support@^0.5.10, source-map-support@^0.5.17, source-map-support@^0.5.19, source-map-support@^0.5.6: version "0.5.19" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== @@ -12490,7 +9127,7 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -source-map@^0.7.3, source-map@~0.7.2: +source-map@^0.7.3: version "0.7.3" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== @@ -12564,13 +9201,6 @@ split2@^2.0.0: dependencies: through2 "^2.0.2" -split2@^3.1.1: - version "3.2.2" - resolved "https://registry.yarnpkg.com/split2/-/split2-3.2.2.tgz#bf2cf2a37d838312c249c89206fd7a17dd12365f" - integrity sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg== - dependencies: - readable-stream "^3.0.0" - split@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" @@ -12605,11 +9235,6 @@ ssri@^6.0.0, ssri@^6.0.1: dependencies: figgy-pudding "^3.5.1" -stable@^0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" - integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== - stack-utils@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8" @@ -12651,7 +9276,7 @@ static-extend@^0.1.1: define-property "^0.2.5" object-copy "^0.1.0" -"statuses@>= 1.5.0 < 2", statuses@~1.5.0: +"statuses@>= 1.5.0 < 2": version "1.5.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= @@ -12669,16 +9294,6 @@ stream-each@^1.1.0: end-of-stream "^1.1.0" stream-shift "^1.0.0" -stream-http@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-3.1.1.tgz#0370a8017cf8d050b9a8554afe608f043eaff564" - integrity sha512-S7OqaYu0EkFpgeGFb/NPOoPLxFko7TPqtEeFg5DXPB4v/KETHG0Ln6fRFrNezoelpaDKmycEmmZ81cC9DAwgYg== - dependencies: - builtin-status-codes "^3.0.0" - inherits "^2.0.4" - readable-stream "^3.6.0" - xtend "^4.0.2" - stream-shift@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" @@ -12693,11 +9308,6 @@ streamroller@^2.2.4: debug "^4.1.1" fs-extra "^8.1.0" -string-argv@0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" - integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== - string-length@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.1.tgz#4a973bf31ef77c4edbceadd6af2611996985f8a1" @@ -12762,7 +9372,7 @@ string.prototype.trimstart@^1.0.1: define-properties "^1.1.3" es-abstract "^1.17.5" -string_decoder@^1.1.1, string_decoder@^1.3.0: +string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== @@ -12781,15 +9391,6 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -stringify-object@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.3.0.tgz#703065aefca19300d3ce88af4f5b3956d7556629" - integrity sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw== - dependencies: - get-own-enumerable-property-symbols "^3.0.0" - is-obj "^1.0.1" - is-regexp "^1.0.0" - stringify-package@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/stringify-package/-/stringify-package-1.0.1.tgz#e5aa3643e7f74d0f28628b72f3dad5cecfc3ba85" @@ -12883,28 +9484,7 @@ strong-log-transformer@^2.0.0: minimist "^1.2.0" through "^2.3.4" -stylehacks@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/stylehacks/-/stylehacks-4.0.3.tgz#6718fcaf4d1e07d8a1318690881e8d96726a71d5" - integrity sha512-7GlLk9JwlElY4Y6a/rmbH2MhVlTyVmiJd1PfTCqFaIBEGMYNsrO/v3SeGTdhBThLg4Z+NbOk/qFMwCa+J+3p/g== - dependencies: - browserslist "^4.0.0" - postcss "^7.0.0" - postcss-selector-parser "^3.0.0" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= - -supports-color@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" - integrity sha1-ZawFBLOVQXHYpklGsq48u4pfVPY= - dependencies: - has-flag "^1.0.0" - -supports-color@^5.3.0, supports-color@^5.4.0: +supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== @@ -12933,26 +9513,7 @@ supports-hyperlinks@^2.0.0: has-flag "^4.0.0" supports-color "^7.0.0" -svgo@^1.0.0, svgo@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.3.2.tgz#b6dc511c063346c9e415b81e43401145b96d4167" - integrity sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw== - dependencies: - chalk "^2.4.1" - coa "^2.0.2" - css-select "^2.0.0" - css-select-base-adapter "^0.1.1" - css-tree "1.0.0-alpha.37" - csso "^4.0.2" - js-yaml "^3.13.1" - mkdirp "~0.5.1" - object.values "^1.1.0" - sax "~1.2.4" - stable "^0.1.8" - unquote "~1.1.1" - util.promisify "~1.0.0" - -symbol-tree@^3.2.2, symbol-tree@^3.2.4: +symbol-tree@^3.2.4: version "3.2.4" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== @@ -13110,11 +9671,6 @@ tempfile@^3.0.0: temp-dir "^2.0.0" uuid "^3.3.2" -term-size@^2.1.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/term-size/-/term-size-2.2.0.tgz#1f16adedfe9bdc18800e1776821734086fcc6753" - integrity sha512-a6sumDlzyHVJWb8+YofY4TW112G6p2FCPEAFk+59gIYHv3XHRhm9ltVQ9kli4hNWeQBwSpe8cRN25x0ROunMOw== - terminal-link@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994" @@ -13123,24 +9679,6 @@ terminal-link@^2.0.0: ansi-escapes "^4.2.1" supports-hyperlinks "^2.0.0" -terser@^4.8.0: - version "4.8.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.0.tgz#63056343d7c70bb29f3af665865a46fe03a0df17" - integrity sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw== - dependencies: - commander "^2.20.0" - source-map "~0.6.1" - source-map-support "~0.5.12" - -terser@^5.2.0: - version "5.3.7" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.3.7.tgz#798a4ae2e7ff67050c3e99fcc4e00725827d97e2" - integrity sha512-lJbKdfxWvjpV330U4PBZStCT9h3N9A4zZVA5Y4k9sCWXknrpdyxi1oMsRKLmQ/YDMDxSBKIh88v0SkdhdqX06w== - dependencies: - commander "^2.20.0" - source-map "~0.7.2" - source-map-support "~0.5.19" - test-exclude@^5.2.3: version "5.2.3" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-5.2.3.tgz#c3d3e1e311eb7ee405e092dac10aefd09091eac0" @@ -13212,23 +9750,11 @@ through2@^4.0.0: dependencies: readable-stream "3" -through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@^2.3.8: +through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= -timers-browserify@^2.0.11: - version "2.0.11" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.11.tgz#800b1f3eee272e5bc53ee465a04d0e804c31211f" - integrity sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ== - dependencies: - setimmediate "^1.0.4" - -timsort@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" - integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q= - tmatch@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/tmatch/-/tmatch-4.0.0.tgz#ba178007f30bf6a70f37c643fca5045fb2f8c448" @@ -13288,7 +9814,7 @@ toidentifier@1.0.0: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== -tough-cookie@^2.3.3, tough-cookie@^2.5.0, tough-cookie@~2.5.0: +tough-cookie@^2.3.3, tough-cookie@~2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== @@ -13425,11 +9951,6 @@ tsutils@^3.17.1: dependencies: tslib "^1.8.1" -tty-browserify@^0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.1.tgz#3f05251ee17904dfd0677546670db9651682b811" - integrity sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw== - tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -13544,26 +10065,6 @@ umask@^1.1.0: resolved "https://registry.yarnpkg.com/umask/-/umask-1.1.0.tgz#f29cebf01df517912bb58ff9c4e50fde8e33320d" integrity sha1-8pzr8B31F5ErtY/5xOUP3o4zMg0= -uncss@^0.17.3: - version "0.17.3" - resolved "https://registry.yarnpkg.com/uncss/-/uncss-0.17.3.tgz#50fc1eb4ed573ffff763458d801cd86e4d69ea11" - integrity sha512-ksdDWl81YWvF/X14fOSw4iu8tESDHFIeyKIeDrK6GEVTQvqJc1WlOEXqostNwOCi3qAj++4EaLsdAgPmUbEyog== - dependencies: - commander "^2.20.0" - glob "^7.1.4" - is-absolute-url "^3.0.1" - is-html "^1.1.0" - jsdom "^14.1.0" - lodash "^4.17.15" - postcss "^7.0.17" - postcss-selector-parser "6.0.2" - request "^2.88.0" - -unicode-canonical-property-names-ecmascript@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" - integrity sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ== - unicode-length@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/unicode-length/-/unicode-length-2.0.2.tgz#e5eb4c0d523fdf7bebb59ca261c9ca1cf732da96" @@ -13572,24 +10073,6 @@ unicode-length@^2.0.2: punycode "^2.0.0" strip-ansi "^3.0.1" -unicode-match-property-ecmascript@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" - integrity sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg== - dependencies: - unicode-canonical-property-names-ecmascript "^1.0.4" - unicode-property-aliases-ecmascript "^1.0.4" - -unicode-match-property-value-ecmascript@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz#0d91f600eeeb3096aa962b1d6fc88876e64ea531" - integrity sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ== - -unicode-property-aliases-ecmascript@^1.0.4: - version "1.1.0" - resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz#dd57a99f6207bedff4628abefb94c50db941c8f4" - integrity sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg== - union-value@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" @@ -13600,16 +10083,6 @@ union-value@^1.0.0: is-extendable "^0.1.1" set-value "^2.0.1" -uniq@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" - integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= - -uniqs@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" - integrity sha1-/+3ks2slKQaW5uFl1KWe25mOawI= - unique-filename@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" @@ -13646,16 +10119,11 @@ universalify@^1.0.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d" integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug== -unpipe@1.0.0, unpipe@~1.0.0: +unpipe@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= -unquote@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/unquote/-/unquote-1.1.1.tgz#8fded7324ec6e88a0ff8b905e7c098cdc086d544" - integrity sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ= - unset-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" @@ -13689,14 +10157,6 @@ url@0.10.3: punycode "1.3.2" querystring "0.2.0" -url@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= - dependencies: - punycode "1.3.2" - querystring "0.2.0" - use@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" @@ -13707,7 +10167,7 @@ utf8@^2.1.1: resolved "https://registry.yarnpkg.com/utf8/-/utf8-2.1.2.tgz#1fa0d9270e9be850d9b05027f63519bf46457d96" integrity sha1-H6DZJw6b6FDZsFAn9jUZv0ZFfZY= -util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: +util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= @@ -13719,33 +10179,6 @@ util-promisify@^2.1.0: dependencies: object.getownpropertydescriptors "^2.0.3" -util.promisify@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.1.tgz#6baf7774b80eeb0f7520d8b81d07982a59abbaee" - integrity sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.2" - has-symbols "^1.0.1" - object.getownpropertydescriptors "^2.1.0" - -util@^0.12.0, util@^0.12.3: - version "0.12.3" - resolved "https://registry.yarnpkg.com/util/-/util-0.12.3.tgz#971bb0292d2cc0c892dab7c6a5d37c2bec707888" - integrity sha512-I8XkoQwE+fPQEhy9v012V+TSdH2kp9ts29i20TaaDUXsg7x/onePbhFJUExBfv/2ay1ZOp/Vsm3nDlmnFGSAog== - dependencies: - inherits "^2.0.3" - is-arguments "^1.0.4" - is-generator-function "^1.0.7" - is-typed-array "^1.1.3" - safe-buffer "^5.1.2" - which-typed-array "^1.1.2" - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= - uuid@3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" @@ -13761,7 +10194,7 @@ uuid@^8.3.0, uuid@^8.3.1: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.1.tgz#2ba2e6ca000da60fce5a196954ab241131e05a31" integrity sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg== -v8-compile-cache@^2.0.0, v8-compile-cache@^2.0.3: +v8-compile-cache@^2.0.3: version "2.1.1" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz#54bc3cdd43317bca91e35dcaf305b1a7237de745" integrity sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ== @@ -13790,10 +10223,10 @@ validate-npm-package-name@^3.0.0: dependencies: builtins "^1.0.3" -vendors@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.4.tgz#e2b800a53e7a29b93506c3cf41100d16c4c4ad8e" - integrity sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w== +vandium-utils@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/vandium-utils/-/vandium-utils-1.2.0.tgz#44735de4b7641a05de59ebe945f174e582db4f59" + integrity sha1-RHNd5LdkGgXeWevpRfF05YLbT1k= verror@1.10.0: version "1.10.0" @@ -13804,27 +10237,13 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" -vm-browserify@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" - integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== - -w3c-hr-time@^1.0.1, w3c-hr-time@^1.0.2: +w3c-hr-time@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" integrity sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ== dependencies: browser-process-hrtime "^1.0.0" -w3c-xmlserializer@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-1.1.2.tgz#30485ca7d70a6fd052420a3d12fd90e6339ce794" - integrity sha512-p10l/ayESzrBMYWRID6xbuCKh2Fp77+sA0doRuGn4tTIMrrZVeqfpKjXHY+oDh3K4nLdPgNwMTVP6Vp4pvqbNg== - dependencies: - domexception "^1.0.1" - webidl-conversions "^4.0.2" - xml-name-validator "^3.0.0" - w3c-xmlserializer@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz#3e7104a05b75146cc60f564380b7f683acf1020a" @@ -13839,7 +10258,7 @@ walker@^1.0.7, walker@~1.0.5: dependencies: makeerror "1.0.x" -wcwidth@^1.0.0, wcwidth@^1.0.1: +wcwidth@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= @@ -13861,14 +10280,14 @@ webidl-conversions@^6.1.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== -whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.5: +whatwg-encoding@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== dependencies: iconv-lite "0.4.24" -whatwg-mimetype@^2.2.0, whatwg-mimetype@^2.3.0: +whatwg-mimetype@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== @@ -14057,13 +10476,6 @@ write@1.0.3: dependencies: mkdirp "^0.5.1" -ws@^6.1.2, ws@^6.2.0: - version "6.2.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.1.tgz#442fdf0a47ed64f59b6a5d8ff130f4748ed524fb" - integrity sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA== - dependencies: - async-limiter "~1.0.0" - ws@^7.2.3: version "7.3.1" resolved "https://registry.yarnpkg.com/ws/-/ws-7.3.1.tgz#d0547bf67f7ce4f12a72dfe31262c68d7dc551c8" @@ -14097,7 +10509,7 @@ xmlbuilder@~9.0.1: resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" integrity sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0= -xmlchars@^2.1.1, xmlchars@^2.2.0: +xmlchars@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== @@ -14112,7 +10524,7 @@ xregexp@2.0.0: resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-2.0.0.tgz#52a63e56ca0b84a7f3a5f3d61872f126ad7a5943" integrity sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM= -xtend@^4.0.2, xtend@~4.0.1: +xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== @@ -14142,7 +10554,7 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yaml@*, yaml@1.10.0, yaml@^1.10.0, yaml@^1.5.0: +yaml@*, yaml@1.10.0, yaml@^1.5.0: version "1.10.0" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e" integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg== From 592a8aaf5e1e9432fdceb31aeaa9ab328b20b1cc Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Wed, 18 Nov 2020 11:46:13 +0000 Subject: [PATCH 166/314] chore(kms): fix some doc typos (#11542) fixes #11512 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-kms/lib/key.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/aws-kms/lib/key.ts b/packages/@aws-cdk/aws-kms/lib/key.ts index 5dbf1aa54191a..db13ee4d761ea 100644 --- a/packages/@aws-cdk/aws-kms/lib/key.ts +++ b/packages/@aws-cdk/aws-kms/lib/key.ts @@ -43,17 +43,17 @@ export interface IKey extends IResource { grant(grantee: iam.IGrantable, ...actions: string[]): iam.Grant; /** - * Grant decryption permisisons using this key to the given principal + * Grant decryption permissions using this key to the given principal */ grantDecrypt(grantee: iam.IGrantable): iam.Grant; /** - * Grant encryption permisisons using this key to the given principal + * Grant encryption permissions using this key to the given principal */ grantEncrypt(grantee: iam.IGrantable): iam.Grant; /** - * Grant encryption and decryption permisisons using this key to the given principal + * Grant encryption and decryption permissions using this key to the given principal */ grantEncryptDecrypt(grantee: iam.IGrantable): iam.Grant; } From 5d40fc6eae0c3609cdee8b0e3e8b8d60d8f2cd86 Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Wed, 18 Nov 2020 17:03:52 +0000 Subject: [PATCH 167/314] chore(pkglint): backport visibility of cfnspec (#11552) Backporting the change to package visibility for cfnspec from #11550. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- tools/pkglint/lib/rules.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/pkglint/lib/rules.ts b/tools/pkglint/lib/rules.ts index 79480e7995e44..f5c969cb8f9ce 100644 --- a/tools/pkglint/lib/rules.ts +++ b/tools/pkglint/lib/rules.ts @@ -1463,6 +1463,7 @@ export class UbergenPackageVisibility extends ValidationRule { // These include dependencies of the CDK CLI (aws-cdk). private readonly publicPackages = [ + '@aws-cdk/cfnspec', '@aws-cdk/cloud-assembly-schema', '@aws-cdk/cloudformation-diff', '@aws-cdk/cx-api', From 90be87f3634ffe28b3ddd9f22c81904c6eb18491 Mon Sep 17 00:00:00 2001 From: Robert Djurasaj Date: Wed, 18 Nov 2020 12:21:20 -0700 Subject: [PATCH 168/314] docs(apigateway): fix typos in README (#11551) Closes #11534 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-apigateway/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/aws-apigateway/README.md b/packages/@aws-cdk/aws-apigateway/README.md index 2a71331596f5d..3f75b8325fc68 100644 --- a/packages/@aws-cdk/aws-apigateway/README.md +++ b/packages/@aws-cdk/aws-apigateway/README.md @@ -51,7 +51,7 @@ APIs are defined as a hierarchy of resources and methods. `addResource` and `api.root`. For example, the following code defines an API that includes the following HTTP -endpoints: `ANY /, GET /books`, `POST /books`, `GET /books/{book_id}`, `DELETE /books/{book_id}`. +endpoints: `ANY /`, `GET /books`, `POST /books`, `GET /books/{book_id}`, `DELETE /books/{book_id}`. ```ts const api = new apigateway.RestApi(this, 'books-api'); @@ -581,7 +581,7 @@ Mutual TLS can be configured to limit access to your API based by using client c ```ts new apigw.DomainName(this, 'domain-name', { domainName: 'example.com', - certificate: acm.Certificate.fromCertificateArn(this, 'cert' 'arn:aws:acm:us-east-1:1111111:certificate/11-3336f1-44483d-adc7-9cd375c5169d'), + certificate: acm.Certificate.fromCertificateArn(this, 'cert', 'arn:aws:acm:us-east-1:1111111:certificate/11-3336f1-44483d-adc7-9cd375c5169d'), mtls: { bucket: new Bucket(this, 'bucket')), key: 'truststore.pem', @@ -743,7 +743,7 @@ new route53.ARecord(this, 'CustomDomainAliasRecord', { ## Access Logging -Access logging creates logs everytime an API method is accessed. Access logs can have information on +Access logging creates logs every time an API method is accessed. Access logs can have information on who has accessed the API, how the caller accessed the API and what responses were generated. Access logs are configured on a Stage of the RestApi. Access logs can be expressed in a format of your choosing, and can contain any access details, with a From 25ba34f3e7b2a178a723b8fd3fb320398f0a98e9 Mon Sep 17 00:00:00 2001 From: Shiv Lakshminarayan Date: Wed, 18 Nov 2020 11:55:57 -0800 Subject: [PATCH 169/314] chore: update example resource to use Construct from the constructs module (#11554) aligning with the migration of constructs to use the "constructs" module as we have done in #10506 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../example-construct-library/lib/example-resource.ts | 5 +++-- packages/@aws-cdk/example-construct-library/package.json | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/example-construct-library/lib/example-resource.ts b/packages/@aws-cdk/example-construct-library/lib/example-resource.ts index f2ad8ea9e2807..9e347a869ac91 100644 --- a/packages/@aws-cdk/example-construct-library/lib/example-resource.ts +++ b/packages/@aws-cdk/example-construct-library/lib/example-resource.ts @@ -12,6 +12,7 @@ import * as events from '@aws-cdk/aws-events'; import * as iam from '@aws-cdk/aws-iam'; import * as s3 from '@aws-cdk/aws-s3'; import * as core from '@aws-cdk/core'; +import { Construct } from 'constructs'; // for files that are part of this package, we do import individual classes or functions import { exampleResourceArnComponents } from './private/example-resource-common'; @@ -347,7 +348,7 @@ export class ExampleResource extends ExampleResourceBase { * or fromExampleResourceAttributes * (the last one if you want the importing behavior to be more customizable). */ - public static fromExampleResourceName(scope: core.Construct, id: string, exampleResourceName: string): IExampleResource { + public static fromExampleResourceName(scope: Construct, id: string, exampleResourceName: string): IExampleResource { // Imports are almost always implemented as a module-private // inline class in the method itself. // We extend ExampleResourceBase to reuse all of the logic inside it. @@ -388,7 +389,7 @@ export class ExampleResource extends ExampleResourceBase { * If the props only have optional properties, like in our case, * make sure to add a default value of an empty object to the props argument. */ - constructor(scope: core.Construct, id: string, props: ExampleResourceProps = {}) { + constructor(scope: Construct, id: string, props: ExampleResourceProps = {}) { // Call the constructor from Resource superclass, // which attaches this construct to the construct tree. super(scope, id, { diff --git a/packages/@aws-cdk/example-construct-library/package.json b/packages/@aws-cdk/example-construct-library/package.json index d63466a31f20c..85c27d5ff9138 100644 --- a/packages/@aws-cdk/example-construct-library/package.json +++ b/packages/@aws-cdk/example-construct-library/package.json @@ -99,7 +99,10 @@ "announce": false }, "cdk-build": { - "jest": true + "jest": true, + "env": { + "AWSLINT_BASE_CONSTRUCT": true + } }, "ubergen": { "exclude": true From 4404f747a49402a2d9e67af3b0fd70d1a2481140 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 18 Nov 2020 20:36:14 +0000 Subject: [PATCH 170/314] chore(deps): bump aws-sdk from 2.794.0 to 2.795.0 (#11556) Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.794.0 to 2.795.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.794.0...v2.795.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- .../aws-cloudfront-origins/package.json | 2 +- packages/@aws-cdk/aws-cloudfront/package.json | 2 +- packages/@aws-cdk/aws-cloudtrail/package.json | 2 +- packages/@aws-cdk/aws-codebuild/package.json | 2 +- packages/@aws-cdk/aws-codecommit/package.json | 2 +- packages/@aws-cdk/aws-dynamodb/package.json | 2 +- packages/@aws-cdk/aws-eks/package.json | 2 +- .../@aws-cdk/aws-events-targets/package.json | 2 +- packages/@aws-cdk/aws-logs/package.json | 2 +- packages/@aws-cdk/aws-route53/package.json | 2 +- packages/@aws-cdk/aws-sqs/package.json | 2 +- .../@aws-cdk/custom-resources/package.json | 2 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- yarn.lock | 115 +----------------- 15 files changed, 20 insertions(+), 123 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudfront-origins/package.json b/packages/@aws-cdk/aws-cloudfront-origins/package.json index dd5e28ec3d8e1..25dc06edc2768 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/package.json +++ b/packages/@aws-cdk/aws-cloudfront-origins/package.json @@ -72,7 +72,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", - "aws-sdk": "^2.794.0", + "aws-sdk": "^2.795.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "pkglint": "0.0.0" diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index aed89c78a0d06..b9be64910ab28 100644 --- a/packages/@aws-cdk/aws-cloudfront/package.json +++ b/packages/@aws-cdk/aws-cloudfront/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.794.0", + "aws-sdk": "^2.795.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index 3161797ed505d..9b005930a5af4 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.794.0", + "aws-sdk": "^2.795.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codebuild/package.json b/packages/@aws-cdk/aws-codebuild/package.json index 2ee822f548bfb..ef262aa97bd8a 100644 --- a/packages/@aws-cdk/aws-codebuild/package.json +++ b/packages/@aws-cdk/aws-codebuild/package.json @@ -79,7 +79,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.794.0", + "aws-sdk": "^2.795.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codecommit/package.json b/packages/@aws-cdk/aws-codecommit/package.json index 529806bbf8398..8f8a24ca32bde 100644 --- a/packages/@aws-cdk/aws-codecommit/package.json +++ b/packages/@aws-cdk/aws-codecommit/package.json @@ -79,7 +79,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.794.0", + "aws-sdk": "^2.795.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index d5d315f8afcfa..b6f40ec4e0907 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -74,7 +74,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/jest": "^26.0.15", - "aws-sdk": "^2.794.0", + "aws-sdk": "^2.795.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index f98d484eb13bc..f8d6f85f4094c 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", "@types/yaml": "1.9.6", - "aws-sdk": "^2.794.0", + "aws-sdk": "^2.795.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index 3e24b278048a6..b53a481630959 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -75,7 +75,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-codecommit": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", - "aws-sdk": "^2.794.0", + "aws-sdk": "^2.795.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index 7d8dcc3ee2b74..8c2efcd8c76ed 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.794.0", + "aws-sdk": "^2.795.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-route53/package.json b/packages/@aws-cdk/aws-route53/package.json index 96775788cd901..b0f78d97905fe 100644 --- a/packages/@aws-cdk/aws-route53/package.json +++ b/packages/@aws-cdk/aws-route53/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.794.0", + "aws-sdk": "^2.795.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-sqs/package.json b/packages/@aws-cdk/aws-sqs/package.json index 6ae52400a41e6..adf939c12797b 100644 --- a/packages/@aws-cdk/aws-sqs/package.json +++ b/packages/@aws-cdk/aws-sqs/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.794.0", + "aws-sdk": "^2.795.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index 2637471357b7e..aac93302df7a4 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -79,7 +79,7 @@ "@types/aws-lambda": "^8.10.64", "@types/fs-extra": "^8.1.1", "@types/sinon": "^9.0.8", - "aws-sdk": "^2.794.0", + "aws-sdk": "^2.795.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 14c6de394a88f..4dcbffdd782da 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -71,7 +71,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.794.0", + "aws-sdk": "^2.795.0", "camelcase": "^6.2.0", "cdk-assets": "0.0.0", "colors": "^1.4.0", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index 573bd90db27d5..8ce5dc11201f0 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -47,7 +47,7 @@ "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.794.0", + "aws-sdk": "^2.795.0", "glob": "^7.1.6", "yargs": "^16.1.1" }, diff --git a/yarn.lock b/yarn.lock index 297210fcf0c32..21cd733e765dd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2057,11 +2057,6 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" -app-root-path@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.2.1.tgz#d0df4a682ee408273583d43f6f79e9892624bc9a" - integrity sha512-91IFKeKk7FjfmezPKkwtaRvSpnUc4gDwPAjA1YZ9Gn0q0PPeW+vbeUsZuyDwjI7+QTHhcLen2v25fi/AmhvbJA== - append-transform@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab" @@ -2299,25 +2294,10 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" -aws-sdk@^2.596.0: - version "2.792.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.792.0.tgz#d124a6074244a4675e0416887734e8f6934bdd30" - integrity sha512-h7oSlrCDtZkW5qNw/idKmMjjNJaaPlXFY+NbqtaTjejpCyVuIonUmFvm8GW16V58Avj/hujJfhpX9q0BMCg+VQ== - dependencies: - buffer "4.9.2" - events "1.1.1" - ieee754 "1.1.13" - jmespath "0.15.0" - querystring "0.2.0" - sax "1.2.1" - url "0.10.3" - uuid "3.3.2" - xml2js "0.4.19" - -aws-sdk@^2.637.0, aws-sdk@^2.794.0: - version "2.794.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.794.0.tgz#7eb1f2fa277a91731253c2e9fee57b6096230d15" - integrity sha512-Qqz8v0WfeGveaZTPo9+52nNUep/CTuo18OcdCwF4WrnNBv7bAxExUOwN9XkqhoxLjBDk/LuMmHGhOXRljFQgRw== +aws-sdk@^2.637.0, aws-sdk@^2.795.0: + version "2.795.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.795.0.tgz#30984ff6e6df4e98b9fff5994146d3b20e40adfc" + integrity sha512-cqMposguHdiZOgS3HpAvA8iP3vfrlPQCCn5RllpzU3gPIP5RKtcACu6qzwIAZGcMvC0qt49EzAzyIfN+qdzikQ== dependencies: buffer "4.9.2" events "1.1.1" @@ -3859,16 +3839,6 @@ dot-prop@^5.1.0: dependencies: is-obj "^2.0.0" -dotenv-json@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/dotenv-json/-/dotenv-json-1.0.0.tgz#fc7f672aafea04bed33818733b9f94662332815c" - integrity sha512-jAssr+6r4nKhKRudQ0HOzMskOFFi9+ubXWwmrSGJFgTvpjyPXCXsCsYbjif6mXp7uxA7xY3/LGaiTQukZzSbOQ== - -dotenv@^8.0.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" - integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== - dotgitignore@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/dotgitignore/-/dotgitignore-2.1.0.tgz#a4b15a4e4ef3cf383598aaf1dfa4a04bcc089b7b" @@ -4091,11 +4061,6 @@ escodegen@^1.14.1, escodegen@^1.8.1: optionalDependencies: source-map "~0.6.1" -eslint-config-standard@^14.1.1: - version "14.1.1" - resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz#830a8e44e7aef7de67464979ad06b406026c56ea" - integrity sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg== - eslint-import-resolver-node@^0.3.4: version "0.3.4" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" @@ -4123,14 +4088,6 @@ eslint-module-utils@^2.6.0: debug "^2.6.9" pkg-dir "^2.0.0" -eslint-plugin-es@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893" - integrity sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ== - dependencies: - eslint-utils "^2.0.0" - regexpp "^3.0.0" - eslint-plugin-import@^2.22.1: version "2.22.1" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz#0896c7e6a0cf44109a2d97b95903c2bb689d7702" @@ -4150,33 +4107,11 @@ eslint-plugin-import@^2.22.1: resolve "^1.17.0" tsconfig-paths "^3.9.0" -eslint-plugin-node@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d" - integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g== - dependencies: - eslint-plugin-es "^3.0.0" - eslint-utils "^2.0.0" - ignore "^5.1.1" - minimatch "^3.0.4" - resolve "^1.10.1" - semver "^6.1.0" - -eslint-plugin-promise@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz#845fd8b2260ad8f82564c1222fce44ad71d9418a" - integrity sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw== - eslint-plugin-rulesdir@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/eslint-plugin-rulesdir/-/eslint-plugin-rulesdir-0.1.0.tgz#ad144d7e98464fda82963eff3fab331aecb2bf08" integrity sha1-rRRNfphGT9qClj7/P6szGuyyvwg= -eslint-plugin-standard@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.1.0.tgz#0c3bf3a67e853f8bbbc580fb4945fbf16f41b7c5" - integrity sha512-ZL7+QRixjTR6/528YNGyDotyffm5OQst/sGxKDwGb9Uqs4In5Egi4+jbobhqJoyoCM6/7v/1A5fhQ7ScMtDjaQ== - eslint-scope@^5.0.0, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -5271,7 +5206,7 @@ ignore@^4.0.3, ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.1.1, ignore@^5.1.4, ignore@^5.1.8: +ignore@^5.1.4, ignore@^5.1.8: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== @@ -5464,13 +5399,6 @@ is-core-module@^2.0.0: dependencies: has "^1.0.3" -is-core-module@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.1.0.tgz#a4cc031d9b1aca63eecbd18a650e13cb4eeab946" - integrity sha512-YcV7BgVMRFRua2FqQzKtTDMz8iCuLEyGKjr70q8Zm1yy2qKcurbFEd79PAdHV77oL3NrAaOVQIbMmiHQCHB7ZA== - dependencies: - has "^1.0.3" - is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -6554,24 +6482,6 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== -lambda-leak@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lambda-leak/-/lambda-leak-2.0.0.tgz#771985d3628487f6e885afae2b54510dcfb2cd7e" - integrity sha1-dxmF02KEh/boha+uK1RRDc+yzX4= - -lambda-tester@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/lambda-tester/-/lambda-tester-3.6.0.tgz#ceb7d4f4f0da768487a05cff37dcd088508b5247" - integrity sha512-F2ZTGWCLyIR95o/jWK46V/WnOCFAEUG/m/V7/CLhPJ7PCM+pror1rZ6ujP3TkItSGxUfpJi0kqwidw+M/nEqWw== - dependencies: - app-root-path "^2.2.1" - dotenv "^8.0.0" - dotenv-json "^1.0.0" - lambda-leak "^2.0.0" - semver "^6.1.1" - uuid "^3.3.2" - vandium-utils "^1.1.1" - lazystream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" @@ -8692,14 +8602,6 @@ resolve@^1.1.6, resolve@^1.10.0, resolve@^1.11.1, resolve@^1.13.1, resolve@^1.17 dependencies: path-parse "^1.0.6" -resolve@^1.10.1: - version "1.19.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" - integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== - dependencies: - is-core-module "^2.1.0" - path-parse "^1.0.6" - resolve@^1.18.1: version "1.18.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.18.1.tgz#018fcb2c5b207d2a6424aee361c5a266da8f4130" @@ -8857,7 +8759,7 @@ semver@7.x, semver@^7.1.1, semver@^7.2.1, semver@^7.3.2: resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== -semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.2.0, semver@^6.3.0: +semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -10223,11 +10125,6 @@ validate-npm-package-name@^3.0.0: dependencies: builtins "^1.0.3" -vandium-utils@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/vandium-utils/-/vandium-utils-1.2.0.tgz#44735de4b7641a05de59ebe945f174e582db4f59" - integrity sha1-RHNd5LdkGgXeWevpRfF05YLbT1k= - verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" From 98e9b5956b3bff6db1cee615cd0e14dcb50d4726 Mon Sep 17 00:00:00 2001 From: Alban Esc Date: Wed, 18 Nov 2020 13:32:53 -0800 Subject: [PATCH 171/314] feat(events-targets): add CloudWatch LogGroup Target (#10598) Implementation Update package `@aws-cdk/aws-events-targets` to include support for `CloudWatch LogGroups`. The `CloudWatchLogGroup` event target must add a resource policy to CloudWatch LogGroups to allow events to be posted to the LogGroup. It requires a `CustomResource` to do so as it's not supported by CloudFormation. The `log-group-resource-policy.ts` file should be moved to another module related to LogGroups so it can be easily shared. At the time of this pull request, it is not possible to add it into the `aws-logs` module because of a circular dependency issue. Closes #9953 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-events-targets/README.md | 25 + .../@aws-cdk/aws-events-targets/lib/index.ts | 1 + .../lib/log-group-resource-policy.ts | 56 ++ .../aws-events-targets/lib/log-group.ts | 59 ++ .../@aws-cdk/aws-events-targets/package.json | 4 + .../test/logs/integ.log-group.expected.json | 552 ++++++++++++++++++ .../test/logs/integ.log-group.ts | 47 ++ .../logs/log-group-resource-policy.test.ts | 65 +++ .../test/logs/log-group.test.ts | 112 ++++ packages/@aws-cdk/aws-events/README.md | 2 +- 10 files changed, 922 insertions(+), 1 deletion(-) create mode 100644 packages/@aws-cdk/aws-events-targets/lib/log-group-resource-policy.ts create mode 100644 packages/@aws-cdk/aws-events-targets/lib/log-group.ts create mode 100644 packages/@aws-cdk/aws-events-targets/test/logs/integ.log-group.expected.json create mode 100644 packages/@aws-cdk/aws-events-targets/test/logs/integ.log-group.ts create mode 100644 packages/@aws-cdk/aws-events-targets/test/logs/log-group-resource-policy.test.ts create mode 100644 packages/@aws-cdk/aws-events-targets/test/logs/log-group.test.ts diff --git a/packages/@aws-cdk/aws-events-targets/README.md b/packages/@aws-cdk/aws-events-targets/README.md index 99bb9364ce7f7..c99441f05d32a 100644 --- a/packages/@aws-cdk/aws-events-targets/README.md +++ b/packages/@aws-cdk/aws-events-targets/README.md @@ -23,8 +23,33 @@ Currently supported are: * Queue a Batch job * Make an AWS API call * Put a record to a Kinesis stream +* Log an event into a LogGroup * Put a record to a Kinesis Data Firehose stream See the README of the `@aws-cdk/aws-events` library for more information on EventBridge. +## LogGroup + +Use the `LogGroup` target to log your events in a CloudWatch LogGroup. + +For example, the following code snippet creates an event rule with a CloudWatch LogGroup as a target. +Every events sent from the `aws.ec2` source will be sent to the CloudWatch LogGroup. + +```ts +import * as logs from "@aws-cdk/aws-logs"; +import * as events from "@aws-cdk/aws-events"; +import * as targets from "@aws-cdk/aws-events-targets"; + +const logGroup = new logs.LogGroup(this, 'MyLogGroup', { + logGroupName: 'MyLogGroup', +}); + +const rule = new events.Rule(this, 'rule', { + eventPattern: { + source: ["aws.ec2"], + }, +}); + +rule.addTarget(new targets.CloudWatchLogGroup(logGroup)); +``` diff --git a/packages/@aws-cdk/aws-events-targets/lib/index.ts b/packages/@aws-cdk/aws-events-targets/lib/index.ts index e771a74d8c4eb..bef8ce2463ffa 100644 --- a/packages/@aws-cdk/aws-events-targets/lib/index.ts +++ b/packages/@aws-cdk/aws-events-targets/lib/index.ts @@ -9,4 +9,5 @@ export * from './ecs-task-properties'; export * from './ecs-task'; export * from './state-machine'; export * from './kinesis-stream'; +export * from './log-group'; export * from './kinesis-firehose-stream'; diff --git a/packages/@aws-cdk/aws-events-targets/lib/log-group-resource-policy.ts b/packages/@aws-cdk/aws-events-targets/lib/log-group-resource-policy.ts new file mode 100644 index 0000000000000..d0bbaca87f689 --- /dev/null +++ b/packages/@aws-cdk/aws-events-targets/lib/log-group-resource-policy.ts @@ -0,0 +1,56 @@ +import * as iam from '@aws-cdk/aws-iam'; +import * as cdk from '@aws-cdk/core'; +import * as cr from '@aws-cdk/custom-resources'; + +/** + * Properties to configure a log group resource policy + */ +export interface LogGroupResourcePolicyProps { + /** + * The log group resource policy name + */ + readonly policyName?: string; + /** + * The policy statements for the log group resource logs + */ + readonly policyStatements: [iam.PolicyStatement]; +} + +/** + * Creates LogGroup resource policies. + */ +export class LogGroupResourcePolicy extends cr.AwsCustomResource { + constructor(scope: cdk.Construct, id: string, props: LogGroupResourcePolicyProps) { + const policyDocument = new iam.PolicyDocument({ + statements: props.policyStatements, + }); + + let policyName = props.policyName || cdk.Lazy.stringValue({ produce: () => cdk.Names.uniqueId(this) }); + + super(scope, id, { + resourceType: 'Custom::CloudwatchLogResourcePolicy', + onUpdate: { + service: 'CloudWatchLogs', + action: 'putResourcePolicy', + parameters: { + policyName: policyName, + policyDocument: JSON.stringify(policyDocument), + }, + physicalResourceId: cr.PhysicalResourceId.of(id), + }, + onDelete: { + service: 'CloudWatchLogs', + action: 'deleteResourcePolicy', + parameters: { + policyName: policyName, + }, + ignoreErrorCodesMatching: '400', + }, + policy: cr.AwsCustomResourcePolicy.fromSdkCalls({ + // putResourcePolicy and deleteResourcePolicy don't support resource-level permissions. We must specify all resources ("*"). + // https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazoncloudwatchlogs.html + resources: cr.AwsCustomResourcePolicy.ANY_RESOURCE, + }), + }); + } +} diff --git a/packages/@aws-cdk/aws-events-targets/lib/log-group.ts b/packages/@aws-cdk/aws-events-targets/lib/log-group.ts new file mode 100644 index 0000000000000..ac6e3f7917da4 --- /dev/null +++ b/packages/@aws-cdk/aws-events-targets/lib/log-group.ts @@ -0,0 +1,59 @@ +import * as events from '@aws-cdk/aws-events'; +import * as iam from '@aws-cdk/aws-iam'; +import * as logs from '@aws-cdk/aws-logs'; +import * as cdk from '@aws-cdk/core'; +import { LogGroupResourcePolicy } from './log-group-resource-policy'; + +/** + * Customize the CloudWatch LogGroup Event Target + */ +export interface LogGroupProps { + /** + * The event to send to the CloudWatch LogGroup + * + * This will be the event logged into the CloudWatch LogGroup + * + * @default - the entire EventBridge event + */ + readonly event?: events.RuleTargetInput; +} + +/** + * Use an AWS CloudWatch LogGroup as an event rule target. + */ +export class CloudWatchLogGroup implements events.IRuleTarget { + constructor(private readonly logGroup: logs.ILogGroup, private readonly props: LogGroupProps = {}) {} + + /** + * Returns a RuleTarget that can be used to log an event into a CloudWatch LogGroup + */ + public bind(_rule: events.IRule, _id?: string): events.RuleTargetConfig { + // Use a custom resource to set the log group resource policy since it is not supported by CDK and cfn. + const resourcePolicyId = `EventsLogGroupPolicy${_rule.node.uniqueId}`; + + const logGroupStack = cdk.Stack.of(this.logGroup); + + if (!this.logGroup.node.tryFindChild(resourcePolicyId)) { + new LogGroupResourcePolicy(logGroupStack, resourcePolicyId, { + policyStatements: [new iam.PolicyStatement({ + effect: iam.Effect.ALLOW, + actions: ['logs:PutLogEvents', 'logs:CreateLogStream'], + resources: [this.logGroup.logGroupArn], + principals: [new iam.ServicePrincipal('events.amazonaws.com')], + })], + }); + } + + return { + id: '', + arn: logGroupStack.formatArn({ + service: 'logs', + resource: 'log-group', + sep: ':', + resourceName: this.logGroup.logGroupName, + }), + input: this.props.event, + targetResource: this.logGroup, + }; + } +} diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index b53a481630959..6873b9eb7df72 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -93,11 +93,13 @@ "@aws-cdk/aws-kinesis": "0.0.0", "@aws-cdk/aws-kinesisfirehose": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", + "@aws-cdk/aws-logs": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@aws-cdk/aws-sns-subscriptions": "0.0.0", "@aws-cdk/aws-stepfunctions": "0.0.0", "@aws-cdk/core": "0.0.0", + "@aws-cdk/custom-resources": "0.0.0", "constructs": "^3.2.0" }, "homepage": "https://github.com/aws/aws-cdk", @@ -112,11 +114,13 @@ "@aws-cdk/aws-kinesis": "0.0.0", "@aws-cdk/aws-kinesisfirehose": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", + "@aws-cdk/aws-logs": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@aws-cdk/aws-sns-subscriptions": "0.0.0", "@aws-cdk/aws-stepfunctions": "0.0.0", "@aws-cdk/core": "0.0.0", + "@aws-cdk/custom-resources": "0.0.0", "constructs": "^3.2.0" }, "engines": { diff --git a/packages/@aws-cdk/aws-events-targets/test/logs/integ.log-group.expected.json b/packages/@aws-cdk/aws-events-targets/test/logs/integ.log-group.expected.json new file mode 100644 index 0000000000000..1f4e086b51607 --- /dev/null +++ b/packages/@aws-cdk/aws-events-targets/test/logs/integ.log-group.expected.json @@ -0,0 +1,552 @@ +{ + "Resources": { + "loggroupB02AAEB1": { + "Type": "AWS::Logs::LogGroup", + "Properties": { + "LogGroupName": "MyLogGroupName", + "RetentionInDays": 731 + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "loggroup2F19C5C9B": { + "Type": "AWS::Logs::LogGroup", + "Properties": { + "LogGroupName": "MyLogGroupName2", + "RetentionInDays": 731 + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "loggroupimportedD91682B5": { + "Type": "AWS::Logs::LogGroup", + "Properties": { + "LogGroupName": "MyLogGroupNameToBeImported", + "RetentionInDays": 731 + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "TimerBF6F831F": { + "Type": "AWS::Events::Rule", + "Properties": { + "ScheduleExpression": "rate(1 minute)", + "State": "ENABLED", + "Targets": [ + { + "Arn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":log-group:", + { + "Ref": "loggroupB02AAEB1" + } + ] + ] + }, + "Id": "Target0" + } + ] + } + }, + "EventsLogGroupPolicyloggroupeventsTimerC63340B0CustomResourcePolicy67B796AA": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "logs:PutResourcePolicy", + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": "logs:DeleteResourcePolicy", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EventsLogGroupPolicyloggroupeventsTimerC63340B0CustomResourcePolicy67B796AA", + "Roles": [ + { + "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" + } + ] + } + }, + "EventsLogGroupPolicyloggroupeventsTimerC63340B0C92153CD": { + "Type": "Custom::CloudwatchLogResourcePolicy", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "AWS679f53fac002430cb0da5b7982bd22872D164C4C", + "Arn" + ] + }, + "Create": { + "service": "CloudWatchLogs", + "action": "putResourcePolicy", + "parameters": { + "policyName": "loggroupeventsEventsLogGroupPolicyloggroupeventsTimerC63340B025F606BE", + "policyDocument": { + "Fn::Join": [ + "", + [ + "{\"Statement\":[{\"Action\":[\"logs:PutLogEvents\",\"logs:CreateLogStream\"],\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"events.amazonaws.com\"},\"Resource\":\"", + { + "Fn::GetAtt": [ + "loggroupB02AAEB1", + "Arn" + ] + }, + "\"}],\"Version\":\"2012-10-17\"}" + ] + ] + } + }, + "physicalResourceId": { + "id": "EventsLogGroupPolicyloggroupeventsTimerC63340B0" + } + }, + "Update": { + "service": "CloudWatchLogs", + "action": "putResourcePolicy", + "parameters": { + "policyName": "loggroupeventsEventsLogGroupPolicyloggroupeventsTimerC63340B025F606BE", + "policyDocument": { + "Fn::Join": [ + "", + [ + "{\"Statement\":[{\"Action\":[\"logs:PutLogEvents\",\"logs:CreateLogStream\"],\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"events.amazonaws.com\"},\"Resource\":\"", + { + "Fn::GetAtt": [ + "loggroupB02AAEB1", + "Arn" + ] + }, + "\"}],\"Version\":\"2012-10-17\"}" + ] + ] + } + }, + "physicalResourceId": { + "id": "EventsLogGroupPolicyloggroupeventsTimerC63340B0" + } + }, + "Delete": { + "service": "CloudWatchLogs", + "action": "deleteResourcePolicy", + "parameters": { + "policyName": "loggroupeventsEventsLogGroupPolicyloggroupeventsTimerC63340B025F606BE" + }, + "ignoreErrorCodesMatching": "400" + }, + "InstallLatestAwsSdk": true + }, + "DependsOn": [ + "EventsLogGroupPolicyloggroupeventsTimerC63340B0CustomResourcePolicy67B796AA" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ] + } + }, + "AWS679f53fac002430cb0da5b7982bd22872D164C4C": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Ref": "AssetParametersb64b129569a5ac7a9abf88a18ac0b504d1fb1208872460476ed3fd435830eb94S3Bucket38F1BB8E" + }, + "S3Key": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParametersb64b129569a5ac7a9abf88a18ac0b504d1fb1208872460476ed3fd435830eb94S3VersionKeyCCDC67C0" + } + ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParametersb64b129569a5ac7a9abf88a18ac0b504d1fb1208872460476ed3fd435830eb94S3VersionKeyCCDC67C0" + } + ] + } + ] + } + ] + ] + } + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2", + "Arn" + ] + }, + "Runtime": "nodejs12.x", + "Timeout": 120 + }, + "DependsOn": [ + "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" + ] + }, + "Timer2B6F162E9": { + "Type": "AWS::Events::Rule", + "Properties": { + "ScheduleExpression": "rate(2 minutes)", + "State": "ENABLED", + "Targets": [ + { + "Arn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":log-group:", + { + "Ref": "loggroup2F19C5C9B" + } + ] + ] + }, + "Id": "Target0", + "InputTransformer": { + "InputPathsMap": { + "detail-type": "$.detail-type" + }, + "InputTemplate": "{\"data\":}" + } + } + ] + } + }, + "EventsLogGroupPolicyloggroupeventsTimer289E3527ECustomResourcePolicy24E754C4": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "logs:PutResourcePolicy", + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": "logs:DeleteResourcePolicy", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EventsLogGroupPolicyloggroupeventsTimer289E3527ECustomResourcePolicy24E754C4", + "Roles": [ + { + "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" + } + ] + } + }, + "EventsLogGroupPolicyloggroupeventsTimer289E3527E78608648": { + "Type": "Custom::CloudwatchLogResourcePolicy", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "AWS679f53fac002430cb0da5b7982bd22872D164C4C", + "Arn" + ] + }, + "Create": { + "service": "CloudWatchLogs", + "action": "putResourcePolicy", + "parameters": { + "policyName": "loggroupeventsEventsLogGroupPolicyloggroupeventsTimer289E3527EF8F6205F", + "policyDocument": { + "Fn::Join": [ + "", + [ + "{\"Statement\":[{\"Action\":[\"logs:PutLogEvents\",\"logs:CreateLogStream\"],\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"events.amazonaws.com\"},\"Resource\":\"", + { + "Fn::GetAtt": [ + "loggroup2F19C5C9B", + "Arn" + ] + }, + "\"}],\"Version\":\"2012-10-17\"}" + ] + ] + } + }, + "physicalResourceId": { + "id": "EventsLogGroupPolicyloggroupeventsTimer289E3527E" + } + }, + "Update": { + "service": "CloudWatchLogs", + "action": "putResourcePolicy", + "parameters": { + "policyName": "loggroupeventsEventsLogGroupPolicyloggroupeventsTimer289E3527EF8F6205F", + "policyDocument": { + "Fn::Join": [ + "", + [ + "{\"Statement\":[{\"Action\":[\"logs:PutLogEvents\",\"logs:CreateLogStream\"],\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"events.amazonaws.com\"},\"Resource\":\"", + { + "Fn::GetAtt": [ + "loggroup2F19C5C9B", + "Arn" + ] + }, + "\"}],\"Version\":\"2012-10-17\"}" + ] + ] + } + }, + "physicalResourceId": { + "id": "EventsLogGroupPolicyloggroupeventsTimer289E3527E" + } + }, + "Delete": { + "service": "CloudWatchLogs", + "action": "deleteResourcePolicy", + "parameters": { + "policyName": "loggroupeventsEventsLogGroupPolicyloggroupeventsTimer289E3527EF8F6205F" + }, + "ignoreErrorCodesMatching": "400" + }, + "InstallLatestAwsSdk": true + }, + "DependsOn": [ + "EventsLogGroupPolicyloggroupeventsTimer289E3527ECustomResourcePolicy24E754C4" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "Timer30894E3BB": { + "Type": "AWS::Events::Rule", + "Properties": { + "ScheduleExpression": "rate(1 minute)", + "State": "ENABLED", + "Targets": [ + { + "Arn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":log-group:MyLogGroupNameToBeImported" + ] + ] + }, + "Id": "Target0" + } + ] + } + }, + "EventsLogGroupPolicyloggroupeventsTimer37DF74C17CustomResourcePolicyAE930E1E": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "logs:PutResourcePolicy", + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": "logs:DeleteResourcePolicy", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EventsLogGroupPolicyloggroupeventsTimer37DF74C17CustomResourcePolicyAE930E1E", + "Roles": [ + { + "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" + } + ] + } + }, + "EventsLogGroupPolicyloggroupeventsTimer37DF74C174B3D705D": { + "Type": "Custom::CloudwatchLogResourcePolicy", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "AWS679f53fac002430cb0da5b7982bd22872D164C4C", + "Arn" + ] + }, + "Create": { + "service": "CloudWatchLogs", + "action": "putResourcePolicy", + "parameters": { + "policyName": "loggroupeventsEventsLogGroupPolicyloggroupeventsTimer37DF74C17EF314A8E", + "policyDocument": { + "Fn::Join": [ + "", + [ + "{\"Statement\":[{\"Action\":[\"logs:PutLogEvents\",\"logs:CreateLogStream\"],\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"events.amazonaws.com\"},\"Resource\":\"arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":log-group:MyLogGroupNameToBeImported:*\"}],\"Version\":\"2012-10-17\"}" + ] + ] + } + }, + "physicalResourceId": { + "id": "EventsLogGroupPolicyloggroupeventsTimer37DF74C17" + } + }, + "Update": { + "service": "CloudWatchLogs", + "action": "putResourcePolicy", + "parameters": { + "policyName": "loggroupeventsEventsLogGroupPolicyloggroupeventsTimer37DF74C17EF314A8E", + "policyDocument": { + "Fn::Join": [ + "", + [ + "{\"Statement\":[{\"Action\":[\"logs:PutLogEvents\",\"logs:CreateLogStream\"],\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"events.amazonaws.com\"},\"Resource\":\"arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":log-group:MyLogGroupNameToBeImported:*\"}],\"Version\":\"2012-10-17\"}" + ] + ] + } + }, + "physicalResourceId": { + "id": "EventsLogGroupPolicyloggroupeventsTimer37DF74C17" + } + }, + "Delete": { + "service": "CloudWatchLogs", + "action": "deleteResourcePolicy", + "parameters": { + "policyName": "loggroupeventsEventsLogGroupPolicyloggroupeventsTimer37DF74C17EF314A8E" + }, + "ignoreErrorCodesMatching": "400" + }, + "InstallLatestAwsSdk": true + }, + "DependsOn": [ + "EventsLogGroupPolicyloggroupeventsTimer37DF74C17CustomResourcePolicyAE930E1E" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + }, + "Parameters": { + "AssetParametersb64b129569a5ac7a9abf88a18ac0b504d1fb1208872460476ed3fd435830eb94S3Bucket38F1BB8E": { + "Type": "String", + "Description": "S3 bucket for asset \"b64b129569a5ac7a9abf88a18ac0b504d1fb1208872460476ed3fd435830eb94\"" + }, + "AssetParametersb64b129569a5ac7a9abf88a18ac0b504d1fb1208872460476ed3fd435830eb94S3VersionKeyCCDC67C0": { + "Type": "String", + "Description": "S3 key for asset version \"b64b129569a5ac7a9abf88a18ac0b504d1fb1208872460476ed3fd435830eb94\"" + }, + "AssetParametersb64b129569a5ac7a9abf88a18ac0b504d1fb1208872460476ed3fd435830eb94ArtifactHash782948FC": { + "Type": "String", + "Description": "Artifact hash for asset \"b64b129569a5ac7a9abf88a18ac0b504d1fb1208872460476ed3fd435830eb94\"" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-events-targets/test/logs/integ.log-group.ts b/packages/@aws-cdk/aws-events-targets/test/logs/integ.log-group.ts new file mode 100644 index 0000000000000..6d813dd3df3dd --- /dev/null +++ b/packages/@aws-cdk/aws-events-targets/test/logs/integ.log-group.ts @@ -0,0 +1,47 @@ +import * as events from '@aws-cdk/aws-events'; +import * as logs from '@aws-cdk/aws-logs'; +import * as cdk from '@aws-cdk/core'; +import * as targets from '../../lib'; + +const app = new cdk.App(); + +const stack = new cdk.Stack(app, 'log-group-events'); + +const logGroup = new logs.LogGroup(stack, 'log-group', { + logGroupName: 'MyLogGroupName', + removalPolicy: cdk.RemovalPolicy.DESTROY, +}); + +const logGroup2 = new logs.LogGroup(stack, 'log-group2', { + logGroupName: 'MyLogGroupName2', + removalPolicy: cdk.RemovalPolicy.DESTROY, +}); + +new logs.LogGroup(stack, 'log-group-imported', { + logGroupName: 'MyLogGroupNameToBeImported', + removalPolicy: cdk.RemovalPolicy.DESTROY, +}); + +const importedLogGroup = logs.LogGroup.fromLogGroupName(stack, 'imported-log-group', 'MyLogGroupNameToBeImported'); + +const timer = new events.Rule(stack, 'Timer', { + schedule: events.Schedule.rate(cdk.Duration.minutes(1)), +}); +timer.addTarget(new targets.CloudWatchLogGroup(logGroup)); + +const timer2 = new events.Rule(stack, 'Timer2', { + schedule: events.Schedule.rate(cdk.Duration.minutes(2)), +}); +timer2.addTarget(new targets.CloudWatchLogGroup(logGroup2, { + event: events.RuleTargetInput.fromObject({ + data: events.EventField.fromPath('$.detail-type'), + }), +})); + +const timer3 = new events.Rule(stack, 'Timer3', { + schedule: events.Schedule.rate(cdk.Duration.minutes(1)), +}); +timer3.addTarget(new targets.CloudWatchLogGroup(importedLogGroup)); + +app.synth(); + diff --git a/packages/@aws-cdk/aws-events-targets/test/logs/log-group-resource-policy.test.ts b/packages/@aws-cdk/aws-events-targets/test/logs/log-group-resource-policy.test.ts new file mode 100644 index 0000000000000..999d813105baf --- /dev/null +++ b/packages/@aws-cdk/aws-events-targets/test/logs/log-group-resource-policy.test.ts @@ -0,0 +1,65 @@ +import '@aws-cdk/assert/jest'; +import * as iam from '@aws-cdk/aws-iam'; +import { App, Stack } from '@aws-cdk/core'; +import { LogGroupResourcePolicy } from '../../lib/log-group-resource-policy'; + +let app: App; +let stack: Stack; + +beforeEach(() => { + app = new App(); + stack = new Stack(app, 'Stack', { + env: { account: '1234', region: 'testregion' }, + }); +}); + +test('minimal example renders correctly', () => { + new LogGroupResourcePolicy(stack, 'LogGroupResourcePolicy', { + policyName: 'TestPolicy', + policyStatements: [new iam.PolicyStatement({ + effect: iam.Effect.ALLOW, + actions: ['logs:PutLogEvents', 'logs:CreateLogStream'], + resources: ['*'], + principals: [new iam.ServicePrincipal('es.amazonaws.com')], + })], + }); + + expect(stack).toHaveResource('Custom::CloudwatchLogResourcePolicy', { + ServiceToken: { + 'Fn::GetAtt': [ + 'AWS679f53fac002430cb0da5b7982bd22872D164C4C', + 'Arn', + ], + }, + Create: { + service: 'CloudWatchLogs', + action: 'putResourcePolicy', + parameters: { + policyName: 'TestPolicy', + policyDocument: '{"Statement":[{"Action":["logs:PutLogEvents","logs:CreateLogStream"],"Effect":"Allow","Principal":{"Service":"es.amazonaws.com"},"Resource":"*"}],"Version":"2012-10-17"}', + }, + physicalResourceId: { + id: 'LogGroupResourcePolicy', + }, + }, + Update: { + service: 'CloudWatchLogs', + action: 'putResourcePolicy', + parameters: { + policyName: 'TestPolicy', + policyDocument: '{"Statement":[{"Action":["logs:PutLogEvents","logs:CreateLogStream"],"Effect":"Allow","Principal":{"Service":"es.amazonaws.com"},"Resource":"*"}],"Version":"2012-10-17"}', + }, + physicalResourceId: { + id: 'LogGroupResourcePolicy', + }, + }, + Delete: { + service: 'CloudWatchLogs', + action: 'deleteResourcePolicy', + parameters: { + policyName: 'TestPolicy', + }, + ignoreErrorCodesMatching: '400', + }, + }); +}); diff --git a/packages/@aws-cdk/aws-events-targets/test/logs/log-group.test.ts b/packages/@aws-cdk/aws-events-targets/test/logs/log-group.test.ts new file mode 100644 index 0000000000000..6df5ad191770a --- /dev/null +++ b/packages/@aws-cdk/aws-events-targets/test/logs/log-group.test.ts @@ -0,0 +1,112 @@ +import '@aws-cdk/assert/jest'; +import * as events from '@aws-cdk/aws-events'; +import * as logs from '@aws-cdk/aws-logs'; +import * as cdk from '@aws-cdk/core'; +import * as targets from '../../lib'; + + +test('use log group as an event rule target', () => { + // GIVEN + const stack = new cdk.Stack(); + const logGroup = new logs.LogGroup(stack, 'MyLogGroup', { + logGroupName: '/aws/events/MyLogGroup', + }); + const rule1 = new events.Rule(stack, 'Rule', { + schedule: events.Schedule.rate(cdk.Duration.minutes(1)), + }); + + // WHEN + rule1.addTarget(new targets.CloudWatchLogGroup(logGroup)); + + // THEN + expect(stack).toHaveResource('AWS::Events::Rule', { + ScheduleExpression: 'rate(1 minute)', + State: 'ENABLED', + Targets: [ + { + Arn: { + 'Fn::Join': [ + '', + [ + 'arn:', + { + Ref: 'AWS::Partition', + }, + ':logs:', + { + Ref: 'AWS::Region', + }, + ':', + { + Ref: 'AWS::AccountId', + }, + ':log-group:', + { + Ref: 'MyLogGroup5C0DAD85', + }, + ], + ], + }, + Id: 'Target0', + }, + ], + }); +}); + +test('use log group as an event rule target with rule target input', () => { + // GIVEN + const stack = new cdk.Stack(); + const logGroup = new logs.LogGroup(stack, 'MyLogGroup', { + logGroupName: '/aws/events/MyLogGroup', + }); + const rule1 = new events.Rule(stack, 'Rule', { + schedule: events.Schedule.rate(cdk.Duration.minutes(1)), + }); + + // WHEN + rule1.addTarget(new targets.CloudWatchLogGroup(logGroup, { + event: events.RuleTargetInput.fromObject({ + data: events.EventField.fromPath('$'), + }), + })); + + // THEN + expect(stack).toHaveResource('AWS::Events::Rule', { + ScheduleExpression: 'rate(1 minute)', + State: 'ENABLED', + Targets: [ + { + Arn: { + 'Fn::Join': [ + '', + [ + 'arn:', + { + Ref: 'AWS::Partition', + }, + ':logs:', + { + Ref: 'AWS::Region', + }, + ':', + { + Ref: 'AWS::AccountId', + }, + ':log-group:', + { + Ref: 'MyLogGroup5C0DAD85', + }, + ], + ], + }, + Id: 'Target0', + InputTransformer: { + InputPathsMap: { + f1: '$', + }, + InputTemplate: '{"data":}', + }, + }, + ], + }); +}); diff --git a/packages/@aws-cdk/aws-events/README.md b/packages/@aws-cdk/aws-events/README.md index 3c0782339b665..77263d685eb67 100644 --- a/packages/@aws-cdk/aws-events/README.md +++ b/packages/@aws-cdk/aws-events/README.md @@ -28,7 +28,7 @@ event when the pipeline changes it's state. Service](https://docs.aws.amazon.com/eventbridge/latest/userguide/event-types.html). * __Targets__: A target processes events. Targets can include Amazon EC2 instances, AWS Lambda functions, Kinesis streams, Amazon ECS tasks, Step - Functions state machines, Amazon SNS topics, Amazon SQS queues, and built-in + Functions state machines, Amazon SNS topics, Amazon SQS queues, Amazon CloudWatch LogGroups, and built-in targets. A target receives events in JSON format. * __Rules__: A rule matches incoming events and routes them to targets for processing. A single rule can route to multiple targets, all of which are From d592cd02ca20ee01c64b3c80cc2294e2aaf85fbb Mon Sep 17 00:00:00 2001 From: Robert Djurasaj Date: Wed, 18 Nov 2020 15:01:13 -0700 Subject: [PATCH 172/314] docs(ec2): typos in README.md (#11555) Few typos that VS Code kept bugging me about... :) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-ec2/lib/connections.ts | 2 +- packages/@aws-cdk/aws-ec2/lib/network-util.ts | 2 +- packages/@aws-cdk/aws-ec2/lib/util.ts | 2 +- packages/@aws-cdk/aws-ec2/lib/vpc.ts | 8 ++++---- packages/@aws-cdk/aws-ec2/lib/vpn.ts | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/@aws-cdk/aws-ec2/lib/connections.ts b/packages/@aws-cdk/aws-ec2/lib/connections.ts index 3c910b6abaafc..0ecccea97fdb2 100644 --- a/packages/@aws-cdk/aws-ec2/lib/connections.ts +++ b/packages/@aws-cdk/aws-ec2/lib/connections.ts @@ -228,7 +228,7 @@ export class Connections implements IConnectable { */ public allowToDefaultPort(other: IConnectable, description?: string) { if (other.connections.defaultPort === undefined) { - throw new Error('Cannot call alloToDefaultPort(): other resource has no default port'); + throw new Error('Cannot call allowToDefaultPort(): other resource has no default port'); } this.allowTo(other, other.connections.defaultPort, description); diff --git a/packages/@aws-cdk/aws-ec2/lib/network-util.ts b/packages/@aws-cdk/aws-ec2/lib/network-util.ts index b7f4948bd61aa..301c8ad5ed980 100644 --- a/packages/@aws-cdk/aws-ec2/lib/network-util.ts +++ b/packages/@aws-cdk/aws-ec2/lib/network-util.ts @@ -219,7 +219,7 @@ export class CidrBlock { * mask expects a number * * If the given `cidr` or `ipAddress` is not the beginning of the block, - * then the next avaiable block will be returned. For example, if + * then the next available block will be returned. For example, if * `10.0.3.1/28` is given the returned block will represent `10.0.3.16/28`. */ constructor(cidr: string) diff --git a/packages/@aws-cdk/aws-ec2/lib/util.ts b/packages/@aws-cdk/aws-ec2/lib/util.ts index 56fef8b2a97f5..7ad31d02e54ec 100644 --- a/packages/@aws-cdk/aws-ec2/lib/util.ts +++ b/packages/@aws-cdk/aws-ec2/lib/util.ts @@ -4,7 +4,7 @@ import { ISubnet, Subnet, SubnetType } from './vpc'; /** * Turn an arbitrary string into one that can be used as a CloudFormation identifier by stripping special characters * - * (At the moment, no efforts are taken to prevent collissions, but we can add that later when it becomes necessary). + * (At the moment, no efforts are taken to prevent collisions, but we can add that later when it becomes necessary). */ export function slugify(x: string): string { return x.replace(/[^a-zA-Z0-9]/g, ''); diff --git a/packages/@aws-cdk/aws-ec2/lib/vpc.ts b/packages/@aws-cdk/aws-ec2/lib/vpc.ts index e46113b14c89a..7cbf02c76a452 100644 --- a/packages/@aws-cdk/aws-ec2/lib/vpc.ts +++ b/packages/@aws-cdk/aws-ec2/lib/vpc.ts @@ -936,7 +936,7 @@ export interface SubnetConfiguration { * * When true, the IP space for the subnet is reserved but no actual * resources are provisioned. This space is only dependent on the - * number of availibility zones and on `cidrMask` - all other subnet + * number of availability zones and on `cidrMask` - all other subnet * properties are ignored. * * @default false @@ -1342,9 +1342,9 @@ export class Vpc extends VpcBase { } const totalRemaining = remainingSpaceSubnets.length * this.availabilityZones.length; - const cidrMaskForRemaing = this.networkBuilder.maskForRemainingSubnets(totalRemaining); + const cidrMaskForRemaining = this.networkBuilder.maskForRemainingSubnets(totalRemaining); for (const subnet of remainingSpaceSubnets) { - this.createSubnetResources(subnet, cidrMaskForRemaing); + this.createSubnetResources(subnet, cidrMaskForRemaining); } } @@ -1580,7 +1580,7 @@ export class Subnet extends Resource implements ISubnet { * explicit DENY entries that you add. * * You can replace it with a custom ACL which denies all traffic except - * the explic it ALLOW entries that you add by creating a `NetworkAcl` + * the explicit ALLOW entries that you add by creating a `NetworkAcl` * object and calling `associateNetworkAcl()`. */ public get networkAcl(): INetworkAcl { diff --git a/packages/@aws-cdk/aws-ec2/lib/vpn.ts b/packages/@aws-cdk/aws-ec2/lib/vpn.ts index 62d202992b7ee..4683180d2af84 100644 --- a/packages/@aws-cdk/aws-ec2/lib/vpn.ts +++ b/packages/@aws-cdk/aws-ec2/lib/vpn.ts @@ -103,7 +103,7 @@ export interface VpnGatewayProps { readonly type: string; /** - * Explicitely specify an Asn or let aws pick an Asn for you. + * Explicitly specify an Asn or let aws pick an Asn for you. * @default 65000 */ readonly amazonSideAsn?: number; @@ -114,7 +114,7 @@ export interface VpnGatewayProps { */ export interface EnableVpnGatewayOptions extends VpnGatewayProps { /** - * Provide an array of subnets where the route propagation shoud be added. + * Provide an array of subnets where the route propagation should be added. * @default noPropagation */ readonly vpnRoutePropagation?: SubnetSelection[] From 1da671528472b3bee655bea89bae7273fc21a3bd Mon Sep 17 00:00:00 2001 From: Shiv Lakshminarayan Date: Wed, 18 Nov 2020 14:38:55 -0800 Subject: [PATCH 173/314] feat(codeguruprofiler): CodeGuruProfiler Construct Library is now in Developer Preview (#11558) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-codeguruprofiler/README.md | 4 ++-- packages/@aws-cdk/aws-codeguruprofiler/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/aws-codeguruprofiler/README.md b/packages/@aws-cdk/aws-codeguruprofiler/README.md index a0b31cb1f2246..b4d97ceb8921b 100644 --- a/packages/@aws-cdk/aws-codeguruprofiler/README.md +++ b/packages/@aws-cdk/aws-codeguruprofiler/README.md @@ -6,9 +6,9 @@ > All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. -![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) +![cdk-constructs: Developer Preview](https://img.shields.io/badge/cdk--constructs-developer--preview-informational.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are in **developer preview** before they become stable. We will only make breaking changes to address unforeseen API issues. Therefore, these APIs are not subject to [Semantic Versioning](https://semver.org/), and breaking changes will be announced in release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. --- diff --git a/packages/@aws-cdk/aws-codeguruprofiler/package.json b/packages/@aws-cdk/aws-codeguruprofiler/package.json index e5d6c51059ebe..835e78d5b9882 100644 --- a/packages/@aws-cdk/aws-codeguruprofiler/package.json +++ b/packages/@aws-cdk/aws-codeguruprofiler/package.json @@ -94,7 +94,7 @@ "node": ">= 10.13.0 <13 || >=13.7.0" }, "stability": "experimental", - "maturity": "experimental", + "maturity": "developer-preview", "awscdkio": { "announce": false } From 4697cb06f90d049f5936d202595b632426278574 Mon Sep 17 00:00:00 2001 From: marcotesch <38279560+marcotesch@users.noreply.github.com> Date: Thu, 19 Nov 2020 00:15:12 +0100 Subject: [PATCH 174/314] chore(rds): add ACU_4 to AuroraCapacityUnit for Serverless clusters (#11540) Added ACU_4 value to enum AuroraCapacityUnits as it was missing and is a valid configuration option for Amazon Aurora ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-rds/lib/serverless-cluster.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/@aws-cdk/aws-rds/lib/serverless-cluster.ts b/packages/@aws-cdk/aws-rds/lib/serverless-cluster.ts index 899607166c919..39258de8c7748 100644 --- a/packages/@aws-cdk/aws-rds/lib/serverless-cluster.ts +++ b/packages/@aws-cdk/aws-rds/lib/serverless-cluster.ts @@ -224,6 +224,8 @@ export enum AuroraCapacityUnit { ACU_1 = 1, /** 2 Aurora Capacity Units */ ACU_2 = 2, + /** 4 Aurora Capacity Units */ + ACU_4 = 4, /** 8 Aurora Capacity Units */ ACU_8 = 8, /** 16 Aurora Capacity Units */ From 0b058f372a41092a383706dc35e32e0573b962fe Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 19 Nov 2020 03:42:45 +0000 Subject: [PATCH 175/314] chore(deps-dev): bump ts-mock-imports from 1.3.0 to 1.3.1 (#11568) Bumps [ts-mock-imports](https://github.com/EmandM/ts-mock-imports) from 1.3.0 to 1.3.1. - [Release notes](https://github.com/EmandM/ts-mock-imports/releases) - [Commits](https://github.com/EmandM/ts-mock-imports/commits) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/assets/package.json | 2 +- packages/@aws-cdk/core/package.json | 2 +- packages/aws-cdk/package.json | 2 +- yarn.lock | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/@aws-cdk/assets/package.json b/packages/@aws-cdk/assets/package.json index e91c6966fcd76..c2d380e16a47b 100644 --- a/packages/@aws-cdk/assets/package.json +++ b/packages/@aws-cdk/assets/package.json @@ -77,7 +77,7 @@ "nodeunit": "^0.11.3", "pkglint": "0.0.0", "sinon": "^9.2.1", - "ts-mock-imports": "^1.3.0" + "ts-mock-imports": "^1.3.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json index 5541f4fd530b1..6b3f4832d2c84 100644 --- a/packages/@aws-cdk/core/package.json +++ b/packages/@aws-cdk/core/package.json @@ -179,7 +179,7 @@ "nodeunit-shim": "0.0.0", "pkglint": "0.0.0", "sinon": "^9.2.1", - "ts-mock-imports": "^1.3.0" + "ts-mock-imports": "^1.3.1" }, "dependencies": { "@aws-cdk/cloud-assembly-schema": "0.0.0", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 4dcbffdd782da..437f047fbce7d 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -60,7 +60,7 @@ "pkglint": "0.0.0", "sinon": "^9.2.1", "ts-jest": "^26.4.4", - "ts-mock-imports": "^1.3.0", + "ts-mock-imports": "^1.3.1", "@octokit/rest": "^18.0.9", "make-runnable": "^1.3.8" }, diff --git a/yarn.lock b/yarn.lock index 21cd733e765dd..b36fbeba50bd4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9794,10 +9794,10 @@ ts-jest@^26.4.4: semver "7.x" yargs-parser "20.x" -ts-mock-imports@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/ts-mock-imports/-/ts-mock-imports-1.3.0.tgz#ed9b743349f3c27346afe5b7454ffd2bcaa2302d" - integrity sha512-cCrVcRYsp84eDvPict0ZZD/D7ppQ0/JSx4ve6aEU8DjlsaWRJWV6ADMovp2sCuh6pZcduLFoIYhKTDU2LARo7Q== +ts-mock-imports@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/ts-mock-imports/-/ts-mock-imports-1.3.1.tgz#1bb701c05a24f3ba30621b5e31af123dbd994db8" + integrity sha512-MKEGXb40TUbpQ6b/if424zs0gfTyHfsebw+FUBkqbC0kVoPwoXhoe82lJH4dC92j4vDoId6pSjtIvwvtSMnS5w== ts-node@^8.0.2: version "8.10.2" From 484dac45e71663301f39d7d80465a67d7acd1ba8 Mon Sep 17 00:00:00 2001 From: Shiv Lakshminarayan Date: Thu, 19 Nov 2020 02:11:03 -0800 Subject: [PATCH 176/314] chore(init-templates): bump up ts-node dependency (#11567) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../lib/init-templates/app/typescript/package.template.json | 2 +- .../init-templates/sample-app/typescript/package.template.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/aws-cdk/lib/init-templates/app/typescript/package.template.json b/packages/aws-cdk/lib/init-templates/app/typescript/package.template.json index 015a6d688d755..df89ae6a206bb 100644 --- a/packages/aws-cdk/lib/init-templates/app/typescript/package.template.json +++ b/packages/aws-cdk/lib/init-templates/app/typescript/package.template.json @@ -17,7 +17,7 @@ "jest": "^26.4.2", "ts-jest": "^26.2.0", "aws-cdk": "%cdk-version%", - "ts-node": "^8.3.0", + "ts-node": "^9.0.0", "typescript": "~3.9.7" }, "dependencies": { diff --git a/packages/aws-cdk/lib/init-templates/sample-app/typescript/package.template.json b/packages/aws-cdk/lib/init-templates/sample-app/typescript/package.template.json index 3f9e0309f07d1..98942aa31c167 100644 --- a/packages/aws-cdk/lib/init-templates/sample-app/typescript/package.template.json +++ b/packages/aws-cdk/lib/init-templates/sample-app/typescript/package.template.json @@ -17,7 +17,7 @@ "@types/node": "10.17.27", "jest": "^26.4.2", "ts-jest": "^26.2.0", - "ts-node": "^8.3.0", + "ts-node": "^9.0.0", "typescript": "~3.9.7" }, "dependencies": { From ddc63f5a98c00aae7c9bfcb8fce50bc6f07014c0 Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Thu, 19 Nov 2020 10:48:46 +0000 Subject: [PATCH 177/314] chore: backport fix for syntax error in merge-forward script (#11572) See #11571 for the fix on the v2-main branch. This backports the change to master to ensure the change doesn't get reverted in the forward merge itself. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- scripts/merge-forward.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/merge-forward.sh b/scripts/merge-forward.sh index 96b2a0da53586..3a7632e70d736 100755 --- a/scripts/merge-forward.sh +++ b/scripts/merge-forward.sh @@ -8,6 +8,6 @@ git checkout -B v2-main origin/v2-main # Some package rules differ between v1 and v2, most notably which packages can be public vs private. # These differences are fixable via 'pkglint', so we run that and commit the delta (if any). -lerna run pkglint && { git diff --quiet || git commit -am 'automatic pkglint fixes' } +lerna run pkglint && { git diff --quiet || git commit -am 'automatic pkglint fixes'; } git merge origin/master --no-edit From 2fadf122c264b8a0daf243d1d1da9c2b36bd5eae Mon Sep 17 00:00:00 2001 From: Jonathan Goldwasser Date: Thu, 19 Nov 2020 12:18:03 +0100 Subject: [PATCH 178/314] chore(cfnspec): race condition in test deletes specification.json (#11557) The build script of `@aws-cdk/cfnspec` creates the file `spec/specification.json` by running `node build-tools/build`. This file runs an `async` `main()`. The test file `test.build.ts` imports this same file to test one of its utils (`massageSpec`). This leads to the script potentially running one more time if the test is slow. And sometimes the test stops just when a `spec/specification.json` is about to be written. The result is a zero byte JSON file. In this case, the next package to be tested during the build (`@aws-cdk/cloudformation-diff`) fails when it uses `@aws-cdk/cfnspec` because it now requires a zero byte `spec/specification.json`. Move all the utils out of the build to allow importing them without rerunning the specifications build. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/cfnspec/build-tools/build.ts | 121 +----------------- .../cfnspec/build-tools/massage-spec.ts | 121 ++++++++++++++++++ packages/@aws-cdk/cfnspec/test/test.build.ts | 2 +- 3 files changed, 123 insertions(+), 121 deletions(-) create mode 100644 packages/@aws-cdk/cfnspec/build-tools/massage-spec.ts diff --git a/packages/@aws-cdk/cfnspec/build-tools/build.ts b/packages/@aws-cdk/cfnspec/build-tools/build.ts index 941d8e95d8915..913605461e224 100644 --- a/packages/@aws-cdk/cfnspec/build-tools/build.ts +++ b/packages/@aws-cdk/cfnspec/build-tools/build.ts @@ -6,11 +6,10 @@ */ import * as path from 'path'; -import * as fastJsonPatch from 'fast-json-patch'; import * as fs from 'fs-extra'; import * as md5 from 'md5'; import { schema } from '../lib'; -import { detectScrutinyTypes } from './scrutiny'; +import { decorateResourceTypes, forEachSection, massageSpec, merge, normalize, patch } from './massage-spec'; async function main() { const inputDir = path.join(process.cwd(), 'spec-source'); @@ -35,124 +34,6 @@ async function main() { await fs.writeJson(path.join(outDir, 'specification.json'), spec, { spaces: 2 }); } -export function massageSpec(spec: schema.Specification) { - detectScrutinyTypes(spec); - replaceIncompleteTypes(spec); - dropTypelessAttributes(spec); -} - -function forEachSection(spec: schema.Specification, data: any, cb: (spec: any, fragment: any, path: string[]) => void) { - cb(spec.PropertyTypes, data.PropertyTypes, ['PropertyTypes']); - cb(spec.ResourceTypes, data.ResourceTypes, ['ResourceTypes']); - // Per-resource specs are keyed on ResourceType (singular), but we want it in ResourceTypes (plural) - cb(spec.ResourceTypes, data.ResourceType, ['ResourceType']); -} - -function decorateResourceTypes(data: any) { - const requiredTransform = data.ResourceSpecificationTransform as string | undefined; - if (!requiredTransform) { return; } - const resourceTypes = data.ResourceTypes || data.ResourceType; - for (const name of Object.keys(resourceTypes)) { - resourceTypes[name].RequiredTransform = requiredTransform; - } -} - -/** - * Fix incomplete type definitions in PropertyTypes - * - * Some user-defined types are defined to not have any properties, and not - * be a collection of other types either. They have no definition at all. - * - * Add a property object type with empty properties. - */ -function replaceIncompleteTypes(spec: schema.Specification) { - for (const [name, definition] of Object.entries(spec.PropertyTypes)) { - if (!schema.isRecordType(definition) - && !schema.isCollectionProperty(definition) - && !schema.isScalarProperty(definition) - && !schema.isPrimitiveProperty(definition)) { - // eslint-disable-next-line no-console - console.log(`[${name}] Incomplete type, adding empty "Properties" field`); - - (definition as unknown as schema.RecordProperty).Properties = {}; - } - } -} - -/** - * Drop Attributes specified with the different ResourceTypes that have - * no type specified. - */ -function dropTypelessAttributes(spec: schema.Specification) { - const resourceTypes = spec.ResourceTypes; - Object.values(resourceTypes).forEach((resourceType) => { - const attributes = resourceType.Attributes ?? {}; - Object.keys(attributes).forEach((attrKey) => { - const attrVal = attributes[attrKey]; - if (Object.keys(attrVal).length === 0) { - delete attributes[attrKey]; - } - }); - }); -} - -function merge(spec: any, fragment: any, jsonPath: string[]) { - if (!fragment) { return; } - for (const key of Object.keys(fragment)) { - if (key in spec) { - const specVal = spec[key]; - const fragVal = fragment[key]; - if (typeof specVal !== typeof fragVal) { - // eslint-disable-next-line max-len - throw new Error(`Attempted to merge ${JSON.stringify(fragVal)} into incompatible ${JSON.stringify(specVal)} at path ${jsonPath.join('/')}/${key}`); - } - if (typeof specVal !== 'object') { - // eslint-disable-next-line max-len - throw new Error(`Conflict when attempting to merge ${JSON.stringify(fragVal)} into ${JSON.stringify(specVal)} at path ${jsonPath.join('/')}/${key}`); - } - merge(specVal, fragVal, [...jsonPath, key]); - } else { - spec[key] = fragment[key]; - } - } -} - -function patch(spec: any, fragment: any) { - if (!fragment) { return; } - if ('patch' in fragment) { - // eslint-disable-next-line no-console - console.log(`Applying patch: ${fragment.patch.description}`); - fastJsonPatch.applyPatch(spec, fragment.patch.operations); - } else { - for (const key of Object.keys(fragment)) { - patch(spec[key], fragment[key]); - } - } -} - -/** - * Modifies the provided specification so that ``ResourceTypes`` and ``PropertyTypes`` are listed in alphabetical order. - * - * @param spec an AWS CloudFormation Resource Specification document. - * - * @returns ``spec``, after having sorted the ``ResourceTypes`` and ``PropertyTypes`` sections alphabetically. - */ -function normalize(spec: schema.Specification): schema.Specification { - spec.ResourceTypes = normalizeSection(spec.ResourceTypes); - if (spec.PropertyTypes) { - spec.PropertyTypes = normalizeSection(spec.PropertyTypes); - } - return spec; - - function normalizeSection(section: { [name: string]: T }): { [name: string]: T } { - const result: { [name: string]: T } = {}; - for (const key of Object.keys(section).sort()) { - result[key] = section[key]; - } - return result; - } -} - main() .catch(e => { // eslint-disable-next-line no-console diff --git a/packages/@aws-cdk/cfnspec/build-tools/massage-spec.ts b/packages/@aws-cdk/cfnspec/build-tools/massage-spec.ts new file mode 100644 index 0000000000000..7556dff9ff23f --- /dev/null +++ b/packages/@aws-cdk/cfnspec/build-tools/massage-spec.ts @@ -0,0 +1,121 @@ +import * as fastJsonPatch from 'fast-json-patch'; +import { schema } from '../lib'; +import { detectScrutinyTypes } from './scrutiny'; + +export function massageSpec(spec: schema.Specification) { + detectScrutinyTypes(spec); + replaceIncompleteTypes(spec); + dropTypelessAttributes(spec); +} + +export function forEachSection(spec: schema.Specification, data: any, cb: (spec: any, fragment: any, path: string[]) => void) { + cb(spec.PropertyTypes, data.PropertyTypes, ['PropertyTypes']); + cb(spec.ResourceTypes, data.ResourceTypes, ['ResourceTypes']); + // Per-resource specs are keyed on ResourceType (singular), but we want it in ResourceTypes (plural) + cb(spec.ResourceTypes, data.ResourceType, ['ResourceType']); +} + +export function decorateResourceTypes(data: any) { + const requiredTransform = data.ResourceSpecificationTransform as string | undefined; + if (!requiredTransform) { return; } + const resourceTypes = data.ResourceTypes || data.ResourceType; + for (const name of Object.keys(resourceTypes)) { + resourceTypes[name].RequiredTransform = requiredTransform; + } +} + +/** + * Fix incomplete type definitions in PropertyTypes + * + * Some user-defined types are defined to not have any properties, and not + * be a collection of other types either. They have no definition at all. + * + * Add a property object type with empty properties. + */ +function replaceIncompleteTypes(spec: schema.Specification) { + for (const [name, definition] of Object.entries(spec.PropertyTypes)) { + if (!schema.isRecordType(definition) + && !schema.isCollectionProperty(definition) + && !schema.isScalarProperty(definition) + && !schema.isPrimitiveProperty(definition)) { + // eslint-disable-next-line no-console + console.log(`[${name}] Incomplete type, adding empty "Properties" field`); + + (definition as unknown as schema.RecordProperty).Properties = {}; + } + } +} + +/** + * Drop Attributes specified with the different ResourceTypes that have + * no type specified. + */ +function dropTypelessAttributes(spec: schema.Specification) { + const resourceTypes = spec.ResourceTypes; + Object.values(resourceTypes).forEach((resourceType) => { + const attributes = resourceType.Attributes ?? {}; + Object.keys(attributes).forEach((attrKey) => { + const attrVal = attributes[attrKey]; + if (Object.keys(attrVal).length === 0) { + delete attributes[attrKey]; + } + }); + }); +} + +export function merge(spec: any, fragment: any, jsonPath: string[]) { + if (!fragment) { return; } + for (const key of Object.keys(fragment)) { + if (key in spec) { + const specVal = spec[key]; + const fragVal = fragment[key]; + if (typeof specVal !== typeof fragVal) { + // eslint-disable-next-line max-len + throw new Error(`Attempted to merge ${JSON.stringify(fragVal)} into incompatible ${JSON.stringify(specVal)} at path ${jsonPath.join('/')}/${key}`); + } + if (typeof specVal !== 'object') { + // eslint-disable-next-line max-len + throw new Error(`Conflict when attempting to merge ${JSON.stringify(fragVal)} into ${JSON.stringify(specVal)} at path ${jsonPath.join('/')}/${key}`); + } + merge(specVal, fragVal, [...jsonPath, key]); + } else { + spec[key] = fragment[key]; + } + } +} + +export function patch(spec: any, fragment: any) { + if (!fragment) { return; } + if ('patch' in fragment) { + // eslint-disable-next-line no-console + console.log(`Applying patch: ${fragment.patch.description}`); + fastJsonPatch.applyPatch(spec, fragment.patch.operations); + } else { + for (const key of Object.keys(fragment)) { + patch(spec[key], fragment[key]); + } + } +} + +/** + * Modifies the provided specification so that ``ResourceTypes`` and ``PropertyTypes`` are listed in alphabetical order. + * + * @param spec an AWS CloudFormation Resource Specification document. + * + * @returns ``spec``, after having sorted the ``ResourceTypes`` and ``PropertyTypes`` sections alphabetically. + */ +export function normalize(spec: schema.Specification): schema.Specification { + spec.ResourceTypes = normalizeSection(spec.ResourceTypes); + if (spec.PropertyTypes) { + spec.PropertyTypes = normalizeSection(spec.PropertyTypes); + } + return spec; + + function normalizeSection(section: { [name: string]: T }): { [name: string]: T } { + const result: { [name: string]: T } = {}; + for (const key of Object.keys(section).sort()) { + result[key] = section[key]; + } + return result; + } +} diff --git a/packages/@aws-cdk/cfnspec/test/test.build.ts b/packages/@aws-cdk/cfnspec/test/test.build.ts index 5874138b7bc97..b0638fe3de2a4 100644 --- a/packages/@aws-cdk/cfnspec/test/test.build.ts +++ b/packages/@aws-cdk/cfnspec/test/test.build.ts @@ -1,5 +1,5 @@ import { Test } from 'nodeunit'; -import { massageSpec } from '../build-tools/build'; +import { massageSpec } from '../build-tools/massage-spec'; import { schema } from '../lib'; export = { From e8a8c1c4ce84df66ec16377ec4f2f62afa957f09 Mon Sep 17 00:00:00 2001 From: Jerry Kindall <52084730+Jerry-AWS@users.noreply.github.com> Date: Thu, 19 Nov 2020 04:02:54 -0800 Subject: [PATCH 179/314] docs(apigateway): change "full working example" link to embed example (#11384) The relative link given for the "full working example" works fine here on GitHub, but not when this is compiled into one of the API references. Change the link to be a complete URL so it works from anywhere this content ends up. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-apigateway/README.md | 8 ++++++-- ...ed.json => integ.request-authorizer.lit.expected.json} | 2 +- ...uest-authorizer.ts => integ.request-authorizer.lit.ts} | 0 ...cted.json => integ.token-authorizer.lit.expected.json} | 2 +- ....token-authorizer.ts => integ.token-authorizer.lit.ts} | 0 5 files changed, 8 insertions(+), 4 deletions(-) rename packages/@aws-cdk/aws-apigateway/test/authorizers/{integ.request-authorizer.expected.json => integ.request-authorizer.lit.expected.json} (99%) rename packages/@aws-cdk/aws-apigateway/test/authorizers/{integ.request-authorizer.ts => integ.request-authorizer.lit.ts} (100%) rename packages/@aws-cdk/aws-apigateway/test/authorizers/{integ.token-authorizer.expected.json => integ.token-authorizer.lit.expected.json} (99%) rename packages/@aws-cdk/aws-apigateway/test/authorizers/{integ.token-authorizer.ts => integ.token-authorizer.lit.ts} (100%) diff --git a/packages/@aws-cdk/aws-apigateway/README.md b/packages/@aws-cdk/aws-apigateway/README.md index 3f75b8325fc68..12313ade8dfb3 100644 --- a/packages/@aws-cdk/aws-apigateway/README.md +++ b/packages/@aws-cdk/aws-apigateway/README.md @@ -524,7 +524,9 @@ books.addMethod('GET', new apigateway.HttpIntegration('http://amazon.com'), { }); ``` -You can find a full working example [here](test/authorizers/integ.token-authorizer.ts). +A full working example is shown below. + +[Full token authorizer example](test/authorizers/integ.token-authorizer.lit.ts). By default, the `TokenAuthorizer` looks for the authorization token in the request header with the key 'Authorization'. This can, however, be modified by changing the `identitySource` property. @@ -565,7 +567,9 @@ books.addMethod('GET', new apigateway.HttpIntegration('http://amazon.com'), { }); ``` -You can find a full working example [here](test/authorizers/integ.request-authorizer.ts). +A full working example is shown below. + +[Full request authorizer example](test/authorizers/integ.request-authorizer.lit.ts). By default, the `RequestAuthorizer` does not pass any kind of information from the request. This can, however, be modified by changing the `identitySource` property, and is required when specifying a value for caching. diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.expected.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.expected.json similarity index 99% rename from packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.expected.json rename to packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.expected.json index 7379b8f5ab47b..e976e6426e0a5 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.expected.json +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.expected.json @@ -313,4 +313,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.ts b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.ts similarity index 100% rename from packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.ts rename to packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.ts diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.expected.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.lit.expected.json similarity index 99% rename from packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.expected.json rename to packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.lit.expected.json index da8f3e8d934fa..bb4c493fac04b 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.expected.json +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.lit.expected.json @@ -313,4 +313,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.ts b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.lit.ts similarity index 100% rename from packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.ts rename to packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.lit.ts From 8cabeeaf55c7be8ff9408c29b137d1bae1bdb787 Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Thu, 19 Nov 2020 12:43:48 +0000 Subject: [PATCH 180/314] chore(cloudfront): mark Distribution as Dev Preview in README (#11577) The main header and `package.json` were updated a while back, but this extra section in the README was missed. This was discovered and fixed in #10500, but that PR hasn't been merged yet (and may still not be for a while). Separating it out into this PR to get it out faster. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-cloudfront/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudfront/README.md b/packages/@aws-cdk/aws-cloudfront/README.md index cbf6baf3d888b..a75dc7aa9dce4 100644 --- a/packages/@aws-cdk/aws-cloudfront/README.md +++ b/packages/@aws-cdk/aws-cloudfront/README.md @@ -23,9 +23,9 @@ your users. CloudFront delivers your content through a worldwide network of data you're serving with CloudFront, the user is routed to the edge location that provides the lowest latency, so that content is delivered with the best possible performance. -## Distribution API - Experimental +## Distribution API - Developer Preview -![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) +![Developer Preview](https://img.shields.io/badge/developer--preview-informational.svg?style=for-the-badge) The `Distribution` API is currently being built to replace the existing `CloudFrontWebDistribution` API. The `Distribution` API is optimized for the most common use cases of CloudFront distributions (e.g., single origin and behavior, few customizations) while still providing the ability for more From 9e91306f53faec31cf7e79f543c216a146406efc Mon Sep 17 00:00:00 2001 From: Iain Cole Date: Thu, 19 Nov 2020 05:30:42 -0800 Subject: [PATCH 181/314] fix(cli): credential provider plugins cannot be used with modern synthesis (#11350) I'm not currently able to use CDK pipelines because I use a credential provider. I believe this is because the new bootstrap uses assumed roles. When assuming a role, only defaultCredentials is checked, I'm not sure if this was intentional or not because there is a comment that seems to mention this (that I will edit if this PR has any merit), but it seems odd to not allow a credential provider here. I'm not 100% sure why I had to change the account ID in the tests, but I did and all the tests seem to still pass. --- packages/aws-cdk/.gitignore | 2 +- .../aws-cdk/lib/api/aws-auth/sdk-provider.ts | 21 ++++++++++++++----- .../lib/api/cloudformation-deployments.ts | 4 ++-- packages/aws-cdk/lib/util/asset-publishing.ts | 4 ++-- .../api/cloudformation-deployments.test.ts | 6 +++--- .../aws-cdk/test/api/sdk-provider.test.ts | 14 ++++++++++--- packages/aws-cdk/test/util.ts | 4 ++-- 7 files changed, 37 insertions(+), 18 deletions(-) diff --git a/packages/aws-cdk/.gitignore b/packages/aws-cdk/.gitignore index d94ce1fee2e9b..aa160438c3abf 100644 --- a/packages/aws-cdk/.gitignore +++ b/packages/aws-cdk/.gitignore @@ -36,4 +36,4 @@ test/integ/cli/*.d.ts .DS_Store -junit.xml \ No newline at end of file +junit.xml diff --git a/packages/aws-cdk/lib/api/aws-auth/sdk-provider.ts b/packages/aws-cdk/lib/api/aws-auth/sdk-provider.ts index e8131fbda9225..8477a8c855e09 100644 --- a/packages/aws-cdk/lib/api/aws-auth/sdk-provider.ts +++ b/packages/aws-cdk/lib/api/aws-auth/sdk-provider.ts @@ -136,13 +136,24 @@ export class SdkProvider { * Return an SDK which uses assumed role credentials * * The base credentials used to retrieve the assumed role credentials will be the - * current credentials (no plugin lookup will be done!). + * same credentials returned by obtainCredentials if an environment and mode is passed, + * otherwise it will be the current credentials. * - * If `region` is undefined, the default value will be used. */ - public async withAssumedRole(roleArn: string, externalId: string | undefined, region: string | undefined) { + public async withAssumedRole(roleArn: string, externalId: string | undefined, environment: cxapi.Environment | undefined, mode: Mode | undefined) { debug(`Assuming role '${roleArn}'.`); - region = region ?? this.defaultRegion; + + let region: string; + let masterCredentials: AWS.Credentials; + + if (environment !== undefined && mode !== undefined) { + const env = await this.resolveEnvironment(environment); + masterCredentials = await this.obtainCredentials(env.account, mode); + region = env.region; + } else { + region = this.defaultRegion; + masterCredentials = await this.defaultCredentials(); + } const creds = new AWS.ChainableTemporaryCredentials({ params: { @@ -154,7 +165,7 @@ export class SdkProvider { region, ...this.sdkOptions, }, - masterCredentials: await this.defaultCredentials(), + masterCredentials: masterCredentials, }); return new SDK(creds, region, this.sdkOptions); diff --git a/packages/aws-cdk/lib/api/cloudformation-deployments.ts b/packages/aws-cdk/lib/api/cloudformation-deployments.ts index 8b21203ec2a7e..660f78780213c 100644 --- a/packages/aws-cdk/lib/api/cloudformation-deployments.ts +++ b/packages/aws-cdk/lib/api/cloudformation-deployments.ts @@ -220,7 +220,7 @@ export class CloudFormationDeployments { }, resolvedEnvironment); const stackSdk = arns.assumeRoleArn - ? await this.sdkProvider.withAssumedRole(arns.assumeRoleArn, undefined, resolvedEnvironment.region) + ? await this.sdkProvider.withAssumedRole(arns.assumeRoleArn, undefined, resolvedEnvironment, mode) : await this.sdkProvider.forEnvironment(resolvedEnvironment, mode); return { @@ -285,4 +285,4 @@ export class CloudFormationDeployments { function isAssetManifestArtifact(art: cxapi.CloudArtifact): art is cxapi.AssetManifestArtifact { return art instanceof cxapi.AssetManifestArtifact; -} \ No newline at end of file +} diff --git a/packages/aws-cdk/lib/util/asset-publishing.ts b/packages/aws-cdk/lib/util/asset-publishing.ts index 9bfa8dea5b694..17780cb49f3c3 100644 --- a/packages/aws-cdk/lib/util/asset-publishing.ts +++ b/packages/aws-cdk/lib/util/asset-publishing.ts @@ -65,7 +65,7 @@ class PublishingAws implements cdk_assets.IAws { }; return options.assumeRoleArn - ? this.aws.withAssumedRole(options.assumeRoleArn, options.assumeRoleExternalId, env.region) + ? this.aws.withAssumedRole(options.assumeRoleArn, options.assumeRoleExternalId, env, Mode.ForWriting) : this.aws.forEnvironment(env, Mode.ForWriting); } @@ -87,4 +87,4 @@ class PublishingProgressListener implements cdk_assets.IPublishProgressListener public onPublishEvent(type: cdk_assets.EventType, event: cdk_assets.IPublishProgress): void { EVENT_TO_LOGGER[type](`[${event.percentComplete}%] ${type}: ${event.message}`); } -} \ No newline at end of file +} diff --git a/packages/aws-cdk/test/api/cloudformation-deployments.test.ts b/packages/aws-cdk/test/api/cloudformation-deployments.test.ts index ffa54153f22ba..6f1276d9135f7 100644 --- a/packages/aws-cdk/test/api/cloudformation-deployments.test.ts +++ b/packages/aws-cdk/test/api/cloudformation-deployments.test.ts @@ -30,7 +30,7 @@ test('placeholders are substituted in CloudFormation execution role', async () = }); expect(deployStack).toHaveBeenCalledWith(expect.objectContaining({ - roleArn: 'bloop:here:12345', + roleArn: 'bloop:here:123456789012', })); }); @@ -47,7 +47,7 @@ test('role with placeholders is assumed if assumerole is given', async () => { }), }); - expect(mockWithAssumedRole).toHaveBeenCalledWith('bloop:here:12345', undefined, expect.anything()); + expect(mockWithAssumedRole).toHaveBeenCalledWith('bloop:here:123456789012', undefined, expect.anything(), expect.anything()); }); test('deployment fails if bootstrap stack is missing', async () => { @@ -76,4 +76,4 @@ test('deployment fails if bootstrap stack is too old', async () => { }, }), })).rejects.toThrow(/requires bootstrap stack version '99', found '5'/); -}); \ No newline at end of file +}); diff --git a/packages/aws-cdk/test/api/sdk-provider.test.ts b/packages/aws-cdk/test/api/sdk-provider.test.ts index ad604f895e3a1..77ff8778d24b0 100644 --- a/packages/aws-cdk/test/api/sdk-provider.test.ts +++ b/packages/aws-cdk/test/api/sdk-provider.test.ts @@ -29,6 +29,7 @@ const defaultCredOptions = { let uid: string; let pluginQueried = false; let defaultEnv: cxapi.Environment; +let pluginEnv: cxapi.Environment; let getCallerIdentityError: Error | null = null; beforeEach(() => { @@ -60,6 +61,7 @@ beforeEach(() => { }); defaultEnv = cxapi.EnvironmentUtils.make(`${uid}the_account_#`, 'def'); + pluginEnv = cxapi.EnvironmentUtils.make(`${uid}plugin_account_#`, 'def'); // Scrub some environment variables that might be set if we're running on CodeBuild which will interfere with the tests. delete process.env.AWS_PROFILE; @@ -200,7 +202,7 @@ describe('with default config files', () => { // THEN try { - await provider.withAssumedRole('arn:aws:iam::account:role/role', undefined, undefined); + await provider.withAssumedRole('arn:aws:iam::account:role/role', undefined, undefined, Mode.ForReading); fail('Should error as no credentials could be loaded'); } catch (e) { // Mock response was set to fail to make sure we don't call STS @@ -270,7 +272,7 @@ describe('with default config files', () => { }); // WHEN - const sdk = await provider.withAssumedRole('bla.role.arn', undefined, undefined); + const sdk = await provider.withAssumedRole('bla.role.arn', undefined, undefined, Mode.ForReading); makeAssumeRoleFail(sdk); // THEN - error message contains both a helpful hint and the underlying AssumeRole message @@ -305,7 +307,7 @@ describe('with default config files', () => { // WHEN const provider = new SdkProvider(new AWS.CredentialProviderChain([() => new AWS.Credentials({ accessKeyId: 'a', secretAccessKey: 's' })]), 'eu-somewhere'); - const sdk = await provider.withAssumedRole('bla.role.arn', undefined, undefined); + const sdk = await provider.withAssumedRole('bla.role.arn', undefined, undefined, Mode.ForReading); await sdk.currentCredentials(); @@ -329,6 +331,12 @@ describe('with default config files', () => { await provider.forEnvironment({ ...defaultEnv, account: `${uid}plugin_account_#` }, Mode.ForReading); expect(pluginQueried).toEqual(true); }); + + test('can assume role with credentials from plugin', async () => { + const provider = await SdkProvider.withAwsCliCompatibleDefaults({ ...defaultCredOptions }); + await provider.withAssumedRole('arn:aws:iam::12356789012:role/Assumable', undefined, pluginEnv, Mode.ForReading); + expect(pluginQueried).toEqual(true); + }); }); }); diff --git a/packages/aws-cdk/test/util.ts b/packages/aws-cdk/test/util.ts index 17f8860b01df7..e15a1f6537354 100644 --- a/packages/aws-cdk/test/util.ts +++ b/packages/aws-cdk/test/util.ts @@ -70,7 +70,7 @@ export function testAssembly(assembly: TestAssembly): cxapi.CloudAssembly { builder.addArtifact(stack.stackName, { type: cxschema.ArtifactType.AWS_CLOUDFORMATION_STACK, - environment: stack.env || 'aws://12345/here', + environment: stack.env || 'aws://123456789012/here', dependencies: stack.depends, metadata, @@ -182,4 +182,4 @@ export function withMocked
(obj: A, key: function isPromise(object: any): object is Promise { return Promise.resolve(object) === object; -} \ No newline at end of file +} From 1b5f21861d6b43ac36a8caf590b267bb1a12c0c8 Mon Sep 17 00:00:00 2001 From: Naveen Koppula <43773714+naveenkoppula@users.noreply.github.com> Date: Thu, 19 Nov 2020 19:30:10 +0530 Subject: [PATCH 182/314] fix(core): DefaultStackSynthesizer supports object prefix for s3 assets (#11327) Allow configuring a prefix for the storage location in the file asset bucket. Specifically intended to support prefixing with the account ID, so that a single asset bucket can be shared between multiple accounts (given appropriate bucket permissions, of course). ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../stack-synthesizers/default-synthesizer.ts | 18 ++++++++- .../new-style-synthesis.test.ts | 38 +++++++++++++++++++ 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/core/lib/stack-synthesizers/default-synthesizer.ts b/packages/@aws-cdk/core/lib/stack-synthesizers/default-synthesizer.ts index 15f2d96e3b8cd..67524b0b96c1c 100644 --- a/packages/@aws-cdk/core/lib/stack-synthesizers/default-synthesizer.ts +++ b/packages/@aws-cdk/core/lib/stack-synthesizers/default-synthesizer.ts @@ -150,6 +150,14 @@ export interface DefaultStackSynthesizerProps { * @default true */ readonly generateBootstrapVersionRule?: boolean; + + /** + * bucketPrefix to use while storing S3 Assets + * + * + * @default - DefaultStackSynthesizer.DEFAULT_FILE_ASSET_PREFIX + */ + readonly bucketPrefix?: string; } /** @@ -202,6 +210,11 @@ export class DefaultStackSynthesizer extends StackSynthesizer { */ public static readonly DEFAULT_FILE_ASSET_KEY_ARN_EXPORT_NAME = 'CdkBootstrap-${Qualifier}-FileAssetKeyArn'; + /** + * Default file asset prefix + */ + public static readonly DEFAULT_FILE_ASSET_PREFIX = ''; + private _stack?: Stack; private bucketName?: string; private repositoryName?: string; @@ -210,6 +223,7 @@ export class DefaultStackSynthesizer extends StackSynthesizer { private fileAssetPublishingRoleArn?: string; private imageAssetPublishingRoleArn?: string; private qualifier?: string; + private bucketPrefix?: string private readonly files: NonNullable = {}; private readonly dockerImages: NonNullable = {}; @@ -246,14 +260,14 @@ export class DefaultStackSynthesizer extends StackSynthesizer { this._cloudFormationExecutionRoleArn = specialize(this.props.cloudFormationExecutionRole ?? DefaultStackSynthesizer.DEFAULT_CLOUDFORMATION_ROLE_ARN); this.fileAssetPublishingRoleArn = specialize(this.props.fileAssetPublishingRoleArn ?? DefaultStackSynthesizer.DEFAULT_FILE_ASSET_PUBLISHING_ROLE_ARN); this.imageAssetPublishingRoleArn = specialize(this.props.imageAssetPublishingRoleArn ?? DefaultStackSynthesizer.DEFAULT_IMAGE_ASSET_PUBLISHING_ROLE_ARN); + this.bucketPrefix = specialize(this.props.bucketPrefix ?? DefaultStackSynthesizer.DEFAULT_FILE_ASSET_PREFIX); /* eslint-enable max-len */ } public addFileAsset(asset: FileAssetSource): FileAssetLocation { assertBound(this.stack); assertBound(this.bucketName); - - const objectKey = asset.sourceHash + (asset.packaging === FileAssetPackaging.ZIP_DIRECTORY ? '.zip' : ''); + const objectKey = this.bucketPrefix + asset.sourceHash + (asset.packaging === FileAssetPackaging.ZIP_DIRECTORY ? '.zip' : ''); // Add to manifest this.files[asset.sourceHash] = { diff --git a/packages/@aws-cdk/core/test/stack-synthesis/new-style-synthesis.test.ts b/packages/@aws-cdk/core/test/stack-synthesis/new-style-synthesis.test.ts index 08b48162086a0..7ae1681d011bd 100644 --- a/packages/@aws-cdk/core/test/stack-synthesis/new-style-synthesis.test.ts +++ b/packages/@aws-cdk/core/test/stack-synthesis/new-style-synthesis.test.ts @@ -218,6 +218,44 @@ nodeunitShim({ test.done(); }, + + + 'synthesis with bucketPrefix'(test: Test) { + // GIVEN + const myapp = new App(); + + // WHEN + const mystack = new Stack(myapp, 'mystack-bucketPrefix', { + synthesizer: new DefaultStackSynthesizer({ + fileAssetsBucketName: 'file-asset-bucket', + fileAssetPublishingRoleArn: 'file:role:arn', + fileAssetPublishingExternalId: 'file-external-id', + bucketPrefix: '000000000000/', + }), + }); + + mystack.synthesizer.addFileAsset({ + fileName: __filename, + packaging: FileAssetPackaging.FILE, + sourceHash: 'file-asset-hash-with-prefix', + }); + + // WHEN + const asm = myapp.synth(); + + // THEN - we have an asset manifest with both assets and the stack template in there + const manifest = readAssetManifest(asm); + + // THEN + test.deepEqual(manifest.files?.['file-asset-hash-with-prefix']?.destinations?.['current_account-current_region'], { + bucketName: 'file-asset-bucket', + objectKey: '000000000000/file-asset-hash-with-prefix', + assumeRoleArn: 'file:role:arn', + assumeRoleExternalId: 'file-external-id', + }); + + test.done(); + }, }); /** From 421d4e4e0c73875db2193847ea0b09349c3635de Mon Sep 17 00:00:00 2001 From: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com> Date: Thu, 19 Nov 2020 06:29:15 -0800 Subject: [PATCH 183/314] fix(aws-custom-resource): module fails loading when bundled with parcel (#11487) After this change, `aws-custom-resource` will still not work properly when bundled using parcel, but at least the module won't throw an error anymore when it's being loaded. Fixes https://github.com/aws/aws-cdk/issues/7284. Since this change only impacted the way in which awsSdkMetadata was provided to awsSdkToIamAction no new tests were warranted, but I re-ran yarn build and all tests still passed. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-custom-resource.ts | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/packages/@aws-cdk/custom-resources/lib/aws-custom-resource/aws-custom-resource.ts b/packages/@aws-cdk/custom-resources/lib/aws-custom-resource/aws-custom-resource.ts index 730260e3e3779..7a6e48a583d69 100644 --- a/packages/@aws-cdk/custom-resources/lib/aws-custom-resource/aws-custom-resource.ts +++ b/packages/@aws-cdk/custom-resources/lib/aws-custom-resource/aws-custom-resource.ts @@ -7,17 +7,6 @@ import * as cdk from '@aws-cdk/core'; import { Construct } from 'constructs'; import { PHYSICAL_RESOURCE_ID_REFERENCE, flatten } from './runtime'; -// don't use "require" since the typescript compiler emits errors since this -// file is not listed in tsconfig.json. -const metadata = JSON.parse(fs.readFileSync(path.join(__dirname, 'sdk-api-metadata.json'), 'utf-8')); - -/** - * AWS SDK service metadata. - */ -export type AwsSdkMetadata = {[key: string]: any}; - -const awsSdkMetadata: AwsSdkMetadata = metadata; - /** * Reference to the physical resource id that can be passed to the AWS operation as a parameter. */ @@ -427,6 +416,25 @@ export class AwsCustomResource extends cdk.Construct implements iam.IGrantable { } +/** + * AWS SDK service metadata. + */ +export type AwsSdkMetadata = {[key: string]: any}; + +/** + * Gets awsSdkMetaData from file or from cache + */ +let getAwsSdkMetadata = (() => { + let _awsSdkMetadata: AwsSdkMetadata; + return function () { + if (_awsSdkMetadata) { + return _awsSdkMetadata; + } else { + return _awsSdkMetadata = JSON.parse(fs.readFileSync(path.join(__dirname, 'sdk-api-metadata.json'), 'utf-8')); + } + }; +})(); + /** * Transform SDK service/action to IAM action using metadata from aws-sdk module. * Example: CloudWatchLogs with putRetentionPolicy => logs:PutRetentionPolicy @@ -435,6 +443,7 @@ export class AwsCustomResource extends cdk.Construct implements iam.IGrantable { */ function awsSdkToIamAction(service: string, action: string): string { const srv = service.toLowerCase(); + const awsSdkMetadata = getAwsSdkMetadata(); const iamService = (awsSdkMetadata[srv] && awsSdkMetadata[srv].prefix) || srv; const iamAction = action.charAt(0).toUpperCase() + action.slice(1); return `${iamService}:${iamAction}`; From ea875b49f05159119109b8602f36d082e2ebd3d4 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Thu, 19 Nov 2020 15:56:58 +0100 Subject: [PATCH 184/314] chore(eslint-plugin-cdk): make eslint warning about `Construct` more accurate (#11578) The rule was telling me to avoid `Construct` completely, but that's not actually accurate. You should still `extends core.Construct`, but you should *accept* `construct.Construct` as the scope parameter. If you `extends construct.Construct`, there is no compilation failure but you get the following error message upon synthesis: ``` TypeError: Cannot read property 'children' of undefined at synthNestedAssemblies (/Users/huijbers/Workspaces/PublicCDK/aws-cdk2/packages/@aws-cdk/core/lib/private/synthesis.ts:50:33) at synthNestedAssemblies (/Users/huijbers/Workspaces/PublicCDK/aws-cdk2/packages/@aws-cdk/core/lib/private/synthesis.ts:54:7) at synthNestedAssemblies (/Users/huijbers/Workspaces/PublicCDK/aws-cdk2/packages/@aws-cdk/core/lib/private/synthesis.ts:54:7) at Object.synthesize (/Users/huijbers/Workspaces/PublicCDK/aws-cdk2/packages/@aws-cdk/core/lib/private/synthesis.ts:14:3) ``` This cost me an hour, hope that the wording change can save the same time for other people. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- tools/eslint-plugin-cdk/lib/rules/no-core-construct.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/eslint-plugin-cdk/lib/rules/no-core-construct.ts b/tools/eslint-plugin-cdk/lib/rules/no-core-construct.ts index d74988b4f1f07..4e808e26c375f 100644 --- a/tools/eslint-plugin-cdk/lib/rules/no-core-construct.ts +++ b/tools/eslint-plugin-cdk/lib/rules/no-core-construct.ts @@ -55,12 +55,16 @@ export function create(context: Rule.RuleContext): Rule.NodeListener { if (!isTestFile(context.getFilename())) { return; } + // Only apply rule to bindings (variables and function parameters) const typeAnnotation = node.typeAnnotation?.typeAnnotation if (!typeAnnotation) { return; - } + } const type = typeAnnotation.typeName; if (!type) { return; } + + const message = 'Use Construct and IConstruct from the "constructs" module in variable declarations (not "@aws-cdk/core")'; + if (type.type === 'TSQualifiedName') { // barrel import const qualifier = type.left.name; @@ -71,7 +75,7 @@ export function create(context: Rule.RuleContext): Rule.NodeListener { } context.report({ node, - message: 'avoid Construct and IConstruct from "@aws-cdk/core"', + message, fix: (fixer: Rule.RuleFixer) => { const fixes: Rule.Fix[] = []; if (!importsFixed) { @@ -90,7 +94,7 @@ export function create(context: Rule.RuleContext): Rule.NodeListener { } context.report({ node, - message: 'avoid Construct and IConstruct from "@aws-cdk/core"', + message, fix: (fixer: Rule.RuleFixer) => { const fixes: Rule.Fix[] = []; if (!importsFixed) { From 9b72fc8fe0b6238ff4d43a2e5f544bb655bb8908 Mon Sep 17 00:00:00 2001 From: adriantaut Date: Thu, 19 Nov 2020 18:39:58 +0200 Subject: [PATCH 185/314] fix(pipelines): wrong runOrder for manual approval when using `extraRunOrderSpace` (#11511) The manual approval action should be right after the Prepare ChangeSet. Fixes https://github.com/aws/aws-cdk/issues/11510 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/pipelines/lib/stage.ts | 2 +- .../pipelines/test/stack-ordering.test.ts | 37 +++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/pipelines/lib/stage.ts b/packages/@aws-cdk/pipelines/lib/stage.ts index c7b090b3f8d02..863aa8869d8bd 100644 --- a/packages/@aws-cdk/pipelines/lib/stage.ts +++ b/packages/@aws-cdk/pipelines/lib/stage.ts @@ -96,7 +96,7 @@ export class CdkStage extends CoreConstruct { // now is where we add a manual approval step, and we allocate 1 more runOrder // for the execute. if (options.manualApprovals) { - this.addManualApprovalAction({ runOrder: executeRunOrder }); + this.addManualApprovalAction({ runOrder: runOrder + 1 }); executeRunOrder = this.nextSequentialRunOrder(); } diff --git a/packages/@aws-cdk/pipelines/test/stack-ordering.test.ts b/packages/@aws-cdk/pipelines/test/stack-ordering.test.ts index fcfede261208a..c7b2fc98f4f20 100644 --- a/packages/@aws-cdk/pipelines/test/stack-ordering.test.ts +++ b/packages/@aws-cdk/pipelines/test/stack-ordering.test.ts @@ -110,6 +110,43 @@ test('extra space for sequential intermediary actions is reserved', () => { }); }); +test('combination of manual approval and extraRunOrderSpace', () => { + // WHEN + pipeline.addApplicationStage(new OneStackApp(app, 'MyApp'), { + extraRunOrderSpace: 1, + manualApprovals: true, + }); + + // THEN + expect(pipelineStack).toHaveResourceLike('AWS::CodePipeline::Pipeline', { + Stages: arrayWith({ + Name: 'MyApp', + Actions: sortedByRunOrder([ + objectLike({ + Name: 'Stack1.Prepare', + RunOrder: 1, + }), + objectLike({ + Name: 'ManualApproval', + RunOrder: 2, + }), + objectLike({ + Name: 'Stack1.Deploy', + RunOrder: 4, + }), + ]), + }), + }); +}); + +class OneStackApp extends Stage { + constructor(scope: Construct, id: string, props?: StageProps) { + super(scope, id, props); + + new BucketStack(this, 'Stack1'); + } +} + class TwoStackApp extends Stage { constructor(scope: Construct, id: string, props?: StageProps) { super(scope, id, props); From 1f9ed6d422c9baab4d3d4b455398af5cbf0d9d5f Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 19 Nov 2020 20:42:48 +0000 Subject: [PATCH 186/314] chore(deps): bump aws-sdk from 2.795.0 to 2.796.0 (#11590) Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.795.0 to 2.796.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.795.0...v2.796.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/aws-cloudfront-origins/package.json | 2 +- packages/@aws-cdk/aws-cloudfront/package.json | 2 +- packages/@aws-cdk/aws-cloudtrail/package.json | 2 +- packages/@aws-cdk/aws-codebuild/package.json | 2 +- packages/@aws-cdk/aws-codecommit/package.json | 2 +- packages/@aws-cdk/aws-dynamodb/package.json | 2 +- packages/@aws-cdk/aws-eks/package.json | 2 +- packages/@aws-cdk/aws-events-targets/package.json | 2 +- packages/@aws-cdk/aws-logs/package.json | 2 +- packages/@aws-cdk/aws-route53/package.json | 2 +- packages/@aws-cdk/aws-sqs/package.json | 2 +- packages/@aws-cdk/custom-resources/package.json | 2 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- yarn.lock | 8 ++++---- 15 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudfront-origins/package.json b/packages/@aws-cdk/aws-cloudfront-origins/package.json index 25dc06edc2768..03a86d7bfcdc4 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/package.json +++ b/packages/@aws-cdk/aws-cloudfront-origins/package.json @@ -72,7 +72,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", - "aws-sdk": "^2.795.0", + "aws-sdk": "^2.796.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "pkglint": "0.0.0" diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index b9be64910ab28..45fc518b680ab 100644 --- a/packages/@aws-cdk/aws-cloudfront/package.json +++ b/packages/@aws-cdk/aws-cloudfront/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.795.0", + "aws-sdk": "^2.796.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index 9b005930a5af4..dac003f519a86 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.795.0", + "aws-sdk": "^2.796.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codebuild/package.json b/packages/@aws-cdk/aws-codebuild/package.json index ef262aa97bd8a..206e810609e9d 100644 --- a/packages/@aws-cdk/aws-codebuild/package.json +++ b/packages/@aws-cdk/aws-codebuild/package.json @@ -79,7 +79,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.795.0", + "aws-sdk": "^2.796.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codecommit/package.json b/packages/@aws-cdk/aws-codecommit/package.json index 8f8a24ca32bde..91535cbe1d0db 100644 --- a/packages/@aws-cdk/aws-codecommit/package.json +++ b/packages/@aws-cdk/aws-codecommit/package.json @@ -79,7 +79,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.795.0", + "aws-sdk": "^2.796.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index b6f40ec4e0907..4e25631705353 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -74,7 +74,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/jest": "^26.0.15", - "aws-sdk": "^2.795.0", + "aws-sdk": "^2.796.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index f8d6f85f4094c..de72904f30a5e 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", "@types/yaml": "1.9.6", - "aws-sdk": "^2.795.0", + "aws-sdk": "^2.796.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index 6873b9eb7df72..43ea2417f9248 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -75,7 +75,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-codecommit": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", - "aws-sdk": "^2.795.0", + "aws-sdk": "^2.796.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index 8c2efcd8c76ed..e790a8dc18569 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.795.0", + "aws-sdk": "^2.796.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-route53/package.json b/packages/@aws-cdk/aws-route53/package.json index b0f78d97905fe..590fe7c856c38 100644 --- a/packages/@aws-cdk/aws-route53/package.json +++ b/packages/@aws-cdk/aws-route53/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.795.0", + "aws-sdk": "^2.796.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-sqs/package.json b/packages/@aws-cdk/aws-sqs/package.json index adf939c12797b..b05e3fac22649 100644 --- a/packages/@aws-cdk/aws-sqs/package.json +++ b/packages/@aws-cdk/aws-sqs/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.795.0", + "aws-sdk": "^2.796.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index aac93302df7a4..93bccead04a81 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -79,7 +79,7 @@ "@types/aws-lambda": "^8.10.64", "@types/fs-extra": "^8.1.1", "@types/sinon": "^9.0.8", - "aws-sdk": "^2.795.0", + "aws-sdk": "^2.796.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 437f047fbce7d..65e30fff3d24c 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -71,7 +71,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.795.0", + "aws-sdk": "^2.796.0", "camelcase": "^6.2.0", "cdk-assets": "0.0.0", "colors": "^1.4.0", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index 8ce5dc11201f0..f9759e774cd99 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -47,7 +47,7 @@ "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.795.0", + "aws-sdk": "^2.796.0", "glob": "^7.1.6", "yargs": "^16.1.1" }, diff --git a/yarn.lock b/yarn.lock index b36fbeba50bd4..2d423caa5a51f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2294,10 +2294,10 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" -aws-sdk@^2.637.0, aws-sdk@^2.795.0: - version "2.795.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.795.0.tgz#30984ff6e6df4e98b9fff5994146d3b20e40adfc" - integrity sha512-cqMposguHdiZOgS3HpAvA8iP3vfrlPQCCn5RllpzU3gPIP5RKtcACu6qzwIAZGcMvC0qt49EzAzyIfN+qdzikQ== +aws-sdk@^2.637.0, aws-sdk@^2.796.0: + version "2.796.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.796.0.tgz#56aa4e894162c54804abd7f0afa6ca22264ae557" + integrity sha512-200ic1PfRhcoLqQJkdHuZx5Utd+FFPTHEFwFvAU6zKXkKTe4P+ZfSETkoLCqsN8ks61mvXevzeHviJt89BLGbw== dependencies: buffer "4.9.2" events "1.1.1" From 9fe0dad630d0bf69bdec2fc5c8daa6ca4f0919f6 Mon Sep 17 00:00:00 2001 From: Ben Limmer Date: Thu, 19 Nov 2020 15:23:36 -0700 Subject: [PATCH 187/314] docs(codepipeline-actions): fix GithubSource oauthtoken link (#11584) The previous link was redirecting to the root documentation page for CodePipeline. It looks like this was moved to an Appendix once Github actions v2 were added. I also opened up a feature request to consider supporting v2 actions: https://github.com/aws/aws-cdk/issues/11582 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-codepipeline-actions/lib/github/source-action.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/github/source-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/github/source-action.ts index 75d14cf0fbbe9..82ca0b033120c 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/github/source-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/github/source-action.ts @@ -71,7 +71,7 @@ export interface GitHubSourceActionProps extends codepipeline.CommonActionProps * * **repo** - to read the repository * * **admin:repo_hook** - if you plan to use webhooks (true by default) * - * @see https://docs.aws.amazon.com/codepipeline/latest/userguide/GitHub-create-personal-token-CLI.html + * @see https://docs.aws.amazon.com/codepipeline/latest/userguide/appendix-github-oauth.html#GitHub-create-personal-token-CLI */ readonly oauthToken: SecretValue; From f0de91fcf5e956e00f930d0aadcc5516a9125922 Mon Sep 17 00:00:00 2001 From: Dominic Fezzie Date: Thu, 19 Nov 2020 15:01:54 -0800 Subject: [PATCH 188/314] feat(appmesh): change Route's spec to a union-like class (#11343) Implements the same pattern `GatewayRoutes` use for defining protocol specific specs. Adds GRPC and HTTP2 support to Routes which will resolve https://github.com/aws/aws-cdk/issues/9755 BREAKING CHANGE: changes Route's spec to a union-like class. RouteSpec is now defined using protocol variant static methods ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../lib/extensions/appmesh.ts | 36 ++- packages/@aws-cdk/aws-appmesh/README.md | 66 +++-- packages/@aws-cdk/aws-appmesh/lib/index.ts | 1 + .../@aws-cdk/aws-appmesh/lib/route-spec.ts | 262 ++++++++++++++++++ packages/@aws-cdk/aws-appmesh/lib/route.ts | 107 +------ .../@aws-cdk/aws-appmesh/test/integ.mesh.ts | 46 +-- .../@aws-cdk/aws-appmesh/test/test.route.ts | 216 +++++++++++++++ .../aws-appmesh/test/test.virtual-router.ts | 78 ++++-- 8 files changed, 637 insertions(+), 175 deletions(-) create mode 100644 packages/@aws-cdk/aws-appmesh/lib/route-spec.ts diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts index 614a1eeea2312..3c7bfae78d7f9 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts +++ b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts @@ -293,14 +293,16 @@ export class AppMeshExtension extends ServiceExtension { virtualRouterName: `${this.parentService.id}`, }); + // Form the service name that requests will be made to + const serviceName = `${this.parentService.id}.${cloudmapNamespace.namespaceName}`; + const weightedTargets: appmesh.WeightedTarget[] = [{ + virtualNode: this.virtualNode, + weight: 1, + }]; // Now add the virtual node as a route in the virtual router + // Ensure that the route type matches the protocol type. this.route = this.virtualRouter.addRoute(`${this.parentService.id}-route`, { - routeTargets: [{ - virtualNode: this.virtualNode, - weight: 1, - }], - // Ensure that the route type matches the protocol type. - routeType: this.protocol == appmesh.Protocol.HTTP ? appmesh.RouteType.HTTP : appmesh.RouteType.TCP, + routeSpec: this.routeSpec(weightedTargets, serviceName), }); // Now create a virtual service. Relationship goes like this: @@ -308,7 +310,7 @@ export class AppMeshExtension extends ServiceExtension { this.virtualService = new appmesh.VirtualService(this.scope, `${this.parentService.id}-virtual-service`, { mesh: this.mesh, virtualRouter: this.virtualRouter, - virtualServiceName: `${this.parentService.id}.${cloudmapNamespace.namespaceName}`, + virtualServiceName: serviceName, }); } @@ -340,6 +342,26 @@ export class AppMeshExtension extends ServiceExtension { this.virtualNode.addBackend(otherAppMesh.virtualService); } + private routeSpec(weightedTargets: appmesh.WeightedTarget[], serviceName: string): appmesh.RouteSpec { + switch (this.protocol) { + case appmesh.Protocol.HTTP: return appmesh.RouteSpec.http({ + weightedTargets: weightedTargets, + }); + case appmesh.Protocol.HTTP2: return appmesh.RouteSpec.http2({ + weightedTargets: weightedTargets, + }); + case appmesh.Protocol.GRPC: return appmesh.RouteSpec.grpc({ + weightedTargets: weightedTargets, + match: { + serviceName: serviceName, + }, + }); + case appmesh.Protocol.TCP: return appmesh.RouteSpec.tcp({ + weightedTargets: weightedTargets, + }); + } + } + private virtualRouterListener(port: number): appmesh.VirtualRouterListener { switch (this.protocol) { case appmesh.Protocol.HTTP: return appmesh.VirtualRouterListener.http(port); diff --git a/packages/@aws-cdk/aws-appmesh/README.md b/packages/@aws-cdk/aws-appmesh/README.md index dff8a6808c701..4bed6a9598541 100644 --- a/packages/@aws-cdk/aws-appmesh/README.md +++ b/packages/@aws-cdk/aws-appmesh/README.md @@ -188,39 +188,63 @@ The `listeners` property can be left blank and added later with the `node.addLis A `route` is associated with a virtual router, and it's used to match requests for a virtual router and distribute traffic accordingly to its associated virtual nodes. -You can use the prefix parameter in your `route` specification for path-based routing of requests. For example, if your virtual service name is my-service.local and you want the `route` to match requests to my-service.local/metrics, your prefix should be /metrics. - If your `route` matches a request, you can distribute traffic to one or more target virtual nodes with relative weighting. ```typescript -router.addRoute('route', { - routeTargets: [ - { - virtualNode, - weight: 1, +router.addRoute('route-http', { + routeSpec: appmesh.RouteSpec.http({ + weightedTargets: [ + { + virtualNode: node, + }, + ], + match: { + prefixPath: '/path-to-app', }, - ], - prefix: `/path-to-app`, - routeType: RouteType.HTTP, + }), }); ``` Add a single route with multiple targets and split traffic 50/50 ```typescript -router.addRoute('route', { - routeTargets: [ - { - virtualNode, - weight: 50, +router.addRoute('route-http', { + routeSpec: appmesh.RouteSpec.http({ + weightedTargets: [ + { + virtualNode: node, + weight: 50, + }, + { + virtualNode: node, + weight: 50, + }, + ], + match: { + prefixPath: '/path-to-app', }, - { - virtualNode2, - weight: 50, + }), +}); +``` + +The _RouteSpec_ class provides an easy interface for defining new protocol specific route specs. +The `tcp()`, `http()` and `http2()` methods provide the spec necessary to define a protocol specific spec. + +For HTTP based routes, the match field can be used to match on a route prefix. +By default, an HTTP based route will match on `/`. All matches must start with a leading `/`. + +```typescript +router.addRoute('route-http', { + routeSpec: appmesh.RouteSpec.grpc({ + weightedTargets: [ + { + virtualNode: node, + }, + ], + match: { + serviceName: 'my-service.default.svc.cluster.local', }, - ], - prefix: `/path-to-app`, - routeType: RouteType.HTTP, + }), }); ``` diff --git a/packages/@aws-cdk/aws-appmesh/lib/index.ts b/packages/@aws-cdk/aws-appmesh/lib/index.ts index 4c09b13ba730c..1b468f21ec613 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/index.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/index.ts @@ -2,6 +2,7 @@ export * from './appmesh.generated'; export * from './mesh'; export * from './route'; +export * from './route-spec'; export * from './shared-interfaces'; export * from './virtual-node'; export * from './virtual-router'; diff --git a/packages/@aws-cdk/aws-appmesh/lib/route-spec.ts b/packages/@aws-cdk/aws-appmesh/lib/route-spec.ts new file mode 100644 index 0000000000000..b015bd4580171 --- /dev/null +++ b/packages/@aws-cdk/aws-appmesh/lib/route-spec.ts @@ -0,0 +1,262 @@ +import * as cdk from '@aws-cdk/core'; +import { CfnRoute } from './appmesh.generated'; +import { Protocol } from './shared-interfaces'; +import { IVirtualNode } from './virtual-node'; + +/** + * Properties for the Weighted Targets in the route + */ +export interface WeightedTarget { + /** + * The VirtualNode the route points to + */ + readonly virtualNode: IVirtualNode; + + /** + * The weight for the target + * + * @default 1 + */ + readonly weight?: number; +} + +/** + * The criterion for determining a request match for this GatewayRoute + */ +export interface HttpRouteMatch { + /** + * Specifies the path to match requests with. + * This parameter must always start with /, which by itself matches all requests to the virtual service name. + * You can also match for path-based routing of requests. For example, if your virtual service name is my-service.local + * and you want the route to match requests to my-service.local/metrics, your prefix should be /metrics. + */ + readonly prefixPath: string; +} + +/** + * The criterion for determining a request match for this GatewayRoute + */ +export interface GrpcRouteMatch { + /** + * The fully qualified domain name for the service to match from the request + */ + readonly serviceName: string; +} + +/** + * Properties specific for HTTP Based Routes + */ +export interface HttpRouteSpecOptions { + /** + * The criterion for determining a request match for this Route + * + * @default - matches on '/' + */ + readonly match?: HttpRouteMatch; + + /** + * List of targets that traffic is routed to when a request matches the route + */ + readonly weightedTargets: WeightedTarget[]; +} + +/** + * Properties specific for a TCP Based Routes + */ +export interface TcpRouteSpecOptions { + /** + * List of targets that traffic is routed to when a request matches the route + */ + readonly weightedTargets: WeightedTarget[]; +} + +/** + * Properties specific for a GRPC Based Routes + */ +export interface GrpcRouteSpecOptions { + /** + * The criterion for determining a request match for this Route + */ + readonly match: GrpcRouteMatch; + + /** + * List of targets that traffic is routed to when a request matches the route + */ + readonly weightedTargets: WeightedTarget[]; +} + +/** + * All Properties for GatewayRoute Specs + */ +export interface RouteSpecConfig { + /** + * The spec for an http route + * + * @default - no http spec + */ + readonly httpRouteSpec?: CfnRoute.HttpRouteProperty; + + /** + * The spec for an http2 route + * + * @default - no http2 spec + */ + readonly http2RouteSpec?: CfnRoute.HttpRouteProperty; + + /** + * The spec for a grpc route + * + * @default - no grpc spec + */ + readonly grpcRouteSpec?: CfnRoute.GrpcRouteProperty; + + /** + * The spec for a tcp route + * + * @default - no tcp spec + */ + readonly tcpRouteSpec?: CfnRoute.TcpRouteProperty; +} + +/** + * Used to generate specs with different protocols for a RouteSpec + */ +export abstract class RouteSpec { + /** + * Creates an HTTP Based RouteSpec + */ + public static http(options: HttpRouteSpecOptions): RouteSpec { + return new HttpRouteSpec(options, Protocol.HTTP); + } + + /** + * Creates an HTTP2 Based RouteSpec + * + */ + public static http2(options: HttpRouteSpecOptions): RouteSpec { + return new HttpRouteSpec(options, Protocol.HTTP2); + } + + /** + * Creates a TCP Based RouteSpec + */ + public static tcp(options: TcpRouteSpecOptions): RouteSpec { + return new TcpRouteSpec(options); + } + + /** + * Creates a GRPC Based RouteSpec + */ + public static grpc(options: GrpcRouteSpecOptions): RouteSpec { + return new GrpcRouteSpec(options); + } + + /** + * Called when the GatewayRouteSpec type is initialized. Can be used to enforce + * mutual exclusivity with future properties + */ + public abstract bind(scope: cdk.Construct): RouteSpecConfig; +} + +class HttpRouteSpec extends RouteSpec { + /** + * Type of route you are creating + */ + public readonly protocol: Protocol; + + /** + * The criteria for determining a request match + */ + public readonly match?: HttpRouteMatch; + + /** + * List of targets that traffic is routed to when a request matches the route + */ + public readonly weightedTargets: WeightedTarget[]; + + constructor(props: HttpRouteSpecOptions, protocol: Protocol) { + super(); + this.protocol = protocol; + this.match = props.match; + this.weightedTargets = props.weightedTargets; + } + + public bind(_scope: cdk.Construct): RouteSpecConfig { + const prefixPath = this.match ? this.match.prefixPath : '/'; + if (prefixPath[0] != '/') { + throw new Error(`Prefix Path must start with \'/\', got: ${prefixPath}`); + } + const httpConfig: CfnRoute.HttpRouteProperty = { + action: { + weightedTargets: renderWeightedTargets(this.weightedTargets), + }, + match: { + prefix: prefixPath, + }, + }; + return { + httpRouteSpec: this.protocol === Protocol.HTTP ? httpConfig : undefined, + http2RouteSpec: this.protocol === Protocol.HTTP2 ? httpConfig : undefined, + }; + } +} + +class TcpRouteSpec extends RouteSpec { + /* + * List of targets that traffic is routed to when a request matches the route + */ + public readonly weightedTargets: WeightedTarget[]; + + constructor(props: TcpRouteSpecOptions) { + super(); + this.weightedTargets = props.weightedTargets; + } + + public bind(_scope: cdk.Construct): RouteSpecConfig { + return { + tcpRouteSpec: { + action: { + weightedTargets: renderWeightedTargets(this.weightedTargets), + }, + }, + }; + } +} + +class GrpcRouteSpec extends RouteSpec { + public readonly weightedTargets: WeightedTarget[]; + public readonly match: GrpcRouteMatch; + + constructor(props: GrpcRouteSpecOptions) { + super(); + this.weightedTargets = props.weightedTargets; + this.match = props.match; + } + + public bind(_scope: cdk.Construct): RouteSpecConfig { + return { + grpcRouteSpec: { + action: { + weightedTargets: renderWeightedTargets(this.weightedTargets), + }, + match: { + serviceName: this.match.serviceName, + }, + }, + }; + } +} + +/** +* Utility method to add weighted route targets to an existing route +*/ +function renderWeightedTargets(weightedTargets: WeightedTarget[]): CfnRoute.WeightedTargetProperty[] { + const renderedTargets: CfnRoute.WeightedTargetProperty[] = []; + for (const t of weightedTargets) { + renderedTargets.push({ + virtualNode: t.virtualNode.virtualNodeName, + weight: t.weight || 1, + }); + } + return renderedTargets; +} diff --git a/packages/@aws-cdk/aws-appmesh/lib/route.ts b/packages/@aws-cdk/aws-appmesh/lib/route.ts index cfa0e8e6d54c1..f2fb9ab58232a 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/route.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/route.ts @@ -2,7 +2,7 @@ import * as cdk from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnRoute } from './appmesh.generated'; import { IMesh } from './mesh'; -import { IVirtualNode } from './virtual-node'; +import { RouteSpec } from './route-spec'; import { IVirtualRouter, VirtualRouter } from './virtual-router'; /** @@ -41,57 +41,9 @@ export interface RouteBaseProps { readonly routeName?: string; /** - * The path prefix to match for the route - * - * @default "/" if http otherwise none - */ - readonly prefix?: string; - - /** - * Array of weighted route targets - * - * @requires minimum of 1 - */ - readonly routeTargets: WeightedTargetProps[]; - - /** - * Weather the route is HTTP based - * - * @default - HTTP if `prefix` is given, TCP otherwise - */ - readonly routeType?: RouteType; -} - -/** - * Type of route - */ -export enum RouteType { - /** - * HTTP route + * Protocol specific spec */ - HTTP = 'http', - - /** - * TCP route - */ - TCP = 'tcp' -} - -/** - * Properties for the Weighted Targets in the route - */ -export interface WeightedTargetProps { - /** - * The VirtualNode the route points to - */ - readonly virtualNode: IVirtualNode; - - /** - * The weight for the target - * - * @default 1 - */ - readonly weight?: number; + readonly routeSpec: RouteSpec; } /** @@ -156,10 +108,6 @@ export class Route extends cdk.Resource implements IRoute { */ public readonly virtualRouter: IVirtualRouter; - private readonly weightedTargets = new Array(); - private readonly httpRoute?: CfnRoute.HttpRouteProperty; - private readonly tcpRoute?: CfnRoute.TcpRouteProperty; - constructor(scope: Construct, id: string, props: RouteProps) { super(scope, id, { physicalName: props.routeName || cdk.Lazy.stringValue({ produce: () => cdk.Names.uniqueId(this) }), @@ -167,23 +115,17 @@ export class Route extends cdk.Resource implements IRoute { this.virtualRouter = props.virtualRouter; - const routeType = props.routeType !== undefined ? props.routeType : - props.prefix !== undefined ? RouteType.HTTP : - RouteType.TCP; - - if (routeType === RouteType.HTTP) { - this.httpRoute = this.renderHttpRoute(props); - } else { - this.tcpRoute = this.renderTcpRoute(props); - } + const spec = props.routeSpec.bind(this); const route = new CfnRoute(this, 'Resource', { routeName: this.physicalName, meshName: this.virtualRouter.mesh.meshName, virtualRouterName: this.virtualRouter.virtualRouterName, spec: { - tcpRoute: this.tcpRoute, - httpRoute: this.httpRoute, + tcpRoute: spec.tcpRouteSpec, + httpRoute: spec.httpRouteSpec, + http2Route: spec.http2RouteSpec, + grpcRoute: spec.grpcRouteSpec, }, }); @@ -194,39 +136,6 @@ export class Route extends cdk.Resource implements IRoute { resourceName: this.physicalName, }); } - - /** - * Utility method to add weighted route targets to an existing route - */ - private renderWeightedTargets(props: WeightedTargetProps[]) { - for (const t of props) { - this.weightedTargets.push({ - virtualNode: t.virtualNode.virtualNodeName, - weight: t.weight || 1, - }); - } - - return this.weightedTargets; - } - - private renderHttpRoute(props: RouteProps) { - return { - match: { - prefix: props.prefix || '/', - }, - action: { - weightedTargets: this.renderWeightedTargets(props.routeTargets), - }, - }; - } - - private renderTcpRoute(props: RouteProps) { - return { - action: { - weightedTargets: this.renderWeightedTargets(props.routeTargets), - }, - }; - } } /** diff --git a/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts b/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts index 8bad51d706a32..782ca6cee1f83 100644 --- a/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts +++ b/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts @@ -49,13 +49,17 @@ node.addBackend(new appmesh.VirtualService(stack, 'service-2', { ); router.addRoute('route-1', { - routeTargets: [ - { - virtualNode: node, - weight: 50, + routeSpec: appmesh.RouteSpec.http({ + weightedTargets: [ + { + virtualNode: node, + weight: 50, + }, + ], + match: { + prefixPath: '/', }, - ], - prefix: '/', + }), }); const node2 = mesh.addVirtualNode('node2', { @@ -96,22 +100,28 @@ const node3 = mesh.addVirtualNode('node3', { }); router.addRoute('route-2', { - routeTargets: [ - { - virtualNode: node2, - weight: 30, + routeSpec: appmesh.RouteSpec.http({ + weightedTargets: [ + { + virtualNode: node2, + weight: 30, + }, + ], + match: { + prefixPath: '/path2', }, - ], - prefix: '/path2', + }), }); router.addRoute('route-3', { - routeTargets: [ - { - virtualNode: node3, - weight: 20, - }, - ], + routeSpec: appmesh.RouteSpec.tcp({ + weightedTargets: [ + { + virtualNode: node3, + weight: 20, + }, + ], + }), }); const gateway = mesh.addVirtualGateway('gateway1', { diff --git a/packages/@aws-cdk/aws-appmesh/test/test.route.ts b/packages/@aws-cdk/aws-appmesh/test/test.route.ts index 3f24bdf4be470..c3b6bab0357cb 100644 --- a/packages/@aws-cdk/aws-appmesh/test/test.route.ts +++ b/packages/@aws-cdk/aws-appmesh/test/test.route.ts @@ -1,9 +1,224 @@ +import { expect, haveResourceLike } from '@aws-cdk/assert'; import * as cdk from '@aws-cdk/core'; import { Test } from 'nodeunit'; import * as appmesh from '../lib'; export = { + 'When creating new routes': { + 'route has expected defaults'(test:Test) { + // GIVEN + const stack = new cdk.Stack(); + const mesh = new appmesh.Mesh(stack, 'mesh', { + meshName: 'test-mesh', + }); + const router = new appmesh.VirtualRouter(stack, 'router', { + mesh, + }); + + // WHEN + const node = mesh.addVirtualNode('test-node', { + dnsHostName: 'test', + listeners: [appmesh.VirtualNodeListener.http()], + }); + + router.addRoute('test-http-route', { + routeSpec: appmesh.RouteSpec.http({ + weightedTargets: [ + { + virtualNode: node, + }, + ], + }), + }); + + router.addRoute('test-http2-route', { + routeSpec: appmesh.RouteSpec.http2({ + weightedTargets: [ + { + virtualNode: node, + }, + ], + }), + }); + + router.addRoute('test-tcp-route', { + routeSpec: appmesh.RouteSpec.tcp({ + weightedTargets: [ + { + virtualNode: node, + }, + ], + }), + }); + + router.addRoute('test-grpc-route', { + routeSpec: appmesh.RouteSpec.grpc({ + weightedTargets: [ + { + virtualNode: node, + }, + ], + match: { + serviceName: 'test.svc.local', + }, + }), + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::AppMesh::Route', { + Spec: { + HttpRoute: { + Action: { + WeightedTargets: [ + { + VirtualNode: { + 'Fn::GetAtt': [ + 'meshtestnodeF93946D4', + 'VirtualNodeName', + ], + }, + Weight: 1, + }, + ], + }, + Match: { + Prefix: '/', + }, + }, + }, + RouteName: 'test-http-route', + })); + + expect(stack).to(haveResourceLike('AWS::AppMesh::Route', { + Spec: { + Http2Route: { + Action: { + WeightedTargets: [ + { + VirtualNode: { + 'Fn::GetAtt': [ + 'meshtestnodeF93946D4', + 'VirtualNodeName', + ], + }, + Weight: 1, + }, + ], + }, + Match: { + Prefix: '/', + }, + }, + }, + RouteName: 'test-http2-route', + })); + + expect(stack).to(haveResourceLike('AWS::AppMesh::Route', { + Spec: { + TcpRoute: { + Action: { + WeightedTargets: [ + { + VirtualNode: { + 'Fn::GetAtt': [ + 'meshtestnodeF93946D4', + 'VirtualNodeName', + ], + }, + Weight: 1, + }, + ], + }, + }, + }, + RouteName: 'test-tcp-route', + })); + + expect(stack).to(haveResourceLike('AWS::AppMesh::Route', { + Spec: { + GrpcRoute: { + Action: { + WeightedTargets: [ + { + VirtualNode: { + 'Fn::GetAtt': [ + 'meshtestnodeF93946D4', + 'VirtualNodeName', + ], + }, + Weight: 1, + }, + ], + }, + Match: { + ServiceName: 'test.svc.local', + }, + }, + }, + RouteName: 'test-grpc-route', + })); + + test.done(); + }, + + 'should have expected features'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const mesh = new appmesh.Mesh(stack, 'mesh', { + meshName: 'test-mesh', + }); + const router = new appmesh.VirtualRouter(stack, 'router', { + mesh, + }); + + // WHEN + const node = mesh.addVirtualNode('test-node', { + dnsHostName: 'test', + listeners: [appmesh.VirtualNodeListener.http()], + }); + + router.addRoute('test-http-route', { + routeSpec: appmesh.RouteSpec.http({ + weightedTargets: [ + { + virtualNode: node, + }, + ], + match: { + prefixPath: '/node', + }, + }), + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::AppMesh::Route', { + Spec: { + HttpRoute: { + Action: { + WeightedTargets: [ + { + VirtualNode: { + 'Fn::GetAtt': [ + 'meshtestnodeF93946D4', + 'VirtualNodeName', + ], + }, + Weight: 1, + }, + ], + }, + Match: { + Prefix: '/node', + }, + }, + }, + RouteName: 'test-http-route', + })); + test.done(); + }, + }, + 'Can import Routes using an ARN'(test: Test) { const app = new cdk.App(); // GIVEN @@ -23,6 +238,7 @@ export = { test.equal(route.virtualRouter.mesh.meshName, meshName); test.done(); }, + 'Can import Routes using ARN and attributes'(test: Test) { const app = new cdk.App(); // GIVEN diff --git a/packages/@aws-cdk/aws-appmesh/test/test.virtual-router.ts b/packages/@aws-cdk/aws-appmesh/test/test.virtual-router.ts index 56960564d6981..671ffb8aa61ae 100644 --- a/packages/@aws-cdk/aws-appmesh/test/test.virtual-router.ts +++ b/packages/@aws-cdk/aws-appmesh/test/test.virtual-router.ts @@ -113,13 +113,17 @@ export = { }); router.addRoute('route-1', { - routeTargets: [ - { - virtualNode: node, - weight: 50, + routeSpec: appmesh.RouteSpec.http({ + weightedTargets: [ + { + virtualNode: node, + weight: 50, + }, + ], + match: { + prefixPath: '/', }, - ], - prefix: '/', + }), }); // THEN @@ -202,33 +206,45 @@ export = { }); router.addRoute('route-1', { - routeTargets: [ - { - virtualNode: node, - weight: 50, + routeSpec: appmesh.RouteSpec.http({ + weightedTargets: [ + { + virtualNode: node, + weight: 50, + }, + ], + match: { + prefixPath: '/', }, - ], - prefix: '/', + }), }); router.addRoute('route-2', { - routeTargets: [ - { - virtualNode: node2, - weight: 30, + routeSpec: appmesh.RouteSpec.http({ + weightedTargets: [ + { + virtualNode: node2, + weight: 30, + }, + ], + match: { + prefixPath: '/path2', }, - ], - prefix: '/path2', + }), }); router.addRoute('route-3', { - routeTargets: [ - { - virtualNode: node3, - weight: 20, + routeSpec: appmesh.RouteSpec.http({ + weightedTargets: [ + { + virtualNode: node3, + weight: 20, + }, + ], + match: { + prefixPath: '/path3', }, - ], - prefix: '/path3', + }), }); // THEN @@ -330,12 +346,14 @@ export = { }); router.addRoute('route-tcp-1', { - routeTargets: [ - { - virtualNode: node, - weight: 50, - }, - ], + routeSpec: appmesh.RouteSpec.tcp({ + weightedTargets: [ + { + virtualNode: node, + weight: 50, + }, + ], + }), }); // THEN From 6a4b22d6db5884dca3cb5c1c8d5312f6edc55dee Mon Sep 17 00:00:00 2001 From: Joe Snell Date: Thu, 19 Nov 2020 17:30:29 -0600 Subject: [PATCH 189/314] feat(codebuild): allow setting the Project's logging configuration (#11444) Fixes: #3856 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-codebuild/README.md | 32 ++++ packages/@aws-cdk/aws-codebuild/lib/index.ts | 1 + .../aws-codebuild/lib/project-logs.ts | 78 ++++++++++ .../@aws-cdk/aws-codebuild/lib/project.ts | 47 ++++++ packages/@aws-cdk/aws-codebuild/package.json | 2 + .../aws-codebuild/test/test.project.ts | 137 ++++++++++++++++++ 6 files changed, 297 insertions(+) create mode 100644 packages/@aws-cdk/aws-codebuild/lib/project-logs.ts diff --git a/packages/@aws-cdk/aws-codebuild/README.md b/packages/@aws-cdk/aws-codebuild/README.md index c51b263279e34..8dc9d1db9f9ec 100644 --- a/packages/@aws-cdk/aws-codebuild/README.md +++ b/packages/@aws-cdk/aws-codebuild/README.md @@ -305,6 +305,38 @@ new codebuild.Project(this, 'Project', { }) ``` +## Logs + +CodeBuild lets you specify an S3 Bucket, CloudWatch Log Group or both to receive logs from your projects. + +By default, logs will go to cloudwatch. + +### CloudWatch Logs Example + +```typescript +new codebuild.Project(this, 'Project', { + logging: { + cloudWatch: { + logGroup: new cloudwatch.LogGroup(this, `MyLogGroup`), + } + }, + ... +}) +``` + +### S3 Logs Example + +```typescript +new codebuild.Project(this, 'Project', { + logging: { + s3: { + bucket: new s3.Bucket(this, `LogBucket`) + } + }, + ... +}) +``` + ## Credentials CodeBuild allows you to store credentials used when communicating with various sources, diff --git a/packages/@aws-cdk/aws-codebuild/lib/index.ts b/packages/@aws-cdk/aws-codebuild/lib/index.ts index d1d0907ec734d..96731b2130043 100644 --- a/packages/@aws-cdk/aws-codebuild/lib/index.ts +++ b/packages/@aws-cdk/aws-codebuild/lib/index.ts @@ -1,6 +1,7 @@ export * from './events'; export * from './pipeline-project'; export * from './project'; +export * from './project-logs'; export * from './report-group'; export * from './source'; export * from './source-credentials'; diff --git a/packages/@aws-cdk/aws-codebuild/lib/project-logs.ts b/packages/@aws-cdk/aws-codebuild/lib/project-logs.ts new file mode 100644 index 0000000000000..d2613462d6330 --- /dev/null +++ b/packages/@aws-cdk/aws-codebuild/lib/project-logs.ts @@ -0,0 +1,78 @@ +import * as logs from '@aws-cdk/aws-logs'; +import * as s3 from '@aws-cdk/aws-s3'; + +/** + * Information about logs built to an S3 bucket for a build project. + */ +export interface S3LoggingOptions { + /** + * Encrypt the S3 build log output + * + * @default true + */ + readonly encrypted?: boolean; + + /** + * The S3 Bucket to send logs to + */ + readonly bucket: s3.IBucket; + + /** + * The path prefix for S3 logs + * + * @default - no prefix + */ + readonly prefix?: string; + + /** + * The current status of the logs in Amazon CloudWatch Logs for a build project + * + * @default true + */ + readonly enabled?: boolean; +} + +/** + * Information about logs built to a CloudWatch Log Group for a build project. + */ +export interface CloudWatchLoggingOptions { + /** + * The Log Group to send logs to + * + * @default - no log group specified + */ + readonly logGroup?: logs.ILogGroup; + + /** + * The prefix of the stream name of the Amazon CloudWatch Logs + * + * @default - no prefix + */ + readonly prefix?: string; + + /** + * The current status of the logs in Amazon CloudWatch Logs for a build project + * + * @default true + */ + readonly enabled?: boolean; +} + +/** + * Information about logs for the build project. A project can create logs in Amazon CloudWatch Logs, an S3 bucket, or both. + */ +export interface LoggingOptions { + /** + * Information about logs built to an S3 bucket for a build project. + * + * @default - disabled + */ + readonly s3?: S3LoggingOptions; + + /** + * Information about Amazon CloudWatch Logs for a build project. + * + * @default - enabled + */ + readonly cloudWatch?: CloudWatchLoggingOptions; +} diff --git a/packages/@aws-cdk/aws-codebuild/lib/project.ts b/packages/@aws-cdk/aws-codebuild/lib/project.ts index 8bfc8f38e09cf..8973dc8f5ea04 100644 --- a/packages/@aws-cdk/aws-codebuild/lib/project.ts +++ b/packages/@aws-cdk/aws-codebuild/lib/project.ts @@ -18,6 +18,7 @@ import { IFileSystemLocation } from './file-location'; import { NoArtifacts } from './no-artifacts'; import { NoSource } from './no-source'; import { runScriptLinuxBuildSpec, S3_BUCKET_ENV, S3_KEY_ENV } from './private/run-script-linux-build-spec'; +import { LoggingOptions } from './project-logs'; import { renderReportGroupArn } from './report-group-utils'; import { ISource } from './source'; import { CODEPIPELINE_SOURCE_ARTIFACTS_TYPE, NO_SOURCE_TYPE } from './source-types'; @@ -538,6 +539,13 @@ export interface CommonProjectProps { * @see https://docs.aws.amazon.com/codebuild/latest/userguide/test-report-group-naming.html */ readonly grantReportGroupPermissions?: boolean; + + /** + * Information about logs for the build project. A project can create logs in Amazon CloudWatch Logs, an S3 bucket, or both. + * + * @default - no log configuration is set + */ + readonly logging?: LoggingOptions; } export interface ProjectProps extends CommonProjectProps { @@ -771,6 +779,7 @@ export class Project extends ProjectBase { triggers: sourceConfig.buildTriggers, sourceVersion: sourceConfig.sourceVersion, vpcConfig: this.configureVpc(props), + logsConfig: this.renderLoggingConfiguration(props.logging), }); this.addVpcRequiredPermissions(props, resource); @@ -1036,6 +1045,44 @@ export class Project extends ProjectBase { }; } + private renderLoggingConfiguration(props: LoggingOptions | undefined): CfnProject.LogsConfigProperty | undefined { + if (props === undefined) { + return undefined; + }; + + let s3Config: CfnProject.S3LogsConfigProperty|undefined = undefined; + let cloudwatchConfig: CfnProject.CloudWatchLogsConfigProperty|undefined = undefined; + + if (props.s3) { + const s3Logs = props.s3; + s3Config = { + status: (s3Logs.enabled ?? true) ? 'ENABLED' : 'DISABLED', + location: `${s3Logs.bucket.bucketName}/${s3Logs.prefix}`, + encryptionDisabled: s3Logs.encrypted, + }; + } + + if (props.cloudWatch) { + const cloudWatchLogs = props.cloudWatch; + const status = (cloudWatchLogs.enabled ?? true) ? 'ENABLED' : 'DISABLED'; + + if (status === 'ENABLED' && !(cloudWatchLogs.logGroup)) { + throw new Error('Specifying a LogGroup is required if CloudWatch logging for CodeBuild is enabled'); + } + + cloudwatchConfig = { + status, + groupName: cloudWatchLogs.logGroup?.logGroupName, + streamName: cloudWatchLogs.prefix, + }; + } + + return { + s3Logs: s3Config, + cloudWatchLogs: cloudwatchConfig, + }; + } + private addVpcRequiredPermissions(props: ProjectProps, project: CfnProject): void { if (!props.vpc || !this.role) { return; diff --git a/packages/@aws-cdk/aws-codebuild/package.json b/packages/@aws-cdk/aws-codebuild/package.json index 206e810609e9d..1c7ff7ae66cd3 100644 --- a/packages/@aws-cdk/aws-codebuild/package.json +++ b/packages/@aws-cdk/aws-codebuild/package.json @@ -96,6 +96,7 @@ "@aws-cdk/aws-events": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-kms": "0.0.0", + "@aws-cdk/aws-logs": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/aws-s3-assets": "0.0.0", "@aws-cdk/aws-secretsmanager": "0.0.0", @@ -114,6 +115,7 @@ "@aws-cdk/aws-events": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-kms": "0.0.0", + "@aws-cdk/aws-logs": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/aws-s3-assets": "0.0.0", "@aws-cdk/aws-secretsmanager": "0.0.0", diff --git a/packages/@aws-cdk/aws-codebuild/test/test.project.ts b/packages/@aws-cdk/aws-codebuild/test/test.project.ts index f892f8b30eac2..439427588afdb 100644 --- a/packages/@aws-cdk/aws-codebuild/test/test.project.ts +++ b/packages/@aws-cdk/aws-codebuild/test/test.project.ts @@ -1,6 +1,7 @@ import { countResources, expect, haveResource, haveResourceLike, objectLike, not, ResourcePart } from '@aws-cdk/assert'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as iam from '@aws-cdk/aws-iam'; +import * as logs from '@aws-cdk/aws-logs'; import * as s3 from '@aws-cdk/aws-s3'; import * as secretsmanager from '@aws-cdk/aws-secretsmanager'; import * as cdk from '@aws-cdk/core'; @@ -600,5 +601,141 @@ export = { test.done(); }, + + 'logs config - cloudWatch'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const logGroup = logs.LogGroup.fromLogGroupName(stack, 'LogGroup', 'MyLogGroupName'); + + // WHEN + new codebuild.Project(stack, 'Project', { + source: codebuild.Source.s3({ + bucket: new s3.Bucket(stack, 'Bucket'), + path: 'path', + }), + logging: { + cloudWatch: { + logGroup, + prefix: '/my-logs', + }, + }, + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::CodeBuild::Project', { + LogsConfig: objectLike({ + CloudWatchLogs: { + GroupName: 'MyLogGroupName', + Status: 'ENABLED', + StreamName: '/my-logs', + }, + }), + })); + + test.done(); + }, + + 'logs config - cloudWatch disabled'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + new codebuild.Project(stack, 'Project', { + source: codebuild.Source.s3({ + bucket: new s3.Bucket(stack, 'Bucket'), + path: 'path', + }), + logging: { + cloudWatch: { + enabled: false, + }, + }, + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::CodeBuild::Project', { + LogsConfig: objectLike({ + CloudWatchLogs: { + Status: 'DISABLED', + }, + }), + })); + + test.done(); + }, + + 'logs config - s3'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const bucket = s3.Bucket.fromBucketName(stack, 'LogBucket', 'MyBucketName'); + + // WHEN + new codebuild.Project(stack, 'Project', { + source: codebuild.Source.s3({ + bucket: new s3.Bucket(stack, 'Bucket'), + path: 'path', + }), + logging: { + s3: { + bucket, + prefix: 'my-logs', + }, + }, + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::CodeBuild::Project', { + LogsConfig: objectLike({ + S3Logs: { + Location: 'MyBucketName/my-logs', + Status: 'ENABLED', + }, + }), + })); + + test.done(); + }, + + 'logs config - cloudWatch and s3'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const bucket = s3.Bucket.fromBucketName(stack, 'LogBucket2', 'MyBucketName'); + const logGroup = logs.LogGroup.fromLogGroupName(stack, 'LogGroup2', 'MyLogGroupName'); + + // WHEN + new codebuild.Project(stack, 'Project', { + source: codebuild.Source.s3({ + bucket: new s3.Bucket(stack, 'Bucket'), + path: 'path', + }), + logging: { + cloudWatch: { + logGroup, + prefix: '/my-logs', + }, + s3: { + bucket, + prefix: 'my-logs', + }, + }, + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::CodeBuild::Project', { + LogsConfig: objectLike({ + CloudWatchLogs: { + GroupName: 'MyLogGroupName', + Status: 'ENABLED', + StreamName: '/my-logs', + }, + S3Logs: { + Location: 'MyBucketName/my-logs', + Status: 'ENABLED', + }, + }), + })); + + test.done(); + }, }, }; From eae1311afb51d09f3b409b6e925bb49ffc863acd Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 20 Nov 2020 00:05:43 +0000 Subject: [PATCH 190/314] chore(deps-dev): bump @types/node from 10.17.45 to 10.17.46 (#11596) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 10.17.45 to 10.17.46. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/core/package.json | 2 +- packages/@monocdk-experiment/assert/package.json | 2 +- packages/@monocdk-experiment/rewrite-imports/package.json | 2 +- packages/aws-cdk-lib/package.json | 2 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- packages/monocdk/package.json | 2 +- tools/eslint-plugin-cdk/package.json | 2 +- tools/nodeunit-shim/package.json | 2 +- tools/yarn-cling/package.json | 2 +- yarn.lock | 8 ++++---- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json index 6b3f4832d2c84..ff2a7d059f09d 100644 --- a/packages/@aws-cdk/core/package.json +++ b/packages/@aws-cdk/core/package.json @@ -170,7 +170,7 @@ "devDependencies": { "@types/lodash": "^4.14.165", "@types/minimatch": "^3.0.3", - "@types/node": "^10.17.45", + "@types/node": "^10.17.46", "@types/sinon": "^9.0.8", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@monocdk-experiment/assert/package.json b/packages/@monocdk-experiment/assert/package.json index 90a03d5dc0c3c..94a00e7e3f02f 100644 --- a/packages/@monocdk-experiment/assert/package.json +++ b/packages/@monocdk-experiment/assert/package.json @@ -35,7 +35,7 @@ "devDependencies": { "@monocdk-experiment/rewrite-imports": "0.0.0", "@types/jest": "^26.0.15", - "@types/node": "^10.17.45", + "@types/node": "^10.17.46", "cdk-build-tools": "0.0.0", "constructs": "^3.2.0", "jest": "^26.6.3", diff --git a/packages/@monocdk-experiment/rewrite-imports/package.json b/packages/@monocdk-experiment/rewrite-imports/package.json index 4144dde3e2a18..788001c77aabe 100644 --- a/packages/@monocdk-experiment/rewrite-imports/package.json +++ b/packages/@monocdk-experiment/rewrite-imports/package.json @@ -37,7 +37,7 @@ "devDependencies": { "@types/glob": "^7.1.3", "@types/jest": "^26.0.15", - "@types/node": "^10.17.45", + "@types/node": "^10.17.46", "cdk-build-tools": "0.0.0", "pkglint": "0.0.0" }, diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index 1c370fb04e14f..cfb97631655f4 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -265,7 +265,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "@types/fs-extra": "^8.1.1", - "@types/node": "^10.17.45", + "@types/node": "^10.17.46", "cdk-build-tools": "0.0.0", "constructs": "^3.2.0", "fs-extra": "^9.0.1", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 65e30fff3d24c..0544c1a89f25f 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -45,7 +45,7 @@ "@types/jest": "^26.0.15", "@types/minimatch": "^3.0.3", "@types/mockery": "^1.4.29", - "@types/node": "^10.17.45", + "@types/node": "^10.17.46", "@types/promptly": "^3.0.0", "@types/semver": "^7.3.4", "@types/sinon": "^9.0.8", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index f9759e774cd99..0dac4a4051c23 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -35,7 +35,7 @@ "@types/jest": "^26.0.15", "@types/jszip": "^3.4.1", "@types/mock-fs": "^4.13.0", - "@types/node": "^10.17.45", + "@types/node": "^10.17.46", "@types/yargs": "^15.0.10", "cdk-build-tools": "0.0.0", "jest": "^26.6.3", diff --git a/packages/monocdk/package.json b/packages/monocdk/package.json index 47276c7839ec1..49e674e35ea0f 100644 --- a/packages/monocdk/package.json +++ b/packages/monocdk/package.json @@ -264,7 +264,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "@types/fs-extra": "^8.1.1", - "@types/node": "^10.17.45", + "@types/node": "^10.17.46", "cdk-build-tools": "0.0.0", "constructs": "^3.2.0", "fs-extra": "^9.0.1", diff --git a/tools/eslint-plugin-cdk/package.json b/tools/eslint-plugin-cdk/package.json index 8391a7f314311..0b06b895cfbba 100644 --- a/tools/eslint-plugin-cdk/package.json +++ b/tools/eslint-plugin-cdk/package.json @@ -15,7 +15,7 @@ "@types/eslint": "^7.2.5", "@types/fs-extra": "^8.1.1", "@types/jest": "^26.0.15", - "@types/node": "^10.17.45", + "@types/node": "^10.17.46", "eslint-plugin-rulesdir": "^0.1.0", "jest": "^26.6.3", "typescript": "~3.9.7" diff --git a/tools/nodeunit-shim/package.json b/tools/nodeunit-shim/package.json index 0f8aafa7afa8f..e644c259dc2a8 100644 --- a/tools/nodeunit-shim/package.json +++ b/tools/nodeunit-shim/package.json @@ -13,7 +13,7 @@ }, "devDependencies": { "@types/jest": "^26.0.15", - "@types/node": "^10.17.45", + "@types/node": "^10.17.46", "typescript": "~3.9.7" }, "dependencies": { diff --git a/tools/yarn-cling/package.json b/tools/yarn-cling/package.json index c78320196da57..596f283475b46 100644 --- a/tools/yarn-cling/package.json +++ b/tools/yarn-cling/package.json @@ -39,7 +39,7 @@ }, "devDependencies": { "@types/jest": "^26.0.15", - "@types/node": "^10.17.45", + "@types/node": "^10.17.46", "@types/yarnpkg__lockfile": "^1.1.4", "jest": "^26.6.3", "pkglint": "0.0.0", diff --git a/yarn.lock b/yarn.lock index 2d423caa5a51f..da239de687d07 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1661,10 +1661,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.2.tgz#2de1ed6670439387da1c9f549a2ade2b0a799256" integrity sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA== -"@types/node@^10.17.45": - version "10.17.45" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.45.tgz#62876db8db680f20f6114b9ae5683d74577d0c13" - integrity sha512-a+oe0zGtwRsSDynACia/z1e4gKPNnDhAV3G6GWY6ZNCzaujNCdKC7dE2JFkGHAlUhCRHgXNmWbh417bi9dEXBw== +"@types/node@^10.17.46": + version "10.17.46" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.46.tgz#1cd867ebfe9957ab45951f2f715f8de5f3dab7a3" + integrity sha512-Tice8a+sJtlP9C1EUo0DYyjq52T37b3LexVu3p871+kfIBIN+OQ7PKPei1oF3MgF39olEpUfxaLtD+QFc1k69Q== "@types/nodeunit@^0.0.31": version "0.0.31" From 2bcbc5fae51094c01f0f42990dc4a522f9371669 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 20 Nov 2020 11:59:21 +0000 Subject: [PATCH 191/314] chore(deps): bump archiver from 5.0.2 to 5.1.0 (#11601) Bumps [archiver](https://github.com/archiverjs/node-archiver) from 5.0.2 to 5.1.0. - [Release notes](https://github.com/archiverjs/node-archiver/releases) - [Changelog](https://github.com/archiverjs/node-archiver/blob/master/CHANGELOG.md) - [Commits](https://github.com/archiverjs/node-archiver/compare/5.0.2...5.1.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- yarn.lock | 65 +++++++++++++++++++------------- 3 files changed, 40 insertions(+), 29 deletions(-) diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 0544c1a89f25f..60e66a428c274 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -70,7 +70,7 @@ "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", - "archiver": "^5.0.2", + "archiver": "^5.1.0", "aws-sdk": "^2.796.0", "camelcase": "^6.2.0", "cdk-assets": "0.0.0", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index 0dac4a4051c23..fee2c8fefe920 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -46,7 +46,7 @@ "dependencies": { "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cx-api": "0.0.0", - "archiver": "^5.0.2", + "archiver": "^5.1.0", "aws-sdk": "^2.796.0", "glob": "^7.1.6", "yargs": "^16.1.1" diff --git a/yarn.lock b/yarn.lock index da239de687d07..3c5022ac54aa7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2097,10 +2097,10 @@ archiver-utils@^2.1.0: normalize-path "^3.0.0" readable-stream "^2.0.0" -archiver@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/archiver/-/archiver-5.0.2.tgz#b2c435823499b1f46eb07aa18e7bcb332f6ca3fc" - integrity sha512-Tq3yV/T4wxBsD2Wign8W9VQKhaUxzzRmjEiSoOK0SLqPgDP/N1TKdYyBeIEu56T4I9iO4fKTTR0mN9NWkBA0sg== +archiver@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/archiver/-/archiver-5.1.0.tgz#05b0f6f7836f3e6356a0532763d2bb91017a7e37" + integrity sha512-iKuQUP1nuKzBC2PFlGet5twENzCfyODmvkxwDV0cEFXavwcLrIW5ssTuHi9dyTPvpWr6Faweo2eQaQiLIwyXTA== dependencies: archiver-utils "^2.1.0" async "^3.2.0" @@ -2108,7 +2108,7 @@ archiver@^5.0.2: readable-stream "^3.6.0" readdir-glob "^1.0.0" tar-stream "^2.1.4" - zip-stream "^4.0.0" + zip-stream "^4.0.4" archy@^1.0.0: version "1.0.0" @@ -2515,7 +2515,7 @@ buffer@4.9.2: ieee754 "^1.1.4" isarray "^1.0.0" -buffer@^5.1.0, buffer@^5.5.0: +buffer@^5.5.0: version "5.6.0" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.6.0.tgz#a31749dc7d81d84db08abf937b6b8c4033f62786" integrity sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw== @@ -2958,13 +2958,13 @@ component-emitter@^1.2.1: resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== -compress-commons@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/compress-commons/-/compress-commons-4.0.1.tgz#c5fa908a791a0c71329fba211d73cd2a32005ea8" - integrity sha512-xZm9o6iikekkI0GnXCmAl3LQGZj5TBDj0zLowsqi7tJtEa3FMGSEcHcqrSJIrOAk1UG/NBbDn/F1q+MG/p/EsA== +compress-commons@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/compress-commons/-/compress-commons-4.0.2.tgz#d6896be386e52f37610cef9e6fa5defc58c31bd7" + integrity sha512-qhd32a9xgzmpfoga1VQEiLEwdKZ6Plnpx5UCgIsf89FSolyJ7WnifY4Gtjgv5WR6hWAyRaHxC5MiEhU/38U70A== dependencies: buffer-crc32 "^0.2.13" - crc32-stream "^4.0.0" + crc32-stream "^4.0.1" normalize-path "^3.0.0" readable-stream "^3.6.0" @@ -3429,20 +3429,21 @@ cp-file@^6.2.0: pify "^4.0.1" safe-buffer "^5.0.1" -crc32-stream@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/crc32-stream/-/crc32-stream-4.0.0.tgz#05b7ca047d831e98c215538666f372b756d91893" - integrity sha512-tyMw2IeUX6t9jhgXI6um0eKfWq4EIDpfv5m7GX4Jzp7eVelQ360xd8EPXJhp2mHwLQIkqlnMLjzqSZI3a+0wRw== +crc-32@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.0.tgz#cb2db6e29b88508e32d9dd0ec1693e7b41a18208" + integrity sha512-1uBwHxF+Y/4yF5G48fwnKq6QsIXheor3ZLPT80yGBV1oEUwpPojlEhQbWKVw1VwcTQyMGHK1/XMmTjmlsmTTGA== dependencies: - crc "^3.4.4" - readable-stream "^3.4.0" + exit-on-epipe "~1.0.1" + printj "~1.1.0" -crc@^3.4.4: - version "3.8.0" - resolved "https://registry.yarnpkg.com/crc/-/crc-3.8.0.tgz#ad60269c2c856f8c299e2c4cc0de4556914056c6" - integrity sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ== +crc32-stream@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/crc32-stream/-/crc32-stream-4.0.1.tgz#0f047d74041737f8a55e86837a1b826bd8ab0067" + integrity sha512-FN5V+weeO/8JaXsamelVYO1PHyeCsuL3HcG4cqsj0ceARcocxalaShCsohZMSAF+db7UYFwBy1rARK/0oFItUw== dependencies: - buffer "^5.1.0" + crc-32 "^1.2.0" + readable-stream "^3.4.0" cross-spawn@^4: version "4.0.2" @@ -4276,6 +4277,11 @@ execa@^4.0.0: signal-exit "^3.0.2" strip-final-newline "^2.0.0" +exit-on-epipe@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz#0bdd92e87d5285d267daa8171d0eb06159689692" + integrity sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw== + exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" @@ -8071,6 +8077,11 @@ pretty-format@^26.6.2: ansi-styles "^4.0.0" react-is "^17.0.1" +printj@~1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/printj/-/printj-1.1.2.tgz#d90deb2975a8b9f600fb3a1c94e3f4c53c78a222" + integrity sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ== + process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" @@ -10563,11 +10574,11 @@ yn@3.1.1: resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== -zip-stream@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/zip-stream/-/zip-stream-4.0.2.tgz#3a20f1bd7729c2b59fd4efa04df5eb7a5a217d2e" - integrity sha512-TGxB2g+1ur6MHkvM644DuZr8Uzyz0k0OYWtS3YlpfWBEmK4woaC2t3+pozEL3dBfIPmpgmClR5B2QRcMgGt22g== +zip-stream@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/zip-stream/-/zip-stream-4.0.4.tgz#3a8f100b73afaa7d1ae9338d910b321dec77ff3a" + integrity sha512-a65wQ3h5gcQ/nQGWV1mSZCEzCML6EK/vyVPcrPNynySP1j3VBbQKh3nhC8CbORb+jfl2vXvh56Ul5odP1bAHqw== dependencies: archiver-utils "^2.1.0" - compress-commons "^4.0.0" + compress-commons "^4.0.2" readable-stream "^3.6.0" From 0f6e2daa248aed9300f5b6c3019cdcb168ee4951 Mon Sep 17 00:00:00 2001 From: Thorsten Hoeger Date: Fri, 20 Nov 2020 20:34:09 +0100 Subject: [PATCH 192/314] feat(ecs): allow HTTPS connections from LB to task (#11381) If you need or want to encrypt traffic between the load balancer and the ECS task you need to set the protocol of the target group to `HTTPS`. This PR adds a new property to specify this. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-ecs-patterns/README.md | 2 + .../application-load-balanced-service-base.ts | 15 ++++++-- .../test.load-balanced-fargate-service.ts | 37 +++++++++++++++++++ 3 files changed, 51 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/aws-ecs-patterns/README.md b/packages/@aws-cdk/aws-ecs-patterns/README.md index 57905649401cd..df15fed648e21 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/README.md +++ b/packages/@aws-cdk/aws-ecs-patterns/README.md @@ -68,6 +68,8 @@ By setting `redirectHTTP` to true, CDK will automatically create a listener on p If you specify the option `recordType` you can decide if you want the construct to use CNAME or Route53-Aliases as record sets. +If you need to encrypt the traffic between the load balancer and the ECS tasks, you can set the `targetProtocol` to `HTTPS`. + Additionally, if more than one application target group are needed, instantiate one of the following: * `ApplicationMultipleTargetGroupsEc2Service` diff --git a/packages/@aws-cdk/aws-ecs-patterns/lib/base/application-load-balanced-service-base.ts b/packages/@aws-cdk/aws-ecs-patterns/lib/base/application-load-balanced-service-base.ts index 24e2aa98fd430..e9dd04e494b82 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/lib/base/application-load-balanced-service-base.ts +++ b/packages/@aws-cdk/aws-ecs-patterns/lib/base/application-load-balanced-service-base.ts @@ -3,7 +3,7 @@ import { IVpc } from '@aws-cdk/aws-ec2'; import { AwsLogDriver, BaseService, CloudMapOptions, Cluster, ContainerImage, ICluster, LogDriver, PropagatedTagSource, Secret } from '@aws-cdk/aws-ecs'; import { ApplicationListener, ApplicationLoadBalancer, ApplicationProtocol, ApplicationTargetGroup, - IApplicationLoadBalancer, ListenerCertificate, ListenerAction, + IApplicationLoadBalancer, ListenerCertificate, ListenerAction, AddApplicationTargetsProps, } from '@aws-cdk/aws-elasticloadbalancingv2'; import { IRole } from '@aws-cdk/aws-iam'; import { ARecord, IHostedZone, RecordTarget, CnameRecord } from '@aws-cdk/aws-route53'; @@ -88,6 +88,15 @@ export interface ApplicationLoadBalancedServiceBaseProps { */ readonly certificate?: ICertificate; + /** + * The protocol for connections from the load balancer to the ECS tasks. + * The default target port is determined from the protocol (port 80 for + * HTTP, port 443 for HTTPS). + * + * @default HTTP. + */ + readonly targetProtocol?: ApplicationProtocol; + /** * The protocol for connections from clients to the load balancer. * The load balancer port is determined from the protocol (port 80 for @@ -369,8 +378,8 @@ export abstract class ApplicationLoadBalancedServiceBase extends cdk.Construct { throw new Error('The HTTPS protocol must be used when redirecting HTTP traffic'); } - const targetProps = { - port: 80, + const targetProps: AddApplicationTargetsProps = { + protocol: props.targetProtocol ?? ApplicationProtocol.HTTP, }; this.listener = loadBalancer.addListener('PublicListener', { diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/test.load-balanced-fargate-service.ts b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/test.load-balanced-fargate-service.ts index 4c8152482ed06..0f6be905dca30 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/test.load-balanced-fargate-service.ts +++ b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/test.load-balanced-fargate-service.ts @@ -229,6 +229,43 @@ export = { test.done(); }, + 'target group uses HTTP/80 as default'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + new ecsPatterns.ApplicationLoadBalancedFargateService(stack, 'Service', { + taskImageOptions: { + image: ecs.ContainerImage.fromRegistry('/aws/aws-example-app'), + }, + }); + // THEN + expect(stack).to(haveResourceLike('AWS::ElasticLoadBalancingV2::TargetGroup', { + Port: 80, + Protocol: 'HTTP', + })); + test.done(); + }, + + 'target group uses HTTPS/443 when configured'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + new ecsPatterns.ApplicationLoadBalancedFargateService(stack, 'Service', { + taskImageOptions: { + image: ecs.ContainerImage.fromRegistry('/aws/aws-example-app'), + }, + targetProtocol: ApplicationProtocol.HTTPS, + }); + // THEN + expect(stack).to(haveResourceLike('AWS::ElasticLoadBalancingV2::TargetGroup', { + Port: 443, + Protocol: 'HTTPS', + })); + test.done(); + }, + 'setting platform version'(test: Test) { // GIVEN const stack = new cdk.Stack(); From d7ca5ca0fb714a716a269ecb2c69b85824253136 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 20 Nov 2020 20:25:27 +0000 Subject: [PATCH 193/314] chore(deps): bump aws-sdk from 2.796.0 to 2.797.0 (#11608) Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.796.0 to 2.797.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.796.0...v2.797.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/aws-cloudfront-origins/package.json | 2 +- packages/@aws-cdk/aws-cloudfront/package.json | 2 +- packages/@aws-cdk/aws-cloudtrail/package.json | 2 +- packages/@aws-cdk/aws-codebuild/package.json | 2 +- packages/@aws-cdk/aws-codecommit/package.json | 2 +- packages/@aws-cdk/aws-dynamodb/package.json | 2 +- packages/@aws-cdk/aws-eks/package.json | 2 +- packages/@aws-cdk/aws-events-targets/package.json | 2 +- packages/@aws-cdk/aws-logs/package.json | 2 +- packages/@aws-cdk/aws-route53/package.json | 2 +- packages/@aws-cdk/aws-sqs/package.json | 2 +- packages/@aws-cdk/custom-resources/package.json | 2 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- yarn.lock | 8 ++++---- 15 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudfront-origins/package.json b/packages/@aws-cdk/aws-cloudfront-origins/package.json index 03a86d7bfcdc4..2779d3a346793 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/package.json +++ b/packages/@aws-cdk/aws-cloudfront-origins/package.json @@ -72,7 +72,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", - "aws-sdk": "^2.796.0", + "aws-sdk": "^2.797.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "pkglint": "0.0.0" diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index 45fc518b680ab..476ce54a485e4 100644 --- a/packages/@aws-cdk/aws-cloudfront/package.json +++ b/packages/@aws-cdk/aws-cloudfront/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.796.0", + "aws-sdk": "^2.797.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index dac003f519a86..d883f2738bf40 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.796.0", + "aws-sdk": "^2.797.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codebuild/package.json b/packages/@aws-cdk/aws-codebuild/package.json index 1c7ff7ae66cd3..d04badec906c3 100644 --- a/packages/@aws-cdk/aws-codebuild/package.json +++ b/packages/@aws-cdk/aws-codebuild/package.json @@ -79,7 +79,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.796.0", + "aws-sdk": "^2.797.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codecommit/package.json b/packages/@aws-cdk/aws-codecommit/package.json index 91535cbe1d0db..fd677d3171bc3 100644 --- a/packages/@aws-cdk/aws-codecommit/package.json +++ b/packages/@aws-cdk/aws-codecommit/package.json @@ -79,7 +79,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.796.0", + "aws-sdk": "^2.797.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index 4e25631705353..5c8d0a1017fcf 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -74,7 +74,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/jest": "^26.0.15", - "aws-sdk": "^2.796.0", + "aws-sdk": "^2.797.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index de72904f30a5e..463004a2e64a3 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", "@types/yaml": "1.9.6", - "aws-sdk": "^2.796.0", + "aws-sdk": "^2.797.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index 43ea2417f9248..9fb4b5f08f94b 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -75,7 +75,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-codecommit": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", - "aws-sdk": "^2.796.0", + "aws-sdk": "^2.797.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index e790a8dc18569..c122c403a7c82 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.796.0", + "aws-sdk": "^2.797.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-route53/package.json b/packages/@aws-cdk/aws-route53/package.json index 590fe7c856c38..2c39b8814966c 100644 --- a/packages/@aws-cdk/aws-route53/package.json +++ b/packages/@aws-cdk/aws-route53/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.796.0", + "aws-sdk": "^2.797.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-sqs/package.json b/packages/@aws-cdk/aws-sqs/package.json index b05e3fac22649..972fe57198cc7 100644 --- a/packages/@aws-cdk/aws-sqs/package.json +++ b/packages/@aws-cdk/aws-sqs/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.796.0", + "aws-sdk": "^2.797.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index 93bccead04a81..e7f1206f606f7 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -79,7 +79,7 @@ "@types/aws-lambda": "^8.10.64", "@types/fs-extra": "^8.1.1", "@types/sinon": "^9.0.8", - "aws-sdk": "^2.796.0", + "aws-sdk": "^2.797.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 60e66a428c274..a79504918a893 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -71,7 +71,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "archiver": "^5.1.0", - "aws-sdk": "^2.796.0", + "aws-sdk": "^2.797.0", "camelcase": "^6.2.0", "cdk-assets": "0.0.0", "colors": "^1.4.0", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index fee2c8fefe920..fe9ac39d422e0 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -47,7 +47,7 @@ "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "archiver": "^5.1.0", - "aws-sdk": "^2.796.0", + "aws-sdk": "^2.797.0", "glob": "^7.1.6", "yargs": "^16.1.1" }, diff --git a/yarn.lock b/yarn.lock index 3c5022ac54aa7..122b5b0c73dca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2294,10 +2294,10 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" -aws-sdk@^2.637.0, aws-sdk@^2.796.0: - version "2.796.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.796.0.tgz#56aa4e894162c54804abd7f0afa6ca22264ae557" - integrity sha512-200ic1PfRhcoLqQJkdHuZx5Utd+FFPTHEFwFvAU6zKXkKTe4P+ZfSETkoLCqsN8ks61mvXevzeHviJt89BLGbw== +aws-sdk@^2.637.0, aws-sdk@^2.797.0: + version "2.797.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.797.0.tgz#e9510a582606a580e7bbb686f01da28476599a2d" + integrity sha512-fFc/2Xr7NkSXlZ9+2rCOFovA9NO1OnIyEaJFVwMM9gaqzucwRAfNNT0Pa1Kua5dhWrcf/mX0Z4mCDnTBf0/5mA== dependencies: buffer "4.9.2" events "1.1.1" From e0c95fd2bc0f7e0812be4b4a331abf61b68f9b9f Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Mon, 23 Nov 2020 11:17:07 +0000 Subject: [PATCH 194/314] chore(lambda-nodejs): test to not use version '0.0.0' (#11628) The version '0.0.0' is a placeholder version on the `master` branch. This version changes to the actual correct version on release branches, and fails the unit test in this package. Update the test so that it doesn't look for 0.0.0. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts b/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts index e807997df749c..dc81c331239a0 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts @@ -90,13 +90,14 @@ describe('exec', () => { describe('extractDependencies', () => { test('with depencies referenced in package.json', () => { - expect(extractDependencies( + const deps = extractDependencies( path.join(__dirname, '../package.json'), ['@aws-cdk/aws-lambda', '@aws-cdk/core'], - )).toEqual({ - '@aws-cdk/aws-lambda': '0.0.0', - '@aws-cdk/core': '0.0.0', - }); + ); + expect(Object.keys(deps)).toEqual([ + '@aws-cdk/aws-lambda', + '@aws-cdk/core', + ]); }); test('with unknown dependency', () => { From 47811ef139bc84a01ca5f59522ad37341753f807 Mon Sep 17 00:00:00 2001 From: Jonathan Goldwasser Date: Mon, 23 Nov 2020 14:20:23 +0100 Subject: [PATCH 195/314] chore(lambda-nodejs): improve node modules versions extraction (#11548) Lookup the version in the `package.json` and then fallback to requiring the module's `package.json`. This allows to mark transitive dependencies as externals and install them. See https://github.com/aws/aws-cdk/pull/11289#discussion_r520081244 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-lambda-nodejs/lib/util.ts | 14 ++++++++++---- .../@aws-cdk/aws-lambda-nodejs/test/util.test.ts | 14 ++++++++++++-- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda-nodejs/lib/util.ts b/packages/@aws-cdk/aws-lambda-nodejs/lib/util.ts index 0ee96aa53f74c..afc370fcb200c 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/lib/util.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/lib/util.ts @@ -92,7 +92,10 @@ export function exec(cmd: string, args: string[], options?: SpawnSyncOptions) { } /** - * Extract dependencies from a package.json + * Extract versions for a list of modules. + * + * First lookup the version in the package.json and then fallback to requiring + * the module's package.json. The fallback is needed for transitive dependencies. */ export function extractDependencies(pkgPath: string, modules: string[]): { [key: string]: string } { const dependencies: { [key: string]: string } = {}; @@ -107,10 +110,13 @@ export function extractDependencies(pkgPath: string, modules: string[]): { [key: }; for (const mod of modules) { - if (!pkgDependencies[mod]) { - throw new Error(`Cannot extract version for module '${mod}' in package.json`); + try { + // eslint-disable-next-line @typescript-eslint/no-require-imports + const version = pkgDependencies[mod] ?? require(`${mod}/package.json`).version; + dependencies[mod] = version; + } catch (err) { + throw new Error(`Cannot extract version for module '${mod}'. Check that it's referenced in your package.json or installed.`); } - dependencies[mod] = pkgDependencies[mod]; } return dependencies; diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts b/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts index dc81c331239a0..6319008d9f2ec 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts @@ -89,7 +89,7 @@ describe('exec', () => { }); describe('extractDependencies', () => { - test('with depencies referenced in package.json', () => { + test('with dependencies referenced in package.json', () => { const deps = extractDependencies( path.join(__dirname, '../package.json'), ['@aws-cdk/aws-lambda', '@aws-cdk/core'], @@ -100,11 +100,21 @@ describe('extractDependencies', () => { ]); }); + test('with transitive dependencies', () => { + expect(extractDependencies( + path.join(__dirname, '../package.json'), + ['typescript'], + )).toEqual({ + // eslint-disable-next-line @typescript-eslint/no-require-imports, import/no-extraneous-dependencies + typescript: require('typescript/package.json').version, + }); + }); + test('with unknown dependency', () => { expect(() => extractDependencies( path.join(__dirname, '../package.json'), ['unknown'], - )).toThrow(/Cannot extract version for module 'unknown' in package.json/); + )).toThrow(/Cannot extract version for module 'unknown'/); }); }); From 9c5000dc3e0a750f43ffa620b3bef60c694387fc Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Mon, 23 Nov 2020 17:17:34 +0100 Subject: [PATCH 196/314] refactor(core): introduce cached lazies (#11253) `Lazy.stringValue()` used to be strictly uncached; however, this has an extremely negative impact on synthesis performance when token resolution is performed many times and complex operations are being performed in Lazies, such as JSONification (see #11250 for context). 99% of the time, the value calculated by a Lazy does not actually need to be recalculated, and the value can simply be cached. Right now, we have no API to indicate whether or not caching on the return value is okay. Although it should *probably* be fine to switch the default behavior of `Lazy.stringValue()` to be cached, it's still a little risky. This PR introduces new methods to construct lazies: * `Lazy.string()`/`Lazy.uncachedString()`. * `Lazy.number()`/`Lazy.uncachedNumber()`. * `Lazy.list()`/`Lazy.uncachedList()`. * `Lazy.any()`/`Lazy.uncachedAny()`. Which replace the existing `Lazy.xxxValue()`. New method names were chosen instead of an additional option for readability: the syntactic structure of how `Lazy.stringValue()` is usually used makes adding a `{ cached: true }` options block to the end of every existing call site rather visually noisy. Plus, deprecating the existing method and replacing it with new ones forces current usage sites to think clearly about whether or not their current use is cacheable or not. The *very* computationally heavy implemention of `toJsonString()` should be changed to be cacheable, but has not been done yet in this PR. This PR simply introduces the concept of cacheable vs uncacheable tokens. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-amplify/lib/app.ts | 6 +- packages/@aws-cdk/aws-amplify/lib/branch.ts | 2 +- packages/@aws-cdk/aws-amplify/lib/domain.ts | 2 +- .../aws-apigateway/lib/authorizers/lambda.ts | 2 +- .../@aws-cdk/aws-apigateway/lib/deployment.ts | 4 +- .../aws-apigateway/lib/integration.ts | 2 +- .../aws-apigateway/lib/integrations/aws.ts | 2 +- .../aws-apigateway/lib/integrations/lambda.ts | 2 +- .../@aws-cdk/aws-apigateway/lib/usage-plan.ts | 2 +- .../@aws-cdk/aws-apigateway/lib/vpc-link.ts | 4 +- .../aws-apigateway/test/deployment.test.ts | 2 +- .../aws-apigateway/test/stage.test.ts | 2 +- .../lib/scalable-target.ts | 2 +- .../lib/step-scaling-action.ts | 2 +- .../test/test.scalable-target.ts | 4 +- packages/@aws-cdk/aws-appmesh/lib/mesh.ts | 2 +- packages/@aws-cdk/aws-appmesh/lib/route.ts | 2 +- .../@aws-cdk/aws-appmesh/lib/virtual-node.ts | 6 +- .../aws-appmesh/lib/virtual-router.ts | 2 +- .../aws-appmesh/lib/virtual-service.ts | 2 +- packages/@aws-cdk/aws-appsync/lib/schema.ts | 2 +- .../aws-autoscaling/lib/auto-scaling-group.ts | 10 +- .../lib/step-scaling-action.ts | 2 +- .../test/auto-scaling-group.test.ts | 6 +- packages/@aws-cdk/aws-backup/lib/plan.ts | 2 +- packages/@aws-cdk/aws-backup/lib/selection.ts | 6 +- .../lib/dns-validated-certificate.ts | 2 +- .../test/certificate.test.ts | 4 +- .../aws-cloudformation/lib/custom-resource.ts | 2 +- .../aws-cloudfront/lib/distribution.ts | 6 +- packages/@aws-cdk/aws-cloudwatch/lib/alarm.ts | 6 +- .../aws-cloudwatch/lib/composite-alarm.ts | 8 +- .../@aws-cdk/aws-cloudwatch/lib/dashboard.ts | 2 +- .../@aws-cdk/aws-codebuild/lib/build-spec.ts | 2 +- .../@aws-cdk/aws-codebuild/lib/project.ts | 10 +- .../@aws-cdk/aws-codecommit/lib/repository.ts | 2 +- .../lib/lambda/deployment-group.ts | 8 +- .../lib/server/deployment-group.ts | 6 +- .../lib/profiling-group.ts | 2 +- .../aws-codepipeline-actions/lib/action.ts | 2 +- .../lib/codebuild/build-action.ts | 2 +- .../lib/codedeploy/ecs-deploy-action.ts | 6 +- .../test.codecommit-source-action.ts | 4 +- .../test/lambda/test.lambda-invoke-action.ts | 2 +- .../test/s3/test.s3-source-action.ts | 4 +- .../@aws-cdk/aws-codepipeline/lib/artifact.ts | 6 +- .../@aws-cdk/aws-codepipeline/lib/pipeline.ts | 6 +- .../aws-codepipeline/lib/private/stage.ts | 4 +- .../test/fake-source-action.ts | 2 +- .../@aws-cdk/aws-cognito/lib/user-pool.ts | 2 +- .../@aws-cdk/aws-config/lib/managed-rules.ts | 2 +- packages/@aws-cdk/aws-config/lib/rule.ts | 4 +- packages/@aws-cdk/aws-dynamodb/lib/table.ts | 12 +- packages/@aws-cdk/aws-ec2/lib/instance.ts | 6 +- .../@aws-cdk/aws-ec2/lib/security-group.ts | 4 +- packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts | 6 +- packages/@aws-cdk/aws-ec2/lib/vpc.ts | 2 +- .../aws-ec2/test/security-group.test.ts | 8 +- .../aws-ec2/test/vpc.from-lookup.test.ts | 2 +- packages/@aws-cdk/aws-ec2/test/vpc.test.ts | 2 +- .../aws-ecr-assets/test/image-asset.test.ts | 4 +- packages/@aws-cdk/aws-ecr/lib/repository.ts | 4 +- .../@aws-cdk/aws-ecs/lib/base/base-service.ts | 10 +- .../aws-ecs/lib/base/task-definition.ts | 8 +- .../aws-ecs/lib/container-definition.ts | 12 +- .../@aws-cdk/aws-ecs/lib/ec2/ec2-service.ts | 4 +- .../@aws-cdk/aws-ecs/lib/linux-parameters.ts | 8 +- .../fargate/test.fargate-task-definition.ts | 4 +- .../@aws-cdk/aws-eks-legacy/lib/aws-auth.ts | 6 +- packages/@aws-cdk/aws-eks/lib/aws-auth.ts | 6 +- .../@aws-cdk/aws-eks/lib/cluster-resource.ts | 4 +- .../@aws-cdk/aws-eks/lib/fargate-profile.ts | 2 +- .../lib/load-balancer.ts | 2 +- .../lib/alb/application-listener-rule.ts | 4 +- .../lib/alb/application-listener.ts | 2 +- .../lib/alb/application-load-balancer.ts | 2 +- .../lib/shared/base-listener.ts | 2 +- .../lib/shared/base-load-balancer.ts | 2 +- .../lib/shared/base-target-group.ts | 26 +- .../@aws-cdk/aws-elasticsearch/lib/domain.ts | 2 +- packages/@aws-cdk/aws-events/lib/event-bus.ts | 2 +- packages/@aws-cdk/aws-events/lib/input.ts | 2 +- packages/@aws-cdk/aws-events/lib/rule.ts | 4 +- .../@aws-cdk/aws-events/test/test.input.ts | 2 +- .../lib/endpoint-group.ts | 2 +- packages/@aws-cdk/aws-iam/lib/group.ts | 2 +- .../@aws-cdk/aws-iam/lib/managed-policy.ts | 2 +- packages/@aws-cdk/aws-iam/lib/policy.ts | 2 +- packages/@aws-cdk/aws-iam/lib/role.ts | 2 +- packages/@aws-cdk/aws-iam/lib/user.ts | 2 +- packages/@aws-cdk/aws-iam/lib/util.ts | 2 +- .../aws-iam/test/cross-account.test.ts | 2 +- .../aws-iam/test/policy-document.test.ts | 16 +- .../aws-iam/test/role.from-role-arn.test.ts | 2 +- .../test/test.kinesis.ts | 2 +- packages/@aws-cdk/aws-lambda/lib/function.ts | 10 +- .../@aws-cdk/aws-lambda/lib/lambda-version.ts | 2 +- .../@aws-cdk/aws-lambda/test/alias.test.ts | 2 +- .../test/event-source-mapping.test.ts | 4 +- .../aws-logs/lib/cross-account-destination.ts | 4 +- packages/@aws-cdk/aws-rds/lib/instance.ts | 6 +- packages/@aws-cdk/aws-rds/lib/option-group.ts | 2 +- .../@aws-cdk/aws-rds/lib/parameter-group.ts | 4 +- .../@aws-cdk/aws-route53/lib/hosted-zone.ts | 2 +- packages/@aws-cdk/aws-s3/lib/bucket.ts | 10 +- .../notifications-resource.ts | 2 +- packages/@aws-cdk/aws-s3/test/bucket.test.ts | 2 +- packages/@aws-cdk/aws-ses/lib/receipt-rule.ts | 2 +- .../@aws-cdk/aws-ssm/test/test.parameter.ts | 4 +- .../lib/ecs/run-ecs-task-base.ts | 4 +- .../lib/ecs/run-task.ts | 2 +- .../lib/sagemaker/create-model.ts | 2 +- .../lib/sagemaker/create-training-job.ts | 2 +- .../aws-stepfunctions/lib/activity.ts | 2 +- .../@aws-cdk/aws-synthetics/lib/canary.ts | 2 +- .../aws-synthetics/test/canary.test.ts | 2 +- packages/@aws-cdk/core/lib/cfn-element.ts | 2 +- packages/@aws-cdk/core/lib/cfn-parse.ts | 4 +- packages/@aws-cdk/core/lib/lazy.ts | 274 +++++++++++++++--- packages/@aws-cdk/core/lib/nested-stack.ts | 5 +- .../core/lib/private/cfn-reference.ts | 2 +- .../core/lib/private/metadata-resource.ts | 2 +- packages/@aws-cdk/core/lib/resource.ts | 4 +- packages/@aws-cdk/core/lib/token.ts | 2 +- packages/@aws-cdk/core/test/cfn-json.test.ts | 4 +- .../core/test/cloudformation-json.test.ts | 32 +- packages/@aws-cdk/core/test/construct.test.ts | 2 +- packages/@aws-cdk/core/test/duration.test.ts | 2 +- .../private/physical-name-generator.test.ts | 2 +- .../core/test/private/tree-metadata.test.ts | 4 +- packages/@aws-cdk/core/test/stack.test.ts | 2 +- packages/@aws-cdk/core/test/tokens.test.ts | 57 +++- .../lib/actions/publish-assets-action.ts | 2 +- packages/decdk/lib/declarative-stack.ts | 2 +- 134 files changed, 573 insertions(+), 293 deletions(-) diff --git a/packages/@aws-cdk/aws-amplify/lib/app.ts b/packages/@aws-cdk/aws-amplify/lib/app.ts index e2b4d4085eae5..8e7217a59cc58 100644 --- a/packages/@aws-cdk/aws-amplify/lib/app.ts +++ b/packages/@aws-cdk/aws-amplify/lib/app.ts @@ -219,7 +219,7 @@ export class App extends Resource implements IApp, iam.IGrantable { buildSpec: props.autoBranchCreation.buildSpec && props.autoBranchCreation.buildSpec.toBuildSpec(), enableAutoBranchCreation: true, enableAutoBuild: props.autoBranchCreation.autoBuild === undefined ? true : props.autoBranchCreation.autoBuild, - environmentVariables: Lazy.anyValue({ produce: () => renderEnvironmentVariables(this.autoBranchEnvironmentVariables ) }, { omitEmptyArray: true }), // eslint-disable-line max-len + environmentVariables: Lazy.any({ produce: () => renderEnvironmentVariables(this.autoBranchEnvironmentVariables ) }, { omitEmptyArray: true }), // eslint-disable-line max-len enablePullRequestPreview: props.autoBranchCreation.pullRequestPreview === undefined ? true : props.autoBranchCreation.pullRequestPreview, pullRequestEnvironmentName: props.autoBranchCreation.pullRequestEnvironmentName, stage: props.autoBranchCreation.stage, @@ -227,9 +227,9 @@ export class App extends Resource implements IApp, iam.IGrantable { enableBranchAutoDeletion: props.autoBranchDeletion, basicAuthConfig: props.basicAuth && props.basicAuth.bind(this, 'AppBasicAuth'), buildSpec: props.buildSpec && props.buildSpec.toBuildSpec(), - customRules: Lazy.anyValue({ produce: () => this.customRules }, { omitEmptyArray: true }), + customRules: Lazy.any({ produce: () => this.customRules }, { omitEmptyArray: true }), description: props.description, - environmentVariables: Lazy.anyValue({ produce: () => renderEnvironmentVariables(this.environmentVariables) }, { omitEmptyArray: true }), + environmentVariables: Lazy.any({ produce: () => renderEnvironmentVariables(this.environmentVariables) }, { omitEmptyArray: true }), iamServiceRole: role.roleArn, name: props.appName || this.node.id, oauthToken: sourceCodeProviderOptions?.oauthToken?.toString(), diff --git a/packages/@aws-cdk/aws-amplify/lib/branch.ts b/packages/@aws-cdk/aws-amplify/lib/branch.ts index 31434b929e391..e26fe6c4d46a2 100644 --- a/packages/@aws-cdk/aws-amplify/lib/branch.ts +++ b/packages/@aws-cdk/aws-amplify/lib/branch.ts @@ -141,7 +141,7 @@ export class Branch extends Resource implements IBranch { description: props.description, enableAutoBuild: props.autoBuild === undefined ? true : props.autoBuild, enablePullRequestPreview: props.pullRequestPreview === undefined ? true : props.pullRequestPreview, - environmentVariables: Lazy.anyValue({ produce: () => renderEnvironmentVariables(this.environmentVariables) }, { omitEmptyArray: true }), + environmentVariables: Lazy.any({ produce: () => renderEnvironmentVariables(this.environmentVariables) }, { omitEmptyArray: true }), pullRequestEnvironmentName: props.pullRequestEnvironmentName, stage: props.stage, }); diff --git a/packages/@aws-cdk/aws-amplify/lib/domain.ts b/packages/@aws-cdk/aws-amplify/lib/domain.ts index c8bb702f9b414..b657ebdefb247 100644 --- a/packages/@aws-cdk/aws-amplify/lib/domain.ts +++ b/packages/@aws-cdk/aws-amplify/lib/domain.ts @@ -105,7 +105,7 @@ export class Domain extends Resource { const domain = new CfnDomain(this, 'Resource', { appId: props.app.appId, domainName, - subDomainSettings: Lazy.anyValue({ produce: () => this.renderSubDomainSettings() }, { omitEmptyArray: true }), + subDomainSettings: Lazy.any({ produce: () => this.renderSubDomainSettings() }, { omitEmptyArray: true }), }); this.arn = domain.attrArn; diff --git a/packages/@aws-cdk/aws-apigateway/lib/authorizers/lambda.ts b/packages/@aws-cdk/aws-apigateway/lib/authorizers/lambda.ts index 82f7696fe2fa2..a354c8a4b3196 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/authorizers/lambda.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/authorizers/lambda.ts @@ -118,7 +118,7 @@ abstract class LambdaAuthorizer extends Authorizer implements IAuthorizer { * Throws an error, during token resolution, if no RestApi is attached to this authorizer. */ protected lazyRestApiId() { - return Lazy.stringValue({ + return Lazy.string({ produce: () => { if (!this.restApiId) { throw new Error(`Authorizer (${this.node.path}) must be attached to a RestApi`); diff --git a/packages/@aws-cdk/aws-apigateway/lib/deployment.ts b/packages/@aws-cdk/aws-apigateway/lib/deployment.ts index 877af8df471b3..a286e978fdafb 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/deployment.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/deployment.ts @@ -78,7 +78,7 @@ export class Deployment extends Resource { } this.api = props.api; - this.deploymentId = Lazy.stringValue({ produce: () => this.resource.ref }); + this.deploymentId = Lazy.string({ produce: () => this.resource.ref }); if (props.api instanceof RestApiBase) { props.api._attachDeployment(this); @@ -141,7 +141,7 @@ class LatestDeploymentResource extends CfnDeployment { this.api = props.restApi; this.originalLogicalId = this.stack.getLogicalId(this); - this.overrideLogicalId(Lazy.stringValue({ produce: () => this.calculateLogicalId() })); + this.overrideLogicalId(Lazy.uncachedString({ produce: () => this.calculateLogicalId() })); } /** diff --git a/packages/@aws-cdk/aws-apigateway/lib/integration.ts b/packages/@aws-cdk/aws-apigateway/lib/integration.ts index 9d08a02b57bc2..475358d672540 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/integration.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/integration.ts @@ -204,7 +204,7 @@ export class Integration { const options = this.props.options; if (options?.connectionType === ConnectionType.VPC_LINK && uri === undefined) { - uri = Lazy.stringValue({ + uri = Lazy.string({ // needs to be a lazy since the targets can be added to the VpcLink construct after initialization. produce: () => { const vpcLink = options.vpcLink; diff --git a/packages/@aws-cdk/aws-apigateway/lib/integrations/aws.ts b/packages/@aws-cdk/aws-apigateway/lib/integrations/aws.ts index 2960d9c9431d8..6374bb404902a 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/integrations/aws.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/integrations/aws.ts @@ -78,7 +78,7 @@ export class AwsIntegration extends Integration { super({ type, integrationHttpMethod: props.integrationHttpMethod || 'POST', - uri: cdk.Lazy.stringValue({ + uri: cdk.Lazy.string({ produce: () => { if (!this.scope) { throw new Error('AwsIntegration must be used in API'); } return cdk.Stack.of(this.scope).formatArn({ diff --git a/packages/@aws-cdk/aws-apigateway/lib/integrations/lambda.ts b/packages/@aws-cdk/aws-apigateway/lib/integrations/lambda.ts index 895b36323f1d7..399484510f343 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/integrations/lambda.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/integrations/lambda.ts @@ -63,7 +63,7 @@ export class LambdaIntegration extends AwsIntegration { this.handler.addPermission(`ApiPermission.${desc}`, { principal, scope: method, - sourceArn: Lazy.stringValue({ produce: () => method.methodArn }), + sourceArn: Lazy.string({ produce: () => method.methodArn }), }); // add permission to invoke from the console diff --git a/packages/@aws-cdk/aws-apigateway/lib/usage-plan.ts b/packages/@aws-cdk/aws-apigateway/lib/usage-plan.ts index e39efd410fe80..ad807d4a7d2d0 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/usage-plan.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/usage-plan.ts @@ -156,7 +156,7 @@ export class UsagePlan extends Resource { let resource: CfnUsagePlan; resource = new CfnUsagePlan(this, 'Resource', { - apiStages: Lazy.anyValue({ produce: () => this.renderApiStages(this.apiStages) }), + apiStages: Lazy.any({ produce: () => this.renderApiStages(this.apiStages) }), description: props.description, quota: this.renderQuota(props), throttle: this.renderThrottle(props.throttle), diff --git a/packages/@aws-cdk/aws-apigateway/lib/vpc-link.ts b/packages/@aws-cdk/aws-apigateway/lib/vpc-link.ts index dc7576b22961c..f7d137f2c9e1a 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/vpc-link.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/vpc-link.ts @@ -66,13 +66,13 @@ export class VpcLink extends Resource implements IVpcLink { constructor(scope: Construct, id: string, props: VpcLinkProps = {}) { super(scope, id, { physicalName: props.vpcLinkName || - Lazy.stringValue({ produce: () => Names.nodeUniqueId(this.node) }), + Lazy.string({ produce: () => Names.nodeUniqueId(this.node) }), }); const cfnResource = new CfnVpcLink(this, 'Resource', { name: this.physicalName, description: props.description, - targetArns: Lazy.listValue({ produce: () => this.renderTargets() }), + targetArns: Lazy.list({ produce: () => this.renderTargets() }), }); this.vpcLinkId = cfnResource.ref; diff --git a/packages/@aws-cdk/aws-apigateway/test/deployment.test.ts b/packages/@aws-cdk/aws-apigateway/test/deployment.test.ts index 77f8b887eae57..55e5ab8859734 100644 --- a/packages/@aws-cdk/aws-apigateway/test/deployment.test.ts +++ b/packages/@aws-cdk/aws-apigateway/test/deployment.test.ts @@ -147,7 +147,7 @@ describe('deployment', () => { // tokens supported, and are resolved upon synthesis const value = 'hello hello'; - deployment.addToLogicalId({ foo: Lazy.stringValue({ produce: () => value }) }); + deployment.addToLogicalId({ foo: Lazy.string({ produce: () => value }) }); const template2 = synthesize(); expect(template2.Resources.deployment333819758d91bed959c6bd6268ba84f6d33e888e).toBeDefined(); diff --git a/packages/@aws-cdk/aws-apigateway/test/stage.test.ts b/packages/@aws-cdk/aws-apigateway/test/stage.test.ts index 1584850913deb..a2575edbaa07b 100644 --- a/packages/@aws-cdk/aws-apigateway/test/stage.test.ts +++ b/packages/@aws-cdk/aws-apigateway/test/stage.test.ts @@ -319,7 +319,7 @@ describe('stage', () => { // WHEN const testLogGroup = new logs.LogGroup(stack, 'LogGroup'); - const testFormat = apigateway.AccessLogFormat.custom(cdk.Lazy.stringValue({ produce: () => 'test' })); + const testFormat = apigateway.AccessLogFormat.custom(cdk.Lazy.string({ produce: () => 'test' })); // THEN expect(() => new apigateway.Stage(stack, 'my-stage', { diff --git a/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts b/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts index 9549ff5c6598c..60ab5b3bbaede 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts +++ b/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts @@ -125,7 +125,7 @@ export class ScalableTarget extends Resource implements IScalableTarget { resourceId: props.resourceId, roleArn: this.role.roleArn, scalableDimension: props.scalableDimension, - scheduledActions: Lazy.anyValue({ produce: () => this.actions }, { omitEmptyArray: true }), + scheduledActions: Lazy.any({ produce: () => this.actions }, { omitEmptyArray: true }), serviceNamespace: props.serviceNamespace, }); diff --git a/packages/@aws-cdk/aws-applicationautoscaling/lib/step-scaling-action.ts b/packages/@aws-cdk/aws-applicationautoscaling/lib/step-scaling-action.ts index 95242ed9e8cdf..4cb7aa2328ebc 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/lib/step-scaling-action.ts +++ b/packages/@aws-cdk/aws-applicationautoscaling/lib/step-scaling-action.ts @@ -90,7 +90,7 @@ export class StepScalingAction extends cdk.Construct { cooldown: props.cooldown && props.cooldown.toSeconds(), minAdjustmentMagnitude: props.minAdjustmentMagnitude, metricAggregationType: props.metricAggregationType, - stepAdjustments: cdk.Lazy.anyValue({ produce: () => this.adjustments }), + stepAdjustments: cdk.Lazy.any({ produce: () => this.adjustments }), } as CfnScalingPolicy.StepScalingPolicyConfigurationProperty, }); diff --git a/packages/@aws-cdk/aws-applicationautoscaling/test/test.scalable-target.ts b/packages/@aws-cdk/aws-applicationautoscaling/test/test.scalable-target.ts index c042f305994d1..68622c2f60181 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/test/test.scalable-target.ts +++ b/packages/@aws-cdk/aws-applicationautoscaling/test/test.scalable-target.ts @@ -40,8 +40,8 @@ export = { serviceNamespace: appscaling.ServiceNamespace.DYNAMODB, scalableDimension: 'test:TestCount', resourceId: 'test:this/test', - minCapacity: cdk.Lazy.numberValue({ produce: () => 10 }), - maxCapacity: cdk.Lazy.numberValue({ produce: () => 1 }), + minCapacity: cdk.Lazy.number({ produce: () => 10 }), + maxCapacity: cdk.Lazy.number({ produce: () => 1 }), }); // THEN: no exception diff --git a/packages/@aws-cdk/aws-appmesh/lib/mesh.ts b/packages/@aws-cdk/aws-appmesh/lib/mesh.ts index 869d2198fdd0c..cc0596695aae2 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/mesh.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/mesh.ts @@ -186,7 +186,7 @@ export class Mesh extends MeshBase { constructor(scope: Construct, id: string, props: MeshProps = {}) { super(scope, id, { - physicalName: props.meshName || cdk.Lazy.stringValue({ produce: () => cdk.Names.uniqueId(this) }), + physicalName: props.meshName || cdk.Lazy.string({ produce: () => cdk.Names.uniqueId(this) }), }); const mesh = new CfnMesh(this, 'Resource', { diff --git a/packages/@aws-cdk/aws-appmesh/lib/route.ts b/packages/@aws-cdk/aws-appmesh/lib/route.ts index f2fb9ab58232a..7b9bd2aeb94d2 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/route.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/route.ts @@ -110,7 +110,7 @@ export class Route extends cdk.Resource implements IRoute { constructor(scope: Construct, id: string, props: RouteProps) { super(scope, id, { - physicalName: props.routeName || cdk.Lazy.stringValue({ produce: () => cdk.Names.uniqueId(this) }), + physicalName: props.routeName || cdk.Lazy.string({ produce: () => cdk.Names.uniqueId(this) }), }); this.virtualRouter = props.virtualRouter; diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts index fd8b2cadc87db..e868ce69936c7 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts @@ -180,7 +180,7 @@ export class VirtualNode extends VirtualNodeBase { constructor(scope: Construct, id: string, props: VirtualNodeProps) { super(scope, id, { - physicalName: props.virtualNodeName || cdk.Lazy.stringValue({ produce: () => cdk.Names.uniqueId(this) }), + physicalName: props.virtualNodeName || cdk.Lazy.string({ produce: () => cdk.Names.uniqueId(this) }), }); this.mesh = props.mesh; @@ -193,8 +193,8 @@ export class VirtualNode extends VirtualNodeBase { virtualNodeName: this.physicalName, meshName: this.mesh.meshName, spec: { - backends: cdk.Lazy.anyValue({ produce: () => this.backends }, { omitEmptyArray: true }), - listeners: cdk.Lazy.anyValue({ produce: () => this.listeners.map(listener => listener.listener) }, { omitEmptyArray: true }), + backends: cdk.Lazy.any({ produce: () => this.backends }, { omitEmptyArray: true }), + listeners: cdk.Lazy.any({ produce: () => this.listeners.map(listener => listener.listener) }, { omitEmptyArray: true }), serviceDiscovery: { dns: props.dnsHostName !== undefined ? { hostname: props.dnsHostName } : undefined, awsCloudMap: props.cloudMapService !== undefined ? { diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-router.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-router.ts index 65c3921a844fd..b202c4c1ca3ae 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/virtual-router.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-router.ts @@ -141,7 +141,7 @@ export class VirtualRouter extends VirtualRouterBase { constructor(scope: Construct, id: string, props: VirtualRouterProps) { super(scope, id, { - physicalName: props.virtualRouterName || cdk.Lazy.stringValue({ produce: () => cdk.Names.uniqueId(this) }), + physicalName: props.virtualRouterName || cdk.Lazy.string({ produce: () => cdk.Names.uniqueId(this) }), }); this.mesh = props.mesh; diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-service.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-service.ts index 374d342040784..677eb96b3e4a8 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/virtual-service.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-service.ts @@ -123,7 +123,7 @@ export class VirtualService extends cdk.Resource implements IVirtualService { constructor(scope: Construct, id: string, props: VirtualServiceProps) { super(scope, id, { - physicalName: props.virtualServiceName || cdk.Lazy.stringValue({ produce: () => cdk.Names.uniqueId(this) }), + physicalName: props.virtualServiceName || cdk.Lazy.string({ produce: () => cdk.Names.uniqueId(this) }), }); if (props.virtualNode && props.virtualRouter) { diff --git a/packages/@aws-cdk/aws-appsync/lib/schema.ts b/packages/@aws-cdk/aws-appsync/lib/schema.ts index ec5bbfa14241d..3ab8a800d16fb 100644 --- a/packages/@aws-cdk/aws-appsync/lib/schema.ts +++ b/packages/@aws-cdk/aws-appsync/lib/schema.ts @@ -80,7 +80,7 @@ export class Schema { this.schema = new CfnGraphQLSchema(api, 'Schema', { apiId: api.apiId, definition: this.mode === SchemaMode.CODE ? - Lazy.stringValue({ + Lazy.string({ produce: () => this.types.reduce((acc, type) => { return `${acc}${type._bindToGraphqlApi(api).toString()}\n`; }, `${this.declareSchema()}${this.definition}`), }) diff --git a/packages/@aws-cdk/aws-autoscaling/lib/auto-scaling-group.ts b/packages/@aws-cdk/aws-autoscaling/lib/auto-scaling-group.ts index cf5f6acbcbf71..0d5dd3f147235 100644 --- a/packages/@aws-cdk/aws-autoscaling/lib/auto-scaling-group.ts +++ b/packages/@aws-cdk/aws-autoscaling/lib/auto-scaling-group.ts @@ -936,8 +936,8 @@ export class AutoScalingGroup extends AutoScalingGroupBase implements // use delayed evaluation const imageConfig = props.machineImage.getImage(this); this.userData = props.userData ?? imageConfig.userData; - const userDataToken = Lazy.stringValue({ produce: () => Fn.base64(this.userData.render()) }); - const securityGroupsToken = Lazy.listValue({ produce: () => this.securityGroups.map(sg => sg.securityGroupId) }); + const userDataToken = Lazy.string({ produce: () => Fn.base64(this.userData.render()) }); + const securityGroupsToken = Lazy.list({ produce: () => this.securityGroups.map(sg => sg.securityGroupId) }); const launchConfig = new CfnLaunchConfiguration(this, 'LaunchConfig', { imageId: imageConfig.imageId, @@ -1014,10 +1014,10 @@ export class AutoScalingGroup extends AutoScalingGroupBase implements maxSize: Tokenization.stringifyNumber(maxCapacity), desiredCapacity: desiredCapacity !== undefined ? Tokenization.stringifyNumber(desiredCapacity) : undefined, launchConfigurationName: launchConfig.ref, - loadBalancerNames: Lazy.listValue({ produce: () => this.loadBalancerNames }, { omitEmpty: true }), - targetGroupArns: Lazy.listValue({ produce: () => this.targetGroupArns }, { omitEmpty: true }), + loadBalancerNames: Lazy.list({ produce: () => this.loadBalancerNames }, { omitEmpty: true }), + targetGroupArns: Lazy.list({ produce: () => this.targetGroupArns }, { omitEmpty: true }), notificationConfigurations: this.renderNotificationConfiguration(), - metricsCollection: Lazy.anyValue({ produce: () => this.renderMetricsCollection() }), + metricsCollection: Lazy.any({ produce: () => this.renderMetricsCollection() }), vpcZoneIdentifier: subnetIds, healthCheckType: props.healthCheck && props.healthCheck.type, healthCheckGracePeriod: props.healthCheck && props.healthCheck.gracePeriod && props.healthCheck.gracePeriod.toSeconds(), diff --git a/packages/@aws-cdk/aws-autoscaling/lib/step-scaling-action.ts b/packages/@aws-cdk/aws-autoscaling/lib/step-scaling-action.ts index 76ba4685c0a38..9b9939d740d16 100644 --- a/packages/@aws-cdk/aws-autoscaling/lib/step-scaling-action.ts +++ b/packages/@aws-cdk/aws-autoscaling/lib/step-scaling-action.ts @@ -79,7 +79,7 @@ export class StepScalingAction extends CoreConstruct { adjustmentType: props.adjustmentType, minAdjustmentMagnitude: props.minAdjustmentMagnitude, metricAggregationType: props.metricAggregationType, - stepAdjustments: Lazy.anyValue({ produce: () => this.adjustments }), + stepAdjustments: Lazy.any({ produce: () => this.adjustments }), }); this.scalingPolicyArn = resource.ref; diff --git a/packages/@aws-cdk/aws-autoscaling/test/auto-scaling-group.test.ts b/packages/@aws-cdk/aws-autoscaling/test/auto-scaling-group.test.ts index 4e4e800828780..737566c369b76 100644 --- a/packages/@aws-cdk/aws-autoscaling/test/auto-scaling-group.test.ts +++ b/packages/@aws-cdk/aws-autoscaling/test/auto-scaling-group.test.ts @@ -170,9 +170,9 @@ nodeunitShim({ instanceType: ec2.InstanceType.of(ec2.InstanceClass.M4, ec2.InstanceSize.MICRO), machineImage: new ec2.AmazonLinuxImage(), vpc, - minCapacity: cdk.Lazy.numberValue({ produce: () => 5 }), - maxCapacity: cdk.Lazy.numberValue({ produce: () => 1 }), - desiredCapacity: cdk.Lazy.numberValue({ produce: () => 20 }), + minCapacity: cdk.Lazy.number({ produce: () => 5 }), + maxCapacity: cdk.Lazy.number({ produce: () => 1 }), + desiredCapacity: cdk.Lazy.number({ produce: () => 20 }), }); // THEN: no exception diff --git a/packages/@aws-cdk/aws-backup/lib/plan.ts b/packages/@aws-cdk/aws-backup/lib/plan.ts index 3476b56817dc1..70240e778969b 100644 --- a/packages/@aws-cdk/aws-backup/lib/plan.ts +++ b/packages/@aws-cdk/aws-backup/lib/plan.ts @@ -125,7 +125,7 @@ export class BackupPlan extends Resource implements IBackupPlan { const plan = new CfnBackupPlan(this, 'Resource', { backupPlan: { backupPlanName: props.backupPlanName || id, - backupPlanRule: Lazy.anyValue({ produce: () => this.rules }, { omitEmptyArray: true }), + backupPlanRule: Lazy.any({ produce: () => this.rules }, { omitEmptyArray: true }), }, }); diff --git a/packages/@aws-cdk/aws-backup/lib/selection.ts b/packages/@aws-cdk/aws-backup/lib/selection.ts index fb3278ec42404..401af8314b6e1 100644 --- a/packages/@aws-cdk/aws-backup/lib/selection.ts +++ b/packages/@aws-cdk/aws-backup/lib/selection.ts @@ -96,10 +96,10 @@ export class BackupSelection extends Resource implements iam.IGrantable { backupSelection: { iamRoleArn: role.roleArn, selectionName: props.backupSelectionName || this.node.id, - listOfTags: Lazy.anyValue({ + listOfTags: Lazy.any({ produce: () => this.listOfTags, }, { omitEmptyArray: true }), - resources: Lazy.listValue({ + resources: Lazy.list({ produce: () => [...this.resources, ...this.backupableResourcesCollector.resources], }, { omitEmpty: true }), }, @@ -130,7 +130,7 @@ export class BackupSelection extends Resource implements iam.IGrantable { Aspects.of(resource.construct).add(this.backupableResourcesCollector); // Cannot push `this.backupableResourcesCollector.resources` to // `this.resources` here because it has not been evaluated yet. - // Will be concatenated to `this.resources` in a `Lazy.listValue` + // Will be concatenated to `this.resources` in a `Lazy.list` // in the constructor instead. } } diff --git a/packages/@aws-cdk/aws-certificatemanager/lib/dns-validated-certificate.ts b/packages/@aws-cdk/aws-certificatemanager/lib/dns-validated-certificate.ts index 655361ba5b4b7..f1a5cd442e9d1 100644 --- a/packages/@aws-cdk/aws-certificatemanager/lib/dns-validated-certificate.ts +++ b/packages/@aws-cdk/aws-certificatemanager/lib/dns-validated-certificate.ts @@ -98,7 +98,7 @@ export class DnsValidatedCertificate extends cdk.Resource implements ICertificat serviceToken: requestorFunction.functionArn, properties: { DomainName: props.domainName, - SubjectAlternativeNames: cdk.Lazy.listValue({ produce: () => props.subjectAlternativeNames }, { omitEmpty: true }), + SubjectAlternativeNames: cdk.Lazy.list({ produce: () => props.subjectAlternativeNames }, { omitEmpty: true }), HostedZoneId: this.hostedZoneId, Region: props.region, Route53Endpoint: props.route53Endpoint, diff --git a/packages/@aws-cdk/aws-certificatemanager/test/certificate.test.ts b/packages/@aws-cdk/aws-certificatemanager/test/certificate.test.ts index 5bbeadf007f1e..ab43a486ae7d1 100644 --- a/packages/@aws-cdk/aws-certificatemanager/test/certificate.test.ts +++ b/packages/@aws-cdk/aws-certificatemanager/test/certificate.test.ts @@ -66,7 +66,7 @@ test('needs validation domain supplied if domain contains a token', () => { const stack = new Stack(); expect(() => { - const domainName = Lazy.stringValue({ produce: () => 'example.com' }); + const domainName = Lazy.string({ produce: () => 'example.com' }); new Certificate(stack, 'Certificate', { domainName, }); @@ -76,7 +76,7 @@ test('needs validation domain supplied if domain contains a token', () => { test('validationdomains can be given for a Token', () => { const stack = new Stack(); - const domainName = Lazy.stringValue({ produce: () => 'my.example.com' }); + const domainName = Lazy.string({ produce: () => 'my.example.com' }); new Certificate(stack, 'Certificate', { domainName, validationDomains: { diff --git a/packages/@aws-cdk/aws-cloudformation/lib/custom-resource.ts b/packages/@aws-cdk/aws-cloudformation/lib/custom-resource.ts index 6db44400cfa89..93ac7d4b9913a 100644 --- a/packages/@aws-cdk/aws-cloudformation/lib/custom-resource.ts +++ b/packages/@aws-cdk/aws-cloudformation/lib/custom-resource.ts @@ -157,7 +157,7 @@ export class CustomResource extends core.CustomResource { properties: props.properties, removalPolicy: props.removalPolicy, resourceType: props.resourceType, - serviceToken: core.Lazy.stringValue({ produce: () => props.provider.bind(this).serviceToken }), + serviceToken: core.Lazy.string({ produce: () => props.provider.bind(this).serviceToken }), }); } } diff --git a/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts b/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts index b3c9db91d700c..0eacc04f44cc7 100644 --- a/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts +++ b/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts @@ -277,11 +277,11 @@ export class Distribution extends Resource implements IDistribution { const distribution = new CfnDistribution(this, 'Resource', { distributionConfig: { enabled: props.enabled ?? true, - origins: Lazy.anyValue({ produce: () => this.renderOrigins() }), - originGroups: Lazy.anyValue({ produce: () => this.renderOriginGroups() }), + origins: Lazy.any({ produce: () => this.renderOrigins() }), + originGroups: Lazy.any({ produce: () => this.renderOriginGroups() }), defaultCacheBehavior: this.defaultBehavior._renderBehavior(), aliases: props.domainNames, - cacheBehaviors: Lazy.anyValue({ produce: () => this.renderCacheBehaviors() }), + cacheBehaviors: Lazy.any({ produce: () => this.renderCacheBehaviors() }), comment: props.comment, customErrorResponses: this.renderErrorResponses(), defaultRootObject: props.defaultRootObject, diff --git a/packages/@aws-cdk/aws-cloudwatch/lib/alarm.ts b/packages/@aws-cdk/aws-cloudwatch/lib/alarm.ts index ae8fd29424786..5c1daacb54dd3 100644 --- a/packages/@aws-cdk/aws-cloudwatch/lib/alarm.ts +++ b/packages/@aws-cdk/aws-cloudwatch/lib/alarm.ts @@ -179,9 +179,9 @@ export class Alarm extends AlarmBase { // Actions actionsEnabled: props.actionsEnabled, - alarmActions: Lazy.listValue({ produce: () => this.alarmActionArns }), - insufficientDataActions: Lazy.listValue({ produce: (() => this.insufficientDataActionArns) }), - okActions: Lazy.listValue({ produce: () => this.okActionArns }), + alarmActions: Lazy.list({ produce: () => this.alarmActionArns }), + insufficientDataActions: Lazy.list({ produce: (() => this.insufficientDataActionArns) }), + okActions: Lazy.list({ produce: () => this.okActionArns }), // Metric ...metricProps, diff --git a/packages/@aws-cdk/aws-cloudwatch/lib/composite-alarm.ts b/packages/@aws-cdk/aws-cloudwatch/lib/composite-alarm.ts index 8d625ee16f7f6..8b9d61c99ea82 100644 --- a/packages/@aws-cdk/aws-cloudwatch/lib/composite-alarm.ts +++ b/packages/@aws-cdk/aws-cloudwatch/lib/composite-alarm.ts @@ -91,7 +91,7 @@ export class CompositeAlarm extends AlarmBase { constructor(scope: Construct, id: string, props: CompositeAlarmProps) { super(scope, id, { - physicalName: props.compositeAlarmName ?? Lazy.stringValue({ produce: () => this.generateUniqueId() }), + physicalName: props.compositeAlarmName ?? Lazy.string({ produce: () => this.generateUniqueId() }), }); if (props.alarmRule.renderAlarmRule().length > 10240) { @@ -105,9 +105,9 @@ export class CompositeAlarm extends AlarmBase { alarmRule: this.alarmRule, alarmDescription: props.alarmDescription, actionsEnabled: props.actionsEnabled, - alarmActions: Lazy.listValue({ produce: () => this.alarmActionArns }), - insufficientDataActions: Lazy.listValue({ produce: (() => this.insufficientDataActionArns) }), - okActions: Lazy.listValue({ produce: () => this.okActionArns }), + alarmActions: Lazy.list({ produce: () => this.alarmActionArns }), + insufficientDataActions: Lazy.list({ produce: (() => this.insufficientDataActionArns) }), + okActions: Lazy.list({ produce: () => this.okActionArns }), }); this.alarmName = this.getResourceNameAttribute(alarm.ref); diff --git a/packages/@aws-cdk/aws-cloudwatch/lib/dashboard.ts b/packages/@aws-cdk/aws-cloudwatch/lib/dashboard.ts index f4a17d634f32f..91813d592463c 100644 --- a/packages/@aws-cdk/aws-cloudwatch/lib/dashboard.ts +++ b/packages/@aws-cdk/aws-cloudwatch/lib/dashboard.ts @@ -94,7 +94,7 @@ export class Dashboard extends Resource { new CfnDashboard(this, 'Resource', { dashboardName: this.physicalName, - dashboardBody: Lazy.stringValue({ + dashboardBody: Lazy.string({ produce: () => { const column = new Column(...this.rows); column.position(0, 0); diff --git a/packages/@aws-cdk/aws-codebuild/lib/build-spec.ts b/packages/@aws-cdk/aws-codebuild/lib/build-spec.ts index 7f9236319d7bb..5f33babced96a 100644 --- a/packages/@aws-cdk/aws-codebuild/lib/build-spec.ts +++ b/packages/@aws-cdk/aws-codebuild/lib/build-spec.ts @@ -63,7 +63,7 @@ class ObjectBuildSpec extends BuildSpec { public toBuildSpec(): string { // We have to pretty-print the buildspec, otherwise // CodeBuild will not recognize it as an inline buildspec. - return Lazy.stringValue({ + return Lazy.uncachedString({ produce: (ctx: IResolveContext) => Stack.of(ctx.scope).toJsonString(this.spec, 2), }); diff --git a/packages/@aws-cdk/aws-codebuild/lib/project.ts b/packages/@aws-cdk/aws-codebuild/lib/project.ts index 8973dc8f5ea04..7810c82287f4c 100644 --- a/packages/@aws-cdk/aws-codebuild/lib/project.ts +++ b/packages/@aws-cdk/aws-codebuild/lib/project.ts @@ -764,18 +764,18 @@ export class Project extends ProjectBase { artifacts: artifactsConfig.artifactsProperty, serviceRole: this.role.roleArn, environment: this.renderEnvironment(props.environment, environmentVariables), - fileSystemLocations: Lazy.anyValue({ produce: () => this.renderFileSystemLocations() }), + fileSystemLocations: Lazy.any({ produce: () => this.renderFileSystemLocations() }), // lazy, because we have a setter for it in setEncryptionKey // The 'alias/aws/s3' default is necessary because leaving the `encryptionKey` field // empty will not remove existing encryptionKeys during an update (ref. t/D17810523) - encryptionKey: Lazy.stringValue({ produce: () => this._encryptionKey ? this._encryptionKey.keyArn : 'alias/aws/s3' }), + encryptionKey: Lazy.string({ produce: () => this._encryptionKey ? this._encryptionKey.keyArn : 'alias/aws/s3' }), badgeEnabled: props.badge, cache: cache._toCloudFormation(), name: this.physicalName, timeoutInMinutes: props.timeout && props.timeout.toMinutes(), - secondarySources: Lazy.anyValue({ produce: () => this.renderSecondarySources() }), - secondarySourceVersions: Lazy.anyValue({ produce: () => this.renderSecondarySourceVersions() }), - secondaryArtifacts: Lazy.anyValue({ produce: () => this.renderSecondaryArtifacts() }), + secondarySources: Lazy.any({ produce: () => this.renderSecondarySources() }), + secondarySourceVersions: Lazy.any({ produce: () => this.renderSecondarySourceVersions() }), + secondaryArtifacts: Lazy.any({ produce: () => this.renderSecondaryArtifacts() }), triggers: sourceConfig.buildTriggers, sourceVersion: sourceConfig.sourceVersion, vpcConfig: this.configureVpc(props), diff --git a/packages/@aws-cdk/aws-codecommit/lib/repository.ts b/packages/@aws-cdk/aws-codecommit/lib/repository.ts index 7345d669ed763..dbb4d3064c9e9 100644 --- a/packages/@aws-cdk/aws-codecommit/lib/repository.ts +++ b/packages/@aws-cdk/aws-codecommit/lib/repository.ts @@ -335,7 +335,7 @@ export class Repository extends RepositoryBase { this.repository = new CfnRepository(this, 'Resource', { repositoryName: props.repositoryName, repositoryDescription: props.description, - triggers: Lazy.anyValue({ produce: () => this.triggers }, { omitEmptyArray: true }), + triggers: Lazy.any({ produce: () => this.triggers }, { omitEmptyArray: true }), }); this.repositoryName = this.getResourceNameAttribute(this.repository.attrName); diff --git a/packages/@aws-cdk/aws-codedeploy/lib/lambda/deployment-group.ts b/packages/@aws-cdk/aws-codedeploy/lib/lambda/deployment-group.ts index c8b8152356091..0d6c6a347886a 100644 --- a/packages/@aws-cdk/aws-codedeploy/lib/lambda/deployment-group.ts +++ b/packages/@aws-cdk/aws-codedeploy/lib/lambda/deployment-group.ts @@ -170,8 +170,8 @@ export class LambdaDeploymentGroup extends cdk.Resource implements ILambdaDeploy deploymentType: 'BLUE_GREEN', deploymentOption: 'WITH_TRAFFIC_CONTROL', }, - alarmConfiguration: cdk.Lazy.anyValue({ produce: () => renderAlarmConfiguration(this.alarms, props.ignorePollAlarmsFailure) }), - autoRollbackConfiguration: cdk.Lazy.anyValue({ produce: () => renderAutoRollbackConfiguration(this.alarms, props.autoRollback) }), + alarmConfiguration: cdk.Lazy.any({ produce: () => renderAlarmConfiguration(this.alarms, props.ignorePollAlarmsFailure) }), + autoRollbackConfiguration: cdk.Lazy.any({ produce: () => renderAutoRollbackConfiguration(this.alarms, props.autoRollback) }), }); this.deploymentGroupName = this.getResourceNameAttribute(resource.ref); @@ -193,8 +193,8 @@ export class LambdaDeploymentGroup extends cdk.Resource implements ILambdaDeploy codeDeployLambdaAliasUpdate: { applicationName: this.application.applicationName, deploymentGroupName: resource.ref, - beforeAllowTrafficHook: cdk.Lazy.stringValue({ produce: () => this.preHook && this.preHook.functionName }), - afterAllowTrafficHook: cdk.Lazy.stringValue({ produce: () => this.postHook && this.postHook.functionName }), + beforeAllowTrafficHook: cdk.Lazy.string({ produce: () => this.preHook && this.preHook.functionName }), + afterAllowTrafficHook: cdk.Lazy.string({ produce: () => this.postHook && this.postHook.functionName }), }, }; diff --git a/packages/@aws-cdk/aws-codedeploy/lib/server/deployment-group.ts b/packages/@aws-cdk/aws-codedeploy/lib/server/deployment-group.ts index 9a3d912bb1e0d..eb4bbafade216 100644 --- a/packages/@aws-cdk/aws-codedeploy/lib/server/deployment-group.ts +++ b/packages/@aws-cdk/aws-codedeploy/lib/server/deployment-group.ts @@ -291,7 +291,7 @@ export class ServerDeploymentGroup extends ServerDeploymentGroupBase { serviceRoleArn: this.role.roleArn, deploymentConfigName: props.deploymentConfig && props.deploymentConfig.deploymentConfigName, - autoScalingGroups: cdk.Lazy.listValue({ produce: () => this._autoScalingGroups.map(asg => asg.autoScalingGroupName) }, { omitEmpty: true }), + autoScalingGroups: cdk.Lazy.list({ produce: () => this._autoScalingGroups.map(asg => asg.autoScalingGroupName) }, { omitEmpty: true }), loadBalancerInfo: this.loadBalancerInfo(props.loadBalancer), deploymentStyle: props.loadBalancer === undefined ? undefined @@ -300,8 +300,8 @@ export class ServerDeploymentGroup extends ServerDeploymentGroupBase { }, ec2TagSet: this.ec2TagSet(props.ec2InstanceTags), onPremisesTagSet: this.onPremiseTagSet(props.onPremiseInstanceTags), - alarmConfiguration: cdk.Lazy.anyValue({ produce: () => renderAlarmConfiguration(this.alarms, props.ignorePollAlarmsFailure) }), - autoRollbackConfiguration: cdk.Lazy.anyValue({ produce: () => renderAutoRollbackConfiguration(this.alarms, props.autoRollback) }), + alarmConfiguration: cdk.Lazy.any({ produce: () => renderAlarmConfiguration(this.alarms, props.ignorePollAlarmsFailure) }), + autoRollbackConfiguration: cdk.Lazy.any({ produce: () => renderAutoRollbackConfiguration(this.alarms, props.autoRollback) }), }); this.deploymentGroupName = this.getResourceNameAttribute(resource.ref); diff --git a/packages/@aws-cdk/aws-codeguruprofiler/lib/profiling-group.ts b/packages/@aws-cdk/aws-codeguruprofiler/lib/profiling-group.ts index d47c994c283e4..0537b469c17d5 100644 --- a/packages/@aws-cdk/aws-codeguruprofiler/lib/profiling-group.ts +++ b/packages/@aws-cdk/aws-codeguruprofiler/lib/profiling-group.ts @@ -177,7 +177,7 @@ export class ProfilingGroup extends ProfilingGroupBase { constructor(scope: Construct, id: string, props: ProfilingGroupProps = {}) { super(scope, id, { - physicalName: props.profilingGroupName ?? Lazy.stringValue({ produce: () => this.generateUniqueId() }), + physicalName: props.profilingGroupName ?? Lazy.string({ produce: () => this.generateUniqueId() }), }); const profilingGroup = new CfnProfilingGroup(this, 'ProfilingGroup', { diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/action.ts index e14f3184011a0..b3ce90e2aa793 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/action.ts @@ -24,7 +24,7 @@ export abstract class Action implements codepipeline.IAction { protected constructor(actionProperties: codepipeline.ActionProperties) { this.customerProvidedNamespace = actionProperties.variablesNamespace; - this.namespaceOrToken = Lazy.stringValue({ + this.namespaceOrToken = Lazy.string({ produce: () => { // make sure the action was bound (= added to a pipeline) if (this.actualNamespace !== undefined) { diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/codebuild/build-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/codebuild/build-action.ts index 53d789b665262..cedc1db5ca90b 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/codebuild/build-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/codebuild/build-action.ts @@ -174,7 +174,7 @@ export class CodeBuildAction extends Action { }; if ((this.actionProperties.inputs || []).length > 1) { // lazy, because the Artifact name might be generated lazily - configuration.PrimarySource = cdk.Lazy.stringValue({ produce: () => this.props.input.artifactName }); + configuration.PrimarySource = cdk.Lazy.string({ produce: () => this.props.input.artifactName }); } return { configuration, diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/codedeploy/ecs-deploy-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/codedeploy/ecs-deploy-action.ts index 771a1b8e3e448..33bc07c148b1e 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/codedeploy/ecs-deploy-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/codedeploy/ecs-deploy-action.ts @@ -184,12 +184,12 @@ export class CodeDeployEcsDeployAction extends Action { ApplicationName: this.actionProps.deploymentGroup.application.applicationName, DeploymentGroupName: this.actionProps.deploymentGroup.deploymentGroupName, - TaskDefinitionTemplateArtifact: Lazy.stringValue({ produce: () => taskDefinitionTemplateArtifact.artifactName }), + TaskDefinitionTemplateArtifact: Lazy.string({ produce: () => taskDefinitionTemplateArtifact.artifactName }), TaskDefinitionTemplatePath: this.actionProps.taskDefinitionTemplateFile ? this.actionProps.taskDefinitionTemplateFile.fileName : 'taskdef.json', - AppSpecTemplateArtifact: Lazy.stringValue({ produce: () => appSpecTemplateArtifact.artifactName }), + AppSpecTemplateArtifact: Lazy.string({ produce: () => appSpecTemplateArtifact.artifactName }), AppSpecTemplatePath: this.actionProps.appSpecTemplateFile ? this.actionProps.appSpecTemplateFile.fileName : 'appspec.yaml', @@ -199,7 +199,7 @@ export class CodeDeployEcsDeployAction extends Action { if (this.actionProps.containerImageInputs) { for (let i = 1; i <= this.actionProps.containerImageInputs.length; i++) { const imageInput = this.actionProps.containerImageInputs[i - 1]; - actionConfig.configuration[`Image${i}ArtifactName`] = Lazy.stringValue({ produce: () => imageInput.input.artifactName }); + actionConfig.configuration[`Image${i}ArtifactName`] = Lazy.string({ produce: () => imageInput.input.artifactName }); actionConfig.configuration[`Image${i}ContainerName`] = imageInput.taskDefinitionPlaceholder ? imageInput.taskDefinitionPlaceholder : 'IMAGE'; diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/codecommit/test.codecommit-source-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/codecommit/test.codecommit-source-action.ts index 520af74ba8af2..9aa0ac65a72c9 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/codecommit/test.codecommit-source-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/codecommit/test.codecommit-source-action.ts @@ -240,7 +240,7 @@ export = { repository: new codecommit.Repository(stack, 'R', { repositoryName: 'repository', }), - branch: Lazy.stringValue({ produce: () => 'my-branch' }), + branch: Lazy.string({ produce: () => 'my-branch' }), output: sourceOutput, }), ], @@ -291,7 +291,7 @@ export = { repository: new codecommit.Repository(stack, 'R', { repositoryName: 'repository', }), - branch: Lazy.stringValue({ produce: () => 'my-branch' }), + branch: Lazy.string({ produce: () => 'my-branch' }), output: sourceOutput, eventRole: triggerEventTestRole, }); diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/lambda/test.lambda-invoke-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/lambda/test.lambda-invoke-action.ts index 84af1c50a7583..035d8ddb63a38 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/lambda/test.lambda-invoke-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/lambda/test.lambda-invoke-action.ts @@ -39,7 +39,7 @@ export = { 'properly resolves any Tokens passed in userParameters'(test: Test) { const stack = stackIncludingLambdaInvokeCodePipeline({ userParams: { - key: Lazy.stringValue({ produce: () => Aws.REGION }), + key: Lazy.string({ produce: () => Aws.REGION }), }, }); diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/s3/test.s3-source-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/s3/test.s3-source-action.ts index 6b9dc716961e5..fc069cffae6d3 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/s3/test.s3-source-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/s3/test.s3-source-action.ts @@ -182,13 +182,13 @@ export = { const bucket = new s3.Bucket(stack, 'MyBucket'); const sourceStage = minimalPipeline(stack, { bucket, - bucketKey: Lazy.stringValue({ produce: () => 'my-bucket-key1' }), + bucketKey: Lazy.string({ produce: () => 'my-bucket-key1' }), trigger: cpactions.S3Trigger.EVENTS, }); sourceStage.addAction(new cpactions.S3SourceAction({ actionName: 'Source2', bucket, - bucketKey: Lazy.stringValue({ produce: () => 'my-bucket-key2' }), + bucketKey: Lazy.string({ produce: () => 'my-bucket-key2' }), trigger: cpactions.S3Trigger.EVENTS, output: new codepipeline.Artifact(), })); diff --git a/packages/@aws-cdk/aws-codepipeline/lib/artifact.ts b/packages/@aws-cdk/aws-codepipeline/lib/artifact.ts index 487cc7c422189..5317676a5f0fe 100644 --- a/packages/@aws-cdk/aws-codepipeline/lib/artifact.ts +++ b/packages/@aws-cdk/aws-codepipeline/lib/artifact.ts @@ -132,17 +132,17 @@ export class ArtifactPath { public get location() { const artifactName = this.artifact.artifactName ? this.artifact.artifactName - : Lazy.stringValue({ produce: () => this.artifact.artifactName }); + : Lazy.string({ produce: () => this.artifact.artifactName }); return `${artifactName}::${this.fileName}`; } } function artifactAttribute(artifact: Artifact, attributeName: string) { - const lazyArtifactName = Lazy.stringValue({ produce: () => artifact.artifactName }); + const lazyArtifactName = Lazy.string({ produce: () => artifact.artifactName }); return Token.asString({ 'Fn::GetArtifactAtt': [lazyArtifactName, attributeName] }); } function artifactGetParam(artifact: Artifact, jsonFile: string, keyName: string) { - const lazyArtifactName = Lazy.stringValue({ produce: () => artifact.artifactName }); + const lazyArtifactName = Lazy.string({ produce: () => artifact.artifactName }); return Token.asString({ 'Fn::GetParam': [lazyArtifactName, jsonFile, keyName] }); } diff --git a/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts b/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts index e59de17b454b3..ba7fd8d87233d 100644 --- a/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts +++ b/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts @@ -283,9 +283,9 @@ export class Pipeline extends PipelineBase { }); const codePipeline = new CfnPipeline(this, 'Resource', { - artifactStore: Lazy.anyValue({ produce: () => this.renderArtifactStoreProperty() }), - artifactStores: Lazy.anyValue({ produce: () => this.renderArtifactStoresProperty() }), - stages: Lazy.anyValue({ produce: () => this.renderStages() }), + artifactStore: Lazy.any({ produce: () => this.renderArtifactStoreProperty() }), + artifactStores: Lazy.any({ produce: () => this.renderArtifactStoresProperty() }), + stages: Lazy.any({ produce: () => this.renderStages() }), roleArn: this.role.roleArn, restartExecutionOnUpdate: props && props.restartExecutionOnUpdate, name: this.physicalName, diff --git a/packages/@aws-cdk/aws-codepipeline/lib/private/stage.ts b/packages/@aws-cdk/aws-codepipeline/lib/private/stage.ts index a0f16972e1575..e9ed5a6995f02 100644 --- a/packages/@aws-cdk/aws-codepipeline/lib/private/stage.ts +++ b/packages/@aws-cdk/aws-codepipeline/lib/private/stage.ts @@ -142,8 +142,8 @@ export class Stage implements IStage { } private renderAction(action: FullActionDescriptor): CfnPipeline.ActionDeclarationProperty { - const outputArtifacts = cdk.Lazy.anyValue({ produce: () => this.renderArtifacts(action.outputs) }, { omitEmptyArray: true }); - const inputArtifacts = cdk.Lazy.anyValue({ produce: () => this.renderArtifacts(action.inputs) }, { omitEmptyArray: true }); + const outputArtifacts = cdk.Lazy.any({ produce: () => this.renderArtifacts(action.outputs) }, { omitEmptyArray: true }); + const inputArtifacts = cdk.Lazy.any({ produce: () => this.renderArtifacts(action.inputs) }, { omitEmptyArray: true }); return { name: action.actionName, inputArtifacts, diff --git a/packages/@aws-cdk/aws-codepipeline/test/fake-source-action.ts b/packages/@aws-cdk/aws-codepipeline/test/fake-source-action.ts index ab2f56471f1dd..8e8c2652caa9c 100644 --- a/packages/@aws-cdk/aws-codepipeline/test/fake-source-action.ts +++ b/packages/@aws-cdk/aws-codepipeline/test/fake-source-action.ts @@ -31,7 +31,7 @@ export class FakeSourceAction implements codepipeline.IAction { outputs: [props.output, ...props.extraOutputs || []], }; this.variables = { - firstVariable: Lazy.stringValue({ produce: () => `#{${this.actionProperties.variablesNamespace}.FirstVariable}` }), + firstVariable: Lazy.string({ produce: () => `#{${this.actionProperties.variablesNamespace}.FirstVariable}` }), }; } diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool.ts index 0e652fb2c0b76..3730c7c97a301 100644 --- a/packages/@aws-cdk/aws-cognito/lib/user-pool.ts +++ b/packages/@aws-cdk/aws-cognito/lib/user-pool.ts @@ -736,7 +736,7 @@ export class UserPool extends UserPoolBase { usernameAttributes: signIn.usernameAttrs, aliasAttributes: signIn.aliasAttrs, autoVerifiedAttributes: signIn.autoVerifyAttrs, - lambdaConfig: Lazy.anyValue({ produce: () => undefinedIfNoKeys(this.triggers) }), + lambdaConfig: Lazy.any({ produce: () => undefinedIfNoKeys(this.triggers) }), smsConfiguration: this.smsConfiguration(props), adminCreateUserConfig, emailVerificationMessage, diff --git a/packages/@aws-cdk/aws-config/lib/managed-rules.ts b/packages/@aws-cdk/aws-config/lib/managed-rules.ts index cfbe2645367c6..4bc7b7fa8c015 100644 --- a/packages/@aws-cdk/aws-config/lib/managed-rules.ts +++ b/packages/@aws-cdk/aws-config/lib/managed-rules.ts @@ -78,7 +78,7 @@ export class CloudFormationStackDriftDetectionCheck extends ManagedRule { ...props, identifier: ManagedRuleIdentifiers.CLOUDFORMATION_STACK_DRIFT_DETECTION_CHECK, inputParameters: { - cloudformationRoleArn: Lazy.stringValue({ produce: () => this.role.roleArn }), + cloudformationRoleArn: Lazy.string({ produce: () => this.role.roleArn }), }, }); diff --git a/packages/@aws-cdk/aws-config/lib/rule.ts b/packages/@aws-cdk/aws-config/lib/rule.ts index ac4044ac4ae99..2b6ad35d08859 100644 --- a/packages/@aws-cdk/aws-config/lib/rule.ts +++ b/packages/@aws-cdk/aws-config/lib/rule.ts @@ -265,7 +265,7 @@ export class ManagedRule extends RuleNew { description: props.description, inputParameters: props.inputParameters, maximumExecutionFrequency: props.maximumExecutionFrequency, - scope: Lazy.anyValue({ produce: () => renderScope(this.ruleScope) }), // scope can use values such as stack id (see CloudFormationStackDriftDetectionCheck) + scope: Lazy.any({ produce: () => renderScope(this.ruleScope) }), // scope can use values such as stack id (see CloudFormationStackDriftDetectionCheck) source: { owner: 'AWS', sourceIdentifier: props.identifier, @@ -371,7 +371,7 @@ export class CustomRule extends RuleNew { description: props.description, inputParameters: props.inputParameters, maximumExecutionFrequency: props.maximumExecutionFrequency, - scope: Lazy.anyValue({ produce: () => renderScope(this.ruleScope) }), // scope can use values such as stack id (see CloudFormationStackDriftDetectionCheck) + scope: Lazy.any({ produce: () => renderScope(this.ruleScope) }), // scope can use values such as stack id (see CloudFormationStackDriftDetectionCheck) source: { owner: 'CUSTOM_LAMBDA', sourceDetails, diff --git a/packages/@aws-cdk/aws-dynamodb/lib/table.ts b/packages/@aws-cdk/aws-dynamodb/lib/table.ts index f67175c62c5b9..780d240abbc55 100644 --- a/packages/@aws-cdk/aws-dynamodb/lib/table.ts +++ b/packages/@aws-cdk/aws-dynamodb/lib/table.ts @@ -558,9 +558,9 @@ abstract class TableBase extends Resource implements ITable { actions, resourceArns: [ this.tableArn, - Lazy.stringValue({ produce: () => this.hasIndex ? `${this.tableArn}/index/*` : Aws.NO_VALUE }), + Lazy.string({ produce: () => this.hasIndex ? `${this.tableArn}/index/*` : Aws.NO_VALUE }), ...this.regionalArns, - ...this.regionalArns.map(arn => Lazy.stringValue({ + ...this.regionalArns.map(arn => Lazy.string({ produce: () => this.hasIndex ? `${arn}/index/*` : Aws.NO_VALUE, })), ], @@ -873,9 +873,9 @@ abstract class TableBase extends Resource implements ITable { ): iam.Grant { if (opts.tableActions) { const resources = [this.tableArn, - Lazy.stringValue({ produce: () => this.hasIndex ? `${this.tableArn}/index/*` : Aws.NO_VALUE }), + Lazy.string({ produce: () => this.hasIndex ? `${this.tableArn}/index/*` : Aws.NO_VALUE }), ...this.regionalArns, - ...this.regionalArns.map(arn => Lazy.stringValue({ + ...this.regionalArns.map(arn => Lazy.string({ produce: () => this.hasIndex ? `${arn}/index/*` : Aws.NO_VALUE, }))]; const ret = iam.Grant.addToPrincipal({ @@ -1059,8 +1059,8 @@ export class Table extends TableBase { tableName: this.physicalName, keySchema: this.keySchema, attributeDefinitions: this.attributeDefinitions, - globalSecondaryIndexes: Lazy.anyValue({ produce: () => this.globalSecondaryIndexes }, { omitEmptyArray: true }), - localSecondaryIndexes: Lazy.anyValue({ produce: () => this.localSecondaryIndexes }, { omitEmptyArray: true }), + globalSecondaryIndexes: Lazy.any({ produce: () => this.globalSecondaryIndexes }, { omitEmptyArray: true }), + localSecondaryIndexes: Lazy.any({ produce: () => this.localSecondaryIndexes }, { omitEmptyArray: true }), pointInTimeRecoverySpecification: props.pointInTimeRecovery ? { pointInTimeRecoveryEnabled: props.pointInTimeRecovery } : undefined, billingMode: this.billingMode === BillingMode.PAY_PER_REQUEST ? this.billingMode : undefined, provisionedThroughput: this.billingMode === BillingMode.PAY_PER_REQUEST ? undefined : { diff --git a/packages/@aws-cdk/aws-ec2/lib/instance.ts b/packages/@aws-cdk/aws-ec2/lib/instance.ts index 07ada4670aa9a..a7e56280fa4dd 100644 --- a/packages/@aws-cdk/aws-ec2/lib/instance.ts +++ b/packages/@aws-cdk/aws-ec2/lib/instance.ts @@ -324,8 +324,8 @@ export class Instance extends Resource implements IInstance { // use delayed evaluation const imageConfig = props.machineImage.getImage(this); this.userData = props.userData ?? imageConfig.userData; - const userDataToken = Lazy.stringValue({ produce: () => Fn.base64(this.userData.render()) }); - const securityGroupsToken = Lazy.listValue({ produce: () => this.securityGroups.map(sg => sg.securityGroupId) }); + const userDataToken = Lazy.string({ produce: () => Fn.base64(this.userData.render()) }); + const securityGroupsToken = Lazy.list({ produce: () => this.securityGroups.map(sg => sg.securityGroupId) }); const { subnets } = props.vpc.selectSubnets(props.vpcSubnets); let subnet; @@ -385,7 +385,7 @@ export class Instance extends Resource implements IInstance { // Trigger replacement (via new logical ID) on user data change, if specified or cfn-init is being used. const originalLogicalId = Stack.of(this).getLogicalId(this.instance); - this.instance.overrideLogicalId(Lazy.stringValue({ + this.instance.overrideLogicalId(Lazy.uncachedString({ produce: () => { let logicalId = originalLogicalId; if (props.userDataCausesReplacement ?? props.initOptions) { diff --git a/packages/@aws-cdk/aws-ec2/lib/security-group.ts b/packages/@aws-cdk/aws-ec2/lib/security-group.ts index db733fcb816d4..62a0ceb19e0ca 100644 --- a/packages/@aws-cdk/aws-ec2/lib/security-group.ts +++ b/packages/@aws-cdk/aws-ec2/lib/security-group.ts @@ -395,8 +395,8 @@ export class SecurityGroup extends SecurityGroupBase { this.securityGroup = new CfnSecurityGroup(this, 'Resource', { groupName: this.physicalName, groupDescription, - securityGroupIngress: Lazy.anyValue({ produce: () => this.directIngressRules }, { omitEmptyArray: true } ), - securityGroupEgress: Lazy.anyValue({ produce: () => this.directEgressRules }, { omitEmptyArray: true } ), + securityGroupIngress: Lazy.any({ produce: () => this.directIngressRules }, { omitEmptyArray: true } ), + securityGroupEgress: Lazy.any({ produce: () => this.directEgressRules }, { omitEmptyArray: true } ), vpcId: props.vpc.vpcId, }); diff --git a/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts b/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts index f66045e9ffd3c..e17632ac2acb0 100644 --- a/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts +++ b/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts @@ -192,7 +192,7 @@ export class GatewayVpcEndpoint extends VpcEndpoint implements IGatewayVpcEndpoi } const endpoint = new CfnVPCEndpoint(this, 'Resource', { - policyDocument: Lazy.anyValue({ produce: () => this.policyDocument }), + policyDocument: Lazy.any({ produce: () => this.policyDocument }), routeTableIds, serviceName: props.service.name, vpcEndpointType: VpcEndpointType.GATEWAY, @@ -318,7 +318,7 @@ export class InterfaceVpcEndpointAwsService implements IInterfaceVpcEndpointServ public readonly privateDnsDefault?: boolean = true; constructor(name: string, prefix?: string, port?: number) { - const region = Lazy.stringValue({ + const region = Lazy.uncachedString({ produce: (context) => Stack.of(context.scope).region, }); this.name = `${prefix || 'com.amazonaws'}.${region}.${name}`; @@ -482,7 +482,7 @@ export class InterfaceVpcEndpoint extends VpcEndpoint implements IInterfaceVpcEn const endpoint = new CfnVPCEndpoint(this, 'Resource', { privateDnsEnabled: props.privateDnsEnabled ?? props.service.privateDnsDefault ?? true, - policyDocument: Lazy.anyValue({ produce: () => this.policyDocument }), + policyDocument: Lazy.any({ produce: () => this.policyDocument }), securityGroupIds: securityGroups.map(s => s.securityGroupId), serviceName: props.service.name, vpcEndpointType: VpcEndpointType.INTERFACE, diff --git a/packages/@aws-cdk/aws-ec2/lib/vpc.ts b/packages/@aws-cdk/aws-ec2/lib/vpc.ts index 7cbf02c76a452..f6ce634b18a75 100644 --- a/packages/@aws-cdk/aws-ec2/lib/vpc.ts +++ b/packages/@aws-cdk/aws-ec2/lib/vpc.ts @@ -1536,7 +1536,7 @@ export class Subnet extends Resource implements ISubnet { // subnet.attrNetworkAclAssociationId is the default ACL after the subnet // was just created. However, the ACL can be replaced at a later time. this._networkAcl = NetworkAcl.fromNetworkAclId(this, 'Acl', subnet.attrNetworkAclAssociationId); - this.subnetNetworkAclAssociationId = Lazy.stringValue({ produce: () => this._networkAcl.networkAclId }); + this.subnetNetworkAclAssociationId = Lazy.string({ produce: () => this._networkAcl.networkAclId }); this.node.defaultChild = subnet; const table = new CfnRouteTable(this, 'RouteTable', { diff --git a/packages/@aws-cdk/aws-ec2/test/security-group.test.ts b/packages/@aws-cdk/aws-ec2/test/security-group.test.ts index 1a72a6a715d2c..9851d87235c41 100644 --- a/packages/@aws-cdk/aws-ec2/test/security-group.test.ts +++ b/packages/@aws-cdk/aws-ec2/test/security-group.test.ts @@ -163,11 +163,11 @@ nodeunitShim({ const ports = [ Port.tcp(1234), - Port.tcp(Lazy.numberValue({ produce: () => 5000 })), + Port.tcp(Lazy.number({ produce: () => 5000 })), Port.allTcp(), Port.tcpRange(80, 90), Port.udp(2345), - Port.udp(Lazy.numberValue({ produce: () => 7777 })), + Port.udp(Lazy.number({ produce: () => 7777 })), Port.allUdp(), Port.udpRange(85, 95), Port.icmpTypeAndCode(5, 1), @@ -192,8 +192,8 @@ nodeunitShim({ 'if tokens are used in ports, `canInlineRule` should be false to avoid cycles'(test: Test) { // GIVEN - const p1 = Lazy.numberValue({ produce: () => 80 }); - const p2 = Lazy.numberValue({ produce: () => 5000 }); + const p1 = Lazy.number({ produce: () => 80 }); + const p2 = Lazy.number({ produce: () => 5000 }); // WHEN const ports = [ diff --git a/packages/@aws-cdk/aws-ec2/test/vpc.from-lookup.test.ts b/packages/@aws-cdk/aws-ec2/test/vpc.from-lookup.test.ts index 766a16dea0b1d..5555dc3fa9ed7 100644 --- a/packages/@aws-cdk/aws-ec2/test/vpc.from-lookup.test.ts +++ b/packages/@aws-cdk/aws-ec2/test/vpc.from-lookup.test.ts @@ -13,7 +13,7 @@ nodeunitShim({ test.throws(() => { Vpc.fromLookup(stack, 'Vpc', { - vpcId: Lazy.stringValue({ produce: () => 'some-id' }), + vpcId: Lazy.string({ produce: () => 'some-id' }), }); }, 'All arguments to Vpc.fromLookup() must be concrete'); diff --git a/packages/@aws-cdk/aws-ec2/test/vpc.test.ts b/packages/@aws-cdk/aws-ec2/test/vpc.test.ts index 9163a210738f8..9ea01086411dd 100644 --- a/packages/@aws-cdk/aws-ec2/test/vpc.test.ts +++ b/packages/@aws-cdk/aws-ec2/test/vpc.test.ts @@ -818,7 +818,7 @@ nodeunitShim({ const stack = new Stack(); test.throws(() => { new Vpc(stack, 'Vpc', { - cidr: Lazy.stringValue({ produce: () => 'abc' }), + cidr: Lazy.string({ produce: () => 'abc' }), }); }, /property must be a concrete CIDR string/); diff --git a/packages/@aws-cdk/aws-ecr-assets/test/image-asset.test.ts b/packages/@aws-cdk/aws-ecr-assets/test/image-asset.test.ts index 7da0621f2aa42..efa1498b41d90 100644 --- a/packages/@aws-cdk/aws-ecr-assets/test/image-asset.test.ts +++ b/packages/@aws-cdk/aws-ecr-assets/test/image-asset.test.ts @@ -238,7 +238,7 @@ nodeunitShim({ 'fails if using tokens in build args keys or values'(test: Test) { // GIVEN - const token = Lazy.stringValue({ produce: () => 'foo' }); + const token = Lazy.string({ produce: () => 'foo' }); const expected = /Cannot use tokens in keys or values of "buildArgs" since they are needed before deployment/; // THEN @@ -257,7 +257,7 @@ nodeunitShim({ 'fails if using token as repositoryName'(test: Test) { // GIVEN - const token = Lazy.stringValue({ produce: () => 'foo' }); + const token = Lazy.string({ produce: () => 'foo' }); // THEN test.throws(() => new DockerImageAsset(stack, 'MyAsset1', { diff --git a/packages/@aws-cdk/aws-ecr/lib/repository.ts b/packages/@aws-cdk/aws-ecr/lib/repository.ts index 53990d1e07934..36e14cf861adc 100644 --- a/packages/@aws-cdk/aws-ecr/lib/repository.ts +++ b/packages/@aws-cdk/aws-ecr/lib/repository.ts @@ -417,8 +417,8 @@ export class Repository extends RepositoryBase { const resource = new CfnRepository(this, 'Resource', { repositoryName: this.physicalName, // It says "Text", but they actually mean "Object". - repositoryPolicyText: Lazy.anyValue({ produce: () => this.policyDocument }), - lifecyclePolicy: Lazy.anyValue({ produce: () => this.renderLifecyclePolicy() }), + repositoryPolicyText: Lazy.any({ produce: () => this.policyDocument }), + lifecyclePolicy: Lazy.any({ produce: () => this.renderLifecyclePolicy() }), imageScanningConfiguration: !props.imageScanOnPush ? undefined : { scanOnPush: true, }, diff --git a/packages/@aws-cdk/aws-ecs/lib/base/base-service.ts b/packages/@aws-cdk/aws-ecs/lib/base/base-service.ts index ac4f4cf6f035a..535fb240217ec 100644 --- a/packages/@aws-cdk/aws-ecs/lib/base/base-service.ts +++ b/packages/@aws-cdk/aws-ecs/lib/base/base-service.ts @@ -340,7 +340,7 @@ export abstract class BaseService extends Resource this.resource = new CfnService(this, 'Service', { desiredCount: props.desiredCount, serviceName: this.physicalName, - loadBalancers: Lazy.anyValue({ produce: () => this.loadBalancers }, { omitEmptyArray: true }), + loadBalancers: Lazy.any({ produce: () => this.loadBalancers }, { omitEmptyArray: true }), deploymentConfiguration: { maximumPercent: props.maxHealthyPercent || 200, minimumHealthyPercent: props.minHealthyPercent === undefined ? 50 : props.minHealthyPercent, @@ -351,8 +351,8 @@ export abstract class BaseService extends Resource launchType: props.deploymentController?.type === DeploymentControllerType.EXTERNAL ? undefined : props.launchType, healthCheckGracePeriodSeconds: this.evaluateHealthGracePeriod(props.healthCheckGracePeriod), /* role: never specified, supplanted by Service Linked Role */ - networkConfiguration: Lazy.anyValue({ produce: () => this.networkConfiguration }, { omitEmptyArray: true }), - serviceRegistries: Lazy.anyValue({ produce: () => this.serviceRegistries }, { omitEmptyArray: true }), + networkConfiguration: Lazy.any({ produce: () => this.networkConfiguration }, { omitEmptyArray: true }), + serviceRegistries: Lazy.any({ produce: () => this.serviceRegistries }, { omitEmptyArray: true }), ...additionalProps, }); @@ -606,7 +606,7 @@ export abstract class BaseService extends Resource awsvpcConfiguration: { assignPublicIp: assignPublicIp ? 'ENABLED' : 'DISABLED', subnets: vpc.selectSubnets(vpcSubnets).subnetIds, - securityGroups: Lazy.listValue({ produce: () => [securityGroup!.securityGroupId] }), + securityGroups: Lazy.list({ produce: () => [securityGroup!.securityGroupId] }), }, }; } @@ -714,7 +714,7 @@ export abstract class BaseService extends Resource * healthCheckGracePeriod is not already set */ private evaluateHealthGracePeriod(providedHealthCheckGracePeriod?: Duration): IResolvable { - return Lazy.anyValue({ + return Lazy.any({ produce: () => providedHealthCheckGracePeriod !== undefined ? providedHealthCheckGracePeriod.toSeconds() : this.loadBalancers.length > 0 ? 60 : undefined, diff --git a/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts b/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts index 862193b11fe3b..5d586b40ce5f3 100644 --- a/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts +++ b/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts @@ -299,9 +299,9 @@ export class TaskDefinition extends TaskDefinitionBase { }); const taskDef = new CfnTaskDefinition(this, 'Resource', { - containerDefinitions: Lazy.anyValue({ produce: () => this.renderContainers() }, { omitEmptyArray: true }), - volumes: Lazy.anyValue({ produce: () => this.renderVolumes() }, { omitEmptyArray: true }), - executionRoleArn: Lazy.stringValue({ produce: () => this.executionRole && this.executionRole.roleArn }), + containerDefinitions: Lazy.any({ produce: () => this.renderContainers() }, { omitEmptyArray: true }), + volumes: Lazy.any({ produce: () => this.renderVolumes() }, { omitEmptyArray: true }), + executionRoleArn: Lazy.string({ produce: () => this.executionRole && this.executionRole.roleArn }), family: this.family, taskRoleArn: this.taskRole.roleArn, requiresCompatibilities: [ @@ -309,7 +309,7 @@ export class TaskDefinition extends TaskDefinitionBase { ...(isFargateCompatible(props.compatibility) ? ['FARGATE'] : []), ], networkMode: this.renderNetworkMode(this.networkMode), - placementConstraints: Lazy.anyValue({ + placementConstraints: Lazy.any({ produce: () => !isFargateCompatible(this.compatibility) ? this.placementConstraints : undefined, }, { omitEmptyArray: true }), diff --git a/packages/@aws-cdk/aws-ecs/lib/container-definition.ts b/packages/@aws-cdk/aws-ecs/lib/container-definition.ts index 0ad416ea61880..341ffe5237b4c 100644 --- a/packages/@aws-cdk/aws-ecs/lib/container-definition.ts +++ b/packages/@aws-cdk/aws-ecs/lib/container-definition.ts @@ -590,7 +590,7 @@ export class ContainerDefinition extends cdk.Construct { command: this.props.command, cpu: this.props.cpu, disableNetworking: this.props.disableNetworking, - dependsOn: cdk.Lazy.anyValue({ produce: () => this.containerDependencies.map(renderContainerDependency) }, { omitEmptyArray: true }), + dependsOn: cdk.Lazy.any({ produce: () => this.containerDependencies.map(renderContainerDependency) }, { omitEmptyArray: true }), dnsSearchDomains: this.props.dnsSearchDomains, dnsServers: this.props.dnsServers, dockerLabels: this.props.dockerLabels, @@ -601,17 +601,17 @@ export class ContainerDefinition extends cdk.Construct { image: this.imageConfig.imageName, memory: this.props.memoryLimitMiB, memoryReservation: this.props.memoryReservationMiB, - mountPoints: cdk.Lazy.anyValue({ produce: () => this.mountPoints.map(renderMountPoint) }, { omitEmptyArray: true }), + mountPoints: cdk.Lazy.any({ produce: () => this.mountPoints.map(renderMountPoint) }, { omitEmptyArray: true }), name: this.containerName, - portMappings: cdk.Lazy.anyValue({ produce: () => this.portMappings.map(renderPortMapping) }, { omitEmptyArray: true }), + portMappings: cdk.Lazy.any({ produce: () => this.portMappings.map(renderPortMapping) }, { omitEmptyArray: true }), privileged: this.props.privileged, readonlyRootFilesystem: this.props.readonlyRootFilesystem, repositoryCredentials: this.imageConfig.repositoryCredentials, startTimeout: this.props.startTimeout && this.props.startTimeout.toSeconds(), stopTimeout: this.props.stopTimeout && this.props.stopTimeout.toSeconds(), - ulimits: cdk.Lazy.anyValue({ produce: () => this.ulimits.map(renderUlimit) }, { omitEmptyArray: true }), + ulimits: cdk.Lazy.any({ produce: () => this.ulimits.map(renderUlimit) }, { omitEmptyArray: true }), user: this.props.user, - volumesFrom: cdk.Lazy.anyValue({ produce: () => this.volumesFrom.map(renderVolumeFrom) }, { omitEmptyArray: true }), + volumesFrom: cdk.Lazy.any({ produce: () => this.volumesFrom.map(renderVolumeFrom) }, { omitEmptyArray: true }), workingDirectory: this.props.workingDirectory, logConfiguration: this.logDriverConfig, environment: this.props.environment && renderKV(this.props.environment, 'name', 'value'), @@ -619,7 +619,7 @@ export class ContainerDefinition extends cdk.Construct { secrets: this.secrets, extraHosts: this.props.extraHosts && renderKV(this.props.extraHosts, 'hostname', 'ipAddress'), healthCheck: this.props.healthCheck && renderHealthCheck(this.props.healthCheck), - links: cdk.Lazy.listValue({ produce: () => this.links }, { omitEmpty: true }), + links: cdk.Lazy.list({ produce: () => this.links }, { omitEmpty: true }), linuxParameters: this.linuxParameters && this.linuxParameters.renderLinuxParameters(), resourceRequirements: (this.props.gpuCount !== undefined) ? renderResourceRequirements(this.props.gpuCount) : undefined, }; diff --git a/packages/@aws-cdk/aws-ecs/lib/ec2/ec2-service.ts b/packages/@aws-cdk/aws-ecs/lib/ec2/ec2-service.ts index 151375ba68764..33769c3223b08 100644 --- a/packages/@aws-cdk/aws-ecs/lib/ec2/ec2-service.ts +++ b/packages/@aws-cdk/aws-ecs/lib/ec2/ec2-service.ts @@ -197,8 +197,8 @@ export class Ec2Service extends BaseService implements IEc2Service { { cluster: props.cluster.clusterName, taskDefinition: props.deploymentController?.type === DeploymentControllerType.EXTERNAL ? undefined : props.taskDefinition.taskDefinitionArn, - placementConstraints: Lazy.anyValue({ produce: () => this.constraints }, { omitEmptyArray: true }), - placementStrategies: Lazy.anyValue({ produce: () => this.strategies }, { omitEmptyArray: true }), + placementConstraints: Lazy.any({ produce: () => this.constraints }, { omitEmptyArray: true }), + placementStrategies: Lazy.any({ produce: () => this.strategies }, { omitEmptyArray: true }), schedulingStrategy: props.daemon ? 'DAEMON' : 'REPLICA', }, props.taskDefinition); diff --git a/packages/@aws-cdk/aws-ecs/lib/linux-parameters.ts b/packages/@aws-cdk/aws-ecs/lib/linux-parameters.ts index fbf77f69b76f3..45e792126fd20 100644 --- a/packages/@aws-cdk/aws-ecs/lib/linux-parameters.ts +++ b/packages/@aws-cdk/aws-ecs/lib/linux-parameters.ts @@ -107,11 +107,11 @@ export class LinuxParameters extends cdk.Construct { initProcessEnabled: this.initProcessEnabled, sharedMemorySize: this.sharedMemorySize, capabilities: { - add: cdk.Lazy.listValue({ produce: () => this.capAdd }, { omitEmpty: true }), - drop: cdk.Lazy.listValue({ produce: () => this.capDrop }, { omitEmpty: true }), + add: cdk.Lazy.list({ produce: () => this.capAdd }, { omitEmpty: true }), + drop: cdk.Lazy.list({ produce: () => this.capDrop }, { omitEmpty: true }), }, - devices: cdk.Lazy.anyValue({ produce: () => this.devices.map(renderDevice) }, { omitEmptyArray: true }), - tmpfs: cdk.Lazy.anyValue({ produce: () => this.tmpfs.map(renderTmpfs) }, { omitEmptyArray: true }), + devices: cdk.Lazy.any({ produce: () => this.devices.map(renderDevice) }, { omitEmptyArray: true }), + tmpfs: cdk.Lazy.any({ produce: () => this.tmpfs.map(renderTmpfs) }, { omitEmptyArray: true }), }; } } diff --git a/packages/@aws-cdk/aws-ecs/test/fargate/test.fargate-task-definition.ts b/packages/@aws-cdk/aws-ecs/test/fargate/test.fargate-task-definition.ts index 2d7687f5855e6..99aeb6da886f9 100644 --- a/packages/@aws-cdk/aws-ecs/test/fargate/test.fargate-task-definition.ts +++ b/packages/@aws-cdk/aws-ecs/test/fargate/test.fargate-task-definition.ts @@ -28,8 +28,8 @@ export = { const stack = new cdk.Stack(); new ecs.FargateTaskDefinition(stack, 'FargateTaskDef', { - cpu: cdk.Lazy.numberValue({ produce: () => 128 }), - memoryLimitMiB: cdk.Lazy.numberValue({ produce: () => 1024 }), + cpu: cdk.Lazy.number({ produce: () => 128 }), + memoryLimitMiB: cdk.Lazy.number({ produce: () => 1024 }), }); // THEN diff --git a/packages/@aws-cdk/aws-eks-legacy/lib/aws-auth.ts b/packages/@aws-cdk/aws-eks-legacy/lib/aws-auth.ts index b4c5de9af36d6..276937847d558 100644 --- a/packages/@aws-cdk/aws-eks-legacy/lib/aws-auth.ts +++ b/packages/@aws-cdk/aws-eks-legacy/lib/aws-auth.ts @@ -92,7 +92,7 @@ export class AwsAuth extends Construct { } private synthesizeMapRoles() { - return Lazy.anyValue({ + return Lazy.any({ produce: () => this.stack.toJsonString(this.roleMappings.map(m => ({ rolearn: m.role.roleArn, username: m.mapping.username, @@ -102,7 +102,7 @@ export class AwsAuth extends Construct { } private synthesizeMapUsers() { - return Lazy.anyValue({ + return Lazy.any({ produce: () => this.stack.toJsonString(this.userMappings.map(m => ({ userarn: m.user.userArn, username: m.mapping.username, @@ -112,7 +112,7 @@ export class AwsAuth extends Construct { } private synthesizeMapAccounts() { - return Lazy.anyValue({ + return Lazy.any({ produce: () => this.stack.toJsonString(this.accounts), }); } diff --git a/packages/@aws-cdk/aws-eks/lib/aws-auth.ts b/packages/@aws-cdk/aws-eks/lib/aws-auth.ts index 1d0317758f705..02f2b321933f7 100644 --- a/packages/@aws-cdk/aws-eks/lib/aws-auth.ts +++ b/packages/@aws-cdk/aws-eks/lib/aws-auth.ts @@ -115,7 +115,7 @@ export class AwsAuth extends CoreConstruct { } private synthesizeMapRoles() { - return Lazy.anyValue({ + return Lazy.any({ produce: () => this.stack.toJsonString(this.roleMappings.map(m => ({ rolearn: m.role.roleArn, username: m.mapping.username ?? m.role.roleArn, @@ -125,7 +125,7 @@ export class AwsAuth extends CoreConstruct { } private synthesizeMapUsers() { - return Lazy.anyValue({ + return Lazy.any({ produce: () => this.stack.toJsonString(this.userMappings.map(m => ({ userarn: m.user.userArn, username: m.mapping.username ?? m.user.userArn, @@ -135,7 +135,7 @@ export class AwsAuth extends CoreConstruct { } private synthesizeMapAccounts() { - return Lazy.anyValue({ + return Lazy.any({ produce: () => this.stack.toJsonString(this.accounts), }); } diff --git a/packages/@aws-cdk/aws-eks/lib/cluster-resource.ts b/packages/@aws-cdk/aws-eks/lib/cluster-resource.ts index e41625ea3c808..788210c987dbe 100644 --- a/packages/@aws-cdk/aws-eks/lib/cluster-resource.ts +++ b/packages/@aws-cdk/aws-eks/lib/cluster-resource.ts @@ -122,7 +122,7 @@ export class ClusterResource extends CoreConstruct { // this role to manage all clusters in the account. this must be lazy since // `props.name` may contain a lazy value that conditionally resolves to a // physical name. - const resourceArns = Lazy.listValue({ + const resourceArns = Lazy.list({ produce: () => { const arn = stack.formatArn(clusterArnComponents(stack.resolve(props.name))); return stack.resolve(props.name) @@ -131,7 +131,7 @@ export class ClusterResource extends CoreConstruct { }, }); - const fargateProfileResourceArn = Lazy.stringValue({ + const fargateProfileResourceArn = Lazy.string({ produce: () => stack.resolve(props.name) ? stack.formatArn({ service: 'eks', resource: 'fargateprofile', resourceName: stack.resolve(props.name) + '/*' }) : '*', diff --git a/packages/@aws-cdk/aws-eks/lib/fargate-profile.ts b/packages/@aws-cdk/aws-eks/lib/fargate-profile.ts index a070d04af3910..4ce6f094909bd 100644 --- a/packages/@aws-cdk/aws-eks/lib/fargate-profile.ts +++ b/packages/@aws-cdk/aws-eks/lib/fargate-profile.ts @@ -183,7 +183,7 @@ export class FargateProfile extends CoreConstruct implements ITaggable { podExecutionRoleArn: this.podExecutionRole.roleArn, selectors: props.selectors, subnets, - tags: Lazy.anyValue({ produce: () => this.tags.renderTags() }), + tags: Lazy.any({ produce: () => this.tags.renderTags() }), }, }, }); diff --git a/packages/@aws-cdk/aws-elasticloadbalancing/lib/load-balancer.ts b/packages/@aws-cdk/aws-elasticloadbalancing/lib/load-balancer.ts index 2bb95496a4c74..55c423f157a55 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancing/lib/load-balancer.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancing/lib/load-balancer.ts @@ -245,7 +245,7 @@ export class LoadBalancer extends Resource implements IConnectable { this.elb = new CfnLoadBalancer(this, 'Resource', { securityGroups: [this.securityGroup.securityGroupId], subnets: selectedSubnets.subnetIds, - listeners: Lazy.anyValue({ produce: () => this.listeners }), + listeners: Lazy.any({ produce: () => this.listeners }), scheme: props.internetFacing ? 'internet-facing' : 'internal', healthCheck: props.healthCheck && healthCheckToJSON(props.healthCheck), crossZone: (props.crossZone === undefined || props.crossZone) ? true : false, diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener-rule.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener-rule.ts index fe22b97653430..edc0e04551f46 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener-rule.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener-rule.ts @@ -231,8 +231,8 @@ export class ApplicationListenerRule extends cdk.Construct { const resource = new CfnListenerRule(this, 'Resource', { listenerArn: props.listener.listenerArn, priority: props.priority, - conditions: cdk.Lazy.anyValue({ produce: () => this.renderConditions() }), - actions: cdk.Lazy.anyValue({ produce: () => this.action ? this.action.renderActions() : [] }), + conditions: cdk.Lazy.any({ produce: () => this.renderConditions() }), + actions: cdk.Lazy.any({ produce: () => this.action ? this.action.renderActions() : [] }), }); if (props.hostHeader) { diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener.ts index 3a055b5fce4be..230c02f7ab84f 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener.ts @@ -190,7 +190,7 @@ export class ApplicationListener extends BaseListener implements IApplicationLis super(scope, id, { loadBalancerArn: props.loadBalancer.loadBalancerArn, - certificates: Lazy.anyValue({ produce: () => this.certificateArns.map(certificateArn => ({ certificateArn })) }, { omitEmptyArray: true }), + certificates: Lazy.any({ produce: () => this.certificateArns.map(certificateArn => ({ certificateArn })) }, { omitEmptyArray: true }), protocol, port, sslPolicy: props.sslPolicy, diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts index 0b6c9d76a7d8f..d3b428094a344 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts @@ -83,7 +83,7 @@ export class ApplicationLoadBalancer extends BaseLoadBalancer implements IApplic constructor(scope: Construct, id: string, props: ApplicationLoadBalancerProps) { super(scope, id, props, { type: 'application', - securityGroups: Lazy.listValue({ produce: () => this.connections.securityGroups.map(sg => sg.securityGroupId) }), + securityGroups: Lazy.list({ produce: () => this.connections.securityGroups.map(sg => sg.securityGroupId) }), ipAddressType: props.ipAddressType, }); diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-listener.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-listener.ts index b735d6e375870..17170f4402b1a 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-listener.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-listener.ts @@ -108,7 +108,7 @@ export abstract class BaseListener extends Resource { const resource = new CfnListener(this, 'Resource', { ...additionalProps, - defaultActions: Lazy.anyValue({ produce: () => this.defaultAction ? this.defaultAction.renderActions() : [] }), + defaultActions: Lazy.any({ produce: () => this.defaultAction ? this.defaultAction.renderActions() : [] }), }); this.listenerArn = resource.ref; diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-load-balancer.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-load-balancer.ts index 46526b9376f68..f96b4e7711ccc 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-load-balancer.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-load-balancer.ts @@ -209,7 +209,7 @@ export abstract class BaseLoadBalancer extends Resource { name: this.physicalName, subnets: subnetIds, scheme: internetFacing ? 'internet-facing' : 'internal', - loadBalancerAttributes: Lazy.anyValue({ produce: () => renderAttributes(this.attributes) }, { omitEmptyArray: true } ), + loadBalancerAttributes: Lazy.any({ produce: () => renderAttributes(this.attributes) }, { omitEmptyArray: true } ), ...additionalProps, }); if (internetFacing) { diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-target-group.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-target-group.ts index fbe3e54b5b757..f9155bb1430eb 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-target-group.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-target-group.ts @@ -236,25 +236,25 @@ export abstract class TargetGroupBase extends cdk.Construct implements ITargetGr this.resource = new CfnTargetGroup(this, 'Resource', { name: baseProps.targetGroupName, - targetGroupAttributes: cdk.Lazy.anyValue({ produce: () => renderAttributes(this.attributes) }, { omitEmptyArray: true }), - targetType: cdk.Lazy.stringValue({ produce: () => this.targetType }), - targets: cdk.Lazy.anyValue({ produce: () => this.targetsJson }, { omitEmptyArray: true }), - vpcId: cdk.Lazy.stringValue({ produce: () => this.vpc && this.targetType !== TargetType.LAMBDA ? this.vpc.vpcId : undefined }), + targetGroupAttributes: cdk.Lazy.any({ produce: () => renderAttributes(this.attributes) }, { omitEmptyArray: true }), + targetType: cdk.Lazy.string({ produce: () => this.targetType }), + targets: cdk.Lazy.any({ produce: () => this.targetsJson }, { omitEmptyArray: true }), + vpcId: cdk.Lazy.string({ produce: () => this.vpc && this.targetType !== TargetType.LAMBDA ? this.vpc.vpcId : undefined }), // HEALTH CHECK - healthCheckEnabled: cdk.Lazy.anyValue({ produce: () => this.healthCheck && this.healthCheck.enabled }), - healthCheckIntervalSeconds: cdk.Lazy.numberValue({ + healthCheckEnabled: cdk.Lazy.any({ produce: () => this.healthCheck && this.healthCheck.enabled }), + healthCheckIntervalSeconds: cdk.Lazy.number({ produce: () => this.healthCheck && this.healthCheck.interval && this.healthCheck.interval.toSeconds(), }), - healthCheckPath: cdk.Lazy.stringValue({ produce: () => this.healthCheck && this.healthCheck.path }), - healthCheckPort: cdk.Lazy.stringValue({ produce: () => this.healthCheck && this.healthCheck.port }), - healthCheckProtocol: cdk.Lazy.stringValue({ produce: () => this.healthCheck && this.healthCheck.protocol }), - healthCheckTimeoutSeconds: cdk.Lazy.numberValue({ + healthCheckPath: cdk.Lazy.string({ produce: () => this.healthCheck && this.healthCheck.path }), + healthCheckPort: cdk.Lazy.string({ produce: () => this.healthCheck && this.healthCheck.port }), + healthCheckProtocol: cdk.Lazy.string({ produce: () => this.healthCheck && this.healthCheck.protocol }), + healthCheckTimeoutSeconds: cdk.Lazy.number({ produce: () => this.healthCheck && this.healthCheck.timeout && this.healthCheck.timeout.toSeconds(), }), - healthyThresholdCount: cdk.Lazy.numberValue({ produce: () => this.healthCheck && this.healthCheck.healthyThresholdCount }), - unhealthyThresholdCount: cdk.Lazy.numberValue({ produce: () => this.healthCheck && this.healthCheck.unhealthyThresholdCount }), - matcher: cdk.Lazy.anyValue({ + healthyThresholdCount: cdk.Lazy.number({ produce: () => this.healthCheck && this.healthCheck.healthyThresholdCount }), + unhealthyThresholdCount: cdk.Lazy.number({ produce: () => this.healthCheck && this.healthCheck.unhealthyThresholdCount }), + matcher: cdk.Lazy.any({ produce: () => this.healthCheck && this.healthCheck.healthyHttpCodes !== undefined ? { httpCode: this.healthCheck.healthyHttpCodes, } : undefined, diff --git a/packages/@aws-cdk/aws-elasticsearch/lib/domain.ts b/packages/@aws-cdk/aws-elasticsearch/lib/domain.ts index 4931bde8f4a1e..42e50714bdad8 100644 --- a/packages/@aws-cdk/aws-elasticsearch/lib/domain.ts +++ b/packages/@aws-cdk/aws-elasticsearch/lib/domain.ts @@ -1240,7 +1240,7 @@ export class Domain extends DomainBase implements IDomain { effect: iam.Effect.ALLOW, actions: ['es:ESHttp*'], principals: [new iam.Anyone()], - resources: [cdk.Lazy.stringValue({ produce: () => `${this.domainArn}/*` })], + resources: [cdk.Lazy.string({ produce: () => `${this.domainArn}/*` })], }); const masterUserArn = props.fineGrainedAccessControl?.masterUserArn; diff --git a/packages/@aws-cdk/aws-events/lib/event-bus.ts b/packages/@aws-cdk/aws-events/lib/event-bus.ts index 6101b44f680f4..27c79c9c7fe3a 100644 --- a/packages/@aws-cdk/aws-events/lib/event-bus.ts +++ b/packages/@aws-cdk/aws-events/lib/event-bus.ts @@ -219,7 +219,7 @@ export class EventBus extends Resource implements IEventBus { constructor(scope: Construct, id: string, props?: EventBusProps) { const { eventBusName, eventSourceName } = EventBus.eventBusProps( - Lazy.stringValue({ produce: () => Names.uniqueId(this) }), + Lazy.string({ produce: () => Names.uniqueId(this) }), props, ); diff --git a/packages/@aws-cdk/aws-events/lib/input.ts b/packages/@aws-cdk/aws-events/lib/input.ts index b3f8938b4d4c7..1fd68a1754119 100644 --- a/packages/@aws-cdk/aws-events/lib/input.ts +++ b/packages/@aws-cdk/aws-events/lib/input.ts @@ -219,7 +219,7 @@ class FieldAwareEventInput extends RuleTargetInput { private unquoteKeyPlaceholders(sub: string) { if (this.inputType !== InputType.Object) { return sub; } - return Lazy.stringValue({ produce: (ctx: IResolveContext) => Token.asString(deepUnquote(ctx.resolve(sub))) }); + return Lazy.uncachedString({ produce: (ctx: IResolveContext) => Token.asString(deepUnquote(ctx.resolve(sub))) }); function deepUnquote(resolved: any): any { if (Array.isArray(resolved)) { diff --git a/packages/@aws-cdk/aws-events/lib/rule.ts b/packages/@aws-cdk/aws-events/lib/rule.ts index 98e629874e382..0079954e73558 100644 --- a/packages/@aws-cdk/aws-events/lib/rule.ts +++ b/packages/@aws-cdk/aws-events/lib/rule.ts @@ -132,8 +132,8 @@ export class Rule extends Resource implements IRule { description: this.description, state: props.enabled == null ? 'ENABLED' : (props.enabled ? 'ENABLED' : 'DISABLED'), scheduleExpression: this.scheduleExpression, - eventPattern: Lazy.anyValue({ produce: () => this._renderEventPattern() }), - targets: Lazy.anyValue({ produce: () => this.renderTargets() }), + eventPattern: Lazy.any({ produce: () => this._renderEventPattern() }), + targets: Lazy.any({ produce: () => this.renderTargets() }), eventBusName: props.eventBus && props.eventBus.eventBusName, }); diff --git a/packages/@aws-cdk/aws-events/test/test.input.ts b/packages/@aws-cdk/aws-events/test/test.input.ts index 9094e02a5b86b..49c38f63ac1e8 100644 --- a/packages/@aws-cdk/aws-events/test/test.input.ts +++ b/packages/@aws-cdk/aws-events/test/test.input.ts @@ -156,7 +156,7 @@ export = { schedule: Schedule.rate(cdk.Duration.minutes(1)), }); - const world = cdk.Lazy.stringValue({ produce: () => 'world' }); + const world = cdk.Lazy.string({ produce: () => 'world' }); // WHEN rule.addTarget(new SomeTarget(RuleTargetInput.fromText(`hello ${world}`))); diff --git a/packages/@aws-cdk/aws-globalaccelerator/lib/endpoint-group.ts b/packages/@aws-cdk/aws-globalaccelerator/lib/endpoint-group.ts index f7c1b565af434..a2532aecdffa0 100644 --- a/packages/@aws-cdk/aws-globalaccelerator/lib/endpoint-group.ts +++ b/packages/@aws-cdk/aws-globalaccelerator/lib/endpoint-group.ts @@ -169,7 +169,7 @@ export class EndpointGroup extends cdk.Resource implements IEndpointGroup { const resource = new ga.CfnEndpointGroup(this, 'Resource', { listenerArn: props.listener.listenerArn, endpointGroupRegion: props.region ?? cdk.Stack.of(this).region, - endpointConfigurations: cdk.Lazy.anyValue({ produce: () => this.renderEndpoints() }, { omitEmptyArray: true }), + endpointConfigurations: cdk.Lazy.any({ produce: () => this.renderEndpoints() }, { omitEmptyArray: true }), }); this.endpointGroupArn = resource.attrEndpointGroupArn; diff --git a/packages/@aws-cdk/aws-iam/lib/group.ts b/packages/@aws-cdk/aws-iam/lib/group.ts index 6fc5963fdbeeb..eca266f6975dd 100644 --- a/packages/@aws-cdk/aws-iam/lib/group.ts +++ b/packages/@aws-cdk/aws-iam/lib/group.ts @@ -170,7 +170,7 @@ export class Group extends GroupBase { const group = new CfnGroup(this, 'Resource', { groupName: this.physicalName, - managedPolicyArns: Lazy.listValue({ produce: () => this.managedPolicies.map(p => p.managedPolicyArn) }, { omitEmpty: true }), + managedPolicyArns: Lazy.list({ produce: () => this.managedPolicies.map(p => p.managedPolicyArn) }, { omitEmpty: true }), path: props.path, }); diff --git a/packages/@aws-cdk/aws-iam/lib/managed-policy.ts b/packages/@aws-cdk/aws-iam/lib/managed-policy.ts index 8393f71f58a0d..cc8bddc0e8a17 100644 --- a/packages/@aws-cdk/aws-iam/lib/managed-policy.ts +++ b/packages/@aws-cdk/aws-iam/lib/managed-policy.ts @@ -156,7 +156,7 @@ export class ManagedPolicy extends Resource implements IManagedPolicy { */ public static fromAwsManagedPolicyName(managedPolicyName: string): IManagedPolicy { class AwsManagedPolicy implements IManagedPolicy { - public readonly managedPolicyArn = Lazy.stringValue({ + public readonly managedPolicyArn = Lazy.uncachedString({ produce(ctx: IResolveContext) { return Stack.of(ctx.scope).formatArn({ service: 'iam', diff --git a/packages/@aws-cdk/aws-iam/lib/policy.ts b/packages/@aws-cdk/aws-iam/lib/policy.ts index 45cd1fb138927..6c006c6576120 100644 --- a/packages/@aws-cdk/aws-iam/lib/policy.ts +++ b/packages/@aws-cdk/aws-iam/lib/policy.ts @@ -131,7 +131,7 @@ export class Policy extends Resource implements IPolicy { // generatePolicyName will take the last 128 characters of the logical id since // policy names are limited to 128. the last 8 chars are a stack-unique hash, so // that shouod be sufficient to ensure uniqueness within a principal. - Lazy.stringValue({ produce: () => generatePolicyName(scope, resource.logicalId) }), + Lazy.string({ produce: () => generatePolicyName(scope, resource.logicalId) }), }); const self = this; diff --git a/packages/@aws-cdk/aws-iam/lib/role.ts b/packages/@aws-cdk/aws-iam/lib/role.ts index 3a11bd7fae2d9..74e251bd7bc07 100644 --- a/packages/@aws-cdk/aws-iam/lib/role.ts +++ b/packages/@aws-cdk/aws-iam/lib/role.ts @@ -326,7 +326,7 @@ export class Role extends Resource implements IRole { const role = new CfnRole(this, 'Resource', { assumeRolePolicyDocument: this.assumeRolePolicy as any, - managedPolicyArns: Lazy.listValue({ produce: () => this.managedPolicies.map(p => p.managedPolicyArn) }, { omitEmpty: true }), + managedPolicyArns: Lazy.list({ produce: () => this.managedPolicies.map(p => p.managedPolicyArn) }, { omitEmpty: true }), policies: _flatten(this.inlinePolicies), path: props.path, permissionsBoundary: this.permissionsBoundary ? this.permissionsBoundary.managedPolicyArn : undefined, diff --git a/packages/@aws-cdk/aws-iam/lib/user.ts b/packages/@aws-cdk/aws-iam/lib/user.ts index c6c0799d2bc8d..a8c3b61443771 100644 --- a/packages/@aws-cdk/aws-iam/lib/user.ts +++ b/packages/@aws-cdk/aws-iam/lib/user.ts @@ -217,7 +217,7 @@ export class User extends Resource implements IIdentity, IUser { const user = new CfnUser(this, 'Resource', { userName: this.physicalName, groups: undefinedIfEmpty(() => this.groups), - managedPolicyArns: Lazy.listValue({ produce: () => this.managedPolicies.map(p => p.managedPolicyArn) }, { omitEmpty: true }), + managedPolicyArns: Lazy.list({ produce: () => this.managedPolicies.map(p => p.managedPolicyArn) }, { omitEmpty: true }), path: props.path, permissionsBoundary: this.permissionsBoundary ? this.permissionsBoundary.managedPolicyArn : undefined, loginProfile: this.parseLoginProfile(props), diff --git a/packages/@aws-cdk/aws-iam/lib/util.ts b/packages/@aws-cdk/aws-iam/lib/util.ts index 545d5bc9de439..b5f1700baefe7 100644 --- a/packages/@aws-cdk/aws-iam/lib/util.ts +++ b/packages/@aws-cdk/aws-iam/lib/util.ts @@ -5,7 +5,7 @@ import { IPolicy } from './policy'; const MAX_POLICY_NAME_LEN = 128; export function undefinedIfEmpty(f: () => string[]): string[] { - return Lazy.listValue({ + return Lazy.list({ produce: () => { const array = f(); return (array && array.length > 0) ? array : undefined; diff --git a/packages/@aws-cdk/aws-iam/test/cross-account.test.ts b/packages/@aws-cdk/aws-iam/test/cross-account.test.ts index f3e8a7769d6cf..c3a45ec730580 100644 --- a/packages/@aws-cdk/aws-iam/test/cross-account.test.ts +++ b/packages/@aws-cdk/aws-iam/test/cross-account.test.ts @@ -170,7 +170,7 @@ class FakeResource extends cdk.Resource implements iam.IResourceWithPolicy { new cdk.CfnResource(this, 'Default', { type: 'Test::Fake::Resource', properties: { - ResourcePolicy: cdk.Lazy.anyValue({ produce: () => this.policy }), + ResourcePolicy: cdk.Lazy.any({ produce: () => this.policy }), }, }); } diff --git a/packages/@aws-cdk/aws-iam/test/policy-document.test.ts b/packages/@aws-cdk/aws-iam/test/policy-document.test.ts index 9ce8b5f9ec6c8..d8a9b1337c21c 100644 --- a/packages/@aws-cdk/aws-iam/test/policy-document.test.ts +++ b/packages/@aws-cdk/aws-iam/test/policy-document.test.ts @@ -311,8 +311,8 @@ describe('IAM policy document', () => { const stack = new Stack(); const statement = new PolicyStatement(); - statement.addActions(...Lazy.listValue({ produce: () => ['a', 'b', 'c'] })); - statement.addResources(...Lazy.listValue({ produce: () => ['x', 'y', 'z'] })); + statement.addActions(...Lazy.list({ produce: () => ['a', 'b', 'c'] })); + statement.addResources(...Lazy.list({ produce: () => ['x', 'y', 'z'] })); expect(stack.resolve(statement.toStatementJson())).toEqual({ Effect: 'Allow', @@ -558,7 +558,7 @@ describe('IAM policy document', () => { // WHEN const p = new ArnPrincipal('arn:of:principal').withConditions({ - StringEquals: Lazy.anyValue({ produce: () => ({ goo: 'zar' }) }), + StringEquals: Lazy.any({ produce: () => ({ goo: 'zar' }) }), }); statement.addPrincipals(p); @@ -582,7 +582,7 @@ describe('IAM policy document', () => { const p = new FederatedPrincipal('fed', { StringEquals: { foo: 'bar' }, }).withConditions({ - StringEquals: Lazy.anyValue({ produce: () => ({ goo: 'zar' }) }), + StringEquals: Lazy.any({ produce: () => ({ goo: 'zar' }) }), }); const statement = new PolicyStatement(); @@ -644,12 +644,12 @@ describe('IAM policy document', () => { const p = new PolicyDocument(); const statement1 = new PolicyStatement(); - statement1.addResources(Lazy.stringValue({ produce: () => 'resource' })); - statement1.addActions(Lazy.stringValue({ produce: () => 'action' })); + statement1.addResources(Lazy.string({ produce: () => 'resource' })); + statement1.addActions(Lazy.string({ produce: () => 'action' })); const statement2 = new PolicyStatement(); - statement2.addResources(Lazy.stringValue({ produce: () => 'resource' })); - statement2.addActions(Lazy.stringValue({ produce: () => 'action' })); + statement2.addResources(Lazy.string({ produce: () => 'resource' })); + statement2.addActions(Lazy.string({ produce: () => 'action' })); // WHEN p.addStatements(statement1); diff --git a/packages/@aws-cdk/aws-iam/test/role.from-role-arn.test.ts b/packages/@aws-cdk/aws-iam/test/role.from-role-arn.test.ts index a5044fa6722d2..afe6fb576f298 100644 --- a/packages/@aws-cdk/aws-iam/test/role.from-role-arn.test.ts +++ b/packages/@aws-cdk/aws-iam/test/role.from-role-arn.test.ts @@ -305,7 +305,7 @@ describe('IAM Role.fromRoleArn', () => { }); describe('imported with a dynamic ARN', () => { - const dynamicValue = Lazy.stringValue({ produce: () => 'role-arn' }); + const dynamicValue = Lazy.string({ produce: () => 'role-arn' }); const roleName: any = { 'Fn::Select': [1, { diff --git a/packages/@aws-cdk/aws-lambda-event-sources/test/test.kinesis.ts b/packages/@aws-cdk/aws-lambda-event-sources/test/test.kinesis.ts index b8791c99017ec..76e437de0ae34 100644 --- a/packages/@aws-cdk/aws-lambda-event-sources/test/test.kinesis.ts +++ b/packages/@aws-cdk/aws-lambda-event-sources/test/test.kinesis.ts @@ -144,7 +144,7 @@ export = { // WHEN fn.addEventSource(new sources.KinesisEventSource(stream, { - batchSize: cdk.Lazy.numberValue({ produce: () => 10 }), + batchSize: cdk.Lazy.number({ produce: () => 10 }), startingPosition: lambda.StartingPosition.LATEST, })); diff --git a/packages/@aws-cdk/aws-lambda/lib/function.ts b/packages/@aws-cdk/aws-lambda/lib/function.ts index e2d81c064c894..d2000fd32d342 100644 --- a/packages/@aws-cdk/aws-lambda/lib/function.ts +++ b/packages/@aws-cdk/aws-lambda/lib/function.ts @@ -348,8 +348,8 @@ export class Function extends FunctionBase { const cfn = this._currentVersion.node.defaultChild as CfnResource; const originalLogicalId = this.stack.resolve(cfn.logicalId) as string; - cfn.overrideLogicalId(Lazy.stringValue({ - produce: _ => { + cfn.overrideLogicalId(Lazy.uncachedString({ + produce: () => { const hash = calculateFunctionHash(this); const logicalId = trimFromStart(originalLogicalId, 255 - 32); return `${logicalId}${hash}`; @@ -599,12 +599,14 @@ export class Function extends FunctionBase { s3ObjectVersion: code.s3Location && code.s3Location.objectVersion, zipFile: code.inlineCode, }, - layers: Lazy.listValue({ produce: () => this.layers.map(layer => layer.layerVersionArn) }, { omitEmpty: true }), + layers: Lazy.list({ produce: () => this.layers.map(layer => layer.layerVersionArn) }, { omitEmpty: true }), handler: props.handler, timeout: props.timeout && props.timeout.toSeconds(), runtime: props.runtime.name, role: this.role.roleArn, - environment: Lazy.anyValue({ produce: () => this.renderEnvironment() }), + // Uncached because calling '_checkEdgeCompatibility', which gets called in the resolve of another + // Token, actually *modifies* the 'environment' map. + environment: Lazy.uncachedAny({ produce: () => this.renderEnvironment() }), memorySize: props.memorySize, vpcConfig: this.configureVpc(props), deadLetterConfig: this.buildDeadLetterConfig(this.deadLetterQueue), diff --git a/packages/@aws-cdk/aws-lambda/lib/lambda-version.ts b/packages/@aws-cdk/aws-lambda/lib/lambda-version.ts index 2156b2d87cfb5..b51d866ac815d 100644 --- a/packages/@aws-cdk/aws-lambda/lib/lambda-version.ts +++ b/packages/@aws-cdk/aws-lambda/lib/lambda-version.ts @@ -251,7 +251,7 @@ export class Version extends QualifiedFunctionBase implements IVersion { // Check compatibility at synthesis. It could be that the version was associated // with a CloudFront distribution first and made incompatible afterwards. - return Lazy.stringValue({ + return Lazy.string({ produce: () => { // Validate that the underlying function can be used for Lambda@Edge if (this.lambda instanceof Function) { diff --git a/packages/@aws-cdk/aws-lambda/test/alias.test.ts b/packages/@aws-cdk/aws-lambda/test/alias.test.ts index 334e40607ed5c..1f25aa1a6a823 100644 --- a/packages/@aws-cdk/aws-lambda/test/alias.test.ts +++ b/packages/@aws-cdk/aws-lambda/test/alias.test.ts @@ -499,7 +499,7 @@ describe('alias', () => { // WHEN const target = alias.addAutoScaling({ maxCapacity: 5 }); - target.scaleOnUtilization({ utilizationTarget: Lazy.numberValue({ produce: () => 0.95 }) }); + target.scaleOnUtilization({ utilizationTarget: Lazy.number({ produce: () => 0.95 }) }); // THEN: no exception expect(stack).toHaveResource('AWS::ApplicationAutoScaling::ScalingPolicy', { diff --git a/packages/@aws-cdk/aws-lambda/test/event-source-mapping.test.ts b/packages/@aws-cdk/aws-lambda/test/event-source-mapping.test.ts index 78c11922bf183..be42067f263f1 100644 --- a/packages/@aws-cdk/aws-lambda/test/event-source-mapping.test.ts +++ b/packages/@aws-cdk/aws-lambda/test/event-source-mapping.test.ts @@ -89,7 +89,7 @@ describe('event source mapping', () => { new EventSourceMapping(stack, 'test', { target: fn, eventSourceArn: '', - retryAttempts: cdk.Lazy.numberValue({ produce: () => 100 }), + retryAttempts: cdk.Lazy.number({ produce: () => 100 }), }); }); @@ -134,7 +134,7 @@ describe('event source mapping', () => { new EventSourceMapping(stack, 'test', { target: fn, eventSourceArn: '', - parallelizationFactor: cdk.Lazy.numberValue({ produce: () => 20 }), + parallelizationFactor: cdk.Lazy.number({ produce: () => 20 }), }); }); diff --git a/packages/@aws-cdk/aws-logs/lib/cross-account-destination.ts b/packages/@aws-cdk/aws-logs/lib/cross-account-destination.ts index 0f428fb03bc77..f9dfefdfed9f6 100644 --- a/packages/@aws-cdk/aws-logs/lib/cross-account-destination.ts +++ b/packages/@aws-cdk/aws-logs/lib/cross-account-destination.ts @@ -69,7 +69,7 @@ export class CrossAccountDestination extends cdk.Resource implements ILogSubscri super(scope, id, { physicalName: props.destinationName || // In the underlying model, the name is not optional, but we make it so anyway. - cdk.Lazy.stringValue({ produce: () => this.generateUniqueName() }), + cdk.Lazy.string({ produce: () => this.generateUniqueName() }), }); this.resource = new CfnDestination(this, 'Resource', { @@ -109,7 +109,7 @@ export class CrossAccountDestination extends cdk.Resource implements ILogSubscri * Return a stringified JSON version of the PolicyDocument */ private lazyStringifiedPolicyDocument(): string { - return cdk.Lazy.stringValue({ + return cdk.Lazy.string({ produce: () => this.policyDocument.isEmpty ? '' : cdk.Stack.of(this).toJsonString(this.policyDocument), }); diff --git a/packages/@aws-cdk/aws-rds/lib/instance.ts b/packages/@aws-cdk/aws-rds/lib/instance.ts index 392c75ef3564c..feb44facab4d2 100644 --- a/packages/@aws-cdk/aws-rds/lib/instance.ts +++ b/packages/@aws-cdk/aws-rds/lib/instance.ts @@ -643,7 +643,7 @@ abstract class DatabaseInstanceNew extends DatabaseInstanceBase implements IData this.connections = new ec2.Connections({ securityGroups, - defaultPort: ec2.Port.tcp(Lazy.numberValue({ produce: () => this.instanceEndpoint.port })), + defaultPort: ec2.Port.tcp(Lazy.number({ produce: () => this.instanceEndpoint.port })), }); let monitoringRole; @@ -683,13 +683,13 @@ abstract class DatabaseInstanceNew extends DatabaseInstanceBase implements IData availabilityZone: props.multiAz ? undefined : props.availabilityZone, backupRetentionPeriod: props.backupRetention ? props.backupRetention.toDays() : undefined, copyTagsToSnapshot: props.copyTagsToSnapshot !== undefined ? props.copyTagsToSnapshot : true, - dbInstanceClass: Lazy.stringValue({ produce: () => `db.${this.instanceType}` }), + dbInstanceClass: Lazy.string({ produce: () => `db.${this.instanceType}` }), dbInstanceIdentifier: props.instanceIdentifier, dbSubnetGroupName: subnetGroup.subnetGroupName, deleteAutomatedBackups: props.deleteAutomatedBackups, deletionProtection: defaultDeletionProtection(props.deletionProtection, props.removalPolicy), enableCloudwatchLogsExports: this.cloudwatchLogsExports, - enableIamDatabaseAuthentication: Lazy.anyValue({ produce: () => this.enableIamAuthentication }), + enableIamDatabaseAuthentication: Lazy.any({ produce: () => this.enableIamAuthentication }), enablePerformanceInsights: enablePerformanceInsights || props.enablePerformanceInsights, // fall back to undefined if not set, iops, monitoringInterval: props.monitoringInterval && props.monitoringInterval.toSeconds(), diff --git a/packages/@aws-cdk/aws-rds/lib/option-group.ts b/packages/@aws-cdk/aws-rds/lib/option-group.ts index 7e29fe7495e3a..91dad4f8caffa 100644 --- a/packages/@aws-cdk/aws-rds/lib/option-group.ts +++ b/packages/@aws-cdk/aws-rds/lib/option-group.ts @@ -135,7 +135,7 @@ export class OptionGroup extends Resource implements IOptionGroup { engineName: props.engine.engineType, majorEngineVersion, optionGroupDescription: props.description || `Option group for ${props.engine.engineType} ${majorEngineVersion}`, - optionConfigurations: Lazy.anyValue({ produce: () => this.renderConfigurations(this.configurations) }), + optionConfigurations: Lazy.any({ produce: () => this.renderConfigurations(this.configurations) }), }); this.optionGroupName = optionGroup.ref; diff --git a/packages/@aws-cdk/aws-rds/lib/parameter-group.ts b/packages/@aws-cdk/aws-rds/lib/parameter-group.ts index 23647b921efd8..0a1971c3ac843 100644 --- a/packages/@aws-cdk/aws-rds/lib/parameter-group.ts +++ b/packages/@aws-cdk/aws-rds/lib/parameter-group.ts @@ -139,7 +139,7 @@ export class ParameterGroup extends Resource implements IParameterGroup { this.clusterCfnGroup = new CfnDBClusterParameterGroup(this, id, { description: this.description || `Cluster parameter group for ${this.family}`, family: this.family, - parameters: Lazy.anyValue({ produce: () => this.parameters }), + parameters: Lazy.any({ produce: () => this.parameters }), }); } return { @@ -153,7 +153,7 @@ export class ParameterGroup extends Resource implements IParameterGroup { this.instanceCfnGroup = new CfnDBParameterGroup(this, id, { description: this.description || `Parameter group for ${this.family}`, family: this.family, - parameters: Lazy.anyValue({ produce: () => this.parameters }), + parameters: Lazy.any({ produce: () => this.parameters }), }); } return { diff --git a/packages/@aws-cdk/aws-route53/lib/hosted-zone.ts b/packages/@aws-cdk/aws-route53/lib/hosted-zone.ts index b489ffdcb3584..f11e9ae180e7f 100644 --- a/packages/@aws-cdk/aws-route53/lib/hosted-zone.ts +++ b/packages/@aws-cdk/aws-route53/lib/hosted-zone.ts @@ -157,7 +157,7 @@ export class HostedZone extends Resource implements IHostedZone { name: props.zoneName + '.', hostedZoneConfig: props.comment ? { comment: props.comment } : undefined, queryLoggingConfig: props.queryLogsLogGroupArn ? { cloudWatchLogsLogGroupArn: props.queryLogsLogGroupArn } : undefined, - vpcs: Lazy.anyValue({ produce: () => this.vpcs.length === 0 ? undefined : this.vpcs }), + vpcs: Lazy.any({ produce: () => this.vpcs.length === 0 ? undefined : this.vpcs }), }); this.hostedZoneId = resource.ref; diff --git a/packages/@aws-cdk/aws-s3/lib/bucket.ts b/packages/@aws-cdk/aws-s3/lib/bucket.ts index f1752cc402b5e..305674a847a15 100644 --- a/packages/@aws-cdk/aws-s3/lib/bucket.ts +++ b/packages/@aws-cdk/aws-s3/lib/bucket.ts @@ -1246,14 +1246,14 @@ export class Bucket extends BucketBase { bucketName: this.physicalName, bucketEncryption, versioningConfiguration: props.versioned ? { status: 'Enabled' } : undefined, - lifecycleConfiguration: Lazy.anyValue({ produce: () => this.parseLifecycleConfiguration() }), + lifecycleConfiguration: Lazy.any({ produce: () => this.parseLifecycleConfiguration() }), websiteConfiguration, publicAccessBlockConfiguration: props.blockPublicAccess, - metricsConfigurations: Lazy.anyValue({ produce: () => this.parseMetricConfiguration() }), - corsConfiguration: Lazy.anyValue({ produce: () => this.parseCorsConfiguration() }), - accessControl: Lazy.stringValue({ produce: () => this.accessControl }), + metricsConfigurations: Lazy.any({ produce: () => this.parseMetricConfiguration() }), + corsConfiguration: Lazy.any({ produce: () => this.parseCorsConfiguration() }), + accessControl: Lazy.string({ produce: () => this.accessControl }), loggingConfiguration: this.parseServerAccessLogs(props), - inventoryConfigurations: Lazy.anyValue({ produce: () => this.parseInventoryConfiguration() }), + inventoryConfigurations: Lazy.any({ produce: () => this.parseInventoryConfiguration() }), }); resource.applyRemovalPolicy(props.removalPolicy); diff --git a/packages/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.ts b/packages/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.ts index e1cf34982a3c9..91bb688b28857 100644 --- a/packages/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.ts +++ b/packages/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.ts @@ -107,7 +107,7 @@ export class BucketNotifications extends cdk.Construct { properties: { ServiceToken: handlerArn, BucketName: this.bucket.bucketName, - NotificationConfiguration: cdk.Lazy.anyValue({ produce: () => this.renderNotificationConfiguration() }), + NotificationConfiguration: cdk.Lazy.any({ produce: () => this.renderNotificationConfiguration() }), }, }); } diff --git a/packages/@aws-cdk/aws-s3/test/bucket.test.ts b/packages/@aws-cdk/aws-s3/test/bucket.test.ts index 275f4bc6aa822..900a33852beef 100644 --- a/packages/@aws-cdk/aws-s3/test/bucket.test.ts +++ b/packages/@aws-cdk/aws-s3/test/bucket.test.ts @@ -107,7 +107,7 @@ nodeunitShim({ const stack = new cdk.Stack(); test.doesNotThrow(() => new s3.Bucket(stack, 'MyBucket', { - bucketName: cdk.Lazy.stringValue({ produce: () => '_BUCKET' }), + bucketName: cdk.Lazy.string({ produce: () => '_BUCKET' }), })); test.done(); diff --git a/packages/@aws-cdk/aws-ses/lib/receipt-rule.ts b/packages/@aws-cdk/aws-ses/lib/receipt-rule.ts index 714411640e83c..72c056d913693 100644 --- a/packages/@aws-cdk/aws-ses/lib/receipt-rule.ts +++ b/packages/@aws-cdk/aws-ses/lib/receipt-rule.ts @@ -126,7 +126,7 @@ export class ReceiptRule extends Resource implements IReceiptRule { const resource = new CfnReceiptRule(this, 'Resource', { after: props.after ? props.after.receiptRuleName : undefined, rule: { - actions: Lazy.anyValue({ produce: () => this.renderActions() }), + actions: Lazy.any({ produce: () => this.renderActions() }), enabled: props.enabled === undefined ? true : props.enabled, name: this.physicalName, recipients: props.recipients, diff --git a/packages/@aws-cdk/aws-ssm/test/test.parameter.ts b/packages/@aws-cdk/aws-ssm/test/test.parameter.ts index cf7a43f3f3c2b..9734ddb4fdd9a 100644 --- a/packages/@aws-cdk/aws-ssm/test/test.parameter.ts +++ b/packages/@aws-cdk/aws-ssm/test/test.parameter.ts @@ -69,7 +69,7 @@ export = { test.doesNotThrow(() => { new ssm.StringParameter(stack, 'Parameter', { allowedPattern: '^Bar$', - stringValue: cdk.Lazy.stringValue({ produce: () => 'Foo!' }), + stringValue: cdk.Lazy.string({ produce: () => 'Foo!' }), }); }); test.done(); @@ -239,7 +239,7 @@ export = { // THEN test.doesNotThrow(() => new ssm.StringListParameter(stack, 'Parameter', { allowedPattern: '^(Foo|Bar)$', - stringListValue: ['Foo', cdk.Lazy.stringValue({ produce: () => 'Baz!' })], + stringListValue: ['Foo', cdk.Lazy.string({ produce: () => 'Baz!' })], })); test.done(); }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/ecs/run-ecs-task-base.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/ecs/run-ecs-task-base.ts index 12d1c71665577..d2f280d8d0c1e 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/ecs/run-ecs-task-base.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/ecs/run-ecs-task-base.ts @@ -136,7 +136,7 @@ export class EcsRunTaskBase implements ec2.IConnectable, sfn.IStepFunctionsTask AwsvpcConfiguration: { AssignPublicIp: assignPublicIp !== undefined ? (assignPublicIp ? 'ENABLED' : 'DISABLED') : undefined, Subnets: vpc.selectSubnets(subnetSelection).subnetIds, - SecurityGroups: cdk.Lazy.listValue({ produce: () => [this.securityGroup!.securityGroupId] }), + SecurityGroups: cdk.Lazy.list({ produce: () => [this.securityGroup!.securityGroupId] }), }, }; } @@ -156,7 +156,7 @@ export class EcsRunTaskBase implements ec2.IConnectable, sfn.IStepFunctionsTask }), new iam.PolicyStatement({ actions: ['iam:PassRole'], - resources: cdk.Lazy.listValue({ produce: () => this.taskExecutionRoles().map(r => r.roleArn) }), + resources: cdk.Lazy.list({ produce: () => this.taskExecutionRoles().map(r => r.roleArn) }), }), ]; diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/ecs/run-task.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/ecs/run-task.ts index 38f54c2c0c8fe..f80252cbb05f8 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/ecs/run-task.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/ecs/run-task.ts @@ -294,7 +294,7 @@ export class EcsRunTask extends sfn.TaskStateBase implements ec2.IConnectable { AwsvpcConfiguration: { AssignPublicIp: this.props.assignPublicIp ? (this.props.assignPublicIp ? 'ENABLED' : 'DISABLED') : undefined, Subnets: this.props.cluster.vpc.selectSubnets(subnetSelection).subnetIds, - SecurityGroups: cdk.Lazy.listValue({ produce: () => this.securityGroups?.map(sg => sg.securityGroupId) }), + SecurityGroups: cdk.Lazy.list({ produce: () => this.securityGroups?.map(sg => sg.securityGroupId) }), }, }; diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/sagemaker/create-model.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/sagemaker/create-model.ts index 7b73afd355e3a..ee82cc6f69818 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/sagemaker/create-model.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/sagemaker/create-model.ts @@ -229,7 +229,7 @@ export class SageMakerCreateModel extends sfn.TaskStateBase implements iam.IGran return this.vpc ? { VpcConfig: { - SecurityGroupIds: cdk.Lazy.listValue({ produce: () => this.securityGroups.map((sg) => sg.securityGroupId) }), + SecurityGroupIds: cdk.Lazy.list({ produce: () => this.securityGroups.map((sg) => sg.securityGroupId) }), Subnets: this.subnets, }, } diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/sagemaker/create-training-job.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/sagemaker/create-training-job.ts index a6f925181e38e..e063378bf3eb2 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/sagemaker/create-training-job.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/sagemaker/create-training-job.ts @@ -302,7 +302,7 @@ export class SageMakerCreateTrainingJob extends sfn.TaskStateBase implements iam return config ? { VpcConfig: { - SecurityGroupIds: Lazy.listValue({ produce: () => this.securityGroups.map((sg) => sg.securityGroupId) }), + SecurityGroupIds: Lazy.list({ produce: () => this.securityGroups.map((sg) => sg.securityGroupId) }), Subnets: this.subnets, }, } diff --git a/packages/@aws-cdk/aws-stepfunctions/lib/activity.ts b/packages/@aws-cdk/aws-stepfunctions/lib/activity.ts index 601479fbed0e4..2d5d423a930b7 100644 --- a/packages/@aws-cdk/aws-stepfunctions/lib/activity.ts +++ b/packages/@aws-cdk/aws-stepfunctions/lib/activity.ts @@ -59,7 +59,7 @@ export class Activity extends Resource implements IActivity { constructor(scope: Construct, id: string, props: ActivityProps = {}) { super(scope, id, { physicalName: props.activityName || - Lazy.stringValue({ produce: () => this.generateName() }), + Lazy.string({ produce: () => this.generateName() }), }); const resource = new CfnActivity(this, 'Resource', { diff --git a/packages/@aws-cdk/aws-synthetics/lib/canary.ts b/packages/@aws-cdk/aws-synthetics/lib/canary.ts index f2bbb1407d76a..bee1d24e8cf11 100644 --- a/packages/@aws-cdk/aws-synthetics/lib/canary.ts +++ b/packages/@aws-cdk/aws-synthetics/lib/canary.ts @@ -243,7 +243,7 @@ export class Canary extends cdk.Resource { } super(scope, id, { - physicalName: props.canaryName || cdk.Lazy.stringValue({ + physicalName: props.canaryName || cdk.Lazy.string({ produce: () => this.generateUniqueName(), }), }); diff --git a/packages/@aws-cdk/aws-synthetics/test/canary.test.ts b/packages/@aws-cdk/aws-synthetics/test/canary.test.ts index 8fd9805bb04d4..d4a505e3a492b 100644 --- a/packages/@aws-cdk/aws-synthetics/test/canary.test.ts +++ b/packages/@aws-cdk/aws-synthetics/test/canary.test.ts @@ -59,7 +59,7 @@ test('Name validation does not fail when using Tokens', () => { // WHEN new synthetics.Canary(stack, 'Canary', { - canaryName: Lazy.stringValue({ produce: () => 'My Canary' }), + canaryName: Lazy.string({ produce: () => 'My Canary' }), test: synthetics.Test.custom({ handler: 'index.handler', code: synthetics.Code.fromInline('/* Synthetics handler code */'), diff --git a/packages/@aws-cdk/core/lib/cfn-element.ts b/packages/@aws-cdk/core/lib/cfn-element.ts index d381441f9a19e..5e2cf1602c614 100644 --- a/packages/@aws-cdk/core/lib/cfn-element.ts +++ b/packages/@aws-cdk/core/lib/cfn-element.ts @@ -60,7 +60,7 @@ export abstract class CfnElement extends CoreConstruct { this.stack = Stack.of(this); - this.logicalId = Lazy.stringValue({ produce: () => this.synthesizeLogicalId() }, { + this.logicalId = Lazy.uncachedString({ produce: () => this.synthesizeLogicalId() }, { displayHint: `${notTooLong(Node.of(this).path)}.LogicalID`, }); diff --git a/packages/@aws-cdk/core/lib/cfn-parse.ts b/packages/@aws-cdk/core/lib/cfn-parse.ts index 663bdd6437a98..c5fc563c3778f 100644 --- a/packages/@aws-cdk/core/lib/cfn-parse.ts +++ b/packages/@aws-cdk/core/lib/cfn-parse.ts @@ -492,7 +492,7 @@ export class CfnParser { // as otherwise Fn.join() will try to concatenate // the non-token parts, // causing a diff with the original template - return Fn.join(value[0], Lazy.listValue({ produce: () => value[1] })); + return Fn.join(value[0], Lazy.list({ produce: () => value[1] })); } case 'Fn::Cidr': { const value = this.parseValue(object[key]); @@ -670,7 +670,7 @@ export class CfnParser { // as Fn.valueOf() returns a string, // which is incorrect // (Fn::ValueOf can also return an array) - return Lazy.anyValue({ produce: () => ({ 'Fn::ValueOf': [param.logicalId, value[1]] }) }); + return Lazy.any({ produce: () => ({ 'Fn::ValueOf': [param.logicalId, value[1]] }) }); } default: // I don't want to hard-code the list of supported Rules-specific intrinsics in this function; diff --git a/packages/@aws-cdk/core/lib/lazy.ts b/packages/@aws-cdk/core/lib/lazy.ts index c4fa348dd56db..58eb3bd6522b9 100644 --- a/packages/@aws-cdk/core/lib/lazy.ts +++ b/packages/@aws-cdk/core/lib/lazy.ts @@ -13,6 +13,16 @@ export interface IStringProducer { produce(context: IResolveContext): string | undefined; } +/** + * Interface for (stable) lazy string producers + */ +export interface IStableStringProducer { + /** + * Produce the string value + */ + produce(): string | undefined; +} + /** * Interface for lazy list producers */ @@ -23,6 +33,16 @@ export interface IListProducer { produce(context: IResolveContext): string[] | undefined; } +/** + * Interface for (stable) lazy list producers + */ +export interface IStableListProducer { + /** + * Produce the list value + */ + produce(): string[] | undefined; +} + /** * Interface for lazy number producers */ @@ -33,6 +53,16 @@ export interface INumberProducer { produce(context: IResolveContext): number | undefined; } +/** + * Interface for (stable) lazy number producers + */ +export interface IStableNumberProducer { + /** + * Produce the number value + */ + produce(): number | undefined; +} + /** * Interface for lazy untyped value producers */ @@ -43,6 +73,16 @@ export interface IAnyProducer { produce(context: IResolveContext): any; } +/** + * Interface for (stable) lazy untyped value producers + */ +export interface IStableAnyProducer { + /** + * Produce the value + */ + produce(): any; +} + /** * Options for creating a lazy string token */ @@ -100,30 +140,202 @@ export interface LazyAnyValueOptions { * will only be calculated later, during synthesis. */ export class Lazy { + /** + * Defer the calculation of a string value to synthesis time + * + * Use this if you want to render a string to a template whose actual value depends on + * some state mutation that may happen after the construct has been created. + * + * If you are simply looking to force a value to a `string` type and don't need + * the calculation to be deferred, use `Token.asString()` instead. + * + * @deprecated Use `Lazy.string()` or `Lazy.uncachedString()` instead. + */ public static stringValue(producer: IStringProducer, options: LazyStringValueOptions = {}) { - return Token.asString(new LazyString(producer), options); + return Token.asString(new LazyString(producer, false), options); + } + + /** + * Defer the one-time calculation of a string value to synthesis time + * + * Use this if you want to render a string to a template whose actual value depends on + * some state mutation that may happen after the construct has been created. + * + * If you are simply looking to force a value to a `string` type and don't need + * the calculation to be deferred, use `Token.asString()` instead. + * + * The inner function will only be invoked once, and the resolved value + * cannot depend on the Stack the Token is used in. + */ + public static string(producer: IStableStringProducer, options: LazyStringValueOptions = {}) { + return Token.asString(new LazyString(producer, true), options); + } + + /** + * Defer the calculation of a string value to synthesis time + * + * Use of this function is not recommended; unless you know you need it for sure, you + * probably don't. Use `Lazy.string()` instead. + * + * The inner function may be invoked multiple times during synthesis. You + * should only use this method if the returned value depends on variables + * that may change during the Aspect application phase of synthesis, or if + * the value depends on the Stack the value is being used in. Both of these + * cases are rare, and only ever occur for AWS Construct Library authors. + */ + public static uncachedString(producer: IStringProducer, options: LazyStringValueOptions = {}) { + return Token.asString(new LazyString(producer, false), options); } + /** + * Defer the one-time calculation of a number value to synthesis time + * + * Use this if you want to render a number to a template whose actual value depends on + * some state mutation that may happen after the construct has been created. + * + * If you are simply looking to force a value to a `number` type and don't need + * the calculation to be deferred, use `Token.asNumber()` instead. + * + * @deprecated Use `Lazy.number()` or `Lazy.uncachedNumber()` instead. + */ public static numberValue(producer: INumberProducer) { - return Token.asNumber(new LazyNumber(producer)); + return Token.asNumber(new LazyNumber(producer, false)); + } + + /** + * Defer the one-time calculation of a number value to synthesis time + * + * Use this if you want to render a number to a template whose actual value depends on + * some state mutation that may happen after the construct has been created. + * + * If you are simply looking to force a value to a `number` type and don't need + * the calculation to be deferred, use `Token.asNumber()` instead. + * + * The inner function will only be invoked once, and the resolved value + * cannot depend on the Stack the Token is used in. + */ + public static number(producer: IStableNumberProducer) { + return Token.asNumber(new LazyNumber(producer, true)); + } + + /** + * Defer the calculation of a number value to synthesis time + * + * Use of this function is not recommended; unless you know you need it for sure, you + * probably don't. Use `Lazy.number()` instead. + * + * The inner function may be invoked multiple times during synthesis. You + * should only use this method if the returned value depends on variables + * that may change during the Aspect application phase of synthesis, or if + * the value depends on the Stack the value is being used in. Both of these + * cases are rare, and only ever occur for AWS Construct Library authors. + */ + public static uncachedNumber(producer: INumberProducer) { + return Token.asNumber(new LazyNumber(producer, false)); } + /** + * Defer the one-time calculation of a list value to synthesis time + * + * Use this if you want to render a list to a template whose actual value depends on + * some state mutation that may happen after the construct has been created. + * + * If you are simply looking to force a value to a `string[]` type and don't need + * the calculation to be deferred, use `Token.asList()` instead. + * + * @deprecated Use `Lazy.list()` or `Lazy.uncachedList()` instead. + */ public static listValue(producer: IListProducer, options: LazyListValueOptions = {}) { - return Token.asList(new LazyList(producer, options), options); + return Token.asList(new LazyList(producer, false, options), options); + } + + /** + * Defer the calculation of a list value to synthesis time + * + * Use of this function is not recommended; unless you know you need it for sure, you + * probably don't. Use `Lazy.list()` instead. + * + * The inner function may be invoked multiple times during synthesis. You + * should only use this method if the returned value depends on variables + * that may change during the Aspect application phase of synthesis, or if + * the value depends on the Stack the value is being used in. Both of these + * cases are rare, and only ever occur for AWS Construct Library authors. + */ + public static uncachedList(producer: IListProducer, options: LazyListValueOptions = {}) { + return Token.asList(new LazyList(producer, false, options), options); + } + + /** + * Defer the one-time calculation of a list value to synthesis time + * + * Use this if you want to render a list to a template whose actual value depends on + * some state mutation that may happen after the construct has been created. + * + * If you are simply looking to force a value to a `string[]` type and don't need + * the calculation to be deferred, use `Token.asList()` instead. + * + * The inner function will only be invoked once, and the resolved value + * cannot depend on the Stack the Token is used in. + */ + public static list(producer: IStableListProducer, options: LazyListValueOptions = {}) { + return Token.asList(new LazyList(producer, true, options), options); } + /** + * Defer the one-time calculation of an arbitrarily typed value to synthesis time + * + * Use this if you want to render an object to a template whose actual value depends on + * some state mutation that may happen after the construct has been created. + * + * @deprecated Use `Lazy.any()` or `Lazy.uncachedAny()` instead. + */ public static anyValue(producer: IAnyProducer, options: LazyAnyValueOptions = {}): IResolvable { - return new LazyAny(producer, options); + return new LazyAny(producer, false, options); + } + + /** + * Defer the one-time calculation of an arbitrarily typed value to synthesis time + * + * Use this if you want to render an object to a template whose actual value depends on + * some state mutation that may happen after the construct has been created. + * + * The inner function will only be invoked one time and cannot depend on + * resolution context. + */ + public static any(producer: IStableAnyProducer, options: LazyAnyValueOptions = {}): IResolvable { + return new LazyAny(producer, true, options); + } + + /** + * Defer the calculation of an untyped value to synthesis time + * + * Use of this function is not recommended; unless you know you need it for sure, you + * probably don't. Use `Lazy.any()` instead. + * + * The inner function may be invoked multiple times during synthesis. You + * should only use this method if the returned value depends on variables + * that may change during the Aspect application phase of synthesis, or if + * the value depends on the Stack the value is being used in. Both of these + * cases are rare, and only ever occur for AWS Construct Library authors. + */ + public static uncachedAny(producer: IAnyProducer, options: LazyAnyValueOptions = {}): IResolvable { + return new LazyAny(producer, false, options); } private constructor() { } } -abstract class LazyBase implements IResolvable { + +interface ILazyProducer { + produce(context: IResolveContext): A | undefined; +} + +abstract class LazyBase implements IResolvable { public readonly creationStack: string[]; + private _cached?: A; - constructor() { + constructor(private readonly producer: ILazyProducer, private readonly cache: boolean) { // Stack trace capture is conditionned to `debugModeEnabled()`, because // lazies can be created in a fairly thrashy way, and the stack traces are // large and slow to obtain; but are mostly useful only when debugging a @@ -133,7 +345,13 @@ abstract class LazyBase implements IResolvable { : [`Execute again with ${CDK_DEBUG}=true to capture stack traces`]; } - public abstract resolve(context: IResolveContext): any; + public resolve(context: IResolveContext) { + if (this.cache) { + return this._cached ?? (this._cached = this.producer.produce(context)); + } else { + return this.producer.produce(context); + } + } public toString() { return Token.asString(this); @@ -150,50 +368,36 @@ abstract class LazyBase implements IResolvable { } -class LazyString extends LazyBase { - constructor(private readonly producer: IStringProducer) { - super(); - } - - public resolve(context: IResolveContext) { - return this.producer.produce(context); - } +class LazyString extends LazyBase { } -class LazyNumber extends LazyBase { - constructor(private readonly producer: INumberProducer) { - super(); - } - - public resolve(context: IResolveContext) { - return this.producer.produce(context); - } +class LazyNumber extends LazyBase { } -class LazyList extends LazyBase { - constructor(private readonly producer: IListProducer, private readonly options: LazyListValueOptions = {}) { - super(); +class LazyList extends LazyBase> { + constructor(producer: IListProducer, cache: boolean, private readonly options: LazyListValueOptions = {}) { + super(producer, cache); } public resolve(context: IResolveContext) { - const ret = this.producer.produce(context); - if (ret !== undefined && ret.length === 0 && this.options.omitEmpty) { + const resolved = super.resolve(context); + if (resolved?.length === 0 && this.options.omitEmpty) { return undefined; } - return ret; + return resolved; } } -class LazyAny extends LazyBase { - constructor(private readonly producer: IAnyProducer, private readonly options: LazyAnyValueOptions = {}) { - super(); +class LazyAny extends LazyBase { + constructor(producer: IAnyProducer, cache: boolean, private readonly options: LazyAnyValueOptions = {}) { + super(producer, cache); } public resolve(context: IResolveContext) { - const ret = this.producer.produce(context); - if (Array.isArray(ret) && ret.length === 0 && this.options.omitEmptyArray) { + const resolved = super.resolve(context); + if (Array.isArray(resolved) && resolved.length === 0 && this.options.omitEmptyArray) { return undefined; } - return ret; + return resolved; } } diff --git a/packages/@aws-cdk/core/lib/nested-stack.ts b/packages/@aws-cdk/core/lib/nested-stack.ts index cca4b827b57cf..f130d00ded80b 100644 --- a/packages/@aws-cdk/core/lib/nested-stack.ts +++ b/packages/@aws-cdk/core/lib/nested-stack.ts @@ -120,8 +120,9 @@ export class NestedStack extends Stack { this.parameters = props.parameters || {}; this.resource = new CfnStack(parentScope, `${id}.NestedStackResource`, { - templateUrl: Lazy.stringValue({ produce: () => this._templateUrl || '' }), - parameters: Lazy.anyValue({ produce: () => Object.keys(this.parameters).length > 0 ? this.parameters : undefined }), + // This value cannot be cached since it changes during the synthesis phase + templateUrl: Lazy.uncachedString({ produce: () => this._templateUrl || '' }), + parameters: Lazy.any({ produce: () => Object.keys(this.parameters).length > 0 ? this.parameters : undefined }), notificationArns: props.notificationArns, timeoutInMinutes: props.timeout ? props.timeout.toMinutes() : undefined, }); diff --git a/packages/@aws-cdk/core/lib/private/cfn-reference.ts b/packages/@aws-cdk/core/lib/private/cfn-reference.ts index b25597602f6b6..34c3da0138ae8 100644 --- a/packages/@aws-cdk/core/lib/private/cfn-reference.ts +++ b/packages/@aws-cdk/core/lib/private/cfn-reference.ts @@ -50,7 +50,7 @@ export class CfnReference extends Reference { * the prepare() phase (for the purpose of cross-stack references), it's * important that the state isn't lost if it's lazily created, like so: * - * Lazy.stringValue({ produce: () => new CfnReference(...) }) + * Lazy.string({ produce: () => new CfnReference(...) }) * */ public static for(target: CfnElement, attribute: string, refRender?: ReferenceRendering) { diff --git a/packages/@aws-cdk/core/lib/private/metadata-resource.ts b/packages/@aws-cdk/core/lib/private/metadata-resource.ts index 09813ccb87faa..ff84b931f819b 100644 --- a/packages/@aws-cdk/core/lib/private/metadata-resource.ts +++ b/packages/@aws-cdk/core/lib/private/metadata-resource.ts @@ -51,7 +51,7 @@ export class MetadataResource extends Construct { const resource = new CfnResource(this, 'Default', { type: 'AWS::CDK::Metadata', properties: { - Modules: Lazy.stringValue({ produce: () => MetadataResource.modulesProperty() }), + Modules: Lazy.string({ produce: () => MetadataResource.modulesProperty() }), }, }); diff --git a/packages/@aws-cdk/core/lib/resource.ts b/packages/@aws-cdk/core/lib/resource.ts index 6a810b8a971e8..917a2c442dcf1 100644 --- a/packages/@aws-cdk/core/lib/resource.ts +++ b/packages/@aws-cdk/core/lib/resource.ts @@ -126,7 +126,7 @@ export abstract class Resource extends CoreConstruct implements IResource { // auto-generate only if cross-env is required this._physicalName = undefined; this._allowCrossEnvironment = true; - physicalName = Lazy.stringValue({ produce: () => this._physicalName }); + physicalName = Lazy.string({ produce: () => this._physicalName }); } else if (props.physicalName && !Token.isUnresolved(props.physicalName)) { // concrete value specified by the user this._physicalName = props.physicalName; @@ -181,7 +181,7 @@ export abstract class Resource extends CoreConstruct implements IResource { * @experimental */ protected getResourceNameAttribute(nameAttr: string) { - return Lazy.stringValue({ + return Lazy.uncachedString({ produce: (context: IResolveContext) => { const consumingStack = Stack.of(context.scope); diff --git a/packages/@aws-cdk/core/lib/token.ts b/packages/@aws-cdk/core/lib/token.ts index 35f2667f67365..5f98db7a4f11f 100644 --- a/packages/@aws-cdk/core/lib/token.ts +++ b/packages/@aws-cdk/core/lib/token.ts @@ -179,7 +179,7 @@ export class Tokenization { // only convert numbers to strings so that Refs, conditions, and other things don't end up synthesizing as [object object] if (Token.isUnresolved(x)) { - return Lazy.stringValue({ + return Lazy.uncachedString({ produce: context => { const resolved = context.resolve(x); return typeof resolved !== 'number' ? resolved : `${resolved}`; diff --git a/packages/@aws-cdk/core/test/cfn-json.test.ts b/packages/@aws-cdk/core/test/cfn-json.test.ts index 85ee12c822cb8..150d1971cc39f 100644 --- a/packages/@aws-cdk/core/test/cfn-json.test.ts +++ b/packages/@aws-cdk/core/test/cfn-json.test.ts @@ -42,7 +42,7 @@ nodeunitShim({ value: { [other.ref]: 1234, world: { - bar: `this is a ${Lazy.stringValue({ produce: () => 'I am lazy' })}`, + bar: `this is a ${Lazy.string({ produce: () => 'I am lazy' })}`, }, }, }); @@ -62,7 +62,7 @@ nodeunitShim({ const res = new CfnResource(stack, 'MyResource', { type: 'Foo' }); const cfnjson = new CfnJson(stack, 'MyCfnJson', { value: { - [`ref=${res.ref}`]: `this is a ${Lazy.stringValue({ produce: () => 'I am lazy' })}`, + [`ref=${res.ref}`]: `this is a ${Lazy.string({ produce: () => 'I am lazy' })}`, }, }); diff --git a/packages/@aws-cdk/core/test/cloudformation-json.test.ts b/packages/@aws-cdk/core/test/cloudformation-json.test.ts index 8d7e571501462..e9d850eb178a2 100644 --- a/packages/@aws-cdk/core/test/cloudformation-json.test.ts +++ b/packages/@aws-cdk/core/test/cloudformation-json.test.ts @@ -155,7 +155,7 @@ nodeunitShim({ 'Doubly nested strings evaluate correctly in JSON context'(test: Test) { // WHEN const stack = new Stack(); - const fidoSays = Lazy.stringValue({ produce: () => 'woof' }); + const fidoSays = Lazy.string({ produce: () => 'woof' }); // WHEN const resolved = stack.resolve(stack.toJsonString({ @@ -171,7 +171,7 @@ nodeunitShim({ 'Doubly nested intrinsics evaluate correctly in JSON context'(test: Test) { // GIVEN const stack = new Stack(); - const fidoSays = Lazy.anyValue({ produce: () => ({ Ref: 'Something' }) }); + const fidoSays = Lazy.any({ produce: () => ({ Ref: 'Something' }) }); // WHEN const resolved = stack.resolve(stack.toJsonString({ @@ -188,7 +188,7 @@ nodeunitShim({ 'Quoted strings in embedded JSON context are escaped'(test: Test) { // GIVEN const stack = new Stack(); - const fidoSays = Lazy.stringValue({ produce: () => '"woof"' }); + const fidoSays = Lazy.string({ produce: () => '"woof"' }); // WHEN const resolved = stack.resolve(stack.toJsonString({ @@ -235,6 +235,30 @@ nodeunitShim({ test.done(); }, + + 'Every Token used inside a JSONified string is given an opportunity to be uncached'(test: Test) { + // Check that tokens aren't accidentally fully resolved by the first invocation/resolution + // of toJsonString(). On every evaluation, Tokens referenced inside the structure should be + // given a chance to be either cached or uncached. + // + // (NOTE: This does not check whether the implementation of toJsonString() itself is cached or + // not; that depends on aws/aws-cdk#11224 and should be done in a different PR). + + // GIVEN + const app = new App(); + const stack = new Stack(app, 'Stack1'); + + // WHEN + let counter = 0; + const counterString = Token.asString({ resolve: () => `${++counter}` }); + const jsonString = stack.toJsonString({ counterString }); + + // THEN + expect(stack.resolve(jsonString)).toEqual('{"counterString":"1"}'); + expect(stack.resolve(jsonString)).toEqual('{"counterString":"2"}'); + + test.done(); + }, }); /** @@ -243,6 +267,6 @@ nodeunitShim({ function tokensThatResolveTo(value: any): Token[] { return [ new Intrinsic(value), - Lazy.anyValue({ produce: () => value }), + Lazy.any({ produce: () => value }), ]; } diff --git a/packages/@aws-cdk/core/test/construct.test.ts b/packages/@aws-cdk/core/test/construct.test.ts index 872ba9dceedca..a190ebaac7327 100644 --- a/packages/@aws-cdk/core/test/construct.test.ts +++ b/packages/@aws-cdk/core/test/construct.test.ts @@ -67,7 +67,7 @@ nodeunitShim({ 'dont allow unresolved tokens to be used in construct IDs'(test: Test) { // GIVEN const root = new Root(); - const token = Lazy.stringValue({ produce: () => 'lazy' }); + const token = Lazy.string({ produce: () => 'lazy' }); // WHEN + THEN test.throws(() => new Construct(root, `MyID: ${token}`), /Cannot use tokens in construct ID: MyID: \${Token/); diff --git a/packages/@aws-cdk/core/test/duration.test.ts b/packages/@aws-cdk/core/test/duration.test.ts index 4d84d80c3eaf7..70b7cb786e344 100644 --- a/packages/@aws-cdk/core/test/duration.test.ts +++ b/packages/@aws-cdk/core/test/duration.test.ts @@ -145,7 +145,7 @@ nodeunitShim({ 'to human string'(test: Test) { test.equal(Duration.minutes(0).toHumanString(), '0 minutes'); - test.equal(Duration.minutes(Lazy.numberValue({ produce: () => 5 })).toHumanString(), ' minutes'); + test.equal(Duration.minutes(Lazy.number({ produce: () => 5 })).toHumanString(), ' minutes'); test.equal(Duration.minutes(10).toHumanString(), '10 minutes'); test.equal(Duration.minutes(1).toHumanString(), '1 minute'); diff --git a/packages/@aws-cdk/core/test/private/physical-name-generator.test.ts b/packages/@aws-cdk/core/test/private/physical-name-generator.test.ts index 2d6e5e93d8d2a..22539e435b214 100644 --- a/packages/@aws-cdk/core/test/private/physical-name-generator.test.ts +++ b/packages/@aws-cdk/core/test/private/physical-name-generator.test.ts @@ -113,7 +113,7 @@ nodeunitShim({ isGeneratedWhenNeededMarker: { 'correctly response for other tokens'(test: Test) { test.ok(!isGeneratedWhenNeededMarker('this is not even a token!')); - test.ok(!isGeneratedWhenNeededMarker(Lazy.stringValue({ produce: () => 'Bazinga!' }))); + test.ok(!isGeneratedWhenNeededMarker(Lazy.string({ produce: () => 'Bazinga!' }))); test.done(); }, diff --git a/packages/@aws-cdk/core/test/private/tree-metadata.test.ts b/packages/@aws-cdk/core/test/private/tree-metadata.test.ts index ce64cf5991e1a..f62df683c422a 100644 --- a/packages/@aws-cdk/core/test/private/tree-metadata.test.ts +++ b/packages/@aws-cdk/core/test/private/tree-metadata.test.ts @@ -123,7 +123,7 @@ nodeunitShim({ class MyCfnResource extends AbstractCfnResource { protected get cfnProperties(): { [key: string]: any } { return { - lazykey: Lazy.stringValue({ produce: () => 'LazyResolved!' }), + lazykey: Lazy.string({ produce: () => 'LazyResolved!' }), cfnparamkey: cfnparam, }; } @@ -178,7 +178,7 @@ nodeunitShim({ constructor(scope: Construct, id: string) { super(scope, id); - this.lazykey = Lazy.stringValue({ produce: () => 'LazyResolved!' }); + this.lazykey = Lazy.string({ produce: () => 'LazyResolved!' }); } protected get cfnProperties(): { [key: string]: any } { diff --git a/packages/@aws-cdk/core/test/stack.test.ts b/packages/@aws-cdk/core/test/stack.test.ts index 50a91b7be7827..dad2a64b3235c 100644 --- a/packages/@aws-cdk/core/test/stack.test.ts +++ b/packages/@aws-cdk/core/test/stack.test.ts @@ -309,7 +309,7 @@ nodeunitShim({ const stack2 = new Stack(app, 'Stack2'); // WHEN - used in another stack - new CfnParameter(stack2, 'SomeParameter', { type: 'String', default: Lazy.stringValue({ produce: () => account1 }) }); + new CfnParameter(stack2, 'SomeParameter', { type: 'String', default: Lazy.string({ produce: () => account1 }) }); const assembly = app.synth(); const template1 = assembly.getStackByName(stack1.stackName).template; diff --git a/packages/@aws-cdk/core/test/tokens.test.ts b/packages/@aws-cdk/core/test/tokens.test.ts index e8dec9c64212a..39f4332d0ad86 100644 --- a/packages/@aws-cdk/core/test/tokens.test.ts +++ b/packages/@aws-cdk/core/test/tokens.test.ts @@ -273,7 +273,7 @@ nodeunitShim({ 'tokens can be nested in hash keys'(test: Test) { // GIVEN - const token = new Intrinsic(Lazy.stringValue({ produce: () => Lazy.stringValue({ produce: (() => 'I am a string') }) })); + const token = new Intrinsic(Lazy.string({ produce: () => Lazy.string({ produce: (() => 'I am a string') }) })); // WHEN const s = { @@ -285,6 +285,55 @@ nodeunitShim({ test.done(); }, + 'Function passed to Lazy.uncachedString() is evaluated multiple times'(test: Test) { + // GIVEN + let counter = 0; + const counterString = Lazy.uncachedString({ produce: () => `${++counter}` }); + + // THEN + expect(resolve(counterString)).toEqual('1'); + expect(resolve(counterString)).toEqual('2'); + + test.done(); + }, + + 'Function passed to Lazy.string() is only evaluated once'(test: Test) { + // GIVEN + let counter = 0; + const counterString = Lazy.string({ produce: () => `${++counter}` }); + + // THEN + expect(resolve(counterString)).toEqual('1'); + expect(resolve(counterString)).toEqual('1'); + + test.done(); + }, + + 'Uncached tokens returned by cached tokens are still evaluated multiple times'(test: Test) { + // Check that nested token returns aren't accidentally fully resolved by the + // first resolution. On every evaluation, Tokens referenced inside the + // structure should be given a chance to be either cached or uncached. + + // GIVEN + let counter = 0; + const uncachedToken = Lazy.uncachedString({ produce: () => `${++counter}` }); + // Directly returned + const counterString1 = Lazy.string({ produce: () => uncachedToken }); + // In quoted context + const counterString2 = Lazy.string({ produce: () => `->${uncachedToken}` }); + // In object context + const counterObject = Lazy.any({ produce: () => ({ finalCount: uncachedToken }) }); + + // THEN + expect(resolve(counterString1)).toEqual('1'); + expect(resolve(counterString1)).toEqual('2'); + expect(resolve(counterString2)).toEqual('->3'); + expect(resolve(counterString2)).toEqual('->4'); + expect(resolve(counterObject)).toEqual({ finalCount: '5' }); + + test.done(); + }, + 'tokens can be nested and concatenated in hash keys'(test: Test) { // GIVEN const innerToken = new Intrinsic( 'toot'); @@ -591,7 +640,7 @@ nodeunitShim({ 'creation stack is attached to errors emitted during resolve with CDK_DEBUG=true'(test: Test) { function showMeInTheStackTrace() { - return Lazy.stringValue({ produce: () => { throw new Error('fooError'); } }); + return Lazy.string({ produce: () => { throw new Error('fooError'); } }); } const previousValue = process.env.CDK_DEBUG; @@ -658,7 +707,7 @@ nodeunitShim({ 'lazy Ref remains the same'(test: Test) { const resolvedVal = { Ref: 'SomeLogicalId' }; - const tokenizedVal = Lazy.anyValue({ + const tokenizedVal = Lazy.any({ produce: () => resolvedVal, }); const res = Tokenization.stringifyNumber(tokenizedVal as any) as any; @@ -720,7 +769,7 @@ class DataType extends BaseDataType { function tokensThatResolveTo(value: any): Token[] { return [ new Intrinsic(value), - Lazy.anyValue({ produce: () => value }), + Lazy.any({ produce: () => value }), ]; } diff --git a/packages/@aws-cdk/pipelines/lib/actions/publish-assets-action.ts b/packages/@aws-cdk/pipelines/lib/actions/publish-assets-action.ts index 1e2adadafb52d..0c661b61e9251 100644 --- a/packages/@aws-cdk/pipelines/lib/actions/publish-assets-action.ts +++ b/packages/@aws-cdk/pipelines/lib/actions/publish-assets-action.ts @@ -116,7 +116,7 @@ export class PublishAssetsAction extends CoreConstruct implements codepipeline.I commands: `npm install -g cdk-assets${installSuffix}`, }, build: { - commands: Lazy.listValue({ produce: () => this.commands }), + commands: Lazy.list({ produce: () => this.commands }), }, }, }), diff --git a/packages/decdk/lib/declarative-stack.ts b/packages/decdk/lib/declarative-stack.ts index 8b937ecd3525e..a093d16a5922f 100644 --- a/packages/decdk/lib/declarative-stack.ts +++ b/packages/decdk/lib/declarative-stack.ts @@ -382,7 +382,7 @@ function invokeMethod(stack: cdk.Stack, method: reflect.Callable, parameters: an * an `Fn::GetAtt`. */ function deconstructGetAtt(stack: cdk.Stack, id: string, attribute: string) { - return cdk.Lazy.stringValue({ produce: () => { + return cdk.Lazy.string({ produce: () => { const res = stack.node.tryFindChild(id); if (!res) { const include = stack.node.tryFindChild('Include') as cdk.CfnInclude; From 3b34d3710920237147a360b9722f97ae01fb5c4c Mon Sep 17 00:00:00 2001 From: Piradeep Kandasamy <44981951+piradeepk@users.noreply.github.com> Date: Mon, 23 Nov 2020 14:02:01 -0500 Subject: [PATCH 197/314] chore(ecs): update task definition documentation (#11641) Clean up documentation around supported memory and cpu values configurable for a task definition. Fixes: https://github.com/aws/aws-cdk/issues/11112 --- packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts | 8 ++++++++ .../aws-ecs/lib/fargate/fargate-task-definition.ts | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts b/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts index 5d586b40ce5f3..ff27f00cb79a8 100644 --- a/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts +++ b/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts @@ -122,9 +122,13 @@ export interface TaskDefinitionProps extends CommonTaskDefinitionProps { * which determines your range of valid values for the memory parameter: * * 256 (.25 vCPU) - Available memory values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) + * * 512 (.5 vCPU) - Available memory values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) + * * 1024 (1 vCPU) - Available memory values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) + * * 2048 (2 vCPU) - Available memory values: Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) + * * 4096 (4 vCPU) - Available memory values: Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) * * @default - CPU units are not specified. @@ -139,9 +143,13 @@ export interface TaskDefinitionProps extends CommonTaskDefinitionProps { * which determines your range of valid values for the cpu parameter: * * 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu values: 256 (.25 vCPU) + * * 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu values: 512 (.5 vCPU) + * * 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available cpu values: 1024 (1 vCPU) + * * Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available cpu values: 2048 (2 vCPU) + * * Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available cpu values: 4096 (4 vCPU) * * @default - Memory used by task is not specified. diff --git a/packages/@aws-cdk/aws-ecs/lib/fargate/fargate-task-definition.ts b/packages/@aws-cdk/aws-ecs/lib/fargate/fargate-task-definition.ts index 4513e55debe63..eba4ac4371ee8 100644 --- a/packages/@aws-cdk/aws-ecs/lib/fargate/fargate-task-definition.ts +++ b/packages/@aws-cdk/aws-ecs/lib/fargate/fargate-task-definition.ts @@ -12,9 +12,13 @@ export interface FargateTaskDefinitionProps extends CommonTaskDefinitionProps { * which determines your range of valid values for the memory parameter: * * 256 (.25 vCPU) - Available memory values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) + * * 512 (.5 vCPU) - Available memory values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) + * * 1024 (1 vCPU) - Available memory values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) + * * 2048 (2 vCPU) - Available memory values: Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) + * * 4096 (4 vCPU) - Available memory values: Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) * * @default 256 @@ -26,9 +30,13 @@ export interface FargateTaskDefinitionProps extends CommonTaskDefinitionProps { * this field is required and you must use one of the following values, which determines your range of valid values for the cpu parameter: * * 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu values: 256 (.25 vCPU) + * * 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu values: 512 (.5 vCPU) + * * 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available cpu values: 1024 (1 vCPU) + * * Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available cpu values: 2048 (2 vCPU) + * * Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available cpu values: 4096 (4 vCPU) * * @default 512 From 2c045ce410e220311f10049da0d9789073eddb37 Mon Sep 17 00:00:00 2001 From: Eli Polonsky Date: Mon, 23 Nov 2020 22:09:09 +0200 Subject: [PATCH 198/314] fix(eks): cluster creation fails when configured with an imported public subnet and private endpoint (#11620) The problem was that we were checking for existence using the entire subnet object, instead of the subnet id. This breaks when the subnet selection is configured with concrete `Subnet` objects, since the existence check was using object comparison, instead of string (id). Fixes https://github.com/aws/aws-cdk/issues/11471 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-eks/lib/cluster.ts | 6 +- .../@aws-cdk/aws-eks/test/test.cluster.ts | 97 +++++++++++++++++++ 2 files changed, 101 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-eks/lib/cluster.ts b/packages/@aws-cdk/aws-eks/lib/cluster.ts index ec6f048a4de58..7974f988aff33 100644 --- a/packages/@aws-cdk/aws-eks/lib/cluster.ts +++ b/packages/@aws-cdk/aws-eks/lib/cluster.ts @@ -1352,18 +1352,20 @@ export class Cluster extends ClusterBase { private selectPrivateSubnets(): ec2.ISubnet[] { const privateSubnets: ec2.ISubnet[] = []; + const vpcPrivateSubnetIds = this.vpc.privateSubnets.map(s => s.subnetId); + const vpcPublicSubnetIds = this.vpc.publicSubnets.map(s => s.subnetId); for (const placement of this.vpcSubnets) { for (const subnet of this.vpc.selectSubnets(placement).subnets) { - if (this.vpc.privateSubnets.includes(subnet)) { + if (vpcPrivateSubnetIds.includes(subnet.subnetId)) { // definitely private, take it. privateSubnets.push(subnet); continue; } - if (this.vpc.publicSubnets.includes(subnet)) { + if (vpcPublicSubnetIds.includes(subnet.subnetId)) { // definitely public, skip it. continue; } diff --git a/packages/@aws-cdk/aws-eks/test/test.cluster.ts b/packages/@aws-cdk/aws-eks/test/test.cluster.ts index 170273d0485fe..facdf1880d426 100644 --- a/packages/@aws-cdk/aws-eks/test/test.cluster.ts +++ b/packages/@aws-cdk/aws-eks/test/test.cluster.ts @@ -2106,6 +2106,103 @@ export = { test.done(); }, + 'private endpoint access selects only private subnets from looked up vpc with concrete subnet selection'(test: Test) { + + const vpcId = 'vpc-12345'; + // can't use the regular fixture because it also adds a VPC to the stack, which prevents + // us from setting context. + const stack = new cdk.Stack(new cdk.App(), 'Stack', { + env: { + account: '11112222', + region: 'us-east-1', + }, + }); + stack.node.setContext(`vpc-provider:account=${stack.account}:filter.vpc-id=${vpcId}:region=${stack.region}:returnAsymmetricSubnets=true`, { + vpcId: vpcId, + vpcCidrBlock: '10.0.0.0/16', + subnetGroups: [ + { + name: 'Private', + type: 'Private', + subnets: [ + { + subnetId: 'subnet-private-in-us-east-1a', + cidr: '10.0.1.0/24', + availabilityZone: 'us-east-1a', + routeTableId: 'rtb-06068e4c4049921ef', + }, + ], + }, + { + name: 'Public', + type: 'Public', + subnets: [ + { + subnetId: 'subnet-public-in-us-east-1c', + cidr: '10.0.0.0/24', + availabilityZone: 'us-east-1c', + routeTableId: 'rtb-0ff08e62195198dbb', + }, + ], + }, + ], + }); + const vpc = ec2.Vpc.fromLookup(stack, 'Vpc', { + vpcId: vpcId, + }); + + new eks.Cluster(stack, 'Cluster', { + vpc, + version: CLUSTER_VERSION, + endpointAccess: eks.EndpointAccess.PRIVATE, + vpcSubnets: [{ + subnets: [ + ec2.Subnet.fromSubnetId(stack, 'Private', 'subnet-private-in-us-east-1a'), + ec2.Subnet.fromSubnetId(stack, 'Public', 'subnet-public-in-us-east-1c'), + ], + }], + }); + + const nested = stack.node.tryFindChild('@aws-cdk/aws-eks.KubectlProvider') as cdk.NestedStack; + const template = expect(nested).value; + + test.deepEqual(template.Resources.Handler886CB40B.Properties.VpcConfig.SubnetIds, [ + 'subnet-private-in-us-east-1a', + ]); + + test.done(); + }, + + 'private endpoint access selects only private subnets from managed vpc with concrete subnet selection'(test: Test) { + + const { stack } = testFixture(); + + const vpc = new ec2.Vpc(stack, 'Vpc'); + + new eks.Cluster(stack, 'Cluster', { + vpc, + version: CLUSTER_VERSION, + endpointAccess: eks.EndpointAccess.PRIVATE, + vpcSubnets: [{ + subnets: [ + vpc.privateSubnets[0], + vpc.publicSubnets[1], + ec2.Subnet.fromSubnetId(stack, 'Private', 'subnet-unknown'), + ], + }], + }); + + const nested = stack.node.tryFindChild('@aws-cdk/aws-eks.KubectlProvider') as cdk.NestedStack; + const template = expect(nested).value; + + test.deepEqual(template.Resources.Handler886CB40B.Properties.VpcConfig.SubnetIds, [ + { Ref: 'referencetoStackVpcPrivateSubnet1Subnet8E6A14CBRef' }, + 'subnet-unknown', + ]); + + test.done(); + }, + 'private endpoint access considers specific subnet selection'(test: Test) { const { stack } = testFixture(); new eks.Cluster(stack, 'Cluster', { From df4d1d3c44b7559e36cbc0adcd51d0b2250fc4e7 Mon Sep 17 00:00:00 2001 From: Dominic Fezzie Date: Mon, 23 Nov 2020 12:37:01 -0800 Subject: [PATCH 199/314] feat(appmesh): updates gateway resources to use shorter static method names (#11560) BREAKING CHANGE: renames gateway listener static methods to use shorter names * **appmesh:** renames gateway route static methods to use shorter names ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-appmesh/README.md | 8 +- .../aws-appmesh/lib/gateway-route-spec.ts | 34 +++--- .../lib/virtual-gateway-listener.ts | 107 ++++++++---------- .../aws-appmesh/lib/virtual-gateway.ts | 2 +- .../@aws-cdk/aws-appmesh/test/integ.mesh.ts | 8 +- .../aws-appmesh/test/test.gateway-route.ts | 10 +- .../aws-appmesh/test/test.virtual-gateway.ts | 12 +- 7 files changed, 84 insertions(+), 97 deletions(-) diff --git a/packages/@aws-cdk/aws-appmesh/README.md b/packages/@aws-cdk/aws-appmesh/README.md index 4bed6a9598541..7de09d776eff5 100644 --- a/packages/@aws-cdk/aws-appmesh/README.md +++ b/packages/@aws-cdk/aws-appmesh/README.md @@ -263,7 +263,7 @@ Create a virtual gateway with the constructor: ```typescript const gateway = new appmesh.VirtualGateway(stack, 'gateway', { mesh: mesh, - listeners: [appmesh.VirtualGatewayListener.httpGatewayListener({ + listeners: [appmesh.VirtualGatewayListener.http({ port: 443, healthCheck: { interval: cdk.Duration.seconds(10), @@ -280,7 +280,7 @@ Add a virtual gateway directly to the mesh: const gateway = mesh.addVirtualGateway('gateway', { accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout'), virtualGatewayName: 'virtualGateway', - listeners: [appmesh.VirtualGatewayListener.httpGatewayListener({ + listeners: [appmesh.VirtualGatewayListener.http({ port: 443, healthCheck: { interval: cdk.Duration.seconds(10), @@ -302,7 +302,7 @@ By default, an HTTP based route will match on `/`. All matches must start with a ```typescript gateway.addGatewayRoute('gateway-route-http', { - routeSpec: appmesh.GatewayRouteSpec.httpRouteSpec({ + routeSpec: appmesh.GatewayRouteSpec.http({ routeTarget: virtualService, match: { prefixMatch: '/', @@ -316,7 +316,7 @@ You cannot omit the field, and must specify a match for these routes. ```typescript gateway.addGatewayRoute('gateway-route-grpc', { - routeSpec: appmesh.GatewayRouteSpec.grpcRouteSpec({ + routeSpec: appmesh.GatewayRouteSpec.grpc({ routeTarget: virtualService, match: { serviceName: 'my-service.default.svc.cluster.local', diff --git a/packages/@aws-cdk/aws-appmesh/lib/gateway-route-spec.ts b/packages/@aws-cdk/aws-appmesh/lib/gateway-route-spec.ts index b75890ece1453..525bc4d2ba7e0 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/gateway-route-spec.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/gateway-route-spec.ts @@ -29,7 +29,7 @@ export interface GrpcGatewayRouteMatch { /** * Properties specific for HTTP Based GatewayRoutes */ -export interface HttpRouteSpecProps { +export interface HttpGatewayRouteSpecOptions { /** * The criterion for determining a request match for this GatewayRoute * @@ -46,7 +46,7 @@ export interface HttpRouteSpecProps { /** * Properties specific for a GRPC GatewayRoute */ -export interface GrpcRouteSpecProps { +export interface GrpcGatewayRouteSpecOptions { /** * The criterion for determining a request match for this GatewayRoute */ @@ -91,28 +91,28 @@ export abstract class GatewayRouteSpec { /** * Creates an HTTP Based GatewayRoute * - * @param props - no http gateway route + * @param options - no http gateway route */ - public static httpRouteSpec(props: HttpRouteSpecProps): GatewayRouteSpec { - return new HttpGatewayRouteSpec(props, Protocol.HTTP); + public static http(options: HttpGatewayRouteSpecOptions): GatewayRouteSpec { + return new HttpGatewayRouteSpec(options, Protocol.HTTP); } /** * Creates an HTTP2 Based GatewayRoute * - * @param props - no http2 gateway route + * @param options - no http2 gateway route */ - public static http2RouteSpec(props: HttpRouteSpecProps): GatewayRouteSpec { - return new HttpGatewayRouteSpec(props, Protocol.HTTP2); + public static http2(options: HttpGatewayRouteSpecOptions): GatewayRouteSpec { + return new HttpGatewayRouteSpec(options, Protocol.HTTP2); } /** * Creates an GRPC Based GatewayRoute * - * @param props - no grpc gateway route + * @param options - no grpc gateway route */ - public static grpcRouteSpec(props: GrpcRouteSpecProps): GatewayRouteSpec { - return new GrpcGatewayRouteSpec(props); + public static grpc(options: GrpcGatewayRouteSpecOptions): GatewayRouteSpec { + return new GrpcGatewayRouteSpec(options); } /** @@ -140,11 +140,11 @@ class HttpGatewayRouteSpec extends GatewayRouteSpec { */ readonly routeType: Protocol; - constructor(props: HttpRouteSpecProps, protocol: Protocol.HTTP | Protocol.HTTP2) { + constructor(options: HttpGatewayRouteSpecOptions, protocol: Protocol.HTTP | Protocol.HTTP2) { super(); - this.routeTarget = props.routeTarget; + this.routeTarget = options.routeTarget; this.routeType = protocol; - this.match = props.match; + this.match = options.match; } public bind(_scope: cdk.Construct): GatewayRouteSpecConfig { @@ -184,10 +184,10 @@ class GrpcGatewayRouteSpec extends GatewayRouteSpec { */ readonly routeTarget: IVirtualService; - constructor(props: GrpcRouteSpecProps) { + constructor(options: GrpcGatewayRouteSpecOptions) { super(); - this.match = props.match; - this.routeTarget = props.routeTarget; + this.match = options.match; + this.routeTarget = options.routeTarget; } public bind(_scope: cdk.Construct): GatewayRouteSpecConfig { diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway-listener.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway-listener.ts index a690c022f8c32..7b111dbc0a67d 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway-listener.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway-listener.ts @@ -6,7 +6,7 @@ import { HealthCheck, Protocol } from './shared-interfaces'; /** * Represents the properties needed to define HTTP Listeners for a VirtualGateway */ -export interface HttpGatewayListenerProps { +export interface HttpGatewayListenerOptions { /** * Port to listen for connections on * @@ -25,7 +25,7 @@ export interface HttpGatewayListenerProps { /** * Represents the properties needed to define GRPC Listeners for a VirtualGateway */ -export interface GrpcGatewayListenerProps { +export interface GrpcGatewayListenerOptions { /** * Port to listen for connections on * @@ -58,70 +58,29 @@ export abstract class VirtualGatewayListener { /** * Returns an HTTP Listener for a VirtualGateway */ - public static httpGatewayListener(props: HttpGatewayListenerProps = {}): VirtualGatewayListener { - return new HttpGatewayListener(props); + public static http(options: HttpGatewayListenerOptions = {}): VirtualGatewayListener { + return new HttpGatewayListener(options); } /** * Returns an HTTP2 Listener for a VirtualGateway */ - public static http2GatewayListener(props: HttpGatewayListenerProps = {}): VirtualGatewayListener { - return new Http2GatewayListener(props); + public static http2(options: HttpGatewayListenerOptions = {}): VirtualGatewayListener { + return new Http2GatewayListener(options); } /** * Returns a GRPC Listener for a VirtualGateway */ - public static grpcGatewayListener(props: GrpcGatewayListenerProps = {}): VirtualGatewayListener { - return new GrpcGatewayListener(props); + public static grpc(options: GrpcGatewayListenerOptions = {}): VirtualGatewayListener { + return new GrpcGatewayListener(options); } - /** - * Protocol the listener implements - */ - protected abstract protocol: Protocol; - - /** - * Port to listen for connections on - */ - protected abstract port: number; - - /** - * Health checking strategy upstream nodes should use when communicating with the listener - */ - protected abstract healthCheck?: HealthCheck; - /** * Called when the GatewayListener type is initialized. Can be used to enforce * mutual exclusivity */ public abstract bind(scope: cdk.Construct): VirtualGatewayListenerConfig; - - protected renderHealthCheck(hc: HealthCheck): CfnVirtualGateway.VirtualGatewayHealthCheckPolicyProperty | undefined { - if (hc.protocol === Protocol.TCP) { - throw new Error('TCP health checks are not permitted for gateway listeners'); - } - - if (hc.protocol === Protocol.GRPC && hc.path) { - throw new Error('The path property cannot be set with Protocol.GRPC'); - } - - const protocol = hc.protocol? hc.protocol : this.protocol; - - const healthCheck: CfnVirtualGateway.VirtualGatewayHealthCheckPolicyProperty = { - healthyThreshold: hc.healthyThreshold || 2, - intervalMillis: (hc.interval || cdk.Duration.seconds(5)).toMilliseconds(), // min - path: hc.path || ((protocol === Protocol.HTTP || protocol === Protocol.HTTP2) ? '/' : undefined), - port: hc.port || this.port, - protocol: hc.protocol || this.protocol, - timeoutMillis: (hc.timeout || cdk.Duration.seconds(2)).toMilliseconds(), - unhealthyThreshold: hc.unhealthyThreshold || 2, - }; - - validateHealthChecks(healthCheck); - - return healthCheck; - } } /** @@ -147,10 +106,10 @@ class HttpGatewayListener extends VirtualGatewayListener { */ protected protocol: Protocol = Protocol.HTTP; - constructor(props: HttpGatewayListenerProps = {}) { + constructor(options: HttpGatewayListenerOptions = {}) { super(); - this.port = props.port ? props.port : 8080; - this.healthCheck = props.healthCheck; + this.port = options.port ? options.port : 8080; + this.healthCheck = options.healthCheck; } /** @@ -164,7 +123,7 @@ class HttpGatewayListener extends VirtualGatewayListener { port: this.port, protocol: this.protocol, }, - healthCheck: this.healthCheck ? this.renderHealthCheck(this.healthCheck): undefined, + healthCheck: this.healthCheck ? renderHealthCheck(this.healthCheck, this.protocol, this.port): undefined, }, }; } @@ -174,8 +133,8 @@ class HttpGatewayListener extends VirtualGatewayListener { * Represents the properties needed to define an HTTP2 Listener for a VirtualGateway */ class Http2GatewayListener extends HttpGatewayListener { - constructor(props: HttpGatewayListenerProps = {}) { - super(props); + constructor(options: HttpGatewayListenerOptions = {}) { + super(options); this.protocol = Protocol.HTTP2; } } @@ -203,10 +162,10 @@ class GrpcGatewayListener extends VirtualGatewayListener { */ protected protocol: Protocol = Protocol.GRPC; - constructor(props: HttpGatewayListenerProps = {}) { + constructor(options: HttpGatewayListenerOptions = {}) { super(); - this.port = props.port ? props.port : 8080; - this.healthCheck = props.healthCheck; + this.port = options.port ? options.port : 8080; + this.healthCheck = options.healthCheck; } /** @@ -220,8 +179,36 @@ class GrpcGatewayListener extends VirtualGatewayListener { port: this.port, protocol: Protocol.GRPC, }, - healthCheck: this.healthCheck? this.renderHealthCheck(this.healthCheck): undefined, + healthCheck: this.healthCheck ? renderHealthCheck(this.healthCheck, this.protocol, this.port): undefined, }, }; } -} \ No newline at end of file +} + +function renderHealthCheck( + hc: HealthCheck, listenerProtocol: Protocol, listenerPort: number): CfnVirtualGateway.VirtualGatewayHealthCheckPolicyProperty { + + if (hc.protocol === Protocol.TCP) { + throw new Error('TCP health checks are not permitted for gateway listeners'); + } + + if (hc.protocol === Protocol.GRPC && hc.path) { + throw new Error('The path property cannot be set with Protocol.GRPC'); + } + + const protocol = hc.protocol? hc.protocol : listenerProtocol; + + const healthCheck: CfnVirtualGateway.VirtualGatewayHealthCheckPolicyProperty = { + healthyThreshold: hc.healthyThreshold || 2, + intervalMillis: (hc.interval || cdk.Duration.seconds(5)).toMilliseconds(), // min + path: hc.path || ((protocol === Protocol.HTTP || protocol === Protocol.HTTP2) ? '/' : undefined), + port: hc.port || listenerPort, + protocol: hc.protocol || listenerProtocol, + timeoutMillis: (hc.timeout || cdk.Duration.seconds(2)).toMilliseconds(), + unhealthyThreshold: hc.unhealthyThreshold || 2, + }; + + validateHealthChecks(healthCheck); + + return healthCheck; +} diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway.ts index 337807c9153da..4a0c5fef1af75 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway.ts @@ -161,7 +161,7 @@ export class VirtualGateway extends VirtualGatewayBase { if (!props.listeners) { // Use listener default of http listener port 8080 if no listener is defined - this.listeners.push(VirtualGatewayListener.httpGatewayListener().bind(this)); + this.listeners.push(VirtualGatewayListener.http().bind(this)); } else { props.listeners.forEach(listener => this.listeners.push(listener.bind(this))); } diff --git a/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts b/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts index 782ca6cee1f83..1a064b5ce7031 100644 --- a/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts +++ b/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts @@ -131,7 +131,7 @@ const gateway = mesh.addVirtualGateway('gateway1', { new appmesh.VirtualGateway(stack, 'gateway2', { mesh: mesh, - listeners: [appmesh.VirtualGatewayListener.httpGatewayListener({ + listeners: [appmesh.VirtualGatewayListener.http({ port: 443, healthCheck: { interval: cdk.Duration.seconds(10), @@ -140,19 +140,19 @@ new appmesh.VirtualGateway(stack, 'gateway2', { }); gateway.addGatewayRoute('gateway1-route-http', { - routeSpec: appmesh.GatewayRouteSpec.httpRouteSpec({ + routeSpec: appmesh.GatewayRouteSpec.http({ routeTarget: virtualService, }), }); gateway.addGatewayRoute('gateway1-route-http2', { - routeSpec: appmesh.GatewayRouteSpec.http2RouteSpec({ + routeSpec: appmesh.GatewayRouteSpec.http2({ routeTarget: virtualService, }), }); gateway.addGatewayRoute('gateway1-route-grpc', { - routeSpec: appmesh.GatewayRouteSpec.grpcRouteSpec({ + routeSpec: appmesh.GatewayRouteSpec.grpc({ routeTarget: virtualService, match: { serviceName: virtualService.virtualServiceName, diff --git a/packages/@aws-cdk/aws-appmesh/test/test.gateway-route.ts b/packages/@aws-cdk/aws-appmesh/test/test.gateway-route.ts index 2f08e58bb873a..a741ec0b0d1d8 100644 --- a/packages/@aws-cdk/aws-appmesh/test/test.gateway-route.ts +++ b/packages/@aws-cdk/aws-appmesh/test/test.gateway-route.ts @@ -16,7 +16,7 @@ export = { }); const virtualGateway = new appmesh.VirtualGateway(stack, 'gateway-1', { - listeners: [appmesh.VirtualGatewayListener.httpGatewayListener()], + listeners: [appmesh.VirtualGatewayListener.http()], mesh: mesh, }); @@ -27,21 +27,21 @@ export = { // Add an HTTP Route virtualGateway.addGatewayRoute('gateway-http-route', { - routeSpec: appmesh.GatewayRouteSpec.httpRouteSpec({ + routeSpec: appmesh.GatewayRouteSpec.http({ routeTarget: virtualService, }), gatewayRouteName: 'gateway-http-route', }); virtualGateway.addGatewayRoute('gateway-http2-route', { - routeSpec: appmesh.GatewayRouteSpec.http2RouteSpec({ + routeSpec: appmesh.GatewayRouteSpec.http2({ routeTarget: virtualService, }), gatewayRouteName: 'gateway-http2-route', }); virtualGateway.addGatewayRoute('gateway-grpc-route', { - routeSpec: appmesh.GatewayRouteSpec.grpcRouteSpec({ + routeSpec: appmesh.GatewayRouteSpec.grpc({ routeTarget: virtualService, match: { serviceName: virtualService.virtualServiceName, @@ -122,7 +122,7 @@ export = { }); const virtualService = mesh.addVirtualService('testVirtualService'); - test.throws(() => appmesh.GatewayRouteSpec.httpRouteSpec({ + test.throws(() => appmesh.GatewayRouteSpec.http({ routeTarget: virtualService, match: { prefixPath: 'wrong', diff --git a/packages/@aws-cdk/aws-appmesh/test/test.virtual-gateway.ts b/packages/@aws-cdk/aws-appmesh/test/test.virtual-gateway.ts index f5c020426c9b9..8e76b0f5c85f5 100644 --- a/packages/@aws-cdk/aws-appmesh/test/test.virtual-gateway.ts +++ b/packages/@aws-cdk/aws-appmesh/test/test.virtual-gateway.ts @@ -21,7 +21,7 @@ export = { new appmesh.VirtualGateway(stack, 'httpGateway', { mesh: mesh, - listeners: [appmesh.VirtualGatewayListener.httpGatewayListener({ + listeners: [appmesh.VirtualGatewayListener.http({ port: 443, healthCheck: { interval: cdk.Duration.seconds(10), @@ -31,7 +31,7 @@ export = { new appmesh.VirtualGateway(stack, 'http2Gateway', { mesh: mesh, - listeners: [appmesh.VirtualGatewayListener.http2GatewayListener({ + listeners: [appmesh.VirtualGatewayListener.http2({ port: 443, healthCheck: { interval: cdk.Duration.seconds(10), @@ -113,7 +113,7 @@ export = { new appmesh.VirtualGateway(stack, 'testGateway', { virtualGatewayName: 'test-gateway', - listeners: [appmesh.VirtualGatewayListener.grpcGatewayListener({ + listeners: [appmesh.VirtualGatewayListener.grpc({ port: 80, healthCheck: { }, @@ -174,7 +174,7 @@ export = { virtualGateway.addGatewayRoute('testGatewayRoute', { gatewayRouteName: 'test-gateway-route', - routeSpec: appmesh.GatewayRouteSpec.httpRouteSpec({ + routeSpec: appmesh.GatewayRouteSpec.http({ routeTarget: virtualService, }), }); @@ -218,13 +218,13 @@ export = { const virtualGateway = mesh.addVirtualGateway('gateway'); virtualGateway.addGatewayRoute('testGatewayRoute', { gatewayRouteName: 'test-gateway-route', - routeSpec: appmesh.GatewayRouteSpec.httpRouteSpec({ + routeSpec: appmesh.GatewayRouteSpec.http({ routeTarget: virtualService, }), }); virtualGateway.addGatewayRoute('testGatewayRoute2', { gatewayRouteName: 'test-gateway-route-2', - routeSpec: appmesh.GatewayRouteSpec.httpRouteSpec({ + routeSpec: appmesh.GatewayRouteSpec.http({ routeTarget: virtualService, }), }); From 3246b670730c4369469f6a43683a27f24c732825 Mon Sep 17 00:00:00 2001 From: AWS CDK Automation <43080478+aws-cdk-automation@users.noreply.github.com> Date: Mon, 23 Nov 2020 22:56:15 +0100 Subject: [PATCH 200/314] feat(cfnspec): cloudformation spec v20.3.0 (#11539) This spec update had a few issues: - `AWS::DataBrew::Recipe.Action` was missing a type (it is a Map of string to string). - `AWS::DataBrew::Recipe.RecipeStep` included both `PrimitiveType` of `Json` and `Type` of `Action` (removed `PrimitiveType`). - The `SessionTimeout` property of `AWS::ElasticLoadBalancingV2::Listener` was changed from `number` to `string`, so the L2 had to be updated. --- packages/@aws-cdk/aws-databrew/.eslintrc.js | 3 + packages/@aws-cdk/aws-databrew/.gitignore | 19 + packages/@aws-cdk/aws-databrew/.npmignore | 28 + packages/@aws-cdk/aws-databrew/LICENSE | 201 +++ packages/@aws-cdk/aws-databrew/NOTICE | 2 + packages/@aws-cdk/aws-databrew/README.md | 16 + packages/@aws-cdk/aws-databrew/jest.config.js | 2 + packages/@aws-cdk/aws-databrew/lib/index.ts | 2 + packages/@aws-cdk/aws-databrew/package.json | 96 ++ .../aws-databrew/test/databrew.test.ts | 6 + .../lib/cognito-action.ts | 2 +- .../lib/alb/application-listener-action.ts | 2 +- packages/@aws-cdk/cfnspec/CHANGELOG.md | 83 ++ packages/@aws-cdk/cfnspec/cfn.version | 2 +- ...0_CloudFormationResourceSpecification.json | 1321 ++++++++++++++++- .../spec-source/700_DataBrew_patch.json | 32 + .../cloudformation-include/package.json | 2 + packages/aws-cdk-lib/package.json | 1 + packages/decdk/package.json | 1 + packages/monocdk/package.json | 1 + 20 files changed, 1800 insertions(+), 22 deletions(-) create mode 100644 packages/@aws-cdk/aws-databrew/.eslintrc.js create mode 100644 packages/@aws-cdk/aws-databrew/.gitignore create mode 100644 packages/@aws-cdk/aws-databrew/.npmignore create mode 100644 packages/@aws-cdk/aws-databrew/LICENSE create mode 100644 packages/@aws-cdk/aws-databrew/NOTICE create mode 100644 packages/@aws-cdk/aws-databrew/README.md create mode 100644 packages/@aws-cdk/aws-databrew/jest.config.js create mode 100644 packages/@aws-cdk/aws-databrew/lib/index.ts create mode 100644 packages/@aws-cdk/aws-databrew/package.json create mode 100644 packages/@aws-cdk/aws-databrew/test/databrew.test.ts create mode 100644 packages/@aws-cdk/cfnspec/spec-source/700_DataBrew_patch.json diff --git a/packages/@aws-cdk/aws-databrew/.eslintrc.js b/packages/@aws-cdk/aws-databrew/.eslintrc.js new file mode 100644 index 0000000000000..61dd8dd001f63 --- /dev/null +++ b/packages/@aws-cdk/aws-databrew/.eslintrc.js @@ -0,0 +1,3 @@ +const baseConfig = require('cdk-build-tools/config/eslintrc'); +baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-databrew/.gitignore b/packages/@aws-cdk/aws-databrew/.gitignore new file mode 100644 index 0000000000000..62ebc95d75ce6 --- /dev/null +++ b/packages/@aws-cdk/aws-databrew/.gitignore @@ -0,0 +1,19 @@ +*.js +*.js.map +*.d.ts +tsconfig.json +node_modules +*.generated.ts +dist +.jsii + +.LAST_BUILD +.nyc_output +coverage +.nycrc +.LAST_PACKAGE +*.snk +nyc.config.js +!.eslintrc.js +!jest.config.js +junit.xml diff --git a/packages/@aws-cdk/aws-databrew/.npmignore b/packages/@aws-cdk/aws-databrew/.npmignore new file mode 100644 index 0000000000000..e4486030fcb17 --- /dev/null +++ b/packages/@aws-cdk/aws-databrew/.npmignore @@ -0,0 +1,28 @@ +# Don't include original .ts files when doing `npm pack` +*.ts +!*.d.ts +coverage +.nyc_output +*.tgz + +dist +.LAST_PACKAGE +.LAST_BUILD +!*.js + +# Include .jsii +!.jsii + +*.snk + +*.tsbuildinfo + +tsconfig.json + +.eslintrc.js +jest.config.js + +# exclude cdk artifacts +**/cdk.out +junit.xml +test/ diff --git a/packages/@aws-cdk/aws-databrew/LICENSE b/packages/@aws-cdk/aws-databrew/LICENSE new file mode 100644 index 0000000000000..b71ec1688783a --- /dev/null +++ b/packages/@aws-cdk/aws-databrew/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/@aws-cdk/aws-databrew/NOTICE b/packages/@aws-cdk/aws-databrew/NOTICE new file mode 100644 index 0000000000000..bfccac9a7f69c --- /dev/null +++ b/packages/@aws-cdk/aws-databrew/NOTICE @@ -0,0 +1,2 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-databrew/README.md b/packages/@aws-cdk/aws-databrew/README.md new file mode 100644 index 0000000000000..d3ad1b0618ed8 --- /dev/null +++ b/packages/@aws-cdk/aws-databrew/README.md @@ -0,0 +1,16 @@ +## AWS::DataBrew Construct Library + +--- + +![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) + +> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. + +--- + + +This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. + +```ts +import databrew = require('@aws-cdk/aws-databrew'); +``` diff --git a/packages/@aws-cdk/aws-databrew/jest.config.js b/packages/@aws-cdk/aws-databrew/jest.config.js new file mode 100644 index 0000000000000..54e28beb9798b --- /dev/null +++ b/packages/@aws-cdk/aws-databrew/jest.config.js @@ -0,0 +1,2 @@ +const baseConfig = require('cdk-build-tools/config/jest.config'); +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-databrew/lib/index.ts b/packages/@aws-cdk/aws-databrew/lib/index.ts new file mode 100644 index 0000000000000..1e8de6dfda21a --- /dev/null +++ b/packages/@aws-cdk/aws-databrew/lib/index.ts @@ -0,0 +1,2 @@ +// AWS::DataBrew CloudFormation Resources: +export * from './databrew.generated'; diff --git a/packages/@aws-cdk/aws-databrew/package.json b/packages/@aws-cdk/aws-databrew/package.json new file mode 100644 index 0000000000000..4fe82b685a9fc --- /dev/null +++ b/packages/@aws-cdk/aws-databrew/package.json @@ -0,0 +1,96 @@ +{ + "name": "@aws-cdk/aws-databrew", + "version": "0.0.0", + "description": "The CDK Construct Library for AWS::DataBrew", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "jsii": { + "outdir": "dist", + "projectReferences": true, + "targets": { + "dotnet": { + "namespace": "Amazon.CDK.AWS.DataBrew", + "packageId": "Amazon.CDK.AWS.DataBrew", + "signAssembly": true, + "assemblyOriginatorKeyFile": "../../key.snk", + "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/master/logo/default-256-dark.png" + }, + "java": { + "package": "software.amazon.awscdk.services.databrew", + "maven": { + "groupId": "software.amazon.awscdk", + "artifactId": "databrew" + } + }, + "python": { + "classifiers": [ + "Framework :: AWS CDK", + "Framework :: AWS CDK :: 1" + ], + "distName": "aws-cdk.aws-databrew", + "module": "aws_cdk.aws_databrew" + } + } + }, + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk.git", + "directory": "packages/@aws-cdk/aws-databrew" + }, + "homepage": "https://github.com/aws/aws-cdk", + "scripts": { + "build": "cdk-build", + "watch": "cdk-watch", + "lint": "cdk-lint", + "test": "cdk-test", + "integ": "cdk-integ", + "pkglint": "pkglint -f", + "package": "cdk-package", + "awslint": "cdk-awslint", + "cfn2ts": "cfn2ts", + "build+test+package": "npm run build+test && npm run package", + "build+test": "npm run build && npm test", + "compat": "cdk-compat", + "gen": "cfn2ts" + }, + "cdk-build": { + "cloudformation": "AWS::DataBrew", + "jest": true, + "env": { + "AWSLINT_BASE_CONSTRUCT": "true" + } + }, + "keywords": [ + "aws", + "cdk", + "constructs", + "AWS::DataBrew", + "aws-databrew" + ], + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "license": "Apache-2.0", + "devDependencies": { + "@aws-cdk/assert": "0.0.0", + "cdk-build-tools": "0.0.0", + "cfn2ts": "0.0.0", + "pkglint": "0.0.0" + }, + "dependencies": { + "@aws-cdk/core": "0.0.0" + }, + "peerDependencies": { + "@aws-cdk/core": "0.0.0" + }, + "engines": { + "node": ">= 10.13.0 <13 || >=13.7.0" + }, + "stability": "experimental", + "maturity": "cfn-only", + "awscdkio": { + "announce": false + } +} diff --git a/packages/@aws-cdk/aws-databrew/test/databrew.test.ts b/packages/@aws-cdk/aws-databrew/test/databrew.test.ts new file mode 100644 index 0000000000000..e394ef336bfb4 --- /dev/null +++ b/packages/@aws-cdk/aws-databrew/test/databrew.test.ts @@ -0,0 +1,6 @@ +import '@aws-cdk/assert/jest'; +import {} from '../lib'; + +test('No tests are specified for this package', () => { + expect(true).toBe(true); +}); diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/lib/cognito-action.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/lib/cognito-action.ts index 425e8e8f29a31..13b725a3deb3b 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/lib/cognito-action.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/lib/cognito-action.ts @@ -85,7 +85,7 @@ export class AuthenticateCognitoAction extends elbv2.ListenerAction { onUnauthenticatedRequest: options.onUnauthenticatedRequest, scope: options.scope, sessionCookieName: options.sessionCookieName, - sessionTimeout: options.sessionTimeout?.toSeconds(), + sessionTimeout: options.sessionTimeout?.toSeconds().toString(), }, }, options.next); } diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener-action.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener-action.ts index 9b3e713a6115c..09ae095c46a92 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener-action.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener-action.ts @@ -40,7 +40,7 @@ export class ListenerAction implements IListenerAction { onUnauthenticatedRequest: options.onUnauthenticatedRequest, scope: options.scope, sessionCookieName: options.sessionCookieName, - sessionTimeout: options.sessionTimeout?.toSeconds(), + sessionTimeout: options.sessionTimeout?.toSeconds().toString(), }, }, options.next); } diff --git a/packages/@aws-cdk/cfnspec/CHANGELOG.md b/packages/@aws-cdk/cfnspec/CHANGELOG.md index 8a871d71fe7ce..217f5b27025d8 100644 --- a/packages/@aws-cdk/cfnspec/CHANGELOG.md +++ b/packages/@aws-cdk/cfnspec/CHANGELOG.md @@ -1,3 +1,86 @@ +# CloudFormation Resource Specification v20.3.0 + +## New Resource Types + +* AWS::DataBrew::Dataset +* AWS::DataBrew::Job +* AWS::DataBrew::Project +* AWS::DataBrew::Recipe +* AWS::DataBrew::Schedule + +## Attribute Changes + +* AWS::ElasticLoadBalancingV2::Listener ListenerArn (__added__) + +## Property Changes + +* AWS::CodeStar::GitHubRepository ConnectionArn (__added__) +* AWS::CodeStar::GitHubRepository RepositoryAccessToken.Required (__changed__) + * Old: true + * New: false +* AWS::DMS::ReplicationInstance AvailabilityZone.UpdateType (__changed__) + * Old: Immutable + * New: Mutable +* AWS::EC2::ClientVpnEndpoint ClientConnectOptions (__added__) +* AWS::EC2::VPCEndpointService GatewayLoadBalancerArns (__added__) +* AWS::ElasticLoadBalancingV2::Listener AlpnPolicy.DuplicatesAllowed (__deleted__) +* AWS::Lambda::EventSourceMapping PartialBatchResponse (__added__) +* AWS::Lambda::EventSourceMapping TumblingWindowInSeconds (__added__) + +## Property Type Changes + +* AWS::AppMesh::VirtualGateway.VirtualGatewayConnectionPool (__added__) +* AWS::AppMesh::VirtualGateway.VirtualGatewayGrpcConnectionPool (__added__) +* AWS::AppMesh::VirtualGateway.VirtualGatewayHttp2ConnectionPool (__added__) +* AWS::AppMesh::VirtualGateway.VirtualGatewayHttpConnectionPool (__added__) +* AWS::AppMesh::VirtualNode.OutlierDetection (__added__) +* AWS::AppMesh::VirtualNode.VirtualNodeConnectionPool (__added__) +* AWS::AppMesh::VirtualNode.VirtualNodeGrpcConnectionPool (__added__) +* AWS::AppMesh::VirtualNode.VirtualNodeHttp2ConnectionPool (__added__) +* AWS::AppMesh::VirtualNode.VirtualNodeHttpConnectionPool (__added__) +* AWS::AppMesh::VirtualNode.VirtualNodeTcpConnectionPool (__added__) +* AWS::EC2::ClientVpnEndpoint.ClientConnectOptions (__added__) +* AWS::AppFlow::ConnectorProfile.SalesforceConnectorProfileCredentials ClientCredentialsArn (__added__) +* AWS::AppMesh::VirtualGateway.VirtualGatewayListener ConnectionPool (__added__) +* AWS::AppMesh::VirtualNode.Listener ConnectionPool (__added__) +* AWS::AppMesh::VirtualNode.Listener OutlierDetection (__added__) +* AWS::ElasticLoadBalancingV2::Listener.Action AuthenticateCognitoConfig.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-action-authenticatecognitoconfig + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-authenticatecognitoconfig +* AWS::ElasticLoadBalancingV2::Listener.Action AuthenticateOidcConfig.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-action-authenticateoidcconfig + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-authenticateoidcconfig +* AWS::ElasticLoadBalancingV2::Listener.Action FixedResponseConfig.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-action-fixedresponseconfig + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-fixedresponseconfig +* AWS::ElasticLoadBalancingV2::Listener.Action ForwardConfig.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-action-forwardconfig + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-forwardconfig +* AWS::ElasticLoadBalancingV2::Listener.Action Order.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-action-order + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-order +* AWS::ElasticLoadBalancingV2::Listener.Action RedirectConfig.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-action-redirectconfig + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-redirectconfig +* AWS::ElasticLoadBalancingV2::Listener.Action TargetGroupArn.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-defaultactions-targetgrouparn + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-targetgrouparn +* AWS::ElasticLoadBalancingV2::Listener.Action Type.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-defaultactions-type + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-type +* AWS::ElasticLoadBalancingV2::Listener.AuthenticateCognitoConfig AuthenticationRequestExtraParams.DuplicatesAllowed (__deleted__) +* AWS::ElasticLoadBalancingV2::Listener.AuthenticateCognitoConfig SessionTimeout.PrimitiveType (__changed__) + * Old: Long + * New: String +* AWS::ElasticLoadBalancingV2::Listener.AuthenticateOidcConfig AuthenticationRequestExtraParams.DuplicatesAllowed (__deleted__) +* AWS::ElasticLoadBalancingV2::Listener.AuthenticateOidcConfig SessionTimeout.PrimitiveType (__changed__) + * Old: Long + * New: String +* AWS::ElasticLoadBalancingV2::Listener.Certificate CertificateArn.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-certificates.html#cfn-elasticloadbalancingv2-listener-certificates-certificatearn + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-certificate.html#cfn-elasticloadbalancingv2-listener-certificate-certificatearn + + # CloudFormation Resource Specification v20.2.0 ## New Resource Types diff --git a/packages/@aws-cdk/cfnspec/cfn.version b/packages/@aws-cdk/cfnspec/cfn.version index 86d4688d0910a..4adfbc353177e 100644 --- a/packages/@aws-cdk/cfnspec/cfn.version +++ b/packages/@aws-cdk/cfnspec/cfn.version @@ -1 +1 @@ -20.2.0 +20.3.0 diff --git a/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json b/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json index e9a8d24f35f4f..0d142fe207d30 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json +++ b/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json @@ -2288,6 +2288,12 @@ "Required": false, "UpdateType": "Mutable" }, + "ClientCredentialsArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-connectorprofile-salesforceconnectorprofilecredentials.html#cfn-appflow-connectorprofile-salesforceconnectorprofilecredentials-clientcredentialsarn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "ConnectorOAuthRequest": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-connectorprofile-salesforceconnectorprofilecredentials.html#cfn-appflow-connectorprofile-salesforceconnectorprofilecredentials-connectoroauthrequest", "Required": false, @@ -3950,6 +3956,29 @@ } } }, + "AWS::AppMesh::VirtualGateway.VirtualGatewayConnectionPool": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewayconnectionpool.html", + "Properties": { + "GRPC": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewayconnectionpool.html#cfn-appmesh-virtualgateway-virtualgatewayconnectionpool-grpc", + "Required": false, + "Type": "VirtualGatewayGrpcConnectionPool", + "UpdateType": "Mutable" + }, + "HTTP": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewayconnectionpool.html#cfn-appmesh-virtualgateway-virtualgatewayconnectionpool-http", + "Required": false, + "Type": "VirtualGatewayHttpConnectionPool", + "UpdateType": "Mutable" + }, + "HTTP2": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewayconnectionpool.html#cfn-appmesh-virtualgateway-virtualgatewayconnectionpool-http2", + "Required": false, + "Type": "VirtualGatewayHttp2ConnectionPool", + "UpdateType": "Mutable" + } + } + }, "AWS::AppMesh::VirtualGateway.VirtualGatewayFileAccessLog": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewayfileaccesslog.html", "Properties": { @@ -3961,6 +3990,17 @@ } } }, + "AWS::AppMesh::VirtualGateway.VirtualGatewayGrpcConnectionPool": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewaygrpcconnectionpool.html", + "Properties": { + "MaxRequests": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewaygrpcconnectionpool.html#cfn-appmesh-virtualgateway-virtualgatewaygrpcconnectionpool-maxrequests", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::AppMesh::VirtualGateway.VirtualGatewayHealthCheckPolicy": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewayhealthcheckpolicy.html", "Properties": { @@ -4008,9 +4048,43 @@ } } }, + "AWS::AppMesh::VirtualGateway.VirtualGatewayHttp2ConnectionPool": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewayhttp2connectionpool.html", + "Properties": { + "MaxRequests": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewayhttp2connectionpool.html#cfn-appmesh-virtualgateway-virtualgatewayhttp2connectionpool-maxrequests", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::AppMesh::VirtualGateway.VirtualGatewayHttpConnectionPool": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewayhttpconnectionpool.html", + "Properties": { + "MaxConnections": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewayhttpconnectionpool.html#cfn-appmesh-virtualgateway-virtualgatewayhttpconnectionpool-maxconnections", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + }, + "MaxPendingRequests": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewayhttpconnectionpool.html#cfn-appmesh-virtualgateway-virtualgatewayhttpconnectionpool-maxpendingrequests", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::AppMesh::VirtualGateway.VirtualGatewayListener": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewaylistener.html", "Properties": { + "ConnectionPool": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewaylistener.html#cfn-appmesh-virtualgateway-virtualgatewaylistener-connectionpool", + "Required": false, + "Type": "VirtualGatewayConnectionPool", + "UpdateType": "Mutable" + }, "HealthCheck": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewaylistener.html#cfn-appmesh-virtualgateway-virtualgatewaylistener-healthcheck", "Required": false, @@ -4428,12 +4502,24 @@ "AWS::AppMesh::VirtualNode.Listener": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-listener.html", "Properties": { + "ConnectionPool": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-listener.html#cfn-appmesh-virtualnode-listener-connectionpool", + "Required": false, + "Type": "VirtualNodeConnectionPool", + "UpdateType": "Mutable" + }, "HealthCheck": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-listener.html#cfn-appmesh-virtualnode-listener-healthcheck", "Required": false, "Type": "HealthCheck", "UpdateType": "Mutable" }, + "OutlierDetection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-listener.html#cfn-appmesh-virtualnode-listener-outlierdetection", + "Required": false, + "Type": "OutlierDetection", + "UpdateType": "Mutable" + }, "PortMapping": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-listener.html#cfn-appmesh-virtualnode-listener-portmapping", "Required": true, @@ -4556,6 +4642,35 @@ } } }, + "AWS::AppMesh::VirtualNode.OutlierDetection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-outlierdetection.html", + "Properties": { + "BaseEjectionDuration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-outlierdetection.html#cfn-appmesh-virtualnode-outlierdetection-baseejectionduration", + "Required": true, + "Type": "Duration", + "UpdateType": "Mutable" + }, + "Interval": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-outlierdetection.html#cfn-appmesh-virtualnode-outlierdetection-interval", + "Required": true, + "Type": "Duration", + "UpdateType": "Mutable" + }, + "MaxEjectionPercent": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-outlierdetection.html#cfn-appmesh-virtualnode-outlierdetection-maxejectionpercent", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + }, + "MaxServerErrors": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-outlierdetection.html#cfn-appmesh-virtualnode-outlierdetection-maxservererrors", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::AppMesh::VirtualNode.PortMapping": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-portmapping.html", "Properties": { @@ -4652,6 +4767,74 @@ } } }, + "AWS::AppMesh::VirtualNode.VirtualNodeConnectionPool": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodeconnectionpool.html", + "Properties": { + "GRPC": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodeconnectionpool.html#cfn-appmesh-virtualnode-virtualnodeconnectionpool-grpc", + "Required": false, + "Type": "VirtualNodeGrpcConnectionPool", + "UpdateType": "Mutable" + }, + "HTTP": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodeconnectionpool.html#cfn-appmesh-virtualnode-virtualnodeconnectionpool-http", + "Required": false, + "Type": "VirtualNodeHttpConnectionPool", + "UpdateType": "Mutable" + }, + "HTTP2": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodeconnectionpool.html#cfn-appmesh-virtualnode-virtualnodeconnectionpool-http2", + "Required": false, + "Type": "VirtualNodeHttp2ConnectionPool", + "UpdateType": "Mutable" + }, + "TCP": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodeconnectionpool.html#cfn-appmesh-virtualnode-virtualnodeconnectionpool-tcp", + "Required": false, + "Type": "VirtualNodeTcpConnectionPool", + "UpdateType": "Mutable" + } + } + }, + "AWS::AppMesh::VirtualNode.VirtualNodeGrpcConnectionPool": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodegrpcconnectionpool.html", + "Properties": { + "MaxRequests": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodegrpcconnectionpool.html#cfn-appmesh-virtualnode-virtualnodegrpcconnectionpool-maxrequests", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::AppMesh::VirtualNode.VirtualNodeHttp2ConnectionPool": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodehttp2connectionpool.html", + "Properties": { + "MaxRequests": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodehttp2connectionpool.html#cfn-appmesh-virtualnode-virtualnodehttp2connectionpool-maxrequests", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::AppMesh::VirtualNode.VirtualNodeHttpConnectionPool": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodehttpconnectionpool.html", + "Properties": { + "MaxConnections": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodehttpconnectionpool.html#cfn-appmesh-virtualnode-virtualnodehttpconnectionpool-maxconnections", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + }, + "MaxPendingRequests": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodehttpconnectionpool.html#cfn-appmesh-virtualnode-virtualnodehttpconnectionpool-maxpendingrequests", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::AppMesh::VirtualNode.VirtualNodeSpec": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodespec.html", "Properties": { @@ -4689,6 +4872,17 @@ } } }, + "AWS::AppMesh::VirtualNode.VirtualNodeTcpConnectionPool": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodetcpconnectionpool.html", + "Properties": { + "MaxConnections": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodetcpconnectionpool.html#cfn-appmesh-virtualnode-virtualnodetcpconnectionpool-maxconnections", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::AppMesh::VirtualNode.VirtualServiceBackend": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualservicebackend.html", "Properties": { @@ -12591,6 +12785,796 @@ } } }, + "AWS::DataBrew::Job.Output": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-output.html", + "Properties": { + "CompressionFormat": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-output.html#cfn-databrew-job-output-compressionformat", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Format": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-output.html#cfn-databrew-job-output-format", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Location": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-output.html#cfn-databrew-job-output-location", + "Required": true, + "Type": "S3Location", + "UpdateType": "Mutable" + }, + "Overwrite": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-output.html#cfn-databrew-job-output-overwrite", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "PartitionColumns": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-output.html#cfn-databrew-job-output-partitioncolumns", + "DuplicatesAllowed": false, + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::DataBrew::Job.S3Location": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-s3location.html", + "Properties": { + "Bucket": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-s3location.html#cfn-databrew-job-s3location-bucket", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Key": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-s3location.html#cfn-databrew-job-s3location-key", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::DataBrew::Recipe.Action": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-action.html", + "Properties": { + "Operation": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-action.html#cfn-databrew-recipe-action-operation", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Parameters": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-action.html#cfn-databrew-recipe-action-parameters", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::DataBrew::Recipe.ConditionExpression": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-conditionexpression.html", + "Properties": { + "Condition": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-conditionexpression.html#cfn-databrew-recipe-conditionexpression-condition", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "TargetColumn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-conditionexpression.html#cfn-databrew-recipe-conditionexpression-targetcolumn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-conditionexpression.html#cfn-databrew-recipe-conditionexpression-value", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::DataBrew::Recipe.DataCatalogInputDefinition": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-datacataloginputdefinition.html", + "Properties": { + "CatalogId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-datacataloginputdefinition.html#cfn-databrew-recipe-datacataloginputdefinition-catalogid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "DatabaseName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-datacataloginputdefinition.html#cfn-databrew-recipe-datacataloginputdefinition-databasename", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "TableName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-datacataloginputdefinition.html#cfn-databrew-recipe-datacataloginputdefinition-tablename", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "TempDirectory": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-datacataloginputdefinition.html#cfn-databrew-recipe-datacataloginputdefinition-tempdirectory", + "Required": false, + "Type": "S3Location", + "UpdateType": "Mutable" + } + } + }, + "AWS::DataBrew::Recipe.RecipeParameters": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html", + "Properties": { + "AggregateFunction": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-aggregatefunction", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Base": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-base", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "CaseStatement": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-casestatement", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "CategoryMap": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-categorymap", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "CharsToRemove": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-charstoremove", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "CollapseConsecutiveWhitespace": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-collapseconsecutivewhitespace", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "ColumnDataType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-columndatatype", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "ColumnRange": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-columnrange", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Count": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-count", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "CustomCharacters": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-customcharacters", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "CustomStopWords": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-customstopwords", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "CustomValue": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-customvalue", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "DatasetsColumns": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-datasetscolumns", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "DateAddValue": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-dateaddvalue", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "DateTimeFormat": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-datetimeformat", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "DateTimeParameters": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-datetimeparameters", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "DeleteOtherRows": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-deleteotherrows", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Delimiter": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-delimiter", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "EndPattern": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-endpattern", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "EndPosition": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-endposition", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "EndValue": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-endvalue", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "ExpandContractions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-expandcontractions", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Exponent": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-exponent", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "FalseString": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-falsestring", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "GroupByAggFunctionOptions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-groupbyaggfunctionoptions", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "GroupByColumns": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-groupbycolumns", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "HiddenColumns": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-hiddencolumns", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "IgnoreCase": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-ignorecase", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "IncludeInSplit": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-includeinsplit", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Input": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-input", + "PrimitiveType": "Json", + "Required": false, + "UpdateType": "Mutable" + }, + "Interval": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-interval", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "IsText": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-istext", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "JoinKeys": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-joinkeys", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "JoinType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-jointype", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "LeftColumns": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-leftcolumns", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Limit": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-limit", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "LowerBound": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-lowerbound", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "MapType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-maptype", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "ModeType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-modetype", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "MultiLine": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-multiline", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "NumRows": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-numrows", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "NumRowsAfter": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-numrowsafter", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "NumRowsBefore": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-numrowsbefore", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "OrderByColumn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-orderbycolumn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "OrderByColumns": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-orderbycolumns", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Other": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-other", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Pattern": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-pattern", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "PatternOption1": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-patternoption1", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "PatternOption2": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-patternoption2", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "PatternOptions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-patternoptions", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Period": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-period", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Position": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-position", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "RemoveAllPunctuation": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-removeallpunctuation", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "RemoveAllQuotes": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-removeallquotes", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "RemoveAllWhitespace": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-removeallwhitespace", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "RemoveCustomCharacters": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-removecustomcharacters", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "RemoveCustomValue": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-removecustomvalue", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "RemoveLeadingAndTrailingPunctuation": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-removeleadingandtrailingpunctuation", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "RemoveLeadingAndTrailingQuotes": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-removeleadingandtrailingquotes", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "RemoveLeadingAndTrailingWhitespace": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-removeleadingandtrailingwhitespace", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "RemoveLetters": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-removeletters", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "RemoveNumbers": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-removenumbers", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "RemoveSourceColumn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-removesourcecolumn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "RemoveSpecialCharacters": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-removespecialcharacters", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "RightColumns": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-rightcolumns", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "SampleSize": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-samplesize", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "SampleType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-sampletype", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "SecondInput": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-secondinput", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "SecondaryInputs": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-secondaryinputs", + "DuplicatesAllowed": true, + "ItemType": "SecondaryInput", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "SheetIndexes": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-sheetindexes", + "PrimitiveItemType": "Integer", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "SheetNames": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-sheetnames", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "SourceColumn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-sourcecolumn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "SourceColumn1": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-sourcecolumn1", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "SourceColumn2": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-sourcecolumn2", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "SourceColumns": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-sourcecolumns", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "StartColumnIndex": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-startcolumnindex", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "StartPattern": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-startpattern", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "StartPosition": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-startposition", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "StartValue": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-startvalue", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "StemmingMode": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-stemmingmode", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "StepCount": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-stepcount", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "StepIndex": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-stepindex", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "StopWordsMode": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-stopwordsmode", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Strategy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-strategy", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "TargetColumn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-targetcolumn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "TargetColumnNames": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-targetcolumnnames", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "TargetDateFormat": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-targetdateformat", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "TargetIndex": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-targetindex", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "TimeZone": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-timezone", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "TokenizerPattern": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-tokenizerpattern", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "TrueString": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-truestring", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "UdfLang": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-udflang", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Units": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-units", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "UnpivotColumn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-unpivotcolumn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "UpperBound": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-upperbound", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "UseNewDataFrame": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-usenewdataframe", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-value", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Value1": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-value1", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Value2": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-value2", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "ValueColumn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-valuecolumn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "ViewFrame": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-viewframe", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::DataBrew::Recipe.RecipeStep": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipestep.html", + "Properties": { + "Action": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipestep.html#cfn-databrew-recipe-recipestep-action", + "PrimitiveType": "Json", + "Required": true, + "Type": "Action", + "UpdateType": "Mutable" + }, + "ConditionExpressions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipestep.html#cfn-databrew-recipe-recipestep-conditionexpressions", + "ItemType": "ConditionExpression", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::DataBrew::Recipe.S3Location": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-s3location.html", + "Properties": { + "Bucket": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-s3location.html#cfn-databrew-recipe-s3location-bucket", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Key": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-s3location.html#cfn-databrew-recipe-s3location-key", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::DataBrew::Recipe.SecondaryInput": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-secondaryinput.html", + "Properties": { + "DataCatalogInputDefinition": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-secondaryinput.html#cfn-databrew-recipe-secondaryinput-datacataloginputdefinition", + "Required": false, + "Type": "DataCatalogInputDefinition", + "UpdateType": "Mutable" + }, + "S3InputDefinition": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-secondaryinput.html#cfn-databrew-recipe-secondaryinput-s3inputdefinition", + "Required": false, + "Type": "S3Location", + "UpdateType": "Mutable" + } + } + }, "AWS::DataPipeline::Pipeline.Field": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-pipelineobjects-fields.html", "Properties": { @@ -13006,6 +13990,23 @@ } } }, + "AWS::EC2::ClientVpnEndpoint.ClientConnectOptions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-clientvpnendpoint-clientconnectoptions.html", + "Properties": { + "Enabled": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-clientvpnendpoint-clientconnectoptions.html#cfn-ec2-clientvpnendpoint-clientconnectoptions-enabled", + "PrimitiveType": "Boolean", + "Required": true, + "UpdateType": "Mutable" + }, + "LambdaFunctionArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-clientvpnendpoint-clientconnectoptions.html#cfn-ec2-clientvpnendpoint-clientconnectoptions-lambdafunctionarn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::EC2::ClientVpnEndpoint.ConnectionLogOptions": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-clientvpnendpoint-connectionlogoptions.html", "Properties": { @@ -18522,52 +19523,52 @@ } }, "AWS::ElasticLoadBalancingV2::Listener.Action": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html", "Properties": { "AuthenticateCognitoConfig": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-action-authenticatecognitoconfig", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-authenticatecognitoconfig", "Required": false, "Type": "AuthenticateCognitoConfig", "UpdateType": "Mutable" }, "AuthenticateOidcConfig": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-action-authenticateoidcconfig", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-authenticateoidcconfig", "Required": false, "Type": "AuthenticateOidcConfig", "UpdateType": "Mutable" }, "FixedResponseConfig": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-action-fixedresponseconfig", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-fixedresponseconfig", "Required": false, "Type": "FixedResponseConfig", "UpdateType": "Mutable" }, "ForwardConfig": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-action-forwardconfig", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-forwardconfig", "Required": false, "Type": "ForwardConfig", "UpdateType": "Mutable" }, "Order": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-action-order", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-order", "PrimitiveType": "Integer", "Required": false, "UpdateType": "Mutable" }, "RedirectConfig": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-action-redirectconfig", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-redirectconfig", "Required": false, "Type": "RedirectConfig", "UpdateType": "Mutable" }, "TargetGroupArn": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-defaultactions-targetgrouparn", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-targetgrouparn", "PrimitiveType": "String", "Required": false, "UpdateType": "Mutable" }, "Type": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-defaultactions-type", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-type", "PrimitiveType": "String", "Required": true, "UpdateType": "Mutable" @@ -18579,7 +19580,6 @@ "Properties": { "AuthenticationRequestExtraParams": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticatecognitoconfig.html#cfn-elasticloadbalancingv2-listener-authenticatecognitoconfig-authenticationrequestextraparams", - "DuplicatesAllowed": false, "PrimitiveItemType": "String", "Required": false, "Type": "Map", @@ -18605,7 +19605,7 @@ }, "SessionTimeout": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticatecognitoconfig.html#cfn-elasticloadbalancingv2-listener-authenticatecognitoconfig-sessiontimeout", - "PrimitiveType": "Long", + "PrimitiveType": "String", "Required": false, "UpdateType": "Mutable" }, @@ -18634,7 +19634,6 @@ "Properties": { "AuthenticationRequestExtraParams": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticateoidcconfig.html#cfn-elasticloadbalancingv2-listener-authenticateoidcconfig-authenticationrequestextraparams", - "DuplicatesAllowed": false, "PrimitiveItemType": "String", "Required": false, "Type": "Map", @@ -18684,7 +19683,7 @@ }, "SessionTimeout": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticateoidcconfig.html#cfn-elasticloadbalancingv2-listener-authenticateoidcconfig-sessiontimeout", - "PrimitiveType": "Long", + "PrimitiveType": "String", "Required": false, "UpdateType": "Mutable" }, @@ -18703,10 +19702,10 @@ } }, "AWS::ElasticLoadBalancingV2::Listener.Certificate": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-certificates.html", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-certificate.html", "Properties": { "CertificateArn": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-certificates.html#cfn-elasticloadbalancingv2-listener-certificates-certificatearn", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-certificate.html#cfn-elasticloadbalancingv2-listener-certificate-certificatearn", "PrimitiveType": "String", "Required": false, "UpdateType": "Mutable" @@ -43274,7 +44273,7 @@ } } }, - "ResourceSpecificationVersion": "20.2.0", + "ResourceSpecificationVersion": "20.3.0", "ResourceTypes": { "AWS::ACMPCA::Certificate": { "Attributes": { @@ -49883,6 +50882,12 @@ "Type": "Code", "UpdateType": "Mutable" }, + "ConnectionArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestar-githubrepository.html#cfn-codestar-githubrepository-connectionarn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "EnableIssues": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestar-githubrepository.html#cfn-codestar-githubrepository-enableissues", "PrimitiveType": "Boolean", @@ -49898,7 +50903,7 @@ "RepositoryAccessToken": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestar-githubrepository.html#cfn-codestar-githubrepository-repositoryaccesstoken", "PrimitiveType": "String", - "Required": true, + "Required": false, "UpdateType": "Mutable" }, "RepositoryDescription": { @@ -51432,7 +52437,7 @@ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dms-replicationinstance.html#cfn-dms-replicationinstance-availabilityzone", "PrimitiveType": "String", "Required": false, - "UpdateType": "Immutable" + "UpdateType": "Mutable" }, "EngineVersion": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dms-replicationinstance.html#cfn-dms-replicationinstance-engineversion", @@ -51607,6 +52612,255 @@ } } }, + "AWS::DataBrew::Dataset": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-dataset.html", + "Properties": { + "FormatOptions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-dataset.html#cfn-databrew-dataset-formatoptions", + "PrimitiveType": "Json", + "Required": false, + "UpdateType": "Mutable" + }, + "Input": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-dataset.html#cfn-databrew-dataset-input", + "PrimitiveType": "Json", + "Required": true, + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-dataset.html#cfn-databrew-dataset-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-dataset.html#cfn-databrew-dataset-tags", + "DuplicatesAllowed": true, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Immutable" + } + } + }, + "AWS::DataBrew::Job": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html", + "Properties": { + "DatasetName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-datasetname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "EncryptionKeyArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-encryptionkeyarn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "EncryptionMode": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-encryptionmode", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "LogSubscription": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-logsubscription", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "MaxCapacity": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-maxcapacity", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "MaxRetries": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-maxretries", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "OutputLocation": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-outputlocation", + "PrimitiveType": "Json", + "Required": false, + "UpdateType": "Mutable" + }, + "Outputs": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-outputs", + "ItemType": "Output", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "ProjectName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-projectname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Recipe": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-recipe", + "PrimitiveType": "Json", + "Required": false, + "UpdateType": "Mutable" + }, + "RoleArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-rolearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-tags", + "DuplicatesAllowed": true, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Immutable" + }, + "Timeout": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-timeout", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "Type": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-type", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, + "AWS::DataBrew::Project": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-project.html", + "Properties": { + "DatasetName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-project.html#cfn-databrew-project-datasetname", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-project.html#cfn-databrew-project-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "RecipeName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-project.html#cfn-databrew-project-recipename", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "RoleArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-project.html#cfn-databrew-project-rolearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Sample": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-project.html#cfn-databrew-project-sample", + "PrimitiveType": "Json", + "Required": false, + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-project.html#cfn-databrew-project-tags", + "DuplicatesAllowed": true, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Immutable" + } + } + }, + "AWS::DataBrew::Recipe": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-recipe.html", + "Properties": { + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-recipe.html#cfn-databrew-recipe-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-recipe.html#cfn-databrew-recipe-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "ProjectName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-recipe.html#cfn-databrew-recipe-projectname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Steps": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-recipe.html#cfn-databrew-recipe-steps", + "ItemType": "RecipeStep", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-recipe.html#cfn-databrew-recipe-tags", + "DuplicatesAllowed": true, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Immutable" + }, + "Version": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-recipe.html#cfn-databrew-recipe-version", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::DataBrew::Schedule": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-schedule.html", + "Properties": { + "CronExpression": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-schedule.html#cfn-databrew-schedule-cronexpression", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "JobNames": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-schedule.html#cfn-databrew-schedule-jobnames", + "DuplicatesAllowed": false, + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-schedule.html#cfn-databrew-schedule-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-schedule.html#cfn-databrew-schedule-tags", + "DuplicatesAllowed": true, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Immutable" + } + } + }, "AWS::DataPipeline::Pipeline": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datapipeline-pipeline.html", "Properties": { @@ -52335,6 +53589,12 @@ "Required": true, "UpdateType": "Immutable" }, + "ClientConnectOptions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-clientvpnendpoint.html#cfn-ec2-clientvpnendpoint-clientconnectoptions", + "Required": false, + "Type": "ClientConnectOptions", + "UpdateType": "Mutable" + }, "ConnectionLogOptions": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-clientvpnendpoint.html#cfn-ec2-clientvpnendpoint-connectionlogoptions", "Required": true, @@ -54470,6 +55730,13 @@ "Required": false, "UpdateType": "Mutable" }, + "GatewayLoadBalancerArns": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcendpointservice.html#cfn-ec2-vpcendpointservice-gatewayloadbalancerarns", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, "NetworkLoadBalancerArns": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcendpointservice.html#cfn-ec2-vpcendpointservice-networkloadbalancerarns", "PrimitiveItemType": "String", @@ -56711,11 +57978,15 @@ } }, "AWS::ElasticLoadBalancingV2::Listener": { + "Attributes": { + "ListenerArn": { + "PrimitiveType": "String" + } + }, "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listener.html", "Properties": { "AlpnPolicy": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listener.html#cfn-elasticloadbalancingv2-listener-alpnpolicy", - "DuplicatesAllowed": false, "PrimitiveItemType": "String", "Required": false, "Type": "List", @@ -62023,6 +63294,12 @@ "Required": false, "UpdateType": "Mutable" }, + "PartialBatchResponse": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-partialbatchresponse", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, "Queues": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-queues", "DuplicatesAllowed": false, @@ -62052,6 +63329,12 @@ "Required": false, "Type": "List", "UpdateType": "Mutable" + }, + "TumblingWindowInSeconds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-tumblingwindowinseconds", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" } } }, diff --git a/packages/@aws-cdk/cfnspec/spec-source/700_DataBrew_patch.json b/packages/@aws-cdk/cfnspec/spec-source/700_DataBrew_patch.json new file mode 100644 index 0000000000000..12e9cd1768ea6 --- /dev/null +++ b/packages/@aws-cdk/cfnspec/spec-source/700_DataBrew_patch.json @@ -0,0 +1,32 @@ +{ + "PropertyTypes": { + "AWS::DataBrew::Recipe.Action": { + "patch": { + "description": "AWS::DataBrew::Recipe.Action.Parameters does not have a type", + "operations": [ + { + "op": "add", + "path": "/Properties/Parameters/Type", + "value": "Map" + }, + { + "op": "add", + "path": "/Properties/Parameters/PrimitiveItemType", + "value": "String" + } + ] + } + }, + "AWS::DataBrew::Recipe.RecipeStep": { + "patch": { + "description": "AWS::DataBrew::Recipe.RecipeStep.Action has both PrimitiveType and Type", + "operations": [ + { + "op": "remove", + "path": "/Properties/Action/PrimitiveType" + } + ] + } + } + } +} diff --git a/packages/@aws-cdk/cloudformation-include/package.json b/packages/@aws-cdk/cloudformation-include/package.json index 787e999447b0c..73b41baf6a3a7 100644 --- a/packages/@aws-cdk/cloudformation-include/package.json +++ b/packages/@aws-cdk/cloudformation-include/package.json @@ -106,6 +106,7 @@ "@aws-cdk/aws-codestarnotifications": "0.0.0", "@aws-cdk/aws-cognito": "0.0.0", "@aws-cdk/aws-config": "0.0.0", + "@aws-cdk/aws-databrew": "0.0.0", "@aws-cdk/aws-datapipeline": "0.0.0", "@aws-cdk/aws-dax": "0.0.0", "@aws-cdk/aws-detective": "0.0.0", @@ -239,6 +240,7 @@ "@aws-cdk/aws-codestarnotifications": "0.0.0", "@aws-cdk/aws-cognito": "0.0.0", "@aws-cdk/aws-config": "0.0.0", + "@aws-cdk/aws-databrew": "0.0.0", "@aws-cdk/aws-datapipeline": "0.0.0", "@aws-cdk/aws-dax": "0.0.0", "@aws-cdk/aws-detective": "0.0.0", diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index cfb97631655f4..6fb76cd3eca49 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -149,6 +149,7 @@ "@aws-cdk/aws-codestarnotifications": "0.0.0", "@aws-cdk/aws-cognito": "0.0.0", "@aws-cdk/aws-config": "0.0.0", + "@aws-cdk/aws-databrew": "0.0.0", "@aws-cdk/aws-datapipeline": "0.0.0", "@aws-cdk/aws-dax": "0.0.0", "@aws-cdk/aws-detective": "0.0.0", diff --git a/packages/decdk/package.json b/packages/decdk/package.json index f7ff60585e9cd..f0b086c41264f 100644 --- a/packages/decdk/package.json +++ b/packages/decdk/package.json @@ -76,6 +76,7 @@ "@aws-cdk/aws-codestarnotifications": "0.0.0", "@aws-cdk/aws-cognito": "0.0.0", "@aws-cdk/aws-config": "0.0.0", + "@aws-cdk/aws-databrew": "0.0.0", "@aws-cdk/aws-datapipeline": "0.0.0", "@aws-cdk/aws-dax": "0.0.0", "@aws-cdk/aws-detective": "0.0.0", diff --git a/packages/monocdk/package.json b/packages/monocdk/package.json index 49e674e35ea0f..367ee89c1d98a 100644 --- a/packages/monocdk/package.json +++ b/packages/monocdk/package.json @@ -148,6 +148,7 @@ "@aws-cdk/aws-codestarnotifications": "0.0.0", "@aws-cdk/aws-cognito": "0.0.0", "@aws-cdk/aws-config": "0.0.0", + "@aws-cdk/aws-databrew": "0.0.0", "@aws-cdk/aws-datapipeline": "0.0.0", "@aws-cdk/aws-dax": "0.0.0", "@aws-cdk/aws-detective": "0.0.0", From 2465852eb71461ab984c901bd00933860234c6bb Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2020 22:28:42 +0000 Subject: [PATCH 201/314] chore(deps): bump table from 6.0.3 to 6.0.4 (#11632) Bumps [table](https://github.com/gajus/table) from 6.0.3 to 6.0.4. - [Release notes](https://github.com/gajus/table/releases) - [Commits](https://github.com/gajus/table/compare/v6.0.3...v6.0.4) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/cloudformation-diff/package.json | 2 +- packages/aws-cdk/package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/@aws-cdk/cloudformation-diff/package.json b/packages/@aws-cdk/cloudformation-diff/package.json index e465c8aa10595..1f0284428620e 100644 --- a/packages/@aws-cdk/cloudformation-diff/package.json +++ b/packages/@aws-cdk/cloudformation-diff/package.json @@ -26,7 +26,7 @@ "diff": "^5.0.0", "fast-deep-equal": "^3.1.3", "string-width": "^4.2.0", - "table": "^6.0.3" + "table": "^6.0.4" }, "devDependencies": { "@types/jest": "^26.0.15", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index a79504918a893..b52524dcdda73 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -84,7 +84,7 @@ "proxy-agent": "^4.0.0", "semver": "^7.3.2", "source-map-support": "^0.5.19", - "table": "^6.0.3", + "table": "^6.0.4", "uuid": "^8.3.1", "wrap-ansi": "^7.0.0", "yargs": "^16.1.1" diff --git a/yarn.lock b/yarn.lock index 122b5b0c73dca..a6a4bca415753 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9441,10 +9441,10 @@ table@^5.2.3: slice-ansi "^2.1.0" string-width "^3.0.0" -table@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/table/-/table-6.0.3.tgz#e5b8a834e37e27ad06de2e0fda42b55cfd8a0123" - integrity sha512-8321ZMcf1B9HvVX/btKv8mMZahCjn2aYrDlpqHaBFCfnox64edeH9kEid0vTLTRR8gWR2A20aDgeuTTea4sVtw== +table@^6.0.4: + version "6.0.4" + resolved "https://registry.yarnpkg.com/table/-/table-6.0.4.tgz#c523dd182177e926c723eb20e1b341238188aa0d" + integrity sha512-sBT4xRLdALd+NFBvwOz8bw4b15htyythha+q+DVZqy2RS08PPC8O2sZFgJYEY7bJvbCFKccs+WIZ/cd+xxTWCw== dependencies: ajv "^6.12.4" lodash "^4.17.20" From 4a640e55aee15579bdf4203f3a0c7f8f61139abb Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 24 Nov 2020 09:53:31 +0000 Subject: [PATCH 202/314] chore(deps-dev): bump @types/sinon from 9.0.8 to 9.0.9 (#11657) Bumps [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) from 9.0.8 to 9.0.9. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sinon) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/assets/package.json | 2 +- packages/@aws-cdk/core/package.json | 2 +- packages/@aws-cdk/custom-resources/package.json | 2 +- packages/aws-cdk/package.json | 2 +- yarn.lock | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/@aws-cdk/assets/package.json b/packages/@aws-cdk/assets/package.json index c2d380e16a47b..52575038b862b 100644 --- a/packages/@aws-cdk/assets/package.json +++ b/packages/@aws-cdk/assets/package.json @@ -70,7 +70,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "@types/sinon": "^9.0.8", + "@types/sinon": "^9.0.9", "aws-cdk": "0.0.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json index ff2a7d059f09d..e6041125237cb 100644 --- a/packages/@aws-cdk/core/package.json +++ b/packages/@aws-cdk/core/package.json @@ -171,7 +171,7 @@ "@types/lodash": "^4.14.165", "@types/minimatch": "^3.0.3", "@types/node": "^10.17.46", - "@types/sinon": "^9.0.8", + "@types/sinon": "^9.0.9", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", "fast-check": "^2.7.0", diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index e7f1206f606f7..3bdd18d612336 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -78,7 +78,7 @@ "@aws-cdk/aws-ssm": "0.0.0", "@types/aws-lambda": "^8.10.64", "@types/fs-extra": "^8.1.1", - "@types/sinon": "^9.0.8", + "@types/sinon": "^9.0.9", "aws-sdk": "^2.797.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index b52524dcdda73..c194a4db600ca 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -48,7 +48,7 @@ "@types/node": "^10.17.46", "@types/promptly": "^3.0.0", "@types/semver": "^7.3.4", - "@types/sinon": "^9.0.8", + "@types/sinon": "^9.0.9", "@types/table": "^5.0.0", "@types/uuid": "^8.3.0", "@types/wrap-ansi": "^3.0.0", diff --git a/yarn.lock b/yarn.lock index a6a4bca415753..7aafafb318f3d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1703,10 +1703,10 @@ resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.4.tgz#43d7168fec6fa0988bb1a513a697b29296721afb" integrity sha512-+nVsLKlcUCeMzD2ufHEYuJ9a2ovstb6Dp52A5VsoKxDXgvE051XgHI/33I1EymwkRGQkwnA0LkhnUzituGs4EQ== -"@types/sinon@^9.0.8": - version "9.0.8" - resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-9.0.8.tgz#1ed0038d356784f75b086104ef83bfd4130bb81b" - integrity sha512-IVnI820FZFMGI+u1R+2VdRaD/82YIQTdqLYC9DLPszZuynAJDtCvCtCs3bmyL66s7FqRM3+LPX7DhHnVTaagDw== +"@types/sinon@^9.0.9": + version "9.0.9" + resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-9.0.9.tgz#115843b491583f924080f684b6d0d7438344f73c" + integrity sha512-z/y8maYOQyYLyqaOB+dYQ6i0pxKLOsfwCmHmn4T7jS/SDHicIslr37oE3Dg8SCqKrKeBy6Lemu7do2yy+unLrw== dependencies: "@types/sinonjs__fake-timers" "*" From f03c88974dc89eca8fca798f0640188508bd3623 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Tue, 24 Nov 2020 11:28:15 +0100 Subject: [PATCH 203/314] fix(core): reusing StackSynthesizer leads to unsynthesized Stacks (#11635) If the same StackSynthesizer object is used for multiple stacks, only the last one is properly synthesized to the cloud assembly. Ideally, we would have made it so that there is a difference between the specifying `StackSynthesizer` object and a "bound" version of the `StackSynthesizer` (bound to a `Stack`). Unfortunately, we cannot introduce that change without heavy contortions in order not to break backwards compatibility, so the simple thing to do right now is to make it blindingly obvious that "you cannot do that". Fixes #11528. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../lib/stack-synthesizers/default-synthesizer.ts | 4 ++++ .../@aws-cdk/core/lib/stack-synthesizers/legacy.ts | 3 +++ .../@aws-cdk/core/lib/stack-synthesizers/nested.ts | 3 +++ .../test/stack-synthesis/new-style-synthesis.test.ts | 12 ++++++++++++ 4 files changed, 22 insertions(+) diff --git a/packages/@aws-cdk/core/lib/stack-synthesizers/default-synthesizer.ts b/packages/@aws-cdk/core/lib/stack-synthesizers/default-synthesizer.ts index 67524b0b96c1c..929338f8fbc05 100644 --- a/packages/@aws-cdk/core/lib/stack-synthesizers/default-synthesizer.ts +++ b/packages/@aws-cdk/core/lib/stack-synthesizers/default-synthesizer.ts @@ -233,6 +233,10 @@ export class DefaultStackSynthesizer extends StackSynthesizer { } public bind(stack: Stack): void { + if (this._stack !== undefined) { + throw new Error('A StackSynthesizer can only be used for one Stack: create a new instance to use with a different Stack'); + } + this._stack = stack; const qualifier = this.props.qualifier ?? stack.node.tryGetContext(BOOTSTRAP_QUALIFIER_CONTEXT) ?? DefaultStackSynthesizer.DEFAULT_QUALIFIER; diff --git a/packages/@aws-cdk/core/lib/stack-synthesizers/legacy.ts b/packages/@aws-cdk/core/lib/stack-synthesizers/legacy.ts index bacf1514a8b4b..e6dfd63235b8c 100644 --- a/packages/@aws-cdk/core/lib/stack-synthesizers/legacy.ts +++ b/packages/@aws-cdk/core/lib/stack-synthesizers/legacy.ts @@ -48,6 +48,9 @@ export class LegacyStackSynthesizer extends StackSynthesizer { private readonly addedImageAssets = new Set(); public bind(stack: Stack): void { + if (this.stack !== undefined) { + throw new Error('A StackSynthesizer can only be used for one Stack: create a new instance to use with a different Stack'); + } this.stack = stack; } diff --git a/packages/@aws-cdk/core/lib/stack-synthesizers/nested.ts b/packages/@aws-cdk/core/lib/stack-synthesizers/nested.ts index bc909775fee8a..8eb05d34cba9e 100644 --- a/packages/@aws-cdk/core/lib/stack-synthesizers/nested.ts +++ b/packages/@aws-cdk/core/lib/stack-synthesizers/nested.ts @@ -18,6 +18,9 @@ export class NestedStackSynthesizer extends StackSynthesizer { } public bind(stack: Stack): void { + if (this.stack !== undefined) { + throw new Error('A StackSynthesizer can only be used for one Stack: create a new instance to use with a different Stack'); + } this.stack = stack; } diff --git a/packages/@aws-cdk/core/test/stack-synthesis/new-style-synthesis.test.ts b/packages/@aws-cdk/core/test/stack-synthesis/new-style-synthesis.test.ts index 7ae1681d011bd..0b30ec049f6ae 100644 --- a/packages/@aws-cdk/core/test/stack-synthesis/new-style-synthesis.test.ts +++ b/packages/@aws-cdk/core/test/stack-synthesis/new-style-synthesis.test.ts @@ -256,6 +256,18 @@ nodeunitShim({ test.done(); }, + + 'cannot use same synthesizer for multiple stacks'(test: Test) { + // GIVEN + const synthesizer = new DefaultStackSynthesizer(); + + // WHEN + new Stack(app, 'Stack2', { synthesizer }); + test.throws(() => { + new Stack(app, 'Stack3', { synthesizer }); + }, /A StackSynthesizer can only be used for one Stack/); + test.done(); + }, }); /** From d2b637e44ac3f727f5e2f7f30381cefdef3a3122 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 24 Nov 2020 13:46:00 +0000 Subject: [PATCH 204/314] chore(deps): bump @typescript-eslint/eslint-plugin from 4.8.1 to 4.8.2 (#11668) Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.8.1 to 4.8.2. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.8.2/packages/eslint-plugin) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- tools/cdk-build-tools/package.json | 2 +- yarn.lock | 68 +++++++++++++++--------------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/tools/cdk-build-tools/package.json b/tools/cdk-build-tools/package.json index f47c4c8e1bb91..f5f8691727ec7 100644 --- a/tools/cdk-build-tools/package.json +++ b/tools/cdk-build-tools/package.json @@ -39,7 +39,7 @@ "pkglint": "0.0.0" }, "dependencies": { - "@typescript-eslint/eslint-plugin": "^4.8.1", + "@typescript-eslint/eslint-plugin": "^4.8.2", "@typescript-eslint/parser": "^4.7.0", "eslint-plugin-cdk": "0.0.0", "awslint": "0.0.0", diff --git a/yarn.lock b/yarn.lock index 7aafafb318f3d..2d3ea4a24f0d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1773,28 +1773,28 @@ resolved "https://registry.yarnpkg.com/@types/yarnpkg__lockfile/-/yarnpkg__lockfile-1.1.4.tgz#445251eb00bd9c1e751f82c7c6bf4f714edfd464" integrity sha512-/emrKCfQMQmFCqRqqBJ0JueHBT06jBRM3e8OgnvDUcvuExONujIk2hFA5dNsN9Nt41ljGVDdChvCydATZ+KOZw== -"@typescript-eslint/eslint-plugin@^4.8.1": - version "4.8.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.8.1.tgz#b362abe0ee478a6c6d06c14552a6497f0b480769" - integrity sha512-d7LeQ7dbUrIv5YVFNzGgaW3IQKMmnmKFneRWagRlGYOSfLJVaRbj/FrBNOBC1a3tVO+TgNq1GbHvRtg1kwL0FQ== +"@typescript-eslint/eslint-plugin@^4.8.2": + version "4.8.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.8.2.tgz#cf9102ec800391caa574f589ffe0623cca1d9308" + integrity sha512-gQ06QLV5l1DtvYtqOyFLXD9PdcILYqlrJj2l+CGDlPtmgLUzc1GpqciJFIRvyfvgLALpnxYINFuw+n9AZhPBKQ== dependencies: - "@typescript-eslint/experimental-utils" "4.8.1" - "@typescript-eslint/scope-manager" "4.8.1" + "@typescript-eslint/experimental-utils" "4.8.2" + "@typescript-eslint/scope-manager" "4.8.2" debug "^4.1.1" functional-red-black-tree "^1.0.1" regexpp "^3.0.0" semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@4.8.1": - version "4.8.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.8.1.tgz#27275c20fa4336df99ebcf6195f7d7aa7aa9f22d" - integrity sha512-WigyLn144R3+lGATXW4nNcDJ9JlTkG8YdBWHkDlN0lC3gUGtDi7Pe3h5GPvFKMcRz8KbZpm9FJV9NTW8CpRHpg== +"@typescript-eslint/experimental-utils@4.8.2": + version "4.8.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.8.2.tgz#8909a5732f19329cf5ef0c39766170476bff5e50" + integrity sha512-hpTw6o6IhBZEsQsjuw/4RWmceRyESfAiEzAEnXHKG1X7S5DXFaZ4IO1JO7CW1aQ604leQBzjZmuMI9QBCAJX8Q== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/scope-manager" "4.8.1" - "@typescript-eslint/types" "4.8.1" - "@typescript-eslint/typescript-estree" "4.8.1" + "@typescript-eslint/scope-manager" "4.8.2" + "@typescript-eslint/types" "4.8.2" + "@typescript-eslint/typescript-estree" "4.8.2" eslint-scope "^5.0.0" eslint-utils "^2.0.0" @@ -1816,23 +1816,23 @@ "@typescript-eslint/types" "4.7.0" "@typescript-eslint/visitor-keys" "4.7.0" -"@typescript-eslint/scope-manager@4.8.1": - version "4.8.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.8.1.tgz#e343c475f8f1d15801b546cb17d7f309b768fdce" - integrity sha512-r0iUOc41KFFbZdPAdCS4K1mXivnSZqXS5D9oW+iykQsRlTbQRfuFRSW20xKDdYiaCoH+SkSLeIF484g3kWzwOQ== +"@typescript-eslint/scope-manager@4.8.2": + version "4.8.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.8.2.tgz#a18388c63ae9c17adde519384f539392f2c4f0d9" + integrity sha512-qHQ8ODi7mMin4Sq2eh/6eu03uVzsf5TX+J43xRmiq8ujng7ViQSHNPLOHGw/Wr5dFEoxq/ubKhzClIIdQy5q3g== dependencies: - "@typescript-eslint/types" "4.8.1" - "@typescript-eslint/visitor-keys" "4.8.1" + "@typescript-eslint/types" "4.8.2" + "@typescript-eslint/visitor-keys" "4.8.2" "@typescript-eslint/types@4.7.0": version "4.7.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.7.0.tgz#5e95ef5c740f43d942542b35811f87b62fccca69" integrity sha512-uLszFe0wExJc+I7q0Z/+BnP7wao/kzX0hB5vJn4LIgrfrMLgnB2UXoReV19lkJQS1a1mHWGGODSxnBx6JQC3Sg== -"@typescript-eslint/types@4.8.1": - version "4.8.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.8.1.tgz#23829c73c5fc6f4fcd5346a7780b274f72fee222" - integrity sha512-ave2a18x2Y25q5K05K/U3JQIe2Av4+TNi/2YuzyaXLAsDx6UZkz1boZ7nR/N6Wwae2PpudTZmHFXqu7faXfHmA== +"@typescript-eslint/types@4.8.2": + version "4.8.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.8.2.tgz#c862dd0e569d9478eb82d6aee662ea53f5661a36" + integrity sha512-z1/AVcVF8ju5ObaHe2fOpZYEQrwHyZ7PTOlmjd3EoFeX9sv7UekQhfrCmgUO7PruLNfSHrJGQvrW3Q7xQ8EoAw== "@typescript-eslint/typescript-estree@4.7.0": version "4.7.0" @@ -1848,13 +1848,13 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/typescript-estree@4.8.1": - version "4.8.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.8.1.tgz#7307e3f2c9e95df7daa8dc0a34b8c43b7ec0dd32" - integrity sha512-bJ6Fn/6tW2g7WIkCWh3QRlaSU7CdUUK52shx36/J7T5oTQzANvi6raoTsbwGM11+7eBbeem8hCCKbyvAc0X3sQ== +"@typescript-eslint/typescript-estree@4.8.2": + version "4.8.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.8.2.tgz#eeec34707d8577600fb21661b5287226cc8b3bed" + integrity sha512-HToGNwI6fekH0dOw3XEVESUm71Onfam0AKin6f26S2FtUmO7o3cLlWgrIaT1q3vjB3wCTdww3Dx2iGq5wtUOCg== dependencies: - "@typescript-eslint/types" "4.8.1" - "@typescript-eslint/visitor-keys" "4.8.1" + "@typescript-eslint/types" "4.8.2" + "@typescript-eslint/visitor-keys" "4.8.2" debug "^4.1.1" globby "^11.0.1" is-glob "^4.0.1" @@ -1870,12 +1870,12 @@ "@typescript-eslint/types" "4.7.0" eslint-visitor-keys "^2.0.0" -"@typescript-eslint/visitor-keys@4.8.1": - version "4.8.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.8.1.tgz#794f68ee292d1b2e3aa9690ebedfcb3a8c90e3c3" - integrity sha512-3nrwXFdEYALQh/zW8rFwP4QltqsanCDz4CwWMPiIZmwlk9GlvBeueEIbq05SEq4ganqM0g9nh02xXgv5XI3PeQ== +"@typescript-eslint/visitor-keys@4.8.2": + version "4.8.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.8.2.tgz#62cd3fbbbf65f8eccfbe6f159eb1b84a243a3f77" + integrity sha512-Vg+/SJTMZJEKKGHW7YC21QxgKJrSbxoYYd3MEUGtW7zuytHuEcksewq0DUmo4eh/CTNrVJGSdIY9AtRb6riWFw== dependencies: - "@typescript-eslint/types" "4.8.1" + "@typescript-eslint/types" "4.8.2" eslint-visitor-keys "^2.0.0" "@yarnpkg/lockfile@^1.1.0": From ccf248f6e732b75eb86abcf73765bf20992268aa Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Tue, 24 Nov 2020 15:57:49 +0000 Subject: [PATCH 205/314] chore(cdk): init templates are major-version aware (#11665) In preparation of non-trivial differences in the init templates between v1 and v2 (see #11638), moving all of the existing init templates to a /v1 subdirectory and making the init library major-version aware. Note: This change only concerns the v1 template changes. The v2 init templates are already broken, and I will adapt #11638 once this has been merged (and forward- merged). ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/aws-cdk/.eslintrc.js | 2 +- packages/aws-cdk/.npmignore | 5 ++--- .../{ => v1}/app/csharp/.template.gitignore | 0 .../{ => v1}/app/csharp/README.md | 0 .../{ => v1}/app/csharp/add-project.hook.ts | 2 +- .../{ => v1}/app/csharp/cdk.template.json | 0 .../src/%name.PascalCased%.template.sln | 0 .../%name.PascalCased%.template.csproj | 0 .../%name.PascalCased%Stack.template.cs | 0 .../%name.PascalCased%/GlobalSuppressions.cs | 0 .../%name.PascalCased%/Program.template.cs | 0 .../{ => v1}/app/fsharp/.template.gitignore | 0 .../{ => v1}/app/fsharp/README.md | 0 .../{ => v1}/app/fsharp/add-project.hook.ts | 2 +- .../{ => v1}/app/fsharp/cdk.template.json | 0 .../src/%name.PascalCased%.template.sln | 0 .../%name.PascalCased%.template.fsproj | 0 .../%name.PascalCased%Stack.template.fs | 0 .../%name.PascalCased%/Program.template.fs | 0 .../lib/init-templates/{ => v1}/app/info.json | 0 .../{ => v1}/app/java/.template.gitignore | 0 .../{ => v1}/app/java/README.md | 0 .../init-templates/{ => v1}/app/java/cdk.json | 0 .../{ => v1}/app/java/pom.template.xml | 0 .../myorg/%name.PascalCased%App.template.java | 0 .../%name.PascalCased%Stack.template.java | 0 .../%name.PascalCased%Test.template.java | 0 .../app/javascript/.template.gitignore | 0 .../app/javascript/.template.npmignore | 0 .../{ => v1}/app/javascript/README.md | 0 .../app/javascript/bin/%name%.template.js | 0 .../{ => v1}/app/javascript/cdk.template.json | 0 .../javascript/lib/%name%-stack.template.js | 0 .../app/javascript/package.template.json | 0 .../javascript/test/%name%.test.template.js | 0 .../%name.PythonModule%_stack.template.py | 0 .../python/%name.PythonModule%/__init__.py | 0 .../{ => v1}/app/python/.template.gitignore | 0 .../{ => v1}/app/python/README.template.md | 0 .../{ => v1}/app/python/app.template.py | 0 .../{ => v1}/app/python/cdk.template.json | 0 .../{ => v1}/app/python/requirements.txt | 0 .../{ => v1}/app/python/setup.template.py | 0 .../{ => v1}/app/python/source.bat | 0 .../app/typescript/.template.gitignore | 0 .../app/typescript/.template.npmignore | 0 .../{ => v1}/app/typescript/README.md | 0 .../app/typescript/bin/%name%.template.ts | 0 .../{ => v1}/app/typescript/cdk.template.json | 0 .../{ => v1}/app/typescript/jest.config.js | 0 .../typescript/lib/%name%-stack.template.ts | 0 .../app/typescript/package.template.json | 0 .../typescript/test/%name%.test.template.ts | 0 .../{ => v1}/app/typescript/tsconfig.json | 0 .../lib/init-templates/{ => v1}/lib/info.json | 0 .../lib/typescript/.template.gitignore | 0 .../lib/typescript/.template.npmignore | 0 .../lib/typescript/README.template.md | 0 .../{ => v1}/lib/typescript/jest.config.js | 0 .../lib/typescript/lib/index.template.ts | 0 .../lib/typescript/package.template.json | 0 .../typescript/test/%name%.test.template.ts | 0 .../{ => v1}/lib/typescript/tsconfig.json | 0 .../sample-app/csharp/.template.gitignore | 0 .../sample-app/csharp/README.template.md | 0 .../sample-app/csharp/add-project.hook.ts | 2 +- .../sample-app/csharp/cdk.template.json | 0 .../src/%name.PascalCased%.template.sln | 0 .../%name.PascalCased%.template.csproj | 0 .../%name.PascalCased%Stack.template.cs | 0 .../%name.PascalCased%/GlobalSuppressions.cs | 0 .../%name.PascalCased%/Program.template.cs | 0 .../sample-app/fsharp/.template.gitignore | 0 .../sample-app/fsharp/README.template.md | 0 .../sample-app/fsharp/add-project.hook.ts | 2 +- .../sample-app/fsharp/cdk.template.json | 0 .../src/%name.PascalCased%.template.sln | 0 .../%name.PascalCased%.template.fsproj | 0 .../%name.PascalCased%Stack.template.fs | 0 .../%name.PascalCased%/Program.template.fs | 0 .../{ => v1}/sample-app/info.json | 0 .../sample-app/java/.template.gitignore | 0 .../sample-app/java/README.template.md | 0 .../{ => v1}/sample-app/java/cdk.json | 0 .../{ => v1}/sample-app/java/pom.template.xml | 0 .../myorg/%name.PascalCased%App.template.java | 0 .../%name.PascalCased%Stack.template.java | 0 .../%name.PascalCased%StackTest.template.java | 0 .../sample-app/javascript/.template.gitignore | 0 .../sample-app/javascript/.template.npmignore | 0 .../sample-app/javascript/README.template.md | 0 .../javascript/bin/%name%.template.js | 0 .../sample-app/javascript/cdk.template.json | 0 .../javascript/lib/%name%-stack.template.js | 0 .../javascript/package.template.json | 0 .../javascript/test/%name%.test.template.js | 0 .../sample-app/javascript/tsconfig.json | 0 .../%name.PythonModule%_stack.template.py | 0 .../python/%name.PythonModule%/__init__.py | 0 .../sample-app/python/.template.gitignore | 0 .../sample-app/python/README.template.md | 0 .../sample-app/python/app.template.py | 0 .../sample-app/python/cdk.template.json | 0 .../sample-app/python/requirements.txt | 0 .../sample-app/python/setup.template.py | 0 .../{ => v1}/sample-app/python/source.bat | 0 .../sample-app/python/tests/__init__.py | 0 .../sample-app/python/tests/unit/__init__.py | 0 ...test_%name.PythonModule%_stack.template.py | 0 .../sample-app/typescript/.template.gitignore | 0 .../sample-app/typescript/.template.npmignore | 0 .../sample-app/typescript/README.template.md | 0 .../typescript/bin/%name%.template.ts | 0 .../sample-app/typescript/cdk.template.json | 0 .../sample-app/typescript/jest.config.js | 0 .../typescript/lib/%name%-stack.template.ts | 0 .../typescript/package.template.json | 0 .../typescript/test/%name%.test.template.ts | 0 .../sample-app/typescript/tsconfig.json | 0 packages/aws-cdk/lib/init.ts | 20 +++++++++++++------ packages/aws-cdk/test/init.test.ts | 15 ++++++++++++++ packages/aws-cdk/tsconfig.json | 4 ++-- 122 files changed, 38 insertions(+), 16 deletions(-) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/csharp/.template.gitignore (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/csharp/README.md (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/csharp/add-project.hook.ts (95%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/csharp/cdk.template.json (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/csharp/src/%name.PascalCased%.template.sln (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/csharp/src/%name.PascalCased%/Program.template.cs (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/fsharp/.template.gitignore (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/fsharp/README.md (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/fsharp/add-project.hook.ts (95%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/fsharp/cdk.template.json (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/fsharp/src/%name.PascalCased%.template.sln (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/fsharp/src/%name.PascalCased%/Program.template.fs (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/info.json (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/java/.template.gitignore (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/java/README.md (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/java/cdk.json (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/java/pom.template.xml (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/java/src/test/java/com/myorg/%name.PascalCased%Test.template.java (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/javascript/.template.gitignore (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/javascript/.template.npmignore (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/javascript/README.md (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/javascript/bin/%name%.template.js (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/javascript/cdk.template.json (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/javascript/lib/%name%-stack.template.js (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/javascript/package.template.json (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/javascript/test/%name%.test.template.js (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/python/%name.PythonModule%/__init__.py (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/python/.template.gitignore (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/python/README.template.md (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/python/app.template.py (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/python/cdk.template.json (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/python/requirements.txt (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/python/setup.template.py (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/python/source.bat (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/typescript/.template.gitignore (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/typescript/.template.npmignore (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/typescript/README.md (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/typescript/bin/%name%.template.ts (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/typescript/cdk.template.json (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/typescript/jest.config.js (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/typescript/lib/%name%-stack.template.ts (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/typescript/package.template.json (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/typescript/test/%name%.test.template.ts (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/app/typescript/tsconfig.json (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/lib/info.json (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/lib/typescript/.template.gitignore (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/lib/typescript/.template.npmignore (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/lib/typescript/README.template.md (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/lib/typescript/jest.config.js (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/lib/typescript/lib/index.template.ts (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/lib/typescript/package.template.json (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/lib/typescript/test/%name%.test.template.ts (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/lib/typescript/tsconfig.json (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/csharp/.template.gitignore (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/csharp/README.template.md (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/csharp/add-project.hook.ts (95%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/csharp/cdk.template.json (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/csharp/src/%name.PascalCased%.template.sln (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/csharp/src/%name.PascalCased%/Program.template.cs (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/fsharp/.template.gitignore (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/fsharp/README.template.md (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/fsharp/add-project.hook.ts (95%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/fsharp/cdk.template.json (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/fsharp/src/%name.PascalCased%.template.sln (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/fsharp/src/%name.PascalCased%/Program.template.fs (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/info.json (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/java/.template.gitignore (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/java/README.template.md (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/java/cdk.json (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/java/pom.template.xml (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/java/src/test/java/com/myorg/%name.PascalCased%StackTest.template.java (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/javascript/.template.gitignore (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/javascript/.template.npmignore (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/javascript/README.template.md (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/javascript/bin/%name%.template.js (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/javascript/cdk.template.json (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/javascript/lib/%name%-stack.template.js (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/javascript/package.template.json (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/javascript/test/%name%.test.template.js (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/javascript/tsconfig.json (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/python/%name.PythonModule%/__init__.py (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/python/.template.gitignore (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/python/README.template.md (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/python/app.template.py (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/python/cdk.template.json (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/python/requirements.txt (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/python/setup.template.py (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/python/source.bat (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/python/tests/__init__.py (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/python/tests/unit/__init__.py (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/python/tests/unit/test_%name.PythonModule%_stack.template.py (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/typescript/.template.gitignore (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/typescript/.template.npmignore (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/typescript/README.template.md (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/typescript/bin/%name%.template.ts (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/typescript/cdk.template.json (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/typescript/jest.config.js (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/typescript/lib/%name%-stack.template.ts (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/typescript/package.template.json (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/typescript/test/%name%.test.template.ts (100%) rename packages/aws-cdk/lib/init-templates/{ => v1}/sample-app/typescript/tsconfig.json (100%) diff --git a/packages/aws-cdk/.eslintrc.js b/packages/aws-cdk/.eslintrc.js index 463cac21e7e1d..b5e0934b9d544 100644 --- a/packages/aws-cdk/.eslintrc.js +++ b/packages/aws-cdk/.eslintrc.js @@ -1,4 +1,4 @@ const baseConfig = require('cdk-build-tools/config/eslintrc'); -baseConfig.ignorePatterns.push('lib/init-templates/*/typescript/**/*.ts'); +baseConfig.ignorePatterns.push('lib/init-templates/**/typescript/**/*.ts'); baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; module.exports = baseConfig; diff --git a/packages/aws-cdk/.npmignore b/packages/aws-cdk/.npmignore index 64b361e8e8b52..022147ad6129a 100644 --- a/packages/aws-cdk/.npmignore +++ b/packages/aws-cdk/.npmignore @@ -11,7 +11,6 @@ dist .LAST_BUILD *.snk -!lib/init-templates/*/*/tsconfig.json !test/integ/cli/**/*.js !test/integ/run-wrappers/dist @@ -21,9 +20,9 @@ tsconfig.json # init templates include default tsconfig.json files which we need !lib/init-templates/**/tsconfig.json +!lib/init-templates/**/jest.config.js .eslintrc.js jest.config.js -!lib/init-templates/**/jest.config.js !test/integ/cli/jest.config.js !test/integ/cli-regression-patches/**/* @@ -31,4 +30,4 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml diff --git a/packages/aws-cdk/lib/init-templates/app/csharp/.template.gitignore b/packages/aws-cdk/lib/init-templates/v1/app/csharp/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/csharp/.template.gitignore rename to packages/aws-cdk/lib/init-templates/v1/app/csharp/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/app/csharp/README.md b/packages/aws-cdk/lib/init-templates/v1/app/csharp/README.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/csharp/README.md rename to packages/aws-cdk/lib/init-templates/v1/app/csharp/README.md diff --git a/packages/aws-cdk/lib/init-templates/app/csharp/add-project.hook.ts b/packages/aws-cdk/lib/init-templates/v1/app/csharp/add-project.hook.ts similarity index 95% rename from packages/aws-cdk/lib/init-templates/app/csharp/add-project.hook.ts rename to packages/aws-cdk/lib/init-templates/v1/app/csharp/add-project.hook.ts index c839c1e01db08..37b1fe6ad3e5f 100644 --- a/packages/aws-cdk/lib/init-templates/app/csharp/add-project.hook.ts +++ b/packages/aws-cdk/lib/init-templates/v1/app/csharp/add-project.hook.ts @@ -1,6 +1,6 @@ import * as child_process from 'child_process'; import * as path from 'path'; -import { InvokeHook } from '../../../init'; +import { InvokeHook } from '../../../../init'; export const invoke: InvokeHook = async (targetDirectory: string) => { const slnPath = path.join(targetDirectory, 'src', '%name.PascalCased%.sln'); diff --git a/packages/aws-cdk/lib/init-templates/app/csharp/cdk.template.json b/packages/aws-cdk/lib/init-templates/v1/app/csharp/cdk.template.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/csharp/cdk.template.json rename to packages/aws-cdk/lib/init-templates/v1/app/csharp/cdk.template.json diff --git a/packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%.template.sln b/packages/aws-cdk/lib/init-templates/v1/app/csharp/src/%name.PascalCased%.template.sln similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%.template.sln rename to packages/aws-cdk/lib/init-templates/v1/app/csharp/src/%name.PascalCased%.template.sln diff --git a/packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj b/packages/aws-cdk/lib/init-templates/v1/app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj rename to packages/aws-cdk/lib/init-templates/v1/app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj diff --git a/packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs b/packages/aws-cdk/lib/init-templates/v1/app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs rename to packages/aws-cdk/lib/init-templates/v1/app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs diff --git a/packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs b/packages/aws-cdk/lib/init-templates/v1/app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs rename to packages/aws-cdk/lib/init-templates/v1/app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs diff --git a/packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%/Program.template.cs b/packages/aws-cdk/lib/init-templates/v1/app/csharp/src/%name.PascalCased%/Program.template.cs similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%/Program.template.cs rename to packages/aws-cdk/lib/init-templates/v1/app/csharp/src/%name.PascalCased%/Program.template.cs diff --git a/packages/aws-cdk/lib/init-templates/app/fsharp/.template.gitignore b/packages/aws-cdk/lib/init-templates/v1/app/fsharp/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/fsharp/.template.gitignore rename to packages/aws-cdk/lib/init-templates/v1/app/fsharp/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/app/fsharp/README.md b/packages/aws-cdk/lib/init-templates/v1/app/fsharp/README.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/fsharp/README.md rename to packages/aws-cdk/lib/init-templates/v1/app/fsharp/README.md diff --git a/packages/aws-cdk/lib/init-templates/app/fsharp/add-project.hook.ts b/packages/aws-cdk/lib/init-templates/v1/app/fsharp/add-project.hook.ts similarity index 95% rename from packages/aws-cdk/lib/init-templates/app/fsharp/add-project.hook.ts rename to packages/aws-cdk/lib/init-templates/v1/app/fsharp/add-project.hook.ts index efeed98d57ee2..b9b091fa35ff1 100644 --- a/packages/aws-cdk/lib/init-templates/app/fsharp/add-project.hook.ts +++ b/packages/aws-cdk/lib/init-templates/v1/app/fsharp/add-project.hook.ts @@ -1,6 +1,6 @@ import * as child_process from 'child_process'; import * as path from 'path'; -import { InvokeHook } from '../../../init'; +import { InvokeHook } from '../../../../init'; export const invoke: InvokeHook = async (targetDirectory: string) => { const slnPath = path.join(targetDirectory, 'src', '%name.PascalCased%.sln'); diff --git a/packages/aws-cdk/lib/init-templates/app/fsharp/cdk.template.json b/packages/aws-cdk/lib/init-templates/v1/app/fsharp/cdk.template.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/fsharp/cdk.template.json rename to packages/aws-cdk/lib/init-templates/v1/app/fsharp/cdk.template.json diff --git a/packages/aws-cdk/lib/init-templates/app/fsharp/src/%name.PascalCased%.template.sln b/packages/aws-cdk/lib/init-templates/v1/app/fsharp/src/%name.PascalCased%.template.sln similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/fsharp/src/%name.PascalCased%.template.sln rename to packages/aws-cdk/lib/init-templates/v1/app/fsharp/src/%name.PascalCased%.template.sln diff --git a/packages/aws-cdk/lib/init-templates/app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj b/packages/aws-cdk/lib/init-templates/v1/app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj rename to packages/aws-cdk/lib/init-templates/v1/app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj diff --git a/packages/aws-cdk/lib/init-templates/app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs b/packages/aws-cdk/lib/init-templates/v1/app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs rename to packages/aws-cdk/lib/init-templates/v1/app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs diff --git a/packages/aws-cdk/lib/init-templates/app/fsharp/src/%name.PascalCased%/Program.template.fs b/packages/aws-cdk/lib/init-templates/v1/app/fsharp/src/%name.PascalCased%/Program.template.fs similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/fsharp/src/%name.PascalCased%/Program.template.fs rename to packages/aws-cdk/lib/init-templates/v1/app/fsharp/src/%name.PascalCased%/Program.template.fs diff --git a/packages/aws-cdk/lib/init-templates/app/info.json b/packages/aws-cdk/lib/init-templates/v1/app/info.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/info.json rename to packages/aws-cdk/lib/init-templates/v1/app/info.json diff --git a/packages/aws-cdk/lib/init-templates/app/java/.template.gitignore b/packages/aws-cdk/lib/init-templates/v1/app/java/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/java/.template.gitignore rename to packages/aws-cdk/lib/init-templates/v1/app/java/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/app/java/README.md b/packages/aws-cdk/lib/init-templates/v1/app/java/README.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/java/README.md rename to packages/aws-cdk/lib/init-templates/v1/app/java/README.md diff --git a/packages/aws-cdk/lib/init-templates/app/java/cdk.json b/packages/aws-cdk/lib/init-templates/v1/app/java/cdk.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/java/cdk.json rename to packages/aws-cdk/lib/init-templates/v1/app/java/cdk.json diff --git a/packages/aws-cdk/lib/init-templates/app/java/pom.template.xml b/packages/aws-cdk/lib/init-templates/v1/app/java/pom.template.xml similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/java/pom.template.xml rename to packages/aws-cdk/lib/init-templates/v1/app/java/pom.template.xml diff --git a/packages/aws-cdk/lib/init-templates/app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java b/packages/aws-cdk/lib/init-templates/v1/app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java rename to packages/aws-cdk/lib/init-templates/v1/app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java diff --git a/packages/aws-cdk/lib/init-templates/app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java b/packages/aws-cdk/lib/init-templates/v1/app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java rename to packages/aws-cdk/lib/init-templates/v1/app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java diff --git a/packages/aws-cdk/lib/init-templates/app/java/src/test/java/com/myorg/%name.PascalCased%Test.template.java b/packages/aws-cdk/lib/init-templates/v1/app/java/src/test/java/com/myorg/%name.PascalCased%Test.template.java similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/java/src/test/java/com/myorg/%name.PascalCased%Test.template.java rename to packages/aws-cdk/lib/init-templates/v1/app/java/src/test/java/com/myorg/%name.PascalCased%Test.template.java diff --git a/packages/aws-cdk/lib/init-templates/app/javascript/.template.gitignore b/packages/aws-cdk/lib/init-templates/v1/app/javascript/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/javascript/.template.gitignore rename to packages/aws-cdk/lib/init-templates/v1/app/javascript/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/app/javascript/.template.npmignore b/packages/aws-cdk/lib/init-templates/v1/app/javascript/.template.npmignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/javascript/.template.npmignore rename to packages/aws-cdk/lib/init-templates/v1/app/javascript/.template.npmignore diff --git a/packages/aws-cdk/lib/init-templates/app/javascript/README.md b/packages/aws-cdk/lib/init-templates/v1/app/javascript/README.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/javascript/README.md rename to packages/aws-cdk/lib/init-templates/v1/app/javascript/README.md diff --git a/packages/aws-cdk/lib/init-templates/app/javascript/bin/%name%.template.js b/packages/aws-cdk/lib/init-templates/v1/app/javascript/bin/%name%.template.js similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/javascript/bin/%name%.template.js rename to packages/aws-cdk/lib/init-templates/v1/app/javascript/bin/%name%.template.js diff --git a/packages/aws-cdk/lib/init-templates/app/javascript/cdk.template.json b/packages/aws-cdk/lib/init-templates/v1/app/javascript/cdk.template.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/javascript/cdk.template.json rename to packages/aws-cdk/lib/init-templates/v1/app/javascript/cdk.template.json diff --git a/packages/aws-cdk/lib/init-templates/app/javascript/lib/%name%-stack.template.js b/packages/aws-cdk/lib/init-templates/v1/app/javascript/lib/%name%-stack.template.js similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/javascript/lib/%name%-stack.template.js rename to packages/aws-cdk/lib/init-templates/v1/app/javascript/lib/%name%-stack.template.js diff --git a/packages/aws-cdk/lib/init-templates/app/javascript/package.template.json b/packages/aws-cdk/lib/init-templates/v1/app/javascript/package.template.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/javascript/package.template.json rename to packages/aws-cdk/lib/init-templates/v1/app/javascript/package.template.json diff --git a/packages/aws-cdk/lib/init-templates/app/javascript/test/%name%.test.template.js b/packages/aws-cdk/lib/init-templates/v1/app/javascript/test/%name%.test.template.js similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/javascript/test/%name%.test.template.js rename to packages/aws-cdk/lib/init-templates/v1/app/javascript/test/%name%.test.template.js diff --git a/packages/aws-cdk/lib/init-templates/app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py b/packages/aws-cdk/lib/init-templates/v1/app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py rename to packages/aws-cdk/lib/init-templates/v1/app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py diff --git a/packages/aws-cdk/lib/init-templates/app/python/%name.PythonModule%/__init__.py b/packages/aws-cdk/lib/init-templates/v1/app/python/%name.PythonModule%/__init__.py similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/python/%name.PythonModule%/__init__.py rename to packages/aws-cdk/lib/init-templates/v1/app/python/%name.PythonModule%/__init__.py diff --git a/packages/aws-cdk/lib/init-templates/app/python/.template.gitignore b/packages/aws-cdk/lib/init-templates/v1/app/python/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/python/.template.gitignore rename to packages/aws-cdk/lib/init-templates/v1/app/python/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/app/python/README.template.md b/packages/aws-cdk/lib/init-templates/v1/app/python/README.template.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/python/README.template.md rename to packages/aws-cdk/lib/init-templates/v1/app/python/README.template.md diff --git a/packages/aws-cdk/lib/init-templates/app/python/app.template.py b/packages/aws-cdk/lib/init-templates/v1/app/python/app.template.py similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/python/app.template.py rename to packages/aws-cdk/lib/init-templates/v1/app/python/app.template.py diff --git a/packages/aws-cdk/lib/init-templates/app/python/cdk.template.json b/packages/aws-cdk/lib/init-templates/v1/app/python/cdk.template.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/python/cdk.template.json rename to packages/aws-cdk/lib/init-templates/v1/app/python/cdk.template.json diff --git a/packages/aws-cdk/lib/init-templates/app/python/requirements.txt b/packages/aws-cdk/lib/init-templates/v1/app/python/requirements.txt similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/python/requirements.txt rename to packages/aws-cdk/lib/init-templates/v1/app/python/requirements.txt diff --git a/packages/aws-cdk/lib/init-templates/app/python/setup.template.py b/packages/aws-cdk/lib/init-templates/v1/app/python/setup.template.py similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/python/setup.template.py rename to packages/aws-cdk/lib/init-templates/v1/app/python/setup.template.py diff --git a/packages/aws-cdk/lib/init-templates/app/python/source.bat b/packages/aws-cdk/lib/init-templates/v1/app/python/source.bat similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/python/source.bat rename to packages/aws-cdk/lib/init-templates/v1/app/python/source.bat diff --git a/packages/aws-cdk/lib/init-templates/app/typescript/.template.gitignore b/packages/aws-cdk/lib/init-templates/v1/app/typescript/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/typescript/.template.gitignore rename to packages/aws-cdk/lib/init-templates/v1/app/typescript/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/app/typescript/.template.npmignore b/packages/aws-cdk/lib/init-templates/v1/app/typescript/.template.npmignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/typescript/.template.npmignore rename to packages/aws-cdk/lib/init-templates/v1/app/typescript/.template.npmignore diff --git a/packages/aws-cdk/lib/init-templates/app/typescript/README.md b/packages/aws-cdk/lib/init-templates/v1/app/typescript/README.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/typescript/README.md rename to packages/aws-cdk/lib/init-templates/v1/app/typescript/README.md diff --git a/packages/aws-cdk/lib/init-templates/app/typescript/bin/%name%.template.ts b/packages/aws-cdk/lib/init-templates/v1/app/typescript/bin/%name%.template.ts similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/typescript/bin/%name%.template.ts rename to packages/aws-cdk/lib/init-templates/v1/app/typescript/bin/%name%.template.ts diff --git a/packages/aws-cdk/lib/init-templates/app/typescript/cdk.template.json b/packages/aws-cdk/lib/init-templates/v1/app/typescript/cdk.template.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/typescript/cdk.template.json rename to packages/aws-cdk/lib/init-templates/v1/app/typescript/cdk.template.json diff --git a/packages/aws-cdk/lib/init-templates/app/typescript/jest.config.js b/packages/aws-cdk/lib/init-templates/v1/app/typescript/jest.config.js similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/typescript/jest.config.js rename to packages/aws-cdk/lib/init-templates/v1/app/typescript/jest.config.js diff --git a/packages/aws-cdk/lib/init-templates/app/typescript/lib/%name%-stack.template.ts b/packages/aws-cdk/lib/init-templates/v1/app/typescript/lib/%name%-stack.template.ts similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/typescript/lib/%name%-stack.template.ts rename to packages/aws-cdk/lib/init-templates/v1/app/typescript/lib/%name%-stack.template.ts diff --git a/packages/aws-cdk/lib/init-templates/app/typescript/package.template.json b/packages/aws-cdk/lib/init-templates/v1/app/typescript/package.template.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/typescript/package.template.json rename to packages/aws-cdk/lib/init-templates/v1/app/typescript/package.template.json diff --git a/packages/aws-cdk/lib/init-templates/app/typescript/test/%name%.test.template.ts b/packages/aws-cdk/lib/init-templates/v1/app/typescript/test/%name%.test.template.ts similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/typescript/test/%name%.test.template.ts rename to packages/aws-cdk/lib/init-templates/v1/app/typescript/test/%name%.test.template.ts diff --git a/packages/aws-cdk/lib/init-templates/app/typescript/tsconfig.json b/packages/aws-cdk/lib/init-templates/v1/app/typescript/tsconfig.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/app/typescript/tsconfig.json rename to packages/aws-cdk/lib/init-templates/v1/app/typescript/tsconfig.json diff --git a/packages/aws-cdk/lib/init-templates/lib/info.json b/packages/aws-cdk/lib/init-templates/v1/lib/info.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/lib/info.json rename to packages/aws-cdk/lib/init-templates/v1/lib/info.json diff --git a/packages/aws-cdk/lib/init-templates/lib/typescript/.template.gitignore b/packages/aws-cdk/lib/init-templates/v1/lib/typescript/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/lib/typescript/.template.gitignore rename to packages/aws-cdk/lib/init-templates/v1/lib/typescript/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/lib/typescript/.template.npmignore b/packages/aws-cdk/lib/init-templates/v1/lib/typescript/.template.npmignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/lib/typescript/.template.npmignore rename to packages/aws-cdk/lib/init-templates/v1/lib/typescript/.template.npmignore diff --git a/packages/aws-cdk/lib/init-templates/lib/typescript/README.template.md b/packages/aws-cdk/lib/init-templates/v1/lib/typescript/README.template.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/lib/typescript/README.template.md rename to packages/aws-cdk/lib/init-templates/v1/lib/typescript/README.template.md diff --git a/packages/aws-cdk/lib/init-templates/lib/typescript/jest.config.js b/packages/aws-cdk/lib/init-templates/v1/lib/typescript/jest.config.js similarity index 100% rename from packages/aws-cdk/lib/init-templates/lib/typescript/jest.config.js rename to packages/aws-cdk/lib/init-templates/v1/lib/typescript/jest.config.js diff --git a/packages/aws-cdk/lib/init-templates/lib/typescript/lib/index.template.ts b/packages/aws-cdk/lib/init-templates/v1/lib/typescript/lib/index.template.ts similarity index 100% rename from packages/aws-cdk/lib/init-templates/lib/typescript/lib/index.template.ts rename to packages/aws-cdk/lib/init-templates/v1/lib/typescript/lib/index.template.ts diff --git a/packages/aws-cdk/lib/init-templates/lib/typescript/package.template.json b/packages/aws-cdk/lib/init-templates/v1/lib/typescript/package.template.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/lib/typescript/package.template.json rename to packages/aws-cdk/lib/init-templates/v1/lib/typescript/package.template.json diff --git a/packages/aws-cdk/lib/init-templates/lib/typescript/test/%name%.test.template.ts b/packages/aws-cdk/lib/init-templates/v1/lib/typescript/test/%name%.test.template.ts similarity index 100% rename from packages/aws-cdk/lib/init-templates/lib/typescript/test/%name%.test.template.ts rename to packages/aws-cdk/lib/init-templates/v1/lib/typescript/test/%name%.test.template.ts diff --git a/packages/aws-cdk/lib/init-templates/lib/typescript/tsconfig.json b/packages/aws-cdk/lib/init-templates/v1/lib/typescript/tsconfig.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/lib/typescript/tsconfig.json rename to packages/aws-cdk/lib/init-templates/v1/lib/typescript/tsconfig.json diff --git a/packages/aws-cdk/lib/init-templates/sample-app/csharp/.template.gitignore b/packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/csharp/.template.gitignore rename to packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/sample-app/csharp/README.template.md b/packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/README.template.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/csharp/README.template.md rename to packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/README.template.md diff --git a/packages/aws-cdk/lib/init-templates/sample-app/csharp/add-project.hook.ts b/packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/add-project.hook.ts similarity index 95% rename from packages/aws-cdk/lib/init-templates/sample-app/csharp/add-project.hook.ts rename to packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/add-project.hook.ts index c839c1e01db08..37b1fe6ad3e5f 100644 --- a/packages/aws-cdk/lib/init-templates/sample-app/csharp/add-project.hook.ts +++ b/packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/add-project.hook.ts @@ -1,6 +1,6 @@ import * as child_process from 'child_process'; import * as path from 'path'; -import { InvokeHook } from '../../../init'; +import { InvokeHook } from '../../../../init'; export const invoke: InvokeHook = async (targetDirectory: string) => { const slnPath = path.join(targetDirectory, 'src', '%name.PascalCased%.sln'); diff --git a/packages/aws-cdk/lib/init-templates/sample-app/csharp/cdk.template.json b/packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/cdk.template.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/csharp/cdk.template.json rename to packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/cdk.template.json diff --git a/packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%.template.sln b/packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/src/%name.PascalCased%.template.sln similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%.template.sln rename to packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/src/%name.PascalCased%.template.sln diff --git a/packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj b/packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj rename to packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj diff --git a/packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs b/packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs rename to packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs diff --git a/packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs b/packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs rename to packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs diff --git a/packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/Program.template.cs b/packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/src/%name.PascalCased%/Program.template.cs similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/Program.template.cs rename to packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/src/%name.PascalCased%/Program.template.cs diff --git a/packages/aws-cdk/lib/init-templates/sample-app/fsharp/.template.gitignore b/packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/fsharp/.template.gitignore rename to packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/sample-app/fsharp/README.template.md b/packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/README.template.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/fsharp/README.template.md rename to packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/README.template.md diff --git a/packages/aws-cdk/lib/init-templates/sample-app/fsharp/add-project.hook.ts b/packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/add-project.hook.ts similarity index 95% rename from packages/aws-cdk/lib/init-templates/sample-app/fsharp/add-project.hook.ts rename to packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/add-project.hook.ts index efeed98d57ee2..b9b091fa35ff1 100644 --- a/packages/aws-cdk/lib/init-templates/sample-app/fsharp/add-project.hook.ts +++ b/packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/add-project.hook.ts @@ -1,6 +1,6 @@ import * as child_process from 'child_process'; import * as path from 'path'; -import { InvokeHook } from '../../../init'; +import { InvokeHook } from '../../../../init'; export const invoke: InvokeHook = async (targetDirectory: string) => { const slnPath = path.join(targetDirectory, 'src', '%name.PascalCased%.sln'); diff --git a/packages/aws-cdk/lib/init-templates/sample-app/fsharp/cdk.template.json b/packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/cdk.template.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/fsharp/cdk.template.json rename to packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/cdk.template.json diff --git a/packages/aws-cdk/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%.template.sln b/packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/src/%name.PascalCased%.template.sln similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%.template.sln rename to packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/src/%name.PascalCased%.template.sln diff --git a/packages/aws-cdk/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj b/packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj rename to packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj diff --git a/packages/aws-cdk/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs b/packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs rename to packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs diff --git a/packages/aws-cdk/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%/Program.template.fs b/packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/src/%name.PascalCased%/Program.template.fs similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%/Program.template.fs rename to packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/src/%name.PascalCased%/Program.template.fs diff --git a/packages/aws-cdk/lib/init-templates/sample-app/info.json b/packages/aws-cdk/lib/init-templates/v1/sample-app/info.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/info.json rename to packages/aws-cdk/lib/init-templates/v1/sample-app/info.json diff --git a/packages/aws-cdk/lib/init-templates/sample-app/java/.template.gitignore b/packages/aws-cdk/lib/init-templates/v1/sample-app/java/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/java/.template.gitignore rename to packages/aws-cdk/lib/init-templates/v1/sample-app/java/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/sample-app/java/README.template.md b/packages/aws-cdk/lib/init-templates/v1/sample-app/java/README.template.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/java/README.template.md rename to packages/aws-cdk/lib/init-templates/v1/sample-app/java/README.template.md diff --git a/packages/aws-cdk/lib/init-templates/sample-app/java/cdk.json b/packages/aws-cdk/lib/init-templates/v1/sample-app/java/cdk.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/java/cdk.json rename to packages/aws-cdk/lib/init-templates/v1/sample-app/java/cdk.json diff --git a/packages/aws-cdk/lib/init-templates/sample-app/java/pom.template.xml b/packages/aws-cdk/lib/init-templates/v1/sample-app/java/pom.template.xml similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/java/pom.template.xml rename to packages/aws-cdk/lib/init-templates/v1/sample-app/java/pom.template.xml diff --git a/packages/aws-cdk/lib/init-templates/sample-app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java b/packages/aws-cdk/lib/init-templates/v1/sample-app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java rename to packages/aws-cdk/lib/init-templates/v1/sample-app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java diff --git a/packages/aws-cdk/lib/init-templates/sample-app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java b/packages/aws-cdk/lib/init-templates/v1/sample-app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java rename to packages/aws-cdk/lib/init-templates/v1/sample-app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java diff --git a/packages/aws-cdk/lib/init-templates/sample-app/java/src/test/java/com/myorg/%name.PascalCased%StackTest.template.java b/packages/aws-cdk/lib/init-templates/v1/sample-app/java/src/test/java/com/myorg/%name.PascalCased%StackTest.template.java similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/java/src/test/java/com/myorg/%name.PascalCased%StackTest.template.java rename to packages/aws-cdk/lib/init-templates/v1/sample-app/java/src/test/java/com/myorg/%name.PascalCased%StackTest.template.java diff --git a/packages/aws-cdk/lib/init-templates/sample-app/javascript/.template.gitignore b/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/javascript/.template.gitignore rename to packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/sample-app/javascript/.template.npmignore b/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/.template.npmignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/javascript/.template.npmignore rename to packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/.template.npmignore diff --git a/packages/aws-cdk/lib/init-templates/sample-app/javascript/README.template.md b/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/README.template.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/javascript/README.template.md rename to packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/README.template.md diff --git a/packages/aws-cdk/lib/init-templates/sample-app/javascript/bin/%name%.template.js b/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/bin/%name%.template.js similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/javascript/bin/%name%.template.js rename to packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/bin/%name%.template.js diff --git a/packages/aws-cdk/lib/init-templates/sample-app/javascript/cdk.template.json b/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/cdk.template.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/javascript/cdk.template.json rename to packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/cdk.template.json diff --git a/packages/aws-cdk/lib/init-templates/sample-app/javascript/lib/%name%-stack.template.js b/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/lib/%name%-stack.template.js similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/javascript/lib/%name%-stack.template.js rename to packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/lib/%name%-stack.template.js diff --git a/packages/aws-cdk/lib/init-templates/sample-app/javascript/package.template.json b/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/package.template.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/javascript/package.template.json rename to packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/package.template.json diff --git a/packages/aws-cdk/lib/init-templates/sample-app/javascript/test/%name%.test.template.js b/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/test/%name%.test.template.js similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/javascript/test/%name%.test.template.js rename to packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/test/%name%.test.template.js diff --git a/packages/aws-cdk/lib/init-templates/sample-app/javascript/tsconfig.json b/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/tsconfig.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/javascript/tsconfig.json rename to packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/tsconfig.json diff --git a/packages/aws-cdk/lib/init-templates/sample-app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py b/packages/aws-cdk/lib/init-templates/v1/sample-app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py rename to packages/aws-cdk/lib/init-templates/v1/sample-app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py diff --git a/packages/aws-cdk/lib/init-templates/sample-app/python/%name.PythonModule%/__init__.py b/packages/aws-cdk/lib/init-templates/v1/sample-app/python/%name.PythonModule%/__init__.py similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/python/%name.PythonModule%/__init__.py rename to packages/aws-cdk/lib/init-templates/v1/sample-app/python/%name.PythonModule%/__init__.py diff --git a/packages/aws-cdk/lib/init-templates/sample-app/python/.template.gitignore b/packages/aws-cdk/lib/init-templates/v1/sample-app/python/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/python/.template.gitignore rename to packages/aws-cdk/lib/init-templates/v1/sample-app/python/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/sample-app/python/README.template.md b/packages/aws-cdk/lib/init-templates/v1/sample-app/python/README.template.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/python/README.template.md rename to packages/aws-cdk/lib/init-templates/v1/sample-app/python/README.template.md diff --git a/packages/aws-cdk/lib/init-templates/sample-app/python/app.template.py b/packages/aws-cdk/lib/init-templates/v1/sample-app/python/app.template.py similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/python/app.template.py rename to packages/aws-cdk/lib/init-templates/v1/sample-app/python/app.template.py diff --git a/packages/aws-cdk/lib/init-templates/sample-app/python/cdk.template.json b/packages/aws-cdk/lib/init-templates/v1/sample-app/python/cdk.template.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/python/cdk.template.json rename to packages/aws-cdk/lib/init-templates/v1/sample-app/python/cdk.template.json diff --git a/packages/aws-cdk/lib/init-templates/sample-app/python/requirements.txt b/packages/aws-cdk/lib/init-templates/v1/sample-app/python/requirements.txt similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/python/requirements.txt rename to packages/aws-cdk/lib/init-templates/v1/sample-app/python/requirements.txt diff --git a/packages/aws-cdk/lib/init-templates/sample-app/python/setup.template.py b/packages/aws-cdk/lib/init-templates/v1/sample-app/python/setup.template.py similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/python/setup.template.py rename to packages/aws-cdk/lib/init-templates/v1/sample-app/python/setup.template.py diff --git a/packages/aws-cdk/lib/init-templates/sample-app/python/source.bat b/packages/aws-cdk/lib/init-templates/v1/sample-app/python/source.bat similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/python/source.bat rename to packages/aws-cdk/lib/init-templates/v1/sample-app/python/source.bat diff --git a/packages/aws-cdk/lib/init-templates/sample-app/python/tests/__init__.py b/packages/aws-cdk/lib/init-templates/v1/sample-app/python/tests/__init__.py similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/python/tests/__init__.py rename to packages/aws-cdk/lib/init-templates/v1/sample-app/python/tests/__init__.py diff --git a/packages/aws-cdk/lib/init-templates/sample-app/python/tests/unit/__init__.py b/packages/aws-cdk/lib/init-templates/v1/sample-app/python/tests/unit/__init__.py similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/python/tests/unit/__init__.py rename to packages/aws-cdk/lib/init-templates/v1/sample-app/python/tests/unit/__init__.py diff --git a/packages/aws-cdk/lib/init-templates/sample-app/python/tests/unit/test_%name.PythonModule%_stack.template.py b/packages/aws-cdk/lib/init-templates/v1/sample-app/python/tests/unit/test_%name.PythonModule%_stack.template.py similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/python/tests/unit/test_%name.PythonModule%_stack.template.py rename to packages/aws-cdk/lib/init-templates/v1/sample-app/python/tests/unit/test_%name.PythonModule%_stack.template.py diff --git a/packages/aws-cdk/lib/init-templates/sample-app/typescript/.template.gitignore b/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/typescript/.template.gitignore rename to packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/sample-app/typescript/.template.npmignore b/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/.template.npmignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/typescript/.template.npmignore rename to packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/.template.npmignore diff --git a/packages/aws-cdk/lib/init-templates/sample-app/typescript/README.template.md b/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/README.template.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/typescript/README.template.md rename to packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/README.template.md diff --git a/packages/aws-cdk/lib/init-templates/sample-app/typescript/bin/%name%.template.ts b/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/bin/%name%.template.ts similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/typescript/bin/%name%.template.ts rename to packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/bin/%name%.template.ts diff --git a/packages/aws-cdk/lib/init-templates/sample-app/typescript/cdk.template.json b/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/cdk.template.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/typescript/cdk.template.json rename to packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/cdk.template.json diff --git a/packages/aws-cdk/lib/init-templates/sample-app/typescript/jest.config.js b/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/jest.config.js similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/typescript/jest.config.js rename to packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/jest.config.js diff --git a/packages/aws-cdk/lib/init-templates/sample-app/typescript/lib/%name%-stack.template.ts b/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/lib/%name%-stack.template.ts similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/typescript/lib/%name%-stack.template.ts rename to packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/lib/%name%-stack.template.ts diff --git a/packages/aws-cdk/lib/init-templates/sample-app/typescript/package.template.json b/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/package.template.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/typescript/package.template.json rename to packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/package.template.json diff --git a/packages/aws-cdk/lib/init-templates/sample-app/typescript/test/%name%.test.template.ts b/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/test/%name%.test.template.ts similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/typescript/test/%name%.test.template.ts rename to packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/test/%name%.test.template.ts diff --git a/packages/aws-cdk/lib/init-templates/sample-app/typescript/tsconfig.json b/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/tsconfig.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/sample-app/typescript/tsconfig.json rename to packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/tsconfig.json diff --git a/packages/aws-cdk/lib/init.ts b/packages/aws-cdk/lib/init.ts index a40477712f2eb..d0873199f3c68 100644 --- a/packages/aws-cdk/lib/init.ts +++ b/packages/aws-cdk/lib/init.ts @@ -3,8 +3,10 @@ import * as path from 'path'; import * as cxapi from '@aws-cdk/cx-api'; import * as colors from 'colors/safe'; import * as fs from 'fs-extra'; +import * as semver from 'semver'; import { error, print, warning } from './logging'; import { cdkHomeDir } from './util/directories'; +import { versionNumber } from './version'; export type InvokeHook = (targetDirectory: string) => Promise; @@ -14,8 +16,6 @@ const camelCase = require('camelcase'); // eslint-disable-next-line @typescript-eslint/no-require-imports const decamelize = require('decamelize'); -const TEMPLATES_DIR = path.join(__dirname, 'init-templates'); - /** * Initialize a CDK package in the current directory */ @@ -57,8 +57,8 @@ function pythonExecutable() { const INFO_DOT_JSON = 'info.json'; export class InitTemplate { - public static async fromName(name: string) { - const basePath = path.join(TEMPLATES_DIR, name); + public static async fromName(templatesDir: string, name: string) { + const basePath = path.join(templatesDir, name); const languages = (await listDirectory(basePath)).filter(f => f !== INFO_DOT_JSON); const info = await fs.readJson(path.join(basePath, INFO_DOT_JSON)); return new InitTemplate(basePath, name, languages, info); @@ -194,12 +194,20 @@ interface ProjectInfo { readonly name: string; } +function versionedTemplatesDir(): Promise { + return new Promise(async resolve => { + const majorVersion = semver.major(versionNumber()); + resolve(path.join(__dirname, 'init-templates', `v${majorVersion}`)); + }); +} + export const availableInitTemplates: Promise = new Promise(async resolve => { - const templateNames = await listDirectory(TEMPLATES_DIR); + const templatesDir = await versionedTemplatesDir(); + const templateNames = await listDirectory(templatesDir); const templates = new Array(); for (const templateName of templateNames) { - templates.push(await InitTemplate.fromName(templateName)); + templates.push(await InitTemplate.fromName(templatesDir, templateName)); } resolve(templates); }); diff --git a/packages/aws-cdk/test/init.test.ts b/packages/aws-cdk/test/init.test.ts index 9e9ae78784a45..5335bdbc3dfee 100644 --- a/packages/aws-cdk/test/init.test.ts +++ b/packages/aws-cdk/test/init.test.ts @@ -1,3 +1,7 @@ +jest.mock('../lib/version', () => ({ + versionNumber: mockVersionNumber, +})); + import * as os from 'os'; import * as path from 'path'; import * as cxapi from '@aws-cdk/cx-api'; @@ -88,3 +92,14 @@ async function withTempDir(cb: (dir: string) => void | Promise) { await fs.remove(tmpDir); } } + +/** + * The init templates rely on parsing the current major version to find the correct template directory. + * During tests, the current package version is '0.0.0', rather than a specific version. + * The below mocks the versionNumber to return the same major version as the current release. + */ +function mockVersionNumber() { + // eslint-disable-next-line @typescript-eslint/no-require-imports + const releaseJson = require(`${__dirname}/../../../release.json`); + return `${releaseJson.majorVersion}.0.0`; +} diff --git a/packages/aws-cdk/tsconfig.json b/packages/aws-cdk/tsconfig.json index 04e0404f04442..737e0bc5497f6 100644 --- a/packages/aws-cdk/tsconfig.json +++ b/packages/aws-cdk/tsconfig.json @@ -19,10 +19,10 @@ "include": [ "**/*.ts", "**/*.d.ts", - "lib/init-templates/*/*/add-project.hook.ts" + "lib/init-templates/**/add-project.hook.ts" ], "exclude": [ - "lib/init-templates/*/typescript/**/*.ts" + "lib/init-templates/**/typescript/**/*.ts" ] } From 94fbdddeed99bbf4644062cb490824d5cddf7770 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 24 Nov 2020 17:02:05 +0000 Subject: [PATCH 206/314] chore(deps-dev): bump typescript-json-schema from 0.43.0 to 0.44.0 (#11670) Bumps [typescript-json-schema](https://github.com/YousefED/typescript-json-schema) from 0.43.0 to 0.44.0. - [Release notes](https://github.com/YousefED/typescript-json-schema/releases) - [Commits](https://github.com/YousefED/typescript-json-schema/compare/v0.43.0...v0.44.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- .../cloud-assembly-schema/package.json | 2 +- yarn.lock | 30 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/packages/@aws-cdk/cloud-assembly-schema/package.json b/packages/@aws-cdk/cloud-assembly-schema/package.json index c9258888b3c6d..6eb7b2887f3dd 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/package.json +++ b/packages/@aws-cdk/cloud-assembly-schema/package.json @@ -58,7 +58,7 @@ "jest": "^26.6.3", "mock-fs": "^4.13.0", "pkglint": "0.0.0", - "typescript-json-schema": "^0.43.0" + "typescript-json-schema": "^0.44.0" }, "repository": { "url": "https://github.com/aws/aws-cdk.git", diff --git a/yarn.lock b/yarn.lock index 2d3ea4a24f0d3..f402c043e7288 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1605,7 +1605,7 @@ jest-diff "^26.0.0" pretty-format "^26.0.0" -"@types/json-schema@*", "@types/json-schema@^7.0.3", "@types/json-schema@^7.0.5": +"@types/json-schema@*", "@types/json-schema@^7.0.3", "@types/json-schema@^7.0.6": version "7.0.6" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0" integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw== @@ -4914,7 +4914,7 @@ glob-to-regexp@^0.3.0: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= -glob@^7.0.0, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@~7.1.6: +glob@^7.0.0, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -9937,32 +9937,32 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript-json-schema@^0.43.0: - version "0.43.0" - resolved "https://registry.yarnpkg.com/typescript-json-schema/-/typescript-json-schema-0.43.0.tgz#8bd9c832f1f15f006ff933907ce192222fdfd92f" - integrity sha512-4c9IMlIlHYJiQtzL1gh2nIPJEjBgJjDUs50gsnnc+GFyDSK1oFM3uQIBSVosiuA/4t6LSAXDS9vTdqbQC6EcgA== +typescript-json-schema@^0.44.0: + version "0.44.0" + resolved "https://registry.yarnpkg.com/typescript-json-schema/-/typescript-json-schema-0.44.0.tgz#8ec96b26caa5b8744d6cac47ce9aadc3187f4700" + integrity sha512-MC6hEUYmA35F6SQjwrogzjOhrkH0x4f/yCrzb1EQU5EOoEDdu51vsrlkI9oKgLyyC7uWKBOlJsWAFk2RfGFvgQ== dependencies: - "@types/json-schema" "^7.0.5" - glob "~7.1.6" + "@types/json-schema" "^7.0.6" + glob "^7.1.6" json-stable-stringify "^1.0.1" - typescript "~4.0.2" - yargs "^15.4.1" + typescript "^4.1.2" + yargs "^16.1.1" typescript@^3.3.3, typescript@~3.9.7: version "3.9.7" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa" integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== +typescript@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.2.tgz#6369ef22516fe5e10304aae5a5c4862db55380e9" + integrity sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ== + typescript@~3.8.3: version "3.8.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== -typescript@~4.0.2: - version "4.0.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.3.tgz#153bbd468ef07725c1df9c77e8b453f8d36abba5" - integrity sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg== - uglify-js@^3.1.4: version "3.11.0" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.11.0.tgz#67317658d76c21e0e54d3224aee2df4ee6c3e1dc" From 0445a6ec0105510f73292d311fd32b610bf23d2e Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Tue, 24 Nov 2020 18:37:54 +0100 Subject: [PATCH 207/314] feat(cli): add `--no-lookups` flag to disable context lookups (#11489) Context lookups are supposed to be performed on developer desktops, and committed to `cdk.context.json`. If you don't, your CI build might try to perform a lookup and fail with an unclear error message about permissions, or worse: appear to work properly but leave you with a nondeterministic build. Introduce a CLI flag called `--no-lookups` that throws an appropriately descriptive error message if you forgot to perform context lookups before committing. This now also makes it possible to write an integration test for PR #11461. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/aws-cdk/CONTRIBUTING.md | 3 + packages/aws-cdk/bin/cdk.ts | 1 + .../aws-cdk/lib/api/cxapp/cloud-executable.ts | 13 +- packages/aws-cdk/lib/settings.ts | 2 + .../aws-cdk/test/api/cloud-executable.test.ts | 19 +++ packages/aws-cdk/test/integ/cli/app/app.js | 117 ++++++++++++------ .../aws-cdk/test/integ/cli/cdk-helpers.ts | 13 +- .../aws-cdk/test/integ/cli/cli.integtest.ts | 11 ++ 8 files changed, 140 insertions(+), 39 deletions(-) diff --git a/packages/aws-cdk/CONTRIBUTING.md b/packages/aws-cdk/CONTRIBUTING.md index f0839777aecc0..8df338dad6049 100644 --- a/packages/aws-cdk/CONTRIBUTING.md +++ b/packages/aws-cdk/CONTRIBUTING.md @@ -58,6 +58,9 @@ than one test will run at a time in that region. If `AWS_REGIONS` is not set, all tests will sequentially run in the one region set in `AWS_REGION`. +Run with `env INTEG_NO_CLEAN=1` to forego cleaning up the temporary directory, +in order to be able to debug 'cdk synth' output. + ### CLI integration tests CLI tests will exercise a number of common CLI scenarios, and deploy actual diff --git a/packages/aws-cdk/bin/cdk.ts b/packages/aws-cdk/bin/cdk.ts index bb87342478f98..4bd548e318b71 100644 --- a/packages/aws-cdk/bin/cdk.ts +++ b/packages/aws-cdk/bin/cdk.ts @@ -46,6 +46,7 @@ async function parseCommandLineArguments() { .option('plugin', { type: 'array', alias: 'p', desc: 'Name or path of a node package that extend the CDK features. Can be specified multiple times', nargs: 1 }) .option('trace', { type: 'boolean', desc: 'Print trace for stack warnings' }) .option('strict', { type: 'boolean', desc: 'Do not construct stacks with warnings' }) + .option('lookups', { type: 'boolean', desc: 'Perform context lookups (synthesis fails if this is disabled and context lookups need to be performed)', default: true }) .option('ignore-errors', { type: 'boolean', default: false, desc: 'Ignores synthesis errors, which will likely produce an invalid output' }) .option('json', { type: 'boolean', alias: 'j', desc: 'Use JSON output instead of YAML when templates are printed to STDOUT', default: false }) .option('verbose', { type: 'boolean', alias: 'v', desc: 'Show debug logs (specify multiple times to increase verbosity)', default: false }) diff --git a/packages/aws-cdk/lib/api/cxapp/cloud-executable.ts b/packages/aws-cdk/lib/api/cxapp/cloud-executable.ts index 9f3e32ddb2389..3a454177469f0 100644 --- a/packages/aws-cdk/lib/api/cxapp/cloud-executable.ts +++ b/packages/aws-cdk/lib/api/cxapp/cloud-executable.ts @@ -66,9 +66,16 @@ export class CloudExecutable { while (true) { const assembly = await this.props.synthesizer(this.props.sdkProvider, this.props.configuration); - if (assembly.manifest.missing) { + if (assembly.manifest.missing && assembly.manifest.missing.length > 0) { const missingKeys = missingContextKeys(assembly.manifest.missing); + if (!this.canLookup) { + throw new Error( + 'Context lookups have been disabled. ' + + 'Make sure all necessary context is already in \'cdk.context.json\' by running \'cdk synth\' on a machine with sufficient AWS credentials and committing the result. ' + + `Missing context keys: '${Array.from(missingKeys).join(', ')}'`); + } + let tryLookup = true; if (previouslyMissingKeys && setsEqual(missingKeys, previouslyMissingKeys)) { debug('Not making progress trying to resolve environmental context. Giving up.'); @@ -162,6 +169,10 @@ export class CloudExecutable { await fs.writeFile(stack.templateFullPath, JSON.stringify(stack.template, undefined, 2), { encoding: 'utf-8' }); } } + + private get canLookup() { + return !!(this.props.configuration.settings.get(['lookups']) ?? true); + } } /** diff --git a/packages/aws-cdk/lib/settings.ts b/packages/aws-cdk/lib/settings.ts index 86e475c235802..0663d021f63d3 100644 --- a/packages/aws-cdk/lib/settings.ts +++ b/packages/aws-cdk/lib/settings.ts @@ -43,6 +43,7 @@ export type Arguments = { readonly _: [Command, ...string[]]; readonly exclusively?: boolean; readonly STACKS?: string[]; + readonly lookups?: boolean; readonly [name: string]: unknown; }; @@ -245,6 +246,7 @@ export class Settings { output: argv.output, progress: argv.progress, bundlingStacks, + lookups: argv.lookups, }); } diff --git a/packages/aws-cdk/test/api/cloud-executable.test.ts b/packages/aws-cdk/test/api/cloud-executable.test.ts index 3e9dc83948c23..c1f894e6c758f 100644 --- a/packages/aws-cdk/test/api/cloud-executable.test.ts +++ b/packages/aws-cdk/test/api/cloud-executable.test.ts @@ -73,6 +73,25 @@ test('stop executing if context providers are not making progress', async () => // THEN: the test finishes normally}); }); +test('fails if lookups are disabled and missing context is synthesized', async () => { + // GIVEN + const cloudExecutable = new MockCloudExecutable({ + stacks: [{ + stackName: 'thestack', + template: { resource: 'noerrorresource' }, + }], + // Always return the same missing keys, synthesis should still finish. + missing: [ + { key: 'abcdef', props: { account: '1324', region: 'us-east-1' }, provider: cxschema.ContextProvider.AVAILABILITY_ZONE_PROVIDER }, + ], + }); + cloudExecutable.configuration.settings.set(['lookups'], false); + + // WHEN + await expect(cloudExecutable.synthesize()).rejects.toThrow(/Context lookups have been disabled/); +}); + + async function testCloudExecutable({ env, versionReporting = true }: { env?: string, versionReporting?: boolean } = {}) { const cloudExec = new MockCloudExecutable({ stacks: [{ diff --git a/packages/aws-cdk/test/integ/cli/app/app.js b/packages/aws-cdk/test/integ/cli/app/app.js index 175b658949fc4..43875f4fa0037 100644 --- a/packages/aws-cdk/test/integ/cli/app/app.js +++ b/packages/aws-cdk/test/integ/cli/app/app.js @@ -44,6 +44,19 @@ class YourStack extends cdk.Stack { } } +class StackUsingContext extends cdk.Stack { + constructor(parent, id, props) { + super(parent, id, props); + new core.CfnResource(this, 'Handle', { + type: 'AWS::CloudFormation::WaitConditionHandle' + }); + + new core.CfnOutput(this, 'Output', { + value: this.availabilityZones, + }); + } +} + class ParameterStack extends cdk.Stack { constructor(parent, id, props) { super(parent, id, props); @@ -247,6 +260,14 @@ class SomeStage extends cdk.Stage { } } +class StageUsingContext extends cdk.Stage { + constructor(parent, id, props) { + super(parent, id, props); + + new StackUsingContext(this, 'StackInStage'); + } +} + const app = new cdk.App(); const defaultEnv = { @@ -254,46 +275,68 @@ const defaultEnv = { region: process.env.CDK_DEFAULT_REGION }; -// Deploy all does a wildcard ${stackPrefix}-test-* -new MyStack(app, `${stackPrefix}-test-1`, { env: defaultEnv }); -new YourStack(app, `${stackPrefix}-test-2`); -// Deploy wildcard with parameters does ${stackPrefix}-param-test-* -new ParameterStack(app, `${stackPrefix}-param-test-1`); -new OtherParameterStack(app, `${stackPrefix}-param-test-2`); -// Deploy stack with multiple parameters -new MultiParameterStack(app, `${stackPrefix}-param-test-3`); -// Deploy stack with outputs does ${stackPrefix}-outputs-test-* -new OutputsStack(app, `${stackPrefix}-outputs-test-1`); -new AnotherOutputsStack(app, `${stackPrefix}-outputs-test-2`); -// Not included in wildcard -new IamStack(app, `${stackPrefix}-iam-test`, { env: defaultEnv }); -const providing = new ProvidingStack(app, `${stackPrefix}-order-providing`); -new ConsumingStack(app, `${stackPrefix}-order-consuming`, { providingStack: providing }); - -new MissingSSMParameterStack(app, `${stackPrefix}-missing-ssm-parameter`, { env: defaultEnv }); - -new LambdaStack(app, `${stackPrefix}-lambda`); -new DockerStack(app, `${stackPrefix}-docker`); -new DockerStackWithCustomFile(app, `${stackPrefix}-docker-with-custom-file`); -new FailedStack(app, `${stackPrefix}-failed`) - -if (process.env.ENABLE_VPC_TESTING) { // Gating so we don't do context fetching unless that's what we are here for - const env = { account: process.env.CDK_DEFAULT_ACCOUNT, region: process.env.CDK_DEFAULT_REGION }; - if (process.env.ENABLE_VPC_TESTING === 'DEFINE') - new DefineVpcStack(app, `${stackPrefix}-define-vpc`, { env }); - if (process.env.ENABLE_VPC_TESTING === 'IMPORT') - new ImportVpcStack(app, `${stackPrefix}-import-vpc`, { env }); -} +// Sometimes we don't want to synthesize all stacks because it will impact the results +const stackSet = process.env.INTEG_STACK_SET || 'default'; + +switch (stackSet) { + case 'default': + // Deploy all does a wildcard ${stackPrefix}-test-* + new MyStack(app, `${stackPrefix}-test-1`, { env: defaultEnv }); + new YourStack(app, `${stackPrefix}-test-2`); + // Deploy wildcard with parameters does ${stackPrefix}-param-test-* + new ParameterStack(app, `${stackPrefix}-param-test-1`); + new OtherParameterStack(app, `${stackPrefix}-param-test-2`); + // Deploy stack with multiple parameters + new MultiParameterStack(app, `${stackPrefix}-param-test-3`); + // Deploy stack with outputs does ${stackPrefix}-outputs-test-* + new OutputsStack(app, `${stackPrefix}-outputs-test-1`); + new AnotherOutputsStack(app, `${stackPrefix}-outputs-test-2`); + // Not included in wildcard + new IamStack(app, `${stackPrefix}-iam-test`, { env: defaultEnv }); + const providing = new ProvidingStack(app, `${stackPrefix}-order-providing`); + new ConsumingStack(app, `${stackPrefix}-order-consuming`, { providingStack: providing }); + + new MissingSSMParameterStack(app, `${stackPrefix}-missing-ssm-parameter`, { env: defaultEnv }); + + new LambdaStack(app, `${stackPrefix}-lambda`); + new DockerStack(app, `${stackPrefix}-docker`); + new DockerStackWithCustomFile(app, `${stackPrefix}-docker-with-custom-file`); + new FailedStack(app, `${stackPrefix}-failed`) + + if (process.env.ENABLE_VPC_TESTING) { // Gating so we don't do context fetching unless that's what we are here for + const env = { account: process.env.CDK_DEFAULT_ACCOUNT, region: process.env.CDK_DEFAULT_REGION }; + if (process.env.ENABLE_VPC_TESTING === 'DEFINE') + new DefineVpcStack(app, `${stackPrefix}-define-vpc`, { env }); + if (process.env.ENABLE_VPC_TESTING === 'IMPORT') + new ImportVpcStack(app, `${stackPrefix}-import-vpc`, { env }); + } -new ConditionalResourceStack(app, `${stackPrefix}-conditional-resource`) + new ConditionalResourceStack(app, `${stackPrefix}-conditional-resource`) -new StackWithNestedStack(app, `${stackPrefix}-with-nested-stack`); -new StackWithNestedStackUsingParameters(app, `${stackPrefix}-with-nested-stack-using-parameters`); + new StackWithNestedStack(app, `${stackPrefix}-with-nested-stack`); + new StackWithNestedStackUsingParameters(app, `${stackPrefix}-with-nested-stack-using-parameters`); -new YourStack(app, `${stackPrefix}-termination-protection`, { - terminationProtection: process.env.TERMINATION_PROTECTION !== 'FALSE' ? true : false, -}); + new YourStack(app, `${stackPrefix}-termination-protection`, { + terminationProtection: process.env.TERMINATION_PROTECTION !== 'FALSE' ? true : false, + }); + + new SomeStage(app, `${stackPrefix}-stage`); + break; + + case 'stage-using-context': + // Cannot be combined with other test stacks, because we use this to test + // that stage context is propagated up and causes synth to fail when combined + // with '--no-lookups'. -new SomeStage(app, `${stackPrefix}-stage`); + // Needs a dummy stack at the top level because the CLI will fail otherwise + new YourStack(app, `${stackPrefix}-toplevel`, { env: defaultEnv }); + new StageUsingContext(app, `${stackPrefix}-stage-using-context`, { + env: defaultEnv, + }); + break; + + default: + throw new Error(`Unrecognized INTEG_STACK_SET: '${stackSet}'`); +} app.synth(); diff --git a/packages/aws-cdk/test/integ/cli/cdk-helpers.ts b/packages/aws-cdk/test/integ/cli/cdk-helpers.ts index c1049e330d77e..cc38e7ec54cfa 100644 --- a/packages/aws-cdk/test/integ/cli/cdk-helpers.ts +++ b/packages/aws-cdk/test/integ/cli/cdk-helpers.ts @@ -83,7 +83,11 @@ export function withCdkApp(block: (context: success = false; throw e; } finally { - await fixture.dispose(success); + if (process.env.INTEG_NO_CLEAN) { + process.stderr.write(`Left test directory in '${integTestDir}' ($INTEG_NO_CLEAN)\n`); + } else { + await fixture.dispose(success); + } } }; } @@ -177,6 +181,13 @@ export class TestFixture { ...this.fullStackName(stackNames)], options); } + public async cdkSynth(options: CdkCliOptions = {}) { + return this.cdk([ + 'synth', + ...(options.options ?? []), + ], options); + } + public async cdkDestroy(stackNames: string | string[], options: CdkCliOptions = {}) { stackNames = typeof stackNames === 'string' ? [stackNames] : stackNames; diff --git a/packages/aws-cdk/test/integ/cli/cli.integtest.ts b/packages/aws-cdk/test/integ/cli/cli.integtest.ts index 079a560175a8d..407c1d7fd99c4 100644 --- a/packages/aws-cdk/test/integ/cli/cli.integtest.ts +++ b/packages/aws-cdk/test/integ/cli/cli.integtest.ts @@ -93,6 +93,17 @@ integTest('context setting', withDefaultFixture(async (fixture) => { } })); +integTest('context in stage propagates to top', withDefaultFixture(async (fixture) => { + await expect(fixture.cdkSynth({ + // This will make it error to prove that the context bubbles up, and also that we can fail on command + options: ['--no-lookups'], + modEnv: { + INTEG_STACK_SET: 'stage-using-context', + }, + allowErrExit: true, + })).resolves.toContain('Context lookups have been disabled'); +})); + integTest('deploy', withDefaultFixture(async (fixture) => { const stackArn = await fixture.cdkDeploy('test-2', { captureStderr: false }); From 438cd42d6d85721d83c6a89e755512b211bc8ac4 Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Tue, 24 Nov 2020 18:14:00 +0000 Subject: [PATCH 208/314] chore: fix init template tests via npmignore (#11674) I foolishly changed some of the ordering of .npmignore as part of #11665 to logically group similar components together, without taking into account the fact that ordering in .npmignore is *important*. Fix the ordering to fix the pipeline. Tested via: * Diffing the contents of `pack` between a recent release and what's generated here. * Running `package/test/integ/run-against-dist package/test/integ/init/test-typescript.sh` ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/aws-cdk/.npmignore | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/aws-cdk/.npmignore b/packages/aws-cdk/.npmignore index 022147ad6129a..c9307723524b0 100644 --- a/packages/aws-cdk/.npmignore +++ b/packages/aws-cdk/.npmignore @@ -16,13 +16,14 @@ dist *.tsbuildinfo +jest.config.js tsconfig.json +.eslintrc.js # init templates include default tsconfig.json files which we need !lib/init-templates/**/tsconfig.json !lib/init-templates/**/jest.config.js -.eslintrc.js -jest.config.js + !test/integ/cli/jest.config.js !test/integ/cli-regression-patches/**/* From 7dea8567048dfb494872a2dead38f6e00af7d915 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 24 Nov 2020 20:14:43 +0000 Subject: [PATCH 209/314] chore(deps): bump aws-sdk from 2.797.0 to 2.799.0 (#11679) Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.797.0 to 2.799.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.797.0...v2.799.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/aws-cloudfront-origins/package.json | 2 +- packages/@aws-cdk/aws-cloudfront/package.json | 2 +- packages/@aws-cdk/aws-cloudtrail/package.json | 2 +- packages/@aws-cdk/aws-codebuild/package.json | 2 +- packages/@aws-cdk/aws-codecommit/package.json | 2 +- packages/@aws-cdk/aws-dynamodb/package.json | 2 +- packages/@aws-cdk/aws-eks/package.json | 2 +- packages/@aws-cdk/aws-events-targets/package.json | 2 +- packages/@aws-cdk/aws-logs/package.json | 2 +- packages/@aws-cdk/aws-route53/package.json | 2 +- packages/@aws-cdk/aws-sqs/package.json | 2 +- packages/@aws-cdk/custom-resources/package.json | 2 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- yarn.lock | 8 ++++---- 15 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudfront-origins/package.json b/packages/@aws-cdk/aws-cloudfront-origins/package.json index 2779d3a346793..53bcd522450fc 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/package.json +++ b/packages/@aws-cdk/aws-cloudfront-origins/package.json @@ -72,7 +72,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", - "aws-sdk": "^2.797.0", + "aws-sdk": "^2.799.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "pkglint": "0.0.0" diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index 476ce54a485e4..0ff97a8f23c3b 100644 --- a/packages/@aws-cdk/aws-cloudfront/package.json +++ b/packages/@aws-cdk/aws-cloudfront/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.797.0", + "aws-sdk": "^2.799.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index d883f2738bf40..3155decd9f212 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.797.0", + "aws-sdk": "^2.799.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codebuild/package.json b/packages/@aws-cdk/aws-codebuild/package.json index d04badec906c3..00f01bede7afe 100644 --- a/packages/@aws-cdk/aws-codebuild/package.json +++ b/packages/@aws-cdk/aws-codebuild/package.json @@ -79,7 +79,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.797.0", + "aws-sdk": "^2.799.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codecommit/package.json b/packages/@aws-cdk/aws-codecommit/package.json index fd677d3171bc3..34141449edc58 100644 --- a/packages/@aws-cdk/aws-codecommit/package.json +++ b/packages/@aws-cdk/aws-codecommit/package.json @@ -79,7 +79,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.797.0", + "aws-sdk": "^2.799.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index 5c8d0a1017fcf..90252f3b5c127 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -74,7 +74,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/jest": "^26.0.15", - "aws-sdk": "^2.797.0", + "aws-sdk": "^2.799.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index 463004a2e64a3..ab5512f0ce049 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", "@types/yaml": "1.9.6", - "aws-sdk": "^2.797.0", + "aws-sdk": "^2.799.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index 9fb4b5f08f94b..fa17eec28f293 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -75,7 +75,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-codecommit": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", - "aws-sdk": "^2.797.0", + "aws-sdk": "^2.799.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index c122c403a7c82..d354ff00e1d24 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.797.0", + "aws-sdk": "^2.799.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-route53/package.json b/packages/@aws-cdk/aws-route53/package.json index 2c39b8814966c..47358c707f4ce 100644 --- a/packages/@aws-cdk/aws-route53/package.json +++ b/packages/@aws-cdk/aws-route53/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.797.0", + "aws-sdk": "^2.799.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-sqs/package.json b/packages/@aws-cdk/aws-sqs/package.json index 972fe57198cc7..1e378c81177a8 100644 --- a/packages/@aws-cdk/aws-sqs/package.json +++ b/packages/@aws-cdk/aws-sqs/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.797.0", + "aws-sdk": "^2.799.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index 3bdd18d612336..1898fdea5654d 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -79,7 +79,7 @@ "@types/aws-lambda": "^8.10.64", "@types/fs-extra": "^8.1.1", "@types/sinon": "^9.0.9", - "aws-sdk": "^2.797.0", + "aws-sdk": "^2.799.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index c194a4db600ca..8e2523894af36 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -71,7 +71,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "archiver": "^5.1.0", - "aws-sdk": "^2.797.0", + "aws-sdk": "^2.799.0", "camelcase": "^6.2.0", "cdk-assets": "0.0.0", "colors": "^1.4.0", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index fe9ac39d422e0..71760884bcefe 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -47,7 +47,7 @@ "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "archiver": "^5.1.0", - "aws-sdk": "^2.797.0", + "aws-sdk": "^2.799.0", "glob": "^7.1.6", "yargs": "^16.1.1" }, diff --git a/yarn.lock b/yarn.lock index f402c043e7288..28d81e024cefc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2294,10 +2294,10 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" -aws-sdk@^2.637.0, aws-sdk@^2.797.0: - version "2.797.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.797.0.tgz#e9510a582606a580e7bbb686f01da28476599a2d" - integrity sha512-fFc/2Xr7NkSXlZ9+2rCOFovA9NO1OnIyEaJFVwMM9gaqzucwRAfNNT0Pa1Kua5dhWrcf/mX0Z4mCDnTBf0/5mA== +aws-sdk@^2.637.0, aws-sdk@^2.799.0: + version "2.799.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.799.0.tgz#8b1a64c1a9f8ccf5794eb07bdd8051e4cb6adcfd" + integrity sha512-NYAoiNU+bJXhlJsC0rFqrmD5t5ho7/VxldmziP6HLPYHfOCI9Uvk6UVjfPmhLWPm0mHnIxhsHqmsNGyjhHNYmw== dependencies: buffer "4.9.2" events "1.1.1" From abca69f59636354ebc23fe7bd721a6a454f7d592 Mon Sep 17 00:00:00 2001 From: AWS CDK Team Date: Tue, 24 Nov 2020 21:24:14 +0000 Subject: [PATCH 210/314] chore(release): 1.75.0 --- CHANGELOG.md | 63 +++++++++++++++++++++++++++++++++++++++++++++++++ version.v1.json | 2 +- 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1423ba20377a..485b074cc5d91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,69 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.75.0](https://github.com/aws/aws-cdk/compare/v1.74.0...v1.75.0) (2020-11-24) + + +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES + +* **appmesh:** renames gateway listener static methods to use shorter names +* **appmesh:** renames gateway route static methods to use shorter names +* **appmesh:** changes Route's spec to a union-like class. RouteSpec is now defined using protocol variant static methods +* **lambda-nodejs:** local bundling now requires `esbuild` to be installed. +* **lambda-nodejs**: `projectRoot` has been replaced by `depsLockFilePath`. It should point to your dependency lock file (`package-lock.json` or `yarn.lock`) +* **lambda-nodejs**: `parcelEnvironment` has been renamed to `bundlingEnvironment` +* **lambda-nodejs**: `sourceMaps` has been renamed to `sourceMap` +* **appmesh:** `IVirtualNode` no longer has the `addBackends()` method. A backend can be added to `VirtualNode` using the `addBackend()` method which accepts a single `IVirtualService` +* **appmesh**: `IVirtualNode` no longer has the `addListeners()` method. A listener can be added to `VirtualNode` using the `addListener()` method which accepts a single `VirtualNodeListener` +* **appmesh**: `VirtualNode` no longer has a default listener. It is valid to have a `VirtualNode` without any listeners +* **appmesh**: the construction property `listener` of `VirtualNode` has been renamed to `listeners`, and its type changed to an array of listeners +* **appmesh**: the struct `VirtualNodeListener` has been removed. To create Virtual Node listeners, use the static factory methods of the `VirtualNodeListener` class + +### Features + +* **applicationautoscaling:** Add KAFKA to ServiceNamespace ([#11394](https://github.com/aws/aws-cdk/issues/11394)) ([b5c3f84](https://github.com/aws/aws-cdk/commit/b5c3f84c8be855107d3ea6738bbf8511f2ecdb8e)) +* **appmesh:** add listener timeout to Virtual Nodes ([#10793](https://github.com/aws/aws-cdk/issues/10793)) ([62baa7b](https://github.com/aws/aws-cdk/commit/62baa7b51b49c1a669c7144e5883375fe9ab5d35)) +* **appmesh:** change Route's spec to a union-like class ([#11343](https://github.com/aws/aws-cdk/issues/11343)) ([f0de91f](https://github.com/aws/aws-cdk/commit/f0de91fcf5e956e00f930d0aadcc5516a9125922)) +* **appmesh:** updates gateway resources to use shorter static method names ([#11560](https://github.com/aws/aws-cdk/issues/11560)) ([df4d1d3](https://github.com/aws/aws-cdk/commit/df4d1d3c44b7559e36cbc0adcd51d0b2250fc4e7)) +* **cfnspec:** cloudformation spec v20.0.0 ([#11319](https://github.com/aws/aws-cdk/issues/11319)) ([8c17a35](https://github.com/aws/aws-cdk/commit/8c17a35746271d38289f6e200aea35b201b8a93d)) +* **cfnspec:** cloudformation spec v20.2.0 ([#11429](https://github.com/aws/aws-cdk/issues/11429)) ([025992b](https://github.com/aws/aws-cdk/commit/025992b0014aca493a669be518f4f423d3f39a57)) +* **cfnspec:** cloudformation spec v20.3.0 ([#11539](https://github.com/aws/aws-cdk/issues/11539)) ([3246b67](https://github.com/aws/aws-cdk/commit/3246b670730c4369469f6a43683a27f24c732825)) +* **cli:** add `--no-lookups` flag to disable context lookups ([#11489](https://github.com/aws/aws-cdk/issues/11489)) ([0445a6e](https://github.com/aws/aws-cdk/commit/0445a6ec0105510f73292d311fd32b610bf23d2e)), closes [#11461](https://github.com/aws/aws-cdk/issues/11461) +* **codebuild:** allow setting the Project's logging configuration ([#11444](https://github.com/aws/aws-cdk/issues/11444)) ([6a4b22d](https://github.com/aws/aws-cdk/commit/6a4b22d6db5884dca3cb5c1c8d5312f6edc55dee)), closes [#3856](https://github.com/aws/aws-cdk/issues/3856) +* **codeguruprofiler:** CodeGuruProfiler Construct Library is now in Developer Preview ([#11558](https://github.com/aws/aws-cdk/issues/11558)) ([1da6715](https://github.com/aws/aws-cdk/commit/1da671528472b3bee655bea89bae7273fc21a3bd)) +* **codepipeline-actions:** Add deployment timeout to EcsDeployAction ([#11407](https://github.com/aws/aws-cdk/issues/11407)) ([7d9d575](https://github.com/aws/aws-cdk/commit/7d9d5757db2acedb507da8bb84c65cc06d018b91)) +* **core:** add easy importValue to CfnOutput ([#11368](https://github.com/aws/aws-cdk/issues/11368)) ([c71a4e9](https://github.com/aws/aws-cdk/commit/c71a4e9644fdd64fa00a6d804c921b32bd1816d1)), closes [#11360](https://github.com/aws/aws-cdk/issues/11360) +* **ecs:** allow HTTPS connections from LB to task ([#11381](https://github.com/aws/aws-cdk/issues/11381)) ([0f6e2da](https://github.com/aws/aws-cdk/commit/0f6e2daa248aed9300f5b6c3019cdcb168ee4951)) +* **ecs:** environment files for containers in EC2 task definitions ([8cb74ea](https://github.com/aws/aws-cdk/commit/8cb74eacb3c1a8658d8ec231e339c827c5b1d6e4)) +* **ecs:** secret JSON field for Fargate tasks ([#11348](https://github.com/aws/aws-cdk/issues/11348)) ([03e7cd5](https://github.com/aws/aws-cdk/commit/03e7cd5ebaf07be22f8fff8edacbc384989ebf7c)), closes [/github.com/aws/containers-roadmap/issues/385#issuecomment-722696672](https://github.com/aws//github.com/aws/containers-roadmap/issues/385/issues/issuecomment-722696672) [#11341](https://github.com/aws/aws-cdk/issues/11341) +* **efs:** import access point - `fromAccessPointAttributes()` ([#10712](https://github.com/aws/aws-cdk/issues/10712)) ([ec72c85](https://github.com/aws/aws-cdk/commit/ec72c859c31a069406994433fe430f56ff0e5ff3)) +* **events-targets:** add CloudWatch LogGroup Target ([#10598](https://github.com/aws/aws-cdk/issues/10598)) ([98e9b59](https://github.com/aws/aws-cdk/commit/98e9b5956b3bff6db1cee615cd0e14dcb50d4726)), closes [#9953](https://github.com/aws/aws-cdk/issues/9953) +* **iam:** specify initial PolicyDocument for inline Policy ([#11430](https://github.com/aws/aws-cdk/issues/11430)) ([a8c4f17](https://github.com/aws/aws-cdk/commit/a8c4f178e08cef4f306f54976076c21de2252a55)), closes [#11236](https://github.com/aws/aws-cdk/issues/11236) +* **lambda-nodejs:** esbuild bundling ([#11289](https://github.com/aws/aws-cdk/issues/11289)) ([7a82850](https://github.com/aws/aws-cdk/commit/7a82850d8bec45f18791e269e988c5261d5238d4)), closes [#10286](https://github.com/aws/aws-cdk/issues/10286) [#9130](https://github.com/aws/aws-cdk/issues/9130) [#9312](https://github.com/aws/aws-cdk/issues/9312) [#11222](https://github.com/aws/aws-cdk/issues/11222) +* **logs:** Add KMS key support to LogGroup ([#11363](https://github.com/aws/aws-cdk/issues/11363)) ([21ccfce](https://github.com/aws/aws-cdk/commit/21ccfce514e10cfcdde36148b45f085d3494c540)), closes [#11211](https://github.com/aws/aws-cdk/issues/11211) +* **stepfunctions-tasks:** support overriding all properties of CodeBuild StartBuild integration ([#10356](https://github.com/aws/aws-cdk/issues/10356)) ([58efbad](https://github.com/aws/aws-cdk/commit/58efbad743464439ce8eb97a6c6c3e07b531d93c)), closes [#10302](https://github.com/aws/aws-cdk/issues/10302) + + +### Bug Fixes + +* **autoscaling:** `targetRequestsPerSecond` is actually requests per minute ([#11457](https://github.com/aws/aws-cdk/issues/11457)) ([39e277f](https://github.com/aws/aws-cdk/commit/39e277f65666e96fe1ad662254327967f666dbad)), closes [#11446](https://github.com/aws/aws-cdk/issues/11446) +* **aws-custom-resource:** module fails loading when bundled with parcel ([#11487](https://github.com/aws/aws-cdk/issues/11487)) ([421d4e4](https://github.com/aws/aws-cdk/commit/421d4e4e0c73875db2193847ea0b09349c3635de)) +* **cli:** credential provider plugins cannot be used with modern synthesis ([#11350](https://github.com/aws/aws-cdk/issues/11350)) ([9e91306](https://github.com/aws/aws-cdk/commit/9e91306f53faec31cf7e79f543c216a146406efc)) +* **cloudfront:** origin ID exceeds undocumented 128 character limit ([#11523](https://github.com/aws/aws-cdk/issues/11523)) ([90f0b9d](https://github.com/aws/aws-cdk/commit/90f0b9d466772c4b049b6318c449a490ca7431d8)), closes [#11504](https://github.com/aws/aws-cdk/issues/11504) +* **core:** DefaultStackSynthesizer supports object prefix for s3 assets ([#11327](https://github.com/aws/aws-cdk/issues/11327)) ([1b5f218](https://github.com/aws/aws-cdk/commit/1b5f21861d6b43ac36a8caf590b267bb1a12c0c8)) +* **core:** missing context in Stages is not filled by CLI ([#11461](https://github.com/aws/aws-cdk/issues/11461)) ([a4a555a](https://github.com/aws/aws-cdk/commit/a4a555a9f5e8844a377d8de5041219346d0eb65c)), closes [#9226](https://github.com/aws/aws-cdk/issues/9226) +* **core:** reusing StackSynthesizer leads to unsynthesized Stacks ([#11635](https://github.com/aws/aws-cdk/issues/11635)) ([f03c889](https://github.com/aws/aws-cdk/commit/f03c88974dc89eca8fca798f0640188508bd3623)), closes [#11528](https://github.com/aws/aws-cdk/issues/11528) +* **efs:** cannot use encryption key imported from another account ([#11524](https://github.com/aws/aws-cdk/issues/11524)) ([3578d84](https://github.com/aws/aws-cdk/commit/3578d8434f842a5b5a7290b1d0108818cdaae0f6)), closes [#7641](https://github.com/aws/aws-cdk/issues/7641) +* **eks:** cluster creation fails when configured with an imported public subnet and private endpoint ([#11620](https://github.com/aws/aws-cdk/issues/11620)) ([2c045ce](https://github.com/aws/aws-cdk/commit/2c045ce410e220311f10049da0d9789073eddb37)) +* **iam:** attach policy to imported User ([#11493](https://github.com/aws/aws-cdk/issues/11493)) ([0a8971c](https://github.com/aws/aws-cdk/commit/0a8971c7112735eb70f04633411f3557d2412ff0)), closes [#10913](https://github.com/aws/aws-cdk/issues/10913) [#11046](https://github.com/aws/aws-cdk/issues/11046) [#10527](https://github.com/aws/aws-cdk/issues/10527) +* **init:** TypeScript code is not being recompiled automatically ([#11470](https://github.com/aws/aws-cdk/issues/11470)) ([9843e71](https://github.com/aws/aws-cdk/commit/9843e71219bfe8b5ca675ac322e3dc5b3ab6381c)) +* **lambda:** failed to add permission to an imported lambda from another account ([#11369](https://github.com/aws/aws-cdk/issues/11369)) ([715a030](https://github.com/aws/aws-cdk/commit/715a0300ea44c7cfcb6ae9973bd4ca16585c8fa5)), closes [#11278](https://github.com/aws/aws-cdk/issues/11278) [#11141](https://github.com/aws/aws-cdk/issues/11141) [#11141](https://github.com/aws/aws-cdk/issues/11141) +* **pipelines:** synthesizes incorrect paths on Windows ([#11464](https://github.com/aws/aws-cdk/issues/11464)) ([2ca31a8](https://github.com/aws/aws-cdk/commit/2ca31a87a8cbf0c5267b3d3b39c8dc75b142488e)), closes [#11359](https://github.com/aws/aws-cdk/issues/11359) [#11405](https://github.com/aws/aws-cdk/issues/11405) [#11424](https://github.com/aws/aws-cdk/issues/11424) +* **pipelines:** wrong runOrder for manual approval when using `extraRunOrderSpace` ([#11511](https://github.com/aws/aws-cdk/issues/11511)) ([9b72fc8](https://github.com/aws/aws-cdk/commit/9b72fc8fe0b6238ff4d43a2e5f544bb655bb8908)) +* **stepfunctions:** metric* helpers not available on imported state machines ([#11509](https://github.com/aws/aws-cdk/issues/11509)) ([83c0543](https://github.com/aws/aws-cdk/commit/83c05431e4c254db173cd36dd564c360808ccbde)) +* **stepfunctions-tasks:** encryption is required for AthenaStartQueryExecution ([#11355](https://github.com/aws/aws-cdk/issues/11355)) ([f26a592](https://github.com/aws/aws-cdk/commit/f26a592e609674d528990aad14fb8884112ad64d)) +* **stepfunctions-tasks:** incorrect policy for Athena prevents database deletions ([#11427](https://github.com/aws/aws-cdk/issues/11427)) ([58e6576](https://github.com/aws/aws-cdk/commit/58e6576a90f722929495b7cd9f1d67f93bf9c31e)), closes [#11357](https://github.com/aws/aws-cdk/issues/11357) + ## [1.74.0](https://github.com/aws/aws-cdk/compare/v1.73.0...v1.74.0) (2020-11-17) diff --git a/version.v1.json b/version.v1.json index 9b48089bc1d8f..2bac917cd4459 100644 --- a/version.v1.json +++ b/version.v1.json @@ -1,3 +1,3 @@ { - "version": "1.74.0" + "version": "1.75.0" } From ec61c3c054b1c04da60e9e0ae6e5b77bacc4f030 Mon Sep 17 00:00:00 2001 From: Somaya Date: Tue, 24 Nov 2020 14:17:02 -0800 Subject: [PATCH 211/314] chore: update issue template titles (#11684) Making the issue templates title placeholder more explicit to avoid confusion since we've been getting a lot of issues with titles not formatted correctly. Also changing from brackets to parens to match PR titles, which will make adding PRs to the auto/label github action easier. That PR is coming later today. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .github/ISSUE_TEMPLATE/bug.md | 2 +- .github/ISSUE_TEMPLATE/doc.md | 2 +- .github/ISSUE_TEMPLATE/feature-request.md | 2 +- .github/ISSUE_TEMPLATE/general-issues.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md index b12a80d025350..286ca89cb1c53 100644 --- a/.github/ISSUE_TEMPLATE/bug.md +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -1,7 +1,7 @@ --- name: "\U0001F41B Bug Report" about: Report a bug -title: "[module] " +title: "(module name): short issue description" labels: bug, needs-triage --- diff --git a/.github/ISSUE_TEMPLATE/doc.md b/.github/ISSUE_TEMPLATE/doc.md index 022c04c22ed80..3c8a1dc691d0e 100644 --- a/.github/ISSUE_TEMPLATE/doc.md +++ b/.github/ISSUE_TEMPLATE/doc.md @@ -1,7 +1,7 @@ --- name: "📕 Documentation Issue" about: Issue in the reference documentation or developer guide -title: "[module] " +title: "(module name): short issue description" labels: feature-request, documentation, needs-triage --- diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md index c2d12b48d5750..163f2f54d0b88 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -1,7 +1,7 @@ --- name: "\U0001F680 Feature Request" about: Request a new feature -title: "[module] " +title: "(module name): short issue description" labels: feature-request, needs-triage --- diff --git a/.github/ISSUE_TEMPLATE/general-issues.md b/.github/ISSUE_TEMPLATE/general-issues.md index 372cb49eb540c..dcd6520c0cfda 100644 --- a/.github/ISSUE_TEMPLATE/general-issues.md +++ b/.github/ISSUE_TEMPLATE/general-issues.md @@ -1,7 +1,7 @@ --- name: "\U00002753 General Issue" about: Create a new issue -title: "[module] " +title: "(module name): short issue description" labels: needs-triage, guidance --- From d4133df220ce7e1a684c84aae3058782cd640257 Mon Sep 17 00:00:00 2001 From: Somaya Date: Tue, 24 Nov 2020 17:24:56 -0800 Subject: [PATCH 212/314] chore: update assign action to include prs (#11686) --- .github/workflows/issue-label-assign.yml | 335 ++++++++++++----------- 1 file changed, 169 insertions(+), 166 deletions(-) diff --git a/.github/workflows/issue-label-assign.yml b/.github/workflows/issue-label-assign.yml index 6184e7c0580f5..00e2ee1d2ecaf 100644 --- a/.github/workflows/issue-label-assign.yml +++ b/.github/workflows/issue-label-assign.yml @@ -2,6 +2,10 @@ name: "Set Issue Label and Assignee" on: issues: types: [opened, edited] + pull_request: + types: [opened, edited] + pull_request_target: + types: [opened, edited] jobs: test: @@ -13,170 +17,169 @@ jobs: title-or-body: 'title' parameters: > [ - {"keywords":["[cli]","[command line]"],"labels":["package/tools"],"assignees":["rix0rrr"]}, - {"keywords":["[@aws-cdk/alexa-ask]","[alexa-ask]","[alexa ask]"],"labels":["@aws-cdk/alexa-ask"],"assignees":["MrArnoldPalmer"]}, - {"keywords":["[@aws-cdk/app-delivery]","[app-delivery]","[app delivery]"],"labels":["@aws-cdk/app-delivery"],"assignees":["skinny85"]}, - {"keywords":["[@aws-cdk/assert]","[assert]"],"labels":["@aws-cdk/assert"],"assignees":["nija-at"]}, - {"keywords":["[@aws-cdk/assets]","[assets]"],"labels":["@aws-cdk/assets"],"assignees":["eladb"]}, - {"keywords":["[@aws-cdk/aws-accessanalyzer]","[aws-accessanalyzer]","[accessanalyzer]","[access analyzer]"],"labels":["@aws-cdk/aws-accessanalyzer"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-acmpca]","[aws-acmpca]","[acmpca]"],"labels":["@aws-cdk/aws-acmpca"],"assignees":["skinny85"]}, - {"keywords":["[@aws-cdk/aws-amazonmq]","[aws-amazonmq]","[amazonmq]","[amazon mq]","[amazon-mq]"],"labels":["@aws-cdk/aws-amazonmq"],"assignees":["MrArnoldPalmer"]}, - {"keywords":["[@aws-cdk/aws-amplify]","[aws-amplify]","[amplify]"],"labels":["@aws-cdk/aws-amplify"],"assignees":["MrArnoldPalmer"]}, - {"keywords":["[@aws-cdk/aws-apigateway]","[aws-apigateway]","[apigateway]","[api gateway]","[api-gateway]"],"labels":["@aws-cdk/aws-apigateway"],"assignees":["nija-at"]}, - {"keywords":["[@aws-cdk/aws-apigatewayv2]","[aws-apigatewayv2]","[apigatewayv2]","[apigateway v2]","[api-gateway-v2]"],"labels":["@aws-cdk/aws-apigatewayv2"],"assignees":["nija-at"]}, - {"keywords":["[@aws-cdk/aws-apigatewayv2-integrations]","[aws-apigatewayv2-integrations]","[apigatewayv2-integrations]","[apigateway v2 integrations]","[api-gateway-v2-integrations]"],"labels":["@aws-cdk/aws-apigatewayv2-integrations"],"assignees":["nija-at"]}, - {"keywords":["[@aws-cdk/aws-appconfig]","[aws-appconfig]","[appconfig]","[app config]","[app-config]"],"labels":["@aws-cdk/aws-appconfig"],"assignees":["MrArnoldPalmer"]}, - {"keywords":["[@aws-cdk/aws-appflow]","[aws-appflow]","[appflow]","[app flow]","[app-flow]"],"labels":["@aws-cdk/aws-appflow"],"assignees":["skinny85"]}, - {"keywords":["[@aws-cdk/aws-applicationautoscaling]","[aws-applicationautoscaling]","[applicationautoscaling]","[application autoscaling]","[application-autoscaling]"],"labels":["@aws-cdk/aws-applicationautoscaling"],"assignees":["NetaNir"]}, - {"keywords":["[@aws-cdk/aws-applicationinsights]","[aws-applicationinsights]","[applicationinsights]","[application insights]","[application-insights]"],"labels":["@aws-cdk/aws-applicationinsights"],"assignees":["njlynch"]}, - {"keywords":["[@aws-cdk/aws-appmesh]","[aws-appmesh]","[appmesh]","[app mesh]","[app-mesh]"],"labels":["@aws-cdk/aws-appmesh"],"assignees":["skinny85"]}, - {"keywords":["[@aws-cdk/aws-appstream]","[aws-appstream]","[appstream]","[app stream]","[app-stream]"],"labels":["@aws-cdk/aws-appstream"],"assignees":["NetaNir"]}, - {"keywords":["[@aws-cdk/aws-appsync]","[aws-appsync]","[appsync]","[app sync]","[app-sync]"],"labels":["@aws-cdk/aws-appsync"],"assignees":["MrArnoldPalmer"]}, - {"keywords":["[@aws-cdk/aws-athena]","[aws-athena]","[athena]"],"labels":["@aws-cdk/aws-athena"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-autoscaling]","[aws-autoscaling]","[autoscaling]","[auto scaling]","[auto-scaling]"],"labels":["@aws-cdk/aws-autoscaling"],"assignees":["NetaNir"]}, - {"keywords":["[@aws-cdk/aws-autoscaling-api]","[aws-autoscaling-api]","[autoscaling-api]","[autoscaling api]","[autoscaling-api]"],"labels":["@aws-cdk/aws-autoscaling-api"],"assignees":["NetaNir"]}, - {"keywords":["[@aws-cdk/aws-autoscaling-common]","[aws-autoscaling-common]","[autoscaling-common]","[autoscaling common]","[autoscaling-common]"],"labels":["@aws-cdk/aws-autoscaling-common"],"assignees":["NetaNir"]}, - {"keywords":["[@aws-cdk/aws-autoscaling-hooktargets]","[aws-autoscaling-hooktargets]","[autoscaling-hooktargets]","[autoscaling hooktargets]"],"labels":["@aws-cdk/aws-autoscaling-hooktargets"],"assignees":["NetaNir"]}, - {"keywords":["[@aws-cdk/aws-autoscalingplans]","[aws-autoscalingplans]","[autoscalingplans]","[autoscaling plans]", "[autoscaling-plans]"],"labels":["@aws-cdk/aws-autoscalingplans"],"assignees":["NetaNir"]}, - {"keywords":["[@aws-cdk/aws-backup]","[aws-backup]","[backup]"],"labels":["@aws-cdk/aws-backup"],"assignees":["MrArnoldPalmer"]}, - {"keywords":["[@aws-cdk/aws-batch]","[aws-batch]","[batch]"],"labels":["@aws-cdk/aws-batch"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-budgets]","[aws-budgets]","[budgets]"],"labels":["@aws-cdk/aws-budgets"],"assignees":["MrArnoldPalmer"]}, - {"keywords":["[@aws-cdk/aws-cassandra]","[aws-cassandra]","[cassandra]"],"labels":["@aws-cdk/aws-cassandra"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-ce]","[aws-ce]","[ce]"],"labels":["@aws-cdk/aws-ce"],"assignees":["MrArnoldPalmer"]}, - {"keywords":["[@aws-cdk/aws-certificatemanager]","[aws-certificatemanager]","[certificatemanager]","[certificate manager]","[certificate-manager]","[acm]"],"labels":["@aws-cdk/aws-certificatemanager"],"assignees":["njlynch"]}, - {"keywords":["[@aws-cdk/aws-chatbot]","[aws-chatbot]","[chatbot]"],"labels":["@aws-cdk/aws-chatbot"],"assignees":["MrArnoldPalmer"]}, - {"keywords":["[@aws-cdk/aws-cloud9]","[aws-cloud9]","[cloud9]","[cloud 9]"],"labels":["@aws-cdk/aws-cloud9"],"assignees":["skinny85"]}, - {"keywords":["[@aws-cdk/aws-cloudformation]","[aws-cloudformation]","[cloudformation]","[cloud formation]"],"labels":["@aws-cdk/aws-cloudformation"],"assignees":["rix0rrr"]}, - {"keywords":["[@aws-cdk/aws-cloudfront]","[aws-cloudfront]","[cloudfront]","[cloud front]"],"labels":["@aws-cdk/aws-cloudfront"],"assignees":["njlynch"]}, - {"keywords":["[@aws-cdk/aws-cloudfront-origins]","[aws-cloudfront-origins]","[cloudfront-origins]","[cloudfront origins]"],"labels":["@aws-cdk/aws-cloudfront-origins"],"assignees":["njlynch"]}, - {"keywords":["[@aws-cdk/aws-cloudtrail]","[aws-cloudtrail]","[cloudtrail]","[cloud trail]"],"labels":["@aws-cdk/aws-cloudtrail"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-cloudwatch]","[aws-cloudwatch]","[cloudwatch]","[cloud watch]"],"labels":["@aws-cdk/aws-cloudwatch"],"assignees":["rix0rrr"]}, - {"keywords":["[@aws-cdk/aws-cloudwatch-actions]","[aws-cloudwatch-actions]","[cloudwatch-actions]","[cloudwatch actions]"],"labels":["@aws-cdk/aws-cloudwatch-actions"],"assignees":["rix0rrr"]}, - {"keywords":["[@aws-cdk/aws-codeartifact]","[aws-codeartifact]","[codeartifact]","[code artifact]","[code-artifact]"],"labels":["@aws-cdk/aws-codeartifact"],"assignees":["njlynch"]}, - {"keywords":["[@aws-cdk/aws-codebuild]","[aws-codebuild]","[codebuild]","[code build]","[code-build]"],"labels":["@aws-cdk/aws-codebuild"],"assignees":["skinny85"]}, - {"keywords":["[@aws-cdk/aws-codecommit]","[aws-codecommit]","[codecommit]","[code commit]", "[code-commit]"],"labels":["@aws-cdk/aws-codecommit"],"assignees":["skinny85"]}, - {"keywords":["[@aws-cdk/aws-codedeploy]","[aws-codedeploy]","[codedeploy]","[code deploy]","[code-deploy]"],"labels":["@aws-cdk/aws-codedeploy"],"assignees":["skinny85"]}, - {"keywords":["[@aws-cdk/aws-codeguruprofiler]","[aws-codeguruprofiler]","[codeguruprofiler]","[codeguru profiler]","[codeguru-profiler]"],"labels":["@aws-cdk/aws-codeguruprofiler"],"assignees":["skinny85"]}, - {"keywords":["[@aws-cdk/aws-codegurureviewer]","[aws-codegurureviewer]","[codegurureviewer]","[codeguru reviewer]","[codeguru-reviewer]"],"labels":["@aws-cdk/aws-codegurureviewer"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-codepipeline]","[aws-codepipeline]","[codepipeline]","[code pipeline]","[code-pipeline]"],"labels":["@aws-cdk/aws-codepipeline"],"assignees":["skinny85"]}, - {"keywords":["[@aws-cdk/aws-codepipeline-actions]","[aws-codepipeline-actions]","[codepipeline-actions]","[codepipeline actions]"],"labels":["@aws-cdk/aws-codepipeline-actions"],"assignees":["skinny85"]}, - {"keywords":["[@aws-cdk/aws-codestar]","[aws-codestar]","[codestar]"],"labels":["@aws-cdk/aws-codestar"],"assignees":["skinny85"]}, - {"keywords":["[@aws-cdk/aws-codestarconnections]","[aws-codestarconnections]","[codestarconnections]","[codestar connections]","[codestar-connections]"],"labels":["@aws-cdk/aws-codestarconnections"],"assignees":["skinny85"]}, - {"keywords":["[@aws-cdk/aws-codestarnotifications]","[aws-codestarnotifications]","[codestarnotifications]","[codestar notifications]","[codestar-notifications]"],"labels":["@aws-cdk/aws-codestarnotifications"],"assignees":["skinny85"]}, - {"keywords":["[@aws-cdk/aws-cognito]","[aws-cognito]","[cognito]"],"labels":["@aws-cdk/aws-cognito"],"assignees":["nija-at"]}, - {"keywords":["[@aws-cdk/aws-config]","[aws-config]","[config]"],"labels":["@aws-cdk/aws-config"],"assignees":["MrArnoldPalmer"]}, - {"keywords":["[@aws-cdk/aws-datapipeline]","[aws-datapipeline]","[datapipeline]","[data pipeline]","[data-pipeline]"],"labels":["@aws-cdk/aws-datapipeline"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-dax]","[aws-dax]","[dax]"],"labels":["@aws-cdk/aws-dax"],"assignees":["skinny85"]}, - {"keywords":["[@aws-cdk/aws-detective]","[aws-detective]","[detective]"],"labels":["@aws-cdk/aws-detective"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-directoryservice]","[aws-directoryservice]","[directoryservice]","[directory service]","[directory-service]"],"labels":["@aws-cdk/aws-directoryservice"],"assignees":["NetaNir"]}, - {"keywords":["[@aws-cdk/aws-dlm]","[aws-dlm]","[dlm]"],"labels":["@aws-cdk/aws-dlm"],"assignees":["njlynch"]}, - {"keywords":["[@aws-cdk/aws-dms]","[aws-dms]","[dms]"],"labels":["@aws-cdk/aws-dms"],"assignees":["njlynch"]}, - {"keywords":["[@aws-cdk/aws-docdb]","[aws-docdb]","[docdb]","[doc db]","[doc-db]"],"labels":["@aws-cdk/aws-docdb"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-dynamodb]","[aws-dynamodb]","[dynamodb]","[dynamo db]","[dynamo-db]"],"labels":["@aws-cdk/aws-dynamodb"],"assignees":["skinny85"]}, - {"keywords":["[@aws-cdk/aws-dynamodb-global]","[aws-dynamodb-global]","[dynamodb-global]","[dynamodb global]"],"labels":["@aws-cdk/aws-dynamodb-global"],"assignees":["skinny85"]}, - {"keywords":["[@aws-cdk/aws-ec2]","[aws-ec2]","[ec2]","[vpc]"],"labels":["@aws-cdk/aws-ec2"],"assignees":["rix0rrr"]}, - {"keywords":["[@aws-cdk/aws-ecr]","[aws-ecr]","[ecr]"],"labels":["@aws-cdk/aws-ecr"],"assignees":["MrArnoldPalmer"]}, - {"keywords":["[@aws-cdk/aws-ecr-assets]","[aws-ecr-assets]","[ecr-assets]","[ecr assets]","[ecrassets]"],"labels":["@aws-cdk/aws-ecr-assets"],"assignees":["eladb"]}, - {"keywords":["[@aws-cdk/aws-efs]","[aws-efs]","[efs]"],"labels":["@aws-cdk/aws-efs"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-eks]","[aws-eks]","[eks]"],"labels":["@aws-cdk/aws-eks"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-elasticache]","[aws-elasticache]","[elasticache]","[elastic cache]","[elastic-cache]"],"labels":["@aws-cdk/aws-elasticache"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-elasticbeanstalk]","[aws-elasticbeanstalk]","[elasticbeanstalk]","[elastic beanstalk]","[elastic-beanstalk]"],"labels":["@aws-cdk/aws-elasticbeanstalk"],"assignees":["skinny85"]}, - {"keywords":["[@aws-cdk/aws-elasticloadbalancing]","[aws-elasticloadbalancing]","[elasticloadbalancing]","[elastic loadbalancing]","[elastic-loadbalancing]","[elb]"],"labels":["@aws-cdk/aws-elasticloadbalancing"],"assignees":["njlynch"]}, - {"keywords":["[@aws-cdk/aws-elasticloadbalancingv2]","[aws-elasticloadbalancingv2]","[elasticloadbalancingv2]","[elastic-loadbalancing-v2]","[elbv2]","[elb v2]"],"labels":["@aws-cdk/aws-elasticloadbalancingv2"],"assignees":["njlynch"]}, - {"keywords":["[@aws-cdk/aws-elasticloadbalancingv2-targets]","[aws-elasticloadbalancingv2-targets]","[elasticloadbalancingv2-targets]","[elasticloadbalancingv2 targets]","[elbv2 targets]"],"labels":["@aws-cdk/aws-elasticloadbalancingv2-targets"],"assignees":["njlynch"]}, - {"keywords":["[@aws-cdk/aws-elasticsearch]","[aws-elasticsearch]","[elasticsearch]","[elastic search]","[elastic-search]"],"labels":["@aws-cdk/aws-elasticsearch"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-emr]","[aws-emr]","[emr]"],"labels":["@aws-cdk/aws-emr"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-events]","[aws-events]","[events]","[eventbridge]","event-bridge]"],"labels":["@aws-cdk/aws-events"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-events-targets]","[aws-events-targets]","[events-targets]","[events targets]"],"labels":["@aws-cdk/aws-events-targets"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-eventschemas]","[aws-eventschemas]","[eventschemas]","[event schemas]"],"labels":["@aws-cdk/aws-eventschemas"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-fms]","[aws-fms]","[fms]"],"labels":["@aws-cdk/aws-fms"],"assignees":["rix0rrr"]}, - {"keywords":["[@aws-cdk/aws-fsx]","[aws-fsx]","[fsx]"],"labels":["@aws-cdk/aws-fsx"],"assignees":["rix0rrr"]}, - {"keywords":["[@aws-cdk/aws-gamelift]","[aws-gamelift]","[gamelift]","[game lift]"],"labels":["@aws-cdk/aws-gamelift"],"assignees":["MrArnoldPalmer"]}, - {"keywords":["[@aws-cdk/aws-globalaccelerator]","[aws-globalaccelerator]","[globalaccelerator]","[global accelerator]","[global-accelerator]"],"labels":["@aws-cdk/aws-globalaccelerator"],"assignees":["rix0rrr"]}, - {"keywords":["[@aws-cdk/aws-glue]","[aws-glue]","[glue]"],"labels":["@aws-cdk/aws-glue"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-greengrass]","[aws-greengrass]","[greengrass]","[green grass]","[green-grass]"],"labels":["@aws-cdk/aws-greengrass"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-guardduty]","[aws-guardduty]","[guardduty]","[guard duty]","[guard-duty]"],"labels":["@aws-cdk/aws-guardduty"],"assignees":["rix0rrr"]}, - {"keywords":["[@aws-cdk/aws-iam]","[aws-iam]","[iam]"],"labels":["@aws-cdk/aws-iam"],"assignees":["rix0rrr"]}, - {"keywords":["[@aws-cdk/aws-imagebuilder]","[aws-imagebuilder]","[imagebuilder]","[image builder]","[image-builder]"],"labels":["@aws-cdk/aws-imagebuilder"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-inspector]","[aws-inspector]","[inspector]"],"labels":["@aws-cdk/aws-inspector"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-iot]","[aws-iot]","[iot]"],"labels":["@aws-cdk/aws-iot"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-iot1click]","[aws-iot1click]","[iot1click]","[iot 1click]"],"labels":["@aws-cdk/aws-iot1click"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-iotanalytics]","[aws-iotanalytics]","[iotanalytics]","[iot analytics]","[iot-analytics]"],"labels":["@aws-cdk/aws-iotanalytics"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-iotevents]","[aws-iotevents]","[iotevents]","[iot events]","[iot-events]"],"labels":["@aws-cdk/aws-iotevents"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-iotsitewise]","[aws-iotsitewise]","[iotsitewise]","[iot sitewise]","[iot-sitewise]","[iot-site-wise]","[iot site wise]"],"labels":["@aws-cdk/aws-iotsitewise"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-iotthingsgraph]","[aws-iotthingsgraph]","[iotthingsgraph]","[iot things graph]","[iot-things-graph]"],"labels":["@aws-cdk/aws-iotthingsgraph"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-ivs]","[aws-ivs]","[Interactive Video Service]","[ivs]"],"labels":["@aws-cdk/aws-ivs"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-kendra]","[aws-kendra]","[kendra]"],"labels":["@aws-cdk/aws-kendra"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-kinesis]","[aws-kinesis]","[kinesis]"],"labels":["@aws-cdk/aws-kinesis"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-kinesisanalytics]","[aws-kinesisanalytics]","[kinesisanalytics]","[kinesis analytics]","[kinesis-analytics]"],"labels":["@aws-cdk/aws-kinesisanalytics"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-kinesisfirehose]","[aws-kinesisfirehose]","[kinesisfirehose]","[kinesis firehose]","[kinesis-firehose]"],"labels":["@aws-cdk/aws-kinesisfirehose"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-kms]","[aws-kms]","[kms]"],"labels":["@aws-cdk/aws-kms"],"assignees":["njlynch"]}, - {"keywords":["[@aws-cdk/aws-lakeformation]","[aws-lakeformation]","[lakeformation]","[lake formation]","[lake-formation]"],"labels":["@aws-cdk/aws-lakeformation"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-lambda]","[aws-lambda]","[lambda]"],"labels":["@aws-cdk/aws-lambda"],"assignees":["nija-at"]}, - {"keywords":["[@aws-cdk/aws-lambda-event-sources]","[aws-lambda-event-sources]","[lambda-event-sources]","[lambda event sources]"],"labels":["@aws-cdk/aws-lambda-event-sources"],"assignees":["nija-at"]}, - {"keywords":["[@aws-cdk/aws-lambda-nodejs]","[aws-lambda-nodejs]","[lambda-nodejs]","[lambda nodejs]"],"labels":["@aws-cdk/aws-lambda-nodejs"],"assignees":["eladb"]}, - {"keywords":["[@aws-cdk/aws-lambda-python]","[aws-lambda-python]","[lambda-python]","[lambda python]"],"labels":["@aws-cdk/aws-lambda-python"],"assignees":["eladb"]}, - {"keywords":["[@aws-cdk/aws-logs]","[aws-logs]","[logs]"],"labels":["@aws-cdk/aws-logs"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-logs-destinations]","[aws-logs-destinations]","[logs-destinations]","[logs destinations]"],"labels":["@aws-cdk/aws-logs-destinations"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-macie]","[aws-macie]","[macie]"],"labels":["@aws-cdk/aws-macie"],"assignees":["njlynch"]}, - {"keywords":["[@aws-cdk/aws-managedblockchain]","[aws-managedblockchain]","[managedblockchain]","[managed blockchain]","[managed-blockchain]"],"labels":["@aws-cdk/aws-managedblockchain"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-mediaconvert]","[aws-mediaconvert]","[mediaconvert]","[media convert]","[media-convert]"],"labels":["@aws-cdk/aws-mediaconvert"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-medialive]","[aws-medialive]","[medialive]","[media live]","[media-live]"],"labels":["@aws-cdk/aws-medialive"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-mediastore]","[aws-mediastore]","[mediastore]","[media store]","[media-store]"],"labels":["@aws-cdk/aws-mediastore"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-mediapackage]","[aws-mediapackage]","[mediapackage]","[media package]","[media-package]"],"labels":["@aws-cdk/aws-mediapackage"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-msk]","[aws-msk]","[msk]"],"labels":["@aws-cdk/aws-msk"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-neptune]","[aws-neptune]","[neptune]"],"labels":["@aws-cdk/aws-neptune"],"assignees":["njlynch"]}, - {"keywords":["[@aws-cdk/aws-networkmanager]","[aws-networkmanager]","[networkmanager]","[network manager]","[network-manager]"],"labels":["@aws-cdk/aws-networkmanager"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-opsworks]","[aws-opsworks]","[opsworks]","[ops works]","[ops-works]"],"labels":["@aws-cdk/aws-opsworks"],"assignees":["MrArnoldPalmer"]}, - {"keywords":["[@aws-cdk/aws-opsworkscm]","[aws-opsworkscm]","[opsworkscm]","[opsworks cm]","[opsworks-cm]"],"labels":["@aws-cdk/aws-opsworkscm"],"assignees":["MrArnoldPalmer"]}, - {"keywords":["[@aws-cdk/aws-personalize]","[aws-personalize]","[personalize]"],"labels":["@aws-cdk/aws-personalize"],"assignees":["njlynch"]}, - {"keywords":["[@aws-cdk/aws-pinpoint]","[aws-pinpoint]","[pinpoint]"],"labels":["@aws-cdk/aws-pinpoint"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-pinpointemail]","[aws-pinpointemail]","[pinpointemail]","[pinpoint email]","[pinpoint-email]"],"labels":["@aws-cdk/aws-pinpointemail"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-qldb]","[aws-qldb]","[qldb]"],"labels":["@aws-cdk/aws-qldb"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-ram]","[aws-ram]","[ram]"],"labels":["@aws-cdk/aws-ram"],"assignees":["MrArnoldPalmer"]}, - {"keywords":["[@aws-cdk/aws-rds]","[aws-rds]","[rds]"],"labels":["@aws-cdk/aws-rds"],"assignees":["skinny85"]}, - {"keywords":["[@aws-cdk/aws-redshift]","[aws-redshift]","[redshift]","[red shift]","[red-shift]"],"labels":["@aws-cdk/aws-redshift"],"assignees":["njlynch"]}, - {"keywords":["[@aws-cdk/aws-resourcegroups]","[aws-resourcegroups]","[resourcegroups]","[resource groups]","[resource-groups]"],"labels":["@aws-cdk/aws-resourcegroups"],"assignees":["MrArnoldPalmer"]}, - {"keywords":["[@aws-cdk/aws-robomaker]","[aws-robomaker]","[robomaker]","[robo maker]","[robo-maker]"],"labels":["@aws-cdk/aws-robomaker"],"assignees":["njlynch"]}, - {"keywords":["[@aws-cdk/aws-route53]","[aws-route53]","[route53]","[route 53]","[route-53]"],"labels":["@aws-cdk/aws-route53"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-route53-patterns]","[aws-route53-patterns]","[route53-patterns]","[route53 patterns]","[route-53-patterns]"],"labels":["@aws-cdk/aws-route53-patterns"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-route53-targets]","[aws-route53-targets]","[route53-targets]","[route53 targets]","[route-53-targets]"],"labels":["@aws-cdk/aws-route53-targets"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-route53resolver]","[aws-route53resolver]","[route53resolver]","[route53 resolver]","[route-53-resolver]"],"labels":["@aws-cdk/aws-route53resolver"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-s3]","[aws-s3]","[s3]"],"labels":["@aws-cdk/aws-s3"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-s3-assets]","[aws-s3-assets]","[s3-assets]","[s3 assets]"],"labels":["@aws-cdk/aws-s3-assets"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-s3-deployment]","[aws-s3-deployment]","[s3-deployment]","[s3 deployment]"],"labels":["@aws-cdk/aws-s3-deployment"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-s3-notifications]","[aws-s3-notifications]","[s3-notifications]","[s3 notifications]"],"labels":["@aws-cdk/aws-s3-notifications"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-sagemaker]","[aws-sagemaker]","[sagemaker]","[sage maker]","[sage-maker]"],"labels":["@aws-cdk/aws-sagemaker"],"assignees":["njlynch"]}, - {"keywords":["[@aws-cdk/aws-sam]","[aws-sam]","[sam]"],"labels":["@aws-cdk/aws-sam"],"assignees":["njlynch"]}, - {"keywords":["[@aws-cdk/aws-sdb]","[aws-sdb]","[sdb]"],"labels":["@aws-cdk/aws-sdb"],"assignees":["njlynch"]}, - {"keywords":["[@aws-cdk/aws-secretsmanager]","[aws-secretsmanager]","[secretsmanager]","[secrets manager]","[secrets-manager]"],"labels":["@aws-cdk/aws-secretsmanager"],"assignees":["njlynch"]}, - {"keywords":["[@aws-cdk/aws-securityhub]","[aws-securityhub]","[securityhub]","[security hub]","[security-hub]"],"labels":["@aws-cdk/aws-securityhub"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-servicecatalog]","[aws-servicecatalog]","[servicecatalog]","[service catalog]","[service-catalog]"],"labels":["@aws-cdk/aws-servicecatalog"],"assignees":["MrArnoldPalmer"]}, - {"keywords":["[@aws-cdk/aws-servicediscovery]","[aws-servicediscovery]","[servicediscovery]","[service discovery]","[service-discovery]"],"labels":["@aws-cdk/aws-servicediscovery"],"assignees":["MrArnoldPalmer"]}, - {"keywords":["[@aws-cdk/aws-ses]","[aws-ses]","[ses]"],"labels":["@aws-cdk/aws-ses"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-ses-actions]","[aws-ses-actions]","[ses-actions]","[ses actions]"],"labels":["@aws-cdk/aws-ses-actions"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-sns]","[aws-sns]","[sns]"],"labels":["@aws-cdk/aws-sns"],"assignees":["MrArnoldPalmer"]}, - {"keywords":["[@aws-cdk/aws-sns-subscriptions]","[aws-sns-subscriptions]","[sns-subscriptions]","[sns subscriptions]"],"labels":["@aws-cdk/aws-sns-subscriptions"],"assignees":["MrArnoldPalmer"]}, - {"keywords":["[@aws-cdk/aws-sqs]","[aws-sqs]","[sqs]"],"labels":["@aws-cdk/aws-sqs"],"assignees":["MrArnoldPalmer"]}, - {"keywords":["[@aws-cdk/aws-ssm]","[aws-ssm]","[ssm]"],"labels":["@aws-cdk/aws-ssm"],"assignees":["MrArnoldPalmer"]}, - {"keywords":["[@aws-cdk/aws-sso]","[aws-sso]","[sso]"],"labels":["@aws-cdk/aws-sso"],"assignees":["skinny85"]}, - {"keywords":["[@aws-cdk/aws-stepfunctions]","[aws-stepfunctions]","[stepfunctions]","[step functions]","[step-functions]"],"labels":["@aws-cdk/aws-stepfunctions"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-stepfunctions-tasks]","[aws-stepfunctions-tasks]","[stepfunctions-tasks]","[stepfunctions tasks]"],"labels":["@aws-cdk/aws-stepfunctions-tasks"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-synthetics]","[aws-synthetics]","[synthetics]"],"labels":["@aws-cdk/aws-synthetics"],"assignees":["NetaNir"]}, - {"keywords":["[@aws-cdk/aws-timestream]","[aws-timestream]","[timestream]"],"labels":["@aws-cdk/aws-timestream"],"assignees":["skinny85"]}, - {"keywords":["[@aws-cdk/aws-transfer]","[aws-transfer]","[transfer]"],"labels":["@aws-cdk/aws-transfer"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-waf]","[aws-waf]","[waf]"],"labels":["@aws-cdk/aws-waf"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-wafregional]","[aws-wafregional]","[wafregional]","[waf regional]","[waf-regional]"],"labels":["@aws-cdk/aws-wafregional"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-wafv2]","[aws-wafv2]","[wafv2]","[waf v2]","[waf-v2]"],"labels":["@aws-cdk/aws-wafv2"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-workspaces]","[aws-workspaces]","[workspaces]"],"labels":["@aws-cdk/aws-workspaces"],"assignees":["NetaNir"]}, - {"keywords":["[@aws-cdk/cfnspec]","[cfnspec]","[cfn spec]","[cfn-spec]"],"labels":["@aws-cdk/cfnspec"],"assignees":["rix0rrr"]}, - {"keywords":["[@aws-cdk/cloud-assembly-schema]","[cloud-assembly-schema]","[cloud assembly schema]"],"labels":["@aws-cdk/cloud-assembly-schema"],"assignees":["rix0rrr"]}, - {"keywords":["[@aws-cdk/cloudformation-diff]","[cloudformation-diff]","[cloudformation diff]","[cfn diff]"],"labels":["@aws-cdk/cloudformation-diff"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/cloudformation-include]","[cloudformation-include]","[cloudformation include]","[cfn include]","[cfn-include]"],"labels":["@aws-cdk/cloudformation-include"],"assignees":["skinny85"]}, - {"keywords":["[@aws-cdk/core]","[core]"],"labels":["@aws-cdk/core"],"assignees":["rix0rrr"]}, - {"keywords":["[@aws-cdk/custom-resources]","[custom-resources]","[custom resources]"],"labels":["@aws-cdk/custom-resources"],"assignees":["rix0rrr"]}, - {"keywords":["[@aws-cdk/cx-api]","[cx-api]","[cx api]"],"labels":["@aws-cdk/cx-api"],"assignees":["rix0rrr"]}, - {"keywords":["[@aws-cdk/pipelines]","[pipelines]","[cdk pipelines]","[cdk-pipelines]"],"labels":["@aws-cdk/pipelines"],"assignees":["rix0rrr"]}, - {"keywords":["[@aws-cdk/region-info]","[region-info]","[region info]"],"labels":["@aws-cdk/region-info"],"assignees":["RomainMuller"]} + {"keywords":["(cli)","(command line)"],"labels":["package/tools"],"assignees":["rix0rrr"]}, + {"keywords":["(@aws-cdk/alexa-ask)","(alexa-ask)","(alexa ask)"],"labels":["@aws-cdk/alexa-ask"],"assignees":["MrArnoldPalmer"]}, + {"keywords":["(@aws-cdk/app-delivery)","(app-delivery)","(app delivery)"],"labels":["@aws-cdk/app-delivery"],"assignees":["skinny85"]}, + {"keywords":["(@aws-cdk/assert)","(assert)"],"labels":["@aws-cdk/assert"],"assignees":["nija-at"]}, + {"keywords":["(@aws-cdk/assets)","(assets)"],"labels":["@aws-cdk/assets"],"assignees":["eladb"]}, + {"keywords":["(@aws-cdk/aws-accessanalyzer)","(aws-accessanalyzer)","(accessanalyzer)","(access analyzer)"],"labels":["@aws-cdk/aws-accessanalyzer"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-acmpca)","(aws-acmpca)","(acmpca)"],"labels":["@aws-cdk/aws-acmpca"],"assignees":["skinny85"]}, + {"keywords":["(@aws-cdk/aws-amazonmq)","(aws-amazonmq)","(amazonmq)","(amazon mq)","(amazon-mq)"],"labels":["@aws-cdk/aws-amazonmq"],"assignees":["MrArnoldPalmer"]}, + {"keywords":["(@aws-cdk/aws-amplify)","(aws-amplify)","(amplify)"],"labels":["@aws-cdk/aws-amplify"],"assignees":["MrArnoldPalmer"]}, + {"keywords":["(@aws-cdk/aws-apigateway)","(aws-apigateway)","(apigateway)","(api gateway)","(api-gateway)"],"labels":["@aws-cdk/aws-apigateway"],"assignees":["nija-at"]}, + {"keywords":["(@aws-cdk/aws-apigatewayv2)","(aws-apigatewayv2)","(apigatewayv2)","(apigateway v2)","(api-gateway-v2)"],"labels":["@aws-cdk/aws-apigatewayv2"],"assignees":["nija-at"]}, + {"keywords":["(@aws-cdk/aws-apigatewayv2-integrations)","(aws-apigatewayv2-integrations)","(apigatewayv2-integrations)","(apigateway v2 integrations)","(api-gateway-v2-integrations)"],"labels":["@aws-cdk/aws-apigatewayv2-integrations"],"assignees":["nija-at"]}, + {"keywords":["(@aws-cdk/aws-appconfig)","(aws-appconfig)","(appconfig)","(app config)","(app-config)"],"labels":["@aws-cdk/aws-appconfig"],"assignees":["MrArnoldPalmer"]}, + {"keywords":["(@aws-cdk/aws-appflow)","(aws-appflow)","(appflow)","(app flow)","(app-flow)"],"labels":["@aws-cdk/aws-appflow"],"assignees":["skinny85"]}, + {"keywords":["(@aws-cdk/aws-applicationautoscaling)","(aws-applicationautoscaling)","(applicationautoscaling)","(application autoscaling)","(application-autoscaling)"],"labels":["@aws-cdk/aws-applicationautoscaling"],"assignees":["NetaNir"]}, + {"keywords":["(@aws-cdk/aws-applicationinsights)","(aws-applicationinsights)","(applicationinsights)","(application insights)","(application-insights)"],"labels":["@aws-cdk/aws-applicationinsights"],"assignees":["njlynch"]}, + {"keywords":["(@aws-cdk/aws-appmesh)","(aws-appmesh)","(appmesh)","(app mesh)","(app-mesh)"],"labels":["@aws-cdk/aws-appmesh"],"assignees":["skinny85"]}, + {"keywords":["(@aws-cdk/aws-appstream)","(aws-appstream)","(appstream)","(app stream)","(app-stream)"],"labels":["@aws-cdk/aws-appstream"],"assignees":["NetaNir"]}, + {"keywords":["(@aws-cdk/aws-appsync)","(aws-appsync)","(appsync)","(app sync)","(app-sync)"],"labels":["@aws-cdk/aws-appsync"],"assignees":["MrArnoldPalmer"]}, + {"keywords":["(@aws-cdk/aws-athena)","(aws-athena)","(athena)"],"labels":["@aws-cdk/aws-athena"],"assignees":["iliapolo"]}, + {"keywords":["(@aws-cdk/aws-autoscaling)","(aws-autoscaling)","(autoscaling)","(auto scaling)","(auto-scaling)"],"labels":["@aws-cdk/aws-autoscaling"],"assignees":["NetaNir"]}, + {"keywords":["(@aws-cdk/aws-autoscaling-api)","(aws-autoscaling-api)","(autoscaling-api)","(autoscaling api)","(autoscaling-api)"],"labels":["@aws-cdk/aws-autoscaling-api"],"assignees":["NetaNir"]}, + {"keywords":["(@aws-cdk/aws-autoscaling-common)","(aws-autoscaling-common)","(autoscaling-common)","(autoscaling common)","(autoscaling-common)"],"labels":["@aws-cdk/aws-autoscaling-common"],"assignees":["NetaNir"]}, + {"keywords":["(@aws-cdk/aws-autoscaling-hooktargets)","(aws-autoscaling-hooktargets)","(autoscaling-hooktargets)","(autoscaling hooktargets)"],"labels":["@aws-cdk/aws-autoscaling-hooktargets"],"assignees":["NetaNir"]}, + {"keywords":["(@aws-cdk/aws-autoscalingplans)","(aws-autoscalingplans)","(autoscalingplans)","(autoscaling plans)", "(autoscaling-plans)"],"labels":["@aws-cdk/aws-autoscalingplans"],"assignees":["NetaNir"]}, + {"keywords":["(@aws-cdk/aws-backup)","(aws-backup)","(backup)"],"labels":["@aws-cdk/aws-backup"],"assignees":["MrArnoldPalmer"]}, + {"keywords":["(@aws-cdk/aws-batch)","(aws-batch)","(batch)"],"labels":["@aws-cdk/aws-batch"],"assignees":["iliapolo"]}, + {"keywords":["(@aws-cdk/aws-budgets)","(aws-budgets)","(budgets)"],"labels":["@aws-cdk/aws-budgets"],"assignees":["MrArnoldPalmer"]}, + {"keywords":["(@aws-cdk/aws-cassandra)","(aws-cassandra)","(cassandra)"],"labels":["@aws-cdk/aws-cassandra"],"assignees":["iliapolo"]}, + {"keywords":["(@aws-cdk/aws-ce)","(aws-ce)","(ce)"],"labels":["@aws-cdk/aws-ce"],"assignees":["MrArnoldPalmer"]}, + {"keywords":["(@aws-cdk/aws-certificatemanager)","(aws-certificatemanager)","(certificatemanager)","(certificate manager)","(certificate-manager)","(acm)"],"labels":["@aws-cdk/aws-certificatemanager"],"assignees":["njlynch"]}, + {"keywords":["(@aws-cdk/aws-chatbot)","(aws-chatbot)","(chatbot)"],"labels":["@aws-cdk/aws-chatbot"],"assignees":["MrArnoldPalmer"]}, + {"keywords":["(@aws-cdk/aws-cloud9)","(aws-cloud9)","(cloud9)","(cloud 9)"],"labels":["@aws-cdk/aws-cloud9"],"assignees":["skinny85"]}, + {"keywords":["(@aws-cdk/aws-cloudformation)","(aws-cloudformation)","(cloudformation)","(cloud formation)"],"labels":["@aws-cdk/aws-cloudformation"],"assignees":["rix0rrr"]}, + {"keywords":["(@aws-cdk/aws-cloudfront)","(aws-cloudfront)","(cloudfront)","(cloud front)"],"labels":["@aws-cdk/aws-cloudfront"],"assignees":["njlynch"]}, + {"keywords":["(@aws-cdk/aws-cloudfront-origins)","(aws-cloudfront-origins)","(cloudfront-origins)","(cloudfront origins)"],"labels":["@aws-cdk/aws-cloudfront-origins"],"assignees":["njlynch"]}, + {"keywords":["(@aws-cdk/aws-cloudtrail)","(aws-cloudtrail)","(cloudtrail)","(cloud trail)"],"labels":["@aws-cdk/aws-cloudtrail"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-cloudwatch)","(aws-cloudwatch)","(cloudwatch)","(cloud watch)"],"labels":["@aws-cdk/aws-cloudwatch"],"assignees":["rix0rrr"]}, + {"keywords":["(@aws-cdk/aws-cloudwatch-actions)","(aws-cloudwatch-actions)","(cloudwatch-actions)","(cloudwatch actions)"],"labels":["@aws-cdk/aws-cloudwatch-actions"],"assignees":["rix0rrr"]}, + {"keywords":["(@aws-cdk/aws-codeartifact)","(aws-codeartifact)","(codeartifact)","(code artifact)","(code-artifact)"],"labels":["@aws-cdk/aws-codeartifact"],"assignees":["njlynch"]}, + {"keywords":["(@aws-cdk/aws-codebuild)","(aws-codebuild)","(codebuild)","(code build)","(code-build)"],"labels":["@aws-cdk/aws-codebuild"],"assignees":["skinny85"]}, + {"keywords":["(@aws-cdk/aws-codecommit)","(aws-codecommit)","(codecommit)","(code commit)", "(code-commit)"],"labels":["@aws-cdk/aws-codecommit"],"assignees":["skinny85"]}, + {"keywords":["(@aws-cdk/aws-codedeploy)","(aws-codedeploy)","(codedeploy)","(code deploy)","(code-deploy)"],"labels":["@aws-cdk/aws-codedeploy"],"assignees":["skinny85"]}, + {"keywords":["(@aws-cdk/aws-codeguruprofiler)","(aws-codeguruprofiler)","(codeguruprofiler)","(codeguru profiler)","(codeguru-profiler)"],"labels":["@aws-cdk/aws-codeguruprofiler"],"assignees":["skinny85"]}, + {"keywords":["(@aws-cdk/aws-codegurureviewer)","(aws-codegurureviewer)","(codegurureviewer)","(codeguru reviewer)","(codeguru-reviewer)"],"labels":["@aws-cdk/aws-codegurureviewer"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-codepipeline)","(aws-codepipeline)","(codepipeline)","(code pipeline)","(code-pipeline)"],"labels":["@aws-cdk/aws-codepipeline"],"assignees":["skinny85"]}, + {"keywords":["(@aws-cdk/aws-codepipeline-actions)","(aws-codepipeline-actions)","(codepipeline-actions)","(codepipeline actions)"],"labels":["@aws-cdk/aws-codepipeline-actions"],"assignees":["skinny85"]}, + {"keywords":["(@aws-cdk/aws-codestar)","(aws-codestar)","(codestar)"],"labels":["@aws-cdk/aws-codestar"],"assignees":["skinny85"]}, + {"keywords":["(@aws-cdk/aws-codestarconnections)","(aws-codestarconnections)","(codestarconnections)","(codestar connections)","(codestar-connections)"],"labels":["@aws-cdk/aws-codestarconnections"],"assignees":["skinny85"]}, + {"keywords":["(@aws-cdk/aws-codestarnotifications)","(aws-codestarnotifications)","(codestarnotifications)","(codestar notifications)","(codestar-notifications)"],"labels":["@aws-cdk/aws-codestarnotifications"],"assignees":["skinny85"]}, + {"keywords":["(@aws-cdk/aws-cognito)","(aws-cognito)","(cognito)"],"labels":["@aws-cdk/aws-cognito"],"assignees":["nija-at"]}, + {"keywords":["(@aws-cdk/aws-config)","(aws-config)","(config)"],"labels":["@aws-cdk/aws-config"],"assignees":["MrArnoldPalmer"]}, + {"keywords":["(@aws-cdk/aws-datapipeline)","(aws-datapipeline)","(datapipeline)","(data pipeline)","(data-pipeline)"],"labels":["@aws-cdk/aws-datapipeline"],"assignees":["iliapolo"]}, + {"keywords":["(@aws-cdk/aws-dax)","(aws-dax)","(dax)"],"labels":["@aws-cdk/aws-dax"],"assignees":["skinny85"]}, + {"keywords":["(@aws-cdk/aws-detective)","(aws-detective)","(detective)"],"labels":["@aws-cdk/aws-detective"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-directoryservice)","(aws-directoryservice)","(directoryservice)","(directory service)","(directory-service)"],"labels":["@aws-cdk/aws-directoryservice"],"assignees":["NetaNir"]}, + {"keywords":["(@aws-cdk/aws-dlm)","(aws-dlm)","(dlm)"],"labels":["@aws-cdk/aws-dlm"],"assignees":["njlynch"]}, + {"keywords":["(@aws-cdk/aws-dms)","(aws-dms)","(dms)"],"labels":["@aws-cdk/aws-dms"],"assignees":["njlynch"]}, + {"keywords":["(@aws-cdk/aws-docdb)","(aws-docdb)","(docdb)","(doc db)","(doc-db)"],"labels":["@aws-cdk/aws-docdb"],"assignees":["iliapolo"]}, + {"keywords":["(@aws-cdk/aws-dynamodb)","(aws-dynamodb)","(dynamodb)","(dynamo db)","(dynamo-db)"],"labels":["@aws-cdk/aws-dynamodb"],"assignees":["skinny85"]}, + {"keywords":["(@aws-cdk/aws-dynamodb-global)","(aws-dynamodb-global)","(dynamodb-global)","(dynamodb global)"],"labels":["@aws-cdk/aws-dynamodb-global"],"assignees":["skinny85"]}, + {"keywords":["(@aws-cdk/aws-ec2)","(aws-ec2)","(ec2)","(vpc)"],"labels":["@aws-cdk/aws-ec2"],"assignees":["rix0rrr"]}, + {"keywords":["(@aws-cdk/aws-ecr)","(aws-ecr)","(ecr)"],"labels":["@aws-cdk/aws-ecr"],"assignees":["MrArnoldPalmer"]}, + {"keywords":["(@aws-cdk/aws-ecr-assets)","(aws-ecr-assets)","(ecr-assets)","(ecr assets)","(ecrassets)"],"labels":["@aws-cdk/aws-ecr-assets"],"assignees":["eladb"]}, + {"keywords":["(@aws-cdk/aws-efs)","(aws-efs)","(efs)"],"labels":["@aws-cdk/aws-efs"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-eks)","(aws-eks)","(eks)"],"labels":["@aws-cdk/aws-eks"],"assignees":["iliapolo"]}, + {"keywords":["(@aws-cdk/aws-elasticache)","(aws-elasticache)","(elasticache)","(elastic cache)","(elastic-cache)"],"labels":["@aws-cdk/aws-elasticache"],"assignees":["iliapolo"]}, + {"keywords":["(@aws-cdk/aws-elasticbeanstalk)","(aws-elasticbeanstalk)","(elasticbeanstalk)","(elastic beanstalk)","(elastic-beanstalk)"],"labels":["@aws-cdk/aws-elasticbeanstalk"],"assignees":["skinny85"]}, + {"keywords":["(@aws-cdk/aws-elasticloadbalancing)","(aws-elasticloadbalancing)","(elasticloadbalancing)","(elastic loadbalancing)","(elastic-loadbalancing)","(elb)"],"labels":["@aws-cdk/aws-elasticloadbalancing"],"assignees":["njlynch"]}, + {"keywords":["(@aws-cdk/aws-elasticloadbalancingv2)","(aws-elasticloadbalancingv2)","(elasticloadbalancingv2)","(elastic-loadbalancing-v2)","(elbv2)","(elb v2)"],"labels":["@aws-cdk/aws-elasticloadbalancingv2"],"assignees":["njlynch"]}, + {"keywords":["(@aws-cdk/aws-elasticloadbalancingv2-targets)","(aws-elasticloadbalancingv2-targets)","(elasticloadbalancingv2-targets)","(elasticloadbalancingv2 targets)","(elbv2 targets)"],"labels":["@aws-cdk/aws-elasticloadbalancingv2-targets"],"assignees":["njlynch"]}, + {"keywords":["(@aws-cdk/aws-elasticsearch)","(aws-elasticsearch)","(elasticsearch)","(elastic search)","(elastic-search)"],"labels":["@aws-cdk/aws-elasticsearch"],"assignees":["iliapolo"]}, + {"keywords":["(@aws-cdk/aws-emr)","(aws-emr)","(emr)"],"labels":["@aws-cdk/aws-emr"],"assignees":["iliapolo"]}, + {"keywords":["(@aws-cdk/aws-events)","(aws-events)","(events)","(eventbridge)","event-bridge)"],"labels":["@aws-cdk/aws-events"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-events-targets)","(aws-events-targets)","(events-targets)","(events targets)"],"labels":["@aws-cdk/aws-events-targets"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-eventschemas)","(aws-eventschemas)","(eventschemas)","(event schemas)"],"labels":["@aws-cdk/aws-eventschemas"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-fms)","(aws-fms)","(fms)"],"labels":["@aws-cdk/aws-fms"],"assignees":["rix0rrr"]}, + {"keywords":["(@aws-cdk/aws-fsx)","(aws-fsx)","(fsx)"],"labels":["@aws-cdk/aws-fsx"],"assignees":["rix0rrr"]}, + {"keywords":["(@aws-cdk/aws-gamelift)","(aws-gamelift)","(gamelift)","(game lift)"],"labels":["@aws-cdk/aws-gamelift"],"assignees":["MrArnoldPalmer"]}, + {"keywords":["(@aws-cdk/aws-globalaccelerator)","(aws-globalaccelerator)","(globalaccelerator)","(global accelerator)","(global-accelerator)"],"labels":["@aws-cdk/aws-globalaccelerator"],"assignees":["rix0rrr"]}, + {"keywords":["(@aws-cdk/aws-glue)","(aws-glue)","(glue)"],"labels":["@aws-cdk/aws-glue"],"assignees":["iliapolo"]}, + {"keywords":["(@aws-cdk/aws-greengrass)","(aws-greengrass)","(greengrass)","(green grass)","(green-grass)"],"labels":["@aws-cdk/aws-greengrass"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-guardduty)","(aws-guardduty)","(guardduty)","(guard duty)","(guard-duty)"],"labels":["@aws-cdk/aws-guardduty"],"assignees":["rix0rrr"]}, + {"keywords":["(@aws-cdk/aws-iam)","(aws-iam)","(iam)"],"labels":["@aws-cdk/aws-iam"],"assignees":["rix0rrr"]}, + {"keywords":["(@aws-cdk/aws-imagebuilder)","(aws-imagebuilder)","(imagebuilder)","(image builder)","(image-builder)"],"labels":["@aws-cdk/aws-imagebuilder"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-inspector)","(aws-inspector)","(inspector)"],"labels":["@aws-cdk/aws-inspector"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-iot)","(aws-iot)","(iot)"],"labels":["@aws-cdk/aws-iot"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-iot1click)","(aws-iot1click)","(iot1click)","(iot 1click)"],"labels":["@aws-cdk/aws-iot1click"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-iotanalytics)","(aws-iotanalytics)","(iotanalytics)","(iot analytics)","(iot-analytics)"],"labels":["@aws-cdk/aws-iotanalytics"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-iotevents)","(aws-iotevents)","(iotevents)","(iot events)","(iot-events)"],"labels":["@aws-cdk/aws-iotevents"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-iotsitewise)","(aws-iotsitewise)","(iotsitewise)","(iot sitewise)","(iot-sitewise)","(iot-site-wise)","(iot site wise)"],"labels":["@aws-cdk/aws-iotsitewise"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-iotthingsgraph)","(aws-iotthingsgraph)","(iotthingsgraph)","(iot things graph)","(iot-things-graph)"],"labels":["@aws-cdk/aws-iotthingsgraph"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-ivs)","(aws-ivs)","(Interactive Video Service)","(ivs)"],"labels":["@aws-cdk/aws-ivs"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-kendra)","(aws-kendra)","(kendra)"],"labels":["@aws-cdk/aws-kendra"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-kinesis)","(aws-kinesis)","(kinesis)"],"labels":["@aws-cdk/aws-kinesis"],"assignees":["iliapolo"]}, + {"keywords":["(@aws-cdk/aws-kinesisanalytics)","(aws-kinesisanalytics)","(kinesisanalytics)","(kinesis analytics)","(kinesis-analytics)"],"labels":["@aws-cdk/aws-kinesisanalytics"],"assignees":["iliapolo"]}, + {"keywords":["(@aws-cdk/aws-kinesisfirehose)","(aws-kinesisfirehose)","(kinesisfirehose)","(kinesis firehose)","(kinesis-firehose)"],"labels":["@aws-cdk/aws-kinesisfirehose"],"assignees":["iliapolo"]}, + {"keywords":["(@aws-cdk/aws-kms)","(aws-kms)","(kms)"],"labels":["@aws-cdk/aws-kms"],"assignees":["njlynch"]}, + {"keywords":["(@aws-cdk/aws-lakeformation)","(aws-lakeformation)","(lakeformation)","(lake formation)","(lake-formation)"],"labels":["@aws-cdk/aws-lakeformation"],"assignees":["iliapolo"]}, + {"keywords":["(@aws-cdk/aws-lambda)","(aws-lambda)","(lambda)"],"labels":["@aws-cdk/aws-lambda"],"assignees":["nija-at"]}, + {"keywords":["(@aws-cdk/aws-lambda-event-sources)","(aws-lambda-event-sources)","(lambda-event-sources)","(lambda event sources)"],"labels":["@aws-cdk/aws-lambda-event-sources"],"assignees":["nija-at"]}, + {"keywords":["(@aws-cdk/aws-lambda-nodejs)","(aws-lambda-nodejs)","(lambda-nodejs)","(lambda nodejs)"],"labels":["@aws-cdk/aws-lambda-nodejs"],"assignees":["eladb"]}, + {"keywords":["(@aws-cdk/aws-lambda-python)","(aws-lambda-python)","(lambda-python)","(lambda python)"],"labels":["@aws-cdk/aws-lambda-python"],"assignees":["eladb"]}, + {"keywords":["(@aws-cdk/aws-logs)","(aws-logs)","(logs)"],"labels":["@aws-cdk/aws-logs"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-logs-destinations)","(aws-logs-destinations)","(logs-destinations)","(logs destinations)"],"labels":["@aws-cdk/aws-logs-destinations"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-macie)","(aws-macie)","(macie)"],"labels":["@aws-cdk/aws-macie"],"assignees":["njlynch"]}, + {"keywords":["(@aws-cdk/aws-managedblockchain)","(aws-managedblockchain)","(managedblockchain)","(managed blockchain)","(managed-blockchain)"],"labels":["@aws-cdk/aws-managedblockchain"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-mediaconvert)","(aws-mediaconvert)","(mediaconvert)","(media convert)","(media-convert)"],"labels":["@aws-cdk/aws-mediaconvert"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-medialive)","(aws-medialive)","(medialive)","(media live)","(media-live)"],"labels":["@aws-cdk/aws-medialive"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-mediastore)","(aws-mediastore)","(mediastore)","(media store)","(media-store)"],"labels":["@aws-cdk/aws-mediastore"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-mediapackage)","(aws-mediapackage)","(mediapackage)","(media package)","(media-package)"],"labels":["@aws-cdk/aws-mediapackage"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-msk)","(aws-msk)","(msk)"],"labels":["@aws-cdk/aws-msk"],"assignees":["iliapolo"]}, + {"keywords":["(@aws-cdk/aws-neptune)","(aws-neptune)","(neptune)"],"labels":["@aws-cdk/aws-neptune"],"assignees":["njlynch"]}, + {"keywords":["(@aws-cdk/aws-networkmanager)","(aws-networkmanager)","(networkmanager)","(network manager)","(network-manager)"],"labels":["@aws-cdk/aws-networkmanager"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-opsworks)","(aws-opsworks)","(opsworks)","(ops works)","(ops-works)"],"labels":["@aws-cdk/aws-opsworks"],"assignees":["MrArnoldPalmer"]}, + {"keywords":["(@aws-cdk/aws-opsworkscm)","(aws-opsworkscm)","(opsworkscm)","(opsworks cm)","(opsworks-cm)"],"labels":["@aws-cdk/aws-opsworkscm"],"assignees":["MrArnoldPalmer"]}, + {"keywords":["(@aws-cdk/aws-personalize)","(aws-personalize)","(personalize)"],"labels":["@aws-cdk/aws-personalize"],"assignees":["njlynch"]}, + {"keywords":["(@aws-cdk/aws-pinpoint)","(aws-pinpoint)","(pinpoint)"],"labels":["@aws-cdk/aws-pinpoint"],"assignees":["iliapolo"]}, + {"keywords":["(@aws-cdk/aws-pinpointemail)","(aws-pinpointemail)","(pinpointemail)","(pinpoint email)","(pinpoint-email)"],"labels":["@aws-cdk/aws-pinpointemail"],"assignees":["iliapolo"]}, + {"keywords":["(@aws-cdk/aws-qldb)","(aws-qldb)","(qldb)"],"labels":["@aws-cdk/aws-qldb"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-ram)","(aws-ram)","(ram)"],"labels":["@aws-cdk/aws-ram"],"assignees":["MrArnoldPalmer"]}, + {"keywords":["(@aws-cdk/aws-rds)","(aws-rds)","(rds)"],"labels":["@aws-cdk/aws-rds"],"assignees":["skinny85"]}, + {"keywords":["(@aws-cdk/aws-redshift)","(aws-redshift)","(redshift)","(red shift)","(red-shift)"],"labels":["@aws-cdk/aws-redshift"],"assignees":["njlynch"]}, + {"keywords":["(@aws-cdk/aws-resourcegroups)","(aws-resourcegroups)","(resourcegroups)","(resource groups)","(resource-groups)"],"labels":["@aws-cdk/aws-resourcegroups"],"assignees":["MrArnoldPalmer"]}, + {"keywords":["(@aws-cdk/aws-robomaker)","(aws-robomaker)","(robomaker)","(robo maker)","(robo-maker)"],"labels":["@aws-cdk/aws-robomaker"],"assignees":["njlynch"]}, + {"keywords":["(@aws-cdk/aws-route53)","(aws-route53)","(route53)","(route 53)","(route-53)"],"labels":["@aws-cdk/aws-route53"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-route53-patterns)","(aws-route53-patterns)","(route53-patterns)","(route53 patterns)","(route-53-patterns)"],"labels":["@aws-cdk/aws-route53-patterns"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-route53-targets)","(aws-route53-targets)","(route53-targets)","(route53 targets)","(route-53-targets)"],"labels":["@aws-cdk/aws-route53-targets"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-route53resolver)","(aws-route53resolver)","(route53resolver)","(route53 resolver)","(route-53-resolver)"],"labels":["@aws-cdk/aws-route53resolver"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-s3)","(aws-s3)","(s3)"],"labels":["@aws-cdk/aws-s3"],"assignees":["iliapolo"]}, + {"keywords":["(@aws-cdk/aws-s3-assets)","(aws-s3-assets)","(s3-assets)","(s3 assets)"],"labels":["@aws-cdk/aws-s3-assets"],"assignees":["iliapolo"]}, + {"keywords":["(@aws-cdk/aws-s3-deployment)","(aws-s3-deployment)","(s3-deployment)","(s3 deployment)"],"labels":["@aws-cdk/aws-s3-deployment"],"assignees":["iliapolo"]}, + {"keywords":["(@aws-cdk/aws-s3-notifications)","(aws-s3-notifications)","(s3-notifications)","(s3 notifications)"],"labels":["@aws-cdk/aws-s3-notifications"],"assignees":["iliapolo"]}, + {"keywords":["(@aws-cdk/aws-sagemaker)","(aws-sagemaker)","(sagemaker)","(sage maker)","(sage-maker)"],"labels":["@aws-cdk/aws-sagemaker"],"assignees":["njlynch"]}, + {"keywords":["(@aws-cdk/aws-sam)","(aws-sam)","(sam)"],"labels":["@aws-cdk/aws-sam"],"assignees":["njlynch"]}, + {"keywords":["(@aws-cdk/aws-sdb)","(aws-sdb)","(sdb)"],"labels":["@aws-cdk/aws-sdb"],"assignees":["njlynch"]}, + {"keywords":["(@aws-cdk/aws-secretsmanager)","(aws-secretsmanager)","(secretsmanager)","(secrets manager)","(secrets-manager)"],"labels":["@aws-cdk/aws-secretsmanager"],"assignees":["njlynch"]}, + {"keywords":["(@aws-cdk/aws-securityhub)","(aws-securityhub)","(securityhub)","(security hub)","(security-hub)"],"labels":["@aws-cdk/aws-securityhub"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-servicecatalog)","(aws-servicecatalog)","(servicecatalog)","(service catalog)","(service-catalog)"],"labels":["@aws-cdk/aws-servicecatalog"],"assignees":["MrArnoldPalmer"]}, + {"keywords":["(@aws-cdk/aws-servicediscovery)","(aws-servicediscovery)","(servicediscovery)","(service discovery)","(service-discovery)"],"labels":["@aws-cdk/aws-servicediscovery"],"assignees":["MrArnoldPalmer"]}, + {"keywords":["(@aws-cdk/aws-ses)","(aws-ses)","(ses)"],"labels":["@aws-cdk/aws-ses"],"assignees":["iliapolo"]}, + {"keywords":["(@aws-cdk/aws-ses-actions)","(aws-ses-actions)","(ses-actions)","(ses actions)"],"labels":["@aws-cdk/aws-ses-actions"],"assignees":["iliapolo"]}, + {"keywords":["(@aws-cdk/aws-sns)","(aws-sns)","(sns)"],"labels":["@aws-cdk/aws-sns"],"assignees":["MrArnoldPalmer"]}, + {"keywords":["(@aws-cdk/aws-sns-subscriptions)","(aws-sns-subscriptions)","(sns-subscriptions)","(sns subscriptions)"],"labels":["@aws-cdk/aws-sns-subscriptions"],"assignees":["MrArnoldPalmer"]}, + {"keywords":["(@aws-cdk/aws-sqs)","(aws-sqs)","(sqs)"],"labels":["@aws-cdk/aws-sqs"],"assignees":["MrArnoldPalmer"]}, + {"keywords":["(@aws-cdk/aws-ssm)","(aws-ssm)","(ssm)"],"labels":["@aws-cdk/aws-ssm"],"assignees":["MrArnoldPalmer"]}, + {"keywords":["(@aws-cdk/aws-sso)","(aws-sso)","(sso)"],"labels":["@aws-cdk/aws-sso"],"assignees":["skinny85"]}, + {"keywords":["(@aws-cdk/aws-stepfunctions)","(aws-stepfunctions)","(stepfunctions)","(step functions)","(step-functions)"],"labels":["@aws-cdk/aws-stepfunctions"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-stepfunctions-tasks)","(aws-stepfunctions-tasks)","(stepfunctions-tasks)","(stepfunctions tasks)"],"labels":["@aws-cdk/aws-stepfunctions-tasks"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-synthetics)","(aws-synthetics)","(synthetics)"],"labels":["@aws-cdk/aws-synthetics"],"assignees":["NetaNir"]}, + {"keywords":["(@aws-cdk/aws-timestream)","(aws-timestream)","(timestream)"],"labels":["@aws-cdk/aws-timestream"],"assignees":["skinny85"]}, + {"keywords":["(@aws-cdk/aws-transfer)","(aws-transfer)","(transfer)"],"labels":["@aws-cdk/aws-transfer"],"assignees":["iliapolo"]}, + {"keywords":["(@aws-cdk/aws-waf)","(aws-waf)","(waf)"],"labels":["@aws-cdk/aws-waf"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-wafregional)","(aws-wafregional)","(wafregional)","(waf regional)","(waf-regional)"],"labels":["@aws-cdk/aws-wafregional"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-wafv2)","(aws-wafv2)","(wafv2)","(waf v2)","(waf-v2)"],"labels":["@aws-cdk/aws-wafv2"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/aws-workspaces)","(aws-workspaces)","(workspaces)"],"labels":["@aws-cdk/aws-workspaces"],"assignees":["NetaNir"]}, + {"keywords":["(@aws-cdk/cfnspec)","(cfnspec)","(cfn spec)","(cfn-spec)"],"labels":["@aws-cdk/cfnspec"],"assignees":["rix0rrr"]}, + {"keywords":["(@aws-cdk/cloud-assembly-schema)","(cloud-assembly-schema)","(cloud assembly schema)"],"labels":["@aws-cdk/cloud-assembly-schema"],"assignees":["rix0rrr"]}, + {"keywords":["(@aws-cdk/cloudformation-diff)","(cloudformation-diff)","(cloudformation diff)","(cfn diff)"],"labels":["@aws-cdk/cloudformation-diff"],"assignees":["shivlaks"]}, + {"keywords":["(@aws-cdk/cloudformation-include)","(cloudformation-include)","(cloudformation include)","(cfn include)","(cfn-include)"],"labels":["@aws-cdk/cloudformation-include"],"assignees":["skinny85"]}, + {"keywords":["(@aws-cdk/core)","(core)"],"labels":["@aws-cdk/core"],"assignees":["rix0rrr"]}, + {"keywords":["(@aws-cdk/custom-resources)","(custom-resources)","(custom resources)"],"labels":["@aws-cdk/custom-resources"],"assignees":["rix0rrr"]}, + {"keywords":["(@aws-cdk/cx-api)","(cx-api)","(cx api)"],"labels":["@aws-cdk/cx-api"],"assignees":["rix0rrr"]}, + {"keywords":["(@aws-cdk/pipelines)","(pipelines)","(cdk pipelines)","(cdk-pipelines)"],"labels":["@aws-cdk/pipelines"],"assignees":["rix0rrr"]}, + {"keywords":["(@aws-cdk/region-info)","(region-info)","(region info)"],"labels":["@aws-cdk/region-info"],"assignees":["RomainMuller"]} ] - From b16a8d3079d1d293ce127d616f82b54cb869f2e5 Mon Sep 17 00:00:00 2001 From: Jonathan Goldwasser Date: Wed, 25 Nov 2020 09:59:16 +0100 Subject: [PATCH 213/314] fix(lambda-nodejs): yarn cannot find a writable cache (#11656) Also create a 777 `/tmp/yarn-cache` like we do for `npm` in the `Dockerfile`. See bug reported in Slack https://cdk-dev.slack.com/archives/C018XT6REKT/p1606105713011400 I was not able to reproduce the problem on my machine but it's anyway safer and cleaner like this. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-lambda-nodejs/lib/Dockerfile | 5 +++++ .../aws-lambda-nodejs/test/docker.test.ts | 17 ++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda-nodejs/lib/Dockerfile b/packages/@aws-cdk/aws-lambda-nodejs/lib/Dockerfile index 1ae008af898bb..a92d2fd2092cc 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/lib/Dockerfile +++ b/packages/@aws-cdk/aws-lambda-nodejs/lib/Dockerfile @@ -16,6 +16,11 @@ RUN mkdir /tmp/npm-cache && \ chmod -R 777 /tmp/npm-cache && \ npm config --global set cache /tmp/npm-cache +# Ensure all users can write to yarn cache +RUN mkdir /tmp/yarn-cache && \ + chmod -R 777 /tmp/yarn-cache && \ + yarn config set cache-folder /tmp/yarn-cache + # Disable npm update notifications RUN npm config --global set update-notifier false diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/docker.test.ts b/packages/@aws-cdk/aws-lambda-nodejs/test/docker.test.ts index 8dc9177cffd44..efdbd8b8aa4cc 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/docker.test.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/docker.test.ts @@ -5,7 +5,7 @@ beforeAll(() => { spawnSync('docker', ['build', '-t', 'esbuild', path.join(__dirname, '../lib')]); }); -test('esbuild is available', async () => { +test('esbuild is available', () => { const proc = spawnSync('docker', [ 'run', 'esbuild', 'esbuild', '--version', @@ -13,7 +13,7 @@ test('esbuild is available', async () => { expect(proc.status).toEqual(0); }); -test('can npm install with non root user', async () => { +test('can npm install with non root user', () => { const proc = spawnSync('docker', [ 'run', '-u', '1000:1000', 'esbuild', @@ -26,7 +26,7 @@ test('can npm install with non root user', async () => { expect(proc.status).toEqual(0); }); -test('can yarn install with non root user', async () => { +test('can yarn install with non root user', () => { const proc = spawnSync('docker', [ 'run', '-u', '500:500', 'esbuild', @@ -38,3 +38,14 @@ test('can yarn install with non root user', async () => { ]); expect(proc.status).toEqual(0); }); + +test('cache folders have the right permissions', () => { + const proc = spawnSync('docker', [ + 'run', 'esbuild', + 'bash', '-c', [ + 'stat -c \'%a\' /tmp/npm-cache', + 'stat -c \'%a\' /tmp/yarn-cache', + ].join(' && '), + ]); + expect(proc.stdout.toString()).toMatch('777\n777'); +}); From 13c05bee5882114ccdd4c917cb5cc0204ce15e49 Mon Sep 17 00:00:00 2001 From: Chris Santos Date: Wed, 25 Nov 2020 05:16:30 -0600 Subject: [PATCH 214/314] fix(redshift): multi-node redshift cluster not allowing parameter (#11677) Fixes #11610 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-redshift/lib/cluster.ts | 3 +++ .../aws-redshift/test/cluster.test.ts | 24 +++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/packages/@aws-cdk/aws-redshift/lib/cluster.ts b/packages/@aws-cdk/aws-redshift/lib/cluster.ts index 098055ada1042..9126ef4fda737 100644 --- a/packages/@aws-cdk/aws-redshift/lib/cluster.ts +++ b/packages/@aws-cdk/aws-redshift/lib/cluster.ts @@ -553,6 +553,9 @@ export class Cluster extends ClusterBase { } return undefined; } else { + if (Token.isUnresolved(numberOfNodes)) { + return numberOfNodes; + } const nodeCount = numberOfNodes ?? 2; if (nodeCount < 2 || nodeCount > 100) { throw new Error('Number of nodes for cluster type multi-node must be at least 2 and no more than 100'); diff --git a/packages/@aws-cdk/aws-redshift/test/cluster.test.ts b/packages/@aws-cdk/aws-redshift/test/cluster.test.ts index e8c38692dcb45..bb6c966fed284 100644 --- a/packages/@aws-cdk/aws-redshift/test/cluster.test.ts +++ b/packages/@aws-cdk/aws-redshift/test/cluster.test.ts @@ -210,6 +210,30 @@ describe('node count', () => { }); }).toThrow(/Number of nodes for cluster type multi-node must be at least 2 and no more than 100/); }); + + test('Multi-Node Clusters should allow input parameter for number of nodes', () => { + // WHEN + const numberOfNodesParam = new cdk.CfnParameter(stack, 'numberOfNodes', { + type: 'Number', + }); + + new Cluster(stack, 'Redshift', { + masterUser: { + masterUsername: 'admin', + }, + vpc, + clusterType: ClusterType.MULTI_NODE, + numberOfNodes: numberOfNodesParam.valueAsNumber, + }); + + // THEN + cdkExpect(stack).to(haveResource('AWS::Redshift::Cluster', { + ClusterType: 'multi-node', + NumberOfNodes: { + Ref: 'numberOfNodes', + }, + })); + }); }); test('create an encrypted cluster with custom KMS key', () => { From 3b301231a2d28c3f46d22d44010eb75adc77bc6b Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Wed, 25 Nov 2020 13:35:54 +0000 Subject: [PATCH 215/314] feat(cloudfront): Lambda@Edge construct (#10500) This PR creates a construct (`EdgeFunction`) for Lambda@Edge functions. CloudFront requires that a function be in us-east-1 to be used with Lambda@Edge, even if the logical distribution is created via another region. The initial goal of this construct is to make it easier to request and work with a function in us-east-1 when the primary stack is in another region. In the future, this can be extended to validate other Lambda@Edge restrictions. See https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-requirements-limits.html and #9833 for more information on those limitations. Thanks to @asterikx for the inspiration and consolidated writeup in #1575. Related changes: * When updating the CloudFront README, I noticed that the `Distribution` sub-section hadn't been updated when it was flipped from Experimental to Dev Preview. * A minor docstring fix for Lambda. fixes #9862 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-cloudfront/.gitignore | 4 +- packages/@aws-cdk/aws-cloudfront/README.md | 26 +- .../lib/experimental/edge-function.ts | 262 ++++++++++++++++++ .../lib/experimental/edge-function/index.js | 19 ++ .../aws-cloudfront/lib/experimental/index.ts | 1 + packages/@aws-cdk/aws-cloudfront/lib/index.ts | 2 + packages/@aws-cdk/aws-cloudfront/package.json | 6 + .../test/experimental/edge-function.test.ts | 202 ++++++++++++++ ...ribution-lambda-cross-region.expected.json | 261 +++++++++++++++++ .../integ.distribution-lambda-cross-region.ts | 27 ++ .../@aws-cdk/aws-lambda/lib/function-base.ts | 23 +- packages/@aws-cdk/aws-lambda/package.json | 1 - 12 files changed, 816 insertions(+), 18 deletions(-) create mode 100644 packages/@aws-cdk/aws-cloudfront/lib/experimental/edge-function.ts create mode 100644 packages/@aws-cdk/aws-cloudfront/lib/experimental/edge-function/index.js create mode 100644 packages/@aws-cdk/aws-cloudfront/lib/experimental/index.ts create mode 100644 packages/@aws-cdk/aws-cloudfront/test/experimental/edge-function.test.ts create mode 100644 packages/@aws-cdk/aws-cloudfront/test/integ.distribution-lambda-cross-region.expected.json create mode 100644 packages/@aws-cdk/aws-cloudfront/test/integ.distribution-lambda-cross-region.ts diff --git a/packages/@aws-cdk/aws-cloudfront/.gitignore b/packages/@aws-cdk/aws-cloudfront/.gitignore index 832d814be5d7a..e65361cd8269a 100644 --- a/packages/@aws-cdk/aws-cloudfront/.gitignore +++ b/packages/@aws-cdk/aws-cloudfront/.gitignore @@ -15,4 +15,6 @@ nyc.config.js !.eslintrc.js !jest.config.js -junit.xml \ No newline at end of file +!lib/experimental/edge-function/index.js + +junit.xml diff --git a/packages/@aws-cdk/aws-cloudfront/README.md b/packages/@aws-cdk/aws-cloudfront/README.md index a75dc7aa9dce4..d752286bac5d5 100644 --- a/packages/@aws-cdk/aws-cloudfront/README.md +++ b/packages/@aws-cdk/aws-cloudfront/README.md @@ -251,8 +251,12 @@ or authorize requests based on headers or authorization tokens. The following shows a Lambda@Edge function added to the default behavior and triggered on every request: -```typescript -const myFunc = new lambda.Function(...); +```ts +const myFunc = new cloudfront.experimental.EdgeFunction(this, 'MyFunction', { + runtime: lambda.Runtime.NODEJS_10_X, + handler: 'index.handler', + code: lambda.Code.fromAsset(path.join(__dirname, 'lambda-handler')), +}); new cloudfront.Distribution(this, 'myDist', { defaultBehavior: { origin: new origins.S3Origin(myBucket), @@ -266,9 +270,23 @@ new cloudfront.Distribution(this, 'myDist', { }); ``` +> **Note:** Lambda@Edge functions must be created in the `us-east-1` region, regardless of the region of the CloudFront distribution and stack. +> To make it easier to request functions for Lambda@Edge, the `EdgeFunction` construct can be used. +> The `EdgeFunction` construct will automatically request a function in `us-east-1`, regardless of the region of the current stack. +> `EdgeFunction` has the same interface as `Function` and can be created and used interchangably. + +If the stack is in `us-east-1`, a "normal" `lambda.Function` can be used instead of an `EdgeFunction`. + +```ts +const myFunc = new lambda.Function(this, 'MyFunction', { + runtime: lambda.Runtime.NODEJS_10_X, + handler: 'index.handler', + code: lambda.Code.fromAsset(path.join(__dirname, 'lambda-handler')), +}); +``` + Lambda@Edge functions can also be associated with additional behaviors, -either at Distribution creation time, -or after. +either at or after Distribution creation time. ```typescript // assigning at Distribution creation diff --git a/packages/@aws-cdk/aws-cloudfront/lib/experimental/edge-function.ts b/packages/@aws-cdk/aws-cloudfront/lib/experimental/edge-function.ts new file mode 100644 index 0000000000000..1a93ec84c0584 --- /dev/null +++ b/packages/@aws-cdk/aws-cloudfront/lib/experimental/edge-function.ts @@ -0,0 +1,262 @@ +import * as crypto from 'crypto'; +import * as path from 'path'; +import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; +import * as ec2 from '@aws-cdk/aws-ec2'; +import * as iam from '@aws-cdk/aws-iam'; +import * as lambda from '@aws-cdk/aws-lambda'; +import * as ssm from '@aws-cdk/aws-ssm'; +import { + BootstraplessSynthesizer, CfnResource, ConstructNode, + CustomResource, CustomResourceProvider, CustomResourceProviderRuntime, + DefaultStackSynthesizer, IStackSynthesizer, Resource, Stack, Stage, Token, +} from '@aws-cdk/core'; +import { Construct } from 'constructs'; + +/** + * Properties for creating a Lambda@Edge function + * @experimental + */ +export interface EdgeFunctionProps extends lambda.FunctionProps { } + +/** + * A Lambda@Edge function. + * + * Convenience resource for requesting a Lambda function in the 'us-east-1' region for use with Lambda@Edge. + * Implements several restrictions enforced by Lambda@Edge. + * + * @resource AWS::Lambda::Function + * @experimental + */ +export class EdgeFunction extends Resource implements lambda.IVersion { + + private static readonly EDGE_REGION: string = 'us-east-1'; + + public readonly edgeArn: string; + public readonly functionName: string; + public readonly functionArn: string; + public readonly grantPrincipal: iam.IPrincipal; + public readonly isBoundToVpc = false; + public readonly permissionsNode: ConstructNode; + public readonly role?: iam.IRole; + public readonly version: string; + + // functionStack needed for `addAlias`. + private readonly functionStack: Stack; + private readonly _edgeFunction: lambda.Function; + + constructor(scope: Construct, id: string, props: EdgeFunctionProps) { + super(scope, id); + + // Create a simple Function if we're already in us-east-1; otherwise create a cross-region stack. + const regionIsUsEast1 = !Token.isUnresolved(this.stack.region) && this.stack.region === 'us-east-1'; + const { functionStack, edgeFunction, edgeArn } = regionIsUsEast1 + ? this.createInRegionFunction(props) + : this.createCrossRegionFunction(id, props); + + this.functionStack = functionStack; + this.edgeArn = edgeArn; + + this.functionArn = edgeArn; + this._edgeFunction = edgeFunction; + this.functionName = this._edgeFunction.functionName; + this.grantPrincipal = this._edgeFunction.role!; + this.permissionsNode = this._edgeFunction.permissionsNode; + this.version = lambda.extractQualifierFromArn(this.functionArn); + + this.node.defaultChild = this._edgeFunction; + } + + public get lambda(): lambda.IFunction { + return this._edgeFunction; + } + + /** + * Convenience method to make `EdgeFunction` conform to the same interface as `Function`. + */ + public get currentVersion(): lambda.IVersion { + return this; + } + + public addAlias(aliasName: string, options: lambda.AliasOptions = {}): lambda.Alias { + return new lambda.Alias(this.functionStack, `Alias${aliasName}`, { + aliasName, + version: this._edgeFunction.currentVersion, + ...options, + }); + } + + /** + * Not supported. Connections are only applicable to VPC-enabled functions. + */ + public get connections(): ec2.Connections { + throw new Error('Lambda@Edge does not support connections'); + } + public get latestVersion(): lambda.IVersion { + throw new Error('$LATEST function version cannot be used for Lambda@Edge'); + } + + public addEventSourceMapping(id: string, options: lambda.EventSourceMappingOptions): lambda.EventSourceMapping { + return this.lambda.addEventSourceMapping(id, options); + } + public addPermission(id: string, permission: lambda.Permission): void { + return this.lambda.addPermission(id, permission); + } + public addToRolePolicy(statement: iam.PolicyStatement): void { + return this.lambda.addToRolePolicy(statement); + } + public grantInvoke(identity: iam.IGrantable): iam.Grant { + return this.lambda.grantInvoke(identity); + } + public metric(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return this.lambda.metric(metricName, { ...props, region: EdgeFunction.EDGE_REGION }); + } + public metricDuration(props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return this.lambda.metricDuration({ ...props, region: EdgeFunction.EDGE_REGION }); + } + public metricErrors(props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return this.lambda.metricErrors({ ...props, region: EdgeFunction.EDGE_REGION }); + } + public metricInvocations(props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return this.lambda.metricInvocations({ ...props, region: EdgeFunction.EDGE_REGION }); + } + public metricThrottles(props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return this.lambda.metricThrottles({ ...props, region: EdgeFunction.EDGE_REGION }); + } + /** Adds an event source to this function. */ + public addEventSource(source: lambda.IEventSource): void { + return this.lambda.addEventSource(source); + } + public configureAsyncInvoke(options: lambda.EventInvokeConfigOptions): void { + return this.lambda.configureAsyncInvoke(options); + } + + /** Create a function in-region */ + private createInRegionFunction(props: lambda.FunctionProps): FunctionConfig { + const edgeFunction = new lambda.Function(this, 'Fn', props); + addEdgeLambdaToRoleTrustStatement(edgeFunction.role!); + + return { edgeFunction, edgeArn: edgeFunction.currentVersion.edgeArn, functionStack: this.stack }; + } + + /** Create a support stack and function in us-east-1, and a SSM reader in-region */ + private createCrossRegionFunction(id: string, props: lambda.FunctionProps): FunctionConfig { + const parameterNamePrefix = 'EdgeFunctionArn'; + const parameterName = `${parameterNamePrefix}${id}`; + const functionStack = this.edgeStack(); + + const edgeFunction = new lambda.Function(functionStack, id, props); + addEdgeLambdaToRoleTrustStatement(edgeFunction.role!); + + // Store the current version's ARN to be retrieved by the cross region reader below. + new ssm.StringParameter(edgeFunction, 'Parameter', { + parameterName, + stringValue: edgeFunction.currentVersion.edgeArn, + }); + + const edgeArn = this.createCrossRegionArnReader(parameterNamePrefix, parameterName, edgeFunction); + + return { edgeFunction, edgeArn, functionStack }; + } + + private createCrossRegionArnReader(parameterNamePrefix: string, parameterName: string, edgeFunction: lambda.Function): string { + // Prefix of the parameter ARN that applies to all EdgeFunctions. + // This is necessary because the `CustomResourceProvider` is a singleton, and the `policyStatement` + // must work for multiple EdgeFunctions. + const parameterArnPrefix = this.stack.formatArn({ + service: 'ssm', + region: EdgeFunction.EDGE_REGION, + resource: 'parameter', + resourceName: parameterNamePrefix + '*', + }); + + const resourceType = 'Custom::CrossRegionStringParameterReader'; + const serviceToken = CustomResourceProvider.getOrCreate(this, resourceType, { + codeDirectory: path.join(__dirname, 'edge-function'), + runtime: CustomResourceProviderRuntime.NODEJS_12, + policyStatements: [{ + Effect: 'Allow', + Resource: parameterArnPrefix, + Action: ['ssm:GetParameter'], + }], + }); + const resource = new CustomResource(this, 'ArnReader', { + resourceType: resourceType, + serviceToken, + properties: { + Region: EdgeFunction.EDGE_REGION, + ParameterName: parameterName, + // This is used to determine when the function has changed, to refresh the ARN from the custom resource. + RefreshToken: calculateFunctionHash(edgeFunction), + }, + }); + + return resource.getAttString('FunctionArn'); + } + + private edgeStack(): Stack { + const stage = this.node.root; + if (!stage || !Stage.isStage(stage)) { + throw new Error('stacks which use EdgeFunctions must be part of a CDK app or stage'); + } + const region = this.env.region; + if (Token.isUnresolved(region)) { + throw new Error('stacks which use EdgeFunctions must have an explicitly set region'); + } + + const edgeStackId = `edge-lambda-stack-${region}`; + let edgeStack = stage.node.tryFindChild(edgeStackId) as Stack; + if (!edgeStack) { + edgeStack = new Stack(stage, edgeStackId, { + synthesizer: crossRegionSupportSynthesizer(this.stack), + env: { region: EdgeFunction.EDGE_REGION }, + }); + } + this.stack.addDependency(edgeStack); + return edgeStack; + } +} + +/** Result of creating an in-region or cross-region function */ +interface FunctionConfig { + readonly edgeFunction: lambda.Function; + readonly edgeArn: string; + readonly functionStack: Stack; +} + +// Stolen (and modified) from `@aws-cdk/aws-codepipeline`'s `Pipeline`. +function crossRegionSupportSynthesizer(stack: Stack): IStackSynthesizer | undefined { + // If we have the new synthesizer we need a bootstrapless copy of it, + // because we don't want to require bootstrapping the environment + // of the account in this replication region. + // Otherwise, return undefined to use the default. + const scopeStackSynthesizer = stack.synthesizer; + return (scopeStackSynthesizer instanceof DefaultStackSynthesizer) + ? new BootstraplessSynthesizer({ + deployRoleArn: scopeStackSynthesizer.deployRoleArn, + cloudFormationExecutionRoleArn: scopeStackSynthesizer.cloudFormationExecutionRoleArn, + }) + : undefined; +} + +function addEdgeLambdaToRoleTrustStatement(role: iam.IRole) { + if (role instanceof iam.Role && role.assumeRolePolicy) { + const statement = new iam.PolicyStatement(); + const edgeLambdaServicePrincipal = new iam.ServicePrincipal('edgelambda.amazonaws.com'); + statement.addPrincipals(edgeLambdaServicePrincipal); + statement.addActions(edgeLambdaServicePrincipal.assumeRoleAction); + role.assumeRolePolicy.addStatements(statement); + } +} + +// Stolen from @aws-lambda/lib/function-hash.ts, which isn't currently exported. +// This should be DRY'ed up (exported by @aws-lambda) before this is marked as stable. +function calculateFunctionHash(fn: lambda.Function) { + const stack = Stack.of(fn); + const functionResource = fn.node.defaultChild as CfnResource; + // render the cloudformation resource from this function + const config = stack.resolve((functionResource as any)._toCloudFormation()); + + const hash = crypto.createHash('md5'); + hash.update(JSON.stringify(config)); + return hash.digest('hex'); +} diff --git a/packages/@aws-cdk/aws-cloudfront/lib/experimental/edge-function/index.js b/packages/@aws-cdk/aws-cloudfront/lib/experimental/edge-function/index.js new file mode 100644 index 0000000000000..b3bf920efd2e3 --- /dev/null +++ b/packages/@aws-cdk/aws-cloudfront/lib/experimental/edge-function/index.js @@ -0,0 +1,19 @@ +var AWS = require('aws-sdk'); + +exports.handler = async function (event) { + const props = event.ResourceProperties; + + console.info(`Reading function ARN from SSM parameter ${props.ParameterName} in region ${props.Region}`); + + if (event.RequestType === 'Create' || event.RequestType === 'Update') { + const ssm = new AWS.SSM({ region: props.Region }); + const ssmParameter = await ssm.getParameter({ Name: props.ParameterName }).promise(); + console.info('Response: %j', ssmParameter); + const functionArn = ssmParameter.Parameter.Value; + return { + Data: { + FunctionArn: functionArn, + }, + }; + } +}; diff --git a/packages/@aws-cdk/aws-cloudfront/lib/experimental/index.ts b/packages/@aws-cdk/aws-cloudfront/lib/experimental/index.ts new file mode 100644 index 0000000000000..a1362556b10ea --- /dev/null +++ b/packages/@aws-cdk/aws-cloudfront/lib/experimental/index.ts @@ -0,0 +1 @@ +export * from './edge-function'; diff --git a/packages/@aws-cdk/aws-cloudfront/lib/index.ts b/packages/@aws-cdk/aws-cloudfront/lib/index.ts index e04d76a72e48d..b0bd550231be3 100644 --- a/packages/@aws-cdk/aws-cloudfront/lib/index.ts +++ b/packages/@aws-cdk/aws-cloudfront/lib/index.ts @@ -6,5 +6,7 @@ export * from './origin_access_identity'; export * from './origin-request-policy'; export * from './web_distribution'; +export * as experimental from './experimental'; + // AWS::CloudFront CloudFormation Resources: export * from './cloudfront.generated'; diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index 0ff97a8f23c3b..8c76c12197755 100644 --- a/packages/@aws-cdk/aws-cloudfront/package.json +++ b/packages/@aws-cdk/aws-cloudfront/package.json @@ -82,20 +82,26 @@ }, "dependencies": { "@aws-cdk/aws-certificatemanager": "0.0.0", + "@aws-cdk/aws-cloudwatch": "0.0.0", + "@aws-cdk/aws-ec2": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", + "@aws-cdk/aws-ssm": "0.0.0", "@aws-cdk/core": "0.0.0", "constructs": "^3.2.0" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/aws-certificatemanager": "0.0.0", + "@aws-cdk/aws-cloudwatch": "0.0.0", + "@aws-cdk/aws-ec2": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", + "@aws-cdk/aws-ssm": "0.0.0", "@aws-cdk/core": "0.0.0", "constructs": "^3.2.0" }, diff --git a/packages/@aws-cdk/aws-cloudfront/test/experimental/edge-function.test.ts b/packages/@aws-cdk/aws-cloudfront/test/experimental/edge-function.test.ts new file mode 100644 index 0000000000000..faeffde9edc51 --- /dev/null +++ b/packages/@aws-cdk/aws-cloudfront/test/experimental/edge-function.test.ts @@ -0,0 +1,202 @@ +import '@aws-cdk/assert/jest'; +import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; +import * as iam from '@aws-cdk/aws-iam'; +import * as lambda from '@aws-cdk/aws-lambda'; +import * as cdk from '@aws-cdk/core'; +import * as cloudfront from '../../lib'; + +let app: cdk.App; +let stack: cdk.Stack; + +beforeEach(() => { + app = new cdk.App(); + stack = new cdk.Stack(app, 'Stack', { + env: { account: '111111111111', region: 'testregion' }, + }); +}); + +describe('stacks', () => { + test('creates a custom resource and supporting resources in main stack', () => { + new cloudfront.experimental.EdgeFunction(stack, 'MyFn', defaultEdgeFunctionProps()); + + expect(stack).toHaveResource('AWS::IAM::Role', { + AssumeRolePolicyDocument: { + Statement: [{ + Action: 'sts:AssumeRole', + Effect: 'Allow', + Principal: { Service: 'lambda.amazonaws.com' }, + }], + Version: '2012-10-17', + }, + ManagedPolicyArns: [ + { 'Fn::Sub': 'arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole' }, + ], + Policies: [{ + PolicyName: 'Inline', + PolicyDocument: { + Version: '2012-10-17', + Statement: [{ + Effect: 'Allow', + Resource: { + 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':ssm:us-east-1:111111111111:parameter/EdgeFunctionArn*']], + }, + Action: ['ssm:GetParameter'], + }], + }, + }], + }); + expect(stack).toHaveResourceLike('AWS::Lambda::Function', { + Handler: '__entrypoint__.handler', + Role: { + 'Fn::GetAtt': ['CustomCrossRegionStringParameterReaderCustomResourceProviderRole71CD6825', 'Arn'], + }, + }); + expect(stack).toHaveResource('Custom::CrossRegionStringParameterReader', { + ServiceToken: { + 'Fn::GetAtt': ['CustomCrossRegionStringParameterReaderCustomResourceProviderHandler65B5F33A', 'Arn'], + }, + Region: 'us-east-1', + ParameterName: 'EdgeFunctionArnMyFn', + }); + }); + + test('creates the actual function and supporting resources in us-east-1 stack', () => { + new cloudfront.experimental.EdgeFunction(stack, 'MyFn', defaultEdgeFunctionProps()); + + const fnStack = getFnStack(); + + expect(fnStack).toHaveResource('AWS::IAM::Role', { + AssumeRolePolicyDocument: { + Statement: [ + { + Action: 'sts:AssumeRole', + Effect: 'Allow', + Principal: { Service: 'lambda.amazonaws.com' }, + }, + { + Action: 'sts:AssumeRole', + Effect: 'Allow', + Principal: { Service: 'edgelambda.amazonaws.com' }, + }, + ], + Version: '2012-10-17', + }, + ManagedPolicyArns: [ + { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::aws:policy/service-role/AWSLambdaBasicExecutionRole']] }, + ], + }); + expect(fnStack).toHaveResource('AWS::Lambda::Function', { + Code: { ZipFile: 'foo' }, + Handler: 'index.handler', + Role: { 'Fn::GetAtt': ['MyFnServiceRoleF3016589', 'Arn'] }, + Runtime: 'nodejs12.x', + }); + expect(fnStack).toHaveResource('AWS::Lambda::Version', { + FunctionName: { Ref: 'MyFn6F8F742F' }, + }); + expect(fnStack).toHaveResource('AWS::SSM::Parameter', { + Type: 'String', + Value: { Ref: 'MyFnCurrentVersion309B29FC29686ce94039b6e08d1645be854b3ac9' }, + Name: 'EdgeFunctionArnMyFn', + }); + }); + + test('creates minimal constructs if scope region is us-east-1', () => { + app = new cdk.App(); + stack = new cdk.Stack(app, 'Stack', { + env: { account: '111111111111', region: 'us-east-1' }, + }); + new cloudfront.experimental.EdgeFunction(stack, 'MyFn', defaultEdgeFunctionProps()); + + expect(stack).toHaveResource('AWS::IAM::Role', { + AssumeRolePolicyDocument: { + Statement: [ + { + Action: 'sts:AssumeRole', + Effect: 'Allow', + Principal: { Service: 'lambda.amazonaws.com' }, + }, + { + Action: 'sts:AssumeRole', + Effect: 'Allow', + Principal: { Service: 'edgelambda.amazonaws.com' }, + }, + ], + Version: '2012-10-17', + }, + ManagedPolicyArns: [ + { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::aws:policy/service-role/AWSLambdaBasicExecutionRole']] }, + ], + }); + expect(stack).toHaveResource('AWS::Lambda::Function', { + Code: { ZipFile: 'foo' }, + Handler: 'index.handler', + Role: { 'Fn::GetAtt': ['MyFnServiceRole3F9D41E1', 'Arn'] }, + Runtime: 'nodejs12.x', + }); + expect(stack).toHaveResource('AWS::Lambda::Version', { + FunctionName: { Ref: 'MyFn223608AD' }, + }); + }); + + test('only one cross-region stack is created for multiple functions', () => { + new cloudfront.experimental.EdgeFunction(stack, 'MyFn1', defaultEdgeFunctionProps()); + new cloudfront.experimental.EdgeFunction(stack, 'MyFn2', defaultEdgeFunctionProps()); + + const fnStack = getFnStack(); + expect(fnStack).toCountResources('AWS::Lambda::Function', 2); + }); +}); + +test('addAlias() creates alias in function stack', () => { + const fn = new cloudfront.experimental.EdgeFunction(stack, 'MyFn', defaultEdgeFunctionProps()); + + fn.addAlias('MyCurrentAlias'); + + const fnStack = getFnStack(); + expect(fnStack).toHaveResourceLike('AWS::Lambda::Alias', { + Name: 'MyCurrentAlias', + }); +}); + +test('addPermission() creates permissions in function stack', () => { + const fn = new cloudfront.experimental.EdgeFunction(stack, 'MyFn', defaultEdgeFunctionProps()); + + fn.addPermission('MyPerms', { + action: 'lambda:InvokeFunction', + principal: new iam.AccountPrincipal('123456789012'), + }); + + const fnStack = getFnStack(); + expect(fnStack).toHaveResourceLike('AWS::Lambda::Permission', { + Action: 'lambda:InvokeFunction', + Principal: '123456789012', + }); +}); + +test('metric methods', () => { + const fn = new cloudfront.experimental.EdgeFunction(stack, 'MyFn', defaultEdgeFunctionProps()); + + const metrics = new Array(); + metrics.push(fn.metricDuration()); + metrics.push(fn.metricErrors()); + metrics.push(fn.metricInvocations()); + metrics.push(fn.metricThrottles()); + + for (const metric of metrics) { + expect(metric.namespace).toEqual('AWS/Lambda'); + expect(metric.region).toEqual('us-east-1'); + } +}); + +function defaultEdgeFunctionProps() { + return { + code: lambda.Code.fromInline('foo'), + handler: 'index.handler', + runtime: lambda.Runtime.NODEJS_12_X, + }; +} + +function getFnStack(region: string = 'testregion'): cdk.Stack { + return app.node.findChild(`edge-lambda-stack-${region}`) as cdk.Stack; +} diff --git a/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-lambda-cross-region.expected.json b/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-lambda-cross-region.expected.json new file mode 100644 index 0000000000000..aafb7b7e3982f --- /dev/null +++ b/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-lambda-cross-region.expected.json @@ -0,0 +1,261 @@ +[ + { + "Resources": { + "LambdaArnReaderAB4FC772": { + "Type": "Custom::CrossRegionStringParameterReader", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "CustomCrossRegionStringParameterReaderCustomResourceProviderHandler65B5F33A", + "Arn" + ] + }, + "Region": "us-east-1", + "ParameterName": "EdgeFunctionArnLambda", + "RefreshToken": "4412ddb0ae449da20173ca211c51fddc" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "CustomCrossRegionStringParameterReaderCustomResourceProviderRole71CD6825": { + "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", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":ssm:us-east-1:", + { + "Ref": "AWS::AccountId" + }, + ":parameter/EdgeFunctionArn*" + ] + ] + }, + "Action": [ + "ssm:GetParameter" + ] + } + ] + } + } + ] + } + }, + "CustomCrossRegionStringParameterReaderCustomResourceProviderHandler65B5F33A": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Ref": "AssetParameters45b7ed524ce2b119dd4f2b8642ae8bfaf0df45bc6bd705072ae4ee6d1a999241S3BucketF1BC72A7" + }, + "S3Key": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParameters45b7ed524ce2b119dd4f2b8642ae8bfaf0df45bc6bd705072ae4ee6d1a999241S3VersionKey7AD83AC7" + } + ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParameters45b7ed524ce2b119dd4f2b8642ae8bfaf0df45bc6bd705072ae4ee6d1a999241S3VersionKey7AD83AC7" + } + ] + } + ] + } + ] + ] + } + }, + "Timeout": 900, + "MemorySize": 128, + "Handler": "__entrypoint__.handler", + "Role": { + "Fn::GetAtt": [ + "CustomCrossRegionStringParameterReaderCustomResourceProviderRole71CD6825", + "Arn" + ] + }, + "Runtime": "nodejs12.x" + }, + "DependsOn": [ + "CustomCrossRegionStringParameterReaderCustomResourceProviderRole71CD6825" + ] + }, + "DistB3B78991": { + "Type": "AWS::CloudFront::Distribution", + "Properties": { + "DistributionConfig": { + "DefaultCacheBehavior": { + "CachePolicyId": "4135ea2d-6df8-44a3-9df3-4b5a84be39ad", + "Compress": true, + "LambdaFunctionAssociations": [ + { + "EventType": "origin-request", + "LambdaFunctionARN": { + "Fn::GetAtt": [ + "LambdaArnReaderAB4FC772", + "FunctionArn" + ] + } + } + ], + "TargetOriginId": "integdistributionlambdacrossregionDistOrigin167A054D5", + "ViewerProtocolPolicy": "allow-all" + }, + "Enabled": true, + "HttpVersion": "http2", + "IPV6Enabled": true, + "Origins": [ + { + "CustomOriginConfig": { + "OriginProtocolPolicy": "https-only" + }, + "DomainName": "www.example.com", + "Id": "integdistributionlambdacrossregionDistOrigin167A054D5" + } + ] + } + } + } + }, + "Parameters": { + "AssetParameters45b7ed524ce2b119dd4f2b8642ae8bfaf0df45bc6bd705072ae4ee6d1a999241S3BucketF1BC72A7": { + "Type": "String", + "Description": "S3 bucket for asset \"45b7ed524ce2b119dd4f2b8642ae8bfaf0df45bc6bd705072ae4ee6d1a999241\"" + }, + "AssetParameters45b7ed524ce2b119dd4f2b8642ae8bfaf0df45bc6bd705072ae4ee6d1a999241S3VersionKey7AD83AC7": { + "Type": "String", + "Description": "S3 key for asset version \"45b7ed524ce2b119dd4f2b8642ae8bfaf0df45bc6bd705072ae4ee6d1a999241\"" + }, + "AssetParameters45b7ed524ce2b119dd4f2b8642ae8bfaf0df45bc6bd705072ae4ee6d1a999241ArtifactHash1B3D1B80": { + "Type": "String", + "Description": "Artifact hash for asset \"45b7ed524ce2b119dd4f2b8642ae8bfaf0df45bc6bd705072ae4ee6d1a999241\"" + } + } + }, + { + "Resources": { + "LambdaServiceRoleA8ED4D3B": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + }, + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "edgelambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ] + } + }, + "LambdaD247545B": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "foo" + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "LambdaServiceRoleA8ED4D3B", + "Arn" + ] + }, + "Runtime": "nodejs10.x" + }, + "DependsOn": [ + "LambdaServiceRoleA8ED4D3B" + ] + }, + "LambdaCurrentVersionDF706F6A97fb843e9bd06fcd2bb15eeace80e13e": { + "Type": "AWS::Lambda::Version", + "Properties": { + "FunctionName": { + "Ref": "LambdaD247545B" + } + } + }, + "LambdaParameterCDCFFB68": { + "Type": "AWS::SSM::Parameter", + "Properties": { + "Type": "String", + "Value": { + "Ref": "LambdaCurrentVersionDF706F6A97fb843e9bd06fcd2bb15eeace80e13e" + }, + "Name": "EdgeFunctionArnLambda" + } + } + } + } +] \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-lambda-cross-region.ts b/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-lambda-cross-region.ts new file mode 100644 index 0000000000000..5814ab3d6ce59 --- /dev/null +++ b/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-lambda-cross-region.ts @@ -0,0 +1,27 @@ +/// !cdk-integ * +import * as lambda from '@aws-cdk/aws-lambda'; +import * as cdk from '@aws-cdk/core'; +import * as cloudfront from '../lib'; +import { TestOrigin } from './test-origin'; + +const app = new cdk.App(); +const stack = new cdk.Stack(app, 'integ-distribution-lambda-cross-region', { env: { region: 'eu-west-1' } }); + +const lambdaFunction = new cloudfront.experimental.EdgeFunction(stack, 'Lambda', { + code: lambda.Code.fromInline('foo'), + handler: 'index.handler', + runtime: lambda.Runtime.NODEJS_10_X, +}); + +new cloudfront.Distribution(stack, 'Dist', { + defaultBehavior: { + origin: new TestOrigin('www.example.com'), + cachePolicy: cloudfront.CachePolicy.CACHING_DISABLED, + edgeLambdas: [{ + functionVersion: lambdaFunction.currentVersion, + eventType: cloudfront.LambdaEdgeEventType.ORIGIN_REQUEST, + }], + }, +}); + +app.synth(); diff --git a/packages/@aws-cdk/aws-lambda/lib/function-base.ts b/packages/@aws-cdk/aws-lambda/lib/function-base.ts index d02f355f0c5f3..8b8dd585c21c2 100644 --- a/packages/@aws-cdk/aws-lambda/lib/function-base.ts +++ b/packages/@aws-cdk/aws-lambda/lib/function-base.ts @@ -106,6 +106,17 @@ export interface IFunction extends IResource, ec2.IConnectable, iam.IGrantable { */ metricThrottles(props?: cloudwatch.MetricOptions): cloudwatch.Metric; + /** + * Adds an event source to this function. + * + * Event sources are implemented in the @aws-cdk/aws-lambda-event-sources module. + * + * The following example adds an SQS Queue as an event source: + * ``` + * import { SqsEventSource } from '@aws-cdk/aws-lambda-event-sources'; + * myFunction.addEventSource(new SqsEventSource(myQueue)); + * ``` + */ addEventSource(source: IEventSource): void; /** @@ -329,18 +340,6 @@ export abstract class FunctionBase extends Resource implements IFunction { return grant; } - /** - * Adds an event source to this function. - * - * Event sources are implemented in the @aws-cdk/aws-lambda-event-sources module. - * - * The following example adds an SQS Queue as an event source: - * - * import { SqsEventSource } from '@aws-cdk/aws-lambda-event-sources'; - * myFunction.addEventSource(new SqsEventSource(myQueue)); - * - * @param source The event source to bind to this function - */ public addEventSource(source: IEventSource) { source.bind(this); } diff --git a/packages/@aws-cdk/aws-lambda/package.json b/packages/@aws-cdk/aws-lambda/package.json index 63319fe238f8f..9b243f70f1af3 100644 --- a/packages/@aws-cdk/aws-lambda/package.json +++ b/packages/@aws-cdk/aws-lambda/package.json @@ -164,7 +164,6 @@ "docs-public-apis:@aws-cdk/aws-lambda.FunctionProps", "docs-public-apis:@aws-cdk/aws-lambda.IAlias", "docs-public-apis:@aws-cdk/aws-lambda.IFunction", - "docs-public-apis:@aws-cdk/aws-lambda.IFunction.addEventSource", "docs-public-apis:@aws-cdk/aws-lambda.ILayerVersion", "docs-public-apis:@aws-cdk/aws-lambda.IVersion", "docs-public-apis:@aws-cdk/aws-lambda.LambdaRuntimeProps", From 11b81de6260dff57256520b375ed685eb2aa02de Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 25 Nov 2020 14:12:40 +0000 Subject: [PATCH 216/314] chore(deps-dev): bump @types/node from 10.17.46 to 10.17.47 (#11695) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 10.17.46 to 10.17.47. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/core/package.json | 2 +- packages/@monocdk-experiment/assert/package.json | 2 +- packages/@monocdk-experiment/rewrite-imports/package.json | 2 +- packages/aws-cdk-lib/package.json | 2 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- packages/monocdk/package.json | 2 +- tools/eslint-plugin-cdk/package.json | 2 +- tools/nodeunit-shim/package.json | 2 +- tools/yarn-cling/package.json | 2 +- yarn.lock | 8 ++++---- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json index e6041125237cb..5e892d35ce62f 100644 --- a/packages/@aws-cdk/core/package.json +++ b/packages/@aws-cdk/core/package.json @@ -170,7 +170,7 @@ "devDependencies": { "@types/lodash": "^4.14.165", "@types/minimatch": "^3.0.3", - "@types/node": "^10.17.46", + "@types/node": "^10.17.47", "@types/sinon": "^9.0.9", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@monocdk-experiment/assert/package.json b/packages/@monocdk-experiment/assert/package.json index 94a00e7e3f02f..6afd53dff063c 100644 --- a/packages/@monocdk-experiment/assert/package.json +++ b/packages/@monocdk-experiment/assert/package.json @@ -35,7 +35,7 @@ "devDependencies": { "@monocdk-experiment/rewrite-imports": "0.0.0", "@types/jest": "^26.0.15", - "@types/node": "^10.17.46", + "@types/node": "^10.17.47", "cdk-build-tools": "0.0.0", "constructs": "^3.2.0", "jest": "^26.6.3", diff --git a/packages/@monocdk-experiment/rewrite-imports/package.json b/packages/@monocdk-experiment/rewrite-imports/package.json index 788001c77aabe..70e66ebd130be 100644 --- a/packages/@monocdk-experiment/rewrite-imports/package.json +++ b/packages/@monocdk-experiment/rewrite-imports/package.json @@ -37,7 +37,7 @@ "devDependencies": { "@types/glob": "^7.1.3", "@types/jest": "^26.0.15", - "@types/node": "^10.17.46", + "@types/node": "^10.17.47", "cdk-build-tools": "0.0.0", "pkglint": "0.0.0" }, diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index 6fb76cd3eca49..837833bc7ea58 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -266,7 +266,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "@types/fs-extra": "^8.1.1", - "@types/node": "^10.17.46", + "@types/node": "^10.17.47", "cdk-build-tools": "0.0.0", "constructs": "^3.2.0", "fs-extra": "^9.0.1", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 8e2523894af36..e66a321fc2f06 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -45,7 +45,7 @@ "@types/jest": "^26.0.15", "@types/minimatch": "^3.0.3", "@types/mockery": "^1.4.29", - "@types/node": "^10.17.46", + "@types/node": "^10.17.47", "@types/promptly": "^3.0.0", "@types/semver": "^7.3.4", "@types/sinon": "^9.0.9", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index 71760884bcefe..24bc67075c70f 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -35,7 +35,7 @@ "@types/jest": "^26.0.15", "@types/jszip": "^3.4.1", "@types/mock-fs": "^4.13.0", - "@types/node": "^10.17.46", + "@types/node": "^10.17.47", "@types/yargs": "^15.0.10", "cdk-build-tools": "0.0.0", "jest": "^26.6.3", diff --git a/packages/monocdk/package.json b/packages/monocdk/package.json index 367ee89c1d98a..a3146f30ed779 100644 --- a/packages/monocdk/package.json +++ b/packages/monocdk/package.json @@ -265,7 +265,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "@types/fs-extra": "^8.1.1", - "@types/node": "^10.17.46", + "@types/node": "^10.17.47", "cdk-build-tools": "0.0.0", "constructs": "^3.2.0", "fs-extra": "^9.0.1", diff --git a/tools/eslint-plugin-cdk/package.json b/tools/eslint-plugin-cdk/package.json index 0b06b895cfbba..795262ab408f3 100644 --- a/tools/eslint-plugin-cdk/package.json +++ b/tools/eslint-plugin-cdk/package.json @@ -15,7 +15,7 @@ "@types/eslint": "^7.2.5", "@types/fs-extra": "^8.1.1", "@types/jest": "^26.0.15", - "@types/node": "^10.17.46", + "@types/node": "^10.17.47", "eslint-plugin-rulesdir": "^0.1.0", "jest": "^26.6.3", "typescript": "~3.9.7" diff --git a/tools/nodeunit-shim/package.json b/tools/nodeunit-shim/package.json index e644c259dc2a8..56bd2d5e4fb60 100644 --- a/tools/nodeunit-shim/package.json +++ b/tools/nodeunit-shim/package.json @@ -13,7 +13,7 @@ }, "devDependencies": { "@types/jest": "^26.0.15", - "@types/node": "^10.17.46", + "@types/node": "^10.17.47", "typescript": "~3.9.7" }, "dependencies": { diff --git a/tools/yarn-cling/package.json b/tools/yarn-cling/package.json index 596f283475b46..feba1052cc743 100644 --- a/tools/yarn-cling/package.json +++ b/tools/yarn-cling/package.json @@ -39,7 +39,7 @@ }, "devDependencies": { "@types/jest": "^26.0.15", - "@types/node": "^10.17.46", + "@types/node": "^10.17.47", "@types/yarnpkg__lockfile": "^1.1.4", "jest": "^26.6.3", "pkglint": "0.0.0", diff --git a/yarn.lock b/yarn.lock index 28d81e024cefc..ce1d572a34688 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1661,10 +1661,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.2.tgz#2de1ed6670439387da1c9f549a2ade2b0a799256" integrity sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA== -"@types/node@^10.17.46": - version "10.17.46" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.46.tgz#1cd867ebfe9957ab45951f2f715f8de5f3dab7a3" - integrity sha512-Tice8a+sJtlP9C1EUo0DYyjq52T37b3LexVu3p871+kfIBIN+OQ7PKPei1oF3MgF39olEpUfxaLtD+QFc1k69Q== +"@types/node@^10.17.47": + version "10.17.47" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.47.tgz#cc88a242a835789456cfcf374928400d9f4b291c" + integrity sha512-YZ1mMAdUPouBZCdeugjV8y1tqqr28OyL8DYbH5ePCfe9zcXtvbh1wDBy7uzlHkXo3Qi07kpzXfvycvrkby/jXw== "@types/nodeunit@^0.0.31": version "0.0.31" From d1d9fc49afbd5bfde6b30bbfb92bb179e79d5743 Mon Sep 17 00:00:00 2001 From: AWS CDK Automation <43080478+aws-cdk-automation@users.noreply.github.com> Date: Wed, 25 Nov 2020 16:56:57 +0100 Subject: [PATCH 217/314] feat(cfnspec): cloudformation spec v21.0.0 (#11694) Co-authored-by: AWS CDK Team Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- .../@aws-cdk/aws-networkfirewall/.eslintrc.js | 3 + .../@aws-cdk/aws-networkfirewall/.gitignore | 19 + .../@aws-cdk/aws-networkfirewall/.npmignore | 28 + packages/@aws-cdk/aws-networkfirewall/LICENSE | 201 ++ packages/@aws-cdk/aws-networkfirewall/NOTICE | 2 + .../@aws-cdk/aws-networkfirewall/README.md | 16 + .../aws-networkfirewall/jest.config.js | 2 + .../@aws-cdk/aws-networkfirewall/lib/index.ts | 2 + .../@aws-cdk/aws-networkfirewall/package.json | 96 + .../test/networkfirewall.test.ts | 6 + packages/@aws-cdk/aws-signer/.eslintrc.js | 3 + packages/@aws-cdk/aws-signer/.gitignore | 19 + packages/@aws-cdk/aws-signer/.npmignore | 28 + packages/@aws-cdk/aws-signer/LICENSE | 201 ++ packages/@aws-cdk/aws-signer/NOTICE | 2 + packages/@aws-cdk/aws-signer/README.md | 16 + packages/@aws-cdk/aws-signer/jest.config.js | 2 + packages/@aws-cdk/aws-signer/lib/index.ts | 2 + packages/@aws-cdk/aws-signer/package.json | 96 + .../@aws-cdk/aws-signer/test/signer.test.ts | 6 + packages/@aws-cdk/cfnspec/CHANGELOG.md | 88 + packages/@aws-cdk/cfnspec/cfn.version | 2 +- ...0_CloudFormationResourceSpecification.json | 2148 ++++++++++++++++- .../cloudformation-include/package.json | 4 + packages/aws-cdk-lib/package.json | 2 + packages/decdk/package.json | 2 + packages/monocdk/package.json | 2 + 27 files changed, 2965 insertions(+), 33 deletions(-) create mode 100644 packages/@aws-cdk/aws-networkfirewall/.eslintrc.js create mode 100644 packages/@aws-cdk/aws-networkfirewall/.gitignore create mode 100644 packages/@aws-cdk/aws-networkfirewall/.npmignore create mode 100644 packages/@aws-cdk/aws-networkfirewall/LICENSE create mode 100644 packages/@aws-cdk/aws-networkfirewall/NOTICE create mode 100644 packages/@aws-cdk/aws-networkfirewall/README.md create mode 100644 packages/@aws-cdk/aws-networkfirewall/jest.config.js create mode 100644 packages/@aws-cdk/aws-networkfirewall/lib/index.ts create mode 100644 packages/@aws-cdk/aws-networkfirewall/package.json create mode 100644 packages/@aws-cdk/aws-networkfirewall/test/networkfirewall.test.ts create mode 100644 packages/@aws-cdk/aws-signer/.eslintrc.js create mode 100644 packages/@aws-cdk/aws-signer/.gitignore create mode 100644 packages/@aws-cdk/aws-signer/.npmignore create mode 100644 packages/@aws-cdk/aws-signer/LICENSE create mode 100644 packages/@aws-cdk/aws-signer/NOTICE create mode 100644 packages/@aws-cdk/aws-signer/README.md create mode 100644 packages/@aws-cdk/aws-signer/jest.config.js create mode 100644 packages/@aws-cdk/aws-signer/lib/index.ts create mode 100644 packages/@aws-cdk/aws-signer/package.json create mode 100644 packages/@aws-cdk/aws-signer/test/signer.test.ts diff --git a/packages/@aws-cdk/aws-networkfirewall/.eslintrc.js b/packages/@aws-cdk/aws-networkfirewall/.eslintrc.js new file mode 100644 index 0000000000000..61dd8dd001f63 --- /dev/null +++ b/packages/@aws-cdk/aws-networkfirewall/.eslintrc.js @@ -0,0 +1,3 @@ +const baseConfig = require('cdk-build-tools/config/eslintrc'); +baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-networkfirewall/.gitignore b/packages/@aws-cdk/aws-networkfirewall/.gitignore new file mode 100644 index 0000000000000..62ebc95d75ce6 --- /dev/null +++ b/packages/@aws-cdk/aws-networkfirewall/.gitignore @@ -0,0 +1,19 @@ +*.js +*.js.map +*.d.ts +tsconfig.json +node_modules +*.generated.ts +dist +.jsii + +.LAST_BUILD +.nyc_output +coverage +.nycrc +.LAST_PACKAGE +*.snk +nyc.config.js +!.eslintrc.js +!jest.config.js +junit.xml diff --git a/packages/@aws-cdk/aws-networkfirewall/.npmignore b/packages/@aws-cdk/aws-networkfirewall/.npmignore new file mode 100644 index 0000000000000..e4486030fcb17 --- /dev/null +++ b/packages/@aws-cdk/aws-networkfirewall/.npmignore @@ -0,0 +1,28 @@ +# Don't include original .ts files when doing `npm pack` +*.ts +!*.d.ts +coverage +.nyc_output +*.tgz + +dist +.LAST_PACKAGE +.LAST_BUILD +!*.js + +# Include .jsii +!.jsii + +*.snk + +*.tsbuildinfo + +tsconfig.json + +.eslintrc.js +jest.config.js + +# exclude cdk artifacts +**/cdk.out +junit.xml +test/ diff --git a/packages/@aws-cdk/aws-networkfirewall/LICENSE b/packages/@aws-cdk/aws-networkfirewall/LICENSE new file mode 100644 index 0000000000000..b71ec1688783a --- /dev/null +++ b/packages/@aws-cdk/aws-networkfirewall/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/@aws-cdk/aws-networkfirewall/NOTICE b/packages/@aws-cdk/aws-networkfirewall/NOTICE new file mode 100644 index 0000000000000..bfccac9a7f69c --- /dev/null +++ b/packages/@aws-cdk/aws-networkfirewall/NOTICE @@ -0,0 +1,2 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-networkfirewall/README.md b/packages/@aws-cdk/aws-networkfirewall/README.md new file mode 100644 index 0000000000000..8593ffd675be5 --- /dev/null +++ b/packages/@aws-cdk/aws-networkfirewall/README.md @@ -0,0 +1,16 @@ +## AWS::NetworkFirewall Construct Library + +--- + +![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) + +> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. + +--- + + +This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. + +```ts +import networkfirewall = require('@aws-cdk/aws-networkfirewall'); +``` diff --git a/packages/@aws-cdk/aws-networkfirewall/jest.config.js b/packages/@aws-cdk/aws-networkfirewall/jest.config.js new file mode 100644 index 0000000000000..54e28beb9798b --- /dev/null +++ b/packages/@aws-cdk/aws-networkfirewall/jest.config.js @@ -0,0 +1,2 @@ +const baseConfig = require('cdk-build-tools/config/jest.config'); +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-networkfirewall/lib/index.ts b/packages/@aws-cdk/aws-networkfirewall/lib/index.ts new file mode 100644 index 0000000000000..1aa22b2582738 --- /dev/null +++ b/packages/@aws-cdk/aws-networkfirewall/lib/index.ts @@ -0,0 +1,2 @@ +// AWS::NetworkFirewall CloudFormation Resources: +export * from './networkfirewall.generated'; diff --git a/packages/@aws-cdk/aws-networkfirewall/package.json b/packages/@aws-cdk/aws-networkfirewall/package.json new file mode 100644 index 0000000000000..f8415a0b9be52 --- /dev/null +++ b/packages/@aws-cdk/aws-networkfirewall/package.json @@ -0,0 +1,96 @@ +{ + "name": "@aws-cdk/aws-networkfirewall", + "version": "0.0.0", + "description": "The CDK Construct Library for AWS::NetworkFirewall", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "jsii": { + "outdir": "dist", + "projectReferences": true, + "targets": { + "dotnet": { + "namespace": "Amazon.CDK.AWS.NetworkFirewall", + "packageId": "Amazon.CDK.AWS.NetworkFirewall", + "signAssembly": true, + "assemblyOriginatorKeyFile": "../../key.snk", + "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/master/logo/default-256-dark.png" + }, + "java": { + "package": "software.amazon.awscdk.services.networkfirewall", + "maven": { + "groupId": "software.amazon.awscdk", + "artifactId": "networkfirewall" + } + }, + "python": { + "classifiers": [ + "Framework :: AWS CDK", + "Framework :: AWS CDK :: 1" + ], + "distName": "aws-cdk.aws-networkfirewall", + "module": "aws_cdk.aws_networkfirewall" + } + } + }, + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk.git", + "directory": "packages/@aws-cdk/aws-networkfirewall" + }, + "homepage": "https://github.com/aws/aws-cdk", + "scripts": { + "build": "cdk-build", + "watch": "cdk-watch", + "lint": "cdk-lint", + "test": "cdk-test", + "integ": "cdk-integ", + "pkglint": "pkglint -f", + "package": "cdk-package", + "awslint": "cdk-awslint", + "cfn2ts": "cfn2ts", + "build+test+package": "npm run build+test && npm run package", + "build+test": "npm run build && npm test", + "compat": "cdk-compat", + "gen": "cfn2ts" + }, + "cdk-build": { + "cloudformation": "AWS::NetworkFirewall", + "jest": true, + "env": { + "AWSLINT_BASE_CONSTRUCT": "true" + } + }, + "keywords": [ + "aws", + "cdk", + "constructs", + "AWS::NetworkFirewall", + "aws-networkfirewall" + ], + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "license": "Apache-2.0", + "devDependencies": { + "@aws-cdk/assert": "0.0.0", + "cdk-build-tools": "0.0.0", + "cfn2ts": "0.0.0", + "pkglint": "0.0.0" + }, + "dependencies": { + "@aws-cdk/core": "0.0.0" + }, + "peerDependencies": { + "@aws-cdk/core": "0.0.0" + }, + "engines": { + "node": ">= 10.13.0 <13 || >=13.7.0" + }, + "stability": "experimental", + "maturity": "cfn-only", + "awscdkio": { + "announce": false + } +} diff --git a/packages/@aws-cdk/aws-networkfirewall/test/networkfirewall.test.ts b/packages/@aws-cdk/aws-networkfirewall/test/networkfirewall.test.ts new file mode 100644 index 0000000000000..e394ef336bfb4 --- /dev/null +++ b/packages/@aws-cdk/aws-networkfirewall/test/networkfirewall.test.ts @@ -0,0 +1,6 @@ +import '@aws-cdk/assert/jest'; +import {} from '../lib'; + +test('No tests are specified for this package', () => { + expect(true).toBe(true); +}); diff --git a/packages/@aws-cdk/aws-signer/.eslintrc.js b/packages/@aws-cdk/aws-signer/.eslintrc.js new file mode 100644 index 0000000000000..61dd8dd001f63 --- /dev/null +++ b/packages/@aws-cdk/aws-signer/.eslintrc.js @@ -0,0 +1,3 @@ +const baseConfig = require('cdk-build-tools/config/eslintrc'); +baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-signer/.gitignore b/packages/@aws-cdk/aws-signer/.gitignore new file mode 100644 index 0000000000000..62ebc95d75ce6 --- /dev/null +++ b/packages/@aws-cdk/aws-signer/.gitignore @@ -0,0 +1,19 @@ +*.js +*.js.map +*.d.ts +tsconfig.json +node_modules +*.generated.ts +dist +.jsii + +.LAST_BUILD +.nyc_output +coverage +.nycrc +.LAST_PACKAGE +*.snk +nyc.config.js +!.eslintrc.js +!jest.config.js +junit.xml diff --git a/packages/@aws-cdk/aws-signer/.npmignore b/packages/@aws-cdk/aws-signer/.npmignore new file mode 100644 index 0000000000000..e4486030fcb17 --- /dev/null +++ b/packages/@aws-cdk/aws-signer/.npmignore @@ -0,0 +1,28 @@ +# Don't include original .ts files when doing `npm pack` +*.ts +!*.d.ts +coverage +.nyc_output +*.tgz + +dist +.LAST_PACKAGE +.LAST_BUILD +!*.js + +# Include .jsii +!.jsii + +*.snk + +*.tsbuildinfo + +tsconfig.json + +.eslintrc.js +jest.config.js + +# exclude cdk artifacts +**/cdk.out +junit.xml +test/ diff --git a/packages/@aws-cdk/aws-signer/LICENSE b/packages/@aws-cdk/aws-signer/LICENSE new file mode 100644 index 0000000000000..b71ec1688783a --- /dev/null +++ b/packages/@aws-cdk/aws-signer/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/@aws-cdk/aws-signer/NOTICE b/packages/@aws-cdk/aws-signer/NOTICE new file mode 100644 index 0000000000000..bfccac9a7f69c --- /dev/null +++ b/packages/@aws-cdk/aws-signer/NOTICE @@ -0,0 +1,2 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-signer/README.md b/packages/@aws-cdk/aws-signer/README.md new file mode 100644 index 0000000000000..8bdebf06d67dd --- /dev/null +++ b/packages/@aws-cdk/aws-signer/README.md @@ -0,0 +1,16 @@ +## AWS::Signer Construct Library + +--- + +![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) + +> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. + +--- + + +This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. + +```ts +import signer = require('@aws-cdk/aws-signer'); +``` diff --git a/packages/@aws-cdk/aws-signer/jest.config.js b/packages/@aws-cdk/aws-signer/jest.config.js new file mode 100644 index 0000000000000..54e28beb9798b --- /dev/null +++ b/packages/@aws-cdk/aws-signer/jest.config.js @@ -0,0 +1,2 @@ +const baseConfig = require('cdk-build-tools/config/jest.config'); +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-signer/lib/index.ts b/packages/@aws-cdk/aws-signer/lib/index.ts new file mode 100644 index 0000000000000..9c56379e86c19 --- /dev/null +++ b/packages/@aws-cdk/aws-signer/lib/index.ts @@ -0,0 +1,2 @@ +// AWS::Signer CloudFormation Resources: +export * from './signer.generated'; diff --git a/packages/@aws-cdk/aws-signer/package.json b/packages/@aws-cdk/aws-signer/package.json new file mode 100644 index 0000000000000..342cf0a26d796 --- /dev/null +++ b/packages/@aws-cdk/aws-signer/package.json @@ -0,0 +1,96 @@ +{ + "name": "@aws-cdk/aws-signer", + "version": "0.0.0", + "description": "The CDK Construct Library for AWS::Signer", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "jsii": { + "outdir": "dist", + "projectReferences": true, + "targets": { + "dotnet": { + "namespace": "Amazon.CDK.AWS.Signer", + "packageId": "Amazon.CDK.AWS.Signer", + "signAssembly": true, + "assemblyOriginatorKeyFile": "../../key.snk", + "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/master/logo/default-256-dark.png" + }, + "java": { + "package": "software.amazon.awscdk.services.signer", + "maven": { + "groupId": "software.amazon.awscdk", + "artifactId": "signer" + } + }, + "python": { + "classifiers": [ + "Framework :: AWS CDK", + "Framework :: AWS CDK :: 1" + ], + "distName": "aws-cdk.aws-signer", + "module": "aws_cdk.aws_signer" + } + } + }, + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk.git", + "directory": "packages/@aws-cdk/aws-signer" + }, + "homepage": "https://github.com/aws/aws-cdk", + "scripts": { + "build": "cdk-build", + "watch": "cdk-watch", + "lint": "cdk-lint", + "test": "cdk-test", + "integ": "cdk-integ", + "pkglint": "pkglint -f", + "package": "cdk-package", + "awslint": "cdk-awslint", + "cfn2ts": "cfn2ts", + "build+test+package": "npm run build+test && npm run package", + "build+test": "npm run build && npm test", + "compat": "cdk-compat", + "gen": "cfn2ts" + }, + "cdk-build": { + "cloudformation": "AWS::Signer", + "jest": true, + "env": { + "AWSLINT_BASE_CONSTRUCT": "true" + } + }, + "keywords": [ + "aws", + "cdk", + "constructs", + "AWS::Signer", + "aws-signer" + ], + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "license": "Apache-2.0", + "devDependencies": { + "@aws-cdk/assert": "0.0.0", + "cdk-build-tools": "0.0.0", + "cfn2ts": "0.0.0", + "pkglint": "0.0.0" + }, + "dependencies": { + "@aws-cdk/core": "0.0.0" + }, + "peerDependencies": { + "@aws-cdk/core": "0.0.0" + }, + "engines": { + "node": ">= 10.13.0 <13 || >=13.7.0" + }, + "stability": "experimental", + "maturity": "cfn-only", + "awscdkio": { + "announce": false + } +} diff --git a/packages/@aws-cdk/aws-signer/test/signer.test.ts b/packages/@aws-cdk/aws-signer/test/signer.test.ts new file mode 100644 index 0000000000000..e394ef336bfb4 --- /dev/null +++ b/packages/@aws-cdk/aws-signer/test/signer.test.ts @@ -0,0 +1,6 @@ +import '@aws-cdk/assert/jest'; +import {} from '../lib'; + +test('No tests are specified for this package', () => { + expect(true).toBe(true); +}); diff --git a/packages/@aws-cdk/cfnspec/CHANGELOG.md b/packages/@aws-cdk/cfnspec/CHANGELOG.md index 217f5b27025d8..b380dcc6a20c0 100644 --- a/packages/@aws-cdk/cfnspec/CHANGELOG.md +++ b/packages/@aws-cdk/cfnspec/CHANGELOG.md @@ -1,3 +1,91 @@ +# CloudFormation Resource Specification v21.0.0 + +## New Resource Types + +* AWS::CloudFront::KeyGroup +* AWS::CloudFront::PublicKey +* AWS::Glue::Registry +* AWS::Glue::Schema +* AWS::Glue::SchemaVersion +* AWS::Glue::SchemaVersionMetadata +* AWS::IoT::TopicRuleDestination +* AWS::Lambda::CodeSigningConfig +* AWS::NetworkFirewall::Firewall +* AWS::NetworkFirewall::FirewallPolicy +* AWS::NetworkFirewall::LoggingConfiguration +* AWS::NetworkFirewall::RuleGroup +* AWS::S3::StorageLens +* AWS::Signer::ProfilePermission +* AWS::Signer::SigningProfile + +## Attribute Changes + +* AWS::SageMaker::MonitoringSchedule CreationTime (__added__) +* AWS::SageMaker::MonitoringSchedule LastModifiedTime (__added__) + +## Property Changes + +* AWS::Amplify::App CustomHeaders (__added__) +* AWS::DataBrew::Recipe ProjectName (__deleted__) +* AWS::DataBrew::Recipe Version (__deleted__) +* AWS::Events::EventBusPolicy Statement (__added__) +* AWS::Events::EventBusPolicy Action.Required (__changed__) + * Old: true + * New: false +* AWS::Events::EventBusPolicy Principal.Required (__changed__) + * Old: true + * New: false +* AWS::Glue::MLTransform TransformEncryption (__added__) +* AWS::KMS::Key KeySpec (__added__) +* AWS::Lambda::Function CodeSigningConfigArn (__added__) +* AWS::SageMaker::MonitoringSchedule CreationTime (__deleted__) +* AWS::SageMaker::MonitoringSchedule LastModifiedTime (__deleted__) + +## Property Type Changes + +* AWS::Batch::ComputeEnvironment.Ec2ConfigurationObject (__added__) +* AWS::DLM::LifecyclePolicy.Action (__added__) +* AWS::DLM::LifecyclePolicy.CrossRegionCopyAction (__added__) +* AWS::DLM::LifecyclePolicy.EncryptionConfiguration (__added__) +* AWS::DLM::LifecyclePolicy.EventParameters (__added__) +* AWS::DLM::LifecyclePolicy.EventSource (__added__) +* AWS::DLM::LifecyclePolicy.ShareRule (__added__) +* AWS::EC2::LaunchTemplate.EnclaveOptions (__added__) +* AWS::Glue::Database.DataLakePrincipal (__added__) +* AWS::Glue::Database.DatabaseIdentifier (__added__) +* AWS::Glue::Database.PrincipalPrivileges (__added__) +* AWS::Glue::MLTransform.MLUserDataEncryption (__added__) +* AWS::Glue::MLTransform.TransformEncryption (__added__) +* AWS::Glue::Table.TableIdentifier (__added__) +* AWS::SageMaker::Model.MultiModelConfig (__added__) +* AWS::Batch::ComputeEnvironment.ComputeResources Ec2Configuration (__added__) +* AWS::CloudFront::Distribution.CacheBehavior TrustedKeyGroups (__added__) +* AWS::CloudFront::Distribution.DefaultCacheBehavior TrustedKeyGroups (__added__) +* AWS::DLM::LifecyclePolicy.PolicyDetails Actions (__added__) +* AWS::DLM::LifecyclePolicy.PolicyDetails EventSource (__added__) +* AWS::DLM::LifecyclePolicy.PolicyDetails ResourceTypes.Required (__changed__) + * Old: true + * New: false +* AWS::DLM::LifecyclePolicy.PolicyDetails Schedules.Required (__changed__) + * Old: true + * New: false +* AWS::DLM::LifecyclePolicy.PolicyDetails TargetTags.Required (__changed__) + * Old: true + * New: false +* AWS::DLM::LifecyclePolicy.Schedule ShareRules (__added__) +* AWS::DataBrew::Recipe.RecipeStep Action.PrimitiveType (__deleted__) +* AWS::EC2::LaunchTemplate.LaunchTemplateData EnclaveOptions (__added__) +* AWS::Glue::Connection.ConnectionInput ConnectionProperties.Required (__changed__) + * Old: true + * New: false +* AWS::Glue::Crawler.S3Target ConnectionName (__added__) +* AWS::Glue::Database.DatabaseInput CreateTableDefaultPermissions (__added__) +* AWS::Glue::Database.DatabaseInput TargetDatabase (__added__) +* AWS::Glue::Table.TableInput TargetTable (__added__) +* AWS::SageMaker::Model.ContainerDefinition MultiModelConfig (__added__) +* AWS::Synthetics::Canary.RunConfig EnvironmentVariables (__added__) + + # CloudFormation Resource Specification v20.3.0 ## New Resource Types diff --git a/packages/@aws-cdk/cfnspec/cfn.version b/packages/@aws-cdk/cfnspec/cfn.version index 4adfbc353177e..fb5b513039eb7 100644 --- a/packages/@aws-cdk/cfnspec/cfn.version +++ b/packages/@aws-cdk/cfnspec/cfn.version @@ -1 +1 @@ -20.3.0 +21.0.0 diff --git a/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json b/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json index 0d142fe207d30..78b9780cb62c8 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json +++ b/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json @@ -7273,6 +7273,13 @@ "Required": false, "UpdateType": "Mutable" }, + "Ec2Configuration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-ec2configuration", + "ItemType": "Ec2ConfigurationObject", + "Required": false, + "Type": "List", + "UpdateType": "Immutable" + }, "Ec2KeyPair": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-ec2keypair", "PrimitiveType": "String", @@ -7356,6 +7363,23 @@ } } }, + "AWS::Batch::ComputeEnvironment.Ec2ConfigurationObject": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-ec2configurationobject.html", + "Properties": { + "ImageIdOverride": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-ec2configurationobject.html#cfn-batch-computeenvironment-ec2configurationobject-imageidoverride", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "ImageType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-ec2configurationobject.html#cfn-batch-computeenvironment-ec2configurationobject-imagetype", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, "AWS::Batch::ComputeEnvironment.LaunchTemplateSpecification": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-launchtemplatespecification.html", "Properties": { @@ -8543,6 +8567,13 @@ "Required": true, "UpdateType": "Mutable" }, + "TrustedKeyGroups": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-cachebehavior.html#cfn-cloudfront-distribution-cachebehavior-trustedkeygroups", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, "TrustedSigners": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-cachebehavior.html#cfn-cloudfront-distribution-cachebehavior-trustedsigners", "PrimitiveItemType": "String", @@ -8737,6 +8768,13 @@ "Required": true, "UpdateType": "Mutable" }, + "TrustedKeyGroups": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-defaultcachebehavior.html#cfn-cloudfront-distribution-defaultcachebehavior-trustedkeygroups", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, "TrustedSigners": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-defaultcachebehavior.html#cfn-cloudfront-distribution-defaultcachebehavior-trustedsigners", "PrimitiveItemType": "String", @@ -9202,6 +9240,31 @@ } } }, + "AWS::CloudFront::KeyGroup.KeyGroupConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-keygroup-keygroupconfig.html", + "Properties": { + "Comment": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-keygroup-keygroupconfig.html#cfn-cloudfront-keygroup-keygroupconfig-comment", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Items": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-keygroup-keygroupconfig.html#cfn-cloudfront-keygroup-keygroupconfig-items", + "DuplicatesAllowed": true, + "PrimitiveItemType": "String", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-keygroup-keygroupconfig.html#cfn-cloudfront-keygroup-keygroupconfig-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::CloudFront::OriginRequestPolicy.CookiesConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-originrequestpolicy-cookiesconfig.html", "Properties": { @@ -9294,6 +9357,35 @@ } } }, + "AWS::CloudFront::PublicKey.PublicKeyConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-publickey-publickeyconfig.html", + "Properties": { + "CallerReference": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-publickey-publickeyconfig.html#cfn-cloudfront-publickey-publickeyconfig-callerreference", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Comment": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-publickey-publickeyconfig.html#cfn-cloudfront-publickey-publickeyconfig-comment", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "EncodedKey": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-publickey-publickeyconfig.html#cfn-cloudfront-publickey-publickeyconfig-encodedkey", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-publickey-publickeyconfig.html#cfn-cloudfront-publickey-publickeyconfig-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::CloudFront::RealtimeLogConfig.EndPoint": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-realtimelogconfig-endpoint.html", "Properties": { @@ -12294,6 +12386,24 @@ } } }, + "AWS::DLM::LifecyclePolicy.Action": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-action.html", + "Properties": { + "CrossRegionCopy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-action.html#cfn-dlm-lifecyclepolicy-action-crossregioncopy", + "ItemType": "CrossRegionCopyAction", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-action.html#cfn-dlm-lifecyclepolicy-action-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::DLM::LifecyclePolicy.CreateRule": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-createrule.html", "Properties": { @@ -12324,6 +12434,29 @@ } } }, + "AWS::DLM::LifecyclePolicy.CrossRegionCopyAction": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopyaction.html", + "Properties": { + "EncryptionConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopyaction.html#cfn-dlm-lifecyclepolicy-crossregioncopyaction-encryptionconfiguration", + "Required": true, + "Type": "EncryptionConfiguration", + "UpdateType": "Mutable" + }, + "RetainRule": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopyaction.html#cfn-dlm-lifecyclepolicy-crossregioncopyaction-retainrule", + "Required": false, + "Type": "CrossRegionCopyRetainRule", + "UpdateType": "Mutable" + }, + "Target": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopyaction.html#cfn-dlm-lifecyclepolicy-crossregioncopyaction-target", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::DLM::LifecyclePolicy.CrossRegionCopyRetainRule": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopyretainrule.html", "Properties": { @@ -12376,6 +12509,64 @@ } } }, + "AWS::DLM::LifecyclePolicy.EncryptionConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-encryptionconfiguration.html", + "Properties": { + "CmkArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-encryptionconfiguration.html#cfn-dlm-lifecyclepolicy-encryptionconfiguration-cmkarn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Encrypted": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-encryptionconfiguration.html#cfn-dlm-lifecyclepolicy-encryptionconfiguration-encrypted", + "PrimitiveType": "Boolean", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::DLM::LifecyclePolicy.EventParameters": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-eventparameters.html", + "Properties": { + "DescriptionRegex": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-eventparameters.html#cfn-dlm-lifecyclepolicy-eventparameters-descriptionregex", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "EventType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-eventparameters.html#cfn-dlm-lifecyclepolicy-eventparameters-eventtype", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "SnapshotOwner": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-eventparameters.html#cfn-dlm-lifecyclepolicy-eventparameters-snapshotowner", + "PrimitiveItemType": "String", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::DLM::LifecyclePolicy.EventSource": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-eventsource.html", + "Properties": { + "Parameters": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-eventsource.html#cfn-dlm-lifecyclepolicy-eventsource-parameters", + "Required": false, + "Type": "EventParameters", + "UpdateType": "Mutable" + }, + "Type": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-eventsource.html#cfn-dlm-lifecyclepolicy-eventsource-type", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::DLM::LifecyclePolicy.FastRestoreRule": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-fastrestorerule.html", "Properties": { @@ -12426,6 +12617,19 @@ "AWS::DLM::LifecyclePolicy.PolicyDetails": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-policydetails.html", "Properties": { + "Actions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-policydetails.html#cfn-dlm-lifecyclepolicy-policydetails-actions", + "ItemType": "Action", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "EventSource": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-policydetails.html#cfn-dlm-lifecyclepolicy-policydetails-eventsource", + "Required": false, + "Type": "EventSource", + "UpdateType": "Mutable" + }, "Parameters": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-policydetails.html#cfn-dlm-lifecyclepolicy-policydetails-parameters", "Required": false, @@ -12441,21 +12645,21 @@ "ResourceTypes": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-policydetails.html#cfn-dlm-lifecyclepolicy-policydetails-resourcetypes", "PrimitiveItemType": "String", - "Required": true, + "Required": false, "Type": "List", "UpdateType": "Mutable" }, "Schedules": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-policydetails.html#cfn-dlm-lifecyclepolicy-policydetails-schedules", "ItemType": "Schedule", - "Required": true, + "Required": false, "Type": "List", "UpdateType": "Mutable" }, "TargetTags": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-policydetails.html#cfn-dlm-lifecyclepolicy-policydetails-targettags", "ItemType": "Tag", - "Required": true, + "Required": false, "Type": "List", "UpdateType": "Mutable" } @@ -12524,6 +12728,13 @@ "Type": "RetainRule", "UpdateType": "Mutable" }, + "ShareRules": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-schedule.html#cfn-dlm-lifecyclepolicy-schedule-sharerules", + "ItemType": "ShareRule", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, "TagsToAdd": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-schedule.html#cfn-dlm-lifecyclepolicy-schedule-tagstoadd", "ItemType": "Tag", @@ -12540,6 +12751,30 @@ } } }, + "AWS::DLM::LifecyclePolicy.ShareRule": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-sharerule.html", + "Properties": { + "TargetAccounts": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-sharerule.html#cfn-dlm-lifecyclepolicy-sharerule-targetaccounts", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "UnshareInterval": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-sharerule.html#cfn-dlm-lifecyclepolicy-sharerule-unshareinterval", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "UnshareIntervalUnit": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-sharerule.html#cfn-dlm-lifecyclepolicy-sharerule-unshareintervalunit", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::DMS::Endpoint.DynamoDbSettings": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dms-endpoint-dynamodbsettings.html", "Properties": { @@ -13527,7 +13762,6 @@ "Properties": { "Action": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipestep.html#cfn-databrew-recipe-recipestep-action", - "PrimitiveType": "Json", "Required": true, "Type": "Action", "UpdateType": "Mutable" @@ -14859,6 +15093,17 @@ } } }, + "AWS::EC2::LaunchTemplate.EnclaveOptions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-launchtemplatedata-enclaveoptions.html", + "Properties": { + "Enabled": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-launchtemplatedata-enclaveoptions.html#cfn-ec2-launchtemplate-launchtemplatedata-enclaveoptions-enabled", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::EC2::LaunchTemplate.HibernationOptions": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-launchtemplatedata-hibernationoptions.html", "Properties": { @@ -14969,6 +15214,12 @@ "Type": "List", "UpdateType": "Mutable" }, + "EnclaveOptions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-launchtemplatedata.html#cfn-ec2-launchtemplate-launchtemplatedata-enclaveoptions", + "Required": false, + "Type": "EnclaveOptions", + "UpdateType": "Mutable" + }, "HibernationOptions": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-launchtemplatedata.html#cfn-ec2-launchtemplate-launchtemplatedata-hibernationoptions", "Required": false, @@ -21875,7 +22126,7 @@ "ConnectionProperties": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-connection-connectioninput.html#cfn-glue-connection-connectioninput-connectionproperties", "PrimitiveType": "Json", - "Required": true, + "Required": false, "UpdateType": "Mutable" }, "ConnectionType": { @@ -21991,6 +22242,12 @@ "AWS::Glue::Crawler.S3Target": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-s3target.html", "Properties": { + "ConnectionName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-s3target.html#cfn-glue-crawler-s3target-connectionname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "Exclusions": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-s3target.html#cfn-glue-crawler-s3target-exclusions", "PrimitiveItemType": "String", @@ -22118,9 +22375,44 @@ } } }, + "AWS::Glue::Database.DataLakePrincipal": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-datalakeprincipal.html", + "Properties": { + "DataLakePrincipalIdentifier": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-datalakeprincipal.html#cfn-glue-database-datalakeprincipal-datalakeprincipalidentifier", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::Glue::Database.DatabaseIdentifier": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseidentifier.html", + "Properties": { + "CatalogId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseidentifier.html#cfn-glue-database-databaseidentifier-catalogid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "DatabaseName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseidentifier.html#cfn-glue-database-databaseidentifier-databasename", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::Glue::Database.DatabaseInput": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html", "Properties": { + "CreateTableDefaultPermissions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html#cfn-glue-database-databaseinput-createtabledefaultpermissions", + "ItemType": "PrincipalPrivileges", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, "Description": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html#cfn-glue-database-databaseinput-description", "PrimitiveType": "String", @@ -22144,6 +22436,30 @@ "PrimitiveType": "Json", "Required": false, "UpdateType": "Mutable" + }, + "TargetDatabase": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html#cfn-glue-database-databaseinput-targetdatabase", + "Required": false, + "Type": "DatabaseIdentifier", + "UpdateType": "Mutable" + } + } + }, + "AWS::Glue::Database.PrincipalPrivileges": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-principalprivileges.html", + "Properties": { + "Permissions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-principalprivileges.html#cfn-glue-database-principalprivileges-permissions", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Principal": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-principalprivileges.html#cfn-glue-database-principalprivileges-principal", + "Required": false, + "Type": "DataLakePrincipal", + "UpdateType": "Mutable" } } }, @@ -22274,6 +22590,40 @@ } } }, + "AWS::Glue::MLTransform.MLUserDataEncryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-mltransform-transformencryption-mluserdataencryption.html", + "Properties": { + "KmsKeyId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-mltransform-transformencryption-mluserdataencryption.html#cfn-glue-mltransform-transformencryption-mluserdataencryption-kmskeyid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "MLUserDataEncryptionMode": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-mltransform-transformencryption-mluserdataencryption.html#cfn-glue-mltransform-transformencryption-mluserdataencryption-mluserdataencryptionmode", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::Glue::MLTransform.TransformEncryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-mltransform-transformencryption.html", + "Properties": { + "MLUserDataEncryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-mltransform-transformencryption.html#cfn-glue-mltransform-transformencryption-mluserdataencryption", + "Required": false, + "Type": "MLUserDataEncryption", + "UpdateType": "Mutable" + }, + "TaskRunSecurityConfigurationName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-mltransform-transformencryption.html#cfn-glue-mltransform-transformencryption-taskrunsecurityconfigurationname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::Glue::MLTransform.TransformParameters": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-mltransform-transformparameters.html", "Properties": { @@ -22483,6 +22833,63 @@ } } }, + "AWS::Glue::Schema.Registry": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-schema-registry.html", + "Properties": { + "Arn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-schema-registry.html#cfn-glue-schema-registry-arn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-schema-registry.html#cfn-glue-schema-registry-name", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + } + } + }, + "AWS::Glue::Schema.SchemaVersion": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-schema-schemaversion.html", + "Properties": { + "IsLatest": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-schema-schemaversion.html#cfn-glue-schema-schemaversion-islatest", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "VersionNumber": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-schema-schemaversion.html#cfn-glue-schema-schemaversion-versionnumber", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::Glue::SchemaVersion.Schema": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-schemaversion-schema.html", + "Properties": { + "RegistryName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-schemaversion-schema.html#cfn-glue-schemaversion-schema-registryname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "SchemaArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-schemaversion-schema.html#cfn-glue-schemaversion-schema-schemaarn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "SchemaName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-schemaversion-schema.html#cfn-glue-schemaversion-schema-schemaname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + } + } + }, "AWS::Glue::SecurityConfiguration.CloudWatchEncryption": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-securityconfiguration-cloudwatchencryption.html", "Properties": { @@ -22732,6 +23139,29 @@ } } }, + "AWS::Glue::Table.TableIdentifier": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableidentifier.html", + "Properties": { + "CatalogId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableidentifier.html#cfn-glue-table-tableidentifier-catalogid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "DatabaseName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableidentifier.html#cfn-glue-table-tableidentifier-databasename", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableidentifier.html#cfn-glue-table-tableidentifier-name", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::Glue::Table.TableInput": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html", "Properties": { @@ -22784,6 +23214,12 @@ "Required": false, "UpdateType": "Mutable" }, + "TargetTable": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-targettable", + "Required": false, + "Type": "TableIdentifier", + "UpdateType": "Mutable" + }, "ViewExpandedText": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-viewexpandedtext", "PrimitiveType": "String", @@ -25284,6 +25720,17 @@ } } }, + "AWS::IoT::TopicRuleDestination.HttpUrlDestinationSummary": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicruledestination-httpurldestinationsummary.html", + "Properties": { + "ConfirmationUrl": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicruledestination-httpurldestinationsummary.html#cfn-iot-topicruledestination-httpurldestinationsummary-confirmationurl", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + } + } + }, "AWS::IoTAnalytics::Channel.ChannelStorage": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-channel-channelstorage.html", "Properties": { @@ -30458,6 +30905,29 @@ } } }, + "AWS::Lambda::CodeSigningConfig.AllowedPublishers": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-codesigningconfig-allowedpublishers.html", + "Properties": { + "SigningProfileVersionArns": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-codesigningconfig-allowedpublishers.html#cfn-lambda-codesigningconfig-allowedpublishers-signingprofileversionarns", + "PrimitiveItemType": "String", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::Lambda::CodeSigningConfig.CodeSigningPolicies": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-codesigningconfig-codesigningpolicies.html", + "Properties": { + "UntrustedArtifactOnDeployment": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-codesigningconfig-codesigningpolicies.html#cfn-lambda-codesigningconfig-codesigningpolicies-untrustedartifactondeployment", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::Lambda::EventInvokeConfig.DestinationConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventinvokeconfig-destinationconfig.html", "Properties": { @@ -36276,6 +36746,821 @@ } } }, + "AWS::NetworkFirewall::Firewall.SubnetMapping": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewall-subnetmapping.html", + "Properties": { + "SubnetId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewall-subnetmapping.html#cfn-networkfirewall-firewall-subnetmapping-subnetid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::Firewall.Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewall-tags.html", + "Properties": { + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewall-tags.html#cfn-networkfirewall-firewall-tags-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::FirewallPolicy.ActionDefinition": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-actiondefinition.html", + "Properties": { + "PublishMetricAction": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-actiondefinition.html#cfn-networkfirewall-firewallpolicy-actiondefinition-publishmetricaction", + "Required": false, + "Type": "PublishMetricAction", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::FirewallPolicy.CustomAction": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-customaction.html", + "Properties": { + "ActionDefinition": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-customaction.html#cfn-networkfirewall-firewallpolicy-customaction-actiondefinition", + "Required": true, + "Type": "ActionDefinition", + "UpdateType": "Mutable" + }, + "ActionName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-customaction.html#cfn-networkfirewall-firewallpolicy-customaction-actionname", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::FirewallPolicy.CustomActions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-customactions.html", + "Properties": { + "CustomActions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-customactions.html#cfn-networkfirewall-firewallpolicy-customactions-customactions", + "DuplicatesAllowed": false, + "ItemType": "CustomAction", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::FirewallPolicy.Dimension": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-dimension.html", + "Properties": { + "Value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-dimension.html#cfn-networkfirewall-firewallpolicy-dimension-value", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::FirewallPolicy.Dimensions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-dimensions.html", + "Properties": { + "Dimensions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-dimensions.html#cfn-networkfirewall-firewallpolicy-dimensions-dimensions", + "DuplicatesAllowed": false, + "ItemType": "Dimension", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::FirewallPolicy.FirewallPolicy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-firewallpolicy.html", + "Properties": { + "StatefulRuleGroupReferences": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-firewallpolicy.html#cfn-networkfirewall-firewallpolicy-firewallpolicy-statefulrulegroupreferences", + "Required": false, + "Type": "StatefulRuleGroupReferences", + "UpdateType": "Mutable" + }, + "StatelessCustomActions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-firewallpolicy.html#cfn-networkfirewall-firewallpolicy-firewallpolicy-statelesscustomactions", + "Required": false, + "Type": "CustomActions", + "UpdateType": "Mutable" + }, + "StatelessDefaultActions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-firewallpolicy.html#cfn-networkfirewall-firewallpolicy-firewallpolicy-statelessdefaultactions", + "Required": true, + "Type": "StatelessActions", + "UpdateType": "Mutable" + }, + "StatelessFragmentDefaultActions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-firewallpolicy.html#cfn-networkfirewall-firewallpolicy-firewallpolicy-statelessfragmentdefaultactions", + "Required": true, + "Type": "StatelessActions", + "UpdateType": "Mutable" + }, + "StatelessRuleGroupReferences": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-firewallpolicy.html#cfn-networkfirewall-firewallpolicy-firewallpolicy-statelessrulegroupreferences", + "Required": false, + "Type": "StatelessRuleGroupReferences", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::FirewallPolicy.PublishMetricAction": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-publishmetricaction.html", + "Properties": { + "Dimensions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-publishmetricaction.html#cfn-networkfirewall-firewallpolicy-publishmetricaction-dimensions", + "Required": true, + "Type": "Dimensions", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::FirewallPolicy.StatefulRuleGroupReference": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-statefulrulegroupreference.html", + "Properties": { + "ResourceArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-statefulrulegroupreference.html#cfn-networkfirewall-firewallpolicy-statefulrulegroupreference-resourcearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::FirewallPolicy.StatefulRuleGroupReferences": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-statefulrulegroupreferences.html", + "Properties": { + "StatefulRuleGroupReferences": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-statefulrulegroupreferences.html#cfn-networkfirewall-firewallpolicy-statefulrulegroupreferences-statefulrulegroupreferences", + "DuplicatesAllowed": false, + "ItemType": "StatefulRuleGroupReference", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::FirewallPolicy.StatelessActions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-statelessactions.html", + "Properties": { + "StatelessActions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-statelessactions.html#cfn-networkfirewall-firewallpolicy-statelessactions-statelessactions", + "DuplicatesAllowed": false, + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::FirewallPolicy.StatelessRuleGroupReference": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-statelessrulegroupreference.html", + "Properties": { + "Priority": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-statelessrulegroupreference.html#cfn-networkfirewall-firewallpolicy-statelessrulegroupreference-priority", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + }, + "ResourceArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-statelessrulegroupreference.html#cfn-networkfirewall-firewallpolicy-statelessrulegroupreference-resourcearn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::FirewallPolicy.StatelessRuleGroupReferences": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-statelessrulegroupreferences.html", + "Properties": { + "StatelessRuleGroupReferences": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-statelessrulegroupreferences.html#cfn-networkfirewall-firewallpolicy-statelessrulegroupreferences-statelessrulegroupreferences", + "DuplicatesAllowed": false, + "ItemType": "StatelessRuleGroupReference", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::FirewallPolicy.Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-tags.html", + "Properties": { + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewallpolicy-tags.html#cfn-networkfirewall-firewallpolicy-tags-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::LoggingConfiguration.LogDestinationConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-loggingconfiguration-logdestinationconfig.html", + "Properties": { + "LogDestination": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-loggingconfiguration-logdestinationconfig.html#cfn-networkfirewall-loggingconfiguration-logdestinationconfig-logdestination", + "PrimitiveItemType": "String", + "Required": true, + "Type": "Map", + "UpdateType": "Mutable" + }, + "LogDestinationType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-loggingconfiguration-logdestinationconfig.html#cfn-networkfirewall-loggingconfiguration-logdestinationconfig-logdestinationtype", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "LogType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-loggingconfiguration-logdestinationconfig.html#cfn-networkfirewall-loggingconfiguration-logdestinationconfig-logtype", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::LoggingConfiguration.LogDestinationConfigs": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-loggingconfiguration-logdestinationconfigs.html", + "Properties": { + "LogDestinationConfigs": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-loggingconfiguration-logdestinationconfigs.html#cfn-networkfirewall-loggingconfiguration-logdestinationconfigs-logdestinationconfigs", + "ItemType": "LogDestinationConfig", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::LoggingConfiguration.LoggingConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-loggingconfiguration-loggingconfiguration.html", + "Properties": { + "LogDestinationConfigs": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-loggingconfiguration-loggingconfiguration.html#cfn-networkfirewall-loggingconfiguration-loggingconfiguration-logdestinationconfigs", + "Required": true, + "Type": "LogDestinationConfigs", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.ActionDefinition": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-actiondefinition.html", + "Properties": { + "PublishMetricAction": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-actiondefinition.html#cfn-networkfirewall-rulegroup-actiondefinition-publishmetricaction", + "Required": false, + "Type": "PublishMetricAction", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.Address": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-address.html", + "Properties": { + "AddressDefinition": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-address.html#cfn-networkfirewall-rulegroup-address-addressdefinition", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.Addresses": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-addresses.html", + "Properties": { + "Addresses": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-addresses.html#cfn-networkfirewall-rulegroup-addresses-addresses", + "DuplicatesAllowed": false, + "ItemType": "Address", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.CustomAction": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-customaction.html", + "Properties": { + "ActionDefinition": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-customaction.html#cfn-networkfirewall-rulegroup-customaction-actiondefinition", + "Required": true, + "Type": "ActionDefinition", + "UpdateType": "Mutable" + }, + "ActionName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-customaction.html#cfn-networkfirewall-rulegroup-customaction-actionname", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.CustomActions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-customactions.html", + "Properties": { + "CustomActions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-customactions.html#cfn-networkfirewall-rulegroup-customactions-customactions", + "DuplicatesAllowed": false, + "ItemType": "CustomAction", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.Dimension": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-dimension.html", + "Properties": { + "Value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-dimension.html#cfn-networkfirewall-rulegroup-dimension-value", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.Dimensions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-dimensions.html", + "Properties": { + "Dimensions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-dimensions.html#cfn-networkfirewall-rulegroup-dimensions-dimensions", + "DuplicatesAllowed": false, + "ItemType": "Dimension", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.Flags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-flags.html", + "Properties": { + "Flags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-flags.html#cfn-networkfirewall-rulegroup-flags-flags", + "DuplicatesAllowed": false, + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.Header": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-header.html", + "Properties": { + "Destination": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-header.html#cfn-networkfirewall-rulegroup-header-destination", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "DestinationPort": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-header.html#cfn-networkfirewall-rulegroup-header-destinationport", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Direction": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-header.html#cfn-networkfirewall-rulegroup-header-direction", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Protocol": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-header.html#cfn-networkfirewall-rulegroup-header-protocol", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Source": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-header.html#cfn-networkfirewall-rulegroup-header-source", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "SourcePort": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-header.html#cfn-networkfirewall-rulegroup-header-sourceport", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.IPSet": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-ipset.html", + "Properties": { + "Definition": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-ipset.html#cfn-networkfirewall-rulegroup-ipset-definition", + "Required": false, + "Type": "VariableDefinitionList", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.MatchAttributes": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-matchattributes.html", + "Properties": { + "DestinationPorts": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-matchattributes.html#cfn-networkfirewall-rulegroup-matchattributes-destinationports", + "Required": false, + "Type": "PortRanges", + "UpdateType": "Mutable" + }, + "Destinations": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-matchattributes.html#cfn-networkfirewall-rulegroup-matchattributes-destinations", + "Required": false, + "Type": "Addresses", + "UpdateType": "Mutable" + }, + "Protocols": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-matchattributes.html#cfn-networkfirewall-rulegroup-matchattributes-protocols", + "Required": false, + "Type": "ProtocolNumbers", + "UpdateType": "Mutable" + }, + "SourcePorts": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-matchattributes.html#cfn-networkfirewall-rulegroup-matchattributes-sourceports", + "Required": false, + "Type": "PortRanges", + "UpdateType": "Mutable" + }, + "Sources": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-matchattributes.html#cfn-networkfirewall-rulegroup-matchattributes-sources", + "Required": false, + "Type": "Addresses", + "UpdateType": "Mutable" + }, + "TCPFlags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-matchattributes.html#cfn-networkfirewall-rulegroup-matchattributes-tcpflags", + "Required": false, + "Type": "TCPFlags", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.PortRange": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-portrange.html", + "Properties": { + "FromPort": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-portrange.html#cfn-networkfirewall-rulegroup-portrange-fromport", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + }, + "ToPort": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-portrange.html#cfn-networkfirewall-rulegroup-portrange-toport", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.PortRanges": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-portranges.html", + "Properties": { + "PortRanges": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-portranges.html#cfn-networkfirewall-rulegroup-portranges-portranges", + "DuplicatesAllowed": false, + "ItemType": "PortRange", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.PortSet": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-portset.html", + "Properties": { + "Definition": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-portset.html#cfn-networkfirewall-rulegroup-portset-definition", + "Required": false, + "Type": "VariableDefinitionList", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.ProtocolNumbers": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-protocolnumbers.html", + "Properties": { + "ProtocolNumbers": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-protocolnumbers.html#cfn-networkfirewall-rulegroup-protocolnumbers-protocolnumbers", + "DuplicatesAllowed": false, + "PrimitiveItemType": "Integer", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.PublishMetricAction": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-publishmetricaction.html", + "Properties": { + "Dimensions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-publishmetricaction.html#cfn-networkfirewall-rulegroup-publishmetricaction-dimensions", + "Required": true, + "Type": "Dimensions", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.RuleDefinition": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-ruledefinition.html", + "Properties": { + "Actions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-ruledefinition.html#cfn-networkfirewall-rulegroup-ruledefinition-actions", + "DuplicatesAllowed": false, + "PrimitiveItemType": "String", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + }, + "MatchAttributes": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-ruledefinition.html#cfn-networkfirewall-rulegroup-ruledefinition-matchattributes", + "Required": true, + "Type": "MatchAttributes", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.RuleGroup": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-rulegroup.html", + "Properties": { + "RuleVariables": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-rulegroup.html#cfn-networkfirewall-rulegroup-rulegroup-rulevariables", + "Required": false, + "Type": "RuleVariables", + "UpdateType": "Mutable" + }, + "RulesSource": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-rulegroup.html#cfn-networkfirewall-rulegroup-rulegroup-rulessource", + "Required": true, + "Type": "RulesSource", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.RuleOption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-ruleoption.html", + "Properties": { + "Keyword": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-ruleoption.html#cfn-networkfirewall-rulegroup-ruleoption-keyword", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Settings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-ruleoption.html#cfn-networkfirewall-rulegroup-ruleoption-settings", + "DuplicatesAllowed": false, + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.RuleOptions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-ruleoptions.html", + "Properties": { + "RuleOptions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-ruleoptions.html#cfn-networkfirewall-rulegroup-ruleoptions-ruleoptions", + "DuplicatesAllowed": false, + "ItemType": "RuleOption", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.RuleVariables": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-rulevariables.html", + "Properties": { + "IPSets": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-rulevariables.html#cfn-networkfirewall-rulegroup-rulevariables-ipsets", + "ItemType": "IPSet", + "Required": false, + "Type": "Map", + "UpdateType": "Mutable" + }, + "PortSets": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-rulevariables.html#cfn-networkfirewall-rulegroup-rulevariables-portsets", + "ItemType": "PortSet", + "Required": false, + "Type": "Map", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.RulesSource": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-rulessource.html", + "Properties": { + "RulesSourceList": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-rulessource.html#cfn-networkfirewall-rulegroup-rulessource-rulessourcelist", + "Required": false, + "Type": "RulesSourceList", + "UpdateType": "Mutable" + }, + "RulesString": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-rulessource.html#cfn-networkfirewall-rulegroup-rulessource-rulesstring", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "StatefulRules": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-rulessource.html#cfn-networkfirewall-rulegroup-rulessource-statefulrules", + "Required": false, + "Type": "StatefulRules", + "UpdateType": "Mutable" + }, + "StatelessRulesAndCustomActions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-rulessource.html#cfn-networkfirewall-rulegroup-rulessource-statelessrulesandcustomactions", + "Required": false, + "Type": "StatelessRulesAndCustomActions", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.RulesSourceList": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-rulessourcelist.html", + "Properties": { + "GeneratedRulesType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-rulessourcelist.html#cfn-networkfirewall-rulegroup-rulessourcelist-generatedrulestype", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "TargetTypes": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-rulessourcelist.html#cfn-networkfirewall-rulegroup-rulessourcelist-targettypes", + "Required": true, + "Type": "TargetTypes", + "UpdateType": "Mutable" + }, + "Targets": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-rulessourcelist.html#cfn-networkfirewall-rulegroup-rulessourcelist-targets", + "DuplicatesAllowed": false, + "PrimitiveItemType": "String", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.StatefulRule": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-statefulrule.html", + "Properties": { + "Action": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-statefulrule.html#cfn-networkfirewall-rulegroup-statefulrule-action", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Header": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-statefulrule.html#cfn-networkfirewall-rulegroup-statefulrule-header", + "Required": true, + "Type": "Header", + "UpdateType": "Mutable" + }, + "RuleOptions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-statefulrule.html#cfn-networkfirewall-rulegroup-statefulrule-ruleoptions", + "Required": true, + "Type": "RuleOptions", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.StatefulRules": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-statefulrules.html", + "Properties": { + "StatefulRules": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-statefulrules.html#cfn-networkfirewall-rulegroup-statefulrules-statefulrules", + "DuplicatesAllowed": false, + "ItemType": "StatefulRule", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.StatelessRule": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-statelessrule.html", + "Properties": { + "Priority": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-statelessrule.html#cfn-networkfirewall-rulegroup-statelessrule-priority", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + }, + "RuleDefinition": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-statelessrule.html#cfn-networkfirewall-rulegroup-statelessrule-ruledefinition", + "Required": true, + "Type": "RuleDefinition", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.StatelessRules": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-statelessrules.html", + "Properties": { + "StatelessRules": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-statelessrules.html#cfn-networkfirewall-rulegroup-statelessrules-statelessrules", + "DuplicatesAllowed": false, + "ItemType": "StatelessRule", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.StatelessRulesAndCustomActions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-statelessrulesandcustomactions.html", + "Properties": { + "CustomActions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-statelessrulesandcustomactions.html#cfn-networkfirewall-rulegroup-statelessrulesandcustomactions-customactions", + "Required": false, + "Type": "CustomActions", + "UpdateType": "Mutable" + }, + "StatelessRules": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-statelessrulesandcustomactions.html#cfn-networkfirewall-rulegroup-statelessrulesandcustomactions-statelessrules", + "Required": true, + "Type": "StatelessRules", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.TCPFlagField": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-tcpflagfield.html", + "Properties": { + "Flags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-tcpflagfield.html#cfn-networkfirewall-rulegroup-tcpflagfield-flags", + "Required": true, + "Type": "Flags", + "UpdateType": "Mutable" + }, + "Masks": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-tcpflagfield.html#cfn-networkfirewall-rulegroup-tcpflagfield-masks", + "Required": false, + "Type": "Flags", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.TCPFlags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-tcpflags.html", + "Properties": { + "TCPFlags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-tcpflags.html#cfn-networkfirewall-rulegroup-tcpflags-tcpflags", + "DuplicatesAllowed": false, + "ItemType": "TCPFlagField", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-tags.html", + "Properties": { + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-tags.html#cfn-networkfirewall-rulegroup-tags-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.TargetTypes": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-targettypes.html", + "Properties": { + "TargetTypes": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-targettypes.html#cfn-networkfirewall-rulegroup-targettypes-targettypes", + "DuplicatesAllowed": false, + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup.VariableDefinitionList": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-variabledefinitionlist.html", + "Properties": { + "VariableDefinitionList": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-variabledefinitionlist.html#cfn-networkfirewall-rulegroup-variabledefinitionlist-variabledefinitionlist", + "DuplicatesAllowed": false, + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, "AWS::NetworkManager::Device.Location": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkmanager-device-location.html", "Properties": { @@ -39966,6 +41251,242 @@ } } }, + "AWS::S3::StorageLens.AccountLevel": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-accountlevel.html", + "Properties": { + "ActivityMetrics": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-accountlevel.html#cfn-s3-storagelens-accountlevel-activitymetrics", + "Required": false, + "Type": "ActivityMetrics", + "UpdateType": "Mutable" + }, + "BucketLevel": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-accountlevel.html#cfn-s3-storagelens-accountlevel-bucketlevel", + "Required": true, + "Type": "BucketLevel", + "UpdateType": "Mutable" + } + } + }, + "AWS::S3::StorageLens.ActivityMetrics": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-activitymetrics.html", + "Properties": { + "IsEnabled": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-activitymetrics.html#cfn-s3-storagelens-activitymetrics-isenabled", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::S3::StorageLens.AwsOrg": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-awsorg.html", + "Properties": { + "Arn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-awsorg.html#cfn-s3-storagelens-awsorg-arn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::S3::StorageLens.BucketLevel": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-bucketlevel.html", + "Properties": { + "ActivityMetrics": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-bucketlevel.html#cfn-s3-storagelens-bucketlevel-activitymetrics", + "Required": false, + "Type": "ActivityMetrics", + "UpdateType": "Mutable" + }, + "PrefixLevel": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-bucketlevel.html#cfn-s3-storagelens-bucketlevel-prefixlevel", + "Required": false, + "Type": "PrefixLevel", + "UpdateType": "Mutable" + } + } + }, + "AWS::S3::StorageLens.BucketsAndRegions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-bucketsandregions.html", + "Properties": { + "Buckets": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-bucketsandregions.html#cfn-s3-storagelens-bucketsandregions-buckets", + "DuplicatesAllowed": false, + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Regions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-bucketsandregions.html#cfn-s3-storagelens-bucketsandregions-regions", + "DuplicatesAllowed": false, + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::S3::StorageLens.DataExport": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-dataexport.html", + "Properties": { + "S3BucketDestination": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-dataexport.html#cfn-s3-storagelens-dataexport-s3bucketdestination", + "Required": true, + "Type": "S3BucketDestination", + "UpdateType": "Mutable" + } + } + }, + "AWS::S3::StorageLens.Encryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-encryption.html" + }, + "AWS::S3::StorageLens.PrefixLevel": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-prefixlevel.html", + "Properties": { + "StorageMetrics": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-prefixlevel.html#cfn-s3-storagelens-prefixlevel-storagemetrics", + "Required": true, + "Type": "PrefixLevelStorageMetrics", + "UpdateType": "Mutable" + } + } + }, + "AWS::S3::StorageLens.PrefixLevelStorageMetrics": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-prefixlevelstoragemetrics.html", + "Properties": { + "IsEnabled": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-prefixlevelstoragemetrics.html#cfn-s3-storagelens-prefixlevelstoragemetrics-isenabled", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "SelectionCriteria": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-prefixlevelstoragemetrics.html#cfn-s3-storagelens-prefixlevelstoragemetrics-selectioncriteria", + "Required": false, + "Type": "SelectionCriteria", + "UpdateType": "Mutable" + } + } + }, + "AWS::S3::StorageLens.S3BucketDestination": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-s3bucketdestination.html", + "Properties": { + "AccountId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-s3bucketdestination.html#cfn-s3-storagelens-s3bucketdestination-accountid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Arn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-s3bucketdestination.html#cfn-s3-storagelens-s3bucketdestination-arn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Encryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-s3bucketdestination.html#cfn-s3-storagelens-s3bucketdestination-encryption", + "Required": false, + "Type": "Encryption", + "UpdateType": "Mutable" + }, + "Format": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-s3bucketdestination.html#cfn-s3-storagelens-s3bucketdestination-format", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "OutputSchemaVersion": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-s3bucketdestination.html#cfn-s3-storagelens-s3bucketdestination-outputschemaversion", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Prefix": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-s3bucketdestination.html#cfn-s3-storagelens-s3bucketdestination-prefix", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::S3::StorageLens.SelectionCriteria": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-selectioncriteria.html", + "Properties": { + "Delimiter": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-selectioncriteria.html#cfn-s3-storagelens-selectioncriteria-delimiter", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "MaxDepth": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-selectioncriteria.html#cfn-s3-storagelens-selectioncriteria-maxdepth", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "MinStorageBytesPercentage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-selectioncriteria.html#cfn-s3-storagelens-selectioncriteria-minstoragebytespercentage", + "PrimitiveType": "Double", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::S3::StorageLens.StorageLensConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-storagelensconfiguration.html", + "Properties": { + "AccountLevel": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-storagelensconfiguration.html#cfn-s3-storagelens-storagelensconfiguration-accountlevel", + "Required": true, + "Type": "AccountLevel", + "UpdateType": "Mutable" + }, + "AwsOrg": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-storagelensconfiguration.html#cfn-s3-storagelens-storagelensconfiguration-awsorg", + "Required": false, + "Type": "AwsOrg", + "UpdateType": "Mutable" + }, + "DataExport": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-storagelensconfiguration.html#cfn-s3-storagelens-storagelensconfiguration-dataexport", + "Required": false, + "Type": "DataExport", + "UpdateType": "Mutable" + }, + "Exclude": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-storagelensconfiguration.html#cfn-s3-storagelens-storagelensconfiguration-exclude", + "Required": false, + "Type": "BucketsAndRegions", + "UpdateType": "Mutable" + }, + "Id": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-storagelensconfiguration.html#cfn-s3-storagelens-storagelensconfiguration-id", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Include": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-storagelensconfiguration.html#cfn-s3-storagelens-storagelensconfiguration-include", + "Required": false, + "Type": "BucketsAndRegions", + "UpdateType": "Mutable" + }, + "IsEnabled": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-storagelensconfiguration.html#cfn-s3-storagelens-storagelensconfiguration-isenabled", + "PrimitiveType": "Boolean", + "Required": true, + "UpdateType": "Mutable" + }, + "StorageLensArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-storagelensconfiguration.html#cfn-s3-storagelens-storagelensconfiguration-storagelensarn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::SES::ConfigurationSetEventDestination.CloudWatchDestination": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-configurationseteventdestination-cloudwatchdestination.html", "Properties": { @@ -41049,6 +42570,12 @@ "PrimitiveType": "String", "Required": false, "UpdateType": "Immutable" + }, + "MultiModelConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-model-containerdefinition.html#cfn-sagemaker-model-containerdefinition-multimodelconfig", + "Required": false, + "Type": "MultiModelConfig", + "UpdateType": "Immutable" } } }, @@ -41063,6 +42590,17 @@ } } }, + "AWS::SageMaker::Model.MultiModelConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-model-containerdefinition-multimodelconfig.html", + "Properties": { + "ModelCacheSetting": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-model-containerdefinition-multimodelconfig.html#cfn-sagemaker-model-containerdefinition-multimodelconfig-modelcachesetting", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + } + } + }, "AWS::SageMaker::Model.VpcConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-model-vpcconfig.html", "Properties": { @@ -41849,6 +43387,23 @@ } } }, + "AWS::Signer::SigningProfile.SignatureValidityPeriod": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-signer-signingprofile-signaturevalidityperiod.html", + "Properties": { + "Type": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-signer-signingprofile-signaturevalidityperiod.html#cfn-signer-signingprofile-signaturevalidityperiod-type", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "Value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-signer-signingprofile-signaturevalidityperiod.html#cfn-signer-signingprofile-signaturevalidityperiod-value", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Immutable" + } + } + }, "AWS::StepFunctions::Activity.TagsEntry": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-activity-tagsentry.html", "Properties": { @@ -42010,6 +43565,13 @@ "Required": false, "UpdateType": "Mutable" }, + "EnvironmentVariables": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-synthetics-canary-runconfig.html#cfn-synthetics-canary-runconfig-environmentvariables", + "PrimitiveItemType": "String", + "Required": false, + "Type": "Map", + "UpdateType": "Mutable" + }, "MemoryInMB": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-synthetics-canary-runconfig.html#cfn-synthetics-canary-runconfig-memoryinmb", "PrimitiveType": "Integer", @@ -44273,7 +45835,7 @@ } } }, - "ResourceSpecificationVersion": "20.3.0", + "ResourceSpecificationVersion": "21.0.0", "ResourceTypes": { "AWS::ACMPCA::Certificate": { "Attributes": { @@ -44702,6 +46264,12 @@ "Required": false, "UpdateType": "Mutable" }, + "CustomHeaders": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-customheaders", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "CustomRules": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-customrules", "ItemType": "CustomRule", @@ -49592,6 +51160,25 @@ } } }, + "AWS::CloudFront::KeyGroup": { + "Attributes": { + "Id": { + "PrimitiveType": "String" + }, + "LastModifiedTime": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-keygroup.html", + "Properties": { + "KeyGroupConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-keygroup.html#cfn-cloudfront-keygroup-keygroupconfig", + "Required": true, + "Type": "KeyGroupConfig", + "UpdateType": "Mutable" + } + } + }, "AWS::CloudFront::OriginRequestPolicy": { "Attributes": { "Id": { @@ -49611,6 +51198,25 @@ } } }, + "AWS::CloudFront::PublicKey": { + "Attributes": { + "CreatedTime": { + "PrimitiveType": "String" + }, + "Id": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-publickey.html", + "Properties": { + "PublicKeyConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-publickey.html#cfn-cloudfront-publickey-publickeyconfig", + "Required": true, + "Type": "PublicKeyConfig", + "UpdateType": "Mutable" + } + } + }, "AWS::CloudFront::RealtimeLogConfig": { "Attributes": { "Arn": { @@ -52799,12 +54405,6 @@ "Required": true, "UpdateType": "Immutable" }, - "ProjectName": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-recipe.html#cfn-databrew-recipe-projectname", - "PrimitiveType": "String", - "Required": false, - "UpdateType": "Mutable" - }, "Steps": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-recipe.html#cfn-databrew-recipe-steps", "ItemType": "RecipeStep", @@ -52819,12 +54419,6 @@ "Required": false, "Type": "List", "UpdateType": "Immutable" - }, - "Version": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-recipe.html#cfn-databrew-recipe-version", - "PrimitiveType": "String", - "Required": false, - "UpdateType": "Mutable" } } }, @@ -58626,7 +60220,7 @@ "Action": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbuspolicy.html#cfn-events-eventbuspolicy-action", "PrimitiveType": "String", - "Required": true, + "Required": false, "UpdateType": "Mutable" }, "Condition": { @@ -58644,7 +60238,13 @@ "Principal": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbuspolicy.html#cfn-events-eventbuspolicy-principal", "PrimitiveType": "String", - "Required": true, + "Required": false, + "UpdateType": "Mutable" + }, + "Statement": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbuspolicy.html#cfn-events-eventbuspolicy-statement", + "PrimitiveType": "Json", + "Required": false, "UpdateType": "Mutable" }, "StatementId": { @@ -59943,6 +61543,12 @@ "Required": false, "UpdateType": "Mutable" }, + "TransformEncryption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-mltransform.html#cfn-glue-mltransform-transformencryption", + "Required": false, + "Type": "TransformEncryption", + "UpdateType": "Mutable" + }, "TransformParameters": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-mltransform.html#cfn-glue-mltransform-transformparameters", "Required": true, @@ -59986,6 +61592,142 @@ } } }, + "AWS::Glue::Registry": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-registry.html", + "Properties": { + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-registry.html#cfn-glue-registry-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-registry.html#cfn-glue-registry-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-registry.html#cfn-glue-registry-tags", + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Immutable" + } + } + }, + "AWS::Glue::Schema": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "InitialSchemaVersionId": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-schema.html", + "Properties": { + "CheckpointVersion": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-schema.html#cfn-glue-schema-checkpointversion", + "Required": false, + "Type": "SchemaVersion", + "UpdateType": "Mutable" + }, + "Compatibility": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-schema.html#cfn-glue-schema-compatibility", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "DataFormat": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-schema.html#cfn-glue-schema-dataformat", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-schema.html#cfn-glue-schema-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-schema.html#cfn-glue-schema-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Registry": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-schema.html#cfn-glue-schema-registry", + "Required": false, + "Type": "Registry", + "UpdateType": "Immutable" + }, + "SchemaDefinition": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-schema.html#cfn-glue-schema-schemadefinition", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-schema.html#cfn-glue-schema-tags", + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Immutable" + } + } + }, + "AWS::Glue::SchemaVersion": { + "Attributes": { + "VersionId": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-schemaversion.html", + "Properties": { + "Schema": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-schemaversion.html#cfn-glue-schemaversion-schema", + "Required": true, + "Type": "Schema", + "UpdateType": "Immutable" + }, + "SchemaDefinition": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-schemaversion.html#cfn-glue-schemaversion-schemadefinition", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, + "AWS::Glue::SchemaVersionMetadata": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-schemaversionmetadata.html", + "Properties": { + "Key": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-schemaversionmetadata.html#cfn-glue-schemaversionmetadata-key", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "SchemaVersionId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-schemaversionmetadata.html#cfn-glue-schemaversionmetadata-schemaversionid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-schemaversionmetadata.html#cfn-glue-schemaversionmetadata-value", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, "AWS::Glue::SecurityConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-securityconfiguration.html", "Properties": { @@ -62156,6 +63898,31 @@ } } }, + "AWS::IoT::TopicRuleDestination": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "StatusReason": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-topicruledestination.html", + "Properties": { + "HttpUrlProperties": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-topicruledestination.html#cfn-iot-topicruledestination-httpurlproperties", + "Required": false, + "Type": "HttpUrlDestinationSummary", + "UpdateType": "Immutable" + }, + "Status": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-topicruledestination.html#cfn-iot-topicruledestination-status", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::IoTAnalytics::Channel": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotanalytics-channel.html", "Properties": { @@ -62569,6 +64336,12 @@ "Required": true, "UpdateType": "Mutable" }, + "KeySpec": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-keyspec", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "KeyUsage": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-keyusage", "PrimitiveType": "String", @@ -63191,6 +64964,37 @@ } } }, + "AWS::Lambda::CodeSigningConfig": { + "Attributes": { + "CodeSigningConfigArn": { + "PrimitiveType": "String" + }, + "CodeSigningConfigId": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-codesigningconfig.html", + "Properties": { + "AllowedPublishers": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-codesigningconfig.html#cfn-lambda-codesigningconfig-allowedpublishers", + "Required": true, + "Type": "AllowedPublishers", + "UpdateType": "Mutable" + }, + "CodeSigningPolicies": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-codesigningconfig.html#cfn-lambda-codesigningconfig-codesigningpolicies", + "Required": false, + "Type": "CodeSigningPolicies", + "UpdateType": "Mutable" + }, + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-codesigningconfig.html#cfn-lambda-codesigningconfig-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::Lambda::EventInvokeConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventinvokeconfig.html", "Properties": { @@ -63352,6 +65156,12 @@ "Type": "Code", "UpdateType": "Mutable" }, + "CodeSigningConfigArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-codesigningconfigarn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "DeadLetterConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-deadletterconfig", "Required": false, @@ -65010,6 +66820,187 @@ } } }, + "AWS::NetworkFirewall::Firewall": { + "Attributes": { + "EndpointIds": { + "PrimitiveItemType": "String", + "Type": "List" + }, + "FirewallArn": { + "PrimitiveType": "String" + }, + "FirewallId": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkfirewall-firewall.html", + "Properties": { + "DeleteProtection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkfirewall-firewall.html#cfn-networkfirewall-firewall-deleteprotection", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkfirewall-firewall.html#cfn-networkfirewall-firewall-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "FirewallName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkfirewall-firewall.html#cfn-networkfirewall-firewall-firewallname", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "FirewallPolicyArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkfirewall-firewall.html#cfn-networkfirewall-firewall-firewallpolicyarn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "FirewallPolicyChangeProtection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkfirewall-firewall.html#cfn-networkfirewall-firewall-firewallpolicychangeprotection", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "SubnetChangeProtection": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkfirewall-firewall.html#cfn-networkfirewall-firewall-subnetchangeprotection", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "SubnetMappings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkfirewall-firewall.html#cfn-networkfirewall-firewall-subnetmappings", + "DuplicatesAllowed": false, + "ItemType": "SubnetMapping", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkfirewall-firewall.html#cfn-networkfirewall-firewall-tags", + "Required": false, + "Type": "Tags", + "UpdateType": "Mutable" + }, + "VpcId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkfirewall-firewall.html#cfn-networkfirewall-firewall-vpcid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, + "AWS::NetworkFirewall::FirewallPolicy": { + "Attributes": { + "FirewallPolicyArn": { + "PrimitiveType": "String" + }, + "FirewallPolicyId": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkfirewall-firewallpolicy.html", + "Properties": { + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkfirewall-firewallpolicy.html#cfn-networkfirewall-firewallpolicy-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "FirewallPolicy": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkfirewall-firewallpolicy.html#cfn-networkfirewall-firewallpolicy-firewallpolicy", + "Required": true, + "Type": "FirewallPolicy", + "UpdateType": "Mutable" + }, + "FirewallPolicyName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkfirewall-firewallpolicy.html#cfn-networkfirewall-firewallpolicy-firewallpolicyname", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkfirewall-firewallpolicy.html#cfn-networkfirewall-firewallpolicy-tags", + "Required": false, + "Type": "Tags", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::LoggingConfiguration": { + "Attributes": { + "FirewallArn": { + "PrimitiveType": "String" + }, + "FirewallName": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkfirewall-loggingconfiguration.html", + "Properties": { + "LoggingConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkfirewall-loggingconfiguration.html#cfn-networkfirewall-loggingconfiguration-loggingconfiguration", + "Required": true, + "Type": "LoggingConfiguration", + "UpdateType": "Mutable" + } + } + }, + "AWS::NetworkFirewall::RuleGroup": { + "Attributes": { + "RuleGroupArn": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkfirewall-rulegroup.html", + "Properties": { + "Capacity": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkfirewall-rulegroup.html#cfn-networkfirewall-rulegroup-capacity", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Immutable" + }, + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkfirewall-rulegroup.html#cfn-networkfirewall-rulegroup-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "RuleGroup": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkfirewall-rulegroup.html#cfn-networkfirewall-rulegroup-rulegroup", + "Required": false, + "Type": "RuleGroup", + "UpdateType": "Mutable" + }, + "RuleGroupId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkfirewall-rulegroup.html#cfn-networkfirewall-rulegroup-rulegroupid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "RuleGroupName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkfirewall-rulegroup.html#cfn-networkfirewall-rulegroup-rulegroupname", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkfirewall-rulegroup.html#cfn-networkfirewall-rulegroup-tags", + "Required": false, + "Type": "Tags", + "UpdateType": "Mutable" + }, + "Type": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkfirewall-rulegroup.html#cfn-networkfirewall-rulegroup-type", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, "AWS::NetworkManager::CustomerGatewayAssociation": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkmanager-customergatewayassociation.html", "Properties": { @@ -69233,6 +71224,30 @@ } } }, + "AWS::S3::StorageLens": { + "Attributes": { + "StorageLensArn": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-storagelens.html", + "Properties": { + "StorageLensConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-storagelens.html#cfn-s3-storagelens-storagelensconfiguration", + "Required": true, + "Type": "StorageLensConfiguration", + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-storagelens.html#cfn-s3-storagelens-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, "AWS::SDB::Domain": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-simpledb.html", "Properties": { @@ -70375,14 +72390,16 @@ } }, "AWS::SageMaker::MonitoringSchedule": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-monitoringschedule.html", - "Properties": { + "Attributes": { "CreationTime": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-monitoringschedule.html#cfn-sagemaker-monitoringschedule-creationtime", - "PrimitiveType": "String", - "Required": false, - "UpdateType": "Mutable" + "PrimitiveType": "String" }, + "LastModifiedTime": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-monitoringschedule.html", + "Properties": { "EndpointName": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-monitoringschedule.html#cfn-sagemaker-monitoringschedule-endpointname", "PrimitiveType": "String", @@ -70395,12 +72412,6 @@ "Required": false, "UpdateType": "Mutable" }, - "LastModifiedTime": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-monitoringschedule.html#cfn-sagemaker-monitoringschedule-lastmodifiedtime", - "PrimitiveType": "String", - "Required": false, - "UpdateType": "Mutable" - }, "LastMonitoringExecutionSummary": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-monitoringschedule.html#cfn-sagemaker-monitoringschedule-lastmonitoringexecutionsummary", "Required": false, @@ -71489,6 +73500,79 @@ } } }, + "AWS::Signer::ProfilePermission": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-signer-profilepermission.html", + "Properties": { + "Action": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-signer-profilepermission.html#cfn-signer-profilepermission-action", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Principal": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-signer-profilepermission.html#cfn-signer-profilepermission-principal", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "ProfileName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-signer-profilepermission.html#cfn-signer-profilepermission-profilename", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "ProfileVersion": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-signer-profilepermission.html#cfn-signer-profilepermission-profileversion", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "StatementId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-signer-profilepermission.html#cfn-signer-profilepermission-statementid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, + "AWS::Signer::SigningProfile": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + }, + "ProfileName": { + "PrimitiveType": "String" + }, + "ProfileVersion": { + "PrimitiveType": "String" + }, + "ProfileVersionArn": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-signer-signingprofile.html", + "Properties": { + "PlatformId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-signer-signingprofile.html#cfn-signer-signingprofile-platformid", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "SignatureValidityPeriod": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-signer-signingprofile.html#cfn-signer-signingprofile-signaturevalidityperiod", + "Required": false, + "Type": "SignatureValidityPeriod", + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-signer-signingprofile.html#cfn-signer-signingprofile-tags", + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, "AWS::StepFunctions::Activity": { "Attributes": { "Name": { diff --git a/packages/@aws-cdk/cloudformation-include/package.json b/packages/@aws-cdk/cloudformation-include/package.json index 73b41baf6a3a7..bfa2fe98f5b6f 100644 --- a/packages/@aws-cdk/cloudformation-include/package.json +++ b/packages/@aws-cdk/cloudformation-include/package.json @@ -161,6 +161,7 @@ "@aws-cdk/aws-mediastore": "0.0.0", "@aws-cdk/aws-msk": "0.0.0", "@aws-cdk/aws-neptune": "0.0.0", + "@aws-cdk/aws-networkfirewall": "0.0.0", "@aws-cdk/aws-networkmanager": "0.0.0", "@aws-cdk/aws-opsworks": "0.0.0", "@aws-cdk/aws-opsworkscm": "0.0.0", @@ -183,6 +184,7 @@ "@aws-cdk/aws-servicecatalog": "0.0.0", "@aws-cdk/aws-servicediscovery": "0.0.0", "@aws-cdk/aws-ses": "0.0.0", + "@aws-cdk/aws-signer": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@aws-cdk/aws-ssm": "0.0.0", @@ -295,6 +297,7 @@ "@aws-cdk/aws-mediastore": "0.0.0", "@aws-cdk/aws-msk": "0.0.0", "@aws-cdk/aws-neptune": "0.0.0", + "@aws-cdk/aws-networkfirewall": "0.0.0", "@aws-cdk/aws-networkmanager": "0.0.0", "@aws-cdk/aws-opsworks": "0.0.0", "@aws-cdk/aws-opsworkscm": "0.0.0", @@ -317,6 +320,7 @@ "@aws-cdk/aws-servicecatalog": "0.0.0", "@aws-cdk/aws-servicediscovery": "0.0.0", "@aws-cdk/aws-ses": "0.0.0", + "@aws-cdk/aws-signer": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@aws-cdk/aws-ssm": "0.0.0", diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index 837833bc7ea58..b0459d657cfd4 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -215,6 +215,7 @@ "@aws-cdk/aws-mediastore": "0.0.0", "@aws-cdk/aws-msk": "0.0.0", "@aws-cdk/aws-neptune": "0.0.0", + "@aws-cdk/aws-networkfirewall": "0.0.0", "@aws-cdk/aws-networkmanager": "0.0.0", "@aws-cdk/aws-opsworks": "0.0.0", "@aws-cdk/aws-opsworkscm": "0.0.0", @@ -243,6 +244,7 @@ "@aws-cdk/aws-servicediscovery": "0.0.0", "@aws-cdk/aws-ses": "0.0.0", "@aws-cdk/aws-ses-actions": "0.0.0", + "@aws-cdk/aws-signer": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sns-subscriptions": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", diff --git a/packages/decdk/package.json b/packages/decdk/package.json index f0b086c41264f..467b3ddcb04e7 100644 --- a/packages/decdk/package.json +++ b/packages/decdk/package.json @@ -142,6 +142,7 @@ "@aws-cdk/aws-mediastore": "0.0.0", "@aws-cdk/aws-msk": "0.0.0", "@aws-cdk/aws-neptune": "0.0.0", + "@aws-cdk/aws-networkfirewall": "0.0.0", "@aws-cdk/aws-networkmanager": "0.0.0", "@aws-cdk/aws-opsworks": "0.0.0", "@aws-cdk/aws-opsworkscm": "0.0.0", @@ -170,6 +171,7 @@ "@aws-cdk/aws-servicediscovery": "0.0.0", "@aws-cdk/aws-ses": "0.0.0", "@aws-cdk/aws-ses-actions": "0.0.0", + "@aws-cdk/aws-signer": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sns-subscriptions": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", diff --git a/packages/monocdk/package.json b/packages/monocdk/package.json index a3146f30ed779..20786525dea23 100644 --- a/packages/monocdk/package.json +++ b/packages/monocdk/package.json @@ -214,6 +214,7 @@ "@aws-cdk/aws-mediastore": "0.0.0", "@aws-cdk/aws-msk": "0.0.0", "@aws-cdk/aws-neptune": "0.0.0", + "@aws-cdk/aws-networkfirewall": "0.0.0", "@aws-cdk/aws-networkmanager": "0.0.0", "@aws-cdk/aws-opsworks": "0.0.0", "@aws-cdk/aws-opsworkscm": "0.0.0", @@ -242,6 +243,7 @@ "@aws-cdk/aws-servicediscovery": "0.0.0", "@aws-cdk/aws-ses": "0.0.0", "@aws-cdk/aws-ses-actions": "0.0.0", + "@aws-cdk/aws-signer": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sns-subscriptions": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", From c61efd3131c560e9784b800b755fee83bde67427 Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Wed, 25 Nov 2020 16:52:48 +0000 Subject: [PATCH 218/314] chore: init templates for v2 (#11706) Creates the v2 init templates by first copying the v1 init templates wholesale, and then applying a series of changes to make the templates v2-compatible. This mostly involves adjusting dependencies and import statements. For ease of review, I suggest looking at the second commit, which is just the changes to the v2 templates from the v1 baseline. One call-out -- we don't (yet) have a plan for assert for v2. This is being tracked in the v2 project board, but is currently out of scope for the alpha release. This means I had to rewrite several tests that used assert to doing much simpler/uglier validations. I used the Java tests as the basis for these rewrites. Tested against a recent build artifact to verify correctness. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/aws-cdk/bin/cdk.ts | 2 +- .../v2/app/csharp/.template.gitignore | 342 ++++++++++++++++++ .../init-templates/v2/app/csharp/README.md | 14 + .../v2/app/csharp/add-project.hook.ts | 33 ++ .../v2/app/csharp/cdk.template.json | 3 + .../src/%name.PascalCased%.template.sln | 18 + .../%name.PascalCased%.template.csproj | 19 + .../%name.PascalCased%Stack.template.cs | 12 + .../%name.PascalCased%/GlobalSuppressions.cs | 1 + .../%name.PascalCased%/Program.template.cs | 17 + .../v2/app/fsharp/.template.gitignore | 342 ++++++++++++++++++ .../init-templates/v2/app/fsharp/README.md | 18 + .../v2/app/fsharp/add-project.hook.ts | 33 ++ .../v2/app/fsharp/cdk.template.json | 3 + .../src/%name.PascalCased%.template.sln | 18 + .../%name.PascalCased%.template.fsproj | 24 ++ .../%name.PascalCased%Stack.template.fs | 8 + .../%name.PascalCased%/Program.template.fs | 11 + .../lib/init-templates/v2/app/info.json | 4 + .../v2/app/java/.template.gitignore | 13 + .../lib/init-templates/v2/app/java/README.md | 18 + .../lib/init-templates/v2/app/java/cdk.json | 3 + .../v2/app/java/pom.template.xml | 66 ++++ .../myorg/%name.PascalCased%App.template.java | 15 + .../%name.PascalCased%Stack.template.java | 17 + .../%name.PascalCased%Test.template.java | 28 ++ .../v2/app/javascript/.template.gitignore | 8 + .../v2/app/javascript/.template.npmignore | 3 + .../v2/app/javascript/README.md | 12 + .../v2/app/javascript/bin/%name%.template.js | 7 + .../v2/app/javascript/cdk.template.json | 3 + .../javascript/lib/%name%-stack.template.js | 17 + .../v2/app/javascript/package.template.json | 20 + .../javascript/test/%name%.test.template.js | 11 + .../%name.PythonModule%_stack.template.py | 9 + .../python/%name.PythonModule%/__init__.py | 0 .../v2/app/python/.template.gitignore | 10 + .../v2/app/python/README.template.md | 58 +++ .../v2/app/python/app.template.py | 11 + .../v2/app/python/cdk.template.json | 3 + .../v2/app/python/requirements.txt | 1 + .../v2/app/python/setup.template.py | 45 +++ .../init-templates/v2/app/python/source.bat | 13 + .../v2/app/typescript/.template.gitignore | 11 + .../v2/app/typescript/.template.npmignore | 6 + .../v2/app/typescript/README.md | 14 + .../v2/app/typescript/bin/%name%.template.ts | 7 + .../v2/app/typescript/cdk.template.json | 3 + .../v2/app/typescript/jest.config.js | 7 + .../typescript/lib/%name%-stack.template.ts | 9 + .../v2/app/typescript/package.template.json | 27 ++ .../typescript/test/%name%.test.template.ts | 11 + .../v2/app/typescript/tsconfig.json | 23 ++ .../lib/init-templates/v2/lib/info.json | 4 + .../v2/lib/typescript/.template.gitignore | 11 + .../v2/lib/typescript/.template.npmignore | 6 + .../v2/lib/typescript/README.template.md | 12 + .../v2/lib/typescript/jest.config.js | 7 + .../v2/lib/typescript/lib/index.template.ts | 14 + .../v2/lib/typescript/package.template.json | 26 ++ .../typescript/test/%name%.test.template.ts | 12 + .../v2/lib/typescript/tsconfig.json | 24 ++ .../v2/sample-app/csharp/.template.gitignore | 342 ++++++++++++++++++ .../v2/sample-app/csharp/README.template.md | 19 + .../v2/sample-app/csharp/add-project.hook.ts | 33 ++ .../v2/sample-app/csharp/cdk.template.json | 3 + .../src/%name.PascalCased%.template.sln | 18 + .../%name.PascalCased%.template.csproj | 19 + .../%name.PascalCased%Stack.template.cs | 23 ++ .../%name.PascalCased%/GlobalSuppressions.cs | 1 + .../%name.PascalCased%/Program.template.cs | 15 + .../v2/sample-app/fsharp/.template.gitignore | 342 ++++++++++++++++++ .../v2/sample-app/fsharp/README.template.md | 20 + .../v2/sample-app/fsharp/add-project.hook.ts | 33 ++ .../v2/sample-app/fsharp/cdk.template.json | 3 + .../src/%name.PascalCased%.template.sln | 18 + .../%name.PascalCased%.template.fsproj | 24 ++ .../%name.PascalCased%Stack.template.fs | 14 + .../%name.PascalCased%/Program.template.fs | 11 + .../init-templates/v2/sample-app/info.json | 4 + .../v2/sample-app/java/.template.gitignore | 13 + .../v2/sample-app/java/README.template.md | 19 + .../v2/sample-app/java/cdk.json | 3 + .../v2/sample-app/java/pom.template.xml | 61 ++++ .../myorg/%name.PascalCased%App.template.java | 13 + .../%name.PascalCased%Stack.template.java | 29 ++ .../%name.PascalCased%StackTest.template.java | 27 ++ .../sample-app/javascript/.template.gitignore | 8 + .../sample-app/javascript/.template.npmignore | 3 + .../sample-app/javascript/README.template.md | 13 + .../javascript/bin/%name%.template.js | 6 + .../sample-app/javascript/cdk.template.json | 3 + .../javascript/lib/%name%-stack.template.js | 25 ++ .../javascript/package.template.json | 20 + .../javascript/test/%name%.test.template.js | 12 + .../v2/sample-app/javascript/tsconfig.json | 26 ++ .../%name.PythonModule%_stack.template.py | 24 ++ .../python/%name.PythonModule%/__init__.py | 0 .../v2/sample-app/python/.template.gitignore | 22 ++ .../v2/sample-app/python/README.template.md | 65 ++++ .../v2/sample-app/python/app.template.py | 11 + .../v2/sample-app/python/cdk.template.json | 3 + .../v2/sample-app/python/requirements.txt | 2 + .../v2/sample-app/python/setup.template.py | 45 +++ .../v2/sample-app/python/source.bat | 13 + .../v2/sample-app/python/tests/__init__.py | 0 .../sample-app/python/tests/unit/__init__.py | 0 ...test_%name.PythonModule%_stack.template.py | 19 + .../sample-app/typescript/.template.gitignore | 11 + .../sample-app/typescript/.template.npmignore | 6 + .../sample-app/typescript/README.template.md | 15 + .../typescript/bin/%name%.template.ts | 6 + .../sample-app/typescript/cdk.template.json | 3 + .../v2/sample-app/typescript/jest.config.js | 7 + .../typescript/lib/%name%-stack.template.ts | 18 + .../typescript/package.template.json | 26 ++ .../typescript/test/%name%.test.template.ts | 12 + .../v2/sample-app/typescript/tsconfig.json | 23 ++ packages/aws-cdk/lib/init.ts | 17 +- packages/aws-cdk/test/init.test.ts | 164 ++++----- 120 files changed, 3193 insertions(+), 89 deletions(-) create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/csharp/.template.gitignore create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/csharp/README.md create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/csharp/add-project.hook.ts create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/csharp/cdk.template.json create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%.template.sln create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%/Program.template.cs create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/fsharp/.template.gitignore create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/fsharp/README.md create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/fsharp/add-project.hook.ts create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/fsharp/cdk.template.json create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/fsharp/src/%name.PascalCased%.template.sln create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/fsharp/src/%name.PascalCased%/Program.template.fs create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/info.json create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/java/.template.gitignore create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/java/README.md create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/java/cdk.json create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/java/pom.template.xml create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/java/src/test/java/com/myorg/%name.PascalCased%Test.template.java create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/javascript/.template.gitignore create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/javascript/.template.npmignore create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/javascript/README.md create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/javascript/bin/%name%.template.js create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/javascript/cdk.template.json create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/javascript/lib/%name%-stack.template.js create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/javascript/package.template.json create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/javascript/test/%name%.test.template.js create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/python/%name.PythonModule%/__init__.py create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/python/.template.gitignore create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/python/README.template.md create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/python/app.template.py create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/python/cdk.template.json create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/python/requirements.txt create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/python/setup.template.py create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/python/source.bat create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/typescript/.template.gitignore create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/typescript/.template.npmignore create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/typescript/README.md create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/typescript/bin/%name%.template.ts create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/typescript/cdk.template.json create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/typescript/jest.config.js create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/typescript/lib/%name%-stack.template.ts create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/typescript/package.template.json create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/typescript/test/%name%.test.template.ts create mode 100644 packages/aws-cdk/lib/init-templates/v2/app/typescript/tsconfig.json create mode 100644 packages/aws-cdk/lib/init-templates/v2/lib/info.json create mode 100644 packages/aws-cdk/lib/init-templates/v2/lib/typescript/.template.gitignore create mode 100644 packages/aws-cdk/lib/init-templates/v2/lib/typescript/.template.npmignore create mode 100644 packages/aws-cdk/lib/init-templates/v2/lib/typescript/README.template.md create mode 100644 packages/aws-cdk/lib/init-templates/v2/lib/typescript/jest.config.js create mode 100644 packages/aws-cdk/lib/init-templates/v2/lib/typescript/lib/index.template.ts create mode 100644 packages/aws-cdk/lib/init-templates/v2/lib/typescript/package.template.json create mode 100644 packages/aws-cdk/lib/init-templates/v2/lib/typescript/test/%name%.test.template.ts create mode 100644 packages/aws-cdk/lib/init-templates/v2/lib/typescript/tsconfig.json create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/.template.gitignore create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/README.template.md create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/add-project.hook.ts create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/cdk.template.json create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%.template.sln create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%/Program.template.cs create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/.template.gitignore create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/README.template.md create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/add-project.hook.ts create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/cdk.template.json create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/src/%name.PascalCased%.template.sln create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/src/%name.PascalCased%/Program.template.fs create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/info.json create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/java/.template.gitignore create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/java/README.template.md create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/java/cdk.json create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/java/pom.template.xml create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/java/src/test/java/com/myorg/%name.PascalCased%StackTest.template.java create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/.template.gitignore create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/.template.npmignore create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/README.template.md create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/bin/%name%.template.js create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/cdk.template.json create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/lib/%name%-stack.template.js create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/package.template.json create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/test/%name%.test.template.js create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/tsconfig.json create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/python/%name.PythonModule%/__init__.py create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/python/.template.gitignore create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/python/README.template.md create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/python/app.template.py create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/python/cdk.template.json create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/python/requirements.txt create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/python/setup.template.py create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/python/source.bat create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/python/tests/__init__.py create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/python/tests/unit/__init__.py create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/python/tests/unit/test_%name.PythonModule%_stack.template.py create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/.template.gitignore create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/.template.npmignore create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/README.template.md create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/bin/%name%.template.ts create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/cdk.template.json create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/jest.config.js create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/lib/%name%-stack.template.ts create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/package.template.json create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/test/%name%.test.template.ts create mode 100644 packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/tsconfig.json diff --git a/packages/aws-cdk/bin/cdk.ts b/packages/aws-cdk/bin/cdk.ts index 4bd548e318b71..e305da55164e5 100644 --- a/packages/aws-cdk/bin/cdk.ts +++ b/packages/aws-cdk/bin/cdk.ts @@ -37,7 +37,7 @@ async function parseCommandLineArguments() { // // ./prog --arg one --arg two position => will parse to { arg: ['one', 'two'], _: ['positional'] }. - const initTemplateLanuages = await availableInitLanguages; + const initTemplateLanuages = await availableInitLanguages(); return yargs .env('CDK') .usage('Usage: cdk -a COMMAND') diff --git a/packages/aws-cdk/lib/init-templates/v2/app/csharp/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/app/csharp/.template.gitignore new file mode 100644 index 0000000000000..f555633ead8f0 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/csharp/.template.gitignore @@ -0,0 +1,342 @@ +# CDK asset staging directory +.cdk.staging +cdk.out + +# Created by https://www.gitignore.io/api/csharp + +### Csharp ### +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + + +# End of https://www.gitignore.io/api/csharp \ No newline at end of file diff --git a/packages/aws-cdk/lib/init-templates/v2/app/csharp/README.md b/packages/aws-cdk/lib/init-templates/v2/app/csharp/README.md new file mode 100644 index 0000000000000..fee04ca40c848 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/csharp/README.md @@ -0,0 +1,14 @@ +# Welcome to your CDK C# project! + +This is a blank project for C# development with CDK. + +The `cdk.json` file tells the CDK Toolkit how to execute your app. + +It uses the [.NET Core CLI](https://docs.microsoft.com/dotnet/articles/core/) to compile and execute your project. + +## Useful commands + +* `dotnet build src` compile this app +* `cdk deploy` deploy this stack to your default AWS account/region +* `cdk diff` compare deployed stack with current state +* `cdk synth` emits the synthesized CloudFormation template \ No newline at end of file diff --git a/packages/aws-cdk/lib/init-templates/v2/app/csharp/add-project.hook.ts b/packages/aws-cdk/lib/init-templates/v2/app/csharp/add-project.hook.ts new file mode 100644 index 0000000000000..37b1fe6ad3e5f --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/csharp/add-project.hook.ts @@ -0,0 +1,33 @@ +import * as child_process from 'child_process'; +import * as path from 'path'; +import { InvokeHook } from '../../../../init'; + +export const invoke: InvokeHook = async (targetDirectory: string) => { + const slnPath = path.join(targetDirectory, 'src', '%name.PascalCased%.sln'); + const csprojPath = path.join(targetDirectory, 'src', '%name.PascalCased%', '%name.PascalCased%.csproj'); + + const child = child_process.spawn('dotnet', ['sln', slnPath, 'add', csprojPath], { + // Need this for Windows where we want .cmd and .bat to be found as well. + shell: true, + stdio: ['ignore', 'pipe', 'inherit'], + }); + + await new Promise((resolve, reject) => { + const stdout = new Array(); + + child.stdout.on('data', chunk => { + process.stdout.write(chunk); + stdout.push(chunk); + }); + + child.once('error', reject); + + child.once('exit', code => { + if (code === 0) { + resolve(Buffer.concat(stdout).toString('utf-8')); + } else { + reject(new Error(`Could not add project %name.PascalCased%.csproj to solution %name.PascalCased%.sln. Error code: ${code}`)); + } + }); + }); +}; diff --git a/packages/aws-cdk/lib/init-templates/v2/app/csharp/cdk.template.json b/packages/aws-cdk/lib/init-templates/v2/app/csharp/cdk.template.json new file mode 100644 index 0000000000000..94c37dee310c0 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/csharp/cdk.template.json @@ -0,0 +1,3 @@ +{ + "app": "dotnet run -p src/%name.PascalCased%/%name.PascalCased%.csproj" +} diff --git a/packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%.template.sln b/packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%.template.sln new file mode 100644 index 0000000000000..2f92ebd9bda92 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%.template.sln @@ -0,0 +1,18 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26124.0 +MinimumVisualStudioVersion = 15.0.26124.0 +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj b/packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj new file mode 100644 index 0000000000000..0ac3cc0a4c6cb --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj @@ -0,0 +1,19 @@ + + + + Exe + netcoreapp3.1 + + Major + + + + + + + + + + diff --git a/packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs b/packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs new file mode 100644 index 0000000000000..998db3c5335cd --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs @@ -0,0 +1,12 @@ +using Amazon.CDK.Lib; + +namespace %name.PascalCased% +{ + public class %name.PascalCased%Stack : Stack + { + internal %name.PascalCased%Stack(Construct scope, string id, IStackProps props = null) : base(scope, id, props) + { + // The code that defines your stack goes here + } + } +} diff --git a/packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs b/packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs new file mode 100644 index 0000000000000..26233fcb54b5c --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs @@ -0,0 +1 @@ +[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Potential Code Quality Issues", "RECS0026:Possible unassigned object created by 'new'", Justification = "Constructs add themselves to the scope in which they are created")] diff --git a/packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%/Program.template.cs b/packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%/Program.template.cs new file mode 100644 index 0000000000000..93f1e27a57523 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%/Program.template.cs @@ -0,0 +1,17 @@ +using Amazon.CDK.Lib; +using System; +using System.Collections.Generic; +using System.Linq; + +namespace %name.PascalCased% +{ + sealed class Program + { + public static void Main(string[] args) + { + var app = new App(); + new %name.PascalCased%Stack(app, "%name.PascalCased%Stack"); + app.Synth(); + } + } +} diff --git a/packages/aws-cdk/lib/init-templates/v2/app/fsharp/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/app/fsharp/.template.gitignore new file mode 100644 index 0000000000000..f555633ead8f0 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/fsharp/.template.gitignore @@ -0,0 +1,342 @@ +# CDK asset staging directory +.cdk.staging +cdk.out + +# Created by https://www.gitignore.io/api/csharp + +### Csharp ### +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + + +# End of https://www.gitignore.io/api/csharp \ No newline at end of file diff --git a/packages/aws-cdk/lib/init-templates/v2/app/fsharp/README.md b/packages/aws-cdk/lib/init-templates/v2/app/fsharp/README.md new file mode 100644 index 0000000000000..16f13d4596dcf --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/fsharp/README.md @@ -0,0 +1,18 @@ +## Welcome to your CDK F# project! + +This is a blank project for F# development with CDK. + +The `cdk.json` file tells the CDK Toolkit how to execute your app. + +It uses the [.NET Core CLI](https://docs.microsoft.com/dotnet/articles/core/) to compile and execute your project. + +## Useful commands + +* `dotnet build src` compile this app +* `cdk ls` list all stacks in the app +* `cdk synth` emits the synthesized CloudFormation template +* `cdk deploy` deploy this stack to your default AWS account/region +* `cdk diff` compare deployed stack with current state +* `cdk docs` open CDK documentation + +Enjoy! diff --git a/packages/aws-cdk/lib/init-templates/v2/app/fsharp/add-project.hook.ts b/packages/aws-cdk/lib/init-templates/v2/app/fsharp/add-project.hook.ts new file mode 100644 index 0000000000000..b9b091fa35ff1 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/fsharp/add-project.hook.ts @@ -0,0 +1,33 @@ +import * as child_process from 'child_process'; +import * as path from 'path'; +import { InvokeHook } from '../../../../init'; + +export const invoke: InvokeHook = async (targetDirectory: string) => { + const slnPath = path.join(targetDirectory, 'src', '%name.PascalCased%.sln'); + const fsprojPath = path.join(targetDirectory, 'src', '%name.PascalCased%', '%name.PascalCased%.fsproj'); + + const child = child_process.spawn('dotnet', ['sln', slnPath, 'add', fsprojPath], { + // Need this for Windows where we want .cmd and .bat to be found as well. + shell: true, + stdio: ['ignore', 'pipe', 'inherit'], + }); + + await new Promise((resolve, reject) => { + const stdout = new Array(); + + child.stdout.on('data', chunk => { + process.stdout.write(chunk); + stdout.push(chunk); + }); + + child.once('error', reject); + + child.once('exit', code => { + if (code === 0) { + resolve(Buffer.concat(stdout).toString('utf-8')); + } else { + reject(new Error(`Could not add project %name.PascalCased%.fsproj to solution %name.PascalCased%.sln. Error code: ${code}`)); + } + }); + }); +}; diff --git a/packages/aws-cdk/lib/init-templates/v2/app/fsharp/cdk.template.json b/packages/aws-cdk/lib/init-templates/v2/app/fsharp/cdk.template.json new file mode 100644 index 0000000000000..a08c461d2a2e2 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/fsharp/cdk.template.json @@ -0,0 +1,3 @@ +{ + "app": "dotnet run -p src/%name.PascalCased%/%name.PascalCased%.fsproj" +} diff --git a/packages/aws-cdk/lib/init-templates/v2/app/fsharp/src/%name.PascalCased%.template.sln b/packages/aws-cdk/lib/init-templates/v2/app/fsharp/src/%name.PascalCased%.template.sln new file mode 100644 index 0000000000000..d73885e1eacb9 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/fsharp/src/%name.PascalCased%.template.sln @@ -0,0 +1,18 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26124.0 +MinimumVisualStudioVersion = 15.0.26124.0 +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/packages/aws-cdk/lib/init-templates/v2/app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj b/packages/aws-cdk/lib/init-templates/v2/app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj new file mode 100644 index 0000000000000..226943c6d3bf7 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj @@ -0,0 +1,24 @@ + + + + Exe + netcoreapp3.1 + + Major + + + + + + + + + + + + + + + diff --git a/packages/aws-cdk/lib/init-templates/v2/app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs b/packages/aws-cdk/lib/init-templates/v2/app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs new file mode 100644 index 0000000000000..40f90dc43d77e --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs @@ -0,0 +1,8 @@ +namespace %name.PascalCased% + +open Amazon.CDK.Lib + +type %name.PascalCased%Stack(scope, id, props) as this = + inherit Stack(scope, id, props) + + // The code that defines your stack goes here diff --git a/packages/aws-cdk/lib/init-templates/v2/app/fsharp/src/%name.PascalCased%/Program.template.fs b/packages/aws-cdk/lib/init-templates/v2/app/fsharp/src/%name.PascalCased%/Program.template.fs new file mode 100644 index 0000000000000..4b28d1e03ba9a --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/fsharp/src/%name.PascalCased%/Program.template.fs @@ -0,0 +1,11 @@ +open Amazon.CDK.Lib +open %name.PascalCased% + +[] +let main _ = + let app = App(null) + + %name.PascalCased%Stack(app, "%name.PascalCased%Stack", StackProps()) |> ignore + + app.Synth() |> ignore + 0 diff --git a/packages/aws-cdk/lib/init-templates/v2/app/info.json b/packages/aws-cdk/lib/init-templates/v2/app/info.json new file mode 100644 index 0000000000000..1a96dac2b1103 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/info.json @@ -0,0 +1,4 @@ +{ + "description": "Template for a CDK Application", + "aliases": ["application", "default"] +} diff --git a/packages/aws-cdk/lib/init-templates/v2/app/java/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/app/java/.template.gitignore new file mode 100644 index 0000000000000..1db21f162937f --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/java/.template.gitignore @@ -0,0 +1,13 @@ +.classpath.txt +target +.classpath +.project +.idea +.settings +.vscode +*.iml + +# CDK asset staging directory +.cdk.staging +cdk.out + diff --git a/packages/aws-cdk/lib/init-templates/v2/app/java/README.md b/packages/aws-cdk/lib/init-templates/v2/app/java/README.md new file mode 100644 index 0000000000000..6f46c4de8c441 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/java/README.md @@ -0,0 +1,18 @@ +# Welcome to your CDK Java project! + +This is a blank project for Java development with CDK. + +The `cdk.json` file tells the CDK Toolkit how to execute your app. + +It is a [Maven](https://maven.apache.org/) based project, so you can open this project with any Maven compatible Java IDE to build and run tests. + +## Useful commands + + * `mvn package` compile and run tests + * `cdk ls` list all stacks in the app + * `cdk synth` emits the synthesized CloudFormation template + * `cdk deploy` deploy this stack to your default AWS account/region + * `cdk diff` compare deployed stack with current state + * `cdk docs` open CDK documentation + +Enjoy! diff --git a/packages/aws-cdk/lib/init-templates/v2/app/java/cdk.json b/packages/aws-cdk/lib/init-templates/v2/app/java/cdk.json new file mode 100644 index 0000000000000..b112918622f63 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/java/cdk.json @@ -0,0 +1,3 @@ +{ + "app": "mvn -e -q compile exec:java" +} diff --git a/packages/aws-cdk/lib/init-templates/v2/app/java/pom.template.xml b/packages/aws-cdk/lib/init-templates/v2/app/java/pom.template.xml new file mode 100644 index 0000000000000..efc6616ae82a0 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/java/pom.template.xml @@ -0,0 +1,66 @@ + + + 4.0.0 + + com.myorg + %name% + 0.1 + + + UTF-8 + %cdk-version% + 5.7.0 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 1.8 + 1.8 + + + + + org.codehaus.mojo + exec-maven-plugin + 3.0.0 + + com.myorg.%name.PascalCased%App + + + + + + + + + software.amazon.awscdk + lib + ${cdk.version} + + + + org.junit.jupiter + junit-jupiter-api + ${junit.version} + test + + + org.junit.jupiter + junit-jupiter-engine + ${junit.version} + test + + + org.assertj + assertj-core + 3.18.0 + test + + + diff --git a/packages/aws-cdk/lib/init-templates/v2/app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java b/packages/aws-cdk/lib/init-templates/v2/app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java new file mode 100644 index 0000000000000..2574c970d3992 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java @@ -0,0 +1,15 @@ +package com.myorg; + +import software.amazon.awscdk.lib.App; + +import java.util.Arrays; + +public class %name.PascalCased%App { + public static void main(final String[] args) { + App app = new App(); + + new %name.PascalCased%Stack(app, "%name.PascalCased%Stack"); + + app.synth(); + } +} diff --git a/packages/aws-cdk/lib/init-templates/v2/app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java b/packages/aws-cdk/lib/init-templates/v2/app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java new file mode 100644 index 0000000000000..dd5dce86a5bb1 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java @@ -0,0 +1,17 @@ +package com.myorg; + +import software.amazon.awscdk.lib.Construct; +import software.amazon.awscdk.lib.Stack; +import software.amazon.awscdk.lib.StackProps; + +public class %name.PascalCased%Stack extends Stack { + public %name.PascalCased%Stack(final Construct scope, final String id) { + this(scope, id, null); + } + + public %name.PascalCased%Stack(final Construct scope, final String id, final StackProps props) { + super(scope, id, props); + + // The code that defines your stack goes here + } +} diff --git a/packages/aws-cdk/lib/init-templates/v2/app/java/src/test/java/com/myorg/%name.PascalCased%Test.template.java b/packages/aws-cdk/lib/init-templates/v2/app/java/src/test/java/com/myorg/%name.PascalCased%Test.template.java new file mode 100644 index 0000000000000..724dedacf5dc2 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/java/src/test/java/com/myorg/%name.PascalCased%Test.template.java @@ -0,0 +1,28 @@ +package com.myorg; + +import software.amazon.awscdk.lib.App; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; + +import java.io.IOException; + +import org.junit.jupiter.api.Test; +import static org.assertj.core.api.Assertions.assertThat; + +public class %name.PascalCased%Test { + private final static ObjectMapper JSON = + new ObjectMapper().configure(SerializationFeature.INDENT_OUTPUT, true); + + @Test + public void testStack() throws IOException { + App app = new App(); + %name.PascalCased%Stack stack = new %name.PascalCased%Stack(app, "test"); + + // synthesize the stack to a CloudFormation template and compare against + // a checked-in JSON file. + JsonNode actual = JSON.valueToTree(app.synth().getStackArtifact(stack.getArtifactId()).getTemplate()); + + assertThat(new ObjectMapper().createObjectNode()).isEqualTo(actual); + } +} diff --git a/packages/aws-cdk/lib/init-templates/v2/app/javascript/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/app/javascript/.template.gitignore new file mode 100644 index 0000000000000..a2da1bef05b07 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/javascript/.template.gitignore @@ -0,0 +1,8 @@ +node_modules + +# CDK asset staging directory +.cdk.staging +cdk.out + +# Parcel default cache directory +.parcel-cache diff --git a/packages/aws-cdk/lib/init-templates/v2/app/javascript/.template.npmignore b/packages/aws-cdk/lib/init-templates/v2/app/javascript/.template.npmignore new file mode 100644 index 0000000000000..5de422a0b42a0 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/javascript/.template.npmignore @@ -0,0 +1,3 @@ +# CDK asset staging directory +.cdk.staging +cdk.out diff --git a/packages/aws-cdk/lib/init-templates/v2/app/javascript/README.md b/packages/aws-cdk/lib/init-templates/v2/app/javascript/README.md new file mode 100644 index 0000000000000..e3e563e115404 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/javascript/README.md @@ -0,0 +1,12 @@ +# Welcome to your CDK JavaScript project! + +This is a blank project for JavaScript development with CDK. + +The `cdk.json` file tells the CDK Toolkit how to execute your app. The build step is not required when using JavaScript. + +## Useful commands + + * `npm run test` perform the jest unit tests + * `cdk deploy` deploy this stack to your default AWS account/region + * `cdk diff` compare deployed stack with current state + * `cdk synth` emits the synthesized CloudFormation template diff --git a/packages/aws-cdk/lib/init-templates/v2/app/javascript/bin/%name%.template.js b/packages/aws-cdk/lib/init-templates/v2/app/javascript/bin/%name%.template.js new file mode 100644 index 0000000000000..637cb35435106 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/javascript/bin/%name%.template.js @@ -0,0 +1,7 @@ +#!/usr/bin/env node + +const cdk = require('aws-cdk-lib'); +const { %name.PascalCased%Stack } = require('../lib/%name%-stack'); + +const app = new cdk.App(); +new %name.PascalCased%Stack(app, '%name.PascalCased%Stack'); diff --git a/packages/aws-cdk/lib/init-templates/v2/app/javascript/cdk.template.json b/packages/aws-cdk/lib/init-templates/v2/app/javascript/cdk.template.json new file mode 100644 index 0000000000000..ca1d40ed37e2d --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/javascript/cdk.template.json @@ -0,0 +1,3 @@ +{ + "app": "node bin/%name%.js" +} diff --git a/packages/aws-cdk/lib/init-templates/v2/app/javascript/lib/%name%-stack.template.js b/packages/aws-cdk/lib/init-templates/v2/app/javascript/lib/%name%-stack.template.js new file mode 100644 index 0000000000000..e8916db57ad71 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/javascript/lib/%name%-stack.template.js @@ -0,0 +1,17 @@ +const cdk = require('aws-cdk-lib'); + +class %name.PascalCased%Stack extends cdk.Stack { + /** + * + * @param {cdk.Construct} scope + * @param {string} id + * @param {cdk.StackProps=} props + */ + constructor(scope, id, props) { + super(scope, id, props); + + // The code that defines your stack goes here + } +} + +module.exports = { %name.PascalCased%Stack } diff --git a/packages/aws-cdk/lib/init-templates/v2/app/javascript/package.template.json b/packages/aws-cdk/lib/init-templates/v2/app/javascript/package.template.json new file mode 100644 index 0000000000000..165f100d82429 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/javascript/package.template.json @@ -0,0 +1,20 @@ +{ + "name": "%name%", + "version": "0.1.0", + "bin": { + "%name%": "bin/%name%.js" + }, + "scripts": { + "build": "echo \"The build step is not required when using JavaScript!\" && exit 0", + "cdk": "cdk", + "test": "jest" + }, + "devDependencies": { + "aws-cdk": "%cdk-version%", + "jest": "^26.4.2" + }, + "dependencies": { + "aws-cdk-lib": "%cdk-version%", + "constructs": "^3.0.4" + } +} diff --git a/packages/aws-cdk/lib/init-templates/v2/app/javascript/test/%name%.test.template.js b/packages/aws-cdk/lib/init-templates/v2/app/javascript/test/%name%.test.template.js new file mode 100644 index 0000000000000..e662bff225941 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/javascript/test/%name%.test.template.js @@ -0,0 +1,11 @@ +const cdk = require('aws-cdk-lib'); +const %name.PascalCased% = require('../lib/%name%-stack'); + +test('Empty Stack', () => { + const app = new cdk.App(); + // WHEN + const stack = new %name.PascalCased%.%name.PascalCased%Stack(app, 'MyTestStack'); + // THEN + const actual = app.synth().getStackArtifact(stack.artifactId).template; + expect(actual).toEqual({}); +}); diff --git a/packages/aws-cdk/lib/init-templates/v2/app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py b/packages/aws-cdk/lib/init-templates/v2/app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py new file mode 100644 index 0000000000000..40bad7e3b032d --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py @@ -0,0 +1,9 @@ +import aws_cdk_lib as core + + +class %name.PascalCased%Stack(core.Stack): + + def __init__(self, scope: core.Construct, construct_id: str, **kwargs) -> None: + super().__init__(scope, construct_id, **kwargs) + + # The code that defines your stack goes here diff --git a/packages/aws-cdk/lib/init-templates/v2/app/python/%name.PythonModule%/__init__.py b/packages/aws-cdk/lib/init-templates/v2/app/python/%name.PythonModule%/__init__.py new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/packages/aws-cdk/lib/init-templates/v2/app/python/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/app/python/.template.gitignore new file mode 100644 index 0000000000000..383cdd5040f7e --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/python/.template.gitignore @@ -0,0 +1,10 @@ +*.swp +package-lock.json +__pycache__ +.pytest_cache +.env +*.egg-info + +# CDK asset staging directory +.cdk.staging +cdk.out diff --git a/packages/aws-cdk/lib/init-templates/v2/app/python/README.template.md b/packages/aws-cdk/lib/init-templates/v2/app/python/README.template.md new file mode 100644 index 0000000000000..ecb028bfa951e --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/python/README.template.md @@ -0,0 +1,58 @@ + +# Welcome to your CDK Python project! + +This is a blank project for Python development with CDK. + +The `cdk.json` file tells the CDK Toolkit how to execute your app. + +This project is set up like a standard Python project. The initialization +process also creates a virtualenv within this project, stored under the `.venv` +directory. To create the virtualenv it assumes that there is a `python3` +(or `python` for Windows) executable in your path with access to the `venv` +package. If for any reason the automatic creation of the virtualenv fails, +you can create the virtualenv manually. + +To manually create a virtualenv on MacOS and Linux: + +``` +$ %python-executable% -m venv .venv +``` + +After the init process completes and the virtualenv is created, you can use the following +step to activate your virtualenv. + +``` +$ source .venv/bin/activate +``` + +If you are a Windows platform, you would activate the virtualenv like this: + +``` +% .venv\Scripts\activate.bat +``` + +Once the virtualenv is activated, you can install the required dependencies. + +``` +$ pip install -r requirements.txt +``` + +At this point you can now synthesize the CloudFormation template for this code. + +``` +$ cdk synth +``` + +To add additional dependencies, for example other CDK libraries, just add +them to your `setup.py` file and rerun the `pip install -r requirements.txt` +command. + +## Useful commands + + * `cdk ls` list all stacks in the app + * `cdk synth` emits the synthesized CloudFormation template + * `cdk deploy` deploy this stack to your default AWS account/region + * `cdk diff` compare deployed stack with current state + * `cdk docs` open CDK documentation + +Enjoy! diff --git a/packages/aws-cdk/lib/init-templates/v2/app/python/app.template.py b/packages/aws-cdk/lib/init-templates/v2/app/python/app.template.py new file mode 100644 index 0000000000000..a1dd331433422 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/python/app.template.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 + +import aws_cdk_lib as core + +from %name.PythonModule%.%name.PythonModule%_stack import %name.PascalCased%Stack + + +app = core.App() +%name.PascalCased%Stack(app, "%name.StackName%") + +app.synth() diff --git a/packages/aws-cdk/lib/init-templates/v2/app/python/cdk.template.json b/packages/aws-cdk/lib/init-templates/v2/app/python/cdk.template.json new file mode 100644 index 0000000000000..d7293493c4415 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/python/cdk.template.json @@ -0,0 +1,3 @@ +{ + "app": "%python-executable% app.py" +} diff --git a/packages/aws-cdk/lib/init-templates/v2/app/python/requirements.txt b/packages/aws-cdk/lib/init-templates/v2/app/python/requirements.txt new file mode 100644 index 0000000000000..d6e1198b1ab1f --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/python/requirements.txt @@ -0,0 +1 @@ +-e . diff --git a/packages/aws-cdk/lib/init-templates/v2/app/python/setup.template.py b/packages/aws-cdk/lib/init-templates/v2/app/python/setup.template.py new file mode 100644 index 0000000000000..4aadde6ecede7 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/python/setup.template.py @@ -0,0 +1,45 @@ +import setuptools + + +with open("README.md") as fp: + long_description = fp.read() + + +setuptools.setup( + name="%name.PythonModule%", + version="0.0.1", + + description="An empty CDK Python app", + long_description=long_description, + long_description_content_type="text/markdown", + + author="author", + + package_dir={"": "%name.PythonModule%"}, + packages=setuptools.find_packages(where="%name.PythonModule%"), + + install_requires=[ + "aws-cdk-lib==%cdk-version%", + ], + + python_requires=">=3.6", + + classifiers=[ + "Development Status :: 4 - Beta", + + "Intended Audience :: Developers", + + "License :: OSI Approved :: Apache Software License", + + "Programming Language :: JavaScript", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + + "Topic :: Software Development :: Code Generators", + "Topic :: Utilities", + + "Typing :: Typed", + ], +) diff --git a/packages/aws-cdk/lib/init-templates/v2/app/python/source.bat b/packages/aws-cdk/lib/init-templates/v2/app/python/source.bat new file mode 100644 index 0000000000000..9e1a83442abd7 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/python/source.bat @@ -0,0 +1,13 @@ +@echo off + +rem The sole purpose of this script is to make the command +rem +rem source .venv/bin/activate +rem +rem (which activates a Python virtualenv on Linux or Mac OS X) work on Windows. +rem On Windows, this command just runs this batch file (the argument is ignored). +rem +rem Now we don't need to document a Windows command for activating a virtualenv. + +echo Executing .venv\Scripts\activate.bat for you +.venv\Scripts\activate.bat diff --git a/packages/aws-cdk/lib/init-templates/v2/app/typescript/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/app/typescript/.template.gitignore new file mode 100644 index 0000000000000..305c7fbcc4d89 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/typescript/.template.gitignore @@ -0,0 +1,11 @@ +*.js +!jest.config.js +*.d.ts +node_modules + +# CDK asset staging directory +.cdk.staging +cdk.out + +# Parcel default cache directory +.parcel-cache diff --git a/packages/aws-cdk/lib/init-templates/v2/app/typescript/.template.npmignore b/packages/aws-cdk/lib/init-templates/v2/app/typescript/.template.npmignore new file mode 100644 index 0000000000000..c1d6d45dcf388 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/typescript/.template.npmignore @@ -0,0 +1,6 @@ +*.ts +!*.d.ts + +# CDK asset staging directory +.cdk.staging +cdk.out diff --git a/packages/aws-cdk/lib/init-templates/v2/app/typescript/README.md b/packages/aws-cdk/lib/init-templates/v2/app/typescript/README.md new file mode 100644 index 0000000000000..3247665185ed7 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/typescript/README.md @@ -0,0 +1,14 @@ +# Welcome to your CDK TypeScript project! + +This is a blank project for TypeScript development with CDK. + +The `cdk.json` file tells the CDK Toolkit how to execute your app. + +## Useful commands + + * `npm run build` compile typescript to js + * `npm run watch` watch for changes and compile + * `npm run test` perform the jest unit tests + * `cdk deploy` deploy this stack to your default AWS account/region + * `cdk diff` compare deployed stack with current state + * `cdk synth` emits the synthesized CloudFormation template diff --git a/packages/aws-cdk/lib/init-templates/v2/app/typescript/bin/%name%.template.ts b/packages/aws-cdk/lib/init-templates/v2/app/typescript/bin/%name%.template.ts new file mode 100644 index 0000000000000..2a54cb5615400 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/typescript/bin/%name%.template.ts @@ -0,0 +1,7 @@ +#!/usr/bin/env node +import 'source-map-support/register'; +import * as cdk from 'aws-cdk-lib'; +import { %name.PascalCased%Stack } from '../lib/%name%-stack'; + +const app = new cdk.App(); +new %name.PascalCased%Stack(app, '%name.PascalCased%Stack'); diff --git a/packages/aws-cdk/lib/init-templates/v2/app/typescript/cdk.template.json b/packages/aws-cdk/lib/init-templates/v2/app/typescript/cdk.template.json new file mode 100644 index 0000000000000..4b132c728abd7 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/typescript/cdk.template.json @@ -0,0 +1,3 @@ +{ + "app": "npx ts-node --prefer-ts-exts bin/%name%.ts" +} diff --git a/packages/aws-cdk/lib/init-templates/v2/app/typescript/jest.config.js b/packages/aws-cdk/lib/init-templates/v2/app/typescript/jest.config.js new file mode 100644 index 0000000000000..772f974903b79 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/typescript/jest.config.js @@ -0,0 +1,7 @@ +module.exports = { + roots: ['/test'], + testMatch: ['**/*.test.ts'], + transform: { + '^.+\\.tsx?$': 'ts-jest' + } +}; diff --git a/packages/aws-cdk/lib/init-templates/v2/app/typescript/lib/%name%-stack.template.ts b/packages/aws-cdk/lib/init-templates/v2/app/typescript/lib/%name%-stack.template.ts new file mode 100644 index 0000000000000..e952c5e6e2488 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/typescript/lib/%name%-stack.template.ts @@ -0,0 +1,9 @@ +import * as cdk from 'aws-cdk-lib'; + +export class %name.PascalCased%Stack extends cdk.Stack { + constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { + super(scope, id, props); + + // The code that defines your stack goes here + } +} diff --git a/packages/aws-cdk/lib/init-templates/v2/app/typescript/package.template.json b/packages/aws-cdk/lib/init-templates/v2/app/typescript/package.template.json new file mode 100644 index 0000000000000..c71e1aea5f5ae --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/typescript/package.template.json @@ -0,0 +1,27 @@ +{ + "name": "%name%", + "version": "0.1.0", + "bin": { + "%name%": "bin/%name%.js" + }, + "scripts": { + "build": "tsc", + "watch": "tsc -w", + "test": "jest", + "cdk": "cdk" + }, + "devDependencies": { + "@types/jest": "^26.0.10", + "@types/node": "10.17.27", + "jest": "^26.4.2", + "ts-jest": "^26.2.0", + "aws-cdk": "%cdk-version%", + "ts-node": "^9.0.0", + "typescript": "~3.9.7" + }, + "dependencies": { + "aws-cdk-lib": "%cdk-version%", + "constructs": "^3.0.4", + "source-map-support": "^0.5.16" + } +} diff --git a/packages/aws-cdk/lib/init-templates/v2/app/typescript/test/%name%.test.template.ts b/packages/aws-cdk/lib/init-templates/v2/app/typescript/test/%name%.test.template.ts new file mode 100644 index 0000000000000..6baa631335298 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/typescript/test/%name%.test.template.ts @@ -0,0 +1,11 @@ +import * as cdk from 'aws-cdk-lib'; +import * as %name.PascalCased% from '../lib/%name%-stack'; + +test('Empty Stack', () => { + const app = new cdk.App(); + // WHEN + const stack = new %name.PascalCased%.%name.PascalCased%Stack(app, 'MyTestStack'); + // THEN + const actual = app.synth().getStackArtifact(stack.artifactId).template; + expect(actual).toEqual({}); +}); diff --git a/packages/aws-cdk/lib/init-templates/v2/app/typescript/tsconfig.json b/packages/aws-cdk/lib/init-templates/v2/app/typescript/tsconfig.json new file mode 100644 index 0000000000000..ec75123ce6554 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/app/typescript/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "target": "ES2018", + "module": "commonjs", + "lib": ["es2018"], + "declaration": true, + "strict": true, + "noImplicitAny": true, + "strictNullChecks": true, + "noImplicitThis": true, + "alwaysStrict": true, + "noUnusedLocals": false, + "noUnusedParameters": false, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": false, + "inlineSourceMap": true, + "inlineSources": true, + "experimentalDecorators": true, + "strictPropertyInitialization": false, + "typeRoots": ["./node_modules/@types"] + }, + "exclude": ["cdk.out"] +} diff --git a/packages/aws-cdk/lib/init-templates/v2/lib/info.json b/packages/aws-cdk/lib/init-templates/v2/lib/info.json new file mode 100644 index 0000000000000..ccc35fd2fe3fe --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/lib/info.json @@ -0,0 +1,4 @@ +{ + "description": "Template for a CDK Construct Library", + "aliases": "library" +} diff --git a/packages/aws-cdk/lib/init-templates/v2/lib/typescript/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/lib/typescript/.template.gitignore new file mode 100644 index 0000000000000..305c7fbcc4d89 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/lib/typescript/.template.gitignore @@ -0,0 +1,11 @@ +*.js +!jest.config.js +*.d.ts +node_modules + +# CDK asset staging directory +.cdk.staging +cdk.out + +# Parcel default cache directory +.parcel-cache diff --git a/packages/aws-cdk/lib/init-templates/v2/lib/typescript/.template.npmignore b/packages/aws-cdk/lib/init-templates/v2/lib/typescript/.template.npmignore new file mode 100644 index 0000000000000..c1d6d45dcf388 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/lib/typescript/.template.npmignore @@ -0,0 +1,6 @@ +*.ts +!*.d.ts + +# CDK asset staging directory +.cdk.staging +cdk.out diff --git a/packages/aws-cdk/lib/init-templates/v2/lib/typescript/README.template.md b/packages/aws-cdk/lib/init-templates/v2/lib/typescript/README.template.md new file mode 100644 index 0000000000000..5c6e0f6d4d97c --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/lib/typescript/README.template.md @@ -0,0 +1,12 @@ +# Welcome to your CDK TypeScript Construct Library project! + +You should explore the contents of this project. It demonstrates a CDK Construct Library that includes a construct (`%name.PascalCased%`) +which contains an Amazon SQS queue that is subscribed to an Amazon SNS topic. + +The construct defines an interface (`%name.PascalCased%Props`) to configure the visibility timeout of the queue. + +## Useful commands + + * `npm run build` compile typescript to js + * `npm run watch` watch for changes and compile + * `npm run test` perform the jest unit tests \ No newline at end of file diff --git a/packages/aws-cdk/lib/init-templates/v2/lib/typescript/jest.config.js b/packages/aws-cdk/lib/init-templates/v2/lib/typescript/jest.config.js new file mode 100644 index 0000000000000..772f974903b79 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/lib/typescript/jest.config.js @@ -0,0 +1,7 @@ +module.exports = { + roots: ['/test'], + testMatch: ['**/*.test.ts'], + transform: { + '^.+\\.tsx?$': 'ts-jest' + } +}; diff --git a/packages/aws-cdk/lib/init-templates/v2/lib/typescript/lib/index.template.ts b/packages/aws-cdk/lib/init-templates/v2/lib/typescript/lib/index.template.ts new file mode 100644 index 0000000000000..ad0b0de54569b --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/lib/typescript/lib/index.template.ts @@ -0,0 +1,14 @@ +import * as cdk from 'aws-cdk-lib'; + +export interface %name.PascalCased%Props { + // Define construct properties here +} + +export class %name.PascalCased% extends cdk.Construct { + + constructor(scope: cdk.Construct, id: string, props: %name.PascalCased%Props = {}) { + super(scope, id); + + // Define construct contents here + } +} diff --git a/packages/aws-cdk/lib/init-templates/v2/lib/typescript/package.template.json b/packages/aws-cdk/lib/init-templates/v2/lib/typescript/package.template.json new file mode 100644 index 0000000000000..f255ef76f1fb9 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/lib/typescript/package.template.json @@ -0,0 +1,26 @@ +{ + "name": "%name%", + "version": "0.1.0", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "scripts": { + "build": "tsc", + "watch": "tsc -w", + "test": "jest" + }, + "devDependencies": { + "@types/jest": "^26.0.10", + "@types/node": "10.17.27", + "jest": "^26.4.2", + "ts-jest": "^26.2.0", + "typescript": "~3.9.7" + }, + "peerDependencies": { + "aws-cdk-lib": "%cdk-version%", + "constructs": "^3.0.4" + }, + "dependencies": { + "aws-cdk-lib": "%cdk-version%", + "constructs": "^3.0.4" + } +} diff --git a/packages/aws-cdk/lib/init-templates/v2/lib/typescript/test/%name%.test.template.ts b/packages/aws-cdk/lib/init-templates/v2/lib/typescript/test/%name%.test.template.ts new file mode 100644 index 0000000000000..924869ad24bf7 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/lib/typescript/test/%name%.test.template.ts @@ -0,0 +1,12 @@ +import * as cdk from 'aws-cdk-lib'; +import * as %name.PascalCased% from '../lib/index'; + +test('Empty Stack', () => { + const app = new cdk.App(); + const stack = new cdk.Stack(app, "TestStack"); + // WHEN + new %name.PascalCased%.%name.PascalCased%(stack, 'MyTestConstruct'); + // THEN + const actual = app.synth().getStackArtifact(stack.artifactId).template; + expect(actual).toEqual({}); +}); diff --git a/packages/aws-cdk/lib/init-templates/v2/lib/typescript/tsconfig.json b/packages/aws-cdk/lib/init-templates/v2/lib/typescript/tsconfig.json new file mode 100644 index 0000000000000..bb250aba2e496 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/lib/typescript/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "target":"ES2018", + "module": "commonjs", + "lib": ["es2018"], + "declaration": true, + "strict": true, + "noImplicitAny": true, + "strictNullChecks": true, + "noImplicitThis": true, + "alwaysStrict": true, + "noUnusedLocals": false, + "noUnusedParameters": false, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": false, + "inlineSourceMap": true, + "inlineSources": true, + "experimentalDecorators": true, + "strictPropertyInitialization":false, + "typeRoots": ["./node_modules/@types"] + }, + "exclude": ["cdk.out"] +} + diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/.template.gitignore new file mode 100644 index 0000000000000..f555633ead8f0 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/.template.gitignore @@ -0,0 +1,342 @@ +# CDK asset staging directory +.cdk.staging +cdk.out + +# Created by https://www.gitignore.io/api/csharp + +### Csharp ### +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + + +# End of https://www.gitignore.io/api/csharp \ No newline at end of file diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/README.template.md b/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/README.template.md new file mode 100644 index 0000000000000..411d4e653994e --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/README.template.md @@ -0,0 +1,19 @@ +# Welcome to your CDK C# project! + +You should explore the contents of this project. It demonstrates a CDK app with an instance of a stack (`%name.PascalCased%Stack`) +which contains an Amazon SQS queue that is subscribed to an Amazon SNS topic. + +The `cdk.json` file tells the CDK Toolkit how to execute your app. + +It uses the [.NET Core CLI](https://docs.microsoft.com/dotnet/articles/core/) to compile and execute your project. + +## Useful commands + +* `dotnet build src` compile this app +* `cdk ls` list all stacks in the app +* `cdk synth` emits the synthesized CloudFormation template +* `cdk deploy` deploy this stack to your default AWS account/region +* `cdk diff` compare deployed stack with current state +* `cdk docs` open CDK documentation + +Enjoy! diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/add-project.hook.ts b/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/add-project.hook.ts new file mode 100644 index 0000000000000..37b1fe6ad3e5f --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/add-project.hook.ts @@ -0,0 +1,33 @@ +import * as child_process from 'child_process'; +import * as path from 'path'; +import { InvokeHook } from '../../../../init'; + +export const invoke: InvokeHook = async (targetDirectory: string) => { + const slnPath = path.join(targetDirectory, 'src', '%name.PascalCased%.sln'); + const csprojPath = path.join(targetDirectory, 'src', '%name.PascalCased%', '%name.PascalCased%.csproj'); + + const child = child_process.spawn('dotnet', ['sln', slnPath, 'add', csprojPath], { + // Need this for Windows where we want .cmd and .bat to be found as well. + shell: true, + stdio: ['ignore', 'pipe', 'inherit'], + }); + + await new Promise((resolve, reject) => { + const stdout = new Array(); + + child.stdout.on('data', chunk => { + process.stdout.write(chunk); + stdout.push(chunk); + }); + + child.once('error', reject); + + child.once('exit', code => { + if (code === 0) { + resolve(Buffer.concat(stdout).toString('utf-8')); + } else { + reject(new Error(`Could not add project %name.PascalCased%.csproj to solution %name.PascalCased%.sln. Error code: ${code}`)); + } + }); + }); +}; diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/cdk.template.json b/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/cdk.template.json new file mode 100644 index 0000000000000..94c37dee310c0 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/cdk.template.json @@ -0,0 +1,3 @@ +{ + "app": "dotnet run -p src/%name.PascalCased%/%name.PascalCased%.csproj" +} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%.template.sln b/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%.template.sln new file mode 100644 index 0000000000000..2f92ebd9bda92 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%.template.sln @@ -0,0 +1,18 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26124.0 +MinimumVisualStudioVersion = 15.0.26124.0 +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj b/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj new file mode 100644 index 0000000000000..0ac3cc0a4c6cb --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj @@ -0,0 +1,19 @@ + + + + Exe + netcoreapp3.1 + + Major + + + + + + + + + + diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs b/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs new file mode 100644 index 0000000000000..db2baa2ca3924 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs @@ -0,0 +1,23 @@ +using Amazon.CDK.Lib; +using Amazon.CDK.AWS.SNS; +using Amazon.CDK.AWS.SNS.Subscriptions; +using Amazon.CDK.AWS.SQS; + +namespace %name.PascalCased% +{ + public class %name.PascalCased%Stack : Stack + { + internal %name.PascalCased%Stack(Construct scope, string id, IStackProps props = null) : base(scope, id, props) + { + // The CDK includes built-in constructs for most resource types, such as Queues and Topics. + var queue = new Queue(this, "%name.PascalCased%Queue", new QueueProps + { + VisibilityTimeout = Duration.Seconds(300) + }); + + var topic = new Topic(this, "%name.PascalCased%Topic"); + + topic.AddSubscription(new SqsSubscription(queue)); + } + } +} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs b/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs new file mode 100644 index 0000000000000..26233fcb54b5c --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs @@ -0,0 +1 @@ +[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Potential Code Quality Issues", "RECS0026:Possible unassigned object created by 'new'", Justification = "Constructs add themselves to the scope in which they are created")] diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%/Program.template.cs b/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%/Program.template.cs new file mode 100644 index 0000000000000..ce88608d08cfe --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%/Program.template.cs @@ -0,0 +1,15 @@ +using Amazon.CDK.Lib; + +namespace %name.PascalCased% +{ + sealed class Program + { + public static void Main(string[] args) + { + var app = new App(); + new %name.PascalCased%Stack(app, "%name.PascalCased%Stack"); + + app.Synth(); + } + } +} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/.template.gitignore new file mode 100644 index 0000000000000..f555633ead8f0 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/.template.gitignore @@ -0,0 +1,342 @@ +# CDK asset staging directory +.cdk.staging +cdk.out + +# Created by https://www.gitignore.io/api/csharp + +### Csharp ### +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + + +# End of https://www.gitignore.io/api/csharp \ No newline at end of file diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/README.template.md b/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/README.template.md new file mode 100644 index 0000000000000..d1bfcf9a90ccf --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/README.template.md @@ -0,0 +1,20 @@ + +# Welcome to your CDK F# project! + +You should explore the contents of this project. It demonstrates a CDK app with an instance of a stack (`%name.PascalCased%Stack`) +which contains an Amazon SQS queue that is subscribed to an Amazon SNS topic. + +The `cdk.json` file tells the CDK Toolkit how to execute your app. + +It uses the [.NET Core CLI](https://docs.microsoft.com/dotnet/articles/core/) to compile and execute your project. + +## Useful commands + +* `dotnet build src` compile this app +* `cdk ls` list all stacks in the app +* `cdk synth` emits the synthesized CloudFormation template +* `cdk deploy` deploy this stack to your default AWS account/region +* `cdk diff` compare deployed stack with current state +* `cdk docs` open CDK documentation + +Enjoy! diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/add-project.hook.ts b/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/add-project.hook.ts new file mode 100644 index 0000000000000..b9b091fa35ff1 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/add-project.hook.ts @@ -0,0 +1,33 @@ +import * as child_process from 'child_process'; +import * as path from 'path'; +import { InvokeHook } from '../../../../init'; + +export const invoke: InvokeHook = async (targetDirectory: string) => { + const slnPath = path.join(targetDirectory, 'src', '%name.PascalCased%.sln'); + const fsprojPath = path.join(targetDirectory, 'src', '%name.PascalCased%', '%name.PascalCased%.fsproj'); + + const child = child_process.spawn('dotnet', ['sln', slnPath, 'add', fsprojPath], { + // Need this for Windows where we want .cmd and .bat to be found as well. + shell: true, + stdio: ['ignore', 'pipe', 'inherit'], + }); + + await new Promise((resolve, reject) => { + const stdout = new Array(); + + child.stdout.on('data', chunk => { + process.stdout.write(chunk); + stdout.push(chunk); + }); + + child.once('error', reject); + + child.once('exit', code => { + if (code === 0) { + resolve(Buffer.concat(stdout).toString('utf-8')); + } else { + reject(new Error(`Could not add project %name.PascalCased%.fsproj to solution %name.PascalCased%.sln. Error code: ${code}`)); + } + }); + }); +}; diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/cdk.template.json b/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/cdk.template.json new file mode 100644 index 0000000000000..a08c461d2a2e2 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/cdk.template.json @@ -0,0 +1,3 @@ +{ + "app": "dotnet run -p src/%name.PascalCased%/%name.PascalCased%.fsproj" +} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/src/%name.PascalCased%.template.sln b/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/src/%name.PascalCased%.template.sln new file mode 100644 index 0000000000000..d73885e1eacb9 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/src/%name.PascalCased%.template.sln @@ -0,0 +1,18 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26124.0 +MinimumVisualStudioVersion = 15.0.26124.0 +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj b/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj new file mode 100644 index 0000000000000..226943c6d3bf7 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj @@ -0,0 +1,24 @@ + + + + Exe + netcoreapp3.1 + + Major + + + + + + + + + + + + + + + diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs b/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs new file mode 100644 index 0000000000000..fb527366dfb7b --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs @@ -0,0 +1,14 @@ +namespace %name.PascalCased% + +open Amazon.CDK.Lib +open Amazon.CDK.AWS.SNS +open Amazon.CDK.AWS.SNS.Subscriptions +open Amazon.CDK.AWS.SQS + +type %name.PascalCased%Stack(scope, id, props) as this = + inherit Stack(scope, id, props) + + let queue = Queue(this, "%name.PascalCased%Queue", QueueProps(VisibilityTimeout = Duration.Seconds(300.))) + + let topic = Topic(this, "%name.PascalCased%Topic") + do topic.AddSubscription(SqsSubscription(queue)) diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/src/%name.PascalCased%/Program.template.fs b/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/src/%name.PascalCased%/Program.template.fs new file mode 100644 index 0000000000000..4b28d1e03ba9a --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/src/%name.PascalCased%/Program.template.fs @@ -0,0 +1,11 @@ +open Amazon.CDK.Lib +open %name.PascalCased% + +[] +let main _ = + let app = App(null) + + %name.PascalCased%Stack(app, "%name.PascalCased%Stack", StackProps()) |> ignore + + app.Synth() |> ignore + 0 diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/info.json b/packages/aws-cdk/lib/init-templates/v2/sample-app/info.json new file mode 100644 index 0000000000000..1451c2576eb63 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/info.json @@ -0,0 +1,4 @@ +{ + "description": "Example CDK Application with some constructs", + "aliases": ["sample", "example"] +} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/java/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/sample-app/java/.template.gitignore new file mode 100644 index 0000000000000..1db21f162937f --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/java/.template.gitignore @@ -0,0 +1,13 @@ +.classpath.txt +target +.classpath +.project +.idea +.settings +.vscode +*.iml + +# CDK asset staging directory +.cdk.staging +cdk.out + diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/java/README.template.md b/packages/aws-cdk/lib/init-templates/v2/sample-app/java/README.template.md new file mode 100644 index 0000000000000..ecbdec164e29e --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/java/README.template.md @@ -0,0 +1,19 @@ +# Welcome to your CDK Java project! + +You should explore the contents of this project. It demonstrates a CDK app with an instance of a stack (`%name.PascalCased%Stack`) +which contains an Amazon SQS queue that is subscribed to an Amazon SNS topic. + +The `cdk.json` file tells the CDK Toolkit how to execute your app. + +It is a [Maven](https://maven.apache.org/) based project, so you can open this project with any Maven compatible Java IDE to build and run tests. + +## Useful commands + + * `mvn package` compile and run tests + * `cdk ls` list all stacks in the app + * `cdk synth` emits the synthesized CloudFormation template + * `cdk deploy` deploy this stack to your default AWS account/region + * `cdk diff` compare deployed stack with current state + * `cdk docs` open CDK documentation + +Enjoy! diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/java/cdk.json b/packages/aws-cdk/lib/init-templates/v2/sample-app/java/cdk.json new file mode 100644 index 0000000000000..b112918622f63 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/java/cdk.json @@ -0,0 +1,3 @@ +{ + "app": "mvn -e -q compile exec:java" +} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/java/pom.template.xml b/packages/aws-cdk/lib/init-templates/v2/sample-app/java/pom.template.xml new file mode 100644 index 0000000000000..ea3de05fcc2b3 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/java/pom.template.xml @@ -0,0 +1,61 @@ + + + 4.0.0 + com.myorg + %name% + 0.1 + + UTF-8 + %cdk-version% + 5.7.0 + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 1.8 + 1.8 + + + + org.codehaus.mojo + exec-maven-plugin + 3.0.0 + + com.myorg.%name.PascalCased%App + + + + + + + + software.amazon.awscdk + lib + ${cdk.version} + + + + org.junit.jupiter + junit-jupiter-api + ${junit.version} + test + + + org.junit.jupiter + junit-jupiter-engine + ${junit.version} + test + + + org.assertj + assertj-core + 3.18.0 + test + + + diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java b/packages/aws-cdk/lib/init-templates/v2/sample-app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java new file mode 100644 index 0000000000000..fb3c52db81d4e --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java @@ -0,0 +1,13 @@ +package com.myorg; + +import software.amazon.awscdk.lib.App; + +public final class %name.PascalCased%App { + public static void main(final String[] args) { + App app = new App(); + + new %name.PascalCased%Stack(app, "%name.PascalCased%Stack"); + + app.synth(); + } +} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java b/packages/aws-cdk/lib/init-templates/v2/sample-app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java new file mode 100644 index 0000000000000..dcbbdea06e4fc --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java @@ -0,0 +1,29 @@ +package com.myorg; + +import software.amazon.awscdk.lib.Construct; +import software.amazon.awscdk.lib.Duration; +import software.amazon.awscdk.lib.Stack; +import software.amazon.awscdk.lib.StackProps; +import software.amazon.awscdk.services.sns.Topic; +import software.amazon.awscdk.services.sns.subscriptions.SqsSubscription; +import software.amazon.awscdk.services.sqs.Queue; + +public class %name.PascalCased%Stack extends Stack { + public %name.PascalCased%Stack(final Construct parent, final String id) { + this(parent, id, null); + } + + public %name.PascalCased%Stack(final Construct parent, final String id, final StackProps props) { + super(parent, id, props); + + final Queue queue = Queue.Builder.create(this, "%name.PascalCased%Queue") + .visibilityTimeout(Duration.seconds(300)) + .build(); + + final Topic topic = Topic.Builder.create(this, "%name.PascalCased%Topic") + .displayName("My First Topic Yeah") + .build(); + + topic.addSubscription(new SqsSubscription(queue)); + } +} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/java/src/test/java/com/myorg/%name.PascalCased%StackTest.template.java b/packages/aws-cdk/lib/init-templates/v2/sample-app/java/src/test/java/com/myorg/%name.PascalCased%StackTest.template.java new file mode 100644 index 0000000000000..6930c2bcc44a0 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/java/src/test/java/com/myorg/%name.PascalCased%StackTest.template.java @@ -0,0 +1,27 @@ +package com.myorg; + +import software.amazon.awscdk.lib.App; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import java.io.IOException; + +import org.junit.jupiter.api.Test; +import static org.assertj.core.api.Assertions.assertThat; + +public class %name.PascalCased%StackTest { + private final static ObjectMapper JSON = + new ObjectMapper().configure(SerializationFeature.INDENT_OUTPUT, true); + + @Test + public void testStack() throws IOException { + App app = new App(); + %name.PascalCased%Stack stack = new %name.PascalCased%Stack(app, "test"); + + JsonNode actual = JSON.valueToTree(app.synth().getStackArtifact(stack.getArtifactId()).getTemplate()); + + assertThat(actual.toString()) + .contains("AWS::SQS::Queue") + .contains("AWS::SNS::Topic"); + } +} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/.template.gitignore new file mode 100644 index 0000000000000..a2da1bef05b07 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/.template.gitignore @@ -0,0 +1,8 @@ +node_modules + +# CDK asset staging directory +.cdk.staging +cdk.out + +# Parcel default cache directory +.parcel-cache diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/.template.npmignore b/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/.template.npmignore new file mode 100644 index 0000000000000..5de422a0b42a0 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/.template.npmignore @@ -0,0 +1,3 @@ +# CDK asset staging directory +.cdk.staging +cdk.out diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/README.template.md b/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/README.template.md new file mode 100644 index 0000000000000..4963f41f7463e --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/README.template.md @@ -0,0 +1,13 @@ +# Welcome to your CDK JavaScript project! + +You should explore the contents of this project. It demonstrates a CDK app with an instance of a stack (`%name.PascalCased%Stack`) +which contains an Amazon SQS queue that is subscribed to an Amazon SNS topic. + +The `cdk.json` file tells the CDK Toolkit how to execute your app. The build step is not required when using JavaScript. + +## Useful commands + + * `npm run test` perform the jest unit tests + * `cdk deploy` deploy this stack to your default AWS account/region + * `cdk diff` compare deployed stack with current state + * `cdk synth` emits the synthesized CloudFormation template diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/bin/%name%.template.js b/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/bin/%name%.template.js new file mode 100644 index 0000000000000..0a334a1be0dfe --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/bin/%name%.template.js @@ -0,0 +1,6 @@ +#!/usr/bin/env node +const cdk = require('aws-cdk-lib'); +const { %name.PascalCased%Stack } = require('../lib/%name%-stack'); + +const app = new cdk.App(); +new %name.PascalCased%Stack(app, '%name.PascalCased%Stack'); diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/cdk.template.json b/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/cdk.template.json new file mode 100644 index 0000000000000..ca1d40ed37e2d --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/cdk.template.json @@ -0,0 +1,3 @@ +{ + "app": "node bin/%name%.js" +} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/lib/%name%-stack.template.js b/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/lib/%name%-stack.template.js new file mode 100644 index 0000000000000..ef2b5c2407ec5 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/lib/%name%-stack.template.js @@ -0,0 +1,25 @@ +const cdk = require('aws-cdk-lib'); +const sns = require('aws-cdk-lib/aws-sns'); +const subs = require('aws-cdk-lib/aws-sns-subscriptions'); +const sqs = require('aws-cdk-lib/aws-sqs'); + +class %name.PascalCased%Stack extends cdk.Stack { + /** + * @param {cdk.App} scope + * @param {string} id + * @param {cdk.StackProps=} props + */ + constructor(scope, id, props) { + super(scope, id, props); + + const queue = new sqs.Queue(this, '%name.PascalCased%Queue', { + visibilityTimeout: cdk.Duration.seconds(300) + }); + + const topic = new sns.Topic(this, '%name.PascalCased%Topic'); + + topic.addSubscription(new subs.SqsSubscription(queue)); + } +} + +module.exports = { %name.PascalCased%Stack } diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/package.template.json b/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/package.template.json new file mode 100644 index 0000000000000..165f100d82429 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/package.template.json @@ -0,0 +1,20 @@ +{ + "name": "%name%", + "version": "0.1.0", + "bin": { + "%name%": "bin/%name%.js" + }, + "scripts": { + "build": "echo \"The build step is not required when using JavaScript!\" && exit 0", + "cdk": "cdk", + "test": "jest" + }, + "devDependencies": { + "aws-cdk": "%cdk-version%", + "jest": "^26.4.2" + }, + "dependencies": { + "aws-cdk-lib": "%cdk-version%", + "constructs": "^3.0.4" + } +} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/test/%name%.test.template.js b/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/test/%name%.test.template.js new file mode 100644 index 0000000000000..b741d4045225b --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/test/%name%.test.template.js @@ -0,0 +1,12 @@ +const cdk = require('aws-cdk-lib'); +const %name.PascalCased% = require('../lib/%name%-stack'); + +test('SQS Queue and SNS Topic Created', () => { + const app = new cdk.App(); + // WHEN + const stack = new %name.PascalCased%.%name.PascalCased%Stack(app, 'MyTestStack'); + // THEN + const actual = JSON.stringify(app.synth().getStackArtifact(stack.artifactId).template); + expect(actual).toContain('AWS::SQS::Queue'); + expect(actual).toContain('AWS::SNS::Topic'); +}); diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/tsconfig.json b/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/tsconfig.json new file mode 100644 index 0000000000000..28ca8b67c6ea2 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "target":"ES2018", + "module": "commonjs", + "lib": ["es2016", "es2017.object", "es2017.string"], + "declaration": true, + "strict": true, + "noImplicitAny": true, + "strictNullChecks": true, + "noImplicitThis": true, + "alwaysStrict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": false, + "inlineSourceMap": true, + "inlineSources": true, + "experimentalDecorators": true, + "strictPropertyInitialization":false, + "allowJs": true, + "checkJs": true, + "noEmit": true, + "typeRoots": ["./node_modules/@types"] + }, + "exclude": ["cdk.out"] +} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py new file mode 100644 index 0000000000000..7629e4361788b --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py @@ -0,0 +1,24 @@ +import aws_cdk_lib as core +from aws_cdk_lib import ( + aws_iam as iam, + aws_sqs as sqs, + aws_sns as sns, + aws_sns_subscriptions as subs, +) + + +class %name.PascalCased%Stack(core.Stack): + + def __init__(self, scope: core.Construct, construct_id: str, **kwargs) -> None: + super().__init__(scope, construct_id, **kwargs) + + queue = sqs.Queue( + self, "%name.PascalCased%Queue", + visibility_timeout=core.Duration.seconds(300), + ) + + topic = sns.Topic( + self, "%name.PascalCased%Topic" + ) + + topic.add_subscription(subs.SqsSubscription(queue)) diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/%name.PythonModule%/__init__.py b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/%name.PythonModule%/__init__.py new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/.template.gitignore new file mode 100644 index 0000000000000..95f954427c747 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/.template.gitignore @@ -0,0 +1,22 @@ +*.swp +package-lock.json +.pytest_cache +*.egg-info + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# CDK Context & Staging files +.cdk.staging/ +cdk.out/ \ No newline at end of file diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/README.template.md b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/README.template.md new file mode 100644 index 0000000000000..1775b25f602ae --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/README.template.md @@ -0,0 +1,65 @@ + +# Welcome to your CDK Python project! + +You should explore the contents of this project. It demonstrates a CDK app with an instance of a stack (`%name.PythonModule%_stack`) +which contains an Amazon SQS queue that is subscribed to an Amazon SNS topic. + +The `cdk.json` file tells the CDK Toolkit how to execute your app. + +This project is set up like a standard Python project. The initialization process also creates +a virtualenv within this project, stored under the .venv directory. To create the virtualenv +it assumes that there is a `python3` executable in your path with access to the `venv` package. +If for any reason the automatic creation of the virtualenv fails, you can create the virtualenv +manually once the init process completes. + +To manually create a virtualenv on MacOS and Linux: + +``` +$ %python-executable% -m venv .venv +``` + +After the init process completes and the virtualenv is created, you can use the following +step to activate your virtualenv. + +``` +$ source .venv/bin/activate +``` + +If you are a Windows platform, you would activate the virtualenv like this: + +``` +% .venv\Scripts\activate.bat +``` + +Once the virtualenv is activated, you can install the required dependencies. + +``` +$ pip install -r requirements.txt +``` + +At this point you can now synthesize the CloudFormation template for this code. + +``` +$ cdk synth +``` + +You can now begin exploring the source code, contained in the hello directory. +There is also a very trivial test included that can be run like this: + +``` +$ pytest +``` + +To add additional dependencies, for example other CDK libraries, just add to +your requirements.txt file and rerun the `pip install -r requirements.txt` +command. + +## Useful commands + + * `cdk ls` list all stacks in the app + * `cdk synth` emits the synthesized CloudFormation template + * `cdk deploy` deploy this stack to your default AWS account/region + * `cdk diff` compare deployed stack with current state + * `cdk docs` open CDK documentation + +Enjoy! diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/app.template.py b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/app.template.py new file mode 100644 index 0000000000000..f53ecf105b8ca --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/app.template.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 + +import aws_cdk_lib as core + +from %name.PythonModule%.%name.PythonModule%_stack import %name.PascalCased%Stack + + +app = core.App() +%name.PascalCased%Stack(app, "%name.StackName%", env={'region': 'us-west-2'}) + +app.synth() diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/cdk.template.json b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/cdk.template.json new file mode 100644 index 0000000000000..d7293493c4415 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/cdk.template.json @@ -0,0 +1,3 @@ +{ + "app": "%python-executable% app.py" +} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/requirements.txt b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/requirements.txt new file mode 100644 index 0000000000000..ae60ed5f14ca8 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/requirements.txt @@ -0,0 +1,2 @@ +-e . +pytest diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/setup.template.py b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/setup.template.py new file mode 100644 index 0000000000000..585578354a190 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/setup.template.py @@ -0,0 +1,45 @@ +import setuptools + + +with open("README.md") as fp: + long_description = fp.read() + + +setuptools.setup( + name="%name.PythonModule%", + version="0.0.1", + + description="A sample CDK Python app", + long_description=long_description, + long_description_content_type="text/markdown", + + author="author", + + package_dir={"": "%name.PythonModule%"}, + packages=setuptools.find_packages(where="%name.PythonModule%"), + + install_requires=[ + "aws-cdk-lib==%cdk-version%", + ], + + python_requires=">=3.6", + + classifiers=[ + "Development Status :: 4 - Beta", + + "Intended Audience :: Developers", + + "License :: OSI Approved :: Apache Software License", + + "Programming Language :: JavaScript", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + + "Topic :: Software Development :: Code Generators", + "Topic :: Utilities", + + "Typing :: Typed", + ], +) diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/source.bat b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/source.bat new file mode 100644 index 0000000000000..9e1a83442abd7 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/source.bat @@ -0,0 +1,13 @@ +@echo off + +rem The sole purpose of this script is to make the command +rem +rem source .venv/bin/activate +rem +rem (which activates a Python virtualenv on Linux or Mac OS X) work on Windows. +rem On Windows, this command just runs this batch file (the argument is ignored). +rem +rem Now we don't need to document a Windows command for activating a virtualenv. + +echo Executing .venv\Scripts\activate.bat for you +.venv\Scripts\activate.bat diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/tests/__init__.py b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/tests/__init__.py new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/tests/unit/__init__.py b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/tests/unit/__init__.py new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/tests/unit/test_%name.PythonModule%_stack.template.py b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/tests/unit/test_%name.PythonModule%_stack.template.py new file mode 100644 index 0000000000000..2b7e876b75742 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/tests/unit/test_%name.PythonModule%_stack.template.py @@ -0,0 +1,19 @@ +import json +import pytest + +import aws_cdk_lib as core +from %name%.%name.PythonModule%_stack import %name.PascalCased%Stack + + +def get_template(): + app = core.App() + %name.PascalCased%Stack(app, "%name.StackName%") + return json.dumps(app.synth().get_stack("%name.StackName%").template) + + +def test_sqs_queue_created(): + assert("AWS::SQS::Queue" in get_template()) + + +def test_sns_topic_created(): + assert("AWS::SNS::Topic" in get_template()) diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/.template.gitignore new file mode 100644 index 0000000000000..305c7fbcc4d89 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/.template.gitignore @@ -0,0 +1,11 @@ +*.js +!jest.config.js +*.d.ts +node_modules + +# CDK asset staging directory +.cdk.staging +cdk.out + +# Parcel default cache directory +.parcel-cache diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/.template.npmignore b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/.template.npmignore new file mode 100644 index 0000000000000..c1d6d45dcf388 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/.template.npmignore @@ -0,0 +1,6 @@ +*.ts +!*.d.ts + +# CDK asset staging directory +.cdk.staging +cdk.out diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/README.template.md b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/README.template.md new file mode 100644 index 0000000000000..56b7b636bd523 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/README.template.md @@ -0,0 +1,15 @@ +# Welcome to your CDK TypeScript project! + +You should explore the contents of this project. It demonstrates a CDK app with an instance of a stack (`%name.PascalCased%Stack`) +which contains an Amazon SQS queue that is subscribed to an Amazon SNS topic. + +The `cdk.json` file tells the CDK Toolkit how to execute your app. + +## Useful commands + + * `npm run build` compile typescript to js + * `npm run watch` watch for changes and compile + * `npm run test` perform the jest unit tests + * `cdk deploy` deploy this stack to your default AWS account/region + * `cdk diff` compare deployed stack with current state + * `cdk synth` emits the synthesized CloudFormation template diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/bin/%name%.template.ts b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/bin/%name%.template.ts new file mode 100644 index 0000000000000..2e7f99ba70e8b --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/bin/%name%.template.ts @@ -0,0 +1,6 @@ +#!/usr/bin/env node +import * as cdk from 'aws-cdk-lib'; +import { %name.PascalCased%Stack } from '../lib/%name%-stack'; + +const app = new cdk.App(); +new %name.PascalCased%Stack(app, '%name.PascalCased%Stack'); diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/cdk.template.json b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/cdk.template.json new file mode 100644 index 0000000000000..4b132c728abd7 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/cdk.template.json @@ -0,0 +1,3 @@ +{ + "app": "npx ts-node --prefer-ts-exts bin/%name%.ts" +} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/jest.config.js b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/jest.config.js new file mode 100644 index 0000000000000..772f974903b79 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/jest.config.js @@ -0,0 +1,7 @@ +module.exports = { + roots: ['/test'], + testMatch: ['**/*.test.ts'], + transform: { + '^.+\\.tsx?$': 'ts-jest' + } +}; diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/lib/%name%-stack.template.ts b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/lib/%name%-stack.template.ts new file mode 100644 index 0000000000000..87f4eb9b549a2 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/lib/%name%-stack.template.ts @@ -0,0 +1,18 @@ +import * as cdk from 'aws-cdk-lib'; +import * as sns from 'aws-cdk-lib/aws-sns'; +import * as subs from 'aws-cdk-lib/aws-sns-subscriptions'; +import * as sqs from 'aws-cdk-lib/aws-sqs'; + +export class %name.PascalCased%Stack extends cdk.Stack { + constructor(scope: cdk.App, id: string, props?: cdk.StackProps) { + super(scope, id, props); + + const queue = new sqs.Queue(this, '%name.PascalCased%Queue', { + visibilityTimeout: cdk.Duration.seconds(300) + }); + + const topic = new sns.Topic(this, '%name.PascalCased%Topic'); + + topic.addSubscription(new subs.SqsSubscription(queue)); + } +} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/package.template.json b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/package.template.json new file mode 100644 index 0000000000000..4b36fa55ec3ad --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/package.template.json @@ -0,0 +1,26 @@ +{ + "name": "%name%", + "version": "0.1.0", + "bin": { + "%name%": "bin/%name%.js" + }, + "scripts": { + "build": "tsc", + "watch": "tsc -w", + "test": "jest", + "cdk": "cdk" + }, + "devDependencies": { + "aws-cdk": "%cdk-version%", + "@types/jest": "^26.0.10", + "@types/node": "10.17.27", + "jest": "^26.4.2", + "ts-jest": "^26.2.0", + "ts-node": "^9.0.0", + "typescript": "~3.9.7" + }, + "dependencies": { + "aws-cdk-lib": "%cdk-version%", + "constructs": "^3.0.4" + } +} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/test/%name%.test.template.ts b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/test/%name%.test.template.ts new file mode 100644 index 0000000000000..a563f50309295 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/test/%name%.test.template.ts @@ -0,0 +1,12 @@ +import * as cdk from 'aws-cdk-lib'; +import * as %name.PascalCased% from '../lib/%name%-stack'; + +test('SQS Queue and SNS Topic Created', () => { + const app = new cdk.App(); + // WHEN + const stack = new %name.PascalCased%.%name.PascalCased%Stack(app, 'MyTestStack'); + // THEN + const actual = JSON.stringify(app.synth().getStackArtifact(stack.artifactId).template); + expect(actual).toContain('AWS::SQS::Queue'); + expect(actual).toContain('AWS::SNS::Topic'); +}); diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/tsconfig.json b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/tsconfig.json new file mode 100644 index 0000000000000..03c16d26a637c --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "target":"ES2018", + "module": "commonjs", + "lib": ["es2018"], + "declaration": true, + "strict": true, + "noImplicitAny": true, + "strictNullChecks": true, + "noImplicitThis": true, + "alwaysStrict": true, + "noUnusedLocals": false, + "noUnusedParameters": false, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": false, + "inlineSourceMap": true, + "inlineSources": true, + "experimentalDecorators": true, + "strictPropertyInitialization":false, + "typeRoots": ["./node_modules/@types"] + }, + "exclude": ["cdk.out"] +} diff --git a/packages/aws-cdk/lib/init.ts b/packages/aws-cdk/lib/init.ts index d0873199f3c68..f066b6c8fefb8 100644 --- a/packages/aws-cdk/lib/init.ts +++ b/packages/aws-cdk/lib/init.ts @@ -27,7 +27,7 @@ export async function cliInit(type?: string, language?: string, canUseNetwork = type = type || 'default'; // "default" is the default type (and maps to "app") - const template = (await availableInitTemplates).find(t => t.hasName(type!)); + const template = (await availableInitTemplates()).find(t => t.hasName(type!)); if (!template) { await printAvailableTemplates(language); throw new Error(`Unknown init template: ${type}`); @@ -201,8 +201,8 @@ function versionedTemplatesDir(): Promise { }); } -export const availableInitTemplates: Promise = - new Promise(async resolve => { +export async function availableInitTemplates(): Promise { + return new Promise(async resolve => { const templatesDir = await versionedTemplatesDir(); const templateNames = await listDirectory(templatesDir); const templates = new Array(); @@ -211,9 +211,10 @@ export const availableInitTemplates: Promise = } resolve(templates); }); -export const availableInitLanguages: Promise = - new Promise(async resolve => { - const templates = await availableInitTemplates; +} +export async function availableInitLanguages(): Promise { + return new Promise(async resolve => { + const templates = await availableInitTemplates(); const result = new Set(); for (const template of templates) { for (const language of template.languages) { @@ -222,6 +223,8 @@ export const availableInitLanguages: Promise = } resolve([...result]); }); +} + /** * @param dirPath is the directory to be listed. * @returns the list of file or directory names contained in ``dirPath``, excluding any dot-file, and sorted. @@ -234,7 +237,7 @@ async function listDirectory(dirPath: string) { export async function printAvailableTemplates(language?: string) { print('Available templates:'); - for (const template of await availableInitTemplates) { + for (const template of await availableInitTemplates()) { if (language && template.languages.indexOf(language) === -1) { continue; } print(`* ${colors.green(template.name)}: ${template.description}`); const languageArg = language ? colors.bold(language) diff --git a/packages/aws-cdk/test/init.test.ts b/packages/aws-cdk/test/init.test.ts index 5335bdbc3dfee..4f2e8e11401f2 100644 --- a/packages/aws-cdk/test/init.test.ts +++ b/packages/aws-cdk/test/init.test.ts @@ -1,5 +1,11 @@ +/** + * The init templates rely on parsing the current major version to find the correct template directory. + * During tests, the current package version is '0.0.0', rather than a specific version. + * The below mocks the versionNumber to return the major version (and so init template version) specified. + */ +let mockMajorVersion = '1.0.0'; jest.mock('../lib/version', () => ({ - versionNumber: mockVersionNumber, + versionNumber: () => mockMajorVersion, })); import * as os from 'os'; @@ -8,76 +14,83 @@ import * as cxapi from '@aws-cdk/cx-api'; import * as fs from 'fs-extra'; import { availableInitTemplates, cliInit } from '../lib/init'; -cliTest('create a TypeScript library project', async (workDir) => { - await cliInit('lib', 'typescript', false, undefined /* canUseNetwork */, workDir); - - // Check that package.json and lib/ got created in the current directory - expect(await fs.pathExists(path.join(workDir, 'package.json'))).toBeTruthy(); - expect(await fs.pathExists(path.join(workDir, 'lib'))).toBeTruthy(); -}); - -cliTest('create a TypeScript app project', async (workDir) => { - await cliInit('app', 'typescript', false, undefined /* canUseNetwork */, workDir); - - // Check that package.json and bin/ got created in the current directory - expect(await fs.pathExists(path.join(workDir, 'package.json'))).toBeTruthy(); - expect(await fs.pathExists(path.join(workDir, 'bin'))).toBeTruthy(); -}); - -cliTest('create a JavaScript app project', async (workDir) => { - await cliInit('app', 'javascript', false, undefined /* canUseNetwork */, workDir); - - // Check that package.json and bin/ got created in the current directory - expect(await fs.pathExists(path.join(workDir, 'package.json'))).toBeTruthy(); - expect(await fs.pathExists(path.join(workDir, 'bin'))).toBeTruthy(); - expect(await fs.pathExists(path.join(workDir, '.git'))).toBeTruthy(); -}); - -cliTest('--generate-only should skip git init', async (workDir) => { - await cliInit('app', 'javascript', false, true, workDir); - - // Check that package.json and bin/ got created in the current directory - expect(await fs.pathExists(path.join(workDir, 'package.json'))).toBeTruthy(); - expect(await fs.pathExists(path.join(workDir, 'bin'))).toBeTruthy(); - expect(await fs.pathExists(path.join(workDir, '.git'))).toBeFalsy(); -}); - -cliTest('git directory does not throw off the initer!', async (workDir) => { - fs.mkdirSync(path.join(workDir, '.git')); - - await cliInit('app', 'typescript', false, undefined /* canUseNetwork */, workDir); - - // Check that package.json and bin/ got created in the current directory - expect(await fs.pathExists(path.join(workDir, 'package.json'))).toBeTruthy(); - expect(await fs.pathExists(path.join(workDir, 'bin'))).toBeTruthy(); -}); - -test('verify "future flags" are added to cdk.json', async () => { - // This is a lot to test, and it can be slow-ish, especially when ran with other tests. - jest.setTimeout(30_000); - - for (const templ of await availableInitTemplates) { - for (const lang of templ.languages) { - await withTempDir(async tmpDir => { - await cliInit(templ.name, lang, - /* canUseNetwork */ false, - /* generateOnly */ true, - tmpDir); - - // ok if template doesn't have a cdk.json file (e.g. the "lib" template) - if (!await fs.pathExists(path.join(tmpDir, 'cdk.json'))) { - return; - } - - const config = await fs.readJson(path.join(tmpDir, 'cdk.json')); - const context = config.context || {}; - for (const [key, expected] of Object.entries(cxapi.FUTURE_FLAGS)) { - const actual = context[key]; - expect(actual).toEqual(expected); - } - }); +describe.each(['1', '2'])('v%s tests', (majorVersion) => { + beforeEach(() => { + mockMajorVersion = `${majorVersion}.0.0`; + jest.resetAllMocks(); + }); + + cliTest('create a TypeScript library project', async (workDir) => { + await cliInit('lib', 'typescript', false, undefined /* canUseNetwork */, workDir); + + // Check that package.json and lib/ got created in the current directory + expect(await fs.pathExists(path.join(workDir, 'package.json'))).toBeTruthy(); + expect(await fs.pathExists(path.join(workDir, 'lib'))).toBeTruthy(); + }); + + cliTest('create a TypeScript app project', async (workDir) => { + await cliInit('app', 'typescript', false, undefined /* canUseNetwork */, workDir); + + // Check that package.json and bin/ got created in the current directory + expect(await fs.pathExists(path.join(workDir, 'package.json'))).toBeTruthy(); + expect(await fs.pathExists(path.join(workDir, 'bin'))).toBeTruthy(); + }); + + cliTest('create a JavaScript app project', async (workDir) => { + await cliInit('app', 'javascript', false, undefined /* canUseNetwork */, workDir); + + // Check that package.json and bin/ got created in the current directory + expect(await fs.pathExists(path.join(workDir, 'package.json'))).toBeTruthy(); + expect(await fs.pathExists(path.join(workDir, 'bin'))).toBeTruthy(); + expect(await fs.pathExists(path.join(workDir, '.git'))).toBeTruthy(); + }); + + cliTest('--generate-only should skip git init', async (workDir) => { + await cliInit('app', 'javascript', false, true, workDir); + + // Check that package.json and bin/ got created in the current directory + expect(await fs.pathExists(path.join(workDir, 'package.json'))).toBeTruthy(); + expect(await fs.pathExists(path.join(workDir, 'bin'))).toBeTruthy(); + expect(await fs.pathExists(path.join(workDir, '.git'))).toBeFalsy(); + }); + + cliTest('git directory does not throw off the initer!', async (workDir) => { + fs.mkdirSync(path.join(workDir, '.git')); + + await cliInit('app', 'typescript', false, undefined /* canUseNetwork */, workDir); + + // Check that package.json and bin/ got created in the current directory + expect(await fs.pathExists(path.join(workDir, 'package.json'))).toBeTruthy(); + expect(await fs.pathExists(path.join(workDir, 'bin'))).toBeTruthy(); + }); + + test('verify "future flags" are added to cdk.json', async () => { + // This is a lot to test, and it can be slow-ish, especially when ran with other tests. + jest.setTimeout(30_000); + + for (const templ of await availableInitTemplates()) { + for (const lang of templ.languages) { + await withTempDir(async tmpDir => { + await cliInit(templ.name, lang, + /* canUseNetwork */ false, + /* generateOnly */ true, + tmpDir); + + // ok if template doesn't have a cdk.json file (e.g. the "lib" template) + if (!await fs.pathExists(path.join(tmpDir, 'cdk.json'))) { + return; + } + + const config = await fs.readJson(path.join(tmpDir, 'cdk.json')); + const context = config.context || {}; + for (const [key, expected] of Object.entries(cxapi.FUTURE_FLAGS)) { + const actual = context[key]; + expect(actual).toEqual(expected); + } + }); + } } - } + }); }); function cliTest(name: string, handler: (dir: string) => void | Promise): void { @@ -92,14 +105,3 @@ async function withTempDir(cb: (dir: string) => void | Promise) { await fs.remove(tmpDir); } } - -/** - * The init templates rely on parsing the current major version to find the correct template directory. - * During tests, the current package version is '0.0.0', rather than a specific version. - * The below mocks the versionNumber to return the same major version as the current release. - */ -function mockVersionNumber() { - // eslint-disable-next-line @typescript-eslint/no-require-imports - const releaseJson = require(`${__dirname}/../../../release.json`); - return `${releaseJson.majorVersion}.0.0`; -} From e23677836a327bc5e89d9c741e036e80781f8d20 Mon Sep 17 00:00:00 2001 From: Romain Marcadier Date: Wed, 25 Nov 2020 18:22:21 +0100 Subject: [PATCH 219/314] docs: remove spurious closing parentheses (#11711) Fixes #11533 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-apigateway/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-apigateway/README.md b/packages/@aws-cdk/aws-apigateway/README.md index 12313ade8dfb3..5a00fde390dd4 100644 --- a/packages/@aws-cdk/aws-apigateway/README.md +++ b/packages/@aws-cdk/aws-apigateway/README.md @@ -587,7 +587,7 @@ new apigw.DomainName(this, 'domain-name', { domainName: 'example.com', certificate: acm.Certificate.fromCertificateArn(this, 'cert', 'arn:aws:acm:us-east-1:1111111:certificate/11-3336f1-44483d-adc7-9cd375c5169d'), mtls: { - bucket: new Bucket(this, 'bucket')), + bucket: new Bucket(this, 'bucket'), key: 'truststore.pem', version: 'version', }, From a30ecba54ea270dc3e4553f27f156c3728157629 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 26 Nov 2020 20:25:35 +0000 Subject: [PATCH 220/314] chore(deps-dev): bump typescript-json-schema from 0.44.0 to 0.44.1 (#11740) Bumps [typescript-json-schema](https://github.com/YousefED/typescript-json-schema) from 0.44.0 to 0.44.1. - [Release notes](https://github.com/YousefED/typescript-json-schema/releases) - [Commits](https://github.com/YousefED/typescript-json-schema/compare/v0.44.0...v0.44.1) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/cloud-assembly-schema/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/@aws-cdk/cloud-assembly-schema/package.json b/packages/@aws-cdk/cloud-assembly-schema/package.json index 6eb7b2887f3dd..de28b34cb9426 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/package.json +++ b/packages/@aws-cdk/cloud-assembly-schema/package.json @@ -58,7 +58,7 @@ "jest": "^26.6.3", "mock-fs": "^4.13.0", "pkglint": "0.0.0", - "typescript-json-schema": "^0.44.0" + "typescript-json-schema": "^0.44.1" }, "repository": { "url": "https://github.com/aws/aws-cdk.git", diff --git a/yarn.lock b/yarn.lock index ce1d572a34688..dfe5ea7785597 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9937,10 +9937,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript-json-schema@^0.44.0: - version "0.44.0" - resolved "https://registry.yarnpkg.com/typescript-json-schema/-/typescript-json-schema-0.44.0.tgz#8ec96b26caa5b8744d6cac47ce9aadc3187f4700" - integrity sha512-MC6hEUYmA35F6SQjwrogzjOhrkH0x4f/yCrzb1EQU5EOoEDdu51vsrlkI9oKgLyyC7uWKBOlJsWAFk2RfGFvgQ== +typescript-json-schema@^0.44.1: + version "0.44.1" + resolved "https://registry.yarnpkg.com/typescript-json-schema/-/typescript-json-schema-0.44.1.tgz#eeac4ffc6ec271a699e7958038ff49810402698b" + integrity sha512-DKB7rKzubOTXxT2CnQTQoCbS6SgJpqukJr2TWE9FbRK0iJY++wc24Pib3OAzIA+c9WylgfT3CxxCCetDsE55Nw== dependencies: "@types/json-schema" "^7.0.6" glob "^7.1.6" From 607dba8ce959cb6e669c1fc28eaea2c362303158 Mon Sep 17 00:00:00 2001 From: Tom Rathbone Date: Thu, 26 Nov 2020 23:32:59 +0100 Subject: [PATCH 221/314] docs(eks): example code property names don't match source (#11733) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-eks/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-eks/README.md b/packages/@aws-cdk/aws-eks/README.md index ad39037e100f7..f2730bf9146eb 100644 --- a/packages/@aws-cdk/aws-eks/README.md +++ b/packages/@aws-cdk/aws-eks/README.md @@ -989,8 +989,8 @@ For example, you can fetch the address of a [`LoadBalancer`](https://kubernetes. // query the load balancer address const myServiceAddress = new KubernetesObjectValue(this, 'LoadBalancerAttribute', { cluster: cluster, - resourceType: 'service', - resourceName: 'my-service', + objectType: 'service', + objectName: 'my-service', jsonPath: '.status.loadBalancer.ingress[0].hostname', // https://kubernetes.io/docs/reference/kubectl/jsonpath/ }); From 2f9e72de1e25d891db15c07923ff6c0ffcd0f078 Mon Sep 17 00:00:00 2001 From: Shiv Lakshminarayan Date: Fri, 27 Nov 2020 09:35:30 -0800 Subject: [PATCH 222/314] chore: CHANGELOG is missing a breaking change entry for efs (#11745) The change made in #11524 which switched from using the `keyId` to `keyArn` is a BREAKING change as an update requires replacement: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-efs-filesystem.html#cfn-efs-filesystem-kmskeyid The `efs` module is experimental and this was a capability that needed to be fixed ahead of moving to developer preview. It was missed that an update to the keyId replaces the filesystem. Amending the CHANGELOG to indicate that the filesystem will be replaced. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 485b074cc5d91..636249178468c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file. See [standa * **appmesh:** renames gateway listener static methods to use shorter names * **appmesh:** renames gateway route static methods to use shorter names * **appmesh:** changes Route's spec to a union-like class. RouteSpec is now defined using protocol variant static methods +* **efs:** `keyId` property uses the ARN instead of the `keyId` to support cross-account encryption key usage. The filesystem will be replaced. * **lambda-nodejs:** local bundling now requires `esbuild` to be installed. * **lambda-nodejs**: `projectRoot` has been replaced by `depsLockFilePath`. It should point to your dependency lock file (`package-lock.json` or `yarn.lock`) * **lambda-nodejs**: `parcelEnvironment` has been renamed to `bundlingEnvironment` From 4223e0afc52452b0fa1ddbf4a50630609d81521a Mon Sep 17 00:00:00 2001 From: Tom Jenkinson Date: Fri, 27 Nov 2020 21:10:03 +0000 Subject: [PATCH 223/314] docs(assert): fix `haveResourceLike()` doc typo (#11742) fix for a small typo I noticed --- packages/@aws-cdk/assert/lib/assertions/have-resource.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/assert/lib/assertions/have-resource.ts b/packages/@aws-cdk/assert/lib/assertions/have-resource.ts index 2ea670b9c394d..2f3352bee16ef 100644 --- a/packages/@aws-cdk/assert/lib/assertions/have-resource.ts +++ b/packages/@aws-cdk/assert/lib/assertions/have-resource.ts @@ -32,7 +32,7 @@ export function haveResource( } /** - * Sugar for calling ``haveResources`` with ``allowValueExtension`` set to ``true``. + * Sugar for calling ``haveResource`` with ``allowValueExtension`` set to ``true``. */ export function haveResourceLike( resourceType: string, From 44017253483488fc7113301ffc184a4c6be497db Mon Sep 17 00:00:00 2001 From: Jonathan Goldwasser Date: Sun, 29 Nov 2020 09:10:31 +0100 Subject: [PATCH 224/314] fix(lambda-nodejs): maximum call stack size exceeded or converting circular structure to JSON (#11698) All the `FunctionOptions` were leaking into `core` where a cache key is calculated in asset staging. Some of those options have circular references making it impossible to calculate a cache key with the current implementation. Another PR is needed to make the cache key calculation in `core` more robust. Closes #11693 Closes #11726 Closes #11762 BREAKING CHANGE: bundling customization options like `minify` or `sourceMap` are now gathered under a new `bundling` prop. * **lambda-nodejs**: `bundlingEnvironment` is now `bundling.environment` * **lambda-nodejs**: `bundlingDockerImage` is now `bundling.dockerImage` ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-lambda-nodejs/README.md | 59 +- .../aws-lambda-nodejs/lib/bundling.ts | 10 +- .../aws-lambda-nodejs/lib/function.ts | 12 +- .../@aws-cdk/aws-lambda-nodejs/lib/types.ts | 4 +- .../@aws-cdk/aws-lambda-nodejs/package.json | 1 + .../aws-lambda-nodejs/test/bundling.test.ts | 6 +- .../aws-lambda-nodejs/test/function.test.ts | 39 +- .../test/integ.dependencies.ts | 14 +- .../test/integ.function.expected.json | 665 ++++++++++++++++++ .../aws-lambda-nodejs/test/integ.function.ts | 9 +- 10 files changed, 779 insertions(+), 40 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda-nodejs/README.md b/packages/@aws-cdk/aws-lambda-nodejs/README.md index 2797329f7de35..6e79edde95c61 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/README.md +++ b/packages/@aws-cdk/aws-lambda-nodejs/README.md @@ -44,31 +44,37 @@ All other properties of `lambda.Function` are supported, see also the [AWS Lambd The `NodejsFunction` construct automatically [reuses existing connections](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/node-reusing-connections.html) when working with the AWS SDK for JavaScript. Set the `awsSdkConnectionReuse` prop to `false` to disable it. -Use the `bundlingEnvironment` prop to define environments variables when esbuild runs: +Use the `environment` prop under `bundling` to define environments variables when esbuild runs: ```ts new lambda.NodejsFunction(this, 'my-handler', { - bundlingEnvironment: { - NODE_ENV: 'production', + bundling: { + environment: { + NODE_ENV: 'production', + }, }, }); ``` -Use the `buildArgs` prop to pass build arguments when building the bundling image: +Use the `buildArgs` under `bundling` prop to pass build arguments when building the bundling image: ```ts new lambda.NodejsFunction(this, 'my-handler', { - buildArgs: { - HTTPS_PROXY: 'https://127.0.0.1:3001', - }, + bundling: { + buildArgs: { + HTTPS_PROXY: 'https://127.0.0.1:3001', + }, + } }); ``` -Use the `bundlingDockerImage` prop to use a custom bundling image: +Use the `dockerImage` prop under `bundling` to use a custom bundling image: ```ts new lambda.NodejsFunction(this, 'my-handler', { - bundlingDockerImage: dk.BundlingDockerImage.fromAsset('/path/to/Dockerfile'), + bundling: { + dockerImage: cdk.BundlingDockerImage.fromAsset('/path/to/Dockerfile'), + }, }); ``` @@ -90,32 +96,49 @@ case you need to ensure that this path includes `entry` and any module/dependenc used by your function. Otherwise bundling will fail. ### Configuring esbuild -The `NodejsFunction` construct exposes some [esbuild](https://esbuild.github.io/) options via properties: `minify`, `sourceMaps` and `target`. +The `NodejsFunction` construct exposes some [esbuild](https://esbuild.github.io/) options via properties under `bundling`: `minify`, `sourceMap`, `target` and `loader`. + +```ts +new lambda.NodejsFunction(this, 'my-handler', { + bundling: { + minify: true, // minify code, defaults to false + sourceMap: true, // include source map, defaults to false + target: 'es2020', // target environment for the generated JavaScript code + loader: { // Use the 'dataurl' loader for '.png' files + '.png': 'dataurl', + }, + }, +}); +``` ### Working with modules #### Externals By default, all node modules are bundled except for `aws-sdk`. This can be configured by specifying -the `externalModules` prop. +the `externalModules` prop under `bundling`. ```ts new lambda.NodejsFunction(this, 'my-handler', { - externalModules: [ - 'aws-sdk', // Use the 'aws-sdk' available in the Lambda runtime - 'cool-module', // 'cool-module' is already available in a Layer - ], + bundling: { + externalModules: [ + 'aws-sdk', // Use the 'aws-sdk' available in the Lambda runtime + 'cool-module', // 'cool-module' is already available in a Layer + ], + }, }); ``` #### Install modules By default, all node modules referenced in your Lambda code will be bundled by esbuild. -Use the `nodeModules` prop to specify a list of modules that should not be bundled -but instead included in the `node_modules` folder of the Lambda package. This is useful +Use the `nodeModules` prop under `bundling` to specify a list of modules that should not be +bundled but instead included in the `node_modules` folder of the Lambda package. This is useful when working with native dependencies or when esbuild fails to bundle a module. ```ts new lambda.NodejsFunction(this, 'my-handler', { - nodeModules: ['native-module', 'other-module'] + bundling: { + nodeModules: ['native-module', 'other-module'], + }, }); ``` diff --git a/packages/@aws-cdk/aws-lambda-nodejs/lib/bundling.ts b/packages/@aws-cdk/aws-lambda-nodejs/lib/bundling.ts index be6789a1b3226..05061c4bdf13e 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/lib/bundling.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/lib/bundling.ts @@ -65,14 +65,14 @@ export class Bundling implements cdk.BundlingOptions { this.relativeEntryPath = path.relative(projectRoot, path.resolve(props.entry)); this.externals = [ - ...this.props.externalModules ?? ['aws-sdk'], // Mark aws-sdk as external by default (available in the runtime) - ...this.props.nodeModules ?? [], // Mark the modules that we are going to install as externals also + ...props.externalModules ?? ['aws-sdk'], // Mark aws-sdk as external by default (available in the runtime) + ...props.nodeModules ?? [], // Mark the modules that we are going to install as externals also ]; // Docker bundling const shouldBuildImage = props.forceDockerBundling || !Bundling.runsLocally; this.image = shouldBuildImage - ? props.bundlingDockerImage ?? cdk.BundlingDockerImage.fromAsset(path.join(__dirname, '../lib'), { + ? props.dockerImage ?? cdk.BundlingDockerImage.fromAsset(path.join(__dirname, '../lib'), { buildArgs: { ...props.buildArgs ?? {}, IMAGE: props.runtime.bundlingDockerImage.image, @@ -83,7 +83,7 @@ export class Bundling implements cdk.BundlingOptions { const bundlingCommand = this.createBundlingCommand(cdk.AssetStaging.BUNDLING_INPUT_DIR, cdk.AssetStaging.BUNDLING_OUTPUT_DIR); this.command = ['bash', '-c', bundlingCommand]; - this.environment = props.bundlingEnvironment; + this.environment = props.environment; // Local bundling if (!props.forceDockerBundling) { // only if Docker is not forced @@ -106,7 +106,7 @@ export class Bundling implements cdk.BundlingOptions { localCommand, ], { - env: { ...process.env, ...props.bundlingEnvironment ?? {} }, + env: { ...process.env, ...props.environment ?? {} }, stdio: [ // show output 'ignore', // ignore stdio process.stderr, // redirect stdout to stderr diff --git a/packages/@aws-cdk/aws-lambda-nodejs/lib/function.ts b/packages/@aws-cdk/aws-lambda-nodejs/lib/function.ts index 4145757cfcfb4..1697741a73aa5 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/lib/function.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/lib/function.ts @@ -9,7 +9,7 @@ import { findUp, LockFile, nodeMajorVersion, parseStackTrace } from './util'; /** * Properties for a NodejsFunction */ -export interface NodejsFunctionProps extends lambda.FunctionOptions, BundlingOptions { +export interface NodejsFunctionProps extends lambda.FunctionOptions { /** * Path to the entry file (JavaScript or TypeScript). * @@ -62,6 +62,14 @@ export interface NodejsFunctionProps extends lambda.FunctionOptions, BundlingOpt * a `yarn.lock` or `package-lock.json` file */ readonly depsLockFilePath?: string; + + /** + * Bundling options + * + * @default - use default bundling options: no minify, no sourcemap, all + * modules are bundled. + */ + readonly bundling?: BundlingOptions; } /** @@ -100,7 +108,7 @@ export class NodejsFunction extends lambda.Function { ...props, runtime, code: Bundling.bundle({ - ...props, + ...props.bundling ?? {}, entry, runtime, depsLockFilePath, diff --git a/packages/@aws-cdk/aws-lambda-nodejs/lib/types.ts b/packages/@aws-cdk/aws-lambda-nodejs/lib/types.ts index 78bc72d40df22..86c690e2ca514 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/lib/types.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/lib/types.ts @@ -46,7 +46,7 @@ export interface BundlingOptions { * * @default - no environment variables are defined. */ - readonly bundlingEnvironment?: { [key: string]: string; }; + readonly environment?: { [key: string]: string; }; /** * A list of modules that should be considered as externals (already available @@ -100,5 +100,5 @@ export interface BundlingOptions { * * @default - use the Docker image provided by @aws-cdk/aws-lambda-nodejs */ - readonly bundlingDockerImage?: BundlingDockerImage; + readonly dockerImage?: BundlingDockerImage; } diff --git a/packages/@aws-cdk/aws-lambda-nodejs/package.json b/packages/@aws-cdk/aws-lambda-nodejs/package.json index cf4f5aad77ce7..2391a9015d690 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/package.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/package.json @@ -64,6 +64,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", + "@aws-cdk/aws-ec2": "0.0.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "delay": "4.4.0", diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/bundling.test.ts b/packages/@aws-cdk/aws-lambda-nodejs/test/bundling.test.ts index a88f55a41e842..44670f67fdee1 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/bundling.test.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/bundling.test.ts @@ -33,7 +33,7 @@ test('esbuild bundling in Docker', () => { entry, depsLockFilePath, runtime: Runtime.NODEJS_12_X, - bundlingEnvironment: { + environment: { KEY: 'value', }, loader: { @@ -200,7 +200,7 @@ test('Local bundling', () => { entry, depsLockFilePath, runtime: Runtime.NODEJS_12_X, - bundlingEnvironment: { + environment: { KEY: 'value', }, }); @@ -244,7 +244,7 @@ test('Custom bundling docker image', () => { entry, depsLockFilePath, runtime: Runtime.NODEJS_12_X, - bundlingDockerImage: BundlingDockerImage.fromRegistry('my-custom-image'), + dockerImage: BundlingDockerImage.fromRegistry('my-custom-image'), forceDockerBundling: true, }); diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/function.test.ts b/packages/@aws-cdk/aws-lambda-nodejs/test/function.test.ts index 0769f86ba7dc9..743526d0e3899 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/function.test.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/function.test.ts @@ -2,6 +2,7 @@ import '@aws-cdk/assert/jest'; import * as fs from 'fs'; import * as path from 'path'; import { ABSENT } from '@aws-cdk/assert'; +import { Vpc } from '@aws-cdk/aws-ec2'; import { Runtime } from '@aws-cdk/aws-lambda'; import { Stack } from '@aws-cdk/core'; import { NodejsFunction } from '../lib'; @@ -52,13 +53,15 @@ test('NodejsFunction with .js handler', () => { test('NodejsFunction with container env vars', () => { // WHEN new NodejsFunction(stack, 'handler1', { - bundlingEnvironment: { - KEY: 'VALUE', + bundling: { + environment: { + KEY: 'VALUE', + }, }, }); expect(Bundling.bundle).toHaveBeenCalledWith(expect.objectContaining({ - bundlingEnvironment: { + environment: { KEY: 'VALUE', }, })); @@ -138,3 +141,33 @@ test('can opt-out of connection reuse for aws sdk', () => { Environment: ABSENT, }); }); + +test('NodejsFunction in a VPC', () => { + // GIVEN + const vpc = new Vpc(stack, 'Vpc'); + + // WHEN + new NodejsFunction(stack, 'handler1', { vpc }); + + // THEN + expect(stack).toHaveResource('AWS::Lambda::Function', { + VpcConfig: { + SecurityGroupIds: [ + { + 'Fn::GetAtt': [ + 'handler1SecurityGroup30688A62', + 'GroupId', + ], + }, + ], + SubnetIds: [ + { + Ref: 'VpcPrivateSubnet1Subnet536B997A', + }, + { + Ref: 'VpcPrivateSubnet2Subnet3788AAA1', + }, + ], + }, + }); +}); diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.dependencies.ts b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.dependencies.ts index 2fe38367a1347..28825543a31d3 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.dependencies.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.dependencies.ts @@ -12,12 +12,14 @@ class TestStack extends Stack { new lambda.NodejsFunction(this, 'external', { entry: path.join(__dirname, 'integ-handlers/dependencies.ts'), runtime: Runtime.NODEJS_12_X, - minify: true, - // Will be installed, not bundled - // (delay is a zero dependency package and its version is fixed - // in the package.json to ensure a stable hash for this integ test) - nodeModules: ['delay'], - forceDockerBundling: true, + bundling: { + minify: true, + // Will be installed, not bundled + // (delay is a zero dependency package and its version is fixed + // in the package.json to ensure a stable hash for this integ test) + nodeModules: ['delay'], + forceDockerBundling: true, + }, }); } } diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.expected.json b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.expected.json index 121b96533388e..97a6b1425b48a 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.expected.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.expected.json @@ -179,6 +179,659 @@ "DependsOn": [ "jshandlerServiceRole781AF366" ] + }, + "Vpc8378EB38": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "cdk-integ-lambda-nodejs/Vpc" + } + ] + } + }, + "VpcPublicSubnet1Subnet5C2D37C4": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.0.0/19", + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": "test-region-1a", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "cdk-integ-lambda-nodejs/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1RouteTable6C95E38E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "cdk-integ-lambda-nodejs/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1RouteTableAssociation97140677": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + } + } + }, + "VpcPublicSubnet1DefaultRoute3DA9E72A": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPublicSubnet1EIPD7E02669": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "cdk-integ-lambda-nodejs/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1NATGateway4D7517AA": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet1EIPD7E02669", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "cdk-integ-lambda-nodejs/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet2Subnet691E08A3": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.32.0/19", + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": "test-region-1b", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "cdk-integ-lambda-nodejs/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet2RouteTable94F7E489": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "cdk-integ-lambda-nodejs/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet2RouteTableAssociationDD5762D8": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + } + } + }, + "VpcPublicSubnet2DefaultRoute97F91067": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPublicSubnet2EIP3C605A87": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "cdk-integ-lambda-nodejs/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet2NATGateway9182C01D": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet2EIP3C605A87", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + }, + "Tags": [ + { + "Key": "Name", + "Value": "cdk-integ-lambda-nodejs/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet3SubnetBE12F0B6": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.64.0/19", + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": "test-region-1c", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "cdk-integ-lambda-nodejs/Vpc/PublicSubnet3" + } + ] + } + }, + "VpcPublicSubnet3RouteTable93458DBB": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "cdk-integ-lambda-nodejs/Vpc/PublicSubnet3" + } + ] + } + }, + "VpcPublicSubnet3RouteTableAssociation1F1EDF02": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet3RouteTable93458DBB" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet3SubnetBE12F0B6" + } + } + }, + "VpcPublicSubnet3DefaultRoute4697774F": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet3RouteTable93458DBB" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPublicSubnet3EIP3A666A23": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "cdk-integ-lambda-nodejs/Vpc/PublicSubnet3" + } + ] + } + }, + "VpcPublicSubnet3NATGateway7640CD1D": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet3EIP3A666A23", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VpcPublicSubnet3SubnetBE12F0B6" + }, + "Tags": [ + { + "Key": "Name", + "Value": "cdk-integ-lambda-nodejs/Vpc/PublicSubnet3" + } + ] + } + }, + "VpcPrivateSubnet1Subnet536B997A": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.96.0/19", + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": "test-region-1a", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "cdk-integ-lambda-nodejs/Vpc/PrivateSubnet1" + } + ] + } + }, + "VpcPrivateSubnet1RouteTableB2C5B500": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "cdk-integ-lambda-nodejs/Vpc/PrivateSubnet1" + } + ] + } + }, + "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + } + } + }, + "VpcPrivateSubnet1DefaultRouteBE02A9ED": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + } + } + }, + "VpcPrivateSubnet2Subnet3788AAA1": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.128.0/19", + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": "test-region-1b", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "cdk-integ-lambda-nodejs/Vpc/PrivateSubnet2" + } + ] + } + }, + "VpcPrivateSubnet2RouteTableA678073B": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "cdk-integ-lambda-nodejs/Vpc/PrivateSubnet2" + } + ] + } + }, + "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + } + }, + "VpcPrivateSubnet2DefaultRoute060D2087": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet2NATGateway9182C01D" + } + } + }, + "VpcPrivateSubnet3SubnetF258B56E": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.160.0/19", + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": "test-region-1c", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "cdk-integ-lambda-nodejs/Vpc/PrivateSubnet3" + } + ] + } + }, + "VpcPrivateSubnet3RouteTableD98824C7": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "cdk-integ-lambda-nodejs/Vpc/PrivateSubnet3" + } + ] + } + }, + "VpcPrivateSubnet3RouteTableAssociation16BDDC43": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet3RouteTableD98824C7" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet3SubnetF258B56E" + } + } + }, + "VpcPrivateSubnet3DefaultRoute94B74F0D": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet3RouteTableD98824C7" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet3NATGateway7640CD1D" + } + } + }, + "VpcIGWD7BA715C": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "cdk-integ-lambda-nodejs/Vpc" + } + ] + } + }, + "VpcVPCGWBF912B6E": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "InternetGatewayId": { + "Ref": "VpcIGWD7BA715C" + } + } + }, + "tshandlervpcServiceRoleF6D326A3": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole" + ] + ] + } + ] + } + }, + "tshandlervpcSecurityGroup587CC215": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "Automatic security group for Lambda Function cdkinteglambdanodejstshandlervpcAAE6104A", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "tshandlervpcA502E26A": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Ref": "AssetParametersb4497848198c9836bf6ea202ecdc73dd7e3bee7c77f78fff0a61d19b8161adc2S3Bucket42C3CE17" + }, + "S3Key": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParametersb4497848198c9836bf6ea202ecdc73dd7e3bee7c77f78fff0a61d19b8161adc2S3VersionKey4389D827" + } + ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParametersb4497848198c9836bf6ea202ecdc73dd7e3bee7c77f78fff0a61d19b8161adc2S3VersionKey4389D827" + } + ] + } + ] + } + ] + ] + } + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "tshandlervpcServiceRoleF6D326A3", + "Arn" + ] + }, + "Runtime": "nodejs12.x", + "Environment": { + "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, + "VpcConfig": { + "SecurityGroupIds": [ + { + "Fn::GetAtt": [ + "tshandlervpcSecurityGroup587CC215", + "GroupId" + ] + } + ], + "SubnetIds": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + }, + { + "Ref": "VpcPrivateSubnet3SubnetF258B56E" + } + ] + } + }, + "DependsOn": [ + "tshandlervpcServiceRoleF6D326A3" + ] } }, "Parameters": { @@ -205,6 +858,18 @@ "AssetParameters565126ff75ab727f0b3a67e78cf0fa9996426d1458123e8d6ee81c7ea93a6cfaArtifactHashF74A21AB": { "Type": "String", "Description": "Artifact hash for asset \"565126ff75ab727f0b3a67e78cf0fa9996426d1458123e8d6ee81c7ea93a6cfa\"" + }, + "AssetParametersb4497848198c9836bf6ea202ecdc73dd7e3bee7c77f78fff0a61d19b8161adc2S3Bucket42C3CE17": { + "Type": "String", + "Description": "S3 bucket for asset \"b4497848198c9836bf6ea202ecdc73dd7e3bee7c77f78fff0a61d19b8161adc2\"" + }, + "AssetParametersb4497848198c9836bf6ea202ecdc73dd7e3bee7c77f78fff0a61d19b8161adc2S3VersionKey4389D827": { + "Type": "String", + "Description": "S3 key for asset version \"b4497848198c9836bf6ea202ecdc73dd7e3bee7c77f78fff0a61d19b8161adc2\"" + }, + "AssetParametersb4497848198c9836bf6ea202ecdc73dd7e3bee7c77f78fff0a61d19b8161adc2ArtifactHash7EA2459D": { + "Type": "String", + "Description": "Artifact hash for asset \"b4497848198c9836bf6ea202ecdc73dd7e3bee7c77f78fff0a61d19b8161adc2\"" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.ts b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.ts index 1befb89d3af9b..1c700d9b4d55c 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.ts @@ -1,4 +1,5 @@ import * as path from 'path'; +import { Vpc } from '@aws-cdk/aws-ec2'; import { Runtime } from '@aws-cdk/aws-lambda'; import { App, Stack, StackProps } from '@aws-cdk/core'; import { Construct } from 'constructs'; @@ -11,13 +12,19 @@ class TestStack extends Stack { new lambda.NodejsFunction(this, 'ts-handler', { entry: path.join(__dirname, 'integ-handlers/ts-handler.ts'), runtime: Runtime.NODEJS_12_X, - minify: true, + bundling: { minify: true }, }); new lambda.NodejsFunction(this, 'js-handler', { entry: path.join(__dirname, 'integ-handlers/js-handler.js'), runtime: Runtime.NODEJS_12_X, }); + + new lambda.NodejsFunction(this, 'ts-handler-vpc', { + entry: path.join(__dirname, 'integ-handlers/ts-handler.ts'), + runtime: Runtime.NODEJS_12_X, + vpc: new Vpc(this, 'Vpc'), + }); } } From 1000cf9a56c7671ab954c35604f8c282a6263977 Mon Sep 17 00:00:00 2001 From: Jonathan Goldwasser Date: Sun, 29 Nov 2020 10:38:31 +0100 Subject: [PATCH 225/314] fix(lambda-nodejs): automatic entry finding with compilerOptions.outDir (#11729) When the defining file is a `.ts` that is emitted into an [`outDir`](https://www.typescriptlang.org/tsconfig#outDir) extracting the defining filename with the stacktrace returns the original path because of the sourcemap. So, if the `.ts` file is defined in `src` and emitted into `lib` using the stacktrace returns the path in `src`. When shipping a construct library with npm the `src` is not published and the automatic entry finding fails. The `src`/`lib` architecture is the one in https://github.com/projen/projen. Use the `CallSite` API to avoid this problem. Inspired by https://github.com/sindresorhus/callsites and https://github.com/sindresorhus/caller-callsite. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-lambda-nodejs/lib/function.ts | 17 ++++-- .../@aws-cdk/aws-lambda-nodejs/lib/util.ts | 59 ++++++++----------- .../aws-lambda-nodejs/test/util.test.ts | 6 +- 3 files changed, 40 insertions(+), 42 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda-nodejs/lib/function.ts b/packages/@aws-cdk/aws-lambda-nodejs/lib/function.ts index 1697741a73aa5..a1c7611e64825 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/lib/function.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/lib/function.ts @@ -4,7 +4,7 @@ import * as lambda from '@aws-cdk/aws-lambda'; import * as cdk from '@aws-cdk/core'; import { Bundling } from './bundling'; import { BundlingOptions } from './types'; -import { findUp, LockFile, nodeMajorVersion, parseStackTrace } from './util'; +import { callsites, findUp, LockFile, nodeMajorVersion } from './util'; /** * Properties for a NodejsFunction @@ -160,12 +160,19 @@ function findEntry(id: string, entry?: string): string { * Finds the name of the file where the `NodejsFunction` is defined */ function findDefiningFile(): string { - const stackTrace = parseStackTrace(); - const functionIndex = stackTrace.findIndex(s => /NodejsFunction/.test(s.methodName || '')); + let definingIndex; + const sites = callsites(); + for (const [index, site] of sites.entries()) { + if (site.getFunctionName() === 'NodejsFunction') { + // The next site is the site where the NodejsFunction was created + definingIndex = index + 1; + break; + } + } - if (functionIndex === -1 || !stackTrace[functionIndex + 1]) { + if (!definingIndex || !sites[definingIndex]) { throw new Error('Cannot find defining file.'); } - return stackTrace[functionIndex + 1].file; + return sites[definingIndex].getFileName(); } diff --git a/packages/@aws-cdk/aws-lambda-nodejs/lib/util.ts b/packages/@aws-cdk/aws-lambda-nodejs/lib/util.ts index afc370fcb200c..f74030f7376d1 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/lib/util.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/lib/util.ts @@ -3,46 +3,33 @@ import * as fs from 'fs'; import * as os from 'os'; import * as path from 'path'; -// From https://github.com/errwischt/stacktrace-parser/blob/master/src/stack-trace-parser.js -const STACK_RE = /^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i; - -/** - * A parsed stack trace line - */ -export interface StackTrace { - readonly file: string; - readonly methodName?: string; - readonly lineNumber: number; - readonly column: number; +export interface CallSite { + getThis(): any; + getTypeName(): string; + getFunctionName(): string; + getMethodName(): string; + getFileName(): string; + getLineNumber(): number; + getColumnNumber(): number; + getFunction(): Function; + getEvalOrigin(): string; + isNative(): boolean; + isToplevel(): boolean; + isEval(): boolean; + isConstructor(): boolean; } /** - * Parses the stack trace of an error + * Get callsites from the V8 stack trace API + * + * https://github.com/sindresorhus/callsites */ -export function parseStackTrace(error?: Error): StackTrace[] { - const err = error || new Error(); - - if (!err.stack) { - return []; - } - - const lines = err.stack.split('\n'); - - const stackTrace: StackTrace[] = []; - - for (const line of lines) { - const results = STACK_RE.exec(line); - if (results) { - stackTrace.push({ - file: results[2], - methodName: results[1], - lineNumber: parseInt(results[3], 10), - column: parseInt(results[4], 10), - }); - } - } - - return stackTrace; +export function callsites(): CallSite[] { + const _prepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = (_, stack) => stack; + const stack = new Error().stack?.slice(1); + Error.prepareStackTrace = _prepareStackTrace; + return stack as unknown as CallSite[]; } /** diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts b/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts index 6319008d9f2ec..df91c4433f153 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts @@ -1,12 +1,16 @@ import * as child_process from 'child_process'; import * as os from 'os'; import * as path from 'path'; -import { exec, extractDependencies, findUp, getEsBuildVersion } from '../lib/util'; +import { callsites, exec, extractDependencies, findUp, getEsBuildVersion } from '../lib/util'; beforeEach(() => { jest.clearAllMocks(); }); +describe('callsites', () => { + expect(callsites()[0].getFileName()).toMatch(/\/test\/util.test.js$/); +}); + describe('findUp', () => { test('Starting at process.cwd()', () => { expect(findUp('README.md')).toMatch(/aws-lambda-nodejs\/README.md$/); From 2e067d7d00b10b4c5e26665386c0a86340a83379 Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Sun, 29 Nov 2020 11:07:37 +0000 Subject: [PATCH 226/314] fix(core): init templates not initialized when running the CLI from source (#11731) As part of the CDKv2 work, #11665 made the init templates version-aware (allowing for different init templates for v1 and v2). This works when the CLI \is run from a packaged distribution, but when run locally in development -- for example, when running `cdk-integ` -- the CLI was failing due to the local version being 0.0.0, and the templates looking for a "v0" directory. Fix the local experience by (currently) defaulting to v1 templates for local development. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/aws-cdk/lib/init.ts | 8 +++++++- packages/aws-cdk/test/init.test.ts | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/aws-cdk/lib/init.ts b/packages/aws-cdk/lib/init.ts index f066b6c8fefb8..6166736f3e8da 100644 --- a/packages/aws-cdk/lib/init.ts +++ b/packages/aws-cdk/lib/init.ts @@ -196,7 +196,13 @@ interface ProjectInfo { function versionedTemplatesDir(): Promise { return new Promise(async resolve => { - const majorVersion = semver.major(versionNumber()); + let currentVersion = versionNumber(); + // If the CLI is invoked from source (i.e., developement), rather than from a packaged distribution, + // the version number will be '0.0.0'. We will (currently) default to the v1 templates in this case. + if (currentVersion === '0.0.0') { + currentVersion = '1.0.0'; + } + const majorVersion = semver.major(currentVersion); resolve(path.join(__dirname, 'init-templates', `v${majorVersion}`)); }); } diff --git a/packages/aws-cdk/test/init.test.ts b/packages/aws-cdk/test/init.test.ts index 4f2e8e11401f2..db042d76fc25d 100644 --- a/packages/aws-cdk/test/init.test.ts +++ b/packages/aws-cdk/test/init.test.ts @@ -93,6 +93,13 @@ describe.each(['1', '2'])('v%s tests', (majorVersion) => { }); }); +test('when no version number is present (e.g., local development), the v1 templates are chosen by default', async () => { + mockMajorVersion = '0.0.0'; + jest.resetAllMocks(); + + expect((await availableInitTemplates()).length).toBeGreaterThan(0); +}); + function cliTest(name: string, handler: (dir: string) => void | Promise): void { test(name, () => withTempDir(handler)); } From f85c08cfcf0fd0d3c1f4a0e835787fd0c3de7b63 Mon Sep 17 00:00:00 2001 From: Ayush Goyal Date: Sun, 29 Nov 2020 21:04:15 +0530 Subject: [PATCH 227/314] fix(eks): addManifest can accept `any` but only works if a map is passed (#11768) Change to `Record` to prevent users from accidentally passing a string (or anything else for that matter). Closes #11483 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-eks/lib/cluster.ts | 4 ++-- packages/@aws-cdk/aws-eks/lib/k8s-manifest.ts | 2 +- packages/@aws-cdk/aws-eks/lib/legacy-cluster.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/@aws-cdk/aws-eks/lib/cluster.ts b/packages/@aws-cdk/aws-eks/lib/cluster.ts index 7974f988aff33..54cbeb9379d02 100644 --- a/packages/@aws-cdk/aws-eks/lib/cluster.ts +++ b/packages/@aws-cdk/aws-eks/lib/cluster.ts @@ -136,7 +136,7 @@ export interface ICluster extends IResource, ec2.IConnectable { * @param manifest a list of Kubernetes resource specifications * @returns a `KubernetesManifest` object. */ - addManifest(id: string, ...manifest: any[]): KubernetesManifest; + addManifest(id: string, ...manifest: Record[]): KubernetesManifest; /** * Defines a Helm chart in this cluster. @@ -641,7 +641,7 @@ abstract class ClusterBase extends Resource implements ICluster { * @param manifest a list of Kubernetes resource specifications * @returns a `KubernetesResource` object. */ - public addManifest(id: string, ...manifest: any[]): KubernetesManifest { + public addManifest(id: string, ...manifest: Record[]): KubernetesManifest { return new KubernetesManifest(this, `manifest-${id}`, { cluster: this, manifest }); } diff --git a/packages/@aws-cdk/aws-eks/lib/k8s-manifest.ts b/packages/@aws-cdk/aws-eks/lib/k8s-manifest.ts index a82104e07e322..fa7ec654d3d77 100644 --- a/packages/@aws-cdk/aws-eks/lib/k8s-manifest.ts +++ b/packages/@aws-cdk/aws-eks/lib/k8s-manifest.ts @@ -39,7 +39,7 @@ export interface KubernetesManifestProps { * }] * */ - readonly manifest: any[]; + readonly manifest: Record[]; } /** diff --git a/packages/@aws-cdk/aws-eks/lib/legacy-cluster.ts b/packages/@aws-cdk/aws-eks/lib/legacy-cluster.ts index e19540cf7c3d4..27014e73871ef 100644 --- a/packages/@aws-cdk/aws-eks/lib/legacy-cluster.ts +++ b/packages/@aws-cdk/aws-eks/lib/legacy-cluster.ts @@ -376,7 +376,7 @@ export class LegacyCluster extends Resource implements ICluster { }); } - public addManifest(_id: string, ..._manifest: any[]): KubernetesManifest { + public addManifest(_id: string, ..._manifest: Record[]): KubernetesManifest { throw new Error('legacy cluster does not support adding kubernetes manifests'); } @@ -438,7 +438,7 @@ class ImportedCluster extends Resource implements ICluster { } } - public addManifest(_id: string, ..._manifest: any[]): KubernetesManifest { + public addManifest(_id: string, ..._manifest: Record[]): KubernetesManifest { throw new Error('legacy cluster does not support adding kubernetes manifests'); } From 0608670f5a4d78c0de2e394b3dee8f87211a7c61 Mon Sep 17 00:00:00 2001 From: Jonathan Goldwasser Date: Sun, 29 Nov 2020 20:54:33 +0100 Subject: [PATCH 228/314] feat(lambda-nodejs): command hooks (#11583) Add support for running additional commands before bundling, before node modules installation and after bundling. Closes #11468 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-lambda-nodejs/README.md | 27 ++++++++++ .../aws-lambda-nodejs/lib/bundling.ts | 8 ++- .../@aws-cdk/aws-lambda-nodejs/lib/types.ts | 50 +++++++++++++++++++ .../aws-lambda-nodejs/test/bundling.test.ts | 33 ++++++++++++ 4 files changed, 117 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-lambda-nodejs/README.md b/packages/@aws-cdk/aws-lambda-nodejs/README.md index 6e79edde95c61..38f06c88a252f 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/README.md +++ b/packages/@aws-cdk/aws-lambda-nodejs/README.md @@ -167,3 +167,30 @@ $ yarn add --dev esbuild@0 To force bundling in a Docker container, set the `forceDockerBundling` prop to `true`. This is useful if your function relies on node modules that should be installed (`nodeModules` prop, see [above](#install-modules)) in a Lambda compatible environment. This is usually the case with modules using native dependencies. + +### Command hooks +It is possible to run additional commands by specifying the `commandHooks` prop: + +```ts +new lambda.NodejsFunction(this, 'my-handler-with-commands', { + commandHooks: { + // Copy a file so that it will be included in the bundled asset + afterBundling(inputDir: string, outputDir: string): string[] { + return [`cp ${inputDir}/my-binary.node ${outputDir}`]; + } + // ... + } +}); +``` + +The following hooks are available: +- `beforeBundling`: runs before all bundling commands +- `beforeInstall`: runs before node modules installation +- `afterBundling`: runs after all bundling commands + +They all receive the directory containing the lock file (`inputDir`) and the +directory where the bundled asset will be output (`outputDir`). They must return +an array of commands to run. Commands are chained with `&&`. + +The commands will run in the environment in which bundling occurs: inside the +container for Docker bundling or on the host OS for local bundling. diff --git a/packages/@aws-cdk/aws-lambda-nodejs/lib/bundling.ts b/packages/@aws-cdk/aws-lambda-nodejs/lib/bundling.ts index 05061c4bdf13e..404a29b2fae60 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/lib/bundling.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/lib/bundling.ts @@ -169,7 +169,13 @@ export class Bundling implements cdk.BundlingOptions { ]); } - return chain([esbuildCommand, depsCommand]); + return chain([ + ...this.props.commandHooks?.beforeBundling(inputDir, outputDir) ?? [], + esbuildCommand, + ...(this.props.nodeModules && this.props.commandHooks?.beforeInstall(inputDir, outputDir)) ?? [], + depsCommand, + ...this.props.commandHooks?.afterBundling(inputDir, outputDir) ?? [], + ]); } } diff --git a/packages/@aws-cdk/aws-lambda-nodejs/lib/types.ts b/packages/@aws-cdk/aws-lambda-nodejs/lib/types.ts index 86c690e2ca514..4f7b6505facfa 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/lib/types.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/lib/types.ts @@ -101,4 +101,54 @@ export interface BundlingOptions { * @default - use the Docker image provided by @aws-cdk/aws-lambda-nodejs */ readonly dockerImage?: BundlingDockerImage; + + /** + * Command hooks + * + * @default - do not run additional commands + */ + readonly commandHooks?: ICommandHooks; +} + +/** + * Command hooks + * + * These commands will run in the environment in which bundling occurs: inside + * the container for Docker bundling or on the host OS for local bundling. + * + * Commands are chained with `&&`. + * + * @example + * { + * // Copy a file from the input directory to the output directory + * // to include it in the bundled asset + * afterBundling(inputDir: string, outputDir: string): string[] { + * return [`cp ${inputDir}/my-binary.node ${outputDir}`]; + * } + * // ... + * } + */ +export interface ICommandHooks { + /** + * Returns commands to run before bundling. + * + * Commands are chained with `&&`. + */ + beforeBundling(inputDir: string, outputDir: string): string[]; + + /** + * Returns commands to run before installing node modules. + * + * This hook only runs when node modules are installed. + * + * Commands are chained with `&&`. + */ + beforeInstall(inputDir: string, outputDir: string): string[]; + + /** + * Returns commands to run after bundling. + * + * Commands are chained with `&&`. + */ + afterBundling(inputDir: string, outputDir: string): string[]; } diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/bundling.test.ts b/packages/@aws-cdk/aws-lambda-nodejs/test/bundling.test.ts index 44670f67fdee1..741501afd9551 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/bundling.test.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/bundling.test.ts @@ -255,3 +255,36 @@ test('Custom bundling docker image', () => { }), }); }); + +test('with command hooks', () => { + Bundling.bundle({ + entry, + depsLockFilePath, + runtime: Runtime.NODEJS_12_X, + commandHooks: { + beforeBundling(inputDir: string, outputDir: string): string[] { + return [ + `echo hello > ${inputDir}/a.txt`, + `cp ${inputDir}/a.txt ${outputDir}`, + ]; + }, + afterBundling(inputDir: string, outputDir: string): string[] { + return [`cp ${inputDir}/b.txt ${outputDir}/txt`]; + }, + beforeInstall() { + return []; + }, + }, + forceDockerBundling: true, + }); + + expect(Code.fromAsset).toHaveBeenCalledWith(path.dirname(depsLockFilePath), { + assetHashType: AssetHashType.OUTPUT, + bundling: expect.objectContaining({ + command: [ + 'bash', '-c', + expect.stringMatching(/^echo hello > \/asset-input\/a.txt && cp \/asset-input\/a.txt \/asset-output && .+ && cp \/asset-input\/b.txt \/asset-output\/txt$/), + ], + }), + }); +}); From f6b4334c59a1ac0bfb8b877baccb02b894ef24e4 Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Mon, 30 Nov 2020 09:48:26 +0000 Subject: [PATCH 229/314] fix(secretsmanager): secretName for owned secrets includes suffix (under feature flag) (#11736) Proper (tokenized) secret names for owned secrets was introduced in #11202. This caused `Secret.secretName` to return the full resource name (secret name + suffix) for owned secrets. This was done to ensure that the secretName was a Tokenized value that would create a dependency between the Secret and its consumer. However, Secrets Manager's DescribeSecret API does not accept the resourceName as an input; it accepts the full ARN, a partial ARN (without the suffix), or the secret name (without the suffix). This leads to several integrations with other services or custom scripts to fail when using the secretName from an owned Secret. For owned secrets, we can parse the resourceName to get the secretName based on either (a) knowing the secret name or (b) knowing the format that CloudFormation uses when secret names aren't specified. This fix introduces proper parsing of secret names for owned secrets (behind a feature flag). BREAKING CHANGE: (feature flag) Secret.secretName for owned secrets will now only the secret name (without suffix) and not the full resource name. This is enabled through the `@aws-cdk/secretsmanager:parseOwnedSecretName` flag. fixes #11727 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-secretsmanager/lib/secret.ts | 46 +- .../@aws-cdk/aws-secretsmanager/package.json | 2 + .../integ.secret-name-parsed.expected.json | 392 ++++++++++++++++++ .../.gitignore | 1 + .../integ.secret-name-parsed.handler/index.js | 21 + .../test/integ.secret-name-parsed.ts | 47 +++ .../aws-secretsmanager/test/secret.test.ts | 115 ++++- packages/@aws-cdk/cx-api/lib/features.ts | 13 +- 8 files changed, 619 insertions(+), 18 deletions(-) create mode 100644 packages/@aws-cdk/aws-secretsmanager/test/integ.secret-name-parsed.expected.json create mode 100644 packages/@aws-cdk/aws-secretsmanager/test/integ.secret-name-parsed.handler/.gitignore create mode 100644 packages/@aws-cdk/aws-secretsmanager/test/integ.secret-name-parsed.handler/index.js create mode 100644 packages/@aws-cdk/aws-secretsmanager/test/integ.secret-name-parsed.ts diff --git a/packages/@aws-cdk/aws-secretsmanager/lib/secret.ts b/packages/@aws-cdk/aws-secretsmanager/lib/secret.ts index 33bc8a709efcf..2b5361572e804 100644 --- a/packages/@aws-cdk/aws-secretsmanager/lib/secret.ts +++ b/packages/@aws-cdk/aws-secretsmanager/lib/secret.ts @@ -1,6 +1,7 @@ import * as iam from '@aws-cdk/aws-iam'; import * as kms from '@aws-cdk/aws-kms'; -import { IResource, RemovalPolicy, Resource, SecretValue, Stack, Token } from '@aws-cdk/core'; +import { FeatureFlags, Fn, IResource, RemovalPolicy, Resource, SecretValue, Stack, Token } from '@aws-cdk/core'; +import * as cxapi from '@aws-cdk/cx-api'; import { IConstruct, Construct } from 'constructs'; import { ResourcePolicy } from './policy'; import { RotationSchedule, RotationScheduleOptions } from './rotation-schedule'; @@ -30,7 +31,10 @@ export interface ISecret extends IResource { readonly secretFullArn?: string; /** - * The name of the secret + * The name of the secret. + * + * For "owned" secrets, this will be the full resource name (secret name + suffix), unless the + * '@aws-cdk/aws-secretsmanager:parseOwnedSecretName' feature flag is set. */ readonly secretName: string; @@ -437,7 +441,10 @@ export class Secret extends SecretBase { }); this.encryptionKey = props.encryptionKey; - this.secretName = parseSecretName(this, this.secretArn); + const parseOwnedSecretName = FeatureFlags.of(this).isEnabled(cxapi.SECRETS_MANAGER_PARSE_OWNED_SECRET_NAME); + this.secretName = parseOwnedSecretName + ? parseSecretNameForOwnedSecret(this, this.secretArn, props.secretName) + : parseSecretName(this, this.secretArn); // @see https://docs.aws.amazon.com/kms/latest/developerguide/services-secrets-manager.html#asm-authz const principal = @@ -707,6 +714,39 @@ function parseSecretName(construct: IConstruct, secretArn: string) { throw new Error('invalid ARN format; no secret name provided'); } +/** + * Parses the secret name from the ARN of an owned secret. With owned secrets we know a few things we don't with imported secrets: + * - The ARN is guaranteed to be a full ARN, with suffix. + * - The name -- if provided -- will tell us how many hyphens to expect in the final secret name. + * - If the name is not provided, we know the format used by CloudFormation for auto-generated names. + * + * Note: This is done rather than just returning the secret name passed in by the user to keep the relationship + * explicit between the Secret and wherever the secretName might be used (i.e., using Tokens). + */ +function parseSecretNameForOwnedSecret(construct: Construct, secretArn: string, secretName?: string) { + const resourceName = Stack.of(construct).parseArn(secretArn, ':').resourceName; + if (!resourceName) { + throw new Error('invalid ARN format; no secret name provided'); + } + + // Secret name was explicitly provided, but is unresolved; best option is to use it directly. + // If it came from another Secret, it should (hopefully) already be properly formatted. + if (secretName && Token.isUnresolved(secretName)) { + return secretName; + } + + // If no secretName was provided, the name will be automatically generated by CloudFormation. + // The autogenerated names have the form of `${logicalID}-${random}`. + // Otherwise, we can use the existing secretName to determine how to parse the resulting resourceName. + const secretNameHyphenatedSegments = secretName ? secretName.split('-').length : 2; + // 2 => [0, 1] + const segmentIndexes = [...new Array(secretNameHyphenatedSegments)].map((_, i) => i); + + // Create the secret name from the resource name by joining all the known segments together. + // This should have the effect of stripping the final hyphen and SecretManager suffix. + return Fn.join('-', segmentIndexes.map(i => Fn.select(i, Fn.split('-', resourceName)))); +} + /** Performs a best guess if an ARN is complete, based on if it ends with a 6-character suffix. */ function arnIsComplete(secretArn: string): boolean { return Token.isUnresolved(secretArn) || /-[a-z0-9]{6}$/i.test(secretArn); diff --git a/packages/@aws-cdk/aws-secretsmanager/package.json b/packages/@aws-cdk/aws-secretsmanager/package.json index 9cf9e71ee87e7..9c6c5a435b3a8 100644 --- a/packages/@aws-cdk/aws-secretsmanager/package.json +++ b/packages/@aws-cdk/aws-secretsmanager/package.json @@ -86,6 +86,7 @@ "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-sam": "0.0.0", "@aws-cdk/core": "0.0.0", + "@aws-cdk/cx-api": "0.0.0", "constructs": "^3.2.0" }, "peerDependencies": { @@ -95,6 +96,7 @@ "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-sam": "0.0.0", "@aws-cdk/core": "0.0.0", + "@aws-cdk/cx-api": "0.0.0", "constructs": "^3.2.0" }, "engines": { diff --git a/packages/@aws-cdk/aws-secretsmanager/test/integ.secret-name-parsed.expected.json b/packages/@aws-cdk/aws-secretsmanager/test/integ.secret-name-parsed.expected.json new file mode 100644 index 0000000000000..b1b91a239d649 --- /dev/null +++ b/packages/@aws-cdk/aws-secretsmanager/test/integ.secret-name-parsed.expected.json @@ -0,0 +1,392 @@ +{ + "Resources": { + "DefaultSecret67034726": { + "Type": "AWS::SecretsManager::Secret", + "Properties": { + "GenerateSecretString": {} + } + }, + "NamedSecret7CD5422D": { + "Type": "AWS::SecretsManager::Secret", + "Properties": { + "GenerateSecretString": {}, + "Name": "namedSecret" + } + }, + "NamedSecretWithHyphen6DC9716A": { + "Type": "AWS::SecretsManager::Secret", + "Properties": { + "GenerateSecretString": {}, + "Name": "named-secret-1" + } + }, + "AReallyLongLogicalIThatWillBeTrimmedBeforeItsUsedInTheName83476586": { + "Type": "AWS::SecretsManager::Secret", + "Properties": { + "GenerateSecretString": {} + } + }, + "CustomIntegVerificationSecretNameMatchesCustomResourceProviderRole4A6F8B2A": { + "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", + "Resource": [ + { + "Ref": "DefaultSecret67034726" + }, + { + "Ref": "NamedSecret7CD5422D" + }, + { + "Ref": "NamedSecretWithHyphen6DC9716A" + }, + { + "Ref": "AReallyLongLogicalIThatWillBeTrimmedBeforeItsUsedInTheName83476586" + } + ], + "Action": [ + "secretsmanager:DescribeSecret" + ] + } + ] + } + } + ] + } + }, + "CustomIntegVerificationSecretNameMatchesCustomResourceProviderHandler2A57F6AE": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Ref": "AssetParameters2a2da33f11dc6085a4843d85898c13b2798393e7650fbb994d866555e23f79e9S3BucketED542E1C" + }, + "S3Key": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParameters2a2da33f11dc6085a4843d85898c13b2798393e7650fbb994d866555e23f79e9S3VersionKey10487FD6" + } + ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParameters2a2da33f11dc6085a4843d85898c13b2798393e7650fbb994d866555e23f79e9S3VersionKey10487FD6" + } + ] + } + ] + } + ] + ] + } + }, + "Timeout": 900, + "MemorySize": 128, + "Handler": "__entrypoint__.handler", + "Role": { + "Fn::GetAtt": [ + "CustomIntegVerificationSecretNameMatchesCustomResourceProviderRole4A6F8B2A", + "Arn" + ] + }, + "Runtime": "nodejs12.x" + }, + "DependsOn": [ + "CustomIntegVerificationSecretNameMatchesCustomResourceProviderRole4A6F8B2A" + ] + }, + "SecretNameVerification": { + "Type": "Custom::IntegVerificationSecretNameMatches", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "CustomIntegVerificationSecretNameMatchesCustomResourceProviderHandler2A57F6AE", + "Arn" + ] + }, + "Secrets": [ + { + "secretArn": { + "Ref": "DefaultSecret67034726" + }, + "secretName": { + "Fn::Join": [ + "-", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "-", + { + "Fn::Select": [ + 6, + { + "Fn::Split": [ + ":", + { + "Ref": "DefaultSecret67034726" + } + ] + } + ] + } + ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "-", + { + "Fn::Select": [ + 6, + { + "Fn::Split": [ + ":", + { + "Ref": "DefaultSecret67034726" + } + ] + } + ] + } + ] + } + ] + } + ] + ] + } + }, + { + "secretArn": { + "Ref": "NamedSecret7CD5422D" + }, + "secretName": { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "-", + { + "Fn::Select": [ + 6, + { + "Fn::Split": [ + ":", + { + "Ref": "NamedSecret7CD5422D" + } + ] + } + ] + } + ] + } + ] + } + }, + { + "secretArn": { + "Ref": "NamedSecretWithHyphen6DC9716A" + }, + "secretName": { + "Fn::Join": [ + "-", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "-", + { + "Fn::Select": [ + 6, + { + "Fn::Split": [ + ":", + { + "Ref": "NamedSecretWithHyphen6DC9716A" + } + ] + } + ] + } + ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "-", + { + "Fn::Select": [ + 6, + { + "Fn::Split": [ + ":", + { + "Ref": "NamedSecretWithHyphen6DC9716A" + } + ] + } + ] + } + ] + } + ] + }, + { + "Fn::Select": [ + 2, + { + "Fn::Split": [ + "-", + { + "Fn::Select": [ + 6, + { + "Fn::Split": [ + ":", + { + "Ref": "NamedSecretWithHyphen6DC9716A" + } + ] + } + ] + } + ] + } + ] + } + ] + ] + } + }, + { + "secretArn": { + "Ref": "AReallyLongLogicalIThatWillBeTrimmedBeforeItsUsedInTheName83476586" + }, + "secretName": { + "Fn::Join": [ + "-", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "-", + { + "Fn::Select": [ + 6, + { + "Fn::Split": [ + ":", + { + "Ref": "AReallyLongLogicalIThatWillBeTrimmedBeforeItsUsedInTheName83476586" + } + ] + } + ] + } + ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "-", + { + "Fn::Select": [ + 6, + { + "Fn::Split": [ + ":", + { + "Ref": "AReallyLongLogicalIThatWillBeTrimmedBeforeItsUsedInTheName83476586" + } + ] + } + ] + } + ] + } + ] + } + ] + ] + } + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + }, + "Parameters": { + "AssetParameters2a2da33f11dc6085a4843d85898c13b2798393e7650fbb994d866555e23f79e9S3BucketED542E1C": { + "Type": "String", + "Description": "S3 bucket for asset \"2a2da33f11dc6085a4843d85898c13b2798393e7650fbb994d866555e23f79e9\"" + }, + "AssetParameters2a2da33f11dc6085a4843d85898c13b2798393e7650fbb994d866555e23f79e9S3VersionKey10487FD6": { + "Type": "String", + "Description": "S3 key for asset version \"2a2da33f11dc6085a4843d85898c13b2798393e7650fbb994d866555e23f79e9\"" + }, + "AssetParameters2a2da33f11dc6085a4843d85898c13b2798393e7650fbb994d866555e23f79e9ArtifactHashB26239A1": { + "Type": "String", + "Description": "Artifact hash for asset \"2a2da33f11dc6085a4843d85898c13b2798393e7650fbb994d866555e23f79e9\"" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-secretsmanager/test/integ.secret-name-parsed.handler/.gitignore b/packages/@aws-cdk/aws-secretsmanager/test/integ.secret-name-parsed.handler/.gitignore new file mode 100644 index 0000000000000..033e6722bb6e0 --- /dev/null +++ b/packages/@aws-cdk/aws-secretsmanager/test/integ.secret-name-parsed.handler/.gitignore @@ -0,0 +1 @@ +!index.js diff --git a/packages/@aws-cdk/aws-secretsmanager/test/integ.secret-name-parsed.handler/index.js b/packages/@aws-cdk/aws-secretsmanager/test/integ.secret-name-parsed.handler/index.js new file mode 100644 index 0000000000000..758813d070cc5 --- /dev/null +++ b/packages/@aws-cdk/aws-secretsmanager/test/integ.secret-name-parsed.handler/index.js @@ -0,0 +1,21 @@ +/* eslint-disable no-console */ +var AWS = require('aws-sdk'); + +exports.handler = async function (event) { + const props = event.ResourceProperties; + + if (event.RequestType === 'Create' || event.RequestType === 'Update') { + const secretsmanager = new AWS.SecretsManager(); + console.log(`Secrets to validate: ${props.Secrets}`); + for (const secret of props.Secrets) { + await validateSecretNameMatchesExpected(secretsmanager, secret); + } + } +} + +async function validateSecretNameMatchesExpected(secretsmanager, secretInfo) { + const secret = await secretsmanager.describeSecret({ SecretId: secretInfo.secretArn }).promise(); + if (secretInfo.secretName !== secret.Name) { + throw new Error(`Actual secret name doesn't match expected. Actual: (${secret.Name}), Expected: (${secretInfo.secretName})`); + } +} diff --git a/packages/@aws-cdk/aws-secretsmanager/test/integ.secret-name-parsed.ts b/packages/@aws-cdk/aws-secretsmanager/test/integ.secret-name-parsed.ts new file mode 100644 index 0000000000000..49dde40e8b9f4 --- /dev/null +++ b/packages/@aws-cdk/aws-secretsmanager/test/integ.secret-name-parsed.ts @@ -0,0 +1,47 @@ +import * as path from 'path'; +import * as cdk from '@aws-cdk/core'; +import * as secretsmanager from '../lib'; + +/** + * Creates several secrets, with varying names and IDs, with the parseOwnedSecretName feature flag set, + * to verify the secretName returned by `Secret.secretName` matches the `Name` returned by `DescribeSecrets`. + */ + +class SecretsManagerStack extends cdk.Stack { + constructor(scope: cdk.App, id: string) { + super(scope, id); + + const defaultSecret = new secretsmanager.Secret(this, 'DefaultSecret'); + const namedSecret = new secretsmanager.Secret(this, 'NamedSecret', { secretName: 'namedSecret' }); + const namedSecretWithHyphen = new secretsmanager.Secret(this, 'NamedSecretWithHyphen', { secretName: 'named-secret-1' }); + const longSecret = new secretsmanager.Secret(this, 'AReallyLongLogicalIThatWillBeTrimmedBeforeItsUsedInTheName'); + + const secrets = [defaultSecret, namedSecret, namedSecretWithHyphen, longSecret]; + + const resourceType = 'Custom::IntegVerificationSecretNameMatches'; + const serviceToken = cdk.CustomResourceProvider.getOrCreate(this, resourceType, { + codeDirectory: path.join(__dirname, 'integ.secret-name-parsed.handler'), + runtime: cdk.CustomResourceProviderRuntime.NODEJS_12, + policyStatements: [{ + Effect: 'Allow', + Resource: secrets.map(s => s.secretArn), + Action: ['secretsmanager:DescribeSecret'], + }], + }); + new cdk.CustomResource(this, 'SecretNameVerification', { + resourceType: resourceType, + serviceToken, + properties: { + Secrets: secrets.map(s => ({ secretArn: s.secretArn, secretName: s.secretName })), + }, + }); + } +} + +const app = new cdk.App({ + context: { + '@aws-cdk/aws-secretsmanager:parseOwnedSecretName': 'true', + }, +}); +new SecretsManagerStack(app, 'Integ-SecretsManager-ParsedSecretName'); +app.synth(); diff --git a/packages/@aws-cdk/aws-secretsmanager/test/secret.test.ts b/packages/@aws-cdk/aws-secretsmanager/test/secret.test.ts index 0e56a72bc3c54..22dae639500dd 100644 --- a/packages/@aws-cdk/aws-secretsmanager/test/secret.test.ts +++ b/packages/@aws-cdk/aws-secretsmanager/test/secret.test.ts @@ -1,14 +1,16 @@ import '@aws-cdk/assert/jest'; -import { ResourcePart } from '@aws-cdk/assert'; +import { expect as assertExpect, ResourcePart } from '@aws-cdk/assert'; import * as iam from '@aws-cdk/aws-iam'; import * as kms from '@aws-cdk/aws-kms'; import * as lambda from '@aws-cdk/aws-lambda'; import * as cdk from '@aws-cdk/core'; import * as secretsmanager from '../lib'; +let app: cdk.App; let stack: cdk.Stack; beforeEach(() => { - stack = new cdk.Stack(); + app = new cdk.App(); + stack = new cdk.Stack(app); }); test('default secret', () => { @@ -426,18 +428,106 @@ test('secretValue', () => { }); describe('secretName', () => { - test.each([undefined, 'mySecret'])('when secretName is %s', (secretName) => { - const secret = new secretsmanager.Secret(stack, 'Secret', { - secretName, + describe('without @aws-cdk/aws-secretsmanager:parseOwnedSecretName set', () => { + test.each([undefined, 'mySecret'])('when secretName is %s', (secretName) => { + const secret = new secretsmanager.Secret(stack, 'Secret', { + secretName, + }); + new cdk.CfnOutput(stack, 'MySecretName', { + value: secret.secretName, + }); + + // Creates secret name by parsing ARN. + expect(stack).toHaveOutput({ + outputName: 'MySecretName', + outputValue: { 'Fn::Select': [6, { 'Fn::Split': [':', { Ref: 'SecretA720EF05' }] }] }, + }); }); - new cdk.CfnOutput(stack, 'MySecretName', { - value: secret.secretName, + }); + + describe('with @aws-cdk/aws-secretsmanager:parseOwnedSecretName set', () => { + beforeEach(() => { + app = new cdk.App({ + context: { + '@aws-cdk/aws-secretsmanager:parseOwnedSecretName': 'true', + }, + }); + stack = new cdk.Stack(app); + }); + + test('selects the first two parts of the resource name when the name is auto-generated', () => { + const secret = new secretsmanager.Secret(stack, 'Secret'); + new cdk.CfnOutput(stack, 'MySecretName', { + value: secret.secretName, + }); + + const resourceName = { 'Fn::Select': [6, { 'Fn::Split': [':', { Ref: 'SecretA720EF05' }] }] }; + + expect(stack).toHaveOutput({ + outputName: 'MySecretName', + outputValue: { + 'Fn::Join': ['-', [ + { 'Fn::Select': [0, { 'Fn::Split': ['-', resourceName] }] }, + { 'Fn::Select': [1, { 'Fn::Split': ['-', resourceName] }] }, + ]], + }, + }); + }); + + test('is simply the first segment when the provided secret name has no hyphens', () => { + const secret = new secretsmanager.Secret(stack, 'Secret', { secretName: 'mySecret' }); + new cdk.CfnOutput(stack, 'MySecretName', { + value: secret.secretName, + }); + + const resourceName = { 'Fn::Select': [6, { 'Fn::Split': [':', { Ref: 'SecretA720EF05' }] }] }; + + expect(stack).toHaveOutput({ + outputName: 'MySecretName', + outputValue: { + 'Fn::Select': [0, { 'Fn::Split': ['-', resourceName] }], + }, + }); + }); + + test.each([ + [2, 'my-secret'], + [3, 'my-secret-hyphenated'], + [4, 'my-secret-with-hyphens'], + ])('selects the %n parts of the resource name when the secret name is provided', (segments, secretName) => { + const secret = new secretsmanager.Secret(stack, 'Secret', { secretName }); + new cdk.CfnOutput(stack, 'MySecretName', { + value: secret.secretName, + }); + + const resourceName = { 'Fn::Select': [6, { 'Fn::Split': [':', { Ref: 'SecretA720EF05' }] }] }; + const secretNameSegments = []; + for (let i = 0; i < segments; i++) { + secretNameSegments.push({ 'Fn::Select': [i, { 'Fn::Split': ['-', resourceName] }] }); + } + + expect(stack).toHaveOutput({ + outputName: 'MySecretName', + outputValue: { + 'Fn::Join': ['-', secretNameSegments], + }, + }); }); - // Creates secret name by parsing ARN. - expect(stack).toHaveOutput({ - outputName: 'MySecretName', - outputValue: { 'Fn::Select': [6, { 'Fn::Split': [':', { Ref: 'SecretA720EF05' }] }] }, + test('uses existing Tokens as secret names as-is', () => { + const secret1 = new secretsmanager.Secret(stack, 'Secret1'); + const secret2 = new secretsmanager.Secret(stack, 'Secret2', { + secretName: secret1.secretName, + }); + new cdk.CfnOutput(stack, 'MySecretName1', { + value: secret1.secretName, + }); + new cdk.CfnOutput(stack, 'MySecretName2', { + value: secret2.secretName, + }); + + const outputs = assertExpect(stack).value.Outputs; + expect(outputs.MySecretName1).toEqual(outputs.MySecretName2); }); }); }); @@ -492,7 +582,6 @@ test('import by secretArn does not strip suffixes unless the suffix length is si test('import by secretArn supports tokens for ARNs', () => { // GIVEN - const app = new cdk.App(); const stackA = new cdk.Stack(app, 'StackA'); const stackB = new cdk.Stack(app, 'StackB'); const secretA = new secretsmanager.Secret(stackA, 'SecretA'); @@ -862,7 +951,6 @@ test('can add to the resource policy of a secret', () => { test('fails if secret policy has no actions', () => { // GIVEN - const app = new cdk.App(); stack = new cdk.Stack(app, 'my-stack'); const secret = new secretsmanager.Secret(stack, 'Secret'); @@ -878,7 +966,6 @@ test('fails if secret policy has no actions', () => { test('fails if secret policy has no IAM principals', () => { // GIVEN - const app = new cdk.App(); stack = new cdk.Stack(app, 'my-stack'); const secret = new secretsmanager.Secret(stack, 'Secret'); diff --git a/packages/@aws-cdk/cx-api/lib/features.ts b/packages/@aws-cdk/cx-api/lib/features.ts index d28a88071f10d..84485ddf3c416 100644 --- a/packages/@aws-cdk/cx-api/lib/features.ts +++ b/packages/@aws-cdk/cx-api/lib/features.ts @@ -56,6 +56,15 @@ export const STACK_RELATIVE_EXPORTS_CONTEXT = '@aws-cdk/core:stackRelativeExport */ export const DOCKER_IGNORE_SUPPORT = '@aws-cdk/aws-ecr-assets:dockerIgnoreSupport'; +/** + * Secret.secretName for an "owned" secret will attempt to parse the secretName from the ARN, + * rather than the default full resource name, which includes the SecretsManager suffix. + * + * If this flag is not set, Secret.secretName will include the SecretsManager suffix, which cannot be directly + * used by SecretsManager.DescribeSecret, and must be parsed by the user first (e.g., Fn:Join, Fn:Select, Fn:Split). + */ +export const SECRETS_MANAGER_PARSE_OWNED_SECRET_NAME = '@aws-cdk/aws-secretsmanager:parseOwnedSecretName'; + /** * This map includes context keys and values for feature flags that enable * capabilities "from the future", which we could not introduce as the default @@ -74,6 +83,7 @@ export const FUTURE_FLAGS = { [ENABLE_DIFF_NO_FAIL_CONTEXT]: 'true', [STACK_RELATIVE_EXPORTS_CONTEXT]: 'true', [DOCKER_IGNORE_SUPPORT]: true, + [SECRETS_MANAGER_PARSE_OWNED_SECRET_NAME]: true, // We will advertise this flag when the feature is complete // [NEW_STYLE_STACK_SYNTHESIS_CONTEXT]: 'true', @@ -89,8 +99,9 @@ const FUTURE_FLAGS_DEFAULTS: { [key: string]: boolean } = { [STACK_RELATIVE_EXPORTS_CONTEXT]: false, [NEW_STYLE_STACK_SYNTHESIS_CONTEXT]: false, [DOCKER_IGNORE_SUPPORT]: false, + [SECRETS_MANAGER_PARSE_OWNED_SECRET_NAME]: false, }; export function futureFlagDefault(flag: string): boolean { return FUTURE_FLAGS_DEFAULTS[flag]; -} \ No newline at end of file +} From 6fd049d8e405909ad80743702d0d76151d37dffa Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 30 Nov 2020 10:40:16 +0000 Subject: [PATCH 230/314] chore(deps-dev): bump @types/archiver from 3.1.1 to 5.1.0 (#11781) Bumps [@types/archiver](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/archiver) from 3.1.1 to 5.1.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/archiver) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index e66a321fc2f06..cad79354de315 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -39,7 +39,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/core": "0.0.0", - "@types/archiver": "^3.1.1", + "@types/archiver": "^5.1.0", "@types/fs-extra": "^8.1.1", "@types/glob": "^7.1.3", "@types/jest": "^26.0.15", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index 24bc67075c70f..d2b4361fb9133 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -30,7 +30,7 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/archiver": "^3.1.1", + "@types/archiver": "^5.1.0", "@types/glob": "^7.1.3", "@types/jest": "^26.0.15", "@types/jszip": "^3.4.1", diff --git a/yarn.lock b/yarn.lock index dfe5ea7785597..51c00d7537e47 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1493,10 +1493,10 @@ resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== -"@types/archiver@^3.1.1": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@types/archiver/-/archiver-3.1.1.tgz#10cc1be44af8911e57484342c7b3b32a5f178a1a" - integrity sha512-TzVZ9204sH1TuFylfr1cw/AA/3/VldAAXswEwKLXUOzA9mDg+m6gHF9EaqKNlozcjc6knX5m1KAqJzksPLSEfw== +"@types/archiver@^5.1.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@types/archiver/-/archiver-5.1.0.tgz#869f4ce4028e49cf9a0243cf914415f4cc3d1f3d" + integrity sha512-baFOhanb/hxmcOd1Uey2TfFg43kTSmM6py1Eo7Rjbv/ivcl7PXLhY0QgXGf50Hx/eskGCFqPfhs/7IZLb15C5g== dependencies: "@types/glob" "*" From f5c177db6db3c6c27f294da85ee2bc33719a32ab Mon Sep 17 00:00:00 2001 From: Jonathan Goldwasser Date: Mon, 30 Nov 2020 13:07:06 +0100 Subject: [PATCH 231/314] chore(lambda-nodejs): ignore assets in integ tests (#11777) Ignore assets in integration tests. Updates to `esbuild` can cause the bundles to be slighlty different and what we want here is to check that we can still correctly bundle. Closes #11772 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-lambda-nodejs/package.json | 2 +- .../test/integ.dependencies.expected.json | 18 ++-- .../test/integ.dependencies.ts | 1 + .../test/integ.function.expected.json | 18 ++-- .../aws-lambda-nodejs/test/integ.function.ts | 1 + yarn.lock | 102 ++++++++++++++++-- 6 files changed, 116 insertions(+), 26 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda-nodejs/package.json b/packages/@aws-cdk/aws-lambda-nodejs/package.json index 2391a9015d690..afb611e22c6bb 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/package.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/package.json @@ -68,7 +68,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "delay": "4.4.0", - "esbuild": "^0.8.9", + "esbuild": "^0.8.17", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.dependencies.expected.json b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.dependencies.expected.json index 89a8de563b17f..75ecb420e7ef5 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.dependencies.expected.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.dependencies.expected.json @@ -36,7 +36,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParametersa366acc095e9c09f74bf0dd7cd338214dc3b201ad849c56e33912eb3c85785e1S3Bucket70E87BF4" + "Ref": "AssetParameters2ff0fab1efcce787182abdd9a3c77a111379358a40cb16d90d7eb7c71ed11835S3BucketF29906B2" }, "S3Key": { "Fn::Join": [ @@ -49,7 +49,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParametersa366acc095e9c09f74bf0dd7cd338214dc3b201ad849c56e33912eb3c85785e1S3VersionKey888B2605" + "Ref": "AssetParameters2ff0fab1efcce787182abdd9a3c77a111379358a40cb16d90d7eb7c71ed11835S3VersionKey320A7F12" } ] } @@ -62,7 +62,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParametersa366acc095e9c09f74bf0dd7cd338214dc3b201ad849c56e33912eb3c85785e1S3VersionKey888B2605" + "Ref": "AssetParameters2ff0fab1efcce787182abdd9a3c77a111379358a40cb16d90d7eb7c71ed11835S3VersionKey320A7F12" } ] } @@ -92,17 +92,17 @@ } }, "Parameters": { - "AssetParametersa366acc095e9c09f74bf0dd7cd338214dc3b201ad849c56e33912eb3c85785e1S3Bucket70E87BF4": { + "AssetParameters2ff0fab1efcce787182abdd9a3c77a111379358a40cb16d90d7eb7c71ed11835S3BucketF29906B2": { "Type": "String", - "Description": "S3 bucket for asset \"a366acc095e9c09f74bf0dd7cd338214dc3b201ad849c56e33912eb3c85785e1\"" + "Description": "S3 bucket for asset \"2ff0fab1efcce787182abdd9a3c77a111379358a40cb16d90d7eb7c71ed11835\"" }, - "AssetParametersa366acc095e9c09f74bf0dd7cd338214dc3b201ad849c56e33912eb3c85785e1S3VersionKey888B2605": { + "AssetParameters2ff0fab1efcce787182abdd9a3c77a111379358a40cb16d90d7eb7c71ed11835S3VersionKey320A7F12": { "Type": "String", - "Description": "S3 key for asset version \"a366acc095e9c09f74bf0dd7cd338214dc3b201ad849c56e33912eb3c85785e1\"" + "Description": "S3 key for asset version \"2ff0fab1efcce787182abdd9a3c77a111379358a40cb16d90d7eb7c71ed11835\"" }, - "AssetParametersa366acc095e9c09f74bf0dd7cd338214dc3b201ad849c56e33912eb3c85785e1ArtifactHash01A9D743": { + "AssetParameters2ff0fab1efcce787182abdd9a3c77a111379358a40cb16d90d7eb7c71ed11835ArtifactHash9E439F77": { "Type": "String", - "Description": "Artifact hash for asset \"a366acc095e9c09f74bf0dd7cd338214dc3b201ad849c56e33912eb3c85785e1\"" + "Description": "Artifact hash for asset \"2ff0fab1efcce787182abdd9a3c77a111379358a40cb16d90d7eb7c71ed11835\"" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.dependencies.ts b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.dependencies.ts index 28825543a31d3..a4418867356e7 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.dependencies.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.dependencies.ts @@ -1,3 +1,4 @@ +/// !cdk-integ pragma:ignore-assets import * as path from 'path'; import { Runtime } from '@aws-cdk/aws-lambda'; import { App, Stack, StackProps } from '@aws-cdk/core'; diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.expected.json b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.expected.json index 97a6b1425b48a..e41f6a5cc565e 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.expected.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.expected.json @@ -36,7 +36,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParameters87629d6d123a6c9871926864abde04a406be93834dc008b18672bd287d37756eS3BucketDF2E98AE" + "Ref": "AssetParameters1f516d02fb984ea91e74064999e8508f09dd0001d2cf198ccc376d2c0fcd14dcS3Bucket499E594B" }, "S3Key": { "Fn::Join": [ @@ -49,7 +49,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters87629d6d123a6c9871926864abde04a406be93834dc008b18672bd287d37756eS3VersionKey240B23FB" + "Ref": "AssetParameters1f516d02fb984ea91e74064999e8508f09dd0001d2cf198ccc376d2c0fcd14dcS3VersionKey0D51A516" } ] } @@ -62,7 +62,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters87629d6d123a6c9871926864abde04a406be93834dc008b18672bd287d37756eS3VersionKey240B23FB" + "Ref": "AssetParameters1f516d02fb984ea91e74064999e8508f09dd0001d2cf198ccc376d2c0fcd14dcS3VersionKey0D51A516" } ] } @@ -835,17 +835,17 @@ } }, "Parameters": { - "AssetParameters87629d6d123a6c9871926864abde04a406be93834dc008b18672bd287d37756eS3BucketDF2E98AE": { + "AssetParameters1f516d02fb984ea91e74064999e8508f09dd0001d2cf198ccc376d2c0fcd14dcS3Bucket499E594B": { "Type": "String", - "Description": "S3 bucket for asset \"87629d6d123a6c9871926864abde04a406be93834dc008b18672bd287d37756e\"" + "Description": "S3 bucket for asset \"1f516d02fb984ea91e74064999e8508f09dd0001d2cf198ccc376d2c0fcd14dc\"" }, - "AssetParameters87629d6d123a6c9871926864abde04a406be93834dc008b18672bd287d37756eS3VersionKey240B23FB": { + "AssetParameters1f516d02fb984ea91e74064999e8508f09dd0001d2cf198ccc376d2c0fcd14dcS3VersionKey0D51A516": { "Type": "String", - "Description": "S3 key for asset version \"87629d6d123a6c9871926864abde04a406be93834dc008b18672bd287d37756e\"" + "Description": "S3 key for asset version \"1f516d02fb984ea91e74064999e8508f09dd0001d2cf198ccc376d2c0fcd14dc\"" }, - "AssetParameters87629d6d123a6c9871926864abde04a406be93834dc008b18672bd287d37756eArtifactHashC957048B": { + "AssetParameters1f516d02fb984ea91e74064999e8508f09dd0001d2cf198ccc376d2c0fcd14dcArtifactHashECB545C0": { "Type": "String", - "Description": "Artifact hash for asset \"87629d6d123a6c9871926864abde04a406be93834dc008b18672bd287d37756e\"" + "Description": "Artifact hash for asset \"1f516d02fb984ea91e74064999e8508f09dd0001d2cf198ccc376d2c0fcd14dc\"" }, "AssetParameters565126ff75ab727f0b3a67e78cf0fa9996426d1458123e8d6ee81c7ea93a6cfaS3BucketDFAA619E": { "Type": "String", diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.ts b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.ts index 1c700d9b4d55c..f08a041178e5e 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.ts @@ -1,3 +1,4 @@ +/// !cdk-integ pragma:ignore-assets import * as path from 'path'; import { Vpc } from '@aws-cdk/aws-ec2'; import { Runtime } from '@aws-cdk/aws-lambda'; diff --git a/yarn.lock b/yarn.lock index 51c00d7537e47..a47c414f52354 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2057,6 +2057,11 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" +app-root-path@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.2.1.tgz#d0df4a682ee408273583d43f6f79e9892624bc9a" + integrity sha512-91IFKeKk7FjfmezPKkwtaRvSpnUc4gDwPAjA1YZ9Gn0q0PPeW+vbeUsZuyDwjI7+QTHhcLen2v25fi/AmhvbJA== + append-transform@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab" @@ -2294,7 +2299,7 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" -aws-sdk@^2.637.0, aws-sdk@^2.799.0: +aws-sdk@^2.596.0, aws-sdk@^2.637.0, aws-sdk@^2.799.0: version "2.799.0" resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.799.0.tgz#8b1a64c1a9f8ccf5794eb07bdd8051e4cb6adcfd" integrity sha512-NYAoiNU+bJXhlJsC0rFqrmD5t5ho7/VxldmziP6HLPYHfOCI9Uvk6UVjfPmhLWPm0mHnIxhsHqmsNGyjhHNYmw== @@ -3840,6 +3845,16 @@ dot-prop@^5.1.0: dependencies: is-obj "^2.0.0" +dotenv-json@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/dotenv-json/-/dotenv-json-1.0.0.tgz#fc7f672aafea04bed33818733b9f94662332815c" + integrity sha512-jAssr+6r4nKhKRudQ0HOzMskOFFi9+ubXWwmrSGJFgTvpjyPXCXsCsYbjif6mXp7uxA7xY3/LGaiTQukZzSbOQ== + +dotenv@^8.0.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" + integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== + dotgitignore@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/dotgitignore/-/dotgitignore-2.1.0.tgz#a4b15a4e4ef3cf383598aaf1dfa4a04bcc089b7b" @@ -4025,10 +4040,10 @@ es6-promisify@^5.0.0: dependencies: es6-promise "^4.0.3" -esbuild@^0.8.9: - version "0.8.9" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.8.9.tgz#e2b4254ee7aabb23e88c9d4abb38a16668856569" - integrity sha512-HAV4mKJqos0L8g6pL7evrw/ZPm478yFNtkuYhqJAeTrIW40XtBxhHrt4Pm2faYeRB8K6nA7dTDgmF+O0e9JCXQ== +esbuild@^0.8.17: + version "0.8.17" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.8.17.tgz#1c16c6d5988dcfdcf27a7e1612b7fd05e1477c54" + integrity sha512-ReHap+Iyn5BQF0B8F3xrLwu+j57ri5uDUw2ej9XTPAuFDebYiWwRzBY4jhF610bklveXLbCGim/8/2wQKQlu1w== escalade@^3.1.1: version "3.1.1" @@ -4062,6 +4077,11 @@ escodegen@^1.14.1, escodegen@^1.8.1: optionalDependencies: source-map "~0.6.1" +eslint-config-standard@^14.1.1: + version "14.1.1" + resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz#830a8e44e7aef7de67464979ad06b406026c56ea" + integrity sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg== + eslint-import-resolver-node@^0.3.4: version "0.3.4" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" @@ -4089,6 +4109,14 @@ eslint-module-utils@^2.6.0: debug "^2.6.9" pkg-dir "^2.0.0" +eslint-plugin-es@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893" + integrity sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ== + dependencies: + eslint-utils "^2.0.0" + regexpp "^3.0.0" + eslint-plugin-import@^2.22.1: version "2.22.1" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz#0896c7e6a0cf44109a2d97b95903c2bb689d7702" @@ -4108,11 +4136,33 @@ eslint-plugin-import@^2.22.1: resolve "^1.17.0" tsconfig-paths "^3.9.0" +eslint-plugin-node@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d" + integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g== + dependencies: + eslint-plugin-es "^3.0.0" + eslint-utils "^2.0.0" + ignore "^5.1.1" + minimatch "^3.0.4" + resolve "^1.10.1" + semver "^6.1.0" + +eslint-plugin-promise@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz#845fd8b2260ad8f82564c1222fce44ad71d9418a" + integrity sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw== + eslint-plugin-rulesdir@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/eslint-plugin-rulesdir/-/eslint-plugin-rulesdir-0.1.0.tgz#ad144d7e98464fda82963eff3fab331aecb2bf08" integrity sha1-rRRNfphGT9qClj7/P6szGuyyvwg= +eslint-plugin-standard@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.1.0.tgz#0c3bf3a67e853f8bbbc580fb4945fbf16f41b7c5" + integrity sha512-ZL7+QRixjTR6/528YNGyDotyffm5OQst/sGxKDwGb9Uqs4In5Egi4+jbobhqJoyoCM6/7v/1A5fhQ7ScMtDjaQ== + eslint-scope@^5.0.0, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -5212,7 +5262,7 @@ ignore@^4.0.3, ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.1.4, ignore@^5.1.8: +ignore@^5.1.1, ignore@^5.1.4, ignore@^5.1.8: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== @@ -5405,6 +5455,13 @@ is-core-module@^2.0.0: dependencies: has "^1.0.3" +is-core-module@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" + integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== + dependencies: + has "^1.0.3" + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -6488,6 +6545,24 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== +lambda-leak@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lambda-leak/-/lambda-leak-2.0.0.tgz#771985d3628487f6e885afae2b54510dcfb2cd7e" + integrity sha1-dxmF02KEh/boha+uK1RRDc+yzX4= + +lambda-tester@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/lambda-tester/-/lambda-tester-3.6.0.tgz#ceb7d4f4f0da768487a05cff37dcd088508b5247" + integrity sha512-F2ZTGWCLyIR95o/jWK46V/WnOCFAEUG/m/V7/CLhPJ7PCM+pror1rZ6ujP3TkItSGxUfpJi0kqwidw+M/nEqWw== + dependencies: + app-root-path "^2.2.1" + dotenv "^8.0.0" + dotenv-json "^1.0.0" + lambda-leak "^2.0.0" + semver "^6.1.1" + uuid "^3.3.2" + vandium-utils "^1.1.1" + lazystream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" @@ -8613,6 +8688,14 @@ resolve@^1.1.6, resolve@^1.10.0, resolve@^1.11.1, resolve@^1.13.1, resolve@^1.17 dependencies: path-parse "^1.0.6" +resolve@^1.10.1: + version "1.19.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" + integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== + dependencies: + is-core-module "^2.1.0" + path-parse "^1.0.6" + resolve@^1.18.1: version "1.18.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.18.1.tgz#018fcb2c5b207d2a6424aee361c5a266da8f4130" @@ -8770,7 +8853,7 @@ semver@7.x, semver@^7.1.1, semver@^7.2.1, semver@^7.3.2: resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== -semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: +semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -10136,6 +10219,11 @@ validate-npm-package-name@^3.0.0: dependencies: builtins "^1.0.3" +vandium-utils@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/vandium-utils/-/vandium-utils-1.2.0.tgz#44735de4b7641a05de59ebe945f174e582db4f59" + integrity sha1-RHNd5LdkGgXeWevpRfF05YLbT1k= + verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" From 2a48cb8a29c0893a508c31d1b5937a93b92b4a98 Mon Sep 17 00:00:00 2001 From: Taliesin Millhouse Date: Mon, 30 Nov 2020 23:37:59 +1100 Subject: [PATCH 232/314] docs(cognito): fix 'sign in' doc typo (#11778) Fixed small typo. --- packages/@aws-cdk/aws-cognito/lib/user-pool.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool.ts index 3730c7c97a301..960d14bb8b426 100644 --- a/packages/@aws-cdk/aws-cognito/lib/user-pool.ts +++ b/packages/@aws-cdk/aws-cognito/lib/user-pool.ts @@ -34,7 +34,7 @@ export interface SignInAliases { readonly phone?: boolean; /** - * Whether a user is allowed to ign in with a secondary username, that can be set and modified after sign up. + * Whether a user is allowed to sign in with a secondary username, that can be set and modified after sign up. * Can only be used in conjunction with `USERNAME`. * @default false */ From 7b8b6656f909a023d8d66445b58d2d5b9dde1c15 Mon Sep 17 00:00:00 2001 From: Ayush Goyal Date: Mon, 30 Nov 2020 20:51:54 +0530 Subject: [PATCH 233/314] fix(sqs): queueUrl property has incorrect region and account for imported queue (#11651) fix(sqs): imported queue using incorrect options to generate queueUrl Currently if we use `fromQueueArn` static helper to import an existing queue, the generated `queueUrl` property uses incorrect account and region. It uses the stack's region/account in which it is imported rather than the one in which it was created. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-sqs/lib/queue.ts | 5 +++-- packages/@aws-cdk/aws-sqs/test/test.sqs.ts | 21 ++++++++++++++++++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/aws-sqs/lib/queue.ts b/packages/@aws-cdk/aws-sqs/lib/queue.ts index 2d95f60f4748e..63b466de84421 100644 --- a/packages/@aws-cdk/aws-sqs/lib/queue.ts +++ b/packages/@aws-cdk/aws-sqs/lib/queue.ts @@ -197,8 +197,9 @@ export class Queue extends QueueBase { */ public static fromQueueAttributes(scope: Construct, id: string, attrs: QueueAttributes): IQueue { const stack = Stack.of(scope); - const queueName = attrs.queueName || stack.parseArn(attrs.queueArn).resource; - const queueUrl = attrs.queueUrl || `https://sqs.${stack.region}.${stack.urlSuffix}/${stack.account}/${queueName}`; + const parsedArn = stack.parseArn(attrs.queueArn); + const queueName = attrs.queueName || parsedArn.resource; + const queueUrl = attrs.queueUrl || `https://sqs.${parsedArn.region}.${stack.urlSuffix}/${parsedArn.account}/${queueName}`; class Import extends QueueBase { public readonly queueArn = attrs.queueArn; // arn:aws:sqs:us-east-1:123456789012:queue1 diff --git a/packages/@aws-cdk/aws-sqs/test/test.sqs.ts b/packages/@aws-cdk/aws-sqs/test/test.sqs.ts index afcc44beadc5b..87e38c2dcf2ca 100644 --- a/packages/@aws-cdk/aws-sqs/test/test.sqs.ts +++ b/packages/@aws-cdk/aws-sqs/test/test.sqs.ts @@ -162,7 +162,7 @@ export = { test.deepEqual(stack.resolve(imports.queueArn), 'arn:aws:sqs:us-east-1:123456789012:queue1'); test.deepEqual(stack.resolve(imports.queueUrl), { 'Fn::Join': - ['', ['https://sqs.', { Ref: 'AWS::Region' }, '.', { Ref: 'AWS::URLSuffix' }, '/', { Ref: 'AWS::AccountId' }, '/queue1']], + ['', ['https://sqs.us-east-1.', { Ref: 'AWS::URLSuffix' }, '/123456789012/queue1']], }); test.deepEqual(stack.resolve(imports.queueName), 'queue1'); test.done(); @@ -176,6 +176,25 @@ export = { test.deepEqual(fifoQueue.fifo, true); test.done(); }, + + 'importing works correctly for cross region queue'(test: Test) { + // GIVEN + const stack = new Stack(undefined, 'Stack', { env: { region: 'us-east-1' } }); + + // WHEN + const imports = sqs.Queue.fromQueueArn(stack, 'Imported', 'arn:aws:sqs:us-west-2:123456789012:queue1'); + + // THEN + + // "import" returns an IQueue bound to `Fn::ImportValue`s. + test.deepEqual(stack.resolve(imports.queueArn), 'arn:aws:sqs:us-west-2:123456789012:queue1'); + test.deepEqual(stack.resolve(imports.queueUrl), { + 'Fn::Join': + ['', ['https://sqs.us-west-2.', { Ref: 'AWS::URLSuffix' }, '/123456789012/queue1']], + }); + test.deepEqual(stack.resolve(imports.queueName), 'queue1'); + test.done(); + }, }, 'grants': { From c072981c175bf0509e9c606ff9ed441a0c7aef31 Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Mon, 30 Nov 2020 15:50:30 +0000 Subject: [PATCH 234/314] feat(ecr): authorization token retrieval grants (#11783) See README.md ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-ecr/README.md | 16 ++++++++++ packages/@aws-cdk/aws-ecr/lib/auth-token.ts | 20 ++++++++++++ packages/@aws-cdk/aws-ecr/lib/index.ts | 1 + .../@aws-cdk/aws-ecr/test/test.auth-token.ts | 31 +++++++++++++++++++ 4 files changed, 68 insertions(+) create mode 100644 packages/@aws-cdk/aws-ecr/lib/auth-token.ts create mode 100644 packages/@aws-cdk/aws-ecr/test/test.auth-token.ts diff --git a/packages/@aws-cdk/aws-ecr/README.md b/packages/@aws-cdk/aws-ecr/README.md index 97115adc5f647..a2e4ab8ee3d35 100644 --- a/packages/@aws-cdk/aws-ecr/README.md +++ b/packages/@aws-cdk/aws-ecr/README.md @@ -37,6 +37,22 @@ repository.onImageScanCompleted('ImageScanComplete') .addTarget(...) ``` +### Authorization Token + +Besides the Amazon ECR APIs, ECR also allows the Docker CLI or a language-specific Docker library to push and pull +images from an ECR repository. However, the Docker CLI does not support native IAM authentication methods and +additional steps must be taken so that Amazon ECR can authenticate and authorize Docker push and pull requests. +More information can be found at at [Registry Authentication](https://docs.aws.amazon.com/AmazonECR/latest/userguide/Registries.html#registry_auth). + +A Docker authorization token can be obtained using the `GetAuthorizationToken` ECR API. The following code snippets +grants an IAM user access to call this API. + +```ts +import * as iam from '@aws-cdk/aws-iam'; + +const user = new iam.User(this, 'User', { ... }); +AuthorizationToken.grantRead(user); +``` ### Automatically clean up repositories diff --git a/packages/@aws-cdk/aws-ecr/lib/auth-token.ts b/packages/@aws-cdk/aws-ecr/lib/auth-token.ts new file mode 100644 index 0000000000000..52c10cc513d0a --- /dev/null +++ b/packages/@aws-cdk/aws-ecr/lib/auth-token.ts @@ -0,0 +1,20 @@ +import * as iam from '@aws-cdk/aws-iam'; + +/** + * Authorization token to access ECR repositories via Docker CLI. + */ +export class AuthorizationToken { + /** + * Grant access to retrieve an authorization token. + */ + public static grantRead(grantee: iam.IGrantable) { + grantee.grantPrincipal.addToPrincipalPolicy(new iam.PolicyStatement({ + actions: ['ecr:GetAuthorizationToken'], + // GetAuthorizationToken only allows '*'. See https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonelasticcontainerregistry.html#amazonelasticcontainerregistry-actions-as-permissions + resources: ['*'], + })); + } + + private constructor() { + } +} diff --git a/packages/@aws-cdk/aws-ecr/lib/index.ts b/packages/@aws-cdk/aws-ecr/lib/index.ts index bfeae449ded7c..63fff9b49a1c4 100644 --- a/packages/@aws-cdk/aws-ecr/lib/index.ts +++ b/packages/@aws-cdk/aws-ecr/lib/index.ts @@ -3,3 +3,4 @@ export * from './ecr.generated'; export * from './repository'; export * from './lifecycle'; +export * from './auth-token'; diff --git a/packages/@aws-cdk/aws-ecr/test/test.auth-token.ts b/packages/@aws-cdk/aws-ecr/test/test.auth-token.ts new file mode 100644 index 0000000000000..4e9e12e4fb078 --- /dev/null +++ b/packages/@aws-cdk/aws-ecr/test/test.auth-token.ts @@ -0,0 +1,31 @@ +import { expect, haveResourceLike } from '@aws-cdk/assert'; +import * as iam from '@aws-cdk/aws-iam'; +import { Stack } from '@aws-cdk/core'; +import { Test } from 'nodeunit'; +import { AuthorizationToken } from '../lib'; + +export = { + 'grant()'(test: Test) { + // GIVEN + const stack = new Stack(); + const user = new iam.User(stack, 'User'); + + // WHEN + AuthorizationToken.grantRead(user); + + // THEN + expect(stack).to(haveResourceLike('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ + { + Action: 'ecr:GetAuthorizationToken', + Effect: 'Allow', + Resource: '*', + }, + ], + }, + })); + + test.done(); + }, +}; \ No newline at end of file From 5cfbe6c96df5d590588337c1ca8e41272a8d09fb Mon Sep 17 00:00:00 2001 From: markus7811 Date: Mon, 30 Nov 2020 17:18:49 +0100 Subject: [PATCH 235/314] feat(cli): support WebIdentityCredentials (as used by EKS) (#11559) Fixes #11543 *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/aws-cdk/README.md | 2 +- .../lib/api/aws-auth/awscli-compatible.ts | 18 +++++++++++++++--- .../test/util/awscli-compatible.test.ts | 18 ++++++++++++++++++ 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/packages/aws-cdk/README.md b/packages/aws-cdk/README.md index eeab77fbda41c..ee81fae4afb1d 100644 --- a/packages/aws-cdk/README.md +++ b/packages/aws-cdk/README.md @@ -361,4 +361,4 @@ Some of the interesting keys that can be used in the JSON configuration files: The following environment variables affect aws-cdk: - `CDK_DISABLE_VERSION_CHECK`: If set, disable automatic check for newer versions. -- `CDK_NEW_BOOTSTRAP`: use the modern bootstrapping stack. +- `CDK_NEW_BOOTSTRAP`: use the modern bootstrapping stack. \ No newline at end of file diff --git a/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts b/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts index d92321542cdd0..b409274efa59c 100644 --- a/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts +++ b/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts @@ -63,10 +63,13 @@ export class AwsCliCompatible { if (options.containerCreds ?? hasEcsCredentials()) { sources.push(() => new AWS.ECSCredentials()); + } else if (hasWebIdentityCredentials()) { + // else if: we have found WebIdentityCredentials as provided by EKS ServiceAccounts + sources.push(() => new AWS.TokenFileWebIdentityCredentials()); } else if (options.ec2instance ?? await isEc2Instance()) { - // else if: don't get EC2 creds if we should have gotten ECS creds--ECS instances also - // run on EC2 boxes but the creds represent something different. Same behavior as - // upstream code. + // else if: don't get EC2 creds if we should have gotten ECS or EKS creds + // ECS and EKS instances also run on EC2 boxes but the creds represent something different. + // Same behavior as upstream code. sources.push(() => new AWS.EC2MetadataCredentials()); } @@ -156,6 +159,15 @@ function hasEcsCredentials(): boolean { return (AWS.ECSCredentials.prototype as any).isConfiguredForEcsCredentials(); } +/** + * Return whether it looks like we'll have WebIdentityCredentials (that's what EKS uses) available + * No check like hasEcsCredentials available, so have to implement our own. + * @see https://github.com/aws/aws-sdk-js/blob/3ccfd94da07234ae87037f55c138392f38b6881d/lib/credentials/token_file_web_identity_credentials.js#L59 + */ +function hasWebIdentityCredentials(): boolean { + return Boolean(process.env.AWS_ROLE_ARN && process.env.AWS_WEB_IDENTITY_TOKEN_FILE); +} + /** * Return whether we're on an EC2 instance */ diff --git a/packages/aws-cdk/test/util/awscli-compatible.test.ts b/packages/aws-cdk/test/util/awscli-compatible.test.ts index 42cfc37e54c30..a676af7e4c889 100644 --- a/packages/aws-cdk/test/util/awscli-compatible.test.ts +++ b/packages/aws-cdk/test/util/awscli-compatible.test.ts @@ -27,3 +27,21 @@ test('on an EC2 instance, region lookup queries IMDS', async () => { }); }); +test('Use web identity when available', async () => { + + // Scrub some environment variables that are maybe set for Ecs Credentials + delete process.env.ECS_CONTAINER_METADATA_URI_V4; + delete process.env.ECS_CONTAINER_METADATA_URI; + delete process.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI; + + // create and configure the web identity token file + process.env.AWS_WEB_IDENTITY_TOKEN_FILE = 'some-value'; + process.env.AWS_ROLE_ARN = 'some-value'; + + // create the chain + const providers = (await AwsCliCompatible.credentialChain()).providers; + + // make sure the web identity provider is in the chain + const webIdentify = (providers[2] as Function)(); + expect(webIdentify).toBeInstanceOf(AWS.TokenFileWebIdentityCredentials); +}); From 04e3694d354fee10a911f230ce612ec57b674e13 Mon Sep 17 00:00:00 2001 From: Jonathan Goldwasser Date: Mon, 30 Nov 2020 17:47:13 +0100 Subject: [PATCH 236/314] chore: remove parcel cache directory from gitignore files (#11713) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .gitignore | 3 --- .../lib/init-templates/v1/app/javascript/.template.gitignore | 3 --- .../lib/init-templates/v1/app/typescript/.template.gitignore | 3 --- .../lib/init-templates/v1/lib/typescript/.template.gitignore | 3 --- .../v1/sample-app/javascript/.template.gitignore | 3 --- .../v1/sample-app/typescript/.template.gitignore | 3 --- .../lib/init-templates/v2/app/javascript/.template.gitignore | 3 --- .../lib/init-templates/v2/app/typescript/.template.gitignore | 3 --- .../lib/init-templates/v2/lib/typescript/.template.gitignore | 3 --- .../v2/sample-app/javascript/.template.gitignore | 3 --- .../v2/sample-app/typescript/.template.gitignore | 3 --- 11 files changed, 33 deletions(-) diff --git a/.gitignore b/.gitignore index 03b7512a00c05..5f60eac749208 100644 --- a/.gitignore +++ b/.gitignore @@ -37,9 +37,6 @@ cdk.out/ # Yarn error log yarn-error.log -# Parcel default cache directory -.parcel-cache - # VSCode history plugin .vscode/.history/ diff --git a/packages/aws-cdk/lib/init-templates/v1/app/javascript/.template.gitignore b/packages/aws-cdk/lib/init-templates/v1/app/javascript/.template.gitignore index a2da1bef05b07..21dc76264a308 100644 --- a/packages/aws-cdk/lib/init-templates/v1/app/javascript/.template.gitignore +++ b/packages/aws-cdk/lib/init-templates/v1/app/javascript/.template.gitignore @@ -3,6 +3,3 @@ node_modules # CDK asset staging directory .cdk.staging cdk.out - -# Parcel default cache directory -.parcel-cache diff --git a/packages/aws-cdk/lib/init-templates/v1/app/typescript/.template.gitignore b/packages/aws-cdk/lib/init-templates/v1/app/typescript/.template.gitignore index 305c7fbcc4d89..f60797b6a9168 100644 --- a/packages/aws-cdk/lib/init-templates/v1/app/typescript/.template.gitignore +++ b/packages/aws-cdk/lib/init-templates/v1/app/typescript/.template.gitignore @@ -6,6 +6,3 @@ node_modules # CDK asset staging directory .cdk.staging cdk.out - -# Parcel default cache directory -.parcel-cache diff --git a/packages/aws-cdk/lib/init-templates/v1/lib/typescript/.template.gitignore b/packages/aws-cdk/lib/init-templates/v1/lib/typescript/.template.gitignore index 305c7fbcc4d89..f60797b6a9168 100644 --- a/packages/aws-cdk/lib/init-templates/v1/lib/typescript/.template.gitignore +++ b/packages/aws-cdk/lib/init-templates/v1/lib/typescript/.template.gitignore @@ -6,6 +6,3 @@ node_modules # CDK asset staging directory .cdk.staging cdk.out - -# Parcel default cache directory -.parcel-cache diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/.template.gitignore b/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/.template.gitignore index a2da1bef05b07..21dc76264a308 100644 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/.template.gitignore +++ b/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/.template.gitignore @@ -3,6 +3,3 @@ node_modules # CDK asset staging directory .cdk.staging cdk.out - -# Parcel default cache directory -.parcel-cache diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/.template.gitignore b/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/.template.gitignore index 305c7fbcc4d89..f60797b6a9168 100644 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/.template.gitignore +++ b/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/.template.gitignore @@ -6,6 +6,3 @@ node_modules # CDK asset staging directory .cdk.staging cdk.out - -# Parcel default cache directory -.parcel-cache diff --git a/packages/aws-cdk/lib/init-templates/v2/app/javascript/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/app/javascript/.template.gitignore index a2da1bef05b07..21dc76264a308 100644 --- a/packages/aws-cdk/lib/init-templates/v2/app/javascript/.template.gitignore +++ b/packages/aws-cdk/lib/init-templates/v2/app/javascript/.template.gitignore @@ -3,6 +3,3 @@ node_modules # CDK asset staging directory .cdk.staging cdk.out - -# Parcel default cache directory -.parcel-cache diff --git a/packages/aws-cdk/lib/init-templates/v2/app/typescript/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/app/typescript/.template.gitignore index 305c7fbcc4d89..f60797b6a9168 100644 --- a/packages/aws-cdk/lib/init-templates/v2/app/typescript/.template.gitignore +++ b/packages/aws-cdk/lib/init-templates/v2/app/typescript/.template.gitignore @@ -6,6 +6,3 @@ node_modules # CDK asset staging directory .cdk.staging cdk.out - -# Parcel default cache directory -.parcel-cache diff --git a/packages/aws-cdk/lib/init-templates/v2/lib/typescript/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/lib/typescript/.template.gitignore index 305c7fbcc4d89..f60797b6a9168 100644 --- a/packages/aws-cdk/lib/init-templates/v2/lib/typescript/.template.gitignore +++ b/packages/aws-cdk/lib/init-templates/v2/lib/typescript/.template.gitignore @@ -6,6 +6,3 @@ node_modules # CDK asset staging directory .cdk.staging cdk.out - -# Parcel default cache directory -.parcel-cache diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/.template.gitignore index a2da1bef05b07..21dc76264a308 100644 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/.template.gitignore +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/.template.gitignore @@ -3,6 +3,3 @@ node_modules # CDK asset staging directory .cdk.staging cdk.out - -# Parcel default cache directory -.parcel-cache diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/.template.gitignore index 305c7fbcc4d89..f60797b6a9168 100644 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/.template.gitignore +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/.template.gitignore @@ -6,6 +6,3 @@ node_modules # CDK asset staging directory .cdk.staging cdk.out - -# Parcel default cache directory -.parcel-cache From 17bde5a27983cff322edce8d7d0eab7f4551e553 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Mon, 30 Nov 2020 19:30:47 +0100 Subject: [PATCH 237/314] fix(ec2): instance not replaced when changing asset in UserData (#11780) The Logical ID hash used in Instance was based on the UserData string, but it needed to be based on the *resolved* version of the UserData string (since only the resolved version shows the asset hash). Slight complication because the resolution of the UserData may refer back to the LogicalID, which we need to account for by using a recursion breaker. Fixes #11704. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-ec2/lib/instance.ts | 25 +++-- .../@aws-cdk/aws-ec2/test/instance.test.ts | 92 +++++++++++-------- .../test/integ.instance-init.expected.json | 8 +- 3 files changed, 76 insertions(+), 49 deletions(-) diff --git a/packages/@aws-cdk/aws-ec2/lib/instance.ts b/packages/@aws-cdk/aws-ec2/lib/instance.ts index a7e56280fa4dd..22c4fa7cf880f 100644 --- a/packages/@aws-cdk/aws-ec2/lib/instance.ts +++ b/packages/@aws-cdk/aws-ec2/lib/instance.ts @@ -384,16 +384,27 @@ export class Instance extends Resource implements IInstance { this.applyUpdatePolicies(props); // Trigger replacement (via new logical ID) on user data change, if specified or cfn-init is being used. + // + // This is slightly tricky -- we need to resolve the UserData string (in order to get at actual Asset hashes, + // instead of the Token stringifications of them ('${Token[1234]}'). However, in the case of CFN Init usage, + // a UserData is going to contain the logicalID of the resource itself, which means infinite recursion if we + // try to naively resolve. We need a recursion breaker in this. const originalLogicalId = Stack.of(this).getLogicalId(this.instance); + let recursing = false; this.instance.overrideLogicalId(Lazy.uncachedString({ - produce: () => { - let logicalId = originalLogicalId; - if (props.userDataCausesReplacement ?? props.initOptions) { - const md5 = crypto.createHash('md5'); - md5.update(this.userData.render()); - logicalId += md5.digest('hex').substr(0, 16); + produce: (context) => { + if (recursing) { return originalLogicalId; } + if (!(props.userDataCausesReplacement ?? props.initOptions)) { return originalLogicalId; } + + const md5 = crypto.createHash('md5'); + recursing = true; + try { + md5.update(JSON.stringify(context.resolve(this.userData.render()))); + } finally { + recursing = false; } - return logicalId; + const digest = md5.digest('hex').substr(0, 16); + return `${originalLogicalId}${digest}`; }, })); } diff --git a/packages/@aws-cdk/aws-ec2/test/instance.test.ts b/packages/@aws-cdk/aws-ec2/test/instance.test.ts index dea92b5b3d8cd..6d002e38af568 100644 --- a/packages/@aws-cdk/aws-ec2/test/instance.test.ts +++ b/packages/@aws-cdk/aws-ec2/test/instance.test.ts @@ -1,20 +1,26 @@ -import { arrayWith, expect as cdkExpect, haveResource, ResourcePart, stringLike } from '@aws-cdk/assert'; +import * as path from 'path'; +import { arrayWith, expect as cdkExpect, haveResource, ResourcePart, stringLike, SynthUtils } from '@aws-cdk/assert'; import '@aws-cdk/assert/jest'; +import { Asset } from '@aws-cdk/aws-s3-assets'; import { StringParameter } from '@aws-cdk/aws-ssm'; import * as cxschema from '@aws-cdk/cloud-assembly-schema'; import { Stack } from '@aws-cdk/core'; import { nodeunitShim, Test } from 'nodeunit-shim'; import { AmazonLinuxImage, BlockDeviceVolume, CloudFormationInit, - EbsDeviceVolumeType, InitCommand, Instance, InstanceClass, InstanceSize, InstanceType, Vpc, + EbsDeviceVolumeType, InitCommand, Instance, InstanceClass, InstanceSize, InstanceType, UserData, Vpc, } from '../lib'; + +let stack: Stack; +let vpc: Vpc; +beforeEach(() => { + stack = new Stack(); + vpc = new Vpc(stack, 'VPC'); +}); + nodeunitShim({ 'instance is created correctly'(test: Test) { - // GIVEN - const stack = new Stack(); - const vpc = new Vpc(stack, 'VPC'); - // WHEN new Instance(stack, 'Instance', { vpc, @@ -30,10 +36,6 @@ nodeunitShim({ test.done(); }, 'instance is created with source/dest check switched off'(test: Test) { - // GIVEN - const stack = new Stack(); - const vpc = new Vpc(stack, 'VPC'); - // WHEN new Instance(stack, 'Instance', { vpc, @@ -52,8 +54,6 @@ nodeunitShim({ }, 'instance is grantable'(test: Test) { // GIVEN - const stack = new Stack(); - const vpc = new Vpc(stack, 'VPC'); const param = new StringParameter(stack, 'Param', { stringValue: 'Foobar' }); const instance = new Instance(stack, 'Instance', { vpc, @@ -110,10 +110,6 @@ nodeunitShim({ blockDeviceMappings: { 'can set blockDeviceMappings'(test: Test) { - // GIVEN - const stack = new Stack(); - const vpc = new Vpc(stack, 'VPC'); - // WHEN new Instance(stack, 'Instance', { vpc, @@ -176,10 +172,6 @@ nodeunitShim({ }, 'throws if ephemeral volumeIndex < 0'(test: Test) { - // GIVEN - const stack = new Stack(); - const vpc = new Vpc(stack, 'VPC'); - // THEN test.throws(() => { new Instance(stack, 'Instance', { @@ -197,10 +189,6 @@ nodeunitShim({ }, 'throws if volumeType === IO1 without iops'(test: Test) { - // GIVEN - const stack = new Stack(); - const vpc = new Vpc(stack, 'VPC'); - // THEN test.throws(() => { new Instance(stack, 'Instance', { @@ -222,10 +210,6 @@ nodeunitShim({ }, 'warning if iops without volumeType'(test: Test) { - // GIVEN - const stack = new Stack(); - const vpc = new Vpc(stack, 'VPC'); - const instance = new Instance(stack, 'Instance', { vpc, machineImage: new AmazonLinuxImage(), @@ -248,10 +232,6 @@ nodeunitShim({ }, 'warning if iops and volumeType !== IO1'(test: Test) { - // GIVEN - const stack = new Stack(); - const vpc = new Vpc(stack, 'VPC'); - const instance = new Instance(stack, 'Instance', { vpc, machineImage: new AmazonLinuxImage(), @@ -276,10 +256,6 @@ nodeunitShim({ }, 'instance can be created with Private IP Address'(test: Test) { - // GIVEN - const stack = new Stack(); - const vpc = new Vpc(stack, 'VPC'); - // WHEN new Instance(stack, 'Instance', { vpc, @@ -300,8 +276,6 @@ nodeunitShim({ test('add CloudFormation Init to instance', () => { // GIVEN - const stack = new Stack(); - const vpc = new Vpc(stack, 'VPC'); new Instance(stack, 'Instance', { vpc, machineImage: new AmazonLinuxImage(), @@ -347,4 +321,46 @@ test('add CloudFormation Init to instance', () => { }, }, }, ResourcePart.CompleteDefinition)); +}); + +test('cause replacement from s3 asset in userdata', () => { + // GIVEN + const userData1 = UserData.forLinux(); + const asset1 = new Asset(stack, 'UserDataAssets1', { + path: path.join(__dirname, 'asset-fixture', 'data.txt'), + }); + userData1.addS3DownloadCommand({ bucket: asset1.bucket, bucketKey: asset1.s3ObjectKey }); + + const userData2 = UserData.forLinux(); + const asset2 = new Asset(stack, 'UserDataAssets2', { + path: path.join(__dirname, 'asset-fixture', 'data.txt'), + }); + userData2.addS3DownloadCommand({ bucket: asset2.bucket, bucketKey: asset2.s3ObjectKey }); + + // WHEN + new Instance(stack, 'InstanceOne', { + vpc, + machineImage: new AmazonLinuxImage(), + instanceType: InstanceType.of(InstanceClass.T3, InstanceSize.LARGE), + userData: userData1, + userDataCausesReplacement: true, + }); + new Instance(stack, 'InstanceTwo', { + vpc, + machineImage: new AmazonLinuxImage(), + instanceType: InstanceType.of(InstanceClass.T3, InstanceSize.LARGE), + userData: userData2, + userDataCausesReplacement: true, + }); + + // THEN -- both instances have the same userData hash, telling us the hash is based + // on the actual asset hash and not accidentally on the token stringification of them. + // (which would base the hash on '${Token[1234.bla]}' + const hash = 'f88eace39faf39d7'; + expect(SynthUtils.toCloudFormation(stack)).toEqual(expect.objectContaining({ + Resources: expect.objectContaining({ + [`InstanceOne5B821005${hash}`]: expect.objectContaining({ Type: 'AWS::EC2::Instance', Properties: expect.anything() }), + [`InstanceTwoDC29A7A7${hash}`]: expect.objectContaining({ Type: 'AWS::EC2::Instance', Properties: expect.anything() }), + }), + })); }); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.instance-init.expected.json b/packages/@aws-cdk/aws-ec2/test/integ.instance-init.expected.json index e9be6df6f6c76..2b736d3961b4c 100644 --- a/packages/@aws-cdk/aws-ec2/test/integ.instance-init.expected.json +++ b/packages/@aws-cdk/aws-ec2/test/integ.instance-init.expected.json @@ -130,7 +130,7 @@ ] } }, - "Instance255F352658ec7e53daf15a1c6": { + "Instance255F352654dd5de862574bd14": { "Type": "AWS::EC2::Instance", "Properties": { "AvailabilityZone": "us-east-1a", @@ -169,7 +169,7 @@ { "Ref": "AWS::StackName" }, - " --resource Instance255F352658ec7e53daf15a1c6 -c default\n /opt/aws/bin/cfn-signal -e $? --region ", + " --resource Instance255F352654dd5de862574bd14 -c default\n /opt/aws/bin/cfn-signal -e $? --region ", { "Ref": "AWS::Region" }, @@ -177,7 +177,7 @@ { "Ref": "AWS::StackName" }, - " --resource Instance255F352658ec7e53daf15a1c6\n cat /var/log/cfn-init.log >&2\n)" + " --resource Instance255F352654dd5de862574bd14\n cat /var/log/cfn-init.log >&2\n)" ] ] } @@ -319,4 +319,4 @@ "Description": "Artifact hash for asset \"f8a1af398dac2fad92eeea4fb7620be1c4f504e23e3bfcd859fbb5744187930b\"" } } -} \ No newline at end of file +} From 9d0709f88ba19bdb6105cd2a2f44d9bb74e9d190 Mon Sep 17 00:00:00 2001 From: Tom Denley Date: Mon, 30 Nov 2020 19:02:22 +0000 Subject: [PATCH 238/314] chore(bootstrap): add missing bucket deletion policy (#11547) A DeletionPolicy should be specified to protect the staging bucket This addresses cfn-lint error: W3011 Both UpdateReplacePolicy and DeletionPolicy are needed to protect Resources/StagingBucket from deletion partially fixes: #11545 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml b/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml index da8b7054cbb8e..d14046b5f0fd1 100644 --- a/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml +++ b/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml @@ -167,6 +167,7 @@ Resources: RestrictPublicBuckets: true - Ref: AWS::NoValue UpdateReplacePolicy: Retain + DeletionPolicy: Retain StagingBucketPolicy: Type: 'AWS::S3::BucketPolicy' Properties: From ece9b237e7da4b493e34c801bb0f17b1a5edf68e Mon Sep 17 00:00:00 2001 From: AndyEfaa <73257849+AndyEfaa@users.noreply.github.com> Date: Mon, 30 Nov 2020 20:33:47 +0100 Subject: [PATCH 239/314] fix(codepipeline-actions): incorrect IAM statement in StepFunctionInvokeAction (#11728) fixes incorrectly generated iam policy for stepfunctions from aws-codepipeline-actions fixes #11397 and fixes #11688 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../lib/stepfunctions/invoke-action.ts | 2 +- ...integ.pipeline-stepfunctions.expected.json | 12 +++- .../test.stepfunctions-invoke-actions.ts | 57 +++++++++++++++++++ 3 files changed, 69 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/stepfunctions/invoke-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/stepfunctions/invoke-action.ts index 8d8ff55a69334..ae05cd093892f 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/stepfunctions/invoke-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/stepfunctions/invoke-action.ts @@ -135,7 +135,7 @@ export class StepFunctionInvokeAction extends Action { resources: [cdk.Stack.of(this.props.stateMachine).formatArn({ service: 'states', resource: 'execution', - resourceName: `${this.props.stateMachine.stateMachineArn}:${this.props.executionNamePrefix ?? ''}*`, + resourceName: `${cdk.Stack.of(this.props.stateMachine).parseArn(this.props.stateMachine.stateMachineArn, ':').resourceName}:${this.props.executionNamePrefix ?? ''}*`, sep: ':', })], })); diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.expected.json index c56170c78f20d..2d7df75522359 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.expected.json +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.expected.json @@ -559,7 +559,17 @@ }, ":execution:", { - "Ref": "SimpleStateMachineE8E2CF40" + "Fn::Select": [ + 6, + { + "Fn::Split": [ + ":", + { + "Ref": "SimpleStateMachineE8E2CF40" + } + ] + } + ] }, ":*" ] diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/stepfunctions/test.stepfunctions-invoke-actions.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/stepfunctions/test.stepfunctions-invoke-actions.ts index 752285231087a..af9bf28b90640 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/stepfunctions/test.stepfunctions-invoke-actions.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/stepfunctions/test.stepfunctions-invoke-actions.ts @@ -86,6 +86,63 @@ export = { test.done(); }, + + 'Allows the pipeline to describe this stepfunction execution'(test: Test) { + const stack = new Stack(); + + minimalPipeline(stack); + + expect(stack).to(haveResourceLike('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ + {}, + { + Action: 'states:DescribeExecution', + Resource: { + 'Fn::Join': [ + '', + [ + 'arn:', + { + Ref: 'AWS::Partition', + }, + ':states:', + { + Ref: 'AWS::Region', + }, + ':', + { + Ref: 'AWS::AccountId', + }, + ':execution:', + { + 'Fn::Select': [ + 6, + { + 'Fn::Split': [ + ':', + { + Ref: 'SimpleStateMachineE8E2CF40', + }, + ], + }, + ], + }, + ':*', + ], + ], + }, + Effect: 'Allow', + }, + ], + }, + })); + + expect(stack).to(haveResourceLike('AWS::IAM::Role')); + + test.done(); + }, + }, }; From 5bf5ecc9f85a9ab7dad7d17296ae4b61f0402536 Mon Sep 17 00:00:00 2001 From: Romain Marcadier Date: Mon, 30 Nov 2020 21:09:33 +0100 Subject: [PATCH 240/314] docs(core): make examples compile (#11273) Add support in `cdk-build` to actually run `jsii-rosetta --compile --fail` in packages that declare supporting "strict" mode for `jsii-rosetta`. This enables a "quick" feedback loop for detecting "now-invalid" code examples. Turned on this feature on `@aws-cdk/core` and made the necessary adjustments to fixtures and examples so that they now compile. In particular: - Made all `import` statements implicit from the examples, as they are all moved to the fixture. Imports from the library itself are *always unqualified*, and external ones are *always qualified*. - Used `declare` statements in the fixtures to avoid having to come up with "real" values that compile. This is way less brittle than actually coming up with an initializer, especially for external types. Also turned on this feature on `@aws-cdk/aws-iam` and made the ajustement to fixtures and examples so that they now compile. In particular: - All imports to `@aws-cdk/core` are nominal and un-qualified. - All imports to other libraries are always qualified. Fixes #11624. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- CONTRIBUTING.md | 3 + package.json | 6 +- .../ecs-service-extensions/package.json | 2 +- packages/@aws-cdk/alexa-ask/package.json | 3 +- packages/@aws-cdk/app-delivery/README.md | 2 +- packages/@aws-cdk/app-delivery/package.json | 3 +- packages/@aws-cdk/assets/package.json | 3 +- .../@aws-cdk/aws-accessanalyzer/package.json | 3 +- packages/@aws-cdk/aws-acmpca/package.json | 3 +- packages/@aws-cdk/aws-amazonmq/package.json | 3 +- packages/@aws-cdk/aws-amplify/package.json | 3 +- packages/@aws-cdk/aws-apigateway/README.md | 10 +- packages/@aws-cdk/aws-apigateway/package.json | 3 +- .../package.json | 3 +- packages/@aws-cdk/aws-apigatewayv2/README.md | 2 +- .../@aws-cdk/aws-apigatewayv2/package.json | 3 +- packages/@aws-cdk/aws-appconfig/package.json | 3 +- packages/@aws-cdk/aws-appflow/package.json | 3 +- .../aws-applicationautoscaling/package.json | 3 +- .../aws-applicationinsights/package.json | 3 +- packages/@aws-cdk/aws-appmesh/package.json | 3 +- packages/@aws-cdk/aws-appstream/package.json | 3 +- packages/@aws-cdk/aws-appsync/package.json | 3 +- packages/@aws-cdk/aws-athena/package.json | 3 +- .../aws-autoscaling-common/package.json | 3 +- .../aws-autoscaling-hooktargets/package.json | 3 +- .../@aws-cdk/aws-autoscaling/package.json | 3 +- .../aws-autoscalingplans/package.json | 3 +- packages/@aws-cdk/aws-backup/package.json | 3 +- packages/@aws-cdk/aws-batch/package.json | 3 +- packages/@aws-cdk/aws-budgets/package.json | 3 +- packages/@aws-cdk/aws-cassandra/package.json | 3 +- packages/@aws-cdk/aws-ce/package.json | 3 +- .../aws-certificatemanager/package.json | 3 +- packages/@aws-cdk/aws-chatbot/package.json | 3 +- packages/@aws-cdk/aws-cloud9/package.json | 3 +- .../@aws-cdk/aws-cloudformation/package.json | 3 +- .../aws-cloudfront-origins/package.json | 3 +- packages/@aws-cdk/aws-cloudfront/package.json | 3 +- packages/@aws-cdk/aws-cloudtrail/package.json | 3 +- .../aws-cloudwatch-actions/package.json | 3 +- packages/@aws-cdk/aws-cloudwatch/package.json | 3 +- .../@aws-cdk/aws-codeartifact/package.json | 3 +- packages/@aws-cdk/aws-codebuild/package.json | 3 +- packages/@aws-cdk/aws-codecommit/package.json | 3 +- packages/@aws-cdk/aws-codedeploy/package.json | 3 +- .../aws-codeguruprofiler/package.json | 3 +- .../aws-codegurureviewer/package.json | 3 +- .../aws-codepipeline-actions/package.json | 3 +- .../@aws-cdk/aws-codepipeline/package.json | 3 +- packages/@aws-cdk/aws-codestar/package.json | 3 +- .../aws-codestarconnections/package.json | 3 +- .../aws-codestarnotifications/package.json | 3 +- packages/@aws-cdk/aws-cognito/package.json | 4 +- packages/@aws-cdk/aws-config/package.json | 3 +- packages/@aws-cdk/aws-databrew/README.md | 2 +- packages/@aws-cdk/aws-databrew/package.json | 3 +- .../@aws-cdk/aws-datapipeline/package.json | 3 +- packages/@aws-cdk/aws-dax/package.json | 3 +- packages/@aws-cdk/aws-detective/package.json | 3 +- .../aws-directoryservice/package.json | 3 +- packages/@aws-cdk/aws-dlm/package.json | 3 +- packages/@aws-cdk/aws-dms/package.json | 3 +- packages/@aws-cdk/aws-docdb/package.json | 3 +- .../@aws-cdk/aws-dynamodb-global/package.json | 3 +- packages/@aws-cdk/aws-dynamodb/package.json | 3 +- packages/@aws-cdk/aws-ec2/package.json | 3 +- packages/@aws-cdk/aws-ecr-assets/package.json | 3 +- packages/@aws-cdk/aws-ecr/package.json | 3 +- .../@aws-cdk/aws-ecs-patterns/package.json | 3 +- packages/@aws-cdk/aws-ecs/package.json | 3 +- packages/@aws-cdk/aws-efs/package.json | 3 +- packages/@aws-cdk/aws-eks-legacy/package.json | 3 +- packages/@aws-cdk/aws-eks/package.json | 3 +- .../@aws-cdk/aws-elasticache/package.json | 3 +- .../aws-elasticbeanstalk/package.json | 3 +- .../aws-elasticloadbalancing/package.json | 3 +- .../package.json | 3 +- .../package.json | 3 +- .../aws-elasticloadbalancingv2/package.json | 3 +- .../@aws-cdk/aws-elasticsearch/package.json | 3 +- packages/@aws-cdk/aws-emr/package.json | 3 +- .../@aws-cdk/aws-events-targets/package.json | 3 +- packages/@aws-cdk/aws-events/package.json | 3 +- .../@aws-cdk/aws-eventschemas/package.json | 3 +- packages/@aws-cdk/aws-fms/package.json | 3 +- packages/@aws-cdk/aws-fsx/package.json | 3 +- packages/@aws-cdk/aws-gamelift/package.json | 3 +- .../aws-globalaccelerator/package.json | 3 +- packages/@aws-cdk/aws-glue/package.json | 3 +- packages/@aws-cdk/aws-greengrass/package.json | 3 +- packages/@aws-cdk/aws-guardduty/package.json | 3 +- packages/@aws-cdk/aws-iam/README.md | 34 +- packages/@aws-cdk/aws-iam/package.json | 12 +- .../aws-iam/rosetta/default.ts-fixture | 19 + .../@aws-cdk/aws-imagebuilder/package.json | 3 +- packages/@aws-cdk/aws-inspector/package.json | 3 +- packages/@aws-cdk/aws-iot/package.json | 3 +- packages/@aws-cdk/aws-iot1click/package.json | 3 +- .../@aws-cdk/aws-iotanalytics/package.json | 3 +- packages/@aws-cdk/aws-iotevents/package.json | 3 +- .../@aws-cdk/aws-iotsitewise/package.json | 3 +- .../@aws-cdk/aws-iotthingsgraph/package.json | 3 +- packages/@aws-cdk/aws-ivs/package.json | 3 +- packages/@aws-cdk/aws-kendra/package.json | 3 +- packages/@aws-cdk/aws-kinesis/package.json | 3 +- .../aws-kinesisanalytics/package.json | 3 +- .../@aws-cdk/aws-kinesisfirehose/package.json | 3 +- packages/@aws-cdk/aws-kms/package.json | 3 +- .../@aws-cdk/aws-lakeformation/package.json | 3 +- .../aws-lambda-destinations/package.json | 3 +- .../aws-lambda-event-sources/package.json | 3 +- .../@aws-cdk/aws-lambda-nodejs/package.json | 3 +- .../@aws-cdk/aws-lambda-python/package.json | 3 +- packages/@aws-cdk/aws-lambda/package.json | 3 +- .../aws-logs-destinations/package.json | 3 +- packages/@aws-cdk/aws-logs/package.json | 3 +- packages/@aws-cdk/aws-macie/package.json | 3 +- .../aws-managedblockchain/package.json | 3 +- .../@aws-cdk/aws-mediaconvert/package.json | 3 +- packages/@aws-cdk/aws-medialive/package.json | 3 +- .../@aws-cdk/aws-mediapackage/package.json | 3 +- packages/@aws-cdk/aws-mediastore/package.json | 3 +- packages/@aws-cdk/aws-msk/package.json | 3 +- packages/@aws-cdk/aws-neptune/package.json | 3 +- .../@aws-cdk/aws-networkfirewall/README.md | 2 +- .../@aws-cdk/aws-networkfirewall/package.json | 3 +- .../@aws-cdk/aws-networkmanager/package.json | 3 +- packages/@aws-cdk/aws-opsworks/package.json | 3 +- packages/@aws-cdk/aws-opsworkscm/package.json | 3 +- packages/@aws-cdk/aws-pinpoint/package.json | 3 +- .../@aws-cdk/aws-pinpointemail/package.json | 3 +- packages/@aws-cdk/aws-qldb/package.json | 3 +- packages/@aws-cdk/aws-ram/package.json | 3 +- packages/@aws-cdk/aws-rds/package.json | 3 +- packages/@aws-cdk/aws-redshift/package.json | 3 +- .../@aws-cdk/aws-resourcegroups/package.json | 3 +- packages/@aws-cdk/aws-robomaker/package.json | 3 +- .../aws-route53-patterns/package.json | 3 +- .../@aws-cdk/aws-route53-targets/package.json | 3 +- packages/@aws-cdk/aws-route53/package.json | 3 +- .../@aws-cdk/aws-route53resolver/package.json | 3 +- packages/@aws-cdk/aws-s3-assets/package.json | 3 +- .../@aws-cdk/aws-s3-deployment/package.json | 3 +- .../aws-s3-notifications/package.json | 3 +- packages/@aws-cdk/aws-s3/package.json | 3 +- packages/@aws-cdk/aws-sagemaker/package.json | 3 +- packages/@aws-cdk/aws-sam/package.json | 3 +- packages/@aws-cdk/aws-sdb/package.json | 3 +- .../@aws-cdk/aws-secretsmanager/package.json | 3 +- .../@aws-cdk/aws-securityhub/package.json | 3 +- .../@aws-cdk/aws-servicecatalog/package.json | 3 +- .../aws-servicediscovery/package.json | 3 +- .../@aws-cdk/aws-ses-actions/package.json | 3 +- packages/@aws-cdk/aws-ses/package.json | 3 +- packages/@aws-cdk/aws-signer/package.json | 3 +- .../aws-sns-subscriptions/package.json | 3 +- packages/@aws-cdk/aws-sns/package.json | 3 +- packages/@aws-cdk/aws-sqs/package.json | 3 +- packages/@aws-cdk/aws-ssm/package.json | 3 +- packages/@aws-cdk/aws-sso/package.json | 3 +- .../aws-stepfunctions-tasks/package.json | 3 +- .../@aws-cdk/aws-stepfunctions/package.json | 3 +- packages/@aws-cdk/aws-synthetics/package.json | 3 +- packages/@aws-cdk/aws-timestream/package.json | 3 +- packages/@aws-cdk/aws-transfer/package.json | 3 +- packages/@aws-cdk/aws-waf/package.json | 3 +- .../@aws-cdk/aws-wafregional/package.json | 3 +- packages/@aws-cdk/aws-wafv2/package.json | 3 +- packages/@aws-cdk/aws-workspaces/package.json | 3 +- .../@aws-cdk/cdk-assets-schema/package.json | 3 +- .../build-tools/create-missing-libraries.ts | 1 + .../cloud-assembly-schema/package.json | 12 +- .../cloudformation-include/package.json | 3 +- packages/@aws-cdk/core/README.md | 153 +--- packages/@aws-cdk/core/lib/cfn-resource.ts | 6 +- .../custom-resource-provider.ts | 5 +- packages/@aws-cdk/core/lib/custom-resource.ts | 16 +- packages/@aws-cdk/core/lib/dependency.ts | 10 +- packages/@aws-cdk/core/lib/stack.ts | 14 +- packages/@aws-cdk/core/lib/stage.ts | 4 +- packages/@aws-cdk/core/package.json | 22 +- ...README-custom-resource-provider.ts-fixture | 18 + .../@aws-cdk/core/rosetta/default.ts-fixture | 65 ++ .../@aws-cdk/custom-resources/package.json | 3 +- packages/@aws-cdk/cx-api/package.json | 12 +- .../example-construct-library/package.json | 3 +- packages/@aws-cdk/pipelines/package.json | 3 +- packages/@aws-cdk/region-info/package.json | 3 +- packages/@aws-cdk/yaml-cfn/package.json | 3 +- packages/aws-cdk-lib/package.json | 3 +- packages/awslint/package.json | 4 +- packages/cdk-dasm/package.json | 2 +- packages/decdk/package.json | 4 +- packages/monocdk/package.json | 3 +- tools/cdk-build-tools/package.json | 4 +- tools/cfn2ts/package.json | 2 +- tools/pkglint/lib/rules.ts | 18 +- yarn.lock | 836 +++++++----------- 199 files changed, 954 insertions(+), 853 deletions(-) create mode 100644 packages/@aws-cdk/aws-iam/rosetta/default.ts-fixture create mode 100644 packages/@aws-cdk/core/rosetta/README-custom-resource-provider.ts-fixture create mode 100644 packages/@aws-cdk/core/rosetta/default.ts-fixture diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 364042c28ae18..3ccfe335daddf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -173,6 +173,9 @@ Work your magic. Here are some guidelines: Feel free to start your contribution by copy&pasting files from that project, and then edit and rename them as appropriate - it might be easier to get started that way. +* If your change includes code examples (in the `README.md` file or as part of regular TSDoc tags), + you should probably validate those examples can be successfully compiled and trans-literated by + running `yarn rosetta:extract` (this requires other packages used by code examples are built). #### Integration Tests diff --git a/package.json b/package.json index e3757fe3f77b9..aee0ccc3f2b6b 100644 --- a/package.json +++ b/package.json @@ -18,9 +18,9 @@ "fs-extra": "^9.0.1", "graceful-fs": "^4.2.4", "jest-junit": "^12.0.0", - "jsii-diff": "^1.14.1", - "jsii-pacmak": "^1.14.1", - "jsii-rosetta": "^1.14.1", + "jsii-diff": "^1.15.0", + "jsii-pacmak": "^1.15.0", + "jsii-rosetta": "^1.15.0", "lerna": "^3.22.1", "standard-version": "^9.0.0", "typescript": "~3.9.7" diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/package.json b/packages/@aws-cdk-containers/ecs-service-extensions/package.json index e33dc561b65b8..d5249726f297e 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/package.json +++ b/packages/@aws-cdk-containers/ecs-service-extensions/package.json @@ -101,4 +101,4 @@ }, "maturity": "stable", "stability": "stable" -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/alexa-ask/package.json b/packages/@aws-cdk/alexa-ask/package.json index eff6618e6bfb8..1233a4a1993ea 100644 --- a/packages/@aws-cdk/alexa-ask/package.json +++ b/packages/@aws-cdk/alexa-ask/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "Alexa::ASK", diff --git a/packages/@aws-cdk/app-delivery/README.md b/packages/@aws-cdk/app-delivery/README.md index 949cf90b6c714..9430ac2e21302 100644 --- a/packages/@aws-cdk/app-delivery/README.md +++ b/packages/@aws-cdk/app-delivery/README.md @@ -14,7 +14,7 @@ This library includes a *CodePipeline* composite Action for deploying AWS CDK Ap This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. -# Replacement recommended +### Replacement recommended This library has been deprecated. We recommend you use the [@aws-cdk/pipelines](https://docs.aws.amazon.com/cdk/api/latest/docs/pipelines-readme.html) module instead. diff --git a/packages/@aws-cdk/app-delivery/package.json b/packages/@aws-cdk/app-delivery/package.json index d860fe435fd24..b8ca6275939df 100644 --- a/packages/@aws-cdk/app-delivery/package.json +++ b/packages/@aws-cdk/app-delivery/package.json @@ -43,7 +43,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "dependencies": { "@aws-cdk/aws-cloudformation": "0.0.0", diff --git a/packages/@aws-cdk/assets/package.json b/packages/@aws-cdk/assets/package.json index 52575038b862b..901bd0454e9c4 100644 --- a/packages/@aws-cdk/assets/package.json +++ b/packages/@aws-cdk/assets/package.json @@ -48,7 +48,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "pre": [ diff --git a/packages/@aws-cdk/aws-accessanalyzer/package.json b/packages/@aws-cdk/aws-accessanalyzer/package.json index 3db4d7267fd55..e955f78425632 100644 --- a/packages/@aws-cdk/aws-accessanalyzer/package.json +++ b/packages/@aws-cdk/aws-accessanalyzer/package.json @@ -51,7 +51,8 @@ "compat": "cdk-compat", "build+test": "npm run build && npm test", "build+test+package": "npm run build+test && npm run package", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::AccessAnalyzer", diff --git a/packages/@aws-cdk/aws-acmpca/package.json b/packages/@aws-cdk/aws-acmpca/package.json index 65d4aa11c2b73..3baab6e8894b3 100644 --- a/packages/@aws-cdk/aws-acmpca/package.json +++ b/packages/@aws-cdk/aws-acmpca/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::ACMPCA", diff --git a/packages/@aws-cdk/aws-amazonmq/package.json b/packages/@aws-cdk/aws-amazonmq/package.json index 1274402c9872e..81d725a784638 100644 --- a/packages/@aws-cdk/aws-amazonmq/package.json +++ b/packages/@aws-cdk/aws-amazonmq/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::AmazonMQ", diff --git a/packages/@aws-cdk/aws-amplify/package.json b/packages/@aws-cdk/aws-amplify/package.json index 63aa08a0d5189..7008e08ae00f6 100644 --- a/packages/@aws-cdk/aws-amplify/package.json +++ b/packages/@aws-cdk/aws-amplify/package.json @@ -51,7 +51,8 @@ "build+test": "npm run build && npm test", "build+test+package": "npm run build+test && npm run package", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Amplify", diff --git a/packages/@aws-cdk/aws-apigateway/README.md b/packages/@aws-cdk/aws-apigateway/README.md index 5a00fde390dd4..2884630e6edb1 100644 --- a/packages/@aws-cdk/aws-apigateway/README.md +++ b/packages/@aws-cdk/aws-apigateway/README.md @@ -1032,7 +1032,7 @@ to configure these. There are a number of limitations in using OpenAPI definitions in API Gateway. Read the [Amazon API Gateway important notes for REST APIs](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-known-issues.html#api-gateway-known-issues-rest-apis) for more details. - + **Note:** When starting off with an OpenAPI definition using `SpecRestApi`, it is not possible to configure some properties that can be configured directly in the OpenAPI specification file. This is to prevent people duplication of these properties and potential confusion. @@ -1050,10 +1050,10 @@ const api = new apigateway.SpecRestApi(this, 'ExampleRestApi', { }); ``` -**Note:** For private endpoints you will still need to provide the -[`x-amazon-apigateway-policy`](https://docs.aws.amazon.com/apigateway/latest/developerguide/openapi-extensions-policy.html) and -[`x-amazon-apigateway-endpoint-configuration`](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions-endpoint-configuration.html) -in your openApi file. +**Note:** For private endpoints you will still need to provide the +[`x-amazon-apigateway-policy`](https://docs.aws.amazon.com/apigateway/latest/developerguide/openapi-extensions-policy.html) and +[`x-amazon-apigateway-endpoint-configuration`](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions-endpoint-configuration.html) +in your openApi file. ## Metrics diff --git a/packages/@aws-cdk/aws-apigateway/package.json b/packages/@aws-cdk/aws-apigateway/package.json index 38cd21c58f19b..ad1bda1d82227 100644 --- a/packages/@aws-cdk/aws-apigateway/package.json +++ b/packages/@aws-cdk/aws-apigateway/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::ApiGateway", diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json index b233b0db9d9a1..bf769841adbd8 100644 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json @@ -49,7 +49,8 @@ "watch": "cdk-watch", "compat": "cdk-compat", "build+test": "npm run build && npm test", - "build+test+package": "npm run build+test && npm run package" + "build+test+package": "npm run build+test && npm run package", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "jest": true, diff --git a/packages/@aws-cdk/aws-apigatewayv2/README.md b/packages/@aws-cdk/aws-apigatewayv2/README.md index ea93eda2149ed..fafd04156f36a 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/README.md +++ b/packages/@aws-cdk/aws-apigatewayv2/README.md @@ -1,4 +1,4 @@ -## AWS::APIGatewayv2 Construct Library +# AWS::APIGatewayv2 Construct Library --- diff --git a/packages/@aws-cdk/aws-apigatewayv2/package.json b/packages/@aws-cdk/aws-apigatewayv2/package.json index 126cbc4143d00..c701baf1a8023 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/package.json +++ b/packages/@aws-cdk/aws-apigatewayv2/package.json @@ -51,7 +51,8 @@ "compat": "cdk-compat", "build+test": "npm run build && npm test", "build+test+package": "npm run build+test && npm run package", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::ApiGatewayV2", diff --git a/packages/@aws-cdk/aws-appconfig/package.json b/packages/@aws-cdk/aws-appconfig/package.json index 56ce44e9543cf..43c2433d295fb 100644 --- a/packages/@aws-cdk/aws-appconfig/package.json +++ b/packages/@aws-cdk/aws-appconfig/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::AppConfig", diff --git a/packages/@aws-cdk/aws-appflow/package.json b/packages/@aws-cdk/aws-appflow/package.json index 446d4c0787e03..983ec73f62e09 100644 --- a/packages/@aws-cdk/aws-appflow/package.json +++ b/packages/@aws-cdk/aws-appflow/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::AppFlow", diff --git a/packages/@aws-cdk/aws-applicationautoscaling/package.json b/packages/@aws-cdk/aws-applicationautoscaling/package.json index 39693f2db0d30..9089e16947251 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/package.json +++ b/packages/@aws-cdk/aws-applicationautoscaling/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::ApplicationAutoScaling", diff --git a/packages/@aws-cdk/aws-applicationinsights/package.json b/packages/@aws-cdk/aws-applicationinsights/package.json index 8b59f2cd18ea9..541919b17dffd 100644 --- a/packages/@aws-cdk/aws-applicationinsights/package.json +++ b/packages/@aws-cdk/aws-applicationinsights/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::ApplicationInsights", diff --git a/packages/@aws-cdk/aws-appmesh/package.json b/packages/@aws-cdk/aws-appmesh/package.json index 6b58c9981965a..f200312093d3a 100644 --- a/packages/@aws-cdk/aws-appmesh/package.json +++ b/packages/@aws-cdk/aws-appmesh/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::AppMesh", diff --git a/packages/@aws-cdk/aws-appstream/package.json b/packages/@aws-cdk/aws-appstream/package.json index f7c04b6c363f4..d016bfd710ea9 100644 --- a/packages/@aws-cdk/aws-appstream/package.json +++ b/packages/@aws-cdk/aws-appstream/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::AppStream", diff --git a/packages/@aws-cdk/aws-appsync/package.json b/packages/@aws-cdk/aws-appsync/package.json index e68c325f6dd6b..906bf0f2ef751 100644 --- a/packages/@aws-cdk/aws-appsync/package.json +++ b/packages/@aws-cdk/aws-appsync/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::AppSync", diff --git a/packages/@aws-cdk/aws-athena/package.json b/packages/@aws-cdk/aws-athena/package.json index 275f1a4936bb0..31a915a4e3c28 100644 --- a/packages/@aws-cdk/aws-athena/package.json +++ b/packages/@aws-cdk/aws-athena/package.json @@ -57,7 +57,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "keywords": [ "aws", diff --git a/packages/@aws-cdk/aws-autoscaling-common/package.json b/packages/@aws-cdk/aws-autoscaling-common/package.json index aa66b53be704c..eb987c30fd0f4 100644 --- a/packages/@aws-cdk/aws-autoscaling-common/package.json +++ b/packages/@aws-cdk/aws-autoscaling-common/package.json @@ -48,7 +48,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "keywords": [ "aws", diff --git a/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json b/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json index fa2b3589acd92..8b248b409edc1 100644 --- a/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json +++ b/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json @@ -48,7 +48,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "keywords": [ "aws", diff --git a/packages/@aws-cdk/aws-autoscaling/package.json b/packages/@aws-cdk/aws-autoscaling/package.json index 745c087e45ebb..dae1b16cd2ef7 100644 --- a/packages/@aws-cdk/aws-autoscaling/package.json +++ b/packages/@aws-cdk/aws-autoscaling/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::AutoScaling", diff --git a/packages/@aws-cdk/aws-autoscalingplans/package.json b/packages/@aws-cdk/aws-autoscalingplans/package.json index f66e661ed1ccf..b759ade9a0f5d 100644 --- a/packages/@aws-cdk/aws-autoscalingplans/package.json +++ b/packages/@aws-cdk/aws-autoscalingplans/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::AutoScalingPlans", diff --git a/packages/@aws-cdk/aws-backup/package.json b/packages/@aws-cdk/aws-backup/package.json index 99d4faa6366a5..93a382bfb6188 100644 --- a/packages/@aws-cdk/aws-backup/package.json +++ b/packages/@aws-cdk/aws-backup/package.json @@ -51,7 +51,8 @@ "build+test": "npm run build && npm test", "build+test+package": "npm run build+test && npm run package", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Backup", diff --git a/packages/@aws-cdk/aws-batch/package.json b/packages/@aws-cdk/aws-batch/package.json index e9a73189f0716..042c700c214d7 100644 --- a/packages/@aws-cdk/aws-batch/package.json +++ b/packages/@aws-cdk/aws-batch/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Batch", diff --git a/packages/@aws-cdk/aws-budgets/package.json b/packages/@aws-cdk/aws-budgets/package.json index 24ae856195ad4..88615407e5a16 100644 --- a/packages/@aws-cdk/aws-budgets/package.json +++ b/packages/@aws-cdk/aws-budgets/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Budgets", diff --git a/packages/@aws-cdk/aws-cassandra/package.json b/packages/@aws-cdk/aws-cassandra/package.json index c047c535fad5a..dbf22f7b0acf4 100644 --- a/packages/@aws-cdk/aws-cassandra/package.json +++ b/packages/@aws-cdk/aws-cassandra/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Cassandra", diff --git a/packages/@aws-cdk/aws-ce/package.json b/packages/@aws-cdk/aws-ce/package.json index b34e30b82ca4b..323ca8cceb82f 100644 --- a/packages/@aws-cdk/aws-ce/package.json +++ b/packages/@aws-cdk/aws-ce/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::CE", diff --git a/packages/@aws-cdk/aws-certificatemanager/package.json b/packages/@aws-cdk/aws-certificatemanager/package.json index 48bd42cdf9a37..5ef9c714cde23 100644 --- a/packages/@aws-cdk/aws-certificatemanager/package.json +++ b/packages/@aws-cdk/aws-certificatemanager/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::CertificateManager", diff --git a/packages/@aws-cdk/aws-chatbot/package.json b/packages/@aws-cdk/aws-chatbot/package.json index e3ead040537d9..eb4c05bdcdab2 100644 --- a/packages/@aws-cdk/aws-chatbot/package.json +++ b/packages/@aws-cdk/aws-chatbot/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Chatbot", diff --git a/packages/@aws-cdk/aws-cloud9/package.json b/packages/@aws-cdk/aws-cloud9/package.json index eb83f5a4e7544..ba53213d22aac 100644 --- a/packages/@aws-cdk/aws-cloud9/package.json +++ b/packages/@aws-cdk/aws-cloud9/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Cloud9", diff --git a/packages/@aws-cdk/aws-cloudformation/package.json b/packages/@aws-cdk/aws-cloudformation/package.json index 1c8a3abc64568..299816954909b 100644 --- a/packages/@aws-cdk/aws-cloudformation/package.json +++ b/packages/@aws-cdk/aws-cloudformation/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::CloudFormation" diff --git a/packages/@aws-cdk/aws-cloudfront-origins/package.json b/packages/@aws-cdk/aws-cloudfront-origins/package.json index 53bcd522450fc..37060dc604564 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/package.json +++ b/packages/@aws-cdk/aws-cloudfront-origins/package.json @@ -48,7 +48,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "jest": true, diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index 8c76c12197755..46177ce2000bd 100644 --- a/packages/@aws-cdk/aws-cloudfront/package.json +++ b/packages/@aws-cdk/aws-cloudfront/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::CloudFront", diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index 3155decd9f212..a8e014176a93b 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::CloudTrail", diff --git a/packages/@aws-cdk/aws-cloudwatch-actions/package.json b/packages/@aws-cdk/aws-cloudwatch-actions/package.json index 8d845afd8eff9..7955ca032bef2 100644 --- a/packages/@aws-cdk/aws-cloudwatch-actions/package.json +++ b/packages/@aws-cdk/aws-cloudwatch-actions/package.json @@ -48,7 +48,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "keywords": [ "aws", diff --git a/packages/@aws-cdk/aws-cloudwatch/package.json b/packages/@aws-cdk/aws-cloudwatch/package.json index e2a716c4fbda8..5a90a27f7e2ea 100644 --- a/packages/@aws-cdk/aws-cloudwatch/package.json +++ b/packages/@aws-cdk/aws-cloudwatch/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::CloudWatch", diff --git a/packages/@aws-cdk/aws-codeartifact/package.json b/packages/@aws-cdk/aws-codeartifact/package.json index b34c43c558a78..32bcd12d1a022 100644 --- a/packages/@aws-cdk/aws-codeartifact/package.json +++ b/packages/@aws-cdk/aws-codeartifact/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::CodeArtifact", diff --git a/packages/@aws-cdk/aws-codebuild/package.json b/packages/@aws-cdk/aws-codebuild/package.json index 00f01bede7afe..081dbd1b4c3ce 100644 --- a/packages/@aws-cdk/aws-codebuild/package.json +++ b/packages/@aws-cdk/aws-codebuild/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::CodeBuild", diff --git a/packages/@aws-cdk/aws-codecommit/package.json b/packages/@aws-cdk/aws-codecommit/package.json index 34141449edc58..5a4e733cfa460 100644 --- a/packages/@aws-cdk/aws-codecommit/package.json +++ b/packages/@aws-cdk/aws-codecommit/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::CodeCommit", diff --git a/packages/@aws-cdk/aws-codedeploy/package.json b/packages/@aws-cdk/aws-codedeploy/package.json index 23cf8b8f1242a..2214d3414ee72 100644 --- a/packages/@aws-cdk/aws-codedeploy/package.json +++ b/packages/@aws-cdk/aws-codedeploy/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::CodeDeploy", diff --git a/packages/@aws-cdk/aws-codeguruprofiler/package.json b/packages/@aws-cdk/aws-codeguruprofiler/package.json index 835e78d5b9882..7a14730452868 100644 --- a/packages/@aws-cdk/aws-codeguruprofiler/package.json +++ b/packages/@aws-cdk/aws-codeguruprofiler/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::CodeGuruProfiler", diff --git a/packages/@aws-cdk/aws-codegurureviewer/package.json b/packages/@aws-cdk/aws-codegurureviewer/package.json index ab40869eed2a8..b41bb825eed97 100644 --- a/packages/@aws-cdk/aws-codegurureviewer/package.json +++ b/packages/@aws-cdk/aws-codegurureviewer/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::CodeGuruReviewer", diff --git a/packages/@aws-cdk/aws-codepipeline-actions/package.json b/packages/@aws-cdk/aws-codepipeline-actions/package.json index 6cf31932d7c31..bb959f76910bb 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/package.json +++ b/packages/@aws-cdk/aws-codepipeline-actions/package.json @@ -48,7 +48,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "nyc": { "statements": 70 diff --git a/packages/@aws-cdk/aws-codepipeline/package.json b/packages/@aws-cdk/aws-codepipeline/package.json index 343c87745cfc5..c5cd1428b32ad 100644 --- a/packages/@aws-cdk/aws-codepipeline/package.json +++ b/packages/@aws-cdk/aws-codepipeline/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::CodePipeline", diff --git a/packages/@aws-cdk/aws-codestar/package.json b/packages/@aws-cdk/aws-codestar/package.json index 760a231f1b03b..81e22a59fa6d6 100644 --- a/packages/@aws-cdk/aws-codestar/package.json +++ b/packages/@aws-cdk/aws-codestar/package.json @@ -51,7 +51,8 @@ "build+test": "npm run build && npm test", "build+test+package": "npm run build+test && npm run package", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::CodeStar", diff --git a/packages/@aws-cdk/aws-codestarconnections/package.json b/packages/@aws-cdk/aws-codestarconnections/package.json index 872b1eef71c7a..6f2bcef93d1de 100644 --- a/packages/@aws-cdk/aws-codestarconnections/package.json +++ b/packages/@aws-cdk/aws-codestarconnections/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::CodeStarConnections", diff --git a/packages/@aws-cdk/aws-codestarnotifications/package.json b/packages/@aws-cdk/aws-codestarnotifications/package.json index 2e66c6d5cfc88..6175bb8240cfc 100644 --- a/packages/@aws-cdk/aws-codestarnotifications/package.json +++ b/packages/@aws-cdk/aws-codestarnotifications/package.json @@ -51,7 +51,8 @@ "compat": "cdk-compat", "build+test": "npm run build && npm test", "build+test+package": "npm run build+test && npm run package", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::CodeStarNotifications", diff --git a/packages/@aws-cdk/aws-cognito/package.json b/packages/@aws-cdk/aws-cognito/package.json index 137a8335d8300..a258cec6a5828 100644 --- a/packages/@aws-cdk/aws-cognito/package.json +++ b/packages/@aws-cdk/aws-cognito/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Cognito", @@ -88,7 +89,6 @@ "@aws-cdk/custom-resources": "0.0.0", "constructs": "^3.2.0", "punycode": "^2.1.1" - }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { diff --git a/packages/@aws-cdk/aws-config/package.json b/packages/@aws-cdk/aws-config/package.json index f0a2b099aeb38..b804ca3107272 100644 --- a/packages/@aws-cdk/aws-config/package.json +++ b/packages/@aws-cdk/aws-config/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Config", diff --git a/packages/@aws-cdk/aws-databrew/README.md b/packages/@aws-cdk/aws-databrew/README.md index d3ad1b0618ed8..ef80e10589356 100644 --- a/packages/@aws-cdk/aws-databrew/README.md +++ b/packages/@aws-cdk/aws-databrew/README.md @@ -1,4 +1,4 @@ -## AWS::DataBrew Construct Library +# AWS::DataBrew Construct Library --- diff --git a/packages/@aws-cdk/aws-databrew/package.json b/packages/@aws-cdk/aws-databrew/package.json index 4fe82b685a9fc..206ef596eddc4 100644 --- a/packages/@aws-cdk/aws-databrew/package.json +++ b/packages/@aws-cdk/aws-databrew/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::DataBrew", diff --git a/packages/@aws-cdk/aws-datapipeline/package.json b/packages/@aws-cdk/aws-datapipeline/package.json index 2616e75f0ae50..1d06793bc468d 100644 --- a/packages/@aws-cdk/aws-datapipeline/package.json +++ b/packages/@aws-cdk/aws-datapipeline/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::DataPipeline", diff --git a/packages/@aws-cdk/aws-dax/package.json b/packages/@aws-cdk/aws-dax/package.json index ff9f670d9342d..fda4919536bda 100644 --- a/packages/@aws-cdk/aws-dax/package.json +++ b/packages/@aws-cdk/aws-dax/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::DAX", diff --git a/packages/@aws-cdk/aws-detective/package.json b/packages/@aws-cdk/aws-detective/package.json index fce28548ba5ff..4ba81cd9cfe6d 100644 --- a/packages/@aws-cdk/aws-detective/package.json +++ b/packages/@aws-cdk/aws-detective/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Detective", diff --git a/packages/@aws-cdk/aws-directoryservice/package.json b/packages/@aws-cdk/aws-directoryservice/package.json index a18dc6e3e7c44..cef38d0658370 100644 --- a/packages/@aws-cdk/aws-directoryservice/package.json +++ b/packages/@aws-cdk/aws-directoryservice/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::DirectoryService", diff --git a/packages/@aws-cdk/aws-dlm/package.json b/packages/@aws-cdk/aws-dlm/package.json index 0d53f1fef19b8..6dbd27a82fd13 100644 --- a/packages/@aws-cdk/aws-dlm/package.json +++ b/packages/@aws-cdk/aws-dlm/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::DLM", diff --git a/packages/@aws-cdk/aws-dms/package.json b/packages/@aws-cdk/aws-dms/package.json index d66461f0de8ef..d8b4006f21b2b 100644 --- a/packages/@aws-cdk/aws-dms/package.json +++ b/packages/@aws-cdk/aws-dms/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::DMS", diff --git a/packages/@aws-cdk/aws-docdb/package.json b/packages/@aws-cdk/aws-docdb/package.json index 7cf1e49c2755d..8f094c3a7afa2 100644 --- a/packages/@aws-cdk/aws-docdb/package.json +++ b/packages/@aws-cdk/aws-docdb/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::DocDB", diff --git a/packages/@aws-cdk/aws-dynamodb-global/package.json b/packages/@aws-cdk/aws-dynamodb-global/package.json index d7d968eb2d007..0c320e49802cf 100644 --- a/packages/@aws-cdk/aws-dynamodb-global/package.json +++ b/packages/@aws-cdk/aws-dynamodb-global/package.json @@ -83,7 +83,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index 90252f3b5c127..39c1aa5956184 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::DynamoDB", diff --git a/packages/@aws-cdk/aws-ec2/package.json b/packages/@aws-cdk/aws-ec2/package.json index c12df7e9f0688..a875368de30d9 100644 --- a/packages/@aws-cdk/aws-ec2/package.json +++ b/packages/@aws-cdk/aws-ec2/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::EC2", diff --git a/packages/@aws-cdk/aws-ecr-assets/package.json b/packages/@aws-cdk/aws-ecr-assets/package.json index 093fecd65c662..fa6016506e107 100644 --- a/packages/@aws-cdk/aws-ecr-assets/package.json +++ b/packages/@aws-cdk/aws-ecr-assets/package.json @@ -48,7 +48,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "keywords": [ "aws", diff --git a/packages/@aws-cdk/aws-ecr/package.json b/packages/@aws-cdk/aws-ecr/package.json index 76833c3af96af..670fa0ef23d8d 100644 --- a/packages/@aws-cdk/aws-ecr/package.json +++ b/packages/@aws-cdk/aws-ecr/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::ECR", diff --git a/packages/@aws-cdk/aws-ecs-patterns/package.json b/packages/@aws-cdk/aws-ecs-patterns/package.json index c18883a851c19..87077ba19645b 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/package.json +++ b/packages/@aws-cdk/aws-ecs-patterns/package.json @@ -48,7 +48,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "keywords": [ "aws", diff --git a/packages/@aws-cdk/aws-ecs/package.json b/packages/@aws-cdk/aws-ecs/package.json index 40e368ebdf905..41f459b775c7f 100644 --- a/packages/@aws-cdk/aws-ecs/package.json +++ b/packages/@aws-cdk/aws-ecs/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::ECS", diff --git a/packages/@aws-cdk/aws-efs/package.json b/packages/@aws-cdk/aws-efs/package.json index fcfe0e162c926..5594f391a0065 100644 --- a/packages/@aws-cdk/aws-efs/package.json +++ b/packages/@aws-cdk/aws-efs/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::EFS", diff --git a/packages/@aws-cdk/aws-eks-legacy/package.json b/packages/@aws-cdk/aws-eks-legacy/package.json index 08b032f34503d..2ce08cf6d1da2 100644 --- a/packages/@aws-cdk/aws-eks-legacy/package.json +++ b/packages/@aws-cdk/aws-eks-legacy/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::EKS" diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index ab5512f0ce049..32b042e82cd57 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::EKS", diff --git a/packages/@aws-cdk/aws-elasticache/package.json b/packages/@aws-cdk/aws-elasticache/package.json index 7374b48deed67..c56a2e4d94129 100644 --- a/packages/@aws-cdk/aws-elasticache/package.json +++ b/packages/@aws-cdk/aws-elasticache/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::ElastiCache", diff --git a/packages/@aws-cdk/aws-elasticbeanstalk/package.json b/packages/@aws-cdk/aws-elasticbeanstalk/package.json index 1fc91742b9ff8..397a0727a0c79 100644 --- a/packages/@aws-cdk/aws-elasticbeanstalk/package.json +++ b/packages/@aws-cdk/aws-elasticbeanstalk/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::ElasticBeanstalk", diff --git a/packages/@aws-cdk/aws-elasticloadbalancing/package.json b/packages/@aws-cdk/aws-elasticloadbalancing/package.json index a84ca148bb138..67dad28cdc322 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancing/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancing/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::ElasticLoadBalancing", diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json index 3d2ad11bd8a9f..b96e5ad634f5c 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json @@ -48,7 +48,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "keywords": [ "aws", diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json b/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json index 242f294ad02f1..a0bc55a5ddc2f 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json @@ -48,7 +48,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "keywords": [ "aws", diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json index d65911b6abd7f..974ddc9b78c0d 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::ElasticLoadBalancingV2", diff --git a/packages/@aws-cdk/aws-elasticsearch/package.json b/packages/@aws-cdk/aws-elasticsearch/package.json index 36235fb85ccdc..c8844413e9853 100644 --- a/packages/@aws-cdk/aws-elasticsearch/package.json +++ b/packages/@aws-cdk/aws-elasticsearch/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Elasticsearch", diff --git a/packages/@aws-cdk/aws-emr/package.json b/packages/@aws-cdk/aws-emr/package.json index 896d8f27486f7..82653f7f15f3d 100644 --- a/packages/@aws-cdk/aws-emr/package.json +++ b/packages/@aws-cdk/aws-emr/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::EMR", diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index fa17eec28f293..9896ab215ce14 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -49,7 +49,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "node ./build-tools/gen.js" + "gen": "node ./build-tools/gen.js", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "jest": true, diff --git a/packages/@aws-cdk/aws-events/package.json b/packages/@aws-cdk/aws-events/package.json index 30a4c1ec88641..084f246783f23 100644 --- a/packages/@aws-cdk/aws-events/package.json +++ b/packages/@aws-cdk/aws-events/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Events", diff --git a/packages/@aws-cdk/aws-eventschemas/package.json b/packages/@aws-cdk/aws-eventschemas/package.json index 4d349d1430de6..fe4e491a8ace9 100644 --- a/packages/@aws-cdk/aws-eventschemas/package.json +++ b/packages/@aws-cdk/aws-eventschemas/package.json @@ -51,7 +51,8 @@ "compat": "cdk-compat", "build+test": "npm run build && npm test", "build+test+package": "npm run build+test && npm run package", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::EventSchemas", diff --git a/packages/@aws-cdk/aws-fms/package.json b/packages/@aws-cdk/aws-fms/package.json index 03f60d20301ae..2414df6719d2e 100644 --- a/packages/@aws-cdk/aws-fms/package.json +++ b/packages/@aws-cdk/aws-fms/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::FMS", diff --git a/packages/@aws-cdk/aws-fsx/package.json b/packages/@aws-cdk/aws-fsx/package.json index c68f58d37b967..485a1f3c330f4 100644 --- a/packages/@aws-cdk/aws-fsx/package.json +++ b/packages/@aws-cdk/aws-fsx/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::FSx", diff --git a/packages/@aws-cdk/aws-gamelift/package.json b/packages/@aws-cdk/aws-gamelift/package.json index 34a9f1cfed840..a43def9979e29 100644 --- a/packages/@aws-cdk/aws-gamelift/package.json +++ b/packages/@aws-cdk/aws-gamelift/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::GameLift", diff --git a/packages/@aws-cdk/aws-globalaccelerator/package.json b/packages/@aws-cdk/aws-globalaccelerator/package.json index 8809ee1ada608..945d312b2dc02 100644 --- a/packages/@aws-cdk/aws-globalaccelerator/package.json +++ b/packages/@aws-cdk/aws-globalaccelerator/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::GlobalAccelerator", diff --git a/packages/@aws-cdk/aws-glue/package.json b/packages/@aws-cdk/aws-glue/package.json index f8d190cad4a41..53071428690fb 100644 --- a/packages/@aws-cdk/aws-glue/package.json +++ b/packages/@aws-cdk/aws-glue/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Glue", diff --git a/packages/@aws-cdk/aws-greengrass/package.json b/packages/@aws-cdk/aws-greengrass/package.json index 8a7c7a23426a4..9ac1e1e9bcfe8 100644 --- a/packages/@aws-cdk/aws-greengrass/package.json +++ b/packages/@aws-cdk/aws-greengrass/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Greengrass", diff --git a/packages/@aws-cdk/aws-guardduty/package.json b/packages/@aws-cdk/aws-guardduty/package.json index 3a6f77234396e..e4008753c6578 100644 --- a/packages/@aws-cdk/aws-guardduty/package.json +++ b/packages/@aws-cdk/aws-guardduty/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::GuardDuty", diff --git a/packages/@aws-cdk/aws-iam/README.md b/packages/@aws-cdk/aws-iam/README.md index 1cc8740b89927..d32237517eaac 100644 --- a/packages/@aws-cdk/aws-iam/README.md +++ b/packages/@aws-cdk/aws-iam/README.md @@ -28,8 +28,8 @@ Managed policies can be attached using `xxx.addManagedPolicy(ManagedPolicy.fromA Many of the AWS CDK resources have `grant*` methods that allow you to grant other resources access to that resource. As an example, the following code gives a Lambda function write permissions (Put, Update, Delete) to a DynamoDB table. ```typescript -const fn = new lambda.Function(...); -const table = new dynamodb.Table(...); +const fn = new lambda.Function(this, 'Function', functionProps); +const table = new dynamodb.Table(this, 'Table', tableProps); table.grantWriteData(fn); ``` @@ -37,8 +37,8 @@ table.grantWriteData(fn); The more generic `grant` method allows you to give specific permissions to a resource: ```typescript -const fn = new lambda.Function(...); -const table = new dynamodb.Table(...); +const fn = new lambda.Function(this, 'Function', functionProps); +const table = new dynamodb.Table(this, 'Table', tableProps); table.grant(fn, 'dynamodb:PutItem'); ``` @@ -98,9 +98,9 @@ new codepipeline.Pipeline(this, 'Pipeline', { // You now have to manage the Role policies yourself role.addToPolicy(new iam.PolicyStatement({ - action: [/* whatever actions you want */], - resource: [/* whatever resources you intend to touch */], -}); + actions: [/* whatever actions you want */], + resources: [/* whatever resources you intend to touch */], +})); ``` #### Using existing roles @@ -160,7 +160,7 @@ To add a principal to a policy statement you can either use the abstract If multiple principals are added to the policy statement, they will be merged together: ```ts -const statement = new PolicyStatement(); +const statement = new iam.PolicyStatement(); statement.addServicePrincipal('cloudwatch.amazonaws.com'); statement.addServicePrincipal('ec2.amazonaws.com'); statement.addArnPrincipal('arn:aws:boom:boom'); @@ -250,14 +250,14 @@ const policyDocument = { ] }; -const customPolicyDocument = PolicyDocument.fromJson(policyDocument); +const customPolicyDocument = iam.PolicyDocument.fromJson(policyDocument); // You can pass this document as an initial document to a ManagedPolicy // or inline Policy. -const newManagedPolicy = new ManagedPolicy(stack, 'MyNewManagedPolicy', { +const newManagedPolicy = new ManagedPolicy(stack, 'MyNewManagedPolicy', { document: customPolicyDocument }); -const newPolicy = new Policy(stack, 'MyNewPolicy', { +const newPolicy = new Policy(stack, 'MyNewPolicy', { document: customPolicyDocument }); ``` @@ -283,9 +283,9 @@ The following examples defines an OpenID Connect provider. Two client IDs https://openid/connect. ```ts -const provider = new OpenIdConnectProvider(this, 'MyProvider', { +const provider = new iam.OpenIdConnectProvider(this, 'MyProvider', { url: 'https://openid/connect', - clients: [ 'myclient1', 'myclient2' ] + clientIds: [ 'myclient1', 'myclient2' ], }); ``` @@ -302,16 +302,18 @@ you can reference the provider's ARN as follows: ```ts new cognito.CfnIdentityPool(this, 'IdentityPool', { - openIdConnectProviderARNs: [ provider.openIdConnectProviderArn ] + openIdConnectProviderArns: [myProvider.openIdConnectProviderArn], + // And the other properties for your identity pool + allowUnauthenticatedIdentities, }); ``` The `OpenIdConnectPrincipal` class can be used as a principal used with a `OpenIdConnectProvider`, for example: ```ts -const provider = new OpenIdConnectProvider(this, 'MyProvider', { +const provider = new iam.OpenIdConnectProvider(this, 'MyProvider', { url: 'https://openid/connect', - clients: [ 'myclient1', 'myclient2' ] + clientIds: [ 'myclient1', 'myclient2' ] }); const principal = new iam.OpenIdConnectPrincipal(provider); ``` diff --git a/packages/@aws-cdk/aws-iam/package.json b/packages/@aws-cdk/aws-iam/package.json index 5f8eb193f2539..aca4f4a77e613 100644 --- a/packages/@aws-cdk/aws-iam/package.json +++ b/packages/@aws-cdk/aws-iam/package.json @@ -30,7 +30,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", @@ -50,7 +57,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::IAM", diff --git a/packages/@aws-cdk/aws-iam/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-iam/rosetta/default.ts-fixture new file mode 100644 index 0000000000000..a76493f53c694 --- /dev/null +++ b/packages/@aws-cdk/aws-iam/rosetta/default.ts-fixture @@ -0,0 +1,19 @@ +import { Construct } from '@aws-cdk/core'; +import * as codepipeline from '@aws-cdk/aws-codepipeline'; +import * as cognito from '@aws-cdk/aws-cognito'; +import * as dynamodb from '@aws-cdk/aws-dynamodb'; +import * as lambda from '@aws-cdk/aws-lambda'; +import * as iam from '@aws-cdk/aws-iam'; + +declare const allowUnauthenticatedIdentities: boolean; +declare const functionProps: lambda.FunctionProps; +declare const myProvider: iam.OpenIdConnectProvider; +declare const tableProps: dynamodb.TableProps; + +class fixture$construct extends Construct { + public constructor(scope: Construct, id: string) { + super(scope, id); + + /// here + } +} diff --git a/packages/@aws-cdk/aws-imagebuilder/package.json b/packages/@aws-cdk/aws-imagebuilder/package.json index 656f94b3a8c38..2742ce7697bf3 100644 --- a/packages/@aws-cdk/aws-imagebuilder/package.json +++ b/packages/@aws-cdk/aws-imagebuilder/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::ImageBuilder", diff --git a/packages/@aws-cdk/aws-inspector/package.json b/packages/@aws-cdk/aws-inspector/package.json index 942136fe80fe9..86170a7e0c04c 100644 --- a/packages/@aws-cdk/aws-inspector/package.json +++ b/packages/@aws-cdk/aws-inspector/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Inspector", diff --git a/packages/@aws-cdk/aws-iot/package.json b/packages/@aws-cdk/aws-iot/package.json index bed4728e5c214..be216a8faee2d 100644 --- a/packages/@aws-cdk/aws-iot/package.json +++ b/packages/@aws-cdk/aws-iot/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::IoT", diff --git a/packages/@aws-cdk/aws-iot1click/package.json b/packages/@aws-cdk/aws-iot1click/package.json index 432f684d92488..335455eb17d37 100644 --- a/packages/@aws-cdk/aws-iot1click/package.json +++ b/packages/@aws-cdk/aws-iot1click/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::IoT1Click", diff --git a/packages/@aws-cdk/aws-iotanalytics/package.json b/packages/@aws-cdk/aws-iotanalytics/package.json index 8060f4bf31e3f..3339cb21c96a5 100644 --- a/packages/@aws-cdk/aws-iotanalytics/package.json +++ b/packages/@aws-cdk/aws-iotanalytics/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::IoTAnalytics", diff --git a/packages/@aws-cdk/aws-iotevents/package.json b/packages/@aws-cdk/aws-iotevents/package.json index 93e91d3009149..894a4444c427b 100644 --- a/packages/@aws-cdk/aws-iotevents/package.json +++ b/packages/@aws-cdk/aws-iotevents/package.json @@ -51,7 +51,8 @@ "build+test": "npm run build && npm test", "build+test+package": "npm run build+test && npm run package", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::IoTEvents", diff --git a/packages/@aws-cdk/aws-iotsitewise/package.json b/packages/@aws-cdk/aws-iotsitewise/package.json index 8291616094fca..08126c3b4a3fe 100644 --- a/packages/@aws-cdk/aws-iotsitewise/package.json +++ b/packages/@aws-cdk/aws-iotsitewise/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::IoTSiteWise", diff --git a/packages/@aws-cdk/aws-iotthingsgraph/package.json b/packages/@aws-cdk/aws-iotthingsgraph/package.json index 4ab7df4c160e2..2e9108ec10b42 100644 --- a/packages/@aws-cdk/aws-iotthingsgraph/package.json +++ b/packages/@aws-cdk/aws-iotthingsgraph/package.json @@ -51,7 +51,8 @@ "build+test": "npm run build && npm test", "build+test+package": "npm run build+test && npm run package", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::IoTThingsGraph", diff --git a/packages/@aws-cdk/aws-ivs/package.json b/packages/@aws-cdk/aws-ivs/package.json index ea872b6960b3f..e45a537ce9e02 100644 --- a/packages/@aws-cdk/aws-ivs/package.json +++ b/packages/@aws-cdk/aws-ivs/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::IVS", diff --git a/packages/@aws-cdk/aws-kendra/package.json b/packages/@aws-cdk/aws-kendra/package.json index 17008caafbb38..27fe34bbe973b 100644 --- a/packages/@aws-cdk/aws-kendra/package.json +++ b/packages/@aws-cdk/aws-kendra/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Kendra", diff --git a/packages/@aws-cdk/aws-kinesis/package.json b/packages/@aws-cdk/aws-kinesis/package.json index 26afdf4601d49..3fa0c93ec77f1 100644 --- a/packages/@aws-cdk/aws-kinesis/package.json +++ b/packages/@aws-cdk/aws-kinesis/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Kinesis", diff --git a/packages/@aws-cdk/aws-kinesisanalytics/package.json b/packages/@aws-cdk/aws-kinesisanalytics/package.json index db138e371caff..2488c436bd3c3 100644 --- a/packages/@aws-cdk/aws-kinesisanalytics/package.json +++ b/packages/@aws-cdk/aws-kinesisanalytics/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": [ diff --git a/packages/@aws-cdk/aws-kinesisfirehose/package.json b/packages/@aws-cdk/aws-kinesisfirehose/package.json index 8ee3142abb608..69c3ac1385552 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose/package.json +++ b/packages/@aws-cdk/aws-kinesisfirehose/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::KinesisFirehose", diff --git a/packages/@aws-cdk/aws-kms/package.json b/packages/@aws-cdk/aws-kms/package.json index a4c21a6c4ae03..d9c0c40fc3239 100644 --- a/packages/@aws-cdk/aws-kms/package.json +++ b/packages/@aws-cdk/aws-kms/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::KMS", diff --git a/packages/@aws-cdk/aws-lakeformation/package.json b/packages/@aws-cdk/aws-lakeformation/package.json index ada1aff6d4701..22b480da5f72b 100644 --- a/packages/@aws-cdk/aws-lakeformation/package.json +++ b/packages/@aws-cdk/aws-lakeformation/package.json @@ -51,7 +51,8 @@ "build+test": "npm run build && npm test", "build+test+package": "npm run build+test && npm run package", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::LakeFormation", diff --git a/packages/@aws-cdk/aws-lambda-destinations/package.json b/packages/@aws-cdk/aws-lambda-destinations/package.json index 3f073267b5d75..701f56d4b33f1 100644 --- a/packages/@aws-cdk/aws-lambda-destinations/package.json +++ b/packages/@aws-cdk/aws-lambda-destinations/package.json @@ -48,7 +48,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "keywords": [ "aws", diff --git a/packages/@aws-cdk/aws-lambda-event-sources/package.json b/packages/@aws-cdk/aws-lambda-event-sources/package.json index f67c62815bb04..603f3c8b82626 100644 --- a/packages/@aws-cdk/aws-lambda-event-sources/package.json +++ b/packages/@aws-cdk/aws-lambda-event-sources/package.json @@ -48,7 +48,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "keywords": [ "aws", diff --git a/packages/@aws-cdk/aws-lambda-nodejs/package.json b/packages/@aws-cdk/aws-lambda-nodejs/package.json index afb611e22c6bb..2542a3f314479 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/package.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/package.json @@ -48,7 +48,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "keywords": [ "aws", diff --git a/packages/@aws-cdk/aws-lambda-python/package.json b/packages/@aws-cdk/aws-lambda-python/package.json index abd231096a979..15a41e3b22806 100644 --- a/packages/@aws-cdk/aws-lambda-python/package.json +++ b/packages/@aws-cdk/aws-lambda-python/package.json @@ -48,7 +48,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "keywords": [ "aws", diff --git a/packages/@aws-cdk/aws-lambda/package.json b/packages/@aws-cdk/aws-lambda/package.json index 9b243f70f1af3..e5147ee280507 100644 --- a/packages/@aws-cdk/aws-lambda/package.json +++ b/packages/@aws-cdk/aws-lambda/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Lambda", diff --git a/packages/@aws-cdk/aws-logs-destinations/package.json b/packages/@aws-cdk/aws-logs-destinations/package.json index 088d42b51feeb..fb995e0755637 100644 --- a/packages/@aws-cdk/aws-logs-destinations/package.json +++ b/packages/@aws-cdk/aws-logs-destinations/package.json @@ -48,7 +48,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "keywords": [ "aws", diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index d354ff00e1d24..0ea222263a87c 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Logs", diff --git a/packages/@aws-cdk/aws-macie/package.json b/packages/@aws-cdk/aws-macie/package.json index 31cadb759a266..8e09af4e347ff 100644 --- a/packages/@aws-cdk/aws-macie/package.json +++ b/packages/@aws-cdk/aws-macie/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Macie", diff --git a/packages/@aws-cdk/aws-managedblockchain/package.json b/packages/@aws-cdk/aws-managedblockchain/package.json index de565cc79d2f6..a5bda96e3e0c4 100644 --- a/packages/@aws-cdk/aws-managedblockchain/package.json +++ b/packages/@aws-cdk/aws-managedblockchain/package.json @@ -51,7 +51,8 @@ "build+test": "npm run build && npm test", "build+test+package": "npm run build+test && npm run package", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::ManagedBlockchain", diff --git a/packages/@aws-cdk/aws-mediaconvert/package.json b/packages/@aws-cdk/aws-mediaconvert/package.json index 76d41d8590466..1e87cc0db2737 100644 --- a/packages/@aws-cdk/aws-mediaconvert/package.json +++ b/packages/@aws-cdk/aws-mediaconvert/package.json @@ -51,7 +51,8 @@ "compat": "cdk-compat", "build+test": "npm run build && npm test", "build+test+package": "npm run build+test && npm run package", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::MediaConvert", diff --git a/packages/@aws-cdk/aws-medialive/package.json b/packages/@aws-cdk/aws-medialive/package.json index 55abb694dbb84..5931e3d7ed57c 100644 --- a/packages/@aws-cdk/aws-medialive/package.json +++ b/packages/@aws-cdk/aws-medialive/package.json @@ -51,7 +51,8 @@ "build+test": "npm run build && npm test", "build+test+package": "npm run build+test && npm run package", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::MediaLive", diff --git a/packages/@aws-cdk/aws-mediapackage/package.json b/packages/@aws-cdk/aws-mediapackage/package.json index c3561ae1027bf..adba0df0f44f9 100644 --- a/packages/@aws-cdk/aws-mediapackage/package.json +++ b/packages/@aws-cdk/aws-mediapackage/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::MediaPackage", diff --git a/packages/@aws-cdk/aws-mediastore/package.json b/packages/@aws-cdk/aws-mediastore/package.json index bcdcfd25ee3cd..ecfc189e69e82 100644 --- a/packages/@aws-cdk/aws-mediastore/package.json +++ b/packages/@aws-cdk/aws-mediastore/package.json @@ -51,7 +51,8 @@ "build+test": "npm run build && npm test", "build+test+package": "npm run build+test && npm run package", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::MediaStore", diff --git a/packages/@aws-cdk/aws-msk/package.json b/packages/@aws-cdk/aws-msk/package.json index fe11ccb745bdf..af31390fd9492 100644 --- a/packages/@aws-cdk/aws-msk/package.json +++ b/packages/@aws-cdk/aws-msk/package.json @@ -51,7 +51,8 @@ "build+test": "npm run build && npm test", "build+test+package": "npm run build+test && npm run package", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::MSK", diff --git a/packages/@aws-cdk/aws-neptune/package.json b/packages/@aws-cdk/aws-neptune/package.json index e979f191033aa..a8957ab3c5597 100644 --- a/packages/@aws-cdk/aws-neptune/package.json +++ b/packages/@aws-cdk/aws-neptune/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Neptune", diff --git a/packages/@aws-cdk/aws-networkfirewall/README.md b/packages/@aws-cdk/aws-networkfirewall/README.md index 8593ffd675be5..046f36a97d5c7 100644 --- a/packages/@aws-cdk/aws-networkfirewall/README.md +++ b/packages/@aws-cdk/aws-networkfirewall/README.md @@ -1,4 +1,4 @@ -## AWS::NetworkFirewall Construct Library +# AWS::NetworkFirewall Construct Library --- diff --git a/packages/@aws-cdk/aws-networkfirewall/package.json b/packages/@aws-cdk/aws-networkfirewall/package.json index f8415a0b9be52..4244a68ab8977 100644 --- a/packages/@aws-cdk/aws-networkfirewall/package.json +++ b/packages/@aws-cdk/aws-networkfirewall/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::NetworkFirewall", diff --git a/packages/@aws-cdk/aws-networkmanager/package.json b/packages/@aws-cdk/aws-networkmanager/package.json index c37cae4a92c20..6384bf99c98d3 100644 --- a/packages/@aws-cdk/aws-networkmanager/package.json +++ b/packages/@aws-cdk/aws-networkmanager/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::NetworkManager", diff --git a/packages/@aws-cdk/aws-opsworks/package.json b/packages/@aws-cdk/aws-opsworks/package.json index c37aa3b6a6193..f4522ff87d766 100644 --- a/packages/@aws-cdk/aws-opsworks/package.json +++ b/packages/@aws-cdk/aws-opsworks/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::OpsWorks", diff --git a/packages/@aws-cdk/aws-opsworkscm/package.json b/packages/@aws-cdk/aws-opsworkscm/package.json index 475d423a77936..10eda477f9572 100644 --- a/packages/@aws-cdk/aws-opsworkscm/package.json +++ b/packages/@aws-cdk/aws-opsworkscm/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::OpsWorksCM", diff --git a/packages/@aws-cdk/aws-pinpoint/package.json b/packages/@aws-cdk/aws-pinpoint/package.json index 355a2622af74b..17191f2fef2b3 100644 --- a/packages/@aws-cdk/aws-pinpoint/package.json +++ b/packages/@aws-cdk/aws-pinpoint/package.json @@ -51,7 +51,8 @@ "build+test": "npm run build && npm test", "build+test+package": "npm run build+test && npm run package", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Pinpoint", diff --git a/packages/@aws-cdk/aws-pinpointemail/package.json b/packages/@aws-cdk/aws-pinpointemail/package.json index 291a9753a446b..d18a2055e9c9d 100644 --- a/packages/@aws-cdk/aws-pinpointemail/package.json +++ b/packages/@aws-cdk/aws-pinpointemail/package.json @@ -51,7 +51,8 @@ "build+test": "npm run build && npm test", "build+test+package": "npm run build+test && npm run package", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::PinpointEmail", diff --git a/packages/@aws-cdk/aws-qldb/package.json b/packages/@aws-cdk/aws-qldb/package.json index 0a9efbca21d0c..dc8e42e6eb538 100644 --- a/packages/@aws-cdk/aws-qldb/package.json +++ b/packages/@aws-cdk/aws-qldb/package.json @@ -51,7 +51,8 @@ "build+test": "npm run build && npm test", "build+test+package": "npm run build+test && npm run package", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::QLDB", diff --git a/packages/@aws-cdk/aws-ram/package.json b/packages/@aws-cdk/aws-ram/package.json index 29044fca0770f..f0ae21655882d 100644 --- a/packages/@aws-cdk/aws-ram/package.json +++ b/packages/@aws-cdk/aws-ram/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::RAM", diff --git a/packages/@aws-cdk/aws-rds/package.json b/packages/@aws-cdk/aws-rds/package.json index 564ff3e89b77e..82e3e67bd09ea 100644 --- a/packages/@aws-cdk/aws-rds/package.json +++ b/packages/@aws-cdk/aws-rds/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::RDS", diff --git a/packages/@aws-cdk/aws-redshift/package.json b/packages/@aws-cdk/aws-redshift/package.json index dbdc8994c5894..dd45d0f4c0984 100644 --- a/packages/@aws-cdk/aws-redshift/package.json +++ b/packages/@aws-cdk/aws-redshift/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Redshift", diff --git a/packages/@aws-cdk/aws-resourcegroups/package.json b/packages/@aws-cdk/aws-resourcegroups/package.json index 1e0965bc9bbd3..fa6436b9696ca 100644 --- a/packages/@aws-cdk/aws-resourcegroups/package.json +++ b/packages/@aws-cdk/aws-resourcegroups/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::ResourceGroups", diff --git a/packages/@aws-cdk/aws-robomaker/package.json b/packages/@aws-cdk/aws-robomaker/package.json index 5a95df9dce868..556ab61ddf960 100644 --- a/packages/@aws-cdk/aws-robomaker/package.json +++ b/packages/@aws-cdk/aws-robomaker/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::RoboMaker", diff --git a/packages/@aws-cdk/aws-route53-patterns/package.json b/packages/@aws-cdk/aws-route53-patterns/package.json index e5db2082593d0..0390f220803d5 100644 --- a/packages/@aws-cdk/aws-route53-patterns/package.json +++ b/packages/@aws-cdk/aws-route53-patterns/package.json @@ -48,7 +48,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "keywords": [ "aws", diff --git a/packages/@aws-cdk/aws-route53-targets/package.json b/packages/@aws-cdk/aws-route53-targets/package.json index 52e3e252fb960..c106bcdfec9d2 100644 --- a/packages/@aws-cdk/aws-route53-targets/package.json +++ b/packages/@aws-cdk/aws-route53-targets/package.json @@ -48,7 +48,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "keywords": [ "aws", diff --git a/packages/@aws-cdk/aws-route53/package.json b/packages/@aws-cdk/aws-route53/package.json index 47358c707f4ce..4277101fb5f53 100644 --- a/packages/@aws-cdk/aws-route53/package.json +++ b/packages/@aws-cdk/aws-route53/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Route53", diff --git a/packages/@aws-cdk/aws-route53resolver/package.json b/packages/@aws-cdk/aws-route53resolver/package.json index ecd376d8b0873..027c64fba0408 100644 --- a/packages/@aws-cdk/aws-route53resolver/package.json +++ b/packages/@aws-cdk/aws-route53resolver/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Route53Resolver", diff --git a/packages/@aws-cdk/aws-s3-assets/package.json b/packages/@aws-cdk/aws-s3-assets/package.json index 46eacfbb32c84..d85639e72166b 100644 --- a/packages/@aws-cdk/aws-s3-assets/package.json +++ b/packages/@aws-cdk/aws-s3-assets/package.json @@ -48,7 +48,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "jest": true, diff --git a/packages/@aws-cdk/aws-s3-deployment/package.json b/packages/@aws-cdk/aws-s3-deployment/package.json index fa62ca2e0f789..696bdf08cd5b3 100644 --- a/packages/@aws-cdk/aws-s3-deployment/package.json +++ b/packages/@aws-cdk/aws-s3-deployment/package.json @@ -49,7 +49,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "/bin/bash lambda/build.sh" + "gen": "/bin/bash lambda/build.sh", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "test": [ diff --git a/packages/@aws-cdk/aws-s3-notifications/package.json b/packages/@aws-cdk/aws-s3-notifications/package.json index e78e96ff53d62..5615003d2434a 100644 --- a/packages/@aws-cdk/aws-s3-notifications/package.json +++ b/packages/@aws-cdk/aws-s3-notifications/package.json @@ -48,7 +48,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "keywords": [ "aws", diff --git a/packages/@aws-cdk/aws-s3/package.json b/packages/@aws-cdk/aws-s3/package.json index c886e31837d75..02da965202f64 100644 --- a/packages/@aws-cdk/aws-s3/package.json +++ b/packages/@aws-cdk/aws-s3/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::S3", diff --git a/packages/@aws-cdk/aws-sagemaker/package.json b/packages/@aws-cdk/aws-sagemaker/package.json index 5d0e892ab9c59..a88ab5c1bd71f 100644 --- a/packages/@aws-cdk/aws-sagemaker/package.json +++ b/packages/@aws-cdk/aws-sagemaker/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::SageMaker", diff --git a/packages/@aws-cdk/aws-sam/package.json b/packages/@aws-cdk/aws-sam/package.json index 7a788ee71a606..05e50e259af14 100644 --- a/packages/@aws-cdk/aws-sam/package.json +++ b/packages/@aws-cdk/aws-sam/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Serverless", diff --git a/packages/@aws-cdk/aws-sdb/package.json b/packages/@aws-cdk/aws-sdb/package.json index 2afed44232898..8168f1103341d 100644 --- a/packages/@aws-cdk/aws-sdb/package.json +++ b/packages/@aws-cdk/aws-sdb/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::SDB", diff --git a/packages/@aws-cdk/aws-secretsmanager/package.json b/packages/@aws-cdk/aws-secretsmanager/package.json index 9c6c5a435b3a8..1a95dd50304ea 100644 --- a/packages/@aws-cdk/aws-secretsmanager/package.json +++ b/packages/@aws-cdk/aws-secretsmanager/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::SecretsManager", diff --git a/packages/@aws-cdk/aws-securityhub/package.json b/packages/@aws-cdk/aws-securityhub/package.json index b1df45f5c5f26..9df5bf63185d8 100644 --- a/packages/@aws-cdk/aws-securityhub/package.json +++ b/packages/@aws-cdk/aws-securityhub/package.json @@ -51,7 +51,8 @@ "build+test": "npm run build && npm test", "build+test+package": "npm run build+test && npm run package", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::SecurityHub", diff --git a/packages/@aws-cdk/aws-servicecatalog/package.json b/packages/@aws-cdk/aws-servicecatalog/package.json index 3b499afb13861..5ef00dcabb7a7 100644 --- a/packages/@aws-cdk/aws-servicecatalog/package.json +++ b/packages/@aws-cdk/aws-servicecatalog/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::ServiceCatalog", diff --git a/packages/@aws-cdk/aws-servicediscovery/package.json b/packages/@aws-cdk/aws-servicediscovery/package.json index 23cea7535b032..015947a58bb1d 100644 --- a/packages/@aws-cdk/aws-servicediscovery/package.json +++ b/packages/@aws-cdk/aws-servicediscovery/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::ServiceDiscovery", diff --git a/packages/@aws-cdk/aws-ses-actions/package.json b/packages/@aws-cdk/aws-ses-actions/package.json index ea8d76c7cd66a..e4df395348e5f 100644 --- a/packages/@aws-cdk/aws-ses-actions/package.json +++ b/packages/@aws-cdk/aws-ses-actions/package.json @@ -48,7 +48,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "keywords": [ "aws", diff --git a/packages/@aws-cdk/aws-ses/package.json b/packages/@aws-cdk/aws-ses/package.json index dc8e21a10fc91..f29ccc17ef855 100644 --- a/packages/@aws-cdk/aws-ses/package.json +++ b/packages/@aws-cdk/aws-ses/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::SES", diff --git a/packages/@aws-cdk/aws-signer/package.json b/packages/@aws-cdk/aws-signer/package.json index 342cf0a26d796..bb5c296cadd90 100644 --- a/packages/@aws-cdk/aws-signer/package.json +++ b/packages/@aws-cdk/aws-signer/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Signer", diff --git a/packages/@aws-cdk/aws-sns-subscriptions/package.json b/packages/@aws-cdk/aws-sns-subscriptions/package.json index 59c95c7d06c43..b85a01df97cff 100644 --- a/packages/@aws-cdk/aws-sns-subscriptions/package.json +++ b/packages/@aws-cdk/aws-sns-subscriptions/package.json @@ -48,7 +48,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "keywords": [ "aws", diff --git a/packages/@aws-cdk/aws-sns/package.json b/packages/@aws-cdk/aws-sns/package.json index 83732ab678d65..78cfb62f21572 100644 --- a/packages/@aws-cdk/aws-sns/package.json +++ b/packages/@aws-cdk/aws-sns/package.json @@ -53,7 +53,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::SNS", diff --git a/packages/@aws-cdk/aws-sqs/package.json b/packages/@aws-cdk/aws-sqs/package.json index 1e378c81177a8..de27ec5f50003 100644 --- a/packages/@aws-cdk/aws-sqs/package.json +++ b/packages/@aws-cdk/aws-sqs/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::SQS", diff --git a/packages/@aws-cdk/aws-ssm/package.json b/packages/@aws-cdk/aws-ssm/package.json index 4437b2e750009..fb09f06f706ea 100644 --- a/packages/@aws-cdk/aws-ssm/package.json +++ b/packages/@aws-cdk/aws-ssm/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::SSM", diff --git a/packages/@aws-cdk/aws-sso/package.json b/packages/@aws-cdk/aws-sso/package.json index cc6fa80e8a042..4f76a5ae2eebf 100644 --- a/packages/@aws-cdk/aws-sso/package.json +++ b/packages/@aws-cdk/aws-sso/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::SSO", diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/package.json b/packages/@aws-cdk/aws-stepfunctions-tasks/package.json index 9d7dca5eee6fd..f75318aaa786e 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/package.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/package.json @@ -48,7 +48,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "keywords": [ "aws", diff --git a/packages/@aws-cdk/aws-stepfunctions/package.json b/packages/@aws-cdk/aws-stepfunctions/package.json index 1b11c1ea45ebd..99ee2dc7cd54b 100644 --- a/packages/@aws-cdk/aws-stepfunctions/package.json +++ b/packages/@aws-cdk/aws-stepfunctions/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::StepFunctions", diff --git a/packages/@aws-cdk/aws-synthetics/package.json b/packages/@aws-cdk/aws-synthetics/package.json index bedbeffc9997d..8bc88c9255af5 100644 --- a/packages/@aws-cdk/aws-synthetics/package.json +++ b/packages/@aws-cdk/aws-synthetics/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Synthetics", diff --git a/packages/@aws-cdk/aws-timestream/package.json b/packages/@aws-cdk/aws-timestream/package.json index 57285b6625155..ff6007132dde1 100644 --- a/packages/@aws-cdk/aws-timestream/package.json +++ b/packages/@aws-cdk/aws-timestream/package.json @@ -51,7 +51,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Timestream", diff --git a/packages/@aws-cdk/aws-transfer/package.json b/packages/@aws-cdk/aws-transfer/package.json index 70d4cf2fc0a91..5a0bcb7f1af22 100644 --- a/packages/@aws-cdk/aws-transfer/package.json +++ b/packages/@aws-cdk/aws-transfer/package.json @@ -51,7 +51,8 @@ "build+test": "npm run build && npm test", "build+test+package": "npm run build+test && npm run package", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::Transfer", diff --git a/packages/@aws-cdk/aws-waf/package.json b/packages/@aws-cdk/aws-waf/package.json index 052bc1bd2b8c3..da6a5bc924640 100644 --- a/packages/@aws-cdk/aws-waf/package.json +++ b/packages/@aws-cdk/aws-waf/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::WAF", diff --git a/packages/@aws-cdk/aws-wafregional/package.json b/packages/@aws-cdk/aws-wafregional/package.json index 87ed205a4a7d6..2998384321b50 100644 --- a/packages/@aws-cdk/aws-wafregional/package.json +++ b/packages/@aws-cdk/aws-wafregional/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::WAFRegional", diff --git a/packages/@aws-cdk/aws-wafv2/package.json b/packages/@aws-cdk/aws-wafv2/package.json index b67ebcf8dbe49..5b56ccc49ed01 100644 --- a/packages/@aws-cdk/aws-wafv2/package.json +++ b/packages/@aws-cdk/aws-wafv2/package.json @@ -51,7 +51,8 @@ "compat": "cdk-compat", "build+test": "npm run build && npm test", "build+test+package": "npm run build+test && npm run package", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::WAFv2", diff --git a/packages/@aws-cdk/aws-workspaces/package.json b/packages/@aws-cdk/aws-workspaces/package.json index 10e5b99dc2cda..0aeb68a97a6bf 100644 --- a/packages/@aws-cdk/aws-workspaces/package.json +++ b/packages/@aws-cdk/aws-workspaces/package.json @@ -50,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::WorkSpaces", diff --git a/packages/@aws-cdk/cdk-assets-schema/package.json b/packages/@aws-cdk/cdk-assets-schema/package.json index c8b0b1988e21a..8945cd066da2c 100644 --- a/packages/@aws-cdk/cdk-assets-schema/package.json +++ b/packages/@aws-cdk/cdk-assets-schema/package.json @@ -42,7 +42,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "author": { "name": "Amazon Web Services", diff --git a/packages/@aws-cdk/cfnspec/build-tools/create-missing-libraries.ts b/packages/@aws-cdk/cfnspec/build-tools/create-missing-libraries.ts index 55863ee5f8e13..f02d4d12a2797 100644 --- a/packages/@aws-cdk/cfnspec/build-tools/create-missing-libraries.ts +++ b/packages/@aws-cdk/cfnspec/build-tools/create-missing-libraries.ts @@ -153,6 +153,7 @@ async function main() { 'build+test': 'npm run build && npm test', compat: 'cdk-compat', gen: 'cfn2ts', + 'rosetta:extract': 'yarn --silent jsii-rosetta extract', }, 'cdk-build': { cloudformation: namespace, diff --git a/packages/@aws-cdk/cloud-assembly-schema/package.json b/packages/@aws-cdk/cloud-assembly-schema/package.json index de28b34cb9426..79504139bfd06 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/package.json +++ b/packages/@aws-cdk/cloud-assembly-schema/package.json @@ -30,7 +30,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "scripts": { "build": "cdk-build", @@ -43,7 +50,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "update-schema": "bash scripts/update-schema.sh" + "update-schema": "bash scripts/update-schema.sh", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "author": { "name": "Amazon Web Services", diff --git a/packages/@aws-cdk/cloudformation-include/package.json b/packages/@aws-cdk/cloudformation-include/package.json index bfa2fe98f5b6f..2d5dea8e514ec 100644 --- a/packages/@aws-cdk/cloudformation-include/package.json +++ b/packages/@aws-cdk/cloudformation-include/package.json @@ -48,7 +48,8 @@ "awslint": "cdk-awslint", "build+test": "npm run build && npm test", "build+test+package": "npm run build+test && npm run package", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "pre": [ diff --git a/packages/@aws-cdk/core/README.md b/packages/@aws-cdk/core/README.md index cfb09edea9e12..92ad2b49dc84f 100644 --- a/packages/@aws-cdk/core/README.md +++ b/packages/@aws-cdk/core/README.md @@ -64,10 +64,6 @@ For example, assume that you have a load balancer configuration that you use for The following example will define a single top-level stack that contains two nested stacks: each one with a single Amazon S3 bucket: ```ts -import { Stack, Construct, StackProps } from '@aws-cdk/core'; -import cfn = require('@aws-cdk/aws-cloudformation'); -import s3 = require('@aws-cdk/aws-s3'); - class MyNestedStack extends cfn.NestedStack { constructor(scope: Construct, id: string, props?: cfn.NestedStackProps) { super(scope, id, props); @@ -133,8 +129,8 @@ By default, conversion to a higher unit will fail if the conversion does not pro a whole number. This can be overridden by unsetting `integral` property. ```ts -Size.mebibytes(2).toKibibytes() // yields 2048 -Size.kibibytes(2050).toMebibyte({ integral: false }) // yields 2 +Size.mebibytes(2).toKibibytes() // yields 2048 +Size.kibibytes(2050).toMebibytes({ rounding: SizeRoundingBehavior.FLOOR }) // yields 2 ``` ## Secrets @@ -147,9 +143,9 @@ The best practice is to store secrets in AWS Secrets Manager and reference them ```ts const secret = SecretValue.secretsManager('secretId', { - jsonField: 'password' // optional: key of a JSON field to retrieve (defaults to all content), - versionId: 'id' // optional: id of the version (default AWSCURRENT) - versionStage: 'stage' // optional: version stage name (default AWSCURRENT) + jsonField: 'password', // optional: key of a JSON field to retrieve (defaults to all content), + versionId: 'id', // optional: id of the version (default AWSCURRENT) + versionStage: 'stage', // optional: version stage name (default AWSCURRENT) }); ``` @@ -261,8 +257,6 @@ CloudFormation deployment. To define a custom resource, use the `CustomResource` construct: ```ts -import { CustomResource } from '@aws-cdk/core'; - new CustomResource(this, 'MyMagicalResource', { resourceType: 'Custom::MyCustomResource', // must start with 'Custom::' @@ -317,8 +311,8 @@ examples ensures that only a single SNS topic is defined: ```ts function getOrCreate(scope: Construct): sns.Topic { - const stack = Stack.of(this); - const uniqueid = 'GloballyUniqueIdForSingleton'; + const stack = Stack.of(scope); + const uniqueid = 'GloballyUniqueIdForSingleton'; // For example, a UUID from `uuidgen` return stack.node.tryFindChild(uniqueid) as sns.Topic ?? new sns.Topic(stack, uniqueid); } ``` @@ -333,9 +327,6 @@ CloudFormation service. Set `serviceToken` to `topic.topicArn` in order to use this provider: ```ts -import * as sns from '@aws-cdk/aws-sns'; -import { CustomResource } from '@aws-cdk/core'; - const topic = new sns.Topic(this, 'MyProvider'); new CustomResource(this, 'MyResource', { @@ -352,13 +343,10 @@ response to the CloudFormation service and handle various error cases. Set `serviceToken` to `lambda.functionArn` to use this provider: ```ts -import * as lambda from '@aws-cdk/aws-lambda'; -import { CustomResource } from '@aws-cdk/core'; - -const fn = new lambda.Function(this, 'MyProvider'); +const fn = new lambda.Function(this, 'MyProvider', functionProps); new CustomResource(this, 'MyResource', { - serviceToken: lambda.functionArn + serviceToken: fn.functionArn, }); ``` @@ -438,18 +426,26 @@ Here is an complete example of a custom resource that summarizes two numbers: `sum-handler/index.js`: ```js -exports.handler = async e => { +exports.handler = async (e) => { return { Data: { - Result: e.ResourceProperties.lhs + e.ResourceProperties.rhs - } + Result: e.ResourceProperties.lhs + e.ResourceProperties.rhs, + }, }; }; ``` `sum.ts`: -```ts +```ts nofixture +import { + Construct, + CustomResource, + CustomResourceProvider, + CustomResourceProviderRuntime, + Token, +} from '@aws-cdk/core'; + export interface SumProps { readonly lhs: number; readonly rhs: number; @@ -483,17 +479,17 @@ export class Sum extends Construct { Usage will look like this: -```ts +```ts fixture=README-custom-resource-provider const sum = new Sum(this, 'MySum', { lhs: 40, rhs: 2 }); -new CfnOutput(this, 'Result', { value: sum.result }); +new CfnOutput(this, 'Result', { value: Token.asString(sum.result) }); ``` #### The Custom Resource Provider Framework -The [`@aws-cdk/custom-resource`] module includes an advanced framework for +The [`@aws-cdk/custom-resources`] module includes an advanced framework for implementing custom resource providers. -[`@aws-cdk/custom-resource`]: https://docs.aws.amazon.com/cdk/api/latest/docs/custom-resources-readme.html +[`@aws-cdk/custom-resources`]: https://docs.aws.amazon.com/cdk/api/latest/docs/custom-resources-readme.html Handlers are implemented as AWS Lambda functions, which means that they can be implemented in any Lambda-supported runtime. Furthermore, this provider has an @@ -504,11 +500,9 @@ allows implementing providers that can take up to two hours to stabilize. Set `serviceToken` to `provider.serviceToken` to use this type of provider: ```ts -import { Provider } from 'custom-resources'; - -const provider = new Provider(this, 'MyProvider', { - onEventHandler: onEventLambdaFunction, - isCompleteHandler: isCompleteLambdaFunction // optional async waiter +const provider = new customresources.Provider(this, 'MyProvider', { + onEventHandler, + isCompleteHandler, // optional async waiter }); new CustomResource(this, 'MyResource', { @@ -518,73 +512,6 @@ new CustomResource(this, 'MyResource', { See the [documentation](https://docs.aws.amazon.com/cdk/api/latest/docs/custom-resources-readme.html) for more details. -#### Amazon SNS Topic - -Every time a resource event occurs (CREATE/UPDATE/DELETE), an SNS notification -is sent to the SNS topic. Users must process these notifications (e.g. through a -fleet of worker hosts) and submit success/failure responses to the -CloudFormation service. - -Set `serviceToken` to `topic.topicArn` in order to use this provider: - -```ts -import * as sns from '@aws-cdk/aws-sns'; -import { CustomResource } from '@aws-cdk/core'; - -const topic = new sns.Topic(this, 'MyProvider'); - -new CustomResource(this, 'MyResource', { - serviceToken: topic.topicArn -}); -``` - -#### AWS Lambda Function - -An AWS lambda function is called *directly* by CloudFormation for all resource -events. The handler must take care of explicitly submitting a success/failure -response to the CloudFormation service and handle various error cases. - -Set `serviceToken` to `lambda.functionArn` to use this provider: - -```ts -import * as lambda from '@aws-cdk/aws-lambda'; -import { CustomResource } from '@aws-cdk/core'; - -const fn = new lambda.Function(this, 'MyProvider'); - -new CustomResource(this, 'MyResource', { - serviceToken: lambda.functionArn -}); -``` - -#### The Custom Resource Provider Framework - -The [`@aws-cdk/custom-resource`] module includes an advanced framework for -implementing custom resource providers. - -[`@aws-cdk/custom-resource`]: https://docs.aws.amazon.com/cdk/api/latest/docs/custom-resources-readme.html - -Handlers are implemented as AWS Lambda functions, which means that they can be -implemented in any Lambda-supported runtime. Furthermore, this provider has an -asynchronous mode, which means that users can provide an `isComplete` lambda -function which is called periodically until the operation is complete. This -allows implementing providers that can take up to two hours to stabilize. - -Set `serviceToken` to `provider.serviceToken` to use this provider: - -```ts -import { Provider } from 'custom-resources'; - -const provider = new Provider(this, 'MyProvider', { - onEventHandler: onEventLambdaFunction, - isCompleteHandler: isCompleteLambdaFunction // optional async waiter -}); - -new CustomResource(this, 'MyResource', { - serviceToken: provider.serviceToken -}); -``` - ## AWS CloudFormation features A CDK stack synthesizes to an AWS CloudFormation Template. This section @@ -598,7 +525,7 @@ the `CfnOutput` class: ```ts new CfnOutput(this, 'OutputName', { - value: bucket.bucketName, + value: myBucket.bucketName, description: 'The name of an S3 bucket', // Optional exportName: 'TheAwesomeBucket', // Registers a CloudFormation export named "TheAwesomeBucket" }); @@ -675,7 +602,7 @@ accessing those through the `cfnOptions` property: ```ts const rawBucket = new s3.CfnBucket(this, 'Bucket', { /* ... */ }); // -or- -const rawBucket = bucket.node.defaultChild as s3.CfnBucket; +const rawBucketAlt = myBucket.node.defaultChild as s3.CfnBucket; // then rawBucket.cfnOptions.condition = new CfnCondition(this, 'EnableBucket', { /* ... */ }); @@ -688,8 +615,8 @@ Resource dependencies (the `DependsOn` attribute) is modified using the `cfnResource.addDependsOn` method: ```ts -const resourceA = new CfnResource(this, 'ResourceA', { /* ... */ }); -const resourceB = new CfnResource(this, 'ResourceB', { /* ... */ }); +const resourceA = new CfnResource(this, 'ResourceA', resourceProps); +const resourceB = new CfnResource(this, 'ResourceB', resourceProps); resourceB.addDependsOn(resourceA); ``` @@ -734,7 +661,7 @@ const stage = Fn.conditionIf(isProd.logicalId, 'Beta', 'Prod').toString(); // Make Bucket creation condition to IsProduction by accessing // and overriding the CloudFormation resource const bucket = new s3.Bucket(this, 'Bucket'); -const cfnBucket = bucket.node.defaultChild as s3.CfnBucket; +const cfnBucket = myBucket.node.defaultChild as s3.CfnBucket; cfnBucket.cfnOptions.condition = isProd; ``` @@ -779,10 +706,10 @@ for SSM parameters (including secure strings) and Secrets Manager. Encoding such references is done using the `CfnDynamicReference` class: ```ts -new CfnDynamicReference(this, 'SecureStringValue', { - service: CfnDynamicReferenceService.SECRETS_MANAGER, - referenceKey: 'secret-id:secret-string:json-key:version-stage:version-id', -}); +new CfnDynamicReference( + CfnDynamicReferenceService.SECRETS_MANAGER, + 'secret-id:secret-string:json-key:version-stage:version-id', +); ``` [cfn-dynamic-references]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html @@ -880,15 +807,15 @@ const tagParam = new CfnParameter(this, 'TagName'); const stringEquals = new CfnJson(this, 'ConditionJson', { value: { - [`aws:PrincipalTag/${tagParam.valueAsString}`]: true + [`aws:PrincipalTag/${tagParam.valueAsString}`]: true, }, }); -const principal = new AccountRootPrincipal().withConditions({ +const principal = new iam.AccountRootPrincipal().withConditions({ StringEquals: stringEquals, }); -new Role(this, 'MyRole', { assumedBy: principal }); +new iam.Role(this, 'MyRole', { assumedBy: principal }); ``` **Explanation**: since in this example we pass the tag name through a parameter, it diff --git a/packages/@aws-cdk/core/lib/cfn-resource.ts b/packages/@aws-cdk/core/lib/cfn-resource.ts index 64486770b991f..c436e453cacac 100644 --- a/packages/@aws-cdk/core/lib/cfn-resource.ts +++ b/packages/@aws-cdk/core/lib/cfn-resource.ts @@ -152,8 +152,8 @@ export class CfnResource extends CfnRefElement { * * For example, * ```typescript - * addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']) - * addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE') + * cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); + * cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); * ``` * would add the overrides * ```json @@ -532,4 +532,4 @@ function splitOnPeriods(x: string): string[] { ret.reverse(); return ret; -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/core/lib/custom-resource-provider/custom-resource-provider.ts b/packages/@aws-cdk/core/lib/custom-resource-provider/custom-resource-provider.ts index 82160f3a63ad6..9f49174ad0171 100644 --- a/packages/@aws-cdk/core/lib/custom-resource-provider/custom-resource-provider.ts +++ b/packages/@aws-cdk/core/lib/custom-resource-provider/custom-resource-provider.ts @@ -41,7 +41,7 @@ export interface CustomResourceProviderProps { * * @example * - * policyStatements: [ { Effect: 'Allow', Action: 's3:PutObject*', Resource: '*' } ] + * [{ Effect: 'Allow', Action: 's3:PutObject*', Resource: '*' }] * */ readonly policyStatements?: any[]; @@ -113,10 +113,9 @@ export class CustomResourceProvider extends CoreConstruct { * `serviceToken` when defining a custom resource. * * @example - * * new CustomResource(this, 'MyCustomResource', { * // ... - * serviceToken: provider.serviceToken // <--- here + * serviceToken: myProvider.serviceToken, // <--- here * }) * */ diff --git a/packages/@aws-cdk/core/lib/custom-resource.ts b/packages/@aws-cdk/core/lib/custom-resource.ts index 7fbf9505cf971..261f442f1a951 100644 --- a/packages/@aws-cdk/core/lib/custom-resource.ts +++ b/packages/@aws-cdk/core/lib/custom-resource.ts @@ -23,13 +23,13 @@ export interface CustomResourceProps { * * ```ts * // use the provider framework from aws-cdk/custom-resources: - * const provider = new custom_resources.Provider({ - * onEventHandler: myOnEventLambda, - * isCompleteHandler: myIsCompleteLambda, // optional + * const provider = new customresources.Provider(this, 'ResourceProvider', { + * onEventHandler, + * isCompleteHandler, // optional * }); * * new CustomResource(this, 'MyResource', { - * serviceToken: provider.serviceToken + * serviceToken: provider.serviceToken, * }); * ``` * @@ -37,14 +37,18 @@ export interface CustomResourceProps { * * ```ts * // invoke an AWS Lambda function when a lifecycle event occurs: - * serviceToken: myFunction.functionArn + * new CustomResource(this, 'MyResource', { + * serviceToken: myFunction.functionArn, + * }); * ``` * * SNS topic: * * ```ts * // publish lifecycle events to an SNS topic: - * serviceToken: myTopic.topicArn + * new CustomResource(this, 'MyResource', { + * serviceToken: myTopic.topicArn, + * }); * ``` */ readonly serviceToken: string; diff --git a/packages/@aws-cdk/core/lib/dependency.ts b/packages/@aws-cdk/core/lib/dependency.ts index 98e69a2d429e7..382d5acae0a61 100644 --- a/packages/@aws-cdk/core/lib/dependency.ts +++ b/packages/@aws-cdk/core/lib/dependency.ts @@ -58,9 +58,13 @@ const DEPENDABLE_SYMBOL = Symbol.for('@aws-cdk/core.DependableTrait'); * const roots = DependableTrait.get(construct).dependencyRoots; * * // Definition - * DependableTrait.implement(construct, { - * get dependencyRoots() { return []; } - * }); + * class TraitImplementation implements DependableTrait { + * public readonly dependencyRoots: IConstruct[]; + * constructor() { + * this.dependencyRoots = [constructA, constructB, constructC]; + * } + * } + * DependableTrait.implement(construct, new TraitImplementation()); * * @experimental */ diff --git a/packages/@aws-cdk/core/lib/stack.ts b/packages/@aws-cdk/core/lib/stack.ts index 3c254ea803e88..f54266c7ed922 100644 --- a/packages/@aws-cdk/core/lib/stack.ts +++ b/packages/@aws-cdk/core/lib/stack.ts @@ -63,7 +63,7 @@ export interface StackProps { * * // Use a concrete account and region to deploy this stack to: * // `.account` and `.region` will simply return these values. - * new MyStack(app, 'Stack1', { + * new Stack(app, 'Stack1', { * env: { * account: '123456789012', * region: 'us-east-1' @@ -73,7 +73,7 @@ export interface StackProps { * // Use the CLI's current credentials to determine the target environment: * // `.account` and `.region` will reflect the account+region the CLI * // is configured to use (based on the user CLI credentials) - * new MyStack(app, 'Stack2', { + * new Stack(app, 'Stack2', { * env: { * account: process.env.CDK_DEFAULT_ACCOUNT, * region: process.env.CDK_DEFAULT_REGION @@ -91,7 +91,7 @@ export interface StackProps { * // both of these stacks will use the stage's account/region: * // `.account` and `.region` will resolve to the concrete values as above * new MyStack(myStage, 'Stack1'); - * new YourStack(myStage, 'Stack1'); + * new YourStack(myStage, 'Stack2'); * * // Define an environment-agnostic stack: * // `.account` and `.region` will resolve to `{ "Ref": "AWS::AccountId" }` and `{ "Ref": "AWS::Region" }` respectively. @@ -277,7 +277,7 @@ export class Stack extends CoreConstruct implements ITaggable { * The name of the CloudFormation template file emitted to the output * directory during synthesis. * - * @example MyStack.template.json + * @example 'MyStack.template.json' */ public readonly templateFile: string; @@ -519,7 +519,9 @@ export class Stack extends CoreConstruct implements ITaggable { /** * The ID of the stack * - * @example After resolving, looks like arn:aws:cloudformation:us-west-2:123456789012:stack/teststack/51af3dc0-da77-11e4-872e-1234567db123 + * @example + * // After resolving, looks like + * 'arn:aws:cloudformation:us-west-2:123456789012:stack/teststack/51af3dc0-da77-11e4-872e-1234567db123' */ public get stackId(): string { return new ScopedAws(this).stackId; @@ -683,7 +685,7 @@ export class Stack extends CoreConstruct implements ITaggable { * * Duplicate values are removed when stack is synthesized. * - * @example addTransform('AWS::Serverless-2016-10-31') + * @example stack.addTransform('AWS::Serverless-2016-10-31') * * @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-section-structure.html * diff --git a/packages/@aws-cdk/core/lib/stage.ts b/packages/@aws-cdk/core/lib/stage.ts index 8dfa18834604c..fd93f4251bf7f 100644 --- a/packages/@aws-cdk/core/lib/stage.ts +++ b/packages/@aws-cdk/core/lib/stage.ts @@ -32,12 +32,12 @@ export interface StageProps { * @example * * // Use a concrete account and region to deploy this Stage to - * new MyStage(app, 'Stage1', { + * new Stage(app, 'Stage1', { * env: { account: '123456789012', region: 'us-east-1' }, * }); * * // Use the CLI's current credentials to determine the target environment - * new MyStage(app, 'Stage2', { + * new Stage(app, 'Stage2', { * env: { account: process.env.CDK_DEFAULT_ACCOUNT, region: process.env.CDK_DEFAULT_REGION }, * }); * diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json index 5e892d35ce62f..40b18afc96717 100644 --- a/packages/@aws-cdk/core/package.json +++ b/packages/@aws-cdk/core/package.json @@ -30,7 +30,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "repository": { "type": "git", @@ -135,7 +142,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cfn2ts" + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "cloudformation": "AWS::CloudFormation", @@ -185,11 +193,11 @@ "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/region-info": "0.0.0", + "@balena/dockerignore": "^1.0.2", "constructs": "^3.2.0", "fs-extra": "^9.0.1", - "minimatch": "^3.0.4", - "@balena/dockerignore": "^1.0.2", - "ignore": "^5.1.8" + "ignore": "^5.1.8", + "minimatch": "^3.0.4" }, "bundledDependencies": [ "fs-extra", @@ -201,8 +209,8 @@ "peerDependencies": { "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cx-api": "0.0.0", - "constructs": "^3.2.0", - "@aws-cdk/region-info": "0.0.0" + "@aws-cdk/region-info": "0.0.0", + "constructs": "^3.2.0" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/core/rosetta/README-custom-resource-provider.ts-fixture b/packages/@aws-cdk/core/rosetta/README-custom-resource-provider.ts-fixture new file mode 100644 index 0000000000000..ae4b1befd4b20 --- /dev/null +++ b/packages/@aws-cdk/core/rosetta/README-custom-resource-provider.ts-fixture @@ -0,0 +1,18 @@ +import { CfnOutput, Construct, Token } from '@aws-cdk/core'; + +declare interface SumProps { + readonly lhs: number; + readonly rhs: number; +} +declare class Sum extends Construct { + public readonly result: number; + constructor(scope: Construct, id: string, props: SumProps); +} + +class fixture$construct extends Construct { + public constructor(scope: Construct, id: string) { + super(scope, id); + + /// here + } +} diff --git a/packages/@aws-cdk/core/rosetta/default.ts-fixture b/packages/@aws-cdk/core/rosetta/default.ts-fixture new file mode 100644 index 0000000000000..558cc09b1c049 --- /dev/null +++ b/packages/@aws-cdk/core/rosetta/default.ts-fixture @@ -0,0 +1,65 @@ +import * as cfn from '@aws-cdk/aws-cloudformation'; +import * as customresources from '@aws-cdk/custom-resources'; +import * as iam from '@aws-cdk/aws-iam'; +import * as lambda from '@aws-cdk/aws-lambda'; +import * as sns from '@aws-cdk/aws-sns'; +import * as sqs from '@aws-cdk/aws-sqs'; +import * as s3 from '@aws-cdk/aws-s3'; +import { + App, + Aws, + CfnCondition, + CfnDynamicReference, + CfnDynamicReferenceService, + CfnInclude, + CfnJson, + CfnMapping, + CfnOutput, + CfnParameter, + CfnResource, + CfnResourceProps, + ConcreteDependable, + Construct, + CustomResource, + CustomResourceProvider, + CustomResourceProviderRuntime, + DependableTrait, + Duration, + Fn, + IConstruct, + SecretValue, + Size, + SizeRoundingBehavior, + Stack, + StackProps, + Stage, + Token, +} from '@aws-cdk/core'; + +declare const app: App; +declare const arn: 'arn:partition:service:region:account-id:resource-id'; +declare const cfnResource: CfnResource; +declare const construct: Construct; +declare const constructA: Construct; +declare const constructB: Construct; +declare const constructC: Construct; +declare const functionProps: lambda.FunctionProps; +declare const isCompleteHandler: lambda.Function; +declare const myBucket: s3.IBucket; +declare const myFunction: lambda.IFunction; +declare const myProvider: CustomResourceProvider; +declare const myTopic: sns.ITopic; +declare const onEventHandler: lambda.Function; +declare const resourceProps: CfnResourceProps; +declare const stack: Stack; + +declare class MyStack extends Stack {} +declare class YourStack extends Stack {} + +class fixture$construct extends Construct { + public constructor(scope: Construct, id: string) { + super(scope, id); + + /// here + } +} diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index 1898fdea5654d..11cd5d7a8434c 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -49,7 +49,8 @@ "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", "compat": "cdk-compat", - "gen": "cp -f $(node -p 'require.resolve(\"aws-sdk/apis/metadata.json\")') lib/aws-custom-resource/sdk-api-metadata.json && rm -rf test/aws-custom-resource/cdk.out" + "gen": "cp -f $(node -p 'require.resolve(\"aws-sdk/apis/metadata.json\")') lib/aws-custom-resource/sdk-api-metadata.json && rm -rf test/aws-custom-resource/cdk.out", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "cdk-build": { "jest": true, diff --git a/packages/@aws-cdk/cx-api/package.json b/packages/@aws-cdk/cx-api/package.json index ea8aa01a47345..e21884db8398c 100644 --- a/packages/@aws-cdk/cx-api/package.json +++ b/packages/@aws-cdk/cx-api/package.json @@ -30,7 +30,14 @@ ] } }, - "projectReferences": true + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } }, "scripts": { "build": "cdk-build", @@ -42,7 +49,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "author": { "name": "Amazon Web Services", diff --git a/packages/@aws-cdk/example-construct-library/package.json b/packages/@aws-cdk/example-construct-library/package.json index 85c27d5ff9138..f234c7f43c21c 100644 --- a/packages/@aws-cdk/example-construct-library/package.json +++ b/packages/@aws-cdk/example-construct-library/package.json @@ -49,7 +49,8 @@ "awslint": "cdk-awslint", "build+test": "npm run build && npm test", "build+test+package": "npm run build+test && npm run package", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "keywords": [ "aws", diff --git a/packages/@aws-cdk/pipelines/package.json b/packages/@aws-cdk/pipelines/package.json index 845da0c6be1f5..303d18410dcca 100644 --- a/packages/@aws-cdk/pipelines/package.json +++ b/packages/@aws-cdk/pipelines/package.json @@ -21,7 +21,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "author": { "name": "Amazon Web Services", diff --git a/packages/@aws-cdk/region-info/package.json b/packages/@aws-cdk/region-info/package.json index 433bd60aa6a17..9db12073061e5 100644 --- a/packages/@aws-cdk/region-info/package.json +++ b/packages/@aws-cdk/region-info/package.json @@ -46,7 +46,8 @@ "package": "cdk-package", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "author": { "name": "Amazon Web Services", diff --git a/packages/@aws-cdk/yaml-cfn/package.json b/packages/@aws-cdk/yaml-cfn/package.json index b3b63cbf69e38..873f32ac59a96 100644 --- a/packages/@aws-cdk/yaml-cfn/package.json +++ b/packages/@aws-cdk/yaml-cfn/package.json @@ -61,7 +61,8 @@ "awslint": "cdk-awslint", "build+test+package": "npm run build+test && npm run package", "build+test": "npm run build && npm test", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "dependencies": { "yaml": "1.10.0" diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index b0459d657cfd4..6511ebfc81d7c 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -22,7 +22,8 @@ "build+test": "npm run build && npm test", "build+test+package": "npm run build+test && npm run package", "watch": "cdk-watch", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "awslint": { "exclude": [ diff --git a/packages/awslint/package.json b/packages/awslint/package.json index 080ea907c06ea..db6e88aead475 100644 --- a/packages/awslint/package.json +++ b/packages/awslint/package.json @@ -16,11 +16,11 @@ "awslint": "bin/awslint" }, "dependencies": { - "@jsii/spec": "^1.14.1", + "@jsii/spec": "^1.15.0", "camelcase": "^6.2.0", "colors": "^1.4.0", "fs-extra": "^9.0.1", - "jsii-reflect": "^1.14.1", + "jsii-reflect": "^1.15.0", "yargs": "^16.1.1" }, "devDependencies": { diff --git a/packages/cdk-dasm/package.json b/packages/cdk-dasm/package.json index 276016f4c2794..ca73297f8f386 100644 --- a/packages/cdk-dasm/package.json +++ b/packages/cdk-dasm/package.json @@ -26,7 +26,7 @@ }, "license": "Apache-2.0", "dependencies": { - "codemaker": "^1.14.1", + "codemaker": "^1.15.0", "yaml": "1.10.0" }, "devDependencies": { diff --git a/packages/decdk/package.json b/packages/decdk/package.json index 467b3ddcb04e7..c70af5999bace 100644 --- a/packages/decdk/package.json +++ b/packages/decdk/package.json @@ -196,7 +196,7 @@ "@aws-cdk/yaml-cfn": "0.0.0", "constructs": "^3.2.0", "fs-extra": "^9.0.1", - "jsii-reflect": "^1.14.1", + "jsii-reflect": "^1.15.0", "jsonschema": "^1.4.0", "yaml": "1.10.0", "yargs": "^16.1.1" @@ -207,7 +207,7 @@ "@types/yaml": "1.9.7", "@types/yargs": "^15.0.10", "jest": "^26.6.3", - "jsii": "^1.14.1" + "jsii": "^1.15.0" }, "keywords": [ "aws", diff --git a/packages/monocdk/package.json b/packages/monocdk/package.json index 20786525dea23..2fb2a627896d6 100644 --- a/packages/monocdk/package.json +++ b/packages/monocdk/package.json @@ -21,7 +21,8 @@ "build+test": "npm run build && npm test", "build+test+package": "npm run build+test && npm run package", "watch": "cdk-watch", - "compat": "cdk-compat" + "compat": "cdk-compat", + "rosetta:extract": "yarn --silent jsii-rosetta extract" }, "awslint": { "exclude": [ diff --git a/tools/cdk-build-tools/package.json b/tools/cdk-build-tools/package.json index f5f8691727ec7..4cacb7203280d 100644 --- a/tools/cdk-build-tools/package.json +++ b/tools/cdk-build-tools/package.json @@ -50,8 +50,8 @@ "eslint-plugin-import": "^2.22.1", "fs-extra": "^9.0.1", "jest": "^26.6.3", - "jsii": "^1.14.1", - "jsii-pacmak": "^1.14.1", + "jsii": "^1.15.0", + "jsii-pacmak": "^1.15.0", "nodeunit": "^0.11.3", "nyc": "^15.1.0", "ts-jest": "^26.4.4", diff --git a/tools/cfn2ts/package.json b/tools/cfn2ts/package.json index 7af8f556c615d..af1d394c0f71b 100644 --- a/tools/cfn2ts/package.json +++ b/tools/cfn2ts/package.json @@ -30,7 +30,7 @@ "license": "Apache-2.0", "dependencies": { "@aws-cdk/cfnspec": "0.0.0", - "codemaker": "^1.14.1", + "codemaker": "^1.15.0", "fast-json-patch": "^3.0.0-1", "fs-extra": "^9.0.1", "yargs": "^16.1.1" diff --git a/tools/pkglint/lib/rules.ts b/tools/pkglint/lib/rules.ts index f5c969cb8f9ce..002b63f92cb61 100644 --- a/tools/pkglint/lib/rules.ts +++ b/tools/pkglint/lib/rules.ts @@ -147,7 +147,10 @@ export class ThirdPartyAttributions extends ValidationRule { return; } const bundled = pkg.getAllBundledDependencies().filter(dep => !dep.startsWith('@aws-cdk')); - const lines = fs.readFileSync(path.join(pkg.packageRoot, 'NOTICE'), { encoding: 'utf8' }).split('\n'); + const noticePath = path.join(pkg.packageRoot, 'NOTICE'); + const lines = fs.existsSync(noticePath) + ? fs.readFileSync(noticePath, { encoding: 'utf8' }).split('\n') + : []; const re = /^\*\* (\S+)/; const attributions = lines.filter(l => re.test(l)).map(l => l.match(re)![1]); @@ -1021,6 +1024,19 @@ export class MustUseCDKWatch extends ValidationRule { } } +/** + * Must have 'rosetta:extract' command if this package is JSII-enabled. + */ +export class MustHaveRosettaExtract extends ValidationRule { + public readonly name = 'package-info/scripts/rosetta:extract'; + + public validate(pkg: PackageJson): void { + if (!isJSII(pkg)) { return; } + + expectJSON(this.name, pkg, 'scripts.rosetta:extract', 'yarn --silent jsii-rosetta extract'); + } +} + /** * Must use 'cdk-test' command */ diff --git a/yarn.lock b/yarn.lock index a47c414f52354..e75d359ad7efe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,18 +10,18 @@ "@babel/highlight" "^7.10.4" "@babel/core@^7.1.0", "@babel/core@^7.7.5": - version "7.11.6" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.11.6.tgz#3a9455dc7387ff1bac45770650bc13ba04a15651" - integrity sha512-Wpcv03AGnmkgm6uS6k8iwhIwTrcP0m17TL1n1sy7qD0qelDu4XNeW0dN0mHfa+Gei211yDaLoEe/VlbXQzM4Bg== + version "7.12.3" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.3.tgz#1b436884e1e3bff6fb1328dc02b208759de92ad8" + integrity sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g== dependencies: "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.11.6" - "@babel/helper-module-transforms" "^7.11.0" - "@babel/helpers" "^7.10.4" - "@babel/parser" "^7.11.5" + "@babel/generator" "^7.12.1" + "@babel/helper-module-transforms" "^7.12.1" + "@babel/helpers" "^7.12.1" + "@babel/parser" "^7.12.3" "@babel/template" "^7.10.4" - "@babel/traverse" "^7.11.5" - "@babel/types" "^7.11.5" + "@babel/traverse" "^7.12.1" + "@babel/types" "^7.12.1" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.1" @@ -31,12 +31,12 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.11.5", "@babel/generator@^7.11.6", "@babel/generator@^7.4.0": - version "7.11.6" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.11.6.tgz#b868900f81b163b4d464ea24545c61cbac4dc620" - integrity sha512-DWtQ1PV3r+cLbySoHrwn9RWEgKMBLLma4OBQloPRyDYvc5msJM9kvTLo1YnlJd1P/ZuKbdli3ijr5q3FvAF3uA== +"@babel/generator@^7.12.1", "@babel/generator@^7.12.5", "@babel/generator@^7.4.0": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.5.tgz#a2c50de5c8b6d708ab95be5e6053936c1884a4de" + integrity sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A== dependencies: - "@babel/types" "^7.11.5" + "@babel/types" "^7.12.5" jsesc "^2.5.1" source-map "^0.5.0" @@ -56,31 +56,33 @@ dependencies: "@babel/types" "^7.10.4" -"@babel/helper-member-expression-to-functions@^7.10.4": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.11.0.tgz#ae69c83d84ee82f4b42f96e2a09410935a8f26df" - integrity sha512-JbFlKHFntRV5qKw3YC0CvQnDZ4XMwgzzBbld7Ly4Mj4cbFy3KywcR8NtNctRToMWJOVvLINJv525Gd6wwVEx/Q== +"@babel/helper-member-expression-to-functions@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.1.tgz#fba0f2fcff3fba00e6ecb664bb5e6e26e2d6165c" + integrity sha512-k0CIe3tXUKTRSoEx1LQEPFU9vRQfqHtl+kf8eNnDqb4AUJEy5pz6aIiog+YWtVm2jpggjS1laH68bPsR+KWWPQ== dependencies: - "@babel/types" "^7.11.0" + "@babel/types" "^7.12.1" -"@babel/helper-module-imports@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.10.4.tgz#4c5c54be04bd31670a7382797d75b9fa2e5b5620" - integrity sha512-nEQJHqYavI217oD9+s5MUBzk6x1IlvoS9WTPfgG43CbMEeStE0v+r+TucWdx8KFGowPGvyOkDT9+7DHedIDnVw== +"@babel/helper-module-imports@^7.12.1": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz#1bfc0229f794988f76ed0a4d4e90860850b54dfb" + integrity sha512-SR713Ogqg6++uexFRORf/+nPXMmWIn80TALu0uaFb+iQIUoR7bOC7zBWyzBs5b3tBBJXuyD0cRu1F15GyzjOWA== dependencies: - "@babel/types" "^7.10.4" + "@babel/types" "^7.12.5" -"@babel/helper-module-transforms@^7.11.0": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.11.0.tgz#b16f250229e47211abdd84b34b64737c2ab2d359" - integrity sha512-02EVu8COMuTRO1TAzdMtpBPbe6aQ1w/8fePD2YgQmxZU4gpNWaL9gK3Jp7dxlkUlUCJOTaSeA+Hrm1BRQwqIhg== +"@babel/helper-module-transforms@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz#7954fec71f5b32c48e4b303b437c34453fd7247c" + integrity sha512-QQzehgFAZ2bbISiCpmVGfiGux8YVFXQ0abBic2Envhej22DVXV9nCFaS5hIQbkyo1AdGb+gNME2TSh3hYJVV/w== dependencies: - "@babel/helper-module-imports" "^7.10.4" - "@babel/helper-replace-supers" "^7.10.4" - "@babel/helper-simple-access" "^7.10.4" + "@babel/helper-module-imports" "^7.12.1" + "@babel/helper-replace-supers" "^7.12.1" + "@babel/helper-simple-access" "^7.12.1" "@babel/helper-split-export-declaration" "^7.11.0" + "@babel/helper-validator-identifier" "^7.10.4" "@babel/template" "^7.10.4" - "@babel/types" "^7.11.0" + "@babel/traverse" "^7.12.1" + "@babel/types" "^7.12.1" lodash "^4.17.19" "@babel/helper-optimise-call-expression@^7.10.4": @@ -95,23 +97,22 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== -"@babel/helper-replace-supers@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.10.4.tgz#d585cd9388ea06e6031e4cd44b6713cbead9e6cf" - integrity sha512-sPxZfFXocEymYTdVK1UNmFPBN+Hv5mJkLPsYWwGBxZAxaWfFu+xqp7b6qWD0yjNuNL2VKc6L5M18tOXUP7NU0A== +"@babel/helper-replace-supers@^7.12.1": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.12.5.tgz#f009a17543bbbbce16b06206ae73b63d3fca68d9" + integrity sha512-5YILoed0ZyIpF4gKcpZitEnXEJ9UoDRki1Ey6xz46rxOzfNMAhVIJMoune1hmPVxh40LRv1+oafz7UsWX+vyWA== dependencies: - "@babel/helper-member-expression-to-functions" "^7.10.4" + "@babel/helper-member-expression-to-functions" "^7.12.1" "@babel/helper-optimise-call-expression" "^7.10.4" - "@babel/traverse" "^7.10.4" - "@babel/types" "^7.10.4" + "@babel/traverse" "^7.12.5" + "@babel/types" "^7.12.5" -"@babel/helper-simple-access@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.10.4.tgz#0f5ccda2945277a2a7a2d3a821e15395edcf3461" - integrity sha512-0fMy72ej/VEvF8ULmX6yb5MtHG4uH4Dbd6I/aHDb/JVg0bbivwt9Wg+h3uMvX+QSFtwr5MeItvazbrc4jtRAXw== +"@babel/helper-simple-access@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz#32427e5aa61547d38eb1e6eaf5fd1426fdad9136" + integrity sha512-OxBp7pMrjVewSSC8fXDFrHrBcJATOOFssZwv16F3/6Xtc138GHybBfPbm9kfiqQHKhYQrlamWILwlDCeyMFEaA== dependencies: - "@babel/template" "^7.10.4" - "@babel/types" "^7.10.4" + "@babel/types" "^7.12.1" "@babel/helper-split-export-declaration@^7.11.0": version "7.11.0" @@ -125,14 +126,14 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== -"@babel/helpers@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.10.4.tgz#2abeb0d721aff7c0a97376b9e1f6f65d7a475044" - integrity sha512-L2gX/XeUONeEbI78dXSrJzGdz4GQ+ZTA/aazfUsFaWjSe95kiCuOZ5HsXvkiw3iwF+mFHSRUfJU8t6YavocdXA== +"@babel/helpers@^7.12.1": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.12.5.tgz#1a1ba4a768d9b58310eda516c449913fe647116e" + integrity sha512-lgKGMQlKqA8meJqKsW6rUnc4MdUk35Ln0ATDqdM1a/UpARODdI4j5Y5lVfUScnSNkJcdCRAaWkspykNoFg9sJA== dependencies: "@babel/template" "^7.10.4" - "@babel/traverse" "^7.10.4" - "@babel/types" "^7.10.4" + "@babel/traverse" "^7.12.5" + "@babel/types" "^7.12.5" "@babel/highlight@^7.10.4": version "7.10.4" @@ -143,10 +144,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.10.4", "@babel/parser@^7.11.5", "@babel/parser@^7.4.3": - version "7.11.5" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.11.5.tgz#c7ff6303df71080ec7a4f5b8c003c58f1cf51037" - integrity sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q== +"@babel/parser@^7.1.0", "@babel/parser@^7.10.4", "@babel/parser@^7.12.3", "@babel/parser@^7.12.5", "@babel/parser@^7.4.3": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.5.tgz#b4af32ddd473c0bfa643bd7ff0728b8e71b81ea0" + integrity sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -163,9 +164,9 @@ "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-class-properties@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.10.4.tgz#6644e6a0baa55a61f9e3231f6c9eeb6ee46c124c" - integrity sha512-GCSBF7iUle6rNugfURwNmCGG3Z/2+opxAMLs1nND4bhEG5PuxTIggDBoeYYSujAlLtsupzOHYJQgPS3pivwXIA== + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.1.tgz#bcb297c5366e79bebadef509549cd93b04f19978" + integrity sha512-U40A76x5gTwmESz+qiqssqmeEsKvcSyvtgktrm0uzcARAmM9I1jR221f6Oq+GmHrcD+LvZDag1UTOTe2fL3TeA== dependencies: "@babel/helper-plugin-utils" "^7.10.4" @@ -241,25 +242,25 @@ "@babel/parser" "^7.10.4" "@babel/types" "^7.10.4" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.10.4", "@babel/traverse@^7.11.5", "@babel/traverse@^7.4.3": - version "7.11.5" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.11.5.tgz#be777b93b518eb6d76ee2e1ea1d143daa11e61c3" - integrity sha512-EjiPXt+r7LiCZXEfRpSJd+jUMnBd4/9OUv7Nx3+0u9+eimMwJmG0Q98lw4/289JCoxSE8OolDMNZaaF/JZ69WQ== +"@babel/traverse@^7.1.0", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.5", "@babel/traverse@^7.4.3": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.5.tgz#78a0c68c8e8a35e4cacfd31db8bb303d5606f095" + integrity sha512-xa15FbQnias7z9a62LwYAA5SZZPkHIXpd42C6uW68o8uTuua96FHZy1y61Va5P/i83FAAcMpW8+A/QayntzuqA== dependencies: "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.11.5" + "@babel/generator" "^7.12.5" "@babel/helper-function-name" "^7.10.4" "@babel/helper-split-export-declaration" "^7.11.0" - "@babel/parser" "^7.11.5" - "@babel/types" "^7.11.5" + "@babel/parser" "^7.12.5" + "@babel/types" "^7.12.5" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.19" -"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.11.0", "@babel/types@^7.11.5", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.0": - version "7.11.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.11.5.tgz#d9de577d01252d77c6800cee039ee64faf75662d" - integrity sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q== +"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.11.0", "@babel/types@^7.12.1", "@babel/types@^7.12.5", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.0": + version "7.12.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.6.tgz#ae0e55ef1cce1fbc881cd26f8234eb3e657edc96" + integrity sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA== dependencies: "@babel/helper-validator-identifier" "^7.10.4" lodash "^4.17.19" @@ -549,17 +550,6 @@ source-map "^0.6.1" write-file-atomic "^3.0.0" -"@jest/types@^26.6.0": - version "26.6.0" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.0.tgz#2c045f231bfd79d52514cda3fbc93ef46157fa6a" - integrity sha512-8pDeq/JVyAYw7jBGU83v8RMYAkdrRxLG3BGnAJuqaQAUd6GWBmND2uyl+awI88+hit48suLoLjNFtR+ZXxWaYg== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^15.0.0" - chalk "^4.0.0" - "@jest/types@^26.6.2": version "26.6.2" resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" @@ -571,10 +561,10 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" -"@jsii/spec@^1.14.1": - version "1.14.1" - resolved "https://registry.yarnpkg.com/@jsii/spec/-/spec-1.14.1.tgz#9544e94e590dafd37d46f91ae3da925f39ca73de" - integrity sha512-h+HXPYD+k8zbkQRXzR9zWxXoSyBTBQL2N+t+iTgMuHpWvnrd6ZUegpWh/M1voMpmT5JHS7MftwIRjnp7yP92KQ== +"@jsii/spec@^1.15.0": + version "1.15.0" + resolved "https://registry.yarnpkg.com/@jsii/spec/-/spec-1.15.0.tgz#e7f3a18d231ef6d1826ce7257de7b2f6e2071f40" + integrity sha512-aybTXziVMQcCp2EGIMCJgAs4uvXtN/iBVeJMyBRzqznhtctG4flOu37FjIdib/OOJLrRLt4NAA95R5kNm/jLpA== dependencies: jsonschema "^1.4.0" @@ -1298,16 +1288,16 @@ fastq "^1.6.0" "@octokit/auth-token@^2.4.0": - version "2.4.2" - resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.2.tgz#10d0ae979b100fa6b72fa0e8e63e27e6d0dbff8a" - integrity sha512-jE/lE/IKIz2v1+/P0u4fJqv0kYwXOTujKemJMFr6FeopsxlIK3+wKDCJGnysg81XID5TgZQbIfuJ5J0lnTiuyQ== + version "2.4.3" + resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.3.tgz#b868b5f2366533a7e62933eaa1181a8924228cc4" + integrity sha512-fdGoOQ3kQJh+hrilc0Plg50xSfaCKOeYN9t6dpJKXN9BxhhfquL0OzoQXg3spLYymL5rm29uPeI3KEXRaZQ9zg== dependencies: "@octokit/types" "^5.0.0" "@octokit/core@^3.0.0": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.1.2.tgz#c937d5f9621b764573068fcd2e5defcc872fd9cc" - integrity sha512-AInOFULmwOa7+NFi9F8DlDkm5qtZVmDQayi7TUgChE3yeIGPq0Y+6cAEXPexQ3Ea+uZy66hKEazR7DJyU+4wfw== + version "3.2.1" + resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.2.1.tgz#9e04df3f4e7f825ac0559327490ce34299140af5" + integrity sha512-XfFSDDwv6tclUenS0EmB6iA7u+4aOHBT1Lz4PtQNQQg3hBbNaR/+Uv5URU+egeIuuGAiMRiDyY92G4GBOWOqDA== dependencies: "@octokit/auth-token" "^2.4.0" "@octokit/graphql" "^4.3.1" @@ -1317,18 +1307,18 @@ universal-user-agent "^6.0.0" "@octokit/endpoint@^6.0.1": - version "6.0.6" - resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.6.tgz#4f09f2b468976b444742a1d5069f6fa45826d999" - integrity sha512-7Cc8olaCoL/mtquB7j/HTbPM+sY6Ebr4k2X2y4JoXpVKQ7r5xB4iGQE0IoO58wIPsUk4AzoT65AMEpymSbWTgQ== + version "6.0.9" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.9.tgz#c6a772e024202b1bd19ab69f90e0536a2598b13e" + integrity sha512-3VPLbcCuqji4IFTclNUtGdp9v7g+nspWdiCUbK3+iPMjJCZ6LEhn1ts626bWLOn0GiDb6j+uqGvPpqLnY7pBgw== dependencies: "@octokit/types" "^5.0.0" is-plain-object "^5.0.0" universal-user-agent "^6.0.0" "@octokit/graphql@^4.3.1": - version "4.5.6" - resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.5.6.tgz#708143ba15cf7c1879ed6188266e7f270be805d4" - integrity sha512-Rry+unqKTa3svswT2ZAuqenpLrzJd+JTv89LTeVa5UM/5OX8o4KTkPL7/1ABq4f/ZkELb0XEK/2IEoYwykcLXg== + version "4.5.7" + resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.5.7.tgz#f4562dcd9e80ea94602068e85aefac19a88f8578" + integrity sha512-Gk0AR+DcwIK/lK/GX+OQ99UqtenQhcbrhHHfOYlrCQe17ADnX3EKAOKRsAZ9qZvpi5MuwWm/Nm+9aO2kTDSdyA== dependencies: "@octokit/request" "^5.3.0" "@octokit/types" "^5.0.0" @@ -1347,16 +1337,16 @@ "@octokit/types" "^2.0.1" "@octokit/plugin-paginate-rest@^2.2.0": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.4.0.tgz#92f951ddc8a1cd505353fa07650752ca25ed7e93" - integrity sha512-YT6Klz3LLH6/nNgi0pheJnUmTFW4kVnxGft+v8Itc41IIcjl7y1C8TatmKQBbCSuTSNFXO5pCENnqg6sjwpJhg== + version "2.6.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.6.0.tgz#03416396e7a227b268c5b827365238f620a9c5c1" + integrity sha512-o+O8c1PqsC5++BHXfMZabRRsBIVb34tXPWyQLyp2IXq5MmkxdipS7TXM4Y9ldL1PzY9CTrCsn/lzFFJGM3oRRA== dependencies: "@octokit/types" "^5.5.0" "@octokit/plugin-request-log@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.0.tgz#eef87a431300f6148c39a7f75f8cfeb218b2547e" - integrity sha512-ywoxP68aOT3zHCLgWZgwUJatiENeHE7xJzYjfz8WI0goynp96wETBF+d95b8g/uL4QmS6owPVlaxiz3wyMAzcw== + version "1.0.2" + resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.2.tgz#394d59ec734cd2f122431fbaf05099861ece3c44" + integrity sha512-oTJSNAmBqyDR41uSMunLQKMX0jmEXbwD1fpz8FG27lScV3RhtGfBa1/BBLym+PxcC16IBlF7KH9vP1BUYxA+Eg== "@octokit/plugin-rest-endpoint-methods@2.4.0": version "2.4.0" @@ -1384,18 +1374,18 @@ once "^1.4.0" "@octokit/request-error@^2.0.0": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.0.2.tgz#0e76b83f5d8fdda1db99027ea5f617c2e6ba9ed0" - integrity sha512-2BrmnvVSV1MXQvEkrb9zwzP0wXFNbPJij922kYBTLIlIafukrGOb+ABBT2+c6wZiuyWDH1K1zmjGQ0toN/wMWw== + version "2.0.3" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.0.3.tgz#b51b200052bf483f6fa56c9e7e3aa51ead36ecd8" + integrity sha512-GgD5z8Btm301i2zfvJLk/mkhvGCdjQ7wT8xF9ov5noQY8WbKZDH9cOBqXzoeKd1mLr1xH2FwbtGso135zGBgTA== dependencies: "@octokit/types" "^5.0.1" deprecation "^2.0.0" once "^1.4.0" "@octokit/request@^5.2.0", "@octokit/request@^5.3.0", "@octokit/request@^5.4.0": - version "5.4.9" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.9.tgz#0a46f11b82351b3416d3157261ad9b1558c43365" - integrity sha512-CzwVvRyimIM1h2n9pLVYfTDmX9m+KHSgCpqPsY8F1NdEK8IaWqXhSBXsdjOBFZSpEcxNEeg4p0UO9cQ8EnOCLA== + version "5.4.10" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.10.tgz#402d2c53768bde12b99348329ba4129746aebb9c" + integrity sha512-egA49HkqEORVGDZGav1mh+VD+7uLgOxtn5oODj6guJk0HCy+YBSYapFkSLFgeYj3Fr18ZULKGURkjyhkAChylw== dependencies: "@octokit/endpoint" "^6.0.1" "@octokit/request-error" "^2.0.0" @@ -1506,9 +1496,9 @@ integrity sha512-LRKk2UQCSi7BsO5TlfSI8cTNpOGz+MH6+RXEWtuZmxJficQgxwEYJDiKVirzgyiHce0L0F4CqCVvKTwblAeOUw== "@types/babel__core@^7.0.0", "@types/babel__core@^7.1.7": - version "7.1.10" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.10.tgz#ca58fc195dd9734e77e57c6f2df565623636ab40" - integrity sha512-x8OM8XzITIMyiwl5Vmo2B1cR1S1Ipkyv4mdlbJjMa1lmuKvKY9FrBbEANIaMlnWn5Rf7uO+rC/VgYabNkE17Hw== + version "7.1.12" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.12.tgz#4d8e9e51eb265552a7e4f1ff2219ab6133bdfb2d" + integrity sha512-wMTHiiTiBAAPebqaPiPDLFA4LYPKr6Ph0Xq/6rq1Ur3v66HXyG+clfR9CNETkD7MQS8ZHvpQOtA53DLws5WAEQ== dependencies: "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" @@ -1524,9 +1514,9 @@ "@babel/types" "^7.0.0" "@types/babel__template@*": - version "7.0.3" - resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.0.3.tgz#b8aaeba0a45caca7b56a5de9459872dde3727214" - integrity sha512-uCoznIPDmnickEi6D0v11SBpW0OuVqHJCa7syXqQHy5uktSCreIlt0iglsCnmvz8yCb38hGcWeseA8cWJSwv5Q== + version "7.4.0" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.0.tgz#0c888dd70b3ee9eebb6e4f200e809da0076262be" + integrity sha512-NTPErx4/FiPCGScH7foPyr+/1Dkzkni+rHiYHHoTjvwou7AQzJkNeD60A9CXRy+ZEN2B1bggmkTMCDb+Mv5k+A== dependencies: "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" @@ -1538,11 +1528,6 @@ dependencies: "@babel/types" "^7.3.0" -"@types/color-name@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" - integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== - "@types/eslint@^7.2.5": version "7.2.5" resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.2.5.tgz#92172ecf490c2fce4b076739693d75f30376d610" @@ -1572,9 +1557,9 @@ "@types/node" "*" "@types/graceful-fs@^4.1.2": - version "4.1.3" - resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.3.tgz#039af35fe26bec35003e8d86d2ee9c586354348f" - integrity sha512-AiHRaEB50LQg0pZmm659vNBb9f4SJ0qrAnteuzhSeAUcJKxoYgEnprg/83kppCnc2zvtCKbdZry1a5pVY3lOTQ== + version "4.1.4" + resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.4.tgz#4ff9f641a7c6d1a3508ff88bc3141b152772e753" + integrity sha512-mWA/4zFQhfvOA8zWkXobwJvBD7vzcxgrOQ0J5CH1votGqdq9m7+FwtGaqyCZqC3NyyBkc9z4m+iry4LlqcMWJg== dependencies: "@types/node" "*" @@ -1640,9 +1625,9 @@ integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== "@types/minimist@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6" - integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= + version "1.2.1" + resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.1.tgz#283f669ff76d7b8260df8ab7a4262cc83d988256" + integrity sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg== "@types/mock-fs@^4.13.0": version "4.13.0" @@ -1657,9 +1642,9 @@ integrity sha1-m6It838H43gP/4Ux0aOOYz+UV6U= "@types/node@*", "@types/node@>= 8": - version "14.11.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.2.tgz#2de1ed6670439387da1c9f549a2ade2b0a799256" - integrity sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA== + version "14.14.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.7.tgz#8ea1e8f8eae2430cf440564b98c6dfce1ec5945d" + integrity sha512-Zw1vhUSQZYw+7u5dAwNbIA9TuTotpzY/OF7sJM9FqPOF3SPjKnxrjoTktXDZgUjybf4cWVBP7O8wvKdSaGHweg== "@types/node@^10.17.47": version "10.17.47" @@ -1677,9 +1662,9 @@ integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== "@types/prettier@^2.0.0": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.1.1.tgz#be148756d5480a84cde100324c03a86ae5739fb5" - integrity sha512-2zs+O+UkDsJ1Vcp667pd3f8xearMdopz/z54i99wtRDI5KLmngk7vlrYZD0ZjKHaROR03EznlBbVY9PfAEyJIQ== + version "2.1.5" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.1.5.tgz#b6ab3bba29e16b821d84e09ecfaded462b816b00" + integrity sha512-UEyp8LwZ4Dg30kVU2Q3amHHyTn1jEdhCIE59ANed76GaT1Vp76DD3ZWSAxgCrw6wJ0TqeoBpqmfUHiUDPs//HQ== "@types/promptly@^3.0.0": version "3.0.0" @@ -1761,7 +1746,14 @@ resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-15.0.0.tgz#cb3f9f741869e20cce330ffbeb9271590483882d" integrity sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw== -"@types/yargs@^15.0.0", "@types/yargs@^15.0.10": +"@types/yargs@^15.0.0": + version "15.0.9" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.9.tgz#524cd7998fe810cdb02f26101b699cccd156ff19" + integrity sha512-HmU8SeIRhZCWcnRskCs36Q1Q00KBV6Cqh/ora8WN1+22dY07AZdn6Gel8QZ3t26XYPImtcL8WV/eqjhVmMEw4g== + dependencies: + "@types/yargs-parser" "*" + +"@types/yargs@^15.0.10": version "15.0.10" resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.10.tgz#0fe3c8173a0d5c3e780b389050140c3f5ea6ea74" integrity sha512-z8PNtlhrj7eJNLmrAivM7rjBESG6JwC5xP3RVk12i/8HVP7Xnx/sEmERnRImyEuUaJfO942X0qMOYsoupaJbZQ== @@ -1929,9 +1921,9 @@ acorn-walk@^7.1.1: integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== acorn@^7.1.1, acorn@^7.4.0: - version "7.4.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.0.tgz#e1ad486e6c54501634c6c397c5c121daa383607c" - integrity sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w== + version "7.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" + integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== add-stream@^1.0.0: version "1.0.0" @@ -1946,9 +1938,9 @@ agent-base@4, agent-base@^4.3.0: es6-promisify "^5.0.0" agent-base@6, agent-base@^6.0.0: - version "6.0.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.1.tgz#808007e4e5867decb0ab6ab2f928fbdb5a596db4" - integrity sha512-01q25QQDwLSsyfhrKbn8yuur+JNw0H+0Y4JiGIKd3z9aYk/w/2kxD/Upc+t2ZBBSUNff50VjPsSW2YxM8QYKVg== + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== dependencies: debug "4" @@ -1975,9 +1967,9 @@ aggregate-error@^3.0.0: indent-string "^4.0.0" ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.3, ajv@^6.12.4: - version "6.12.5" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.5.tgz#19b0e8bae8f476e5ba666300387775fb1a00a4da" - integrity sha512-lRF8RORchjpKG50/WFf8xmg7sgCLFiYNNnqdKflk63whMQcWR5ngGjiSXkL9bjxy6B2npOK2HSMN49jEBMSkag== + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== dependencies: fast-deep-equal "^3.1.1" fast-json-stable-stringify "^2.0.0" @@ -2029,11 +2021,10 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: color-convert "^1.9.0" ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" - integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: - "@types/color-name" "^1.1.1" color-convert "^2.0.1" any-promise@^1.0.0: @@ -2320,9 +2311,9 @@ aws-sign2@~0.7.0: integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= aws4@^1.8.0: - version "1.10.1" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.10.1.tgz#e1e82e4f3e999e2cfd61b161280d16a111f86428" - integrity sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA== + version "1.11.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" + integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== axios@^0.19.0: version "0.19.2" @@ -2397,10 +2388,10 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= -base64-js@^1.0.2: - version "1.3.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" - integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== +base64-js@^1.0.2, base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== base@^0.11.1: version "0.11.2" @@ -2521,12 +2512,12 @@ buffer@4.9.2: isarray "^1.0.0" buffer@^5.5.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.6.0.tgz#a31749dc7d81d84db08abf937b6b8c4033f62786" - integrity sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw== + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" + base64-js "^1.3.1" + ieee754 "^1.1.13" builtins@^1.0.3: version "1.0.3" @@ -2604,6 +2595,14 @@ caching-transform@^4.0.0: package-hash "^4.0.0" write-file-atomic "^3.0.0" +call-bind@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.0.tgz#24127054bb3f9bdcb4b1fb82418186072f77b8ce" + integrity sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.0" + call-me-maybe@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" @@ -2674,12 +2673,7 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -camelcase@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.1.0.tgz#27dc176173725fb0adf8a48b647f4d7871944d78" - integrity sha512-WCMml9ivU60+8rEJgELlFp1gxFcEGxwYleE3bziHEDeqsqAWGHdimB7beBFGjLzVNgPGyDsfgXLQEYMpmIFnVQ== - -camelcase@^6.2.0: +camelcase@^6.0.0, camelcase@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== @@ -2827,9 +2821,9 @@ cliui@^6.0.0: wrap-ansi "^6.2.0" cliui@^7.0.2: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.3.tgz#ef180f26c8d9bff3927ee52428bfec2090427981" - integrity sha512-Gj3QHTkVMPKqwP3f7B4KPkBZRMR9r4rfi5bXFpg1a+Svvj8l7q5CnkBkVQzfxT5DFSsGk2+PascOgL0JYkL2kw== + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== dependencies: string-width "^4.2.0" strip-ansi "^6.0.0" @@ -2864,10 +2858,10 @@ code-point-at@^1.0.0: resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= -codemaker@^1.14.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/codemaker/-/codemaker-1.14.1.tgz#c2938d5fb76ca0cce306990c82b5fe0e934feb96" - integrity sha512-km8Aqf1ZioiM9Xm4Tj9pbIyFLoRV9l3ssw073C1AePt76TDqWFmJ83LrXkm+dSgdysoKVqY3Svn3BoPnN5bFKQ== +codemaker@^1.15.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/codemaker/-/codemaker-1.15.0.tgz#3e2b319b6eb83be6094be166470158b186abdd04" + integrity sha512-2xXzYKUYrl79m1sertY+NL62T15Q5m1RLGuf5K8ZxX0gik0Ok3AmEhhEpSUaFBS48ocjHZ1rg5EgKK2A+7CY3g== dependencies: camelcase "^6.2.0" decamelize "^4.0.0" @@ -3012,24 +3006,16 @@ console-control-strings@^1.0.0, console-control-strings@~1.1.0: integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= constructs@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/constructs/-/constructs-3.2.0.tgz#c7a61dfb3bb8ad81f8d77e5dcdf5404129ce65d2" - integrity sha512-lfUsJjAyEBxQHjd46WwJp4YZqFcHg/+vzpc+EVYwOLy3YtI0uVQm6/i14GpMKOpAB7XtHAnQz6evE+72lAfVzQ== + version "3.2.30" + resolved "https://registry.yarnpkg.com/constructs/-/constructs-3.2.30.tgz#950a1e38d7193791fea55f847f87013959748475" + integrity sha512-tzWUxXc9UjPbw1+c0s6gFL0ae4gPgsKck59xfkjOnyezPNcG2myB/xh9wGD51kbn+GInW0vMgW0QWOn0WhKa4g== contains-path@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" integrity sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo= -conventional-changelog-angular@^5.0.11, conventional-changelog-angular@^5.0.3: - version "5.0.11" - resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.11.tgz#99a3ca16e4a5305e0c2c2fae3ef74fd7631fc3fb" - integrity sha512-nSLypht/1yEflhuTogC03i7DX7sOrXGsRn14g131Potqi6cbGbGEE9PSDEHKldabB6N76HiSyw9Ph+kLmC04Qw== - dependencies: - compare-func "^2.0.0" - q "^1.5.1" - -conventional-changelog-angular@^5.0.12: +conventional-changelog-angular@^5.0.11, conventional-changelog-angular@^5.0.12, conventional-changelog-angular@^5.0.3: version "5.0.12" resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz#c979b8b921cbfe26402eb3da5bbfda02d865a2b9" integrity sha512-5GLsbnkR/7A89RyHLvvoExbiGbd9xKdKqDTrArnPbOqBqG/2wIosu0fHwpeIRI8Tl94MhVNBXcLJZl92ZQ5USw== @@ -3037,14 +3023,7 @@ conventional-changelog-angular@^5.0.12: compare-func "^2.0.0" q "^1.5.1" -conventional-changelog-atom@^2.0.7: - version "2.0.7" - resolved "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-2.0.7.tgz#221575253a04f77a2fd273eb2bf29a138f710abf" - integrity sha512-7dOREZwzB+tCEMjRTDfen0OHwd7vPUdmU0llTy1eloZgtOP4iSLVzYIQqfmdRZEty+3w5Jz+AbhfTJKoKw1JeQ== - dependencies: - q "^1.5.1" - -conventional-changelog-atom@^2.0.8: +conventional-changelog-atom@^2.0.7, conventional-changelog-atom@^2.0.8: version "2.0.8" resolved "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-2.0.8.tgz#a759ec61c22d1c1196925fca88fe3ae89fd7d8de" integrity sha512-xo6v46icsFTK3bb7dY/8m2qvc8sZemRgdqLb/bjpBsH2UyOS8rKNTgcb5025Hri6IpANPApbXMg15QLb1LJpBw== @@ -3062,14 +3041,7 @@ conventional-changelog-cli@^2.1.1: meow "^8.0.0" tempfile "^3.0.0" -conventional-changelog-codemirror@^2.0.7: - version "2.0.7" - resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-2.0.7.tgz#d6b6a8ce2707710c5a036e305037547fb9e15bfb" - integrity sha512-Oralk1kiagn3Gb5cR5BffenWjVu59t/viE6UMD/mQa1hISMPkMYhJIqX+CMeA1zXgVBO+YHQhhokEj99GP5xcg== - dependencies: - q "^1.5.1" - -conventional-changelog-codemirror@^2.0.8: +conventional-changelog-codemirror@^2.0.7, conventional-changelog-codemirror@^2.0.8: version "2.0.8" resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-2.0.8.tgz#398e9530f08ce34ec4640af98eeaf3022eb1f7dc" integrity sha512-z5DAsn3uj1Vfp7po3gpt2Boc+Bdwmw2++ZHa5Ak9k0UKsYAO5mH1UBTN0qSCuJZREIhX6WU4E1p3IW2oRCNzQw== @@ -3081,7 +3053,7 @@ conventional-changelog-config-spec@2.1.0: resolved "https://registry.yarnpkg.com/conventional-changelog-config-spec/-/conventional-changelog-config-spec-2.1.0.tgz#874a635287ef8b581fd8558532bf655d4fb59f2d" integrity sha512-IpVePh16EbbB02V+UA+HQnnPIohgXvJRxHcS5+Uwk4AT5LjzCZJm5sp/yqs5C6KZJ1jMsV4paEV13BN1pvDuxQ== -conventional-changelog-conventionalcommits@4.4.0, conventional-changelog-conventionalcommits@^4.4.0: +conventional-changelog-conventionalcommits@4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.4.0.tgz#8d96687141c9bbd725a89b95c04966d364194cd4" integrity sha512-ybvx76jTh08tpaYrYn/yd0uJNLt5yMrb1BphDe4WBredMlvPisvMghfpnJb6RmRNcqXeuhR6LfGZGewbkRm9yA== @@ -3090,7 +3062,7 @@ conventional-changelog-conventionalcommits@4.4.0, conventional-changelog-convent lodash "^4.17.15" q "^1.5.1" -conventional-changelog-conventionalcommits@^4.5.0: +conventional-changelog-conventionalcommits@^4.4.0, conventional-changelog-conventionalcommits@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.5.0.tgz#a02e0b06d11d342fdc0f00c91d78265ed0bc0a62" integrity sha512-buge9xDvjjOxJlyxUnar/+6i/aVEVGA7EEh4OafBCXPlLUQPGbRUBhBUveWRxzvR8TEjhKEP4BdepnpG2FSZXw== @@ -3118,28 +3090,7 @@ conventional-changelog-core@^3.1.6: read-pkg-up "^3.0.0" through2 "^3.0.0" -conventional-changelog-core@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-4.2.0.tgz#d8befd1e1f5126bf35a17668276cc8c244650469" - integrity sha512-8+xMvN6JvdDtPbGBqA7oRNyZD4od1h/SIzrWqHcKZjitbVXrFpozEeyn4iI4af1UwdrabQpiZMaV07fPUTGd4w== - dependencies: - add-stream "^1.0.0" - conventional-changelog-writer "^4.0.17" - conventional-commits-parser "^3.1.0" - dateformat "^3.0.0" - get-pkg-repo "^1.0.0" - git-raw-commits "2.0.0" - git-remote-origin-url "^2.0.0" - git-semver-tags "^4.1.0" - lodash "^4.17.15" - normalize-package-data "^2.3.5" - q "^1.5.1" - read-pkg "^3.0.0" - read-pkg-up "^3.0.0" - shelljs "^0.8.3" - through2 "^3.0.0" - -conventional-changelog-core@^4.2.1: +conventional-changelog-core@^4.2.0, conventional-changelog-core@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-4.2.1.tgz#f811ad98ab2ff080becafc61407509420c9b447d" integrity sha512-8cH8/DEoD3e5Q6aeogdR5oaaKs0+mG6+f+Om0ZYt3PNv7Zo0sQhu4bMDRsqAF+UTekTAtP1W/C41jH/fkm8Jtw== @@ -3160,71 +3111,35 @@ conventional-changelog-core@^4.2.1: shelljs "^0.8.3" through2 "^4.0.0" -conventional-changelog-ember@^2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-2.0.8.tgz#f0f04eb7ff3c885af97db100865ab95dcfa9917f" - integrity sha512-JEMEcUAMg4Q9yxD341OgWlESQ4gLqMWMXIWWUqoQU8yvTJlKnrvcui3wk9JvnZQyONwM2g1MKRZuAjKxr8hAXA== - dependencies: - q "^1.5.1" - -conventional-changelog-ember@^2.0.9: +conventional-changelog-ember@^2.0.8, conventional-changelog-ember@^2.0.9: version "2.0.9" resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-2.0.9.tgz#619b37ec708be9e74a220f4dcf79212ae1c92962" integrity sha512-ulzIReoZEvZCBDhcNYfDIsLTHzYHc7awh+eI44ZtV5cx6LVxLlVtEmcO+2/kGIHGtw+qVabJYjdI5cJOQgXh1A== dependencies: q "^1.5.1" -conventional-changelog-eslint@^3.0.8: - version "3.0.8" - resolved "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-3.0.8.tgz#f8b952b7ed7253ea0ac0b30720bb381f4921b46c" - integrity sha512-5rTRltgWG7TpU1PqgKHMA/2ivjhrB+E+S7OCTvj0zM/QGg4vmnVH67Vq/EzvSNYtejhWC+OwzvDrLk3tqPry8A== - dependencies: - q "^1.5.1" - -conventional-changelog-eslint@^3.0.9: +conventional-changelog-eslint@^3.0.8, conventional-changelog-eslint@^3.0.9: version "3.0.9" resolved "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-3.0.9.tgz#689bd0a470e02f7baafe21a495880deea18b7cdb" integrity sha512-6NpUCMgU8qmWmyAMSZO5NrRd7rTgErjrm4VASam2u5jrZS0n38V7Y9CzTtLT2qwz5xEChDR4BduoWIr8TfwvXA== dependencies: q "^1.5.1" -conventional-changelog-express@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-2.0.5.tgz#6e93705acdad374516ca125990012a48e710f8de" - integrity sha512-pW2hsjKG+xNx/Qjof8wYlAX/P61hT5gQ/2rZ2NsTpG+PgV7Rc8RCfITvC/zN9K8fj0QmV6dWmUefCteD9baEAw== - dependencies: - q "^1.5.1" - -conventional-changelog-express@^2.0.6: +conventional-changelog-express@^2.0.5, conventional-changelog-express@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-2.0.6.tgz#420c9d92a347b72a91544750bffa9387665a6ee8" integrity sha512-SDez2f3iVJw6V563O3pRtNwXtQaSmEfTCaTBPCqn0oG0mfkq0rX4hHBq5P7De2MncoRixrALj3u3oQsNK+Q0pQ== dependencies: q "^1.5.1" -conventional-changelog-jquery@^3.0.10: - version "3.0.10" - resolved "https://registry.yarnpkg.com/conventional-changelog-jquery/-/conventional-changelog-jquery-3.0.10.tgz#fe8eb6aff322aa980af5eb68497622a5f6257ce7" - integrity sha512-QCW6wF8QgPkq2ruPaxc83jZxoWQxLkt/pNxIDn/oYjMiVgrtqNdd7lWe3vsl0hw5ENHNf/ejXuzDHk6suKsRpg== - dependencies: - q "^1.5.1" - -conventional-changelog-jquery@^3.0.11: +conventional-changelog-jquery@^3.0.10, conventional-changelog-jquery@^3.0.11: version "3.0.11" resolved "https://registry.yarnpkg.com/conventional-changelog-jquery/-/conventional-changelog-jquery-3.0.11.tgz#d142207400f51c9e5bb588596598e24bba8994bf" integrity sha512-x8AWz5/Td55F7+o/9LQ6cQIPwrCjfJQ5Zmfqi8thwUEKHstEn4kTIofXub7plf1xvFA2TqhZlq7fy5OmV6BOMw== dependencies: q "^1.5.1" -conventional-changelog-jshint@^2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-2.0.8.tgz#3fff4df8cb46037f77b9dc3f8e354c7f99332f13" - integrity sha512-hB/iI0IiZwnZ+seYI+qEQ4b+EMQSEC8jGIvhO2Vpz1E5p8FgLz75OX8oB1xJWl+s4xBMB6f8zJr0tC/BL7YOjw== - dependencies: - compare-func "^2.0.0" - q "^1.5.1" - -conventional-changelog-jshint@^2.0.9: +conventional-changelog-jshint@^2.0.8, conventional-changelog-jshint@^2.0.9: version "2.0.9" resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-2.0.9.tgz#f2d7f23e6acd4927a238555d92c09b50fe3852ff" integrity sha512-wMLdaIzq6TNnMHMy31hql02OEQ8nCQfExw1SE0hYL5KvU+JCTuPaDO+7JiogGT2gJAxiUGATdtYYfh+nT+6riA== @@ -3237,23 +3152,7 @@ conventional-changelog-preset-loader@^2.1.1, conventional-changelog-preset-loade resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.4.tgz#14a855abbffd59027fd602581f1f34d9862ea44c" integrity sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g== -conventional-changelog-writer@^4.0.17, conventional-changelog-writer@^4.0.6: - version "4.0.17" - resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.17.tgz#4753aaa138bf5aa59c0b274cb5937efcd2722e21" - integrity sha512-IKQuK3bib/n032KWaSb8YlBFds+aLmzENtnKtxJy3+HqDq5kohu3g/UdNbIHeJWygfnEbZjnCKFxAW0y7ArZAw== - dependencies: - compare-func "^2.0.0" - conventional-commits-filter "^2.0.6" - dateformat "^3.0.0" - handlebars "^4.7.6" - json-stringify-safe "^5.0.1" - lodash "^4.17.15" - meow "^7.0.0" - semver "^6.0.0" - split "^1.0.0" - through2 "^3.0.0" - -conventional-changelog-writer@^4.0.18: +conventional-changelog-writer@^4.0.18, conventional-changelog-writer@^4.0.6: version "4.0.18" resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.18.tgz#10b73baa59c7befc69b360562f8b9cd19e63daf8" integrity sha512-mAQDCKyB9HsE8Ko5cCM1Jn1AWxXPYV0v8dFPabZRkvsiWUul2YyAqbIaoMKF88Zf2ffnOPSvKhboLf3fnjo5/A== @@ -3303,15 +3202,7 @@ conventional-changelog@^3.1.24: conventional-changelog-jshint "^2.0.9" conventional-changelog-preset-loader "^2.3.4" -conventional-commits-filter@^2.0.2, conventional-commits-filter@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.6.tgz#0935e1240c5ca7698329affee1b6a46d33324c4c" - integrity sha512-4g+sw8+KA50/Qwzfr0hL5k5NWxqtrOVw4DDk3/h6L85a9Gz0/Eqp3oP+CWCNfesBvZZZEFHF7OTEbRe+yYSyKw== - dependencies: - lodash.ismatch "^4.4.0" - modify-values "^1.0.0" - -conventional-commits-filter@^2.0.7: +conventional-commits-filter@^2.0.2, conventional-commits-filter@^2.0.6, conventional-commits-filter@^2.0.7: version "2.0.7" resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.7.tgz#f8d9b4f182fce00c9af7139da49365b136c8a0b3" integrity sha512-ASS9SamOP4TbCClsRHxIHXRfcGCnIoQqkvAzCSbZzTFLfcTqJVugB0agRgsEELsqaeWgsXv513eS116wnlSSPA== @@ -3319,20 +3210,7 @@ conventional-commits-filter@^2.0.7: lodash.ismatch "^4.4.0" modify-values "^1.0.0" -conventional-commits-parser@^3.0.3, conventional-commits-parser@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.1.0.tgz#10140673d5e7ef5572633791456c5d03b69e8be4" - integrity sha512-RSo5S0WIwXZiRxUGTPuYFbqvrR4vpJ1BDdTlthFgvHt5kEdnd1+pdvwWphWn57/oIl4V72NMmOocFqqJ8mFFhA== - dependencies: - JSONStream "^1.0.4" - is-text-path "^1.0.1" - lodash "^4.17.15" - meow "^7.0.0" - split2 "^2.0.0" - through2 "^3.0.0" - trim-off-newlines "^1.0.0" - -conventional-commits-parser@^3.2.0: +conventional-commits-parser@^3.0.3, conventional-commits-parser@^3.1.0, conventional-commits-parser@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.2.0.tgz#9e261b139ca4b7b29bcebbc54460da36894004ca" integrity sha512-XmJiXPxsF0JhAKyfA2Nn+rZwYKJ60nanlbSWwwkGwLQFbugsc0gv1rzc7VbbUWAzJfR1qR87/pNgv9NgmxtBMQ== @@ -3763,11 +3641,6 @@ dezalgo@^1.0.0: asap "^2.0.0" wrappy "1" -diff-sequences@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.5.0.tgz#ef766cf09d43ed40406611f11c6d8d9dd8b2fefd" - integrity sha512-ZXx86srb/iYy6jG71k++wBN9P9J05UNQ5hQHQd9MtMPvcqXPx/vKU69jfHV637D00Q2gSgPk2D+jSx3l1lDW/Q== - diff-sequences@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.6.2.tgz#48ba99157de1923412eed41db6b6d4aa9ca7c0b1" @@ -3899,9 +3772,9 @@ ejs@^2.5.2: integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA== emittery@^0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.7.1.tgz#c02375a927a40948c0345cc903072597f5270451" - integrity sha512-d34LN4L6h18Bzz9xpoku2nPwKxCPlPMr3EEKTkoEBi+1/+b0lcRkRJ1UVyyZaKNeqGR3swcGl6s390DNO4YVgQ== + version "0.7.2" + resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.7.2.tgz#25595908e13af0f5674ab419396e2fb394cdfa82" + integrity sha512-A8OG5SR/ij3SsJdWDJdkkSYUjQdCUx6APQXem0SaEePBSRg4eymGYwBkKo1Y6DU+af/Jn2dBQqDBvjnr9Vi8nQ== emoji-regex@^7.0.1: version "7.0.3" @@ -3997,11 +3870,12 @@ es-abstract@^1.18.0-next.0, es-abstract@^1.18.0-next.1: string.prototype.trimstart "^1.0.1" es-get-iterator@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.0.tgz#bb98ad9d6d63b31aacdc8f89d5d0ee57bcb5b4c8" - integrity sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ== + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.1.tgz#b93ddd867af16d5118e00881396533c1c6647ad9" + integrity sha512-qorBw8Y7B15DVLaJWy6WdEV/ZkieBcu6QCq/xzWzGOKJqgG1j754vXRfZ3NY7HSShneqU43mPB4OkQBTkvHhFw== dependencies: - es-abstract "^1.17.4" + call-bind "^1.0.0" + get-intrinsic "^1.0.1" has-symbols "^1.0.1" is-arguments "^1.0.4" is-map "^2.0.1" @@ -4313,9 +4187,9 @@ execa@^1.0.0: strip-eof "^1.0.0" execa@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/execa/-/execa-4.0.3.tgz#0a34dabbad6d66100bd6f2c576c8669403f317f2" - integrity sha512-WFDXGHckXPWZX19t1kCsXzOpqX9LWYNqn4C+HqZlk/V0imTkzJZqf87ZBhvpHaftERYknpk0fjSylnXVlVgI0A== + version "4.1.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" + integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== dependencies: cross-spawn "^7.0.0" get-stream "^5.0.0" @@ -4479,9 +4353,9 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= fastq@^1.6.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.8.0.tgz#550e1f9f59bbc65fe185cb6a9b4d95357107f481" - integrity sha512-SMIZoZdLh/fgofivvIkmknUXyPnvxRE3DhtZ5Me3Mrsk5gyPL42F0xr51TdRXskBxHfMp+07bcYzfsYEsSQA9Q== + version "1.9.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.9.0.tgz#e16a72f338eaca48e91b5c23593bcc2ef66b7947" + integrity sha512-i7FVWL8HhVY+CTkwFxkN2mk3h+787ixS5S63eb78diVRc1MCssarHq3W5cj0av7YDSwmaV928RNag+U1etRQ7w== dependencies: reusify "^1.0.4" @@ -4686,9 +4560,9 @@ from2@^2.1.0: readable-stream "^2.0.0" fromentries@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/fromentries/-/fromentries-1.2.1.tgz#64c31665630479bc993cd800d53387920dc61b4d" - integrity sha512-Xu2Qh8yqYuDhQGOhD5iJGninErSfI9A3FrriD3tjUgV5VbJFeH8vfgZ9HnC6jWN80QDVNQK5vmxRAmEAp7Mevw== + version "1.3.2" + resolved "https://registry.yarnpkg.com/fromentries/-/fromentries-1.3.2.tgz#e4bca6808816bf8f93b52750f1127f5a6fd86e3a" + integrity sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg== fs-access@^1.0.1: version "1.0.1" @@ -4749,9 +4623,9 @@ fs.realpath@^1.0.0: integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= fsevents@^2.1.2: - version "2.1.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" - integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== + version "2.2.1" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.2.1.tgz#1fb02ded2036a8ac288d507a65962bd87b97628d" + integrity sha512-bTLYHSeC0UH/EFXS9KqWnXuOl/wHK5Z/d+ghd5AsFMYN7wIGkUCOJyzy88+wJKkZPGON8u4Z9f6U4FdgURE9qA== ftp@^0.3.10: version "0.3.10" @@ -4796,15 +4670,24 @@ genfun@^5.0.0: integrity sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA== gensync@^1.0.0-beta.1: - version "1.0.0-beta.1" - resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" - integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg== + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== get-caller-file@^2.0.1, get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-intrinsic@^1.0.0, get-intrinsic@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.0.1.tgz#94a9768fcbdd0595a1c9273aacf4c89d075631be" + integrity sha512-ZnWP+AmS1VUaLgTRy47+zKtjTxz+0xMpx3I52i+aalBK1QP19ggLF3Db89KJX7kjfOfP2eoa01qc++GwPgufPg== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" @@ -4896,15 +4779,7 @@ git-semver-tags@^2.0.3: meow "^4.0.0" semver "^6.0.0" -git-semver-tags@^4.0.0, git-semver-tags@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-4.1.0.tgz#0146c9bc24ee96104c99f443071c8c2d7dc848e3" - integrity sha512-TcxAGeo03HdErzKzi4fDD+xEL7gi8r2Y5YSxH6N2XYdVSV5UkBwfrt7Gqo1b+uSHCjy/sa9Y6BBBxxFLxfbhTg== - dependencies: - meow "^7.0.0" - semver "^6.0.0" - -git-semver-tags@^4.1.1: +git-semver-tags@^4.0.0, git-semver-tags@^4.1.0, git-semver-tags@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-4.1.1.tgz#63191bcd809b0ec3e151ba4751c16c444e5b5780" integrity sha512-OWyMt5zBe7xFs8vglMmhM9lRQzCWL3WjHtxNNfJTMngGym7pC1kh8sP6jevfydJ6LP3ZvGxfb6ABYgPUM0mtsA== @@ -4921,9 +4796,9 @@ git-up@^4.0.0: parse-url "^5.0.0" git-url-parse@^11.1.2: - version "11.3.0" - resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-11.3.0.tgz#1515b4574c4eb2efda7d25cc50b29ce8beaefaae" - integrity sha512-i3XNa8IKmqnUqWBcdWBjOcnyZYfN3C1WRvnKI6ouFWwsXCZEnlgbwbm55ZpJ3OJMhfEP/ryFhqW8bBhej3C5Ug== + version "11.4.0" + resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-11.4.0.tgz#f2bb1f2b00f05552540e95a62e31399a639a6aa6" + integrity sha512-KlIa5jvMYLjXMQXkqpFzobsyD/V2K5DRHl5OAf+6oDFPlPLxrGDVQlIdI63c4/Kt6kai4kALENSALlzTGST3GQ== dependencies: git-up "^4.0.0" @@ -5120,9 +4995,9 @@ hasha@^3.0.0: is-stream "^1.0.1" hasha@^5.0.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/hasha/-/hasha-5.2.1.tgz#0e5b492aa40de3819e80955f221d2fccef55b5aa" - integrity sha512-x15jnRSHTi3VmH+oHtVb9kgU/HuKOK8mjK8iCL3dPQXh4YJlUb9YSI8ZLiiqLAIvY2wuDIlZYZppy8vB2XISkQ== + version "5.2.2" + resolved "https://registry.yarnpkg.com/hasha/-/hasha-5.2.2.tgz#a48477989b3b327aea3c04f53096d816d97522a1" + integrity sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ== dependencies: is-stream "^2.0.0" type-fest "^0.8.0" @@ -5240,11 +5115,16 @@ iconv-lite@^0.6.2: dependencies: safer-buffer ">= 2.1.2 < 3.0.0" -ieee754@1.1.13, ieee754@^1.1.4: +ieee754@1.1.13: version "1.1.13" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== +ieee754@^1.1.13, ieee754@^1.1.4: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + iferr@^0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" @@ -5281,9 +5161,9 @@ import-fresh@^2.0.0: resolve-from "^3.0.0" import-fresh@^3.0.0, import-fresh@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" - integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== + version "3.2.2" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.2.tgz#fc129c160c5d68235507f4331a6baad186bdbc3e" + integrity sha512-cTPNrlvJT6twpYy+YmKUKrTSjWFs3bjYjAhCwm+z4EOCubZxAuO+hHpRN64TqjEaYSHs7tJAE0w1CKMGmsG/lw== dependencies: parent-module "^1.0.0" resolve-from "^4.0.0" @@ -5448,13 +5328,6 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" -is-core-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.0.0.tgz#58531b70aed1db7c0e8d4eb1a0a2d1ddd64bd12d" - integrity sha512-jq1AH6C8MuteOoBPwkxHafmByhL9j5q4OaPGdbuD+ZtQJVzH+i6E3BJDQcBA09k57i2Hh2yQbEG8yObZ0jdlWw== - dependencies: - has "^1.0.3" - is-core-module@^2.1.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" @@ -5923,17 +5796,7 @@ jest-config@^26.6.3: micromatch "^4.0.2" pretty-format "^26.6.2" -jest-diff@^26.0.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.6.0.tgz#5e5bbbaf93ec5017fae2b3ef12fc895e29988379" - integrity sha512-IH09rKsdWY8YEY7ii2BHlSq59oXyF2pK3GoK+hOK9eD/x6009eNB5Jv1shLMKgxekodPzLlV7eZP1jPFQYds8w== - dependencies: - chalk "^4.0.0" - diff-sequences "^26.5.0" - jest-get-type "^26.3.0" - pretty-format "^26.6.0" - -jest-diff@^26.6.2: +jest-diff@^26.0.0, jest-diff@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.6.2.tgz#1aa7468b52c3a68d7d5c5fdcdfcd5e49bd164394" integrity sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA== @@ -6329,65 +6192,65 @@ jsesc@^2.5.1: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== -jsii-diff@^1.14.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/jsii-diff/-/jsii-diff-1.14.1.tgz#6ee1b6de68675a8cf8ad45b98474cbc7148c1aca" - integrity sha512-4lUf7++fply4tEW+HmhExjOCTz2zCihOdcn+bYvssG+2ztuFh+uyhUtcBaxXM49Mz8+RP3ymu3ArLr9BVmSfrg== +jsii-diff@^1.15.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/jsii-diff/-/jsii-diff-1.15.0.tgz#77e03f5c5557ba20d9bc2cc354a7f03bb93f21f0" + integrity sha512-T47ogWBdztPrOhy53ngm9ZBF0gYz89BcNnM8WJAET6GcpO5qyoAwpQpf4WuA9oDdX8Q9yV1xOHPtBDD+7PmeFQ== dependencies: - "@jsii/spec" "^1.14.1" + "@jsii/spec" "^1.15.0" fs-extra "^9.0.1" - jsii-reflect "^1.14.1" + jsii-reflect "^1.15.0" log4js "^6.3.0" typescript "~3.9.7" - yargs "^16.1.0" + yargs "^16.1.1" -jsii-pacmak@^1.14.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/jsii-pacmak/-/jsii-pacmak-1.14.1.tgz#1296cb926df803fef407b2cbbe2e2658a524c371" - integrity sha512-BRASls0wizqS4mxOmC2eoC7DgDb3tyS1UtFQeok0kfhhyi+GDs/9JPJ+VKlhU1kGLmsQswYxkPrZhV9VcXoiIw== +jsii-pacmak@^1.15.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/jsii-pacmak/-/jsii-pacmak-1.15.0.tgz#48060233cfe693a24554c0e28a851aa1f690c734" + integrity sha512-/VxBDjC7Mi3zhuopm1oL0mXNBuC32YhuQJnHyHkFEnFduso7gnc6/3OCQbm3l5pOxHfg7oTBXIKxwDkh7EkK0w== dependencies: - "@jsii/spec" "^1.14.1" + "@jsii/spec" "^1.15.0" clone "^2.1.2" - codemaker "^1.14.1" + codemaker "^1.15.0" commonmark "^0.29.2" escape-string-regexp "^4.0.0" fs-extra "^9.0.1" - jsii-reflect "^1.14.1" - jsii-rosetta "^1.14.1" + jsii-reflect "^1.15.0" + jsii-rosetta "^1.15.0" semver "^7.3.2" spdx-license-list "^6.3.0" xmlbuilder "^15.1.1" - yargs "^16.1.0" + yargs "^16.1.1" -jsii-reflect@^1.14.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/jsii-reflect/-/jsii-reflect-1.14.1.tgz#e0073b4fbfcc977f7546675c427d7ca0eae8d699" - integrity sha512-otKxvnNn2kAMMygBiw8fGnmJFhQ0EcPTJZH4y/Yn1rZg/nGLAk/G8lCQYfh3xm2/GwSpjh/w6ZEPsq/RUuPR1A== +jsii-reflect@^1.15.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/jsii-reflect/-/jsii-reflect-1.15.0.tgz#a65297a581b2b7bfbaa213d0bca7f76c693f718e" + integrity sha512-8mKV5OVt/FwRdLNmr7By5T0HyhjjLlHsE5oiOta6NdkdMB7magjzZ1bucenJ2DdvPidX2dP6IDujfOKoXVNsjA== dependencies: - "@jsii/spec" "^1.14.1" + "@jsii/spec" "^1.15.0" colors "^1.4.0" fs-extra "^9.0.1" - oo-ascii-tree "^1.14.1" - yargs "^16.1.0" + oo-ascii-tree "^1.15.0" + yargs "^16.1.1" -jsii-rosetta@^1.14.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/jsii-rosetta/-/jsii-rosetta-1.14.1.tgz#797c433d9b353d360de4c9c71d0913b9b33fcb1c" - integrity sha512-HfM1IO7eIQ8qyDxTRRdV3TraBhnCivq3N3qMdJuPEJ3O2lprx0TS6pvIXzv9DgDWJwLVDaxI1ecTZhSl9poGeQ== +jsii-rosetta@^1.15.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/jsii-rosetta/-/jsii-rosetta-1.15.0.tgz#a092591662e4c2f39144562eafe30cbc0d935e13" + integrity sha512-0yXdm6X0IAsjzKDq0QO0n7EPVQ3vTW3qwgFH+ZNirqFLP5xqnpxXS1BtrQNP9zxC7gfacgsDS48MroagKQWDHg== dependencies: - "@jsii/spec" "^1.14.1" + "@jsii/spec" "^1.15.0" commonmark "^0.29.2" fs-extra "^9.0.1" typescript "~3.9.7" xmldom "^0.4.0" - yargs "^16.1.0" + yargs "^16.1.1" -jsii@^1.14.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/jsii/-/jsii-1.14.1.tgz#4b478b5f682ae140fbfdd49c171b0cff7f7e01bd" - integrity sha512-uDVBl8bvSnraJpKYyY22dOoERpQv/sEAHEj3L5b00qkBi6FsFr2KWfQOdUg9fMWdYrmMVuXWOWXJ186Fn7XF+A== +jsii@^1.15.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/jsii/-/jsii-1.15.0.tgz#3f3160ee2c5fe62473855c1ac8d2aa9e3bf72ad1" + integrity sha512-kYiO1WkeqN7or4rz5ccYooO576+wiqiRGzv+UCI6hShKd42ff3xYZ1oTUSnBQdh9lp9i/nlNtx7KGUEqjC16Aw== dependencies: - "@jsii/spec" "^1.14.1" + "@jsii/spec" "^1.15.0" case "^1.6.3" colors "^1.4.0" deep-equal "^2.0.4" @@ -6398,7 +6261,7 @@ jsii@^1.14.1: sort-json "^2.0.0" spdx-license-list "^6.3.0" typescript "~3.9.7" - yargs "^16.1.0" + yargs "^16.1.1" json-diff@^0.5.4: version "0.5.4" @@ -6468,11 +6331,11 @@ jsonfile@^4.0.0: graceful-fs "^4.1.6" jsonfile@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.0.1.tgz#98966cba214378c8c84b82e085907b40bf614179" - integrity sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg== + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== dependencies: - universalify "^1.0.0" + universalify "^2.0.0" optionalDependencies: graceful-fs "^4.1.6" @@ -7622,12 +7485,12 @@ object-visit@^1.0.0: isobject "^3.0.0" object.assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.1.tgz#303867a666cdd41936ecdedfb1f8f3e32a478cdd" - integrity sha512-VT/cxmx5yaoHSOTSyrCygIDFco+RsibY2NM0a4RdEeY/4KgqezwFtK1yr3U67xYhqJSlASm2pKhLVzPj2lr4bA== + version "4.1.2" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" + integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== dependencies: + call-bind "^1.0.0" define-properties "^1.1.3" - es-abstract "^1.18.0-next.0" has-symbols "^1.0.1" object-keys "^1.1.1" @@ -7682,10 +7545,10 @@ onetime@^5.1.0: dependencies: mimic-fn "^2.1.0" -oo-ascii-tree@^1.14.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/oo-ascii-tree/-/oo-ascii-tree-1.14.1.tgz#cf3da9d7c9c944d3258b274e06aa0192aca20d6e" - integrity sha512-dW0RFnYqUj8WQpvuYXVvjfA3ABoNQnScgSxnKa9lPPCvfcO4CBPshifk9M6hU3ksttcNGbQkFq6k2di2E23SVA== +oo-ascii-tree@^1.15.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/oo-ascii-tree/-/oo-ascii-tree-1.15.0.tgz#51227b6a0a8a1c933afe312556c696058fcc32a3" + integrity sha512-FR8ygFwcH9DBkQIcp/lAe49EFcTNMGjU3jgAsRaZ8ktNVxDM9EszlLNEO1K10QTHZwT3iZxq+E+KwT811B4ayw== opener@^1.5.1: version "1.5.2" @@ -8132,17 +7995,7 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= -pretty-format@^26.0.0, pretty-format@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.0.tgz#1e1030e3c70e3ac1c568a5fd15627671ea159391" - integrity sha512-Uumr9URVB7bm6SbaByXtx+zGlS+0loDkFMHP0kHahMjmfCtmFY03iqd++5v3Ld6iB5TocVXlBN/T+DXMn9d4BA== - dependencies: - "@jest/types" "^26.6.0" - ansi-regex "^5.0.0" - ansi-styles "^4.0.0" - react-is "^16.12.0" - -pretty-format@^26.6.2: +pretty-format@^26.0.0, pretty-format@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93" integrity sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg== @@ -8195,12 +8048,12 @@ promptly@^3.2.0: read "^1.0.4" prompts@^2.0.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.3.2.tgz#480572d89ecf39566d2bd3fe2c9fccb7c4c0b068" - integrity sha512-Q06uKs2CkNYVID0VqwfAl9mipo99zkBv/n2JtWY89Yxa3ZabWSrs0e2KTudKVa3peLUvYXMefDqIleLPVUBZMA== + version "2.4.0" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.0.tgz#4aa5de0723a231d1ee9121c40fdf663df73f61d7" + integrity sha512-awZAKrk3vN6CroQukBL+R9051a4R3zCZBlJm/HBfrSZ8iTpYix3VX1vU4mveiLpiwmOJT4wokTF9m6HUk4KqWQ== dependencies: kleur "^3.0.3" - sisteransi "^1.0.4" + sisteransi "^1.0.5" promzard@^0.3.0: version "0.3.0" @@ -8344,11 +8197,6 @@ raw-body@^2.2.0: iconv-lite "0.4.24" unpipe "1.0.0" -react-is@^16.12.0: - version "16.13.1" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" - integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== - react-is@^17.0.1: version "17.0.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.1.tgz#5b3531bd76a645a4c9fb6e693ed36419e3301339" @@ -8498,9 +8346,9 @@ readable-stream@1.1.x: util-deprecate "^1.0.1" readdir-glob@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/readdir-glob/-/readdir-glob-1.1.0.tgz#a3def6f7b61343e8a1274dbb872b9a2ad055d086" - integrity sha512-KgT0oXPIDQRRRYFf+06AUaodICTep2Q5635BORLzTEzp7rEqcR14a47j3Vzm3ix7FeI1lp8mYyG7r8lTB06Pyg== + version "1.1.1" + resolved "https://registry.yarnpkg.com/readdir-glob/-/readdir-glob-1.1.1.tgz#f0e10bb7bf7bfa7e0add8baffdc54c3f7dbee6c4" + integrity sha512-91/k1EzZwDx6HbERR+zucygRFfiPl2zkIYZtv3Jjr6Mn7SkKcVct8aVO+sSRiGMc6fLf72du3d92/uY63YPdEA== dependencies: minimatch "^3.0.4" @@ -8764,9 +8612,9 @@ run-async@^2.2.0: integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== run-parallel@^1.1.9: - version "1.1.9" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.9.tgz#c9dd3a7cf9f4b2c4b6244e173a6ed866e61dd679" - integrity sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q== + version "1.1.10" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.10.tgz#60a51b2ae836636c81377df16cb107351bcd13ef" + integrity sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw== run-queue@^1.0.0, run-queue@^1.0.3: version "1.0.3" @@ -8941,20 +8789,7 @@ signal-exit@^3.0.0, signal-exit@^3.0.2: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== -sinon@^9.0.1: - version "9.2.0" - resolved "https://registry.yarnpkg.com/sinon/-/sinon-9.2.0.tgz#1d333967e30023609f7347351ebc0dc964c0f3c9" - integrity sha512-eSNXz1XMcGEMHw08NJXSyTHIu6qTCOiN8x9ODACmZpNQpr0aXTBXBnI4xTzQzR+TEpOmLiKowGf9flCuKIzsbw== - dependencies: - "@sinonjs/commons" "^1.8.1" - "@sinonjs/fake-timers" "^6.0.1" - "@sinonjs/formatio" "^5.0.1" - "@sinonjs/samsam" "^5.2.0" - diff "^4.0.2" - nise "^4.0.4" - supports-color "^7.1.0" - -sinon@^9.2.1: +sinon@^9.0.1, sinon@^9.2.1: version "9.2.1" resolved "https://registry.yarnpkg.com/sinon/-/sinon-9.2.1.tgz#64cc88beac718557055bd8caa526b34a2231be6d" integrity sha512-naPfsamB5KEE1aiioaoqJ6MEhdUs/2vtI5w1hPAXX/UwvoPjXcwh1m5HiKx0HGgKR8lQSoFIgY5jM6KK8VrS9w== @@ -8967,7 +8802,7 @@ sinon@^9.2.1: nise "^4.0.4" supports-color "^7.1.0" -sisteransi@^1.0.4: +sisteransi@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== @@ -9058,9 +8893,9 @@ socks-proxy-agent@^4.0.0: socks "~2.3.2" socks@^2.3.3: - version "2.4.4" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.4.4.tgz#f1a3382e7814ae28c97bb82a38bc1ac24b21cca2" - integrity sha512-7LmHN4IHj1Vpd/k8D872VGCHJ6yIVyeFkfIBExRmGPYQ/kdUkpdg9eKh9oOzYYYKQhuxavayJHTnmBG+EzluUA== + version "2.5.0" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.5.0.tgz#3a7c286db114f67864a4bd8b4207a91d1db3d6db" + integrity sha512-00OqQHp5SCbwm9ecOMJj9aQtMSjwi1uVuGQoxnpKCS50VKZcOZ8z11CTKypmR8sEy7nZimy/qXY7rYJYbRlXmA== dependencies: ip "^1.1.5" smart-buffer "^4.1.0" @@ -9232,14 +9067,16 @@ ssri@^6.0.0, ssri@^6.0.1: figgy-pudding "^3.5.1" stack-utils@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8" - integrity sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA== + version "1.0.3" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.3.tgz#db7a475733b5b8bf6521907b18891d29006f7751" + integrity sha512-WldO+YmqhEpjp23eHZRhOT1NQF51STsbxZ+/AdpFD+EhheFxAe5d0WoK4DQVJkSHacPrJJX3OqRAl9CgHf78pg== + dependencies: + escape-string-regexp "^2.0.0" stack-utils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.2.tgz#5cf48b4557becb4638d0bc4f21d23f5d19586593" - integrity sha512-0H7QK2ECz3fyZMzQ8rH0j2ykpfbnd20BFtfg/SqVC2+sCTtcw0aDTGB7dk+de4U4uUeuz6nOtJcrkFFLG1B0Rg== + version "2.0.3" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.3.tgz#cd5f030126ff116b78ccb3c027fe302713b61277" + integrity sha512-gL//fkxfWUsIlFL2Tl42Cl6+HFALEaB1FU76I/Fy+oZjRreP7OPMXFlGbxM7NQsI0ZpUfw76sHnv0WNYuTb7Iw== dependencies: escape-string-regexp "^2.0.0" @@ -9353,20 +9190,20 @@ string.prototype.repeat@^0.2.0: integrity sha1-q6Nt4I3O5qWjN9SbLqHaGyj8Ds8= string.prototype.trimend@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913" - integrity sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g== + version "1.0.2" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.2.tgz#6ddd9a8796bc714b489a3ae22246a208f37bfa46" + integrity sha512-8oAG/hi14Z4nOVP0z6mdiVZ/wqjDtWSLygMigTzAb+7aPEDTleeFf+WrF+alzecxIRkckkJVn+dTlwzJXORATw== dependencies: define-properties "^1.1.3" - es-abstract "^1.17.5" + es-abstract "^1.18.0-next.1" string.prototype.trimstart@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54" - integrity sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw== + version "1.0.2" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.2.tgz#22d45da81015309cd0cdd79787e8919fc5c613e7" + integrity sha512-7F6CdBTl5zyu30BJFdzSTlSlLPwODC23Od+iLoVH8X6+3fvDPPuBVVj9iaB1GOsSTSIgVfsfm27R2FGrAPznWg== dependencies: define-properties "^1.1.3" - es-abstract "^1.17.5" + es-abstract "^1.18.0-next.1" string_decoder@^1.1.1: version "1.3.0" @@ -9931,14 +9768,14 @@ tsconfig-paths@^3.9.0: strip-bom "^3.0.0" tslib@^1.8.1, tslib@^1.9.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" - integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== tslib@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.1.tgz#410eb0d113e5b6356490eec749603725b021b43e" - integrity sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ== + version "2.0.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.3.tgz#8e0741ac45fc0c226e58a17bfc3e64b9bc6ca61c" + integrity sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ== tsutils@^3.17.1: version "3.17.1" @@ -9989,9 +9826,9 @@ type-fest@^0.13.1: integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg== type-fest@^0.18.0: - version "0.18.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.0.tgz#2edfa6382d48653707344f7fccdb0443d460e8d6" - integrity sha512-fbDukFPnJBdn2eZ3RR+5mK2slHLFd6gYHY7jna1KWWy4Yr4XysHuCdXRzy+RiG/HwG4WJat00vdC2UHky5eKiQ== + version "0.18.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" + integrity sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw== type-fest@^0.3.0: version "0.3.1" @@ -10047,9 +9884,9 @@ typescript@~3.8.3: integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== uglify-js@^3.1.4: - version "3.11.0" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.11.0.tgz#67317658d76c21e0e54d3224aee2df4ee6c3e1dc" - integrity sha512-e1KQFRCpOxnrJsJVqDUCjURq+wXvIn7cK2sRAx9XL3HYLL9aezOP4Pb1+Y3/o693EPk111Yj2Q+IUXxcpHlygQ== + version "3.11.6" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.11.6.tgz#144b50d3e05eadd3ad4dd047c60ca541a8cd4e9c" + integrity sha512-oASI1FOJ7BBFkSCNDZ446EgkSuHkOZBuqRFrwXIKWCoXw8ZXQETooTQjkAcBS03Acab7ubCKsXnwuV2svy061g== uid-number@0.0.6: version "0.0.6" @@ -10115,6 +9952,11 @@ universalify@^1.0.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d" integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug== +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + unpipe@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" @@ -10191,9 +10033,9 @@ uuid@^8.3.0, uuid@^8.3.1: integrity sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg== v8-compile-cache@^2.0.3: - version "2.1.1" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz#54bc3cdd43317bca91e35dcaf305b1a7237de745" - integrity sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ== + version "2.2.0" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz#9471efa3ef9128d2f7c6a7ca39c4dd6b5055b132" + integrity sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q== v8-to-istanbul@^7.0.0: version "7.0.0" @@ -10298,9 +10140,9 @@ whatwg-url@^7.0.0: webidl-conversions "^4.0.2" whatwg-url@^8.0.0: - version "8.3.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.3.0.tgz#d1e11e565334486cdb280d3101b9c3fd1c867582" - integrity sha512-BQRf/ej5Rp3+n7k0grQXZj9a1cHtsp4lqj01p59xBWFKdezR8sO37XnpafwNqiFac/v2Il12EIMjX/Y4VZtT8Q== + version "8.4.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.4.0.tgz#50fb9615b05469591d2b2bd6dfaed2942ed72837" + integrity sha512-vwTUFf6V4zhcPkWp/4CQPr1TW9Ml6SF4lVyaIMBdJw5i6qUUJ1QWM4Z6YYVkfka0OUIzVo/0aNtGVGk256IKWw== dependencies: lodash.sortby "^4.7.0" tr46 "^2.0.2" @@ -10473,9 +10315,9 @@ write@1.0.3: mkdirp "^0.5.1" ws@^7.2.3: - version "7.3.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.3.1.tgz#d0547bf67f7ce4f12a72dfe31262c68d7dc551c8" - integrity sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA== + version "7.4.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.0.tgz#a5dd76a24197940d4a8bb9e0e152bb4503764da7" + integrity sha512-kyFwXuV/5ymf+IXhS6f0+eAFvydbaBW3zjpT6hUdAh/hbVjTIB5EHBGi0bPoCLSK2wcuz3BrEkB9LrYv1Nm4NQ== xml-name-validator@^3.0.0: version "3.0.0" @@ -10566,9 +10408,9 @@ yapool@^1.0.0: integrity sha1-9pPymjFbUNmp2iZGp6ZkXJaYW2o= yargs-parser@20.x, yargs-parser@^20.2.2, yargs-parser@^20.2.3: - version "20.2.3" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.3.tgz#92419ba867b858c868acf8bae9bf74af0dd0ce26" - integrity sha512-emOFRT9WVHw03QSvN5qor9QQT9+sw5vwxfYweivSMHTcAXPefwVae2FjO7JJjj8hCE4CzPOPeFM83VwT29HCww== + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== yargs-parser@^13.0.0, yargs-parser@^13.1.2: version "13.1.2" @@ -10644,7 +10486,7 @@ yargs@^15.0.2, yargs@^15.3.1, yargs@^15.4.1: y18n "^4.0.0" yargs-parser "^18.1.2" -yargs@^16.0.3, yargs@^16.1.0, yargs@^16.1.1: +yargs@^16.0.3, yargs@^16.1.1: version "16.1.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.1.1.tgz#5a4a095bd1ca806b0a50d0c03611d38034d219a1" integrity sha512-hAD1RcFP/wfgfxgMVswPE+z3tlPFtxG8/yWUrG2i17sTWGCGqWnxKcLTF4cUKDUK8fzokwsmO9H0TDkRbMHy8w== From 3c5c2f415dc1d8f2f5b4fe2e7668b76f155675c6 Mon Sep 17 00:00:00 2001 From: Rajeesh C V Date: Tue, 1 Dec 2020 02:11:08 +0530 Subject: [PATCH 241/314] fix(codebuild): Project lacks permissions for SSM ParameterStore environment variables (#11770) Pipeline build fails when the environment variable is loaded from SSM Parameter Store. Closes #11769 --------------- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-codebuild/lib/project.ts | 25 +++ .../aws-codebuild/test/test.project.ts | 154 +++++++++++++++++- 2 files changed, 178 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-codebuild/lib/project.ts b/packages/@aws-cdk/aws-codebuild/lib/project.ts index 7810c82287f4c..75c3b79f76b66 100644 --- a/packages/@aws-cdk/aws-codebuild/lib/project.ts +++ b/packages/@aws-cdk/aws-codebuild/lib/project.ts @@ -792,6 +792,7 @@ export class Project extends ProjectBase { this.projectName = this.getResourceNameAttribute(resource.ref); this.addToRolePolicy(this.createLoggingPermission()); + this.addParameterStorePermission(props); // add permissions to create and use test report groups // with names starting with the project's name, // unless the customer explicitly opts out of it @@ -923,6 +924,30 @@ export class Project extends ProjectBase { }); } + private addParameterStorePermission(props: ProjectProps) { + if (!props.environmentVariables) { + return; + } + + const resources = Object.values(props.environmentVariables) + .filter(envVariable => envVariable.type === BuildEnvironmentVariableType.PARAMETER_STORE) + .map(envVariable => Stack.of(this).formatArn({ + service: 'ssm', + resource: 'parameter', + sep: ':', + resourceName: envVariable.value, + })); + + if (resources.length === 0) { + return; + } + + this.addToRolePolicy(new iam.PolicyStatement({ + actions: ['ssm:GetParameters'], + resources, + })); + } + private renderEnvironment( env: BuildEnvironment = {}, projectVars: { [name: string]: BuildEnvironmentVariable } = {}): CfnProject.EnvironmentProperty { diff --git a/packages/@aws-cdk/aws-codebuild/test/test.project.ts b/packages/@aws-cdk/aws-codebuild/test/test.project.ts index 439427588afdb..ba7b804d779f1 100644 --- a/packages/@aws-cdk/aws-codebuild/test/test.project.ts +++ b/packages/@aws-cdk/aws-codebuild/test/test.project.ts @@ -1,4 +1,4 @@ -import { countResources, expect, haveResource, haveResourceLike, objectLike, not, ResourcePart } from '@aws-cdk/assert'; +import { countResources, expect, haveResource, haveResourceLike, objectLike, not, ResourcePart, arrayWith } from '@aws-cdk/assert'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as iam from '@aws-cdk/aws-iam'; import * as logs from '@aws-cdk/aws-logs'; @@ -738,4 +738,156 @@ export = { test.done(); }, }, + + 'EnvironmentVariables': { + 'can use environment variables from parameter store'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + new codebuild.Project(stack, 'Project', { + source: codebuild.Source.s3({ + bucket: new s3.Bucket(stack, 'Bucket'), + path: 'path', + }), + environment: { + buildImage: codebuild.LinuxBuildImage.fromDockerRegistry('myimage'), + }, + environmentVariables: { + 'ENV_VAR1': { + type: codebuild.BuildEnvironmentVariableType.PARAMETER_STORE, + value: '/params/param1', + }, + }, + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::CodeBuild::Project', { + Environment: objectLike({ + EnvironmentVariables: [{ + Name: 'ENV_VAR1', + Type: 'PARAMETER_STORE', + Value: '/params/param1', + }], + }), + })); + + test.done(); + }, + + + 'grant read permission for parameter store variables'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + new codebuild.Project(stack, 'Project', { + source: codebuild.Source.s3({ + bucket: new s3.Bucket(stack, 'Bucket'), + path: 'path', + }), + environment: { + buildImage: codebuild.LinuxBuildImage.fromDockerRegistry('myimage'), + }, + environmentVariables: { + 'ENV_VAR1': { + type: codebuild.BuildEnvironmentVariableType.PARAMETER_STORE, + value: '/params/param1', + }, + 'ENV_VAR2': { + type: codebuild.BuildEnvironmentVariableType.PARAMETER_STORE, + value: '/params/param2', + }, + }, + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::IAM::Policy', { + 'PolicyDocument': { + 'Statement': arrayWith(objectLike({ + 'Action': 'ssm:GetParameters', + 'Effect': 'Allow', + 'Resource': [{ + 'Fn::Join': [ + '', + [ + 'arn:', + { + Ref: 'AWS::Partition', + }, + ':ssm:', + { + Ref: 'AWS::Region', + }, + ':', + { + Ref: 'AWS::AccountId', + }, + ':parameter:/params/param1', + ], + ], + }, + { + 'Fn::Join': [ + '', + [ + 'arn:', + { + Ref: 'AWS::Partition', + }, + ':ssm:', + { + Ref: 'AWS::Region', + }, + ':', + { + Ref: 'AWS::AccountId', + }, + ':parameter:/params/param2', + ], + ], + }], + })), + }, + })); + + + test.done(); + }, + + 'should not grant read permission when variables are not from parameter store'(test: Test) { + + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + new codebuild.Project(stack, 'Project', { + source: codebuild.Source.s3({ + bucket: new s3.Bucket(stack, 'Bucket'), + path: 'path', + }), + environment: { + buildImage: codebuild.LinuxBuildImage.fromDockerRegistry('myimage'), + }, + environmentVariables: { + 'ENV_VAR1': { + type: codebuild.BuildEnvironmentVariableType.PLAINTEXT, + value: 'var1-value', + }, + }, + }); + + // THEN + expect(stack).notTo(haveResourceLike('AWS::IAM::Policy', { + 'PolicyDocument': { + 'Statement': arrayWith(objectLike({ + 'Action': 'ssm:GetParameters', + 'Effect': 'Allow', + })), + }, + })); + + test.done(); + }, + }, }; From 2f0a598720f7ecf4dfea7dde97182940fcbe8d9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20G=C3=B3mez?= Date: Mon, 30 Nov 2020 22:09:49 +0100 Subject: [PATCH 242/314] docs(glue): add missing comma to fix sample code in README (#11748) The documentation for aws-glue contains sample code that doesn't work. Applied pull request corrects the code snippet. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-glue/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-glue/README.md b/packages/@aws-cdk/aws-glue/README.md index d7bb3cad73639..15f9e3494d7c1 100644 --- a/packages/@aws-cdk/aws-glue/README.md +++ b/packages/@aws-cdk/aws-glue/README.md @@ -40,7 +40,7 @@ new glue.Table(stack, 'MyTable', { name: 'col2', type: glue.Schema.array(Schema.STRING), comment: 'col2 is an array of strings' // comment is optional - }] + }], dataFormat: glue.DataFormat.JSON }); ``` From 5fb0ea6276db26f76b99b1826d742eae979f4ed9 Mon Sep 17 00:00:00 2001 From: Ana Danilochkina Date: Tue, 1 Dec 2020 06:48:04 +0000 Subject: [PATCH 243/314] fix(stepfunctions-tasks): instance type cannot be provided to SageMakerCreateEndpointConfig as input path (#11749) Closes #11605 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../lib/sagemaker/create-endpoint-config.ts | 3 ++- .../test/sagemaker/create-endpoint-config.test.ts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/sagemaker/create-endpoint-config.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/sagemaker/create-endpoint-config.ts index 8fe5749506c94..a7ff0134e1827 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/sagemaker/create-endpoint-config.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/sagemaker/create-endpoint-config.ts @@ -80,7 +80,8 @@ export class SageMakerCreateEndpointConfig extends sfn.TaskStateBase { KmsKeyId: this.props.kmsKey?.keyId, ProductionVariants: this.props.productionVariants.map((variant) => ({ InitialInstanceCount: variant.initialInstanceCount ? variant.initialInstanceCount : 1, - InstanceType: `ml.${variant.instanceType}`, + InstanceType: sfn.JsonPath.isEncodedJsonPath(variant.instanceType.toString()) + ? variant.instanceType.toString() : `ml.${variant.instanceType}`, ModelName: variant.modelName, VariantName: variant.variantName, AcceleratorType: variant.acceleratorType, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/create-endpoint-config.test.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/create-endpoint-config.test.ts index f2c24889d1d0e..c59eb59eb5a83 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/create-endpoint-config.test.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/create-endpoint-config.test.ts @@ -69,7 +69,7 @@ test('create complex endpoint config', () => { { initialInstanceCount: 1, initialVariantWeight: 0.2, - instanceType: ec2.InstanceType.of(ec2.InstanceClass.M4, ec2.InstanceSize.XLARGE), + instanceType: new ec2.InstanceType(sfn.JsonPath.stringAt('$.Endpoint.InstanceType')), modelName: sfn.JsonPath.stringAt('$.Endpoint.Model'), variantName: 'awesome-variant-2', }], @@ -110,7 +110,7 @@ test('create complex endpoint config', () => { { 'InitialInstanceCount': 1, 'InitialVariantWeight': 0.2, - 'InstanceType': 'ml.m4.xlarge', + 'InstanceType.$': '$.Endpoint.InstanceType', 'ModelName.$': '$.Endpoint.Model', 'VariantName': 'awesome-variant-2', }], From 3cbc7fa58a69330b82935f9d464446fb2d410344 Mon Sep 17 00:00:00 2001 From: Jonathan Goldwasser Date: Tue, 1 Dec 2020 11:12:49 +0100 Subject: [PATCH 244/314] fix(core): regression: source directory is fingerprinted even if bundling is skipped (#11440) If the asset uses OUTPUT or BUNDLE it's generally because its source is a very large directory. This is the case for the `NodejsFunction` which mounts the project root (along with the `node_modules` folder!). Use a custom hash in this case when skipping bundling. Otherwise running `cdk ls` can result in heavy fingerprinting operations (again this is the case for the `NodejsFunction`) and can be much slower than running `cdk synth` or `cdk diff`, making it pointless to skip bundling. Regression introduced in #11008 (https://github.com/aws/aws-cdk/pull/11008/files#diff-62eef996be8abeb157518522c3cbf84a33dd4751c103304df87b04eb6d7bbab6L160) Before #11008: https://github.com/aws/aws-cdk/blob/c1453147e7c484c54f1380d2fa9ba0cdf2859002/packages/%40aws-cdk/core/lib/asset-staging.ts#L159-L160 Closes #11459 Closes #11460 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/core/lib/asset-staging.ts | 15 +++++++++++---- packages/@aws-cdk/core/test/staging.test.ts | 3 ++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/packages/@aws-cdk/core/lib/asset-staging.ts b/packages/@aws-cdk/core/lib/asset-staging.ts index 047462ddeca71..dfb9768671d74 100644 --- a/packages/@aws-cdk/core/lib/asset-staging.ts +++ b/packages/@aws-cdk/core/lib/asset-staging.ts @@ -8,6 +8,7 @@ import * as minimatch from 'minimatch'; import { AssetHashType, AssetOptions } from './assets'; import { BundlingOptions } from './bundling'; import { FileSystem, FingerprintOptions } from './fs'; +import { Names } from './names'; import { Cache } from './private/cache'; import { Stack } from './stack'; import { Stage } from './stage'; @@ -115,7 +116,7 @@ export class AssetStaging extends CoreConstruct { * * Will not be used literally, always hashed later on. */ - private readonly customSourceFingerprint?: string; + private customSourceFingerprint?: string; private readonly cacheKey: string; @@ -239,10 +240,16 @@ export class AssetStaging extends CoreConstruct { */ private stageByBundling(bundling: BundlingOptions, skip: boolean): StagedAsset { if (skip) { - // We should have bundled, but didn't to save time. Still pretend to have a hash, - // but always base it on sources. + // We should have bundled, but didn't to save time. Still pretend to have a hash. + // If the asset uses OUTPUT or BUNDLE, we use a CUSTOM hash to avoid fingerprinting + // a potentially very large source directory. Other hash types are kept the same. + let hashType = this.hashType; + if (hashType === AssetHashType.OUTPUT || hashType === AssetHashType.BUNDLE) { + this.customSourceFingerprint = Names.uniqueId(this); + hashType = AssetHashType.CUSTOM; + } return { - assetHash: this.calculateHash(AssetHashType.SOURCE), + assetHash: this.calculateHash(hashType, bundling), stagedPath: this.sourcePath, }; } diff --git a/packages/@aws-cdk/core/test/staging.test.ts b/packages/@aws-cdk/core/test/staging.test.ts index 31b00700d7068..347c5fcea3b63 100644 --- a/packages/@aws-cdk/core/test/staging.test.ts +++ b/packages/@aws-cdk/core/test/staging.test.ts @@ -731,6 +731,7 @@ nodeunitShim({ test.equal(asset.sourcePath, directory); test.equal(asset.stagedPath, directory); test.equal(asset.relativeStagedPath(stack), directory); + test.equal(asset.assetHash, 'f66d7421aa2d044a6c1f60ddfc76dc78571fcd8bd228eb48eb394e2dbad94a5c'); test.done(); }, @@ -804,4 +805,4 @@ function readDockerStubInput() { // Concatenated docker inputs since last teardown function readDockerStubInputConcat() { return readAndCleanDockerStubInput(STUB_INPUT_CONCAT_FILE); -} \ No newline at end of file +} From 8f1af0d62c451bc7e6acaa8f88852b91b07f314f Mon Sep 17 00:00:00 2001 From: Tom Denley Date: Tue, 1 Dec 2020 11:00:13 +0000 Subject: [PATCH 245/314] chore(bootstrap): parameter property type should be a string (#11546) The type of the CdkBootstrapVersion value should be a String. This addresses cfn-lint error: E3012 Property Resources/CdkBootstrapVersion/Properties/Value should be of type String partially fixes: #11545 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml b/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml index d14046b5f0fd1..f7a29c4c5d094 100644 --- a/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml +++ b/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml @@ -387,7 +387,7 @@ Resources: Type: String Name: Fn::Sub: '/cdk-bootstrap/${Qualifier}/version' - Value: 4 + Value: '4' Outputs: BucketName: Description: The name of the S3 bucket owned by the CDK toolkit stack From 0d47c499311902f58243cb1d80bdba5dc67103f9 Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Tue, 1 Dec 2020 15:21:26 +0000 Subject: [PATCH 246/314] chore(cfnspec): add missing CodeArtifact properties (#11804) The spec for CodeArtifact is currently missing one required property (`Repository.domainName`) and two other optional properties. This patch adds the missing properties until the spec is updated. fixes #11790 related #11569 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../spec-source/710_CodeArtifact_patch.json | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 packages/@aws-cdk/cfnspec/spec-source/710_CodeArtifact_patch.json diff --git a/packages/@aws-cdk/cfnspec/spec-source/710_CodeArtifact_patch.json b/packages/@aws-cdk/cfnspec/spec-source/710_CodeArtifact_patch.json new file mode 100644 index 0000000000000..63a32c327d7a9 --- /dev/null +++ b/packages/@aws-cdk/cfnspec/spec-source/710_CodeArtifact_patch.json @@ -0,0 +1,49 @@ +{ + "ResourceTypes": { + "AWS::CodeArtifact::Domain": { + "patch": { + "description": "Adds missing properties for AWS::CodeArtifact::Domain", + "operations": [ + { + "op": "add", + "path": "/Properties/EncryptionKey", + "value": { + "Documentation": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codeartifact-domain.html#cfn-codeartifact-domain-encryptionkey", + "PrimitiveType": "String", + "UpdateType": "Immutable", + "Required": false + } + } + ] + } + }, + "AWS::CodeArtifact::Repository": { + "patch": { + "description": "Adds missing properties for AWS::CodeArtifact::Repository", + "operations": [ + { + "op": "add", + "path": "/Properties/DomainName", + "value": { + "Documentation": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codeartifact-repository.html#cfn-codeartifact-repository-domainname", + "PrimitiveType": "String", + "UpdateType": "Immutable", + "Required": true + } + }, + { + "op": "add", + "path": "/Properties/DomainOwner", + "value": { + "Documentation": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codeartifact-repository.html#cfn-codeartifact-repository-domainowner", + "PrimitiveType": "String", + "UpdateType": "Immutable", + "Required": false + } + } + ] + } + } + } +} + From 80e5d90c0cf7a5ed8f8bb1c37768be34efb32e01 Mon Sep 17 00:00:00 2001 From: Daniel <3842788+dscpinheiro@users.noreply.github.com> Date: Tue, 1 Dec 2020 16:15:01 +0000 Subject: [PATCH 247/314] fix(kinesis): Unable to use retention periods longer than 7 days (#11798) Closes https://github.com/aws/aws-cdk/issues/11796 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-kinesis/lib/stream.ts | 4 ++-- packages/@aws-cdk/aws-kinesis/test/stream.test.ts | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/@aws-cdk/aws-kinesis/lib/stream.ts b/packages/@aws-cdk/aws-kinesis/lib/stream.ts index 90263b9d0286a..a0e7acef57594 100644 --- a/packages/@aws-cdk/aws-kinesis/lib/stream.ts +++ b/packages/@aws-cdk/aws-kinesis/lib/stream.ts @@ -263,8 +263,8 @@ export class Stream extends StreamBase { const shardCount = props.shardCount || 1; const retentionPeriodHours = props.retentionPeriod?.toHours() ?? 24; if (!Token.isUnresolved(retentionPeriodHours)) { - if (retentionPeriodHours < 24 || retentionPeriodHours > 168) { - throw new Error(`retentionPeriod must be between 24 and 168 hours. Received ${retentionPeriodHours}`); + if (retentionPeriodHours < 24 || retentionPeriodHours > 8760) { + throw new Error(`retentionPeriod must be between 24 and 8760 hours. Received ${retentionPeriodHours}`); } } diff --git a/packages/@aws-cdk/aws-kinesis/test/stream.test.ts b/packages/@aws-cdk/aws-kinesis/test/stream.test.ts index c4b5556ce3c99..b9bcf8b92bca8 100644 --- a/packages/@aws-cdk/aws-kinesis/test/stream.test.ts +++ b/packages/@aws-cdk/aws-kinesis/test/stream.test.ts @@ -250,18 +250,18 @@ describe('Kinesis data streams', () => { }); }), - test('retention period must be between 24 and 168 hours', () => { + test('retention period must be between 24 and 8760 hours', () => { expect(() => { new Stream(new Stack(), 'MyStream', { - retentionPeriod: Duration.hours(169), + retentionPeriod: Duration.hours(8761), }); - }).toThrow(/retentionPeriod must be between 24 and 168 hours. Received 169/); + }).toThrow(/retentionPeriod must be between 24 and 8760 hours. Received 8761/); expect(() => { new Stream(new Stack(), 'MyStream', { retentionPeriod: Duration.hours(23), }); - }).toThrow(/retentionPeriod must be between 24 and 168 hours. Received 23/); + }).toThrow(/retentionPeriod must be between 24 and 8760 hours. Received 23/); }), test('uses Kinesis master key if MANAGED encryption type is provided', () => { @@ -1292,7 +1292,7 @@ describe('Kinesis data streams', () => { type: 'Number', default: 48, minValue: 24, - maxValue: 168, + maxValue: 8760, }); new Stream(stack, 'MyStream', { @@ -1304,7 +1304,7 @@ describe('Kinesis data streams', () => { myretentionperiod: { Type: 'Number', Default: 48, - MaxValue: 168, + MaxValue: 8760, MinValue: 24, }, }, From 02ced10739ecacc9ca39e9e0b563ddfbf5d0b245 Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Tue, 1 Dec 2020 16:53:53 +0000 Subject: [PATCH 248/314] feat(lambda): container images (#11809) Adds support for deploying ECR container images as Lambda function handlers. --- packages/@aws-cdk/aws-lambda/README.md | 26 +++ packages/@aws-cdk/aws-lambda/lib/code.ts | 174 +++++++++++++++++- packages/@aws-cdk/aws-lambda/lib/function.ts | 53 +++++- packages/@aws-cdk/aws-lambda/lib/handler.ts | 11 ++ .../@aws-cdk/aws-lambda/lib/image-function.ts | 71 +++++++ packages/@aws-cdk/aws-lambda/lib/index.ts | 2 + packages/@aws-cdk/aws-lambda/lib/runtime.ts | 5 + packages/@aws-cdk/aws-lambda/package.json | 14 +- .../@aws-cdk/aws-lambda/test/code.test.ts | 140 +++++++++++++- .../test/docker-lambda-handler/Dockerfile | 8 + .../test/docker-lambda-handler/app.ts | 9 + .../@aws-cdk/aws-lambda/test/function.test.ts | 140 ++++++++++++++ .../test/integ.lambda.docker.expected.json | 71 +++++++ .../aws-lambda/test/integ.lambda.docker.ts | 18 ++ .../490_Lambda_Containers_patch.json | 79 ++++++++ 15 files changed, 799 insertions(+), 22 deletions(-) create mode 100644 packages/@aws-cdk/aws-lambda/lib/handler.ts create mode 100644 packages/@aws-cdk/aws-lambda/lib/image-function.ts create mode 100644 packages/@aws-cdk/aws-lambda/test/docker-lambda-handler/Dockerfile create mode 100644 packages/@aws-cdk/aws-lambda/test/docker-lambda-handler/app.ts create mode 100644 packages/@aws-cdk/aws-lambda/test/integ.lambda.docker.expected.json create mode 100644 packages/@aws-cdk/aws-lambda/test/integ.lambda.docker.ts create mode 100644 packages/@aws-cdk/cfnspec/spec-source/490_Lambda_Containers_patch.json diff --git a/packages/@aws-cdk/aws-lambda/README.md b/packages/@aws-cdk/aws-lambda/README.md index 142508626a591..ea1d256c976bc 100644 --- a/packages/@aws-cdk/aws-lambda/README.md +++ b/packages/@aws-cdk/aws-lambda/README.md @@ -50,6 +50,32 @@ to our CDK project directory. This is especially important when we want to share this construct through a library. Different programming languages will have different techniques for bundling resources into libraries. +### Docker Images + +Lambda functions allow specifying their handlers within docker images. The docker +image can be an image from ECR or a local asset that the CDK will package and load +into ECR. + +The following `DockerImageFunction` construct uses a local folder with a +Dockerfile as the asset that will be used as the function handler. + +```ts +new lambda.DockerImageFunction(this, 'AssetFunction', { + code: DockerImageCode.fromAssetImage(path.join(__dirname, 'docker-handler')), +}); +``` + +You can also specify an image that already exists in ECR as the function handler. + +```ts +import * as ecr from '@aws-cdk/aws-ecr'; +const repo = new ecr.Repository(this, 'Repository'); + +new lambda.DockerImageFunction(this, 'ECRFunction', { + code: DockerImageCode.fromEcrImage(repo), +}); +``` + ### Execution Role Lambda functions assume an IAM role during execution. In CDK by default, Lambda diff --git a/packages/@aws-cdk/aws-lambda/lib/code.ts b/packages/@aws-cdk/aws-lambda/lib/code.ts index 263e67f415bd4..fef200a9a6c9c 100644 --- a/packages/@aws-cdk/aws-lambda/lib/code.ts +++ b/packages/@aws-cdk/aws-lambda/lib/code.ts @@ -1,10 +1,16 @@ +import * as ecr from '@aws-cdk/aws-ecr'; +import * as ecr_assets from '@aws-cdk/aws-ecr-assets'; +import * as iam from '@aws-cdk/aws-iam'; import * as s3 from '@aws-cdk/aws-s3'; import * as s3_assets from '@aws-cdk/aws-s3-assets'; import * as cdk from '@aws-cdk/core'; +/** + * Represents the Lambda Handler Code. + */ export abstract class Code { /** - * @returns `LambdaS3Code` associated with the specified S3 object. + * Lambda handler code as an S3 object. * @param bucket The S3 bucket * @param key The object key * @param objectVersion Optional S3 object version @@ -14,6 +20,7 @@ export abstract class Code { } /** + * DEPRECATED * @deprecated use `fromBucket` */ public static bucket(bucket: s3.IBucket, key: string, objectVersion?: string): S3Code { @@ -21,6 +28,7 @@ export abstract class Code { } /** + * Inline code for Lambda handler * @returns `LambdaInlineCode` with inline code. * @param code The actual handler code (limited to 4KiB) */ @@ -29,6 +37,7 @@ export abstract class Code { } /** + * DEPRECATED * @deprecated use `fromInline` */ public static inline(code: string): InlineCode { @@ -45,6 +54,7 @@ export abstract class Code { } /** + * DEPRECATED * @deprecated use `fromAsset` */ public static asset(path: string): AssetCode { @@ -62,12 +72,31 @@ export abstract class Code { } /** + * DEPRECATED * @deprecated use `fromCfnParameters` */ public static cfnParameters(props?: CfnParametersCodeProps): CfnParametersCode { return this.fromCfnParameters(props); } + /** + * Use an existing ECR image as the Lambda code. + * @param repository the ECR repository that the image is in + * @param props properties to further configure the selected image + */ + public static fromEcrImage(repository: ecr.IRepository, props?: EcrImageCodeProps) { + return new EcrImageCode(repository, props); + } + + /** + * Create an ECR image from the specified asset and bind it as the Lambda code. + * @param directory the directory from which the asset must be created + * @param props properties to further configure the selected image + */ + public static fromAssetImage(directory: string, props: AssetImageCodeProps = {}) { + return new AssetImageCode(directory, props); + } + /** * Determines whether this Code is inline code or not. * @@ -95,16 +124,54 @@ export abstract class Code { } } +/** + * Result of binding `Code` into a `Function`. + */ export interface CodeConfig { /** - * The location of the code in S3 (mutually exclusive with `inlineCode`). + * The location of the code in S3 (mutually exclusive with `inlineCode` and `image`). + * @default - code is not an s3 location */ readonly s3Location?: s3.Location; /** - * Inline code (mutually exclusive with `s3Location`). + * Inline code (mutually exclusive with `s3Location` and `image`). + * @default - code is not inline code */ readonly inlineCode?: string; + + /** + * Docker image configuration (mutually exclusive with `s3Location` and `inlineCode`). + * @default - code is not an ECR container image + */ + readonly image?: CodeImageConfig; +} + +/** + * Result of the bind when an ECR image is used. + */ +export interface CodeImageConfig { + /** + * URI to the Docker image. + */ + readonly imageUri: string; + + /** + * Specify or override the CMD on the specified Docker image or Dockerfile. + * This needs to be in the 'exec form', viz., `[ 'executable', 'param1', 'param2' ]`. + * @see https://docs.docker.com/engine/reference/builder/#cmd + * @default - use the CMD specified in the docker image or Dockerfile. + */ + readonly cmd?: string[]; + + /** + * Specify or override the ENTRYPOINT on the specified Docker image or Dockerfile. + * An ENTRYPOINT allows you to configure a container that will run as an executable. + * This needs to be in the 'exec form', viz., `[ 'executable', 'param1', 'param2' ]`. + * @see https://docs.docker.com/engine/reference/builder/#entrypoint + * @default - use the ENTRYPOINT in the docker image or Dockerfile. + */ + readonly entrypoint?: string[]; } /** @@ -313,3 +380,104 @@ export class CfnParametersCode extends Code { } } } + +/** + * Properties to initialize a new EcrImageCode + */ +export interface EcrImageCodeProps { + /** + * Specify or override the CMD on the specified Docker image or Dockerfile. + * This needs to be in the 'exec form', viz., `[ 'executable', 'param1', 'param2' ]`. + * @see https://docs.docker.com/engine/reference/builder/#cmd + * @default - use the CMD specified in the docker image or Dockerfile. + */ + readonly cmd?: string[]; + + /** + * Specify or override the ENTRYPOINT on the specified Docker image or Dockerfile. + * An ENTRYPOINT allows you to configure a container that will run as an executable. + * This needs to be in the 'exec form', viz., `[ 'executable', 'param1', 'param2' ]`. + * @see https://docs.docker.com/engine/reference/builder/#entrypoint + * @default - use the ENTRYPOINT in the docker image or Dockerfile. + */ + readonly entrypoint?: string[]; + + /** + * The image tag to use when pulling the image from ECR. + * @default 'latest' + */ + readonly tag?: string; +} + +/** + * Represents a Docker image in ECR that can be bound as Lambda Code. + */ +export class EcrImageCode extends Code { + public readonly isInline: boolean = false; + + constructor(private readonly repository: ecr.IRepository, private readonly props: EcrImageCodeProps = {}) { + super(); + } + + public bind(_: cdk.Construct): CodeConfig { + this.repository.grantPull(new iam.ServicePrincipal('lambda.amazonaws.com')); + + return { + image: { + imageUri: this.repository.repositoryUriForTag(this.props?.tag ?? 'latest'), + cmd: this.props.cmd, + entrypoint: this.props.entrypoint, + }, + }; + } +} + +/** + * Properties to initialize a new AssetImage + */ +export interface AssetImageCodeProps extends ecr_assets.DockerImageAssetOptions { + /** + * Specify or override the CMD on the specified Docker image or Dockerfile. + * This needs to be in the 'exec form', viz., `[ 'executable', 'param1', 'param2' ]`. + * @see https://docs.docker.com/engine/reference/builder/#cmd + * @default - use the CMD specified in the docker image or Dockerfile. + */ + readonly cmd?: string[]; + + /** + * Specify or override the ENTRYPOINT on the specified Docker image or Dockerfile. + * An ENTRYPOINT allows you to configure a container that will run as an executable. + * This needs to be in the 'exec form', viz., `[ 'executable', 'param1', 'param2' ]`. + * @see https://docs.docker.com/engine/reference/builder/#entrypoint + * @default - use the ENTRYPOINT in the docker image or Dockerfile. + */ + readonly entrypoint?: string[]; +} + +/** + * Represents an ECR image that will be constructed from the specified asset and can be bound as Lambda code. + */ +export class AssetImageCode extends Code { + public readonly isInline: boolean = false; + + constructor(private readonly directory: string, private readonly props: AssetImageCodeProps) { + super(); + } + + public bind(scope: cdk.Construct): CodeConfig { + const asset = new ecr_assets.DockerImageAsset(scope, 'AssetImage', { + directory: this.directory, + ...this.props, + }); + + asset.repository.grantPull(new iam.ServicePrincipal('lambda.amazonaws.com')); + + return { + image: { + imageUri: asset.imageUri, + entrypoint: this.props.entrypoint, + cmd: this.props.cmd, + }, + }; + } +} diff --git a/packages/@aws-cdk/aws-lambda/lib/function.ts b/packages/@aws-cdk/aws-lambda/lib/function.ts index d2000fd32d342..d69a76c0639a5 100644 --- a/packages/@aws-cdk/aws-lambda/lib/function.ts +++ b/packages/@aws-cdk/aws-lambda/lib/function.ts @@ -12,6 +12,7 @@ import { IEventSource } from './event-source'; import { FileSystem } from './filesystem'; import { FunctionAttributes, FunctionBase, IFunction } from './function-base'; import { calculateFunctionHash, trimFromStart } from './function-hash'; +import { Handler } from './handler'; import { Version, VersionOptions } from './lambda-version'; import { CfnFunction } from './lambda.generated'; import { ILayerVersion } from './layers'; @@ -288,6 +289,8 @@ export interface FunctionProps extends FunctionOptions { * The runtime environment for the Lambda function that you are uploading. * For valid values, see the Runtime property in the AWS Lambda Developer * Guide. + * + * Use `Runtime.FROM_IMAGE` when when defining a function from a Docker image. */ readonly runtime: Runtime; @@ -304,6 +307,8 @@ export interface FunctionProps extends FunctionOptions { * namespaces and other qualifiers, depending on the runtime. * For more information, see https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-features.html#gettingstarted-features-programmingmodel. * + * Use `Handler.FROM_IMAGE` when defining a function from a Docker image. + * * NOTE: If you specify your source code as inline text by specifying the * ZipFile property within the Code property, specify index.function_name as * the handler. @@ -557,7 +562,7 @@ export class Function extends FunctionBase { } const code = props.code.bind(this); - verifyCodeConfig(code, props.runtime); + verifyCodeConfig(code, props); let profilingGroupEnvironmentVariables: { [key: string]: string } = {}; if (props.profilingGroup && props.profiling !== false) { @@ -590,6 +595,8 @@ export class Function extends FunctionBase { this.deadLetterQueue = this.buildDeadLetterQueue(props); + const UNDEFINED_MARKER = '$$$undefined'; + const resource: CfnFunction = new CfnFunction(this, 'Resource', { functionName: this.physicalName, description: props.description, @@ -598,11 +605,13 @@ export class Function extends FunctionBase { s3Key: code.s3Location && code.s3Location.objectKey, s3ObjectVersion: code.s3Location && code.s3Location.objectVersion, zipFile: code.inlineCode, + imageUri: code.image?.imageUri, }, layers: Lazy.list({ produce: () => this.layers.map(layer => layer.layerVersionArn) }, { omitEmpty: true }), - handler: props.handler, + handler: props.handler === Handler.FROM_IMAGE ? UNDEFINED_MARKER : props.handler, timeout: props.timeout && props.timeout.toSeconds(), - runtime: props.runtime.name, + packageType: props.runtime === Runtime.FROM_IMAGE ? 'Image' : undefined, + runtime: props.runtime === Runtime.FROM_IMAGE ? UNDEFINED_MARKER : props.runtime?.name, role: this.role.roleArn, // Uncached because calling '_checkEdgeCompatibility', which gets called in the resolve of another // Token, actually *modifies* the 'environment' map. @@ -612,8 +621,21 @@ export class Function extends FunctionBase { deadLetterConfig: this.buildDeadLetterConfig(this.deadLetterQueue), tracingConfig: this.buildTracingConfig(props), reservedConcurrentExecutions: props.reservedConcurrentExecutions, + imageConfig: undefinedIfNoKeys({ + command: code.image?.cmd, + entryPoint: code.image?.entrypoint, + }), }); + // since patching the CFN spec to make Runtime and Handler optional causes a + // change in the order of the JSON keys, which results in a change of + // function hash (and invalidation of all lambda functions everywhere), we + // are using a marker to indicate this fields needs to be erased using an + // escape hatch. this should be fixed once the new spec is published and a + // patch is no longer needed. + if (resource.runtime === UNDEFINED_MARKER) { resource.addPropertyOverride('Runtime', undefined); } + if (resource.handler === UNDEFINED_MARKER) { resource.addPropertyOverride('Handler', undefined); } + resource.node.addDependency(this.role); this.functionName = this.getResourceNameAttribute(resource.ref); @@ -966,14 +988,29 @@ function extractNameFromArn(arn: string) { return Fn.select(6, Fn.split(':', arn)); } -export function verifyCodeConfig(code: CodeConfig, runtime: Runtime) { +export function verifyCodeConfig(code: CodeConfig, props: FunctionProps) { // mutually exclusive - if ((!code.inlineCode && !code.s3Location) || (code.inlineCode && code.s3Location)) { - throw new Error('lambda.Code must specify one of "inlineCode" or "s3Location" but not both'); + const codeType = [code.inlineCode, code.s3Location, code.image]; + + if (codeType.filter(x => !!x).length !== 1) { + throw new Error('lambda.Code must specify exactly one of: "inlineCode", "s3Location", or "image"'); + } + + if (!!code.image === (props.handler !== Handler.FROM_IMAGE)) { + throw new Error('handler must be `Handler.FROM_IMAGE` when using image asset for Lambda function'); + } + + if (!!code.image === (props.runtime !== Runtime.FROM_IMAGE)) { + throw new Error('runtime must be `Runtime.FROM_IMAGE` when using image asset for Lambda function'); } // if this is inline code, check that the runtime supports - if (code.inlineCode && !runtime.supportsInlineCode) { - throw new Error(`Inline source not allowed for ${runtime.name}`); + if (code.inlineCode && !props.runtime.supportsInlineCode) { + throw new Error(`Inline source not allowed for ${props.runtime!.name}`); } } + +function undefinedIfNoKeys(struct: A): A | undefined { + const allUndefined = Object.values(struct).every(val => val === undefined); + return allUndefined ? undefined : struct; +} diff --git a/packages/@aws-cdk/aws-lambda/lib/handler.ts b/packages/@aws-cdk/aws-lambda/lib/handler.ts new file mode 100644 index 0000000000000..7288345f5fad5 --- /dev/null +++ b/packages/@aws-cdk/aws-lambda/lib/handler.ts @@ -0,0 +1,11 @@ +/** + * Lambda function handler + */ +export class Handler { + /** + * A special handler when the function handler is part of a Docker image. + */ + public static readonly FROM_IMAGE = 'FROM_IMAGE'; + + private constructor() {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/lib/image-function.ts b/packages/@aws-cdk/aws-lambda/lib/image-function.ts new file mode 100644 index 0000000000000..b53b6216894bf --- /dev/null +++ b/packages/@aws-cdk/aws-lambda/lib/image-function.ts @@ -0,0 +1,71 @@ +import * as ecr from '@aws-cdk/aws-ecr'; +import { Construct } from 'constructs'; +import { AssetImageCode, AssetImageCodeProps, EcrImageCode, EcrImageCodeProps, Code } from './code'; +import { Function, FunctionOptions } from './function'; +import { Handler } from './handler'; +import { Runtime } from './runtime'; + +/** + * Properties to configure a new DockerImageFunction construct. + */ +export interface DockerImageFunctionProps extends FunctionOptions { + /** + * The source code of your Lambda function. You can point to a file in an + * Amazon Simple Storage Service (Amazon S3) bucket or specify your source + * code as inline text. + */ + readonly code: DockerImageCode; +} + +/** + * Code property for the DockerImageFunction construct + */ +export abstract class DockerImageCode { + /** + * Use an existing ECR image as the Lambda code. + * @param repository the ECR repository that the image is in + * @param props properties to further configure the selected image + * @experimental + */ + public static fromEcr(repository: ecr.IRepository, props?: EcrImageCodeProps): DockerImageCode { + return { + _bind() { + return new EcrImageCode(repository, props); + }, + }; + } + + /** + * Create an ECR image from the specified asset and bind it as the Lambda code. + * @param directory the directory from which the asset must be created + * @param props properties to further configure the selected image + * @experimental + */ + public static fromImageAsset(directory: string, props: AssetImageCodeProps = {}): DockerImageCode { + return { + _bind() { + return new AssetImageCode(directory, props); + }, + }; + } + + /** + * Produce a `Code` instance from this `DockerImageCode`. + * @internal + */ + public abstract _bind(): Code; +} + +/** + * Create a lambda function where the handler is a docker image + */ +export class DockerImageFunction extends Function { + constructor(scope: Construct, id: string, props: DockerImageFunctionProps) { + super(scope, id, { + ...props, + handler: Handler.FROM_IMAGE, + runtime: Runtime.FROM_IMAGE, + code: props.code._bind(), + }); + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/lib/index.ts b/packages/@aws-cdk/aws-lambda/lib/index.ts index 3581a40cdf535..1ba17427c5210 100644 --- a/packages/@aws-cdk/aws-lambda/lib/index.ts +++ b/packages/@aws-cdk/aws-lambda/lib/index.ts @@ -2,6 +2,8 @@ export * from './alias'; export * from './dlq'; export * from './function-base'; export * from './function'; +export * from './handler'; +export * from './image-function'; export * from './layers'; export * from './permission'; export * from './runtime'; diff --git a/packages/@aws-cdk/aws-lambda/lib/runtime.ts b/packages/@aws-cdk/aws-lambda/lib/runtime.ts index 56ffbecd19b3b..1930641f45f04 100644 --- a/packages/@aws-cdk/aws-lambda/lib/runtime.ts +++ b/packages/@aws-cdk/aws-lambda/lib/runtime.ts @@ -162,6 +162,11 @@ export class Runtime { */ public static readonly PROVIDED_AL2 = new Runtime('provided.al2', RuntimeFamily.OTHER); + /** + * A special runtime entry to be used when function is using a docker image. + */ + public static readonly FROM_IMAGE = new Runtime('FROM_IMAGE'); + /** * The name of this runtime, as expected by the Lambda resource. */ diff --git a/packages/@aws-cdk/aws-lambda/package.json b/packages/@aws-cdk/aws-lambda/package.json index 63319fe238f8f..475f864d4c7b4 100644 --- a/packages/@aws-cdk/aws-lambda/package.json +++ b/packages/@aws-cdk/aws-lambda/package.json @@ -91,6 +91,8 @@ "@aws-cdk/aws-cloudwatch": "0.0.0", "@aws-cdk/aws-codeguruprofiler": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", + "@aws-cdk/aws-ecr": "0.0.0", + "@aws-cdk/aws-ecr-assets": "0.0.0", "@aws-cdk/aws-efs": "0.0.0", "@aws-cdk/aws-events": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", @@ -108,6 +110,8 @@ "@aws-cdk/aws-cloudwatch": "0.0.0", "@aws-cdk/aws-codeguruprofiler": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", + "@aws-cdk/aws-ecr": "0.0.0", + "@aws-cdk/aws-ecr-assets": "0.0.0", "@aws-cdk/aws-efs": "0.0.0", "@aws-cdk/aws-events": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", @@ -137,13 +141,6 @@ "docs-public-apis:@aws-cdk/aws-lambda.RuntimeFamily.NODEJS", "docs-public-apis:@aws-cdk/aws-lambda.Alias.lambda", "docs-public-apis:@aws-cdk/aws-lambda.Alias.fromAliasAttributes", - "docs-public-apis:@aws-cdk/aws-lambda.Code", - "docs-public-apis:@aws-cdk/aws-lambda.Code.asset", - "docs-public-apis:@aws-cdk/aws-lambda.Code.bucket", - "docs-public-apis:@aws-cdk/aws-lambda.Code.cfnParameters", - "docs-public-apis:@aws-cdk/aws-lambda.Code.fromBucket", - "docs-public-apis:@aws-cdk/aws-lambda.Code.fromInline", - "docs-public-apis:@aws-cdk/aws-lambda.Code.inline", "docs-public-apis:@aws-cdk/aws-lambda.Function.fromFunctionArn", "docs-public-apis:@aws-cdk/aws-lambda.FunctionBase", "docs-public-apis:@aws-cdk/aws-lambda.QualifiedFunctionBase", @@ -154,9 +151,6 @@ "docs-public-apis:@aws-cdk/aws-lambda.AliasAttributes", "docs-public-apis:@aws-cdk/aws-lambda.AliasAttributes.aliasName", "docs-public-apis:@aws-cdk/aws-lambda.AliasAttributes.aliasVersion", - "docs-public-apis:@aws-cdk/aws-lambda.CodeConfig", - "props-default-doc:@aws-cdk/aws-lambda.CodeConfig.inlineCode", - "props-default-doc:@aws-cdk/aws-lambda.CodeConfig.s3Location", "docs-public-apis:@aws-cdk/aws-lambda.EventSourceMappingOptions", "props-default-doc:@aws-cdk/aws-lambda.FunctionAttributes.role", "props-default-doc:@aws-cdk/aws-lambda.FunctionAttributes.securityGroup", diff --git a/packages/@aws-cdk/aws-lambda/test/code.test.ts b/packages/@aws-cdk/aws-lambda/test/code.test.ts index b00cf74562c3e..a822ba698697e 100644 --- a/packages/@aws-cdk/aws-lambda/test/code.test.ts +++ b/packages/@aws-cdk/aws-lambda/test/code.test.ts @@ -1,6 +1,7 @@ import '@aws-cdk/assert/jest'; import * as path from 'path'; -import { ResourcePart } from '@aws-cdk/assert'; +import { ABSENT, ResourcePart } from '@aws-cdk/assert'; +import * as ecr from '@aws-cdk/aws-ecr'; import * as cdk from '@aws-cdk/core'; import * as cxapi from '@aws-cdk/cx-api'; import * as lambda from '../lib'; @@ -169,6 +170,143 @@ describe('code', () => { expect(overrides['ObjectKeyParam']).toEqual('SomeObjectKey'); }); }); + + describe('lambda.Code.fromEcr', () => { + test('repository uri is correctly identified', () => { + // given + const stack = new cdk.Stack(); + const repo = new ecr.Repository(stack, 'Repo'); + + // when + new lambda.Function(stack, 'Fn', { + code: lambda.Code.fromEcrImage(repo), + handler: lambda.Handler.FROM_IMAGE, + runtime: lambda.Runtime.FROM_IMAGE, + }); + + // then + expect(stack).toHaveResource('AWS::Lambda::Function', { + Code: { + ImageUri: stack.resolve(repo.repositoryUriForTag('latest')), + }, + ImageConfig: ABSENT, + }); + }); + + test('props are correctly resolved', () => { + // given + const stack = new cdk.Stack(); + const repo = new ecr.Repository(stack, 'Repo'); + + // when + new lambda.Function(stack, 'Fn', { + code: lambda.Code.fromEcrImage(repo, { + cmd: ['cmd', 'param1'], + entrypoint: ['entrypoint', 'param2'], + tag: 'mytag', + }), + handler: lambda.Handler.FROM_IMAGE, + runtime: lambda.Runtime.FROM_IMAGE, + }); + + // then + expect(stack).toHaveResource('AWS::Lambda::Function', { + Code: { + ImageUri: stack.resolve(repo.repositoryUriForTag('mytag')), + }, + ImageConfig: { + Command: ['cmd', 'param1'], + EntryPoint: ['entrypoint', 'param2'], + }, + }); + }); + + test('permission grants', () => { + // given + const stack = new cdk.Stack(); + const repo = new ecr.Repository(stack, 'Repo'); + + // when + new lambda.Function(stack, 'Fn', { + code: lambda.Code.fromEcrImage(repo), + handler: lambda.Handler.FROM_IMAGE, + runtime: lambda.Runtime.FROM_IMAGE, + }); + + // then + expect(stack).toHaveResourceLike('AWS::ECR::Repository', { + RepositoryPolicyText: { + Statement: [ + { + Action: [ + 'ecr:BatchCheckLayerAvailability', + 'ecr:GetDownloadUrlForLayer', + 'ecr:BatchGetImage', + ], + Effect: 'Allow', + Principal: { + Service: 'lambda.amazonaws.com', + }, + }, + ], + }, + }); + }); + }); + + describe('lambda.Code.fromImageAsset', () => { + test('repository uri is correctly identified', () => { + // given + const stack = new cdk.Stack(); + + // when + new lambda.Function(stack, 'Fn', { + code: lambda.Code.fromAssetImage(path.join(__dirname, 'docker-lambda-handler')), + handler: lambda.Handler.FROM_IMAGE, + runtime: lambda.Runtime.FROM_IMAGE, + }); + + // then + expect(stack).toHaveResource('AWS::Lambda::Function', { + Code: { + ImageUri: { + 'Fn::Join': ['', [ + { Ref: 'AWS::AccountId' }, + '.dkr.ecr.', + { Ref: 'AWS::Region' }, + '.', + { Ref: 'AWS::URLSuffix' }, + '/aws-cdk/assets:0874c7dfd254e95f5181cc7fa643e4abf010f68e5717e373b6e635b49a115b2b', + ]], + }, + }, + ImageConfig: ABSENT, + }); + }); + + test('props are correctly resolved', () => { + // given + const stack = new cdk.Stack(); + + // when + new lambda.Function(stack, 'Fn', { + code: lambda.Code.fromAssetImage(path.join(__dirname, 'docker-lambda-handler'), { + cmd: ['cmd', 'param1'], + entrypoint: ['entrypoint', 'param2'], + }), + handler: lambda.Handler.FROM_IMAGE, + runtime: lambda.Runtime.FROM_IMAGE, + }); + + // then + expect(stack).toHaveResource('AWS::Lambda::Function', { + ImageConfig: { + Command: ['cmd', 'param1'], + EntryPoint: ['entrypoint', 'param2'], + }, + }); + }); + }); }); function defineFunction(code: lambda.Code, runtime: lambda.Runtime = lambda.Runtime.NODEJS_10_X) { diff --git a/packages/@aws-cdk/aws-lambda/test/docker-lambda-handler/Dockerfile b/packages/@aws-cdk/aws-lambda/test/docker-lambda-handler/Dockerfile new file mode 100644 index 0000000000000..18064bbe78ba1 --- /dev/null +++ b/packages/@aws-cdk/aws-lambda/test/docker-lambda-handler/Dockerfile @@ -0,0 +1,8 @@ +FROM 628053151772.dkr.ecr.sa-east-1.amazonaws.com/awslambda/nodejs12.x-runtime-internal:beta +ARG FUNCTION_DIR="/var/task" +# Create function directory +RUN mkdir -p ${FUNCTION_DIR} +# Copy handler function and package.json +COPY app.js ${FUNCTION_DIR} +# Set the CMD to your handler (could also be done as a parameter override outside of the Dockerfile) +CMD [ "app.handler" ] \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/docker-lambda-handler/app.ts b/packages/@aws-cdk/aws-lambda/test/docker-lambda-handler/app.ts new file mode 100644 index 0000000000000..99155b53d5bf7 --- /dev/null +++ b/packages/@aws-cdk/aws-lambda/test/docker-lambda-handler/app.ts @@ -0,0 +1,9 @@ +/* eslint-disable no-console */ + +exports.handler = async (event: any) => { + console.log('hello world'); + console.log(`event ${JSON.stringify(event)}`); + return { + statusCode: 200, + }; +}; \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/function.test.ts b/packages/@aws-cdk/aws-lambda/test/function.test.ts index 038167a460423..3a10ebab4247b 100644 --- a/packages/@aws-cdk/aws-lambda/test/function.test.ts +++ b/packages/@aws-cdk/aws-lambda/test/function.test.ts @@ -759,6 +759,22 @@ describe('function', () => { }, ResourcePart.CompleteDefinition); }); + test('runtime and handler set to FROM_IMAGE are set to undefined in CloudFormation', () => { + const stack = new cdk.Stack(); + + new lambda.Function(stack, 'MyLambda', { + code: lambda.Code.fromAssetImage(path.join(__dirname, 'docker-lambda-handler')), + handler: lambda.Handler.FROM_IMAGE, + runtime: lambda.Runtime.FROM_IMAGE, + }); + + expect(stack).toHaveResource('AWS::Lambda::Function', { + Runtime: ABSENT, + Handler: ABSENT, + PackageType: 'Image', + }); + }); + describe('grantInvoke', () => { test('adds iam:InvokeFunction', () => { @@ -1814,6 +1830,130 @@ describe('function', () => { }); }); }); + + describe('code config', () => { + class MyCode extends lambda.Code { + public readonly isInline: boolean; + constructor(private readonly config: lambda.CodeConfig) { + super(); + this.isInline = 'inlineCode' in config; + } + + public bind(_scope: constructs.Construct): lambda.CodeConfig { + return this.config; + } + } + + test('only one of inline, s3 or imageConfig are allowed', () => { + const stack = new cdk.Stack(); + + expect(() => new lambda.Function(stack, 'Fn1', { + code: new MyCode({}), + handler: 'index.handler', + runtime: lambda.Runtime.GO_1_X, + })).toThrow(/lambda.Code must specify exactly one of/); + + expect(() => new lambda.Function(stack, 'Fn2', { + code: new MyCode({ + inlineCode: 'foo', + image: { imageUri: 'bar' }, + }), + handler: 'index.handler', + runtime: lambda.Runtime.GO_1_X, + })).toThrow(/lambda.Code must specify exactly one of/); + + expect(() => new lambda.Function(stack, 'Fn3', { + code: new MyCode({ + image: { imageUri: 'baz' }, + s3Location: { bucketName: 's3foo', objectKey: 's3bar' }, + }), + handler: 'index.handler', + runtime: lambda.Runtime.GO_1_X, + })).toThrow(/lambda.Code must specify exactly one of/); + + expect(() => new lambda.Function(stack, 'Fn4', { + code: new MyCode({ inlineCode: 'baz', s3Location: { bucketName: 's3foo', objectKey: 's3bar' } }), + handler: 'index.handler', + runtime: lambda.Runtime.GO_1_X, + })).toThrow(/lambda.Code must specify exactly one of/); + }); + + test('handler must be FROM_IMAGE when image asset is specified', () => { + const stack = new cdk.Stack(); + + expect(() => new lambda.Function(stack, 'Fn1', { + code: lambda.Code.fromAssetImage('test/docker-lambda-handler'), + handler: lambda.Handler.FROM_IMAGE, + runtime: lambda.Runtime.FROM_IMAGE, + })).not.toThrow(); + + expect(() => new lambda.Function(stack, 'Fn2', { + code: lambda.Code.fromAssetImage('test/docker-lambda-handler'), + handler: 'index.handler', + runtime: lambda.Runtime.FROM_IMAGE, + })).toThrow(/handler must be.*FROM_IMAGE/); + }); + + test('runtime must be FROM_IMAGE when image asset is specified', () => { + const stack = new cdk.Stack(); + + expect(() => new lambda.Function(stack, 'Fn1', { + code: lambda.Code.fromAssetImage('test/docker-lambda-handler'), + handler: lambda.Handler.FROM_IMAGE, + runtime: lambda.Runtime.FROM_IMAGE, + })).not.toThrow(); + + expect(() => new lambda.Function(stack, 'Fn2', { + code: lambda.Code.fromAssetImage('test/docker-lambda-handler'), + handler: lambda.Handler.FROM_IMAGE, + runtime: lambda.Runtime.GO_1_X, + })).toThrow(/runtime must be.*FROM_IMAGE/); + }); + + test('imageUri is correctly configured', () => { + const stack = new cdk.Stack(); + + new lambda.Function(stack, 'Fn1', { + code: new MyCode({ + image: { + imageUri: 'ecr image uri', + }, + }), + handler: lambda.Handler.FROM_IMAGE, + runtime: lambda.Runtime.FROM_IMAGE, + }); + + expect(stack).toHaveResource('AWS::Lambda::Function', { + Code: { + ImageUri: 'ecr image uri', + }, + ImageConfig: ABSENT, + }); + }); + + test('imageConfig is correctly configured', () => { + const stack = new cdk.Stack(); + + new lambda.Function(stack, 'Fn1', { + code: new MyCode({ + image: { + imageUri: 'ecr image uri', + cmd: ['cmd', 'param1'], + entrypoint: ['entrypoint', 'param2'], + }, + }), + handler: lambda.Handler.FROM_IMAGE, + runtime: lambda.Runtime.FROM_IMAGE, + }); + + expect(stack).toHaveResource('AWS::Lambda::Function', { + ImageConfig: { + Command: ['cmd', 'param1'], + EntryPoint: ['entrypoint', 'param2'], + }, + }); + }); + }); }); function newTestLambda(scope: constructs.Construct) { diff --git a/packages/@aws-cdk/aws-lambda/test/integ.lambda.docker.expected.json b/packages/@aws-cdk/aws-lambda/test/integ.lambda.docker.expected.json new file mode 100644 index 0000000000000..bfa1d27910000 --- /dev/null +++ b/packages/@aws-cdk/aws-lambda/test/integ.lambda.docker.expected.json @@ -0,0 +1,71 @@ +{ + "Resources": { + "MyLambdaServiceRole4539ECB6": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ] + } + }, + "MyLambdaCCE802FB": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ImageUri": { + "Fn::Join": [ + "", + [ + { + "Ref": "AWS::AccountId" + }, + ".dkr.ecr.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/aws-cdk/assets:e8a944aeb0a08ba4811503d9c138e514b112dadca84daa5b4608e4a0fb80a0c9" + ] + ] + } + }, + "Role": { + "Fn::GetAtt": [ + "MyLambdaServiceRole4539ECB6", + "Arn" + ] + }, + "PackageType": "Image" + }, + "DependsOn": [ + "MyLambdaServiceRole4539ECB6" + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/integ.lambda.docker.ts b/packages/@aws-cdk/aws-lambda/test/integ.lambda.docker.ts new file mode 100644 index 0000000000000..3870d0cadf3b5 --- /dev/null +++ b/packages/@aws-cdk/aws-lambda/test/integ.lambda.docker.ts @@ -0,0 +1,18 @@ +import * as path from 'path'; +import { App, Stack } from '@aws-cdk/core'; +import { DockerImageCode, DockerImageFunction } from '../lib'; + +class TestStack extends Stack { + constructor(scope: App, id: string) { + super(scope, id); + + new DockerImageFunction(this, 'MyLambda', { + code: DockerImageCode.fromImageAsset(path.join(__dirname, 'docker-lambda-handler')), + }); + } +} + +const app = new App(); +new TestStack(app, 'lambda-ecr-docker'); + +app.synth(); \ No newline at end of file diff --git a/packages/@aws-cdk/cfnspec/spec-source/490_Lambda_Containers_patch.json b/packages/@aws-cdk/cfnspec/spec-source/490_Lambda_Containers_patch.json new file mode 100644 index 0000000000000..cc53bd1139ad5 --- /dev/null +++ b/packages/@aws-cdk/cfnspec/spec-source/490_Lambda_Containers_patch.json @@ -0,0 +1,79 @@ +{ + "PropertyTypes": { + "patch": { + "description": "Properties for Lambda Function Container Image", + "operations": [ + { + "op": "add", + "path": "/AWS::Lambda::Function.ImageConfig", + "value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-imageconfig.html", + "Properties": { + "Command": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-imageconfig.html#cfn-lambda-function-imageconfig-command", + "DuplicatesAllowed": false, + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "EntryPoint": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-imageconfig.html#cfn-lambda-function-imageconfig-entrypoint", + "DuplicatesAllowed": false, + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "WorkingDirectory": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-imageconfig.html#cfn-lambda-function-imageconfig-workingdirectory", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + } + }, + { + "op": "add", + "path": "/AWS::Lambda::Function.Code/Properties/ImageUri", + "value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html#cfn-lambda-function-code-imageuri", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + ] + } + }, + "ResourceTypes": { + "AWS::Lambda::Function": { + "patch": { + "description": "updates to Lambda Function to support Container Image", + "operations": [ + { + "op": "add", + "path": "/Properties/ImageConfig", + "value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-imageconfig", + "Required": false, + "Type": "ImageConfig", + "UpdateType": "Mutable" + } + }, + { + "op": "add", + "path": "/Properties/PackageType", + "value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-packagetype", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + ] + } + } + } +} \ No newline at end of file From 649f50d3d2ded24faf8a0798eeb502929a3e53f5 Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Tue, 1 Dec 2020 16:59:35 +0000 Subject: [PATCH 249/314] chore(release): 1.76.0 --- CHANGELOG.md | 7 +++++++ version.v1.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 485b074cc5d91..e3d66f8b2c4dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.76.0](https://github.com/aws/aws-cdk/compare/v1.75.0...v1.76.0) (2020-12-01) + + +### Features + +* **lambda:** container images ([#11809](https://github.com/aws/aws-cdk/issues/11809)) ([02ced10](https://github.com/aws/aws-cdk/commit/02ced10739ecacc9ca39e9e0b563ddfbf5d0b245)) + ## [1.75.0](https://github.com/aws/aws-cdk/compare/v1.74.0...v1.75.0) (2020-11-24) diff --git a/version.v1.json b/version.v1.json index 2bac917cd4459..cbf6099fbebec 100644 --- a/version.v1.json +++ b/version.v1.json @@ -1,3 +1,3 @@ { - "version": "1.75.0" + "version": "1.76.0" } From c6a9886a511b55aec4ae676422a7a85d1bb9de30 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 1 Dec 2020 22:58:08 +0000 Subject: [PATCH 250/314] chore(deps): bump @typescript-eslint/eslint-plugin from 4.8.2 to 4.9.0 (#11793) Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.8.2 to 4.9.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.9.0/packages/eslint-plugin) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- tools/cdk-build-tools/package.json | 2 +- yarn.lock | 157 +++++++---------------------- 2 files changed, 39 insertions(+), 120 deletions(-) diff --git a/tools/cdk-build-tools/package.json b/tools/cdk-build-tools/package.json index 4cacb7203280d..d6b806024eec1 100644 --- a/tools/cdk-build-tools/package.json +++ b/tools/cdk-build-tools/package.json @@ -39,7 +39,7 @@ "pkglint": "0.0.0" }, "dependencies": { - "@typescript-eslint/eslint-plugin": "^4.8.2", + "@typescript-eslint/eslint-plugin": "^4.9.0", "@typescript-eslint/parser": "^4.7.0", "eslint-plugin-cdk": "0.0.0", "awslint": "0.0.0", diff --git a/yarn.lock b/yarn.lock index e75d359ad7efe..6a8da655ad59a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1765,28 +1765,28 @@ resolved "https://registry.yarnpkg.com/@types/yarnpkg__lockfile/-/yarnpkg__lockfile-1.1.4.tgz#445251eb00bd9c1e751f82c7c6bf4f714edfd464" integrity sha512-/emrKCfQMQmFCqRqqBJ0JueHBT06jBRM3e8OgnvDUcvuExONujIk2hFA5dNsN9Nt41ljGVDdChvCydATZ+KOZw== -"@typescript-eslint/eslint-plugin@^4.8.2": - version "4.8.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.8.2.tgz#cf9102ec800391caa574f589ffe0623cca1d9308" - integrity sha512-gQ06QLV5l1DtvYtqOyFLXD9PdcILYqlrJj2l+CGDlPtmgLUzc1GpqciJFIRvyfvgLALpnxYINFuw+n9AZhPBKQ== +"@typescript-eslint/eslint-plugin@^4.9.0": + version "4.9.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.9.0.tgz#8fde15743413661fdc086c9f1f5d74a80b856113" + integrity sha512-WrVzGMzzCrgrpnQMQm4Tnf+dk+wdl/YbgIgd5hKGa2P+lnJ2MON+nQnbwgbxtN9QDLi8HO+JAq0/krMnjQK6Cw== dependencies: - "@typescript-eslint/experimental-utils" "4.8.2" - "@typescript-eslint/scope-manager" "4.8.2" + "@typescript-eslint/experimental-utils" "4.9.0" + "@typescript-eslint/scope-manager" "4.9.0" debug "^4.1.1" functional-red-black-tree "^1.0.1" regexpp "^3.0.0" semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@4.8.2": - version "4.8.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.8.2.tgz#8909a5732f19329cf5ef0c39766170476bff5e50" - integrity sha512-hpTw6o6IhBZEsQsjuw/4RWmceRyESfAiEzAEnXHKG1X7S5DXFaZ4IO1JO7CW1aQ604leQBzjZmuMI9QBCAJX8Q== +"@typescript-eslint/experimental-utils@4.9.0": + version "4.9.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.9.0.tgz#23a296b85d243afba24e75a43fd55aceda5141f0" + integrity sha512-0p8GnDWB3R2oGhmRXlEnCvYOtaBCijtA5uBfH5GxQKsukdSQyI4opC4NGTUb88CagsoNQ4rb/hId2JuMbzWKFQ== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/scope-manager" "4.8.2" - "@typescript-eslint/types" "4.8.2" - "@typescript-eslint/typescript-estree" "4.8.2" + "@typescript-eslint/scope-manager" "4.9.0" + "@typescript-eslint/types" "4.9.0" + "@typescript-eslint/typescript-estree" "4.9.0" eslint-scope "^5.0.0" eslint-utils "^2.0.0" @@ -1808,23 +1808,23 @@ "@typescript-eslint/types" "4.7.0" "@typescript-eslint/visitor-keys" "4.7.0" -"@typescript-eslint/scope-manager@4.8.2": - version "4.8.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.8.2.tgz#a18388c63ae9c17adde519384f539392f2c4f0d9" - integrity sha512-qHQ8ODi7mMin4Sq2eh/6eu03uVzsf5TX+J43xRmiq8ujng7ViQSHNPLOHGw/Wr5dFEoxq/ubKhzClIIdQy5q3g== +"@typescript-eslint/scope-manager@4.9.0": + version "4.9.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.9.0.tgz#5eefe305d6b71d1c85af6587b048426bfd4d3708" + integrity sha512-q/81jtmcDtMRE+nfFt5pWqO0R41k46gpVLnuefqVOXl4QV1GdQoBWfk5REcipoJNQH9+F5l+dwa9Li5fbALjzg== dependencies: - "@typescript-eslint/types" "4.8.2" - "@typescript-eslint/visitor-keys" "4.8.2" + "@typescript-eslint/types" "4.9.0" + "@typescript-eslint/visitor-keys" "4.9.0" "@typescript-eslint/types@4.7.0": version "4.7.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.7.0.tgz#5e95ef5c740f43d942542b35811f87b62fccca69" integrity sha512-uLszFe0wExJc+I7q0Z/+BnP7wao/kzX0hB5vJn4LIgrfrMLgnB2UXoReV19lkJQS1a1mHWGGODSxnBx6JQC3Sg== -"@typescript-eslint/types@4.8.2": - version "4.8.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.8.2.tgz#c862dd0e569d9478eb82d6aee662ea53f5661a36" - integrity sha512-z1/AVcVF8ju5ObaHe2fOpZYEQrwHyZ7PTOlmjd3EoFeX9sv7UekQhfrCmgUO7PruLNfSHrJGQvrW3Q7xQ8EoAw== +"@typescript-eslint/types@4.9.0": + version "4.9.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.9.0.tgz#3fe8c3632abd07095c7458f7451bd14c85d0033c" + integrity sha512-luzLKmowfiM/IoJL/rus1K9iZpSJK6GlOS/1ezKplb7MkORt2dDcfi8g9B0bsF6JoRGhqn0D3Va55b+vredFHA== "@typescript-eslint/typescript-estree@4.7.0": version "4.7.0" @@ -1840,13 +1840,13 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/typescript-estree@4.8.2": - version "4.8.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.8.2.tgz#eeec34707d8577600fb21661b5287226cc8b3bed" - integrity sha512-HToGNwI6fekH0dOw3XEVESUm71Onfam0AKin6f26S2FtUmO7o3cLlWgrIaT1q3vjB3wCTdww3Dx2iGq5wtUOCg== +"@typescript-eslint/typescript-estree@4.9.0": + version "4.9.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.9.0.tgz#38a98df6ee281cfd6164d6f9d91795b37d9e508c" + integrity sha512-rmDR++PGrIyQzAtt3pPcmKWLr7MA+u/Cmq9b/rON3//t5WofNR4m/Ybft2vOLj0WtUzjn018ekHjTsnIyBsQug== dependencies: - "@typescript-eslint/types" "4.8.2" - "@typescript-eslint/visitor-keys" "4.8.2" + "@typescript-eslint/types" "4.9.0" + "@typescript-eslint/visitor-keys" "4.9.0" debug "^4.1.1" globby "^11.0.1" is-glob "^4.0.1" @@ -1862,12 +1862,12 @@ "@typescript-eslint/types" "4.7.0" eslint-visitor-keys "^2.0.0" -"@typescript-eslint/visitor-keys@4.8.2": - version "4.8.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.8.2.tgz#62cd3fbbbf65f8eccfbe6f159eb1b84a243a3f77" - integrity sha512-Vg+/SJTMZJEKKGHW7YC21QxgKJrSbxoYYd3MEUGtW7zuytHuEcksewq0DUmo4eh/CTNrVJGSdIY9AtRb6riWFw== +"@typescript-eslint/visitor-keys@4.9.0": + version "4.9.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.9.0.tgz#f284e9fac43f2d6d35094ce137473ee321f266c8" + integrity sha512-sV45zfdRqQo1A97pOSx3fsjR+3blmwtdCt8LDrXgCX36v4Vmz4KHrhpV6Fo2cRdXmyumxx11AHw0pNJqCNpDyg== dependencies: - "@typescript-eslint/types" "4.8.2" + "@typescript-eslint/types" "4.9.0" eslint-visitor-keys "^2.0.0" "@yarnpkg/lockfile@^1.1.0": @@ -2048,11 +2048,6 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" -app-root-path@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.2.1.tgz#d0df4a682ee408273583d43f6f79e9892624bc9a" - integrity sha512-91IFKeKk7FjfmezPKkwtaRvSpnUc4gDwPAjA1YZ9Gn0q0PPeW+vbeUsZuyDwjI7+QTHhcLen2v25fi/AmhvbJA== - append-transform@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab" @@ -2290,7 +2285,7 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" -aws-sdk@^2.596.0, aws-sdk@^2.637.0, aws-sdk@^2.799.0: +aws-sdk@^2.637.0, aws-sdk@^2.799.0: version "2.799.0" resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.799.0.tgz#8b1a64c1a9f8ccf5794eb07bdd8051e4cb6adcfd" integrity sha512-NYAoiNU+bJXhlJsC0rFqrmD5t5ho7/VxldmziP6HLPYHfOCI9Uvk6UVjfPmhLWPm0mHnIxhsHqmsNGyjhHNYmw== @@ -3718,16 +3713,6 @@ dot-prop@^5.1.0: dependencies: is-obj "^2.0.0" -dotenv-json@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/dotenv-json/-/dotenv-json-1.0.0.tgz#fc7f672aafea04bed33818733b9f94662332815c" - integrity sha512-jAssr+6r4nKhKRudQ0HOzMskOFFi9+ubXWwmrSGJFgTvpjyPXCXsCsYbjif6mXp7uxA7xY3/LGaiTQukZzSbOQ== - -dotenv@^8.0.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" - integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== - dotgitignore@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/dotgitignore/-/dotgitignore-2.1.0.tgz#a4b15a4e4ef3cf383598aaf1dfa4a04bcc089b7b" @@ -3951,11 +3936,6 @@ escodegen@^1.14.1, escodegen@^1.8.1: optionalDependencies: source-map "~0.6.1" -eslint-config-standard@^14.1.1: - version "14.1.1" - resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz#830a8e44e7aef7de67464979ad06b406026c56ea" - integrity sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg== - eslint-import-resolver-node@^0.3.4: version "0.3.4" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" @@ -3983,14 +3963,6 @@ eslint-module-utils@^2.6.0: debug "^2.6.9" pkg-dir "^2.0.0" -eslint-plugin-es@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893" - integrity sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ== - dependencies: - eslint-utils "^2.0.0" - regexpp "^3.0.0" - eslint-plugin-import@^2.22.1: version "2.22.1" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz#0896c7e6a0cf44109a2d97b95903c2bb689d7702" @@ -4010,33 +3982,11 @@ eslint-plugin-import@^2.22.1: resolve "^1.17.0" tsconfig-paths "^3.9.0" -eslint-plugin-node@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d" - integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g== - dependencies: - eslint-plugin-es "^3.0.0" - eslint-utils "^2.0.0" - ignore "^5.1.1" - minimatch "^3.0.4" - resolve "^1.10.1" - semver "^6.1.0" - -eslint-plugin-promise@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz#845fd8b2260ad8f82564c1222fce44ad71d9418a" - integrity sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw== - eslint-plugin-rulesdir@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/eslint-plugin-rulesdir/-/eslint-plugin-rulesdir-0.1.0.tgz#ad144d7e98464fda82963eff3fab331aecb2bf08" integrity sha1-rRRNfphGT9qClj7/P6szGuyyvwg= -eslint-plugin-standard@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.1.0.tgz#0c3bf3a67e853f8bbbc580fb4945fbf16f41b7c5" - integrity sha512-ZL7+QRixjTR6/528YNGyDotyffm5OQst/sGxKDwGb9Uqs4In5Egi4+jbobhqJoyoCM6/7v/1A5fhQ7ScMtDjaQ== - eslint-scope@^5.0.0, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -5142,7 +5092,7 @@ ignore@^4.0.3, ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.1.1, ignore@^5.1.4, ignore@^5.1.8: +ignore@^5.1.4, ignore@^5.1.8: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== @@ -5328,7 +5278,7 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" -is-core-module@^2.1.0: +is-core-module@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== @@ -6408,24 +6358,6 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== -lambda-leak@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lambda-leak/-/lambda-leak-2.0.0.tgz#771985d3628487f6e885afae2b54510dcfb2cd7e" - integrity sha1-dxmF02KEh/boha+uK1RRDc+yzX4= - -lambda-tester@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/lambda-tester/-/lambda-tester-3.6.0.tgz#ceb7d4f4f0da768487a05cff37dcd088508b5247" - integrity sha512-F2ZTGWCLyIR95o/jWK46V/WnOCFAEUG/m/V7/CLhPJ7PCM+pror1rZ6ujP3TkItSGxUfpJi0kqwidw+M/nEqWw== - dependencies: - app-root-path "^2.2.1" - dotenv "^8.0.0" - dotenv-json "^1.0.0" - lambda-leak "^2.0.0" - semver "^6.1.1" - uuid "^3.3.2" - vandium-utils "^1.1.1" - lazystream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" @@ -8536,14 +8468,6 @@ resolve@^1.1.6, resolve@^1.10.0, resolve@^1.11.1, resolve@^1.13.1, resolve@^1.17 dependencies: path-parse "^1.0.6" -resolve@^1.10.1: - version "1.19.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" - integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== - dependencies: - is-core-module "^2.1.0" - path-parse "^1.0.6" - resolve@^1.18.1: version "1.18.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.18.1.tgz#018fcb2c5b207d2a6424aee361c5a266da8f4130" @@ -8701,7 +8625,7 @@ semver@7.x, semver@^7.1.1, semver@^7.2.1, semver@^7.3.2: resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== -semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.2.0, semver@^6.3.0: +semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -10061,11 +9985,6 @@ validate-npm-package-name@^3.0.0: dependencies: builtins "^1.0.3" -vandium-utils@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/vandium-utils/-/vandium-utils-1.2.0.tgz#44735de4b7641a05de59ebe945f174e582db4f59" - integrity sha1-RHNd5LdkGgXeWevpRfF05YLbT1k= - verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" From 92f305787142a4777c5815d6da4fdcb8f46d5b92 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 1 Dec 2020 23:35:10 +0000 Subject: [PATCH 251/314] chore(deps-dev): bump @types/node from 10.17.47 to 10.17.48 (#11794) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 10.17.47 to 10.17.48. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/core/package.json | 2 +- packages/@monocdk-experiment/assert/package.json | 2 +- packages/@monocdk-experiment/rewrite-imports/package.json | 2 +- packages/aws-cdk-lib/package.json | 2 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- packages/monocdk/package.json | 2 +- tools/eslint-plugin-cdk/package.json | 2 +- tools/nodeunit-shim/package.json | 2 +- tools/yarn-cling/package.json | 2 +- yarn.lock | 8 ++++---- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json index 40b18afc96717..6fab10e06197a 100644 --- a/packages/@aws-cdk/core/package.json +++ b/packages/@aws-cdk/core/package.json @@ -178,7 +178,7 @@ "devDependencies": { "@types/lodash": "^4.14.165", "@types/minimatch": "^3.0.3", - "@types/node": "^10.17.47", + "@types/node": "^10.17.48", "@types/sinon": "^9.0.9", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@monocdk-experiment/assert/package.json b/packages/@monocdk-experiment/assert/package.json index 6afd53dff063c..92c854ef290a7 100644 --- a/packages/@monocdk-experiment/assert/package.json +++ b/packages/@monocdk-experiment/assert/package.json @@ -35,7 +35,7 @@ "devDependencies": { "@monocdk-experiment/rewrite-imports": "0.0.0", "@types/jest": "^26.0.15", - "@types/node": "^10.17.47", + "@types/node": "^10.17.48", "cdk-build-tools": "0.0.0", "constructs": "^3.2.0", "jest": "^26.6.3", diff --git a/packages/@monocdk-experiment/rewrite-imports/package.json b/packages/@monocdk-experiment/rewrite-imports/package.json index 70e66ebd130be..ddb0a7bbf5671 100644 --- a/packages/@monocdk-experiment/rewrite-imports/package.json +++ b/packages/@monocdk-experiment/rewrite-imports/package.json @@ -37,7 +37,7 @@ "devDependencies": { "@types/glob": "^7.1.3", "@types/jest": "^26.0.15", - "@types/node": "^10.17.47", + "@types/node": "^10.17.48", "cdk-build-tools": "0.0.0", "pkglint": "0.0.0" }, diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index 6511ebfc81d7c..5374e3242c745 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -269,7 +269,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "@types/fs-extra": "^8.1.1", - "@types/node": "^10.17.47", + "@types/node": "^10.17.48", "cdk-build-tools": "0.0.0", "constructs": "^3.2.0", "fs-extra": "^9.0.1", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index cad79354de315..17d21ba509dd2 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -45,7 +45,7 @@ "@types/jest": "^26.0.15", "@types/minimatch": "^3.0.3", "@types/mockery": "^1.4.29", - "@types/node": "^10.17.47", + "@types/node": "^10.17.48", "@types/promptly": "^3.0.0", "@types/semver": "^7.3.4", "@types/sinon": "^9.0.9", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index d2b4361fb9133..c98a74cf515e9 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -35,7 +35,7 @@ "@types/jest": "^26.0.15", "@types/jszip": "^3.4.1", "@types/mock-fs": "^4.13.0", - "@types/node": "^10.17.47", + "@types/node": "^10.17.48", "@types/yargs": "^15.0.10", "cdk-build-tools": "0.0.0", "jest": "^26.6.3", diff --git a/packages/monocdk/package.json b/packages/monocdk/package.json index 2fb2a627896d6..21b825dd89f55 100644 --- a/packages/monocdk/package.json +++ b/packages/monocdk/package.json @@ -268,7 +268,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "@types/fs-extra": "^8.1.1", - "@types/node": "^10.17.47", + "@types/node": "^10.17.48", "cdk-build-tools": "0.0.0", "constructs": "^3.2.0", "fs-extra": "^9.0.1", diff --git a/tools/eslint-plugin-cdk/package.json b/tools/eslint-plugin-cdk/package.json index 795262ab408f3..b168e218eca59 100644 --- a/tools/eslint-plugin-cdk/package.json +++ b/tools/eslint-plugin-cdk/package.json @@ -15,7 +15,7 @@ "@types/eslint": "^7.2.5", "@types/fs-extra": "^8.1.1", "@types/jest": "^26.0.15", - "@types/node": "^10.17.47", + "@types/node": "^10.17.48", "eslint-plugin-rulesdir": "^0.1.0", "jest": "^26.6.3", "typescript": "~3.9.7" diff --git a/tools/nodeunit-shim/package.json b/tools/nodeunit-shim/package.json index 56bd2d5e4fb60..c0a9838437477 100644 --- a/tools/nodeunit-shim/package.json +++ b/tools/nodeunit-shim/package.json @@ -13,7 +13,7 @@ }, "devDependencies": { "@types/jest": "^26.0.15", - "@types/node": "^10.17.47", + "@types/node": "^10.17.48", "typescript": "~3.9.7" }, "dependencies": { diff --git a/tools/yarn-cling/package.json b/tools/yarn-cling/package.json index feba1052cc743..aefba13ff8ee0 100644 --- a/tools/yarn-cling/package.json +++ b/tools/yarn-cling/package.json @@ -39,7 +39,7 @@ }, "devDependencies": { "@types/jest": "^26.0.15", - "@types/node": "^10.17.47", + "@types/node": "^10.17.48", "@types/yarnpkg__lockfile": "^1.1.4", "jest": "^26.6.3", "pkglint": "0.0.0", diff --git a/yarn.lock b/yarn.lock index 6a8da655ad59a..b990101903b6b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1646,10 +1646,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.7.tgz#8ea1e8f8eae2430cf440564b98c6dfce1ec5945d" integrity sha512-Zw1vhUSQZYw+7u5dAwNbIA9TuTotpzY/OF7sJM9FqPOF3SPjKnxrjoTktXDZgUjybf4cWVBP7O8wvKdSaGHweg== -"@types/node@^10.17.47": - version "10.17.47" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.47.tgz#cc88a242a835789456cfcf374928400d9f4b291c" - integrity sha512-YZ1mMAdUPouBZCdeugjV8y1tqqr28OyL8DYbH5ePCfe9zcXtvbh1wDBy7uzlHkXo3Qi07kpzXfvycvrkby/jXw== +"@types/node@^10.17.48": + version "10.17.48" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.48.tgz#726e7f25d00bf58d79c8f00dd586dd9a10d06a4f" + integrity sha512-Agl6xbYP6FOMDeAsr3QVZ+g7Yzg0uhPHWx0j5g4LFdUBHVtqtU+gH660k/lCEe506jJLOGbEzsnqPDTZGJQLag== "@types/nodeunit@^0.0.31": version "0.0.31" From 272f197fc9ef6837117df52192d016bb6bc55ae2 Mon Sep 17 00:00:00 2001 From: James Kennedy Date: Tue, 1 Dec 2020 16:58:39 -0800 Subject: [PATCH 252/314] Remove restriction on environment files --- packages/@aws-cdk/aws-ecs/lib/container-definition.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/@aws-cdk/aws-ecs/lib/container-definition.ts b/packages/@aws-cdk/aws-ecs/lib/container-definition.ts index 341ffe5237b4c..1ac4ec541df85 100644 --- a/packages/@aws-cdk/aws-ecs/lib/container-definition.ts +++ b/packages/@aws-cdk/aws-ecs/lib/container-definition.ts @@ -420,10 +420,6 @@ export class ContainerDefinition extends cdk.Construct { } } - if (this.taskDefinition.isFargateCompatible && props.environmentFiles) { - throw new Error(`Cannot specify environment files for a task using the FARGATE launch type in container '${this.node.id}'.`); - } - if (props.environmentFiles) { this.environmentFiles = []; From cbe2ee6838f381f848835f381606e6ef956e79d6 Mon Sep 17 00:00:00 2001 From: James Kennedy Date: Tue, 1 Dec 2020 17:00:43 -0800 Subject: [PATCH 253/314] Update tests --- .../aws-ecs/test/test.container-definition.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/packages/@aws-cdk/aws-ecs/test/test.container-definition.ts b/packages/@aws-cdk/aws-ecs/test/test.container-definition.ts index 1fe5faa9bb520..054380f82aec0 100644 --- a/packages/@aws-cdk/aws-ecs/test/test.container-definition.ts +++ b/packages/@aws-cdk/aws-ecs/test/test.container-definition.ts @@ -804,20 +804,6 @@ export = { ], })); - test.done(); - }, - 'throws when using environment files for a Fargate task'(test: Test) { - // GIVEN - const stack = new cdk.Stack(); - const taskDefinition = new ecs.FargateTaskDefinition(stack, 'TaskDef'); - - // THEN - test.throws(() => taskDefinition.addContainer('cont', { - image: ecs.ContainerImage.fromRegistry('test'), - memoryLimitMiB: 1024, - environmentFiles: [ecs.EnvironmentFile.fromAsset(path.join(__dirname, 'demo-envfiles/test-envfile.env'))], - }), /Cannot specify environment files for a task using the FARGATE launch type in container/); - test.done(); }, }, From 71de0e9bfda05a3d01d240d1ee4eb711289b2d79 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 2 Dec 2020 02:54:42 +0000 Subject: [PATCH 254/314] chore(deps): bump aws-sdk from 2.799.0 to 2.802.0 (#11824) Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.799.0 to 2.802.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.799.0...v2.802.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/aws-cloudfront-origins/package.json | 2 +- packages/@aws-cdk/aws-cloudfront/package.json | 2 +- packages/@aws-cdk/aws-cloudtrail/package.json | 2 +- packages/@aws-cdk/aws-codebuild/package.json | 2 +- packages/@aws-cdk/aws-codecommit/package.json | 2 +- packages/@aws-cdk/aws-dynamodb/package.json | 2 +- packages/@aws-cdk/aws-eks/package.json | 2 +- packages/@aws-cdk/aws-events-targets/package.json | 2 +- packages/@aws-cdk/aws-logs/package.json | 2 +- packages/@aws-cdk/aws-route53/package.json | 2 +- packages/@aws-cdk/aws-sqs/package.json | 2 +- packages/@aws-cdk/custom-resources/package.json | 2 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- yarn.lock | 8 ++++---- 15 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudfront-origins/package.json b/packages/@aws-cdk/aws-cloudfront-origins/package.json index 37060dc604564..3b6d348539c5b 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/package.json +++ b/packages/@aws-cdk/aws-cloudfront-origins/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", - "aws-sdk": "^2.799.0", + "aws-sdk": "^2.802.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "pkglint": "0.0.0" diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index 46177ce2000bd..1de410fc56061 100644 --- a/packages/@aws-cdk/aws-cloudfront/package.json +++ b/packages/@aws-cdk/aws-cloudfront/package.json @@ -74,7 +74,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.799.0", + "aws-sdk": "^2.802.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index a8e014176a93b..05b83b1a6a97d 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -74,7 +74,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.799.0", + "aws-sdk": "^2.802.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codebuild/package.json b/packages/@aws-cdk/aws-codebuild/package.json index 081dbd1b4c3ce..e034dcb072bc2 100644 --- a/packages/@aws-cdk/aws-codebuild/package.json +++ b/packages/@aws-cdk/aws-codebuild/package.json @@ -80,7 +80,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.799.0", + "aws-sdk": "^2.802.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codecommit/package.json b/packages/@aws-cdk/aws-codecommit/package.json index 5a4e733cfa460..e6e186bcf45c6 100644 --- a/packages/@aws-cdk/aws-codecommit/package.json +++ b/packages/@aws-cdk/aws-codecommit/package.json @@ -80,7 +80,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.799.0", + "aws-sdk": "^2.802.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index 39c1aa5956184..bfc886963eaee 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -75,7 +75,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/jest": "^26.0.15", - "aws-sdk": "^2.799.0", + "aws-sdk": "^2.802.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index 32b042e82cd57..c692953141b1e 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -75,7 +75,7 @@ "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", "@types/yaml": "1.9.6", - "aws-sdk": "^2.799.0", + "aws-sdk": "^2.802.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index 9896ab215ce14..8f4a6c182f959 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -76,7 +76,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-codecommit": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", - "aws-sdk": "^2.799.0", + "aws-sdk": "^2.802.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index 0ea222263a87c..25f2b8ee57a3e 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -74,7 +74,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.799.0", + "aws-sdk": "^2.802.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-route53/package.json b/packages/@aws-cdk/aws-route53/package.json index 4277101fb5f53..e1145ffe231d4 100644 --- a/packages/@aws-cdk/aws-route53/package.json +++ b/packages/@aws-cdk/aws-route53/package.json @@ -74,7 +74,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.799.0", + "aws-sdk": "^2.802.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-sqs/package.json b/packages/@aws-cdk/aws-sqs/package.json index de27ec5f50003..7ecbf046d339c 100644 --- a/packages/@aws-cdk/aws-sqs/package.json +++ b/packages/@aws-cdk/aws-sqs/package.json @@ -75,7 +75,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.799.0", + "aws-sdk": "^2.802.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index 11cd5d7a8434c..97a5df0c054e3 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -80,7 +80,7 @@ "@types/aws-lambda": "^8.10.64", "@types/fs-extra": "^8.1.1", "@types/sinon": "^9.0.9", - "aws-sdk": "^2.799.0", + "aws-sdk": "^2.802.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 17d21ba509dd2..7bfee17d1ee1c 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -71,7 +71,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "archiver": "^5.1.0", - "aws-sdk": "^2.799.0", + "aws-sdk": "^2.802.0", "camelcase": "^6.2.0", "cdk-assets": "0.0.0", "colors": "^1.4.0", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index c98a74cf515e9..8bcc27443613a 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -47,7 +47,7 @@ "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "archiver": "^5.1.0", - "aws-sdk": "^2.799.0", + "aws-sdk": "^2.802.0", "glob": "^7.1.6", "yargs": "^16.1.1" }, diff --git a/yarn.lock b/yarn.lock index b990101903b6b..754826c387276 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2285,10 +2285,10 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" -aws-sdk@^2.637.0, aws-sdk@^2.799.0: - version "2.799.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.799.0.tgz#8b1a64c1a9f8ccf5794eb07bdd8051e4cb6adcfd" - integrity sha512-NYAoiNU+bJXhlJsC0rFqrmD5t5ho7/VxldmziP6HLPYHfOCI9Uvk6UVjfPmhLWPm0mHnIxhsHqmsNGyjhHNYmw== +aws-sdk@^2.637.0, aws-sdk@^2.802.0: + version "2.802.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.802.0.tgz#7215be2437c196f1b0b39a10feffdc1d1b980a62" + integrity sha512-PfjBr5Ag4PdcEYPrfMclVWk85kFSJNe7qllZBE8RhYNu+K+Z2pveKfYkC5mqYoKEYIQyI9by9N47F+Tqm1GXtg== dependencies: buffer "4.9.2" events "1.1.1" From 869c884a9bd02a5fa116a8339ef7a6cedbeb33ac Mon Sep 17 00:00:00 2001 From: Penghao He Date: Tue, 1 Dec 2020 20:40:56 -0800 Subject: [PATCH 255/314] feat(ecs-patterns): allow to select vpc subnets for LB fargate service (#11823) Fixes #8621. Allow LB Fargate service pattern to be able to select vpc subnets that are used to place tasks. *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-ecs-patterns/README.md | 16 +++++++ ...plication-load-balanced-fargate-service.ts | 10 +++- .../network-load-balanced-fargate-service.ts | 9 ++++ .../test.load-balanced-fargate-service.ts | 46 +++++++++++++++++++ 4 files changed, 80 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-ecs-patterns/README.md b/packages/@aws-cdk/aws-ecs-patterns/README.md index df15fed648e21..e799d7f35d84b 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/README.md +++ b/packages/@aws-cdk/aws-ecs-patterns/README.md @@ -387,3 +387,19 @@ const queueProcessingFargateService = new QueueProcessingFargateService(stack, ' }); ``` +### Select specific vpc subnets for ApplicationLoadBalancedFargateService + +```ts +const loadBalancedFargateService = new ApplicationLoadBalancedFargateService(stack, 'Service', { + cluster, + memoryLimitMiB: 1024, + desiredCount: 1, + cpu: 512, + taskImageOptions: { + image: ecs.ContainerImage.fromRegistry("amazon/amazon-ecs-sample"), + }, + vpcSubnets: { + subnets: [ec2.Subnet.fromSubnetId(stack, 'subnet', 'VpcISOLATEDSubnet1Subnet80F07FA0')], + }, +}); +``` diff --git a/packages/@aws-cdk/aws-ecs-patterns/lib/fargate/application-load-balanced-fargate-service.ts b/packages/@aws-cdk/aws-ecs-patterns/lib/fargate/application-load-balanced-fargate-service.ts index 79aa89524756b..a8a43a6736326 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/lib/fargate/application-load-balanced-fargate-service.ts +++ b/packages/@aws-cdk/aws-ecs-patterns/lib/fargate/application-load-balanced-fargate-service.ts @@ -1,4 +1,4 @@ -import { ISecurityGroup } from '@aws-cdk/aws-ec2'; +import { ISecurityGroup, SubnetSelection } from '@aws-cdk/aws-ec2'; import { FargatePlatformVersion, FargateService, FargateTaskDefinition } from '@aws-cdk/aws-ecs'; import { Construct } from 'constructs'; import { ApplicationLoadBalancedServiceBase, ApplicationLoadBalancedServiceBaseProps } from '../base/application-load-balanced-service-base'; @@ -66,6 +66,13 @@ export interface ApplicationLoadBalancedFargateServiceProps extends ApplicationL */ readonly assignPublicIp?: boolean; + /** + * The subnets to associate with the service. + * + * @default - Public subnets if `assignPublicIp` is set, otherwise the first available one of Private, Isolated, Public, in that order. + */ + readonly taskSubnets?: SubnetSelection; + /** * The platform version on which to run your service. * @@ -160,6 +167,7 @@ export class ApplicationLoadBalancedFargateService extends ApplicationLoadBalanc cloudMapOptions: props.cloudMapOptions, platformVersion: props.platformVersion, securityGroups: props.securityGroups, + vpcSubnets: props.taskSubnets, }); this.addServiceAsTarget(this.service); } diff --git a/packages/@aws-cdk/aws-ecs-patterns/lib/fargate/network-load-balanced-fargate-service.ts b/packages/@aws-cdk/aws-ecs-patterns/lib/fargate/network-load-balanced-fargate-service.ts index 3111ccf8d2746..6246cc3d23c45 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/lib/fargate/network-load-balanced-fargate-service.ts +++ b/packages/@aws-cdk/aws-ecs-patterns/lib/fargate/network-load-balanced-fargate-service.ts @@ -1,3 +1,4 @@ +import { SubnetSelection } from '@aws-cdk/aws-ec2'; import { FargatePlatformVersion, FargateService, FargateTaskDefinition } from '@aws-cdk/aws-ecs'; import { Construct } from 'constructs'; import { NetworkLoadBalancedServiceBase, NetworkLoadBalancedServiceBaseProps } from '../base/network-load-balanced-service-base'; @@ -65,6 +66,13 @@ export interface NetworkLoadBalancedFargateServiceProps extends NetworkLoadBalan */ readonly assignPublicIp?: boolean; + /** + * The subnets to associate with the service. + * + * @default - Public subnets if `assignPublicIp` is set, otherwise the first available one of Private, Isolated, Public, in that order. + */ + readonly taskSubnets?: SubnetSelection; + /** * The platform version on which to run your service. * @@ -147,6 +155,7 @@ export class NetworkLoadBalancedFargateService extends NetworkLoadBalancedServic enableECSManagedTags: props.enableECSManagedTags, cloudMapOptions: props.cloudMapOptions, platformVersion: props.platformVersion, + vpcSubnets: props.taskSubnets, }); this.addServiceAsTarget(this.service); } diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/test.load-balanced-fargate-service.ts b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/test.load-balanced-fargate-service.ts index 0f6be905dca30..84ee226b7e805 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/test.load-balanced-fargate-service.ts +++ b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/test.load-balanced-fargate-service.ts @@ -229,6 +229,52 @@ export = { test.done(); }, + 'selecting correct vpcSubnets'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const vpc = new ec2.Vpc(stack, 'Vpc', { + maxAzs: 2, + subnetConfiguration: [ + { + subnetType: ec2.SubnetType.PUBLIC, + cidrMask: 20, + name: 'Public', + }, + { + subnetType: ec2.SubnetType.ISOLATED, + cidrMask: 20, + name: 'ISOLATED', + }, + ], + }); + // WHEN + new ecsPatterns.ApplicationLoadBalancedFargateService(stack, 'Service', { + vpc, + taskImageOptions: { + image: ecs.ContainerImage.fromRegistry('/aws/aws-example-app'), + }, + taskSubnets: { + subnetType: ec2.SubnetType.ISOLATED, + }, + }); + // THEN + expect(stack).to(haveResourceLike('AWS::ECS::Service', { + NetworkConfiguration: { + AwsvpcConfiguration: { + Subnets: [ + { + Ref: 'VpcISOLATEDSubnet1Subnet80F07FA0', + }, + { + Ref: 'VpcISOLATEDSubnet2SubnetB0B548C3', + }, + ], + }, + }, + })); + test.done(); + }, + 'target group uses HTTP/80 as default'(test: Test) { // GIVEN const stack = new cdk.Stack(); From 968df9715123d92ef6be302cd6c852a14c350856 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 2 Dec 2020 09:54:43 +0000 Subject: [PATCH 256/314] chore(deps-dev): bump @types/eslint from 7.2.5 to 7.2.6 (#11831) Bumps [@types/eslint](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/eslint) from 7.2.5 to 7.2.6. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/eslint) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- tools/eslint-plugin-cdk/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/eslint-plugin-cdk/package.json b/tools/eslint-plugin-cdk/package.json index b168e218eca59..fa6a38426ec20 100644 --- a/tools/eslint-plugin-cdk/package.json +++ b/tools/eslint-plugin-cdk/package.json @@ -12,7 +12,7 @@ "build+test": "npm run build && npm test" }, "devDependencies": { - "@types/eslint": "^7.2.5", + "@types/eslint": "^7.2.6", "@types/fs-extra": "^8.1.1", "@types/jest": "^26.0.15", "@types/node": "^10.17.48", diff --git a/yarn.lock b/yarn.lock index 754826c387276..c8df9dd1ba3fc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1528,10 +1528,10 @@ dependencies: "@babel/types" "^7.3.0" -"@types/eslint@^7.2.5": - version "7.2.5" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.2.5.tgz#92172ecf490c2fce4b076739693d75f30376d610" - integrity sha512-Dc6ar9x16BdaR3NSxSF7T4IjL9gxxViJq8RmFd+2UAyA+K6ck2W+gUwfgpG/y9TPyUuBL35109bbULpEynvltA== +"@types/eslint@^7.2.6": + version "7.2.6" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.2.6.tgz#5e9aff555a975596c03a98b59ecd103decc70c3c" + integrity sha512-I+1sYH+NPQ3/tVqCeUSBwTE/0heyvtXqpIopUUArlBm0Kpocb8FbMa3AZ/ASKIFpN3rnEx932TTXDbt9OXsNDw== dependencies: "@types/estree" "*" "@types/json-schema" "*" From 0b0abe4ca541db2a1ad56b778886df32fd3f158d Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Wed, 2 Dec 2020 11:51:06 +0000 Subject: [PATCH 257/314] chore: fix integ tests leaking bootstrap buckets (#11833) The bootstrap default template was changed in #11547 to set the deletion policy of the staging bucket to `Retain`. This has the impact of the integration tests now accumulating buckets on each run, quickly exhausting the buckets/account limits. Explicitly delete the staging bucket after the stack is deleted so we stop leaking buckets on each run. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/aws-cdk/test/integ/cli/cdk-helpers.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/aws-cdk/test/integ/cli/cdk-helpers.ts b/packages/aws-cdk/test/integ/cli/cdk-helpers.ts index cc38e7ec54cfa..f57ce2aee018a 100644 --- a/packages/aws-cdk/test/integ/cli/cdk-helpers.ts +++ b/packages/aws-cdk/test/integ/cli/cdk-helpers.ts @@ -240,6 +240,8 @@ export class TestFixture { // Bootstrap stacks have buckets that need to be cleaned const bucketNames = stacksToDelete.map(stack => outputFromStack('BucketName', stack)).filter(defined); await Promise.all(bucketNames.map(b => this.aws.emptyBucket(b))); + // The bootstrap bucket has a removal policy of RETAIN by default, so add it to the buckets to be cleaned up. + this.bucketsToDelete.push(...bucketNames); // Bootstrap stacks have ECR repositories with images which should be deleted const imageRepositoryNames = stacksToDelete.map(stack => outputFromStack('ImageRepositoryName', stack)).filter(defined); @@ -405,4 +407,4 @@ export function rimraf(fsPath: string) { export function randomString() { // Crazy return Math.random().toString(36).replace(/[^a-z0-9]+/g, ''); -} \ No newline at end of file +} From 2b1160fed0fd3ac9fefbe40d45825c7fe0b46e9e Mon Sep 17 00:00:00 2001 From: Romain Marcadier Date: Wed, 2 Dec 2020 13:30:54 +0100 Subject: [PATCH 258/314] chore(cdk-lint): add linting to README.md files (#11708) Consistent heading structure in the `README.md` files is necessary in order to ensure consistent rendering in the Python documentation, as the rendering of the TOC tree is dependent on heading levels. The best experience is achieved by having all `README.md` files start with a `H1` heading, and subsequently contain only `H2` and deeper headings. It is also important that no heading level is skipped (i.e: a `H4` "nested" in a `H2`). This adds a `cdk-lint` stage that executes `markdownlint` on the `README.md` files, with a configuration that is crafted specifically to maximize compatibility with most Markdown parsers, and to ensure correct rendering in the Python docs. Many of these offenses can be automatically fixed by running `cdk-lint --fix` or `yarn lint --fix`, however some cannot be automatically fixed by the tool and will require human intervention. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- README.md | 10 +- .../ecs-service-extensions/README.md | 18 +- packages/@aws-cdk/alexa-ask/README.md | 16 +- packages/@aws-cdk/app-delivery/README.md | 23 +- packages/@aws-cdk/assert/README.md | 29 ++- packages/@aws-cdk/assets/README.md | 6 +- .../@aws-cdk/aws-accessanalyzer/README.md | 8 +- packages/@aws-cdk/aws-acmpca/README.md | 8 +- packages/@aws-cdk/aws-amazonmq/README.md | 8 +- packages/@aws-cdk/aws-amplify/README.md | 33 ++- packages/@aws-cdk/aws-apigateway/README.md | 18 +- .../aws-apigatewayv2-integrations/README.md | 10 +- packages/@aws-cdk/aws-apigatewayv2/README.md | 30 ++- packages/@aws-cdk/aws-appconfig/README.md | 8 +- packages/@aws-cdk/aws-appflow/README.md | 8 +- .../aws-applicationautoscaling/README.md | 16 +- .../aws-applicationinsights/README.md | 8 +- packages/@aws-cdk/aws-appmesh/README.md | 56 +++-- packages/@aws-cdk/aws-appstream/README.md | 8 +- packages/@aws-cdk/aws-appsync/README.md | 104 +++++---- packages/@aws-cdk/aws-athena/README.md | 8 +- .../@aws-cdk/aws-autoscaling-common/README.md | 12 +- .../aws-autoscaling-hooktargets/README.md | 2 + packages/@aws-cdk/aws-autoscaling/README.md | 38 ++-- .../@aws-cdk/aws-autoscalingplans/README.md | 8 +- packages/@aws-cdk/aws-backup/README.md | 19 +- packages/@aws-cdk/aws-batch/README.md | 24 +- packages/@aws-cdk/aws-budgets/README.md | 8 +- packages/@aws-cdk/aws-cassandra/README.md | 8 +- packages/@aws-cdk/aws-ce/README.md | 8 +- .../@aws-cdk/aws-certificatemanager/README.md | 16 +- packages/@aws-cdk/aws-chatbot/README.md | 16 +- packages/@aws-cdk/aws-cloud9/README.md | 18 +- .../@aws-cdk/aws-cloudformation/README.md | 4 +- .../@aws-cdk/aws-cloudfront-origins/README.md | 9 +- packages/@aws-cdk/aws-cloudfront/README.md | 36 ++- packages/@aws-cdk/aws-cloudtrail/README.md | 6 +- .../@aws-cdk/aws-cloudwatch-actions/README.md | 4 +- packages/@aws-cdk/aws-cloudwatch/README.md | 4 +- packages/@aws-cdk/aws-codeartifact/README.md | 8 +- packages/@aws-cdk/aws-codebuild/README.md | 42 ++-- packages/@aws-cdk/aws-codecommit/README.md | 4 +- packages/@aws-cdk/aws-codedeploy/README.md | 27 ++- .../@aws-cdk/aws-codeguruprofiler/README.md | 20 +- .../@aws-cdk/aws-codegurureviewer/README.md | 8 +- .../aws-codepipeline-actions/README.md | 56 ++--- packages/@aws-cdk/aws-codepipeline/README.md | 44 ++-- packages/@aws-cdk/aws-codestar/README.md | 14 +- .../aws-codestarconnections/README.md | 8 +- .../aws-codestarnotifications/README.md | 8 +- packages/@aws-cdk/aws-cognito/README.md | 38 ++-- packages/@aws-cdk/aws-config/README.md | 46 ++-- packages/@aws-cdk/aws-databrew/README.md | 6 +- packages/@aws-cdk/aws-datapipeline/README.md | 8 +- packages/@aws-cdk/aws-dax/README.md | 8 +- packages/@aws-cdk/aws-detective/README.md | 8 +- .../@aws-cdk/aws-directoryservice/README.md | 8 +- packages/@aws-cdk/aws-dlm/README.md | 8 +- packages/@aws-cdk/aws-dms/README.md | 8 +- packages/@aws-cdk/aws-docdb/README.md | 26 ++- .../@aws-cdk/aws-dynamodb-global/README.md | 9 +- packages/@aws-cdk/aws-dynamodb/README.md | 18 +- packages/@aws-cdk/aws-ec2/README.md | 6 +- packages/@aws-cdk/aws-ecr-assets/README.md | 17 +- packages/@aws-cdk/aws-ecr/README.md | 10 +- packages/@aws-cdk/aws-ecs-patterns/README.md | 2 + packages/@aws-cdk/aws-ecs/README.md | 21 +- packages/@aws-cdk/aws-efs/README.md | 22 +- packages/@aws-cdk/aws-eks-legacy/README.md | 11 +- packages/@aws-cdk/aws-eks/README.md | 76 ++++--- packages/@aws-cdk/aws-elasticache/README.md | 8 +- .../@aws-cdk/aws-elasticbeanstalk/README.md | 8 +- .../aws-elasticloadbalancing/README.md | 6 +- .../README.md | 2 + .../README.md | 8 +- .../aws-elasticloadbalancingv2/README.md | 26 ++- packages/@aws-cdk/aws-elasticsearch/README.md | 42 ++-- packages/@aws-cdk/aws-emr/README.md | 8 +- .../@aws-cdk/aws-events-targets/README.md | 2 + packages/@aws-cdk/aws-events/README.md | 9 +- packages/@aws-cdk/aws-eventschemas/README.md | 8 +- packages/@aws-cdk/aws-fms/README.md | 8 +- packages/@aws-cdk/aws-fsx/README.md | 14 +- packages/@aws-cdk/aws-gamelift/README.md | 8 +- .../@aws-cdk/aws-globalaccelerator/README.md | 32 ++- packages/@aws-cdk/aws-glue/README.md | 44 ++-- packages/@aws-cdk/aws-greengrass/README.md | 8 +- packages/@aws-cdk/aws-guardduty/README.md | 8 +- packages/@aws-cdk/aws-iam/README.md | 28 +-- packages/@aws-cdk/aws-imagebuilder/README.md | 8 +- packages/@aws-cdk/aws-inspector/README.md | 8 +- packages/@aws-cdk/aws-iot/README.md | 8 +- packages/@aws-cdk/aws-iot1click/README.md | 8 +- packages/@aws-cdk/aws-iotanalytics/README.md | 8 +- packages/@aws-cdk/aws-iotevents/README.md | 8 +- packages/@aws-cdk/aws-iotsitewise/README.md | 8 +- .../@aws-cdk/aws-iotthingsgraph/README.md | 8 +- packages/@aws-cdk/aws-ivs/README.md | 8 +- packages/@aws-cdk/aws-kendra/README.md | 8 +- packages/@aws-cdk/aws-kinesis/README.md | 4 +- .../@aws-cdk/aws-kinesisanalytics/README.md | 8 +- .../@aws-cdk/aws-kinesisfirehose/README.md | 8 +- packages/@aws-cdk/aws-kms/README.md | 10 +- packages/@aws-cdk/aws-lakeformation/README.md | 8 +- .../aws-lambda-destinations/README.md | 7 +- .../aws-lambda-event-sources/README.md | 14 +- packages/@aws-cdk/aws-lambda-nodejs/README.md | 37 ++- packages/@aws-cdk/aws-lambda-python/README.md | 21 +- packages/@aws-cdk/aws-lambda/README.md | 50 +++-- .../@aws-cdk/aws-logs-destinations/README.md | 2 + packages/@aws-cdk/aws-logs/README.md | 26 ++- packages/@aws-cdk/aws-macie/README.md | 8 +- .../@aws-cdk/aws-managedblockchain/README.md | 8 +- packages/@aws-cdk/aws-mediaconvert/README.md | 8 +- packages/@aws-cdk/aws-medialive/README.md | 8 +- packages/@aws-cdk/aws-mediapackage/README.md | 8 +- packages/@aws-cdk/aws-mediastore/README.md | 8 +- packages/@aws-cdk/aws-msk/README.md | 8 +- packages/@aws-cdk/aws-neptune/README.md | 8 +- .../@aws-cdk/aws-networkfirewall/README.md | 6 +- .../@aws-cdk/aws-networkmanager/README.md | 8 +- packages/@aws-cdk/aws-opsworks/README.md | 8 +- packages/@aws-cdk/aws-opsworkscm/README.md | 8 +- packages/@aws-cdk/aws-pinpoint/README.md | 8 +- packages/@aws-cdk/aws-pinpointemail/README.md | 8 +- packages/@aws-cdk/aws-qldb/README.md | 8 +- packages/@aws-cdk/aws-ram/README.md | 8 +- packages/@aws-cdk/aws-rds/README.md | 38 ++-- packages/@aws-cdk/aws-redshift/README.md | 21 +- .../@aws-cdk/aws-resourcegroups/README.md | 8 +- packages/@aws-cdk/aws-robomaker/README.md | 8 +- .../@aws-cdk/aws-route53-patterns/README.md | 2 + .../@aws-cdk/aws-route53-targets/README.md | 17 ++ packages/@aws-cdk/aws-route53/README.md | 13 +- .../@aws-cdk/aws-route53resolver/README.md | 14 +- packages/@aws-cdk/aws-s3-assets/README.md | 16 +- packages/@aws-cdk/aws-s3-deployment/README.md | 39 ++-- .../@aws-cdk/aws-s3-notifications/README.md | 6 +- packages/@aws-cdk/aws-s3/README.md | 35 +-- packages/@aws-cdk/aws-sagemaker/README.md | 8 +- packages/@aws-cdk/aws-sam/README.md | 10 +- packages/@aws-cdk/aws-sdb/README.md | 8 +- .../@aws-cdk/aws-secretsmanager/README.md | 20 +- packages/@aws-cdk/aws-securityhub/README.md | 8 +- .../@aws-cdk/aws-servicecatalog/README.md | 8 +- .../@aws-cdk/aws-servicediscovery/README.md | 10 +- packages/@aws-cdk/aws-ses-actions/README.md | 11 +- packages/@aws-cdk/aws-ses/README.md | 29 ++- packages/@aws-cdk/aws-signer/README.md | 8 +- .../@aws-cdk/aws-sns-subscriptions/README.md | 2 + packages/@aws-cdk/aws-sns/README.md | 15 +- packages/@aws-cdk/aws-sqs/README.md | 12 +- packages/@aws-cdk/aws-ssm/README.md | 11 +- packages/@aws-cdk/aws-sso/README.md | 8 +- .../aws-stepfunctions-tasks/README.md | 2 + packages/@aws-cdk/aws-stepfunctions/README.md | 47 ++-- packages/@aws-cdk/aws-synthetics/README.md | 38 ++-- packages/@aws-cdk/aws-timestream/README.md | 8 +- packages/@aws-cdk/aws-transfer/README.md | 8 +- packages/@aws-cdk/aws-waf/README.md | 8 +- packages/@aws-cdk/aws-wafregional/README.md | 8 +- packages/@aws-cdk/aws-wafv2/README.md | 8 +- packages/@aws-cdk/aws-workspaces/README.md | 8 +- packages/@aws-cdk/cdk-assets-schema/README.md | 4 +- packages/@aws-cdk/cfnspec/README.md | 5 +- .../build-tools/create-missing-libraries.ts | 2 +- .../@aws-cdk/cloud-assembly-schema/README.md | 7 +- .../@aws-cdk/cloudformation-diff/README.md | 10 +- .../@aws-cdk/cloudformation-include/README.md | 65 +++--- .../cloudformation-include/lib/cfn-include.ts | 2 +- packages/@aws-cdk/core/README.md | 21 +- packages/@aws-cdk/custom-resources/README.md | 54 ++--- packages/@aws-cdk/cx-api/README.md | 10 +- .../example-construct-library/README.md | 4 +- packages/@aws-cdk/pipelines/README.md | 37 +-- packages/@aws-cdk/region-info/README.md | 13 +- packages/@aws-cdk/yaml-cfn/README.md | 11 +- .../rewrite-imports/README.md | 10 +- .../rewrite-imports/bin/rewrite-imports.ts | 2 +- .../rewrite-imports/package.json | 1 + packages/aws-cdk-lib/README.md | 1 + packages/aws-cdk/README.md | 75 +++++-- packages/awslint/README.md | 9 +- packages/cdk-assets/README.md | 12 +- packages/monocdk/README.md | 2 + .../cdk-build-tools/config/markdownlint.json | 30 +++ tools/cdk-build-tools/lib/lint.ts | 23 +- tools/cdk-build-tools/package.json | 3 +- tools/cdk-build-tools/tsconfig.json | 3 +- tools/cdk-integ-tools/README.md | 6 +- .../lib/banners/features-cfn-stable.md | 5 +- .../lib/banners/features-developer-preview.md | 7 +- .../lib/banners/features-experimental.md | 6 +- tools/pkglint/lib/banners/features-stable.md | 3 +- tools/pkglint/lib/banners/l1.cfn-only.md | 4 +- .../lib/banners/l1.developer-preview.md | 4 +- tools/pkglint/lib/banners/l1.experimental.md | 4 +- .../lib/banners/l2.developer-preview.md | 6 +- tools/pkglint/lib/banners/l2.experimental.md | 6 +- tools/pkglint/lib/rules.ts | 36 ++- tools/pkglint/test/rules.test.ts | 8 +- tools/pkglint/tsconfig.json | 1 - tools/pkgtools/README.md | 3 +- tools/ubergen/README.md | 2 +- tools/ubergen/package.json | 1 + yarn.lock | 211 ++++++++++++++++-- 206 files changed, 2187 insertions(+), 1008 deletions(-) create mode 100644 tools/cdk-build-tools/config/markdownlint.json diff --git a/README.md b/README.md index 701efa30200be..79e66ffa1f12d 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Modules in the AWS Construct Library are designated Experimental while we build them; experimental modules may have breaking API changes in any release. After a module is designated Stable, it adheres to [semantic versioning](https://semver.org/), and only major releases can have breaking changes. Each module's stability designation -is available on its Overview page in the [AWS CDK API Reference](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-construct-library.html). +is available on its Overview page in the [AWS CDK API Reference](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-construct-library.html). For more information, see [Versioning](https://docs.aws.amazon.com/cdk/latest/guide/reference.html#versioning) in the CDK Developer Guide. @@ -77,7 +77,7 @@ For a detailed walkthrough, see the [tutorial](https://docs.aws.amazon.com/cdk/l Install or update the [AWS CDK CLI] from npm (requires [Node.js ≥ 10.13.0](https://nodejs.org/download/release/latest-v10.x/)). We recommend using a version in [Active LTS](https://nodejs.org/en/about/releases/) ⚠️ versions `13.0.0` to `13.6.0` are not supported due to compatibility issues with our dependencies. -```bash +```console $ npm i -g aws-cdk ``` @@ -85,7 +85,7 @@ $ npm i -g aws-cdk Initialize a project: -```bash +```console $ mkdir hello-cdk $ cd hello-cdk $ cdk init sample-app --language=typescript @@ -111,7 +111,7 @@ export class HelloCdkStack extends cdk.Stack { Deploy this to your account: -```bash +```console $ cdk deploy ``` @@ -148,4 +148,4 @@ environment and submit code. * [Examples](https://github.com/aws-samples/aws-cdk-examples) * [Changelog](./CHANGELOG.md) * [NOTICE](./NOTICE) -* [License](./LICENSE) +* [License](./LICENSE) diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/README.md b/packages/@aws-cdk-containers/ecs-service-extensions/README.md index cbca327f0ee12..da884a7aa85bd 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/README.md +++ b/packages/@aws-cdk-containers/ecs-service-extensions/README.md @@ -1,10 +1,12 @@ # CDK Construct library for building ECS services + --- ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + This library provides a high level, extensible pattern for constructing services @@ -182,34 +184,34 @@ requiring decentralized updates to many different services. Every `ServiceExtension` can implement the following hooks to modify the properties of constructs, or make use of the resulting constructs: -* `addHooks()` - This hook is called after all the extensions are added to a +- `addHooks()` - This hook is called after all the extensions are added to a ServiceDescription, but before any of the other extension hooks have been run. It gives each extension a chance to do some inspection of the overall ServiceDescription and see what other extensions have been added. Some extensions may want to register hooks on the other extensions to modify them. For example, the Firelens extension wants to be able to modify the settings of the application container to route logs through Firelens. -* `modifyTaskDefinitionProps()` - This is hook is passed the proposed +- `modifyTaskDefinitionProps()` - This is hook is passed the proposed ecs.TaskDefinitionProps for a TaskDefinition that is about to be created. This allows the extension to make modifications to the task definition props before the TaskDefinition is created. For example, the App Mesh extension modifies the proxy settings for the task. -* `useTaskDefinition()` - After the TaskDefinition is created, this hook is +- `useTaskDefinition()` - After the TaskDefinition is created, this hook is passed the actual TaskDefinition construct that was created. This allows the extension to add containers to the task, modify the task definition's IAM role, etc. -* `resolveContainerDependencies()` - Once all extensions have added their containers, +- `resolveContainerDependencies()` - Once all extensions have added their containers, each extension is given a chance to modify its container's `dependsOn` settings. Extensions need to check and see what other extensions were enabled and decide whether their container needs to wait on another container to start first. -* `modifyServiceProps()` - Before an Ec2Service or FargateService is created, this +- `modifyServiceProps()` - Before an Ec2Service or FargateService is created, this hook is passed a draft version of the service props to change. Each extension adds its own modifications to the service properties. For example, the App Mesh extension needs to modify the service settings to enable CloudMap service discovery. -* `useService()` - After the service is created, this hook is given a chance to +- `useService()` - After the service is created, this hook is given a chance to utilize that service. This is used by extensions like the load balancer or App Mesh extension, which create and link other AWS resources to the ECS extension. -* `connectToService()` - This hook is called when a user wants to connect one service +- `connectToService()` - This hook is called when a user wants to connect one service to another service. It allows an extension to implement logic about how to allow connections from one service to another. For example, the App Mesh extension implements this method in order to easily connect one service mesh service to another, which @@ -305,7 +307,7 @@ const environment = Environment.fromEnvironmentAttributes(stack, 'Environment', We encourage the development of Community Service Extensions that support advanced features. Here are some useful extensions that we have reviewed: -* [ListenerRulesExtension](https://www.npmjs.com/package/@wheatstalk/ecs-service-extension-listener-rules) for more precise control over Application Load Balancer rules +- [ListenerRulesExtension](https://www.npmjs.com/package/@wheatstalk/ecs-service-extension-listener-rules) for more precise control over Application Load Balancer rules > Please submit a pull request so that we can review your service extension and > list it here. diff --git a/packages/@aws-cdk/alexa-ask/README.md b/packages/@aws-cdk/alexa-ask/README.md index fcf3976ab1057..125b909867ec7 100644 --- a/packages/@aws-cdk/alexa-ask/README.md +++ b/packages/@aws-cdk/alexa-ask/README.md @@ -1,18 +1,26 @@ -## Alexa Skills Kit Construct Library +# Alexa Skills Kit Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + ```ts import * as alexaAsk from '@aws-cdk/alexa-ask'; -``` \ No newline at end of file +``` diff --git a/packages/@aws-cdk/app-delivery/README.md b/packages/@aws-cdk/app-delivery/README.md index 9430ac2e21302..a60f4590dc39f 100644 --- a/packages/@aws-cdk/app-delivery/README.md +++ b/packages/@aws-cdk/app-delivery/README.md @@ -1,5 +1,6 @@ -## Continuous Integration / Continuous Delivery for CDK Applications +# Continuous Integration / Continuous Delivery for CDK Applications + --- ![Deprecated](https://img.shields.io/badge/deprecated-critical.svg?style=for-the-badge) @@ -7,6 +8,7 @@ > This API may emit warnings. Backward compatibility is not guaranteed. --- + This library includes a *CodePipeline* composite Action for deploying AWS CDK Applications. @@ -14,27 +16,31 @@ This library includes a *CodePipeline* composite Action for deploying AWS CDK Ap This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. -### Replacement recommended +## Replacement recommended This library has been deprecated. We recommend you use the [@aws-cdk/pipelines](https://docs.aws.amazon.com/cdk/api/latest/docs/pipelines-readme.html) module instead. -### Limitations +## Limitations + The construct library in it's current form has the following limitations: + 1. It can only deploy stacks that are hosted in the same AWS account and region as the *CodePipeline* is. 2. Stacks that make use of `Asset`s cannot be deployed successfully. -### Getting Started +## Getting Started + In order to add the `PipelineDeployStackAction` to your *CodePipeline*, you need to have a *CodePipeline* artifact that contains the result of invoking `cdk synth -o ` on your *CDK App*. You can for example achieve this using a *CodeBuild* project. The example below defines a *CDK App* that contains 3 stacks: + * `CodePipelineStack` manages the *CodePipeline* resources, and self-updates before deploying any other stack * `ServiceStackA` and `ServiceStackB` are service infrastructure stacks, and need to be deployed in this order -``` +```plaintext ┏━━━━━━━━━━━━━━━━┓ ┏━━━━━━━━━━━━━━━━┓ ┏━━━━━━━━━━━━━━━━━┓ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Source ┃ ┃ Build ┃ ┃ Self-Update ┃ ┃ Deploy ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ @@ -45,9 +51,9 @@ The example below defines a *CDK App* that contains 3 stacks: ┗━━━━━━━━━━━━━━━━┛ ┗━━━━━━━━━━━━━━━━┛ ┗━━━━━━━━━━━━━━━━━┛ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ``` -#### `index.ts` +### `index.ts` -```typescript +```ts import * as codebuild from '@aws-cdk/aws-codebuild'; import * as codepipeline from '@aws-cdk/aws-codepipeline'; import * as codepipeline_actions from '@aws-cdk/aws-codepipeline-actions'; @@ -138,7 +144,8 @@ deployStage.addAction(new cicd.PipelineDeployStackAction({ })); ``` -#### `buildspec.yml` +### `buildspec.yml` + The repository can contain a file at the root level named `buildspec.yml`, or you can in-line the buildspec. Note that `buildspec.yaml` is not compatible. diff --git a/packages/@aws-cdk/assert/README.md b/packages/@aws-cdk/assert/README.md index 1c8eb3bd30c05..9256b46d2b154 100644 --- a/packages/@aws-cdk/assert/README.md +++ b/packages/@aws-cdk/assert/README.md @@ -1,17 +1,23 @@ -## Testing utilities and assertions for CDK libraries +# Testing utilities and assertions for CDK libraries + --- ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + This library contains helpers for writing unit tests and integration tests for CDK libraries -### Unit tests +## Unit tests Write your unit tests like this: @@ -27,7 +33,7 @@ expect(stack).to(someExpectation(...)); Here are the expectations you can use: -### Verify (parts of) a template +## Verify (parts of) a template Check that the synthesized stack template looks like the given template, or is a superset of it. These functions match logical IDs and all properties of a resource. @@ -57,7 +63,7 @@ expect(stack).to(beASupersetOfTemplate({ ``` -### Check existence of a resource +## Check existence of a resource If you only care that a resource of a particular type exists (regardless of its logical identifier), and that *some* of its properties are set to specific values: @@ -114,13 +120,13 @@ expect(stack).to(haveResourceLike('AWS::IAM::Policy', { })); ``` -### Capturing values from a match +## Capturing values from a match Special `Capture` matchers exist to capture values encountered during a match. These can be used for two typical purposes: -* Apply additional assertions to the values found during a matching operation. -* Use the value found during a matching operation in a new matching operation. +- Apply additional assertions to the values found during a matching operation. +- Use the value found during a matching operation in a new matching operation. `Capture` matchers take an inner matcher as an argument, and will only capture the value if the inner matcher succeeds in matching the given value. @@ -173,7 +179,7 @@ same value: the last value encountered by the `Capture` (as determined by the behavior of the matchers around it) is stored into it and will be the one available after the match has completed. -### Check number of resources +## Check number of resources If you want to assert that `n` number of resources of a particular type exist, with or without specific properties: @@ -194,9 +200,11 @@ expect(stack).to(countResourcesLike('AWS::ApiGateway::Method', 1, { })); ``` -### Check existence of an output +## Check existence of an output + `haveOutput` assertion can be used to check that a stack contains specific output. Parameters to check against can be: + - `outputName` - `outputValue` - `exportName` @@ -204,6 +212,7 @@ Parameters to check against can be: If `outputValue` is provided, at least one of `outputName`, `exportName` should be provided as well Example + ```ts expect(synthStack).to(haveOutput({ outputName: 'TestOutputName', diff --git a/packages/@aws-cdk/assets/README.md b/packages/@aws-cdk/assets/README.md index 6ebca5ae0d9e6..aac70ac108a12 100644 --- a/packages/@aws-cdk/assets/README.md +++ b/packages/@aws-cdk/assets/README.md @@ -1,5 +1,6 @@ -## AWS CDK Assets +# AWS CDK Assets + --- ![Deprecated](https://img.shields.io/badge/deprecated-critical.svg?style=for-the-badge) @@ -7,6 +8,7 @@ > This API may emit warnings. Backward compatibility is not guaranteed. --- + -All types moved to @aws-cdk/core. \ No newline at end of file +All types moved to @aws-cdk/core. diff --git a/packages/@aws-cdk/aws-accessanalyzer/README.md b/packages/@aws-cdk/aws-accessanalyzer/README.md index a18f912d84f4b..c17d07f97b27d 100644 --- a/packages/@aws-cdk/aws-accessanalyzer/README.md +++ b/packages/@aws-cdk/aws-accessanalyzer/README.md @@ -1,12 +1,16 @@ -## AWS::AccessAnalyzer Construct Library +# AWS::AccessAnalyzer Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-acmpca/README.md b/packages/@aws-cdk/aws-acmpca/README.md index 75c12e4a771eb..fd3c39c9f5e4c 100644 --- a/packages/@aws-cdk/aws-acmpca/README.md +++ b/packages/@aws-cdk/aws-acmpca/README.md @@ -1,12 +1,16 @@ -## AWS::ACMPCA Construct Library +# AWS::ACMPCA Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-amazonmq/README.md b/packages/@aws-cdk/aws-amazonmq/README.md index 11d878559a571..db1446c38060c 100644 --- a/packages/@aws-cdk/aws-amazonmq/README.md +++ b/packages/@aws-cdk/aws-amazonmq/README.md @@ -1,12 +1,16 @@ -## Amazon MQ Construct Library +# Amazon MQ Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + ```ts diff --git a/packages/@aws-cdk/aws-amplify/README.md b/packages/@aws-cdk/aws-amplify/README.md index 49f8f5028c5ab..7c15079d914d6 100644 --- a/packages/@aws-cdk/aws-amplify/README.md +++ b/packages/@aws-cdk/aws-amplify/README.md @@ -1,22 +1,32 @@ -## AWS Amplify Construct Library +# AWS Amplify Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + The AWS Amplify Console provides a Git-based workflow for deploying and hosting fullstack serverless web applications. A fullstack serverless app consists of a backend built with cloud resources such as GraphQL or REST APIs, file and data storage, and a frontend built with single page application frameworks such as React, Angular, Vue, or Gatsby. -### Setting up an app with branches, custom rules and a domain +## Setting up an app with branches, custom rules and a domain + To set up an Amplify Console app, define an `App`: + ```ts import * as codebuild from '@aws-cdk/aws-codebuild'; import * as amplify from '@aws-cdk/aws-amplify'; @@ -53,6 +63,7 @@ const amplifyApp = new amplify.App(this, 'MyApp', { ``` To connect your `App` to GitLab, use the `GitLabSourceCodeProvider`: + ```ts const amplifyApp = new amplify.App(this, 'MyApp', { sourceCodeProvider: new amplify.GitLabSourceCodeProvider({ @@ -64,6 +75,7 @@ const amplifyApp = new amplify.App(this, 'MyApp', { ``` To connect your `App` to CodeCommit, use the `CodeCommitSourceCodeProvider`: + ```ts const repository = new codecommit.Repository(this, 'Repo', { repositoryName: 'my-repo' @@ -78,14 +90,17 @@ The IAM role associated with the `App` will automatically be granted the permiss to pull the CodeCommit repository. Add branches: + ```ts const master = amplifyApp.addBranch('master'); // `id` will be used as repo branch name const dev = amplifyApp.addBranch('dev'); dev.addEnvironment('STAGE', 'dev'); ``` + Auto build and pull request preview are enabled by default. Add custom rules for redirection: + ```ts amplifyApp.addCustomRule({ source: '/docs/specific-filename.html', @@ -105,6 +120,7 @@ mySinglePageApp.addCustomRule(amplify.CustomRule.SINGLE_PAGE_APPLICATION_REDIREC ``` Add a domain and map sub domains to branches: + ```ts const domain = amplifyApp.addDomain('example.com'); domain.mapRoot(master); // map master branch to domain root @@ -112,10 +128,12 @@ domain.mapSubDomain(master, 'www'); domain.mapSubDomain(dev); // sub domain prefix defaults to branch name ``` -### Restricting access +## Restricting access + Password protect the app with basic auth by specifying the `basicAuth` prop. Use `BasicAuth.fromCredentials` when referencing an existing secret: + ```ts const amplifyApp = new amplify.App(this, 'MyApp', { repository: 'https://github.com//', @@ -125,6 +143,7 @@ const amplifyApp = new amplify.App(this, 'MyApp', { ``` Use `BasicAuth.fromGeneratedPassword` to generate a password in Secrets Manager: + ```ts const amplifyApp = new amplify.App(this, 'MyApp', { repository: 'https://github.com//', @@ -134,13 +153,15 @@ const amplifyApp = new amplify.App(this, 'MyApp', { ``` Basic auth can be added to specific branches: + ```ts app.addBranch('feature/next', { basicAuth: amplify.BasicAuth.fromGeneratedPassword('username') }); ``` -### Automatically creating and deleting branches +## Automatically creating and deleting branches + Use the `autoBranchCreation` and `autoBranchDeletion` props to control creation/deletion of branches: diff --git a/packages/@aws-cdk/aws-apigateway/README.md b/packages/@aws-cdk/aws-apigateway/README.md index 2884630e6edb1..875ed1df174c3 100644 --- a/packages/@aws-cdk/aws-apigateway/README.md +++ b/packages/@aws-cdk/aws-apigateway/README.md @@ -1,6 +1,6 @@ -## Amazon API Gateway Construct Library - +# Amazon API Gateway Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -8,8 +8,10 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + + Amazon API Gateway is a fully managed service that makes it easy for developers to publish, maintain, monitor, and secure APIs at any scale. Create an API to access data, business logic, or functionality from your back-end services, such @@ -121,11 +123,11 @@ The following example uses sets up two Resources '/pets' and '/books' in separat Methods are associated with backend integrations, which are invoked when this method is called. API Gateway supports the following integrations: -* `MockIntegration` - can be used to test APIs. This is the default +- `MockIntegration` - can be used to test APIs. This is the default integration if one is not specified. -* `LambdaIntegration` - can be used to invoke an AWS Lambda function. -* `AwsIntegration` - can be used to invoke arbitrary AWS service APIs. -* `HttpIntegration` - can be used to invoke HTTP endpoints. +- `LambdaIntegration` - can be used to invoke an AWS Lambda function. +- `AwsIntegration` - can be used to invoke arbitrary AWS service APIs. +- `HttpIntegration` - can be used to invoke HTTP endpoints. The following example shows how to integrate the `GET /book/{book_id}` method to an AWS Lambda function: @@ -607,7 +609,7 @@ The URL of your API can be obtained from the attribute `restApi.url`, and is also exported as an `Output` from your stack, so it's printed when you `cdk deploy` your app: -``` +```console $ cdk deploy ... books.booksapiEndpointE230E8D5 = https://6lyktd4lpk.execute-api.us-east-1.amazonaws.com/prod/ @@ -932,7 +934,7 @@ const api = new apigw.RestApi(stack, 'api', { By performing this association, we can invoke the API gateway using the following format: -``` +```plaintext https://{rest-api-id}-{vpce-id}.execute-api.{region}.amazonaws.com/{stage} ``` diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/README.md b/packages/@aws-cdk/aws-apigatewayv2-integrations/README.md index 5aa7f03dc3c26..ee973a6186f56 100644 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/README.md +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/README.md @@ -1,12 +1,18 @@ -## AWS APIGatewayv2 Integrations +# AWS APIGatewayv2 Integrations + --- ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + ## Table of Contents diff --git a/packages/@aws-cdk/aws-apigatewayv2/README.md b/packages/@aws-cdk/aws-apigatewayv2/README.md index fafd04156f36a..297ec5ce2bfdb 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/README.md +++ b/packages/@aws-cdk/aws-apigatewayv2/README.md @@ -1,18 +1,29 @@ # AWS::APIGatewayv2 Construct Library + --- -| Features | Stability | -| --- | --- | -| CFN Resources | ![Stable](https://img.shields.io/badge/stable-success.svg?style=for-the-badge) | -| Higher level constructs for HTTP APIs | ![Experimental](https://img.shields.io/badge/experimental-important.svg?style=for-the-badge) | -| Higher level constructs for Websocket APIs | ![Not Implemented](https://img.shields.io/badge/not--implemented-black.svg?style=for-the-badge) | +Features | Stability +-------------------------------------------|-------------------------------------------------------- +CFN Resources | ![Stable](https://img.shields.io/badge/stable-success.svg?style=for-the-badge) +Higher level constructs for HTTP APIs | ![Experimental](https://img.shields.io/badge/experimental-important.svg?style=for-the-badge) +Higher level constructs for Websocket APIs | ![Not Implemented](https://img.shields.io/badge/not--implemented-black.svg?style=for-the-badge) + +> **CFN Resources:** All classes with the `Cfn` prefix in this module ([CFN Resources]) are always +> stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib -> **CFN Resources:** All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. + -> **Experimental:** Higher level constructs in this module that are marked as experimental are under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> **Experimental:** Higher level constructs in this module that are marked as experimental are +> under active development. They are subject to non-backward compatible changes or removal in any +> future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and +> breaking changes will be announced in the release notes. This means that while you may use them, +> you may need to update your source code when upgrading to a newer version of this package. --- + ## Table of Contents @@ -212,16 +223,15 @@ These metrics can be referred to using the metric APIs available on the `HttpApi The APIs with the `metric` prefix can be used to get reference to specific metrics for this API. For example, the method below refers to the client side errors metric for this API. -``` +```ts const api = new apigw.HttpApi(stack, 'my-api'); const clientErrorMetric = api.metricClientError(); - ``` Please note that this will return a metric for all the stages defined in the api. It is also possible to refer to metrics for a specific Stage using the `metric` methods from the `Stage` construct. -``` +```ts const api = new apigw.HttpApi(stack, 'my-api'); const stage = new HttpStage(stack, 'Stage', { httpApi: api, diff --git a/packages/@aws-cdk/aws-appconfig/README.md b/packages/@aws-cdk/aws-appconfig/README.md index 869c384f0ece1..946842bae0410 100644 --- a/packages/@aws-cdk/aws-appconfig/README.md +++ b/packages/@aws-cdk/aws-appconfig/README.md @@ -1,12 +1,16 @@ -## AWS::AppConfig Construct Library +# AWS::AppConfig Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-appflow/README.md b/packages/@aws-cdk/aws-appflow/README.md index 42a3530881326..6c9ad8badf2ac 100644 --- a/packages/@aws-cdk/aws-appflow/README.md +++ b/packages/@aws-cdk/aws-appflow/README.md @@ -1,12 +1,16 @@ -## AWS::AppFlow Construct Library +# AWS::AppFlow Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-applicationautoscaling/README.md b/packages/@aws-cdk/aws-applicationautoscaling/README.md index 9f7d979a9fa86..c00dac29ece2c 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/README.md +++ b/packages/@aws-cdk/aws-applicationautoscaling/README.md @@ -1,5 +1,6 @@ -## AWS Auto Scaling Construct Library +# AWS Auto Scaling Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -7,6 +8,7 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + **Application AutoScaling** is used to configure autoscaling for all @@ -20,7 +22,7 @@ offer AutoScaling features for their own constructs. This document will describe the general autoscaling features and concepts; your particular service may offer only a subset of these. -### AutoScaling basics +## AutoScaling basics Resources can offer one or more **attributes** to autoscale, typically representing some capacity dimension of the underlying service. For example, @@ -60,13 +62,13 @@ capacity.scaleToTrackMetric(...); capacity.scaleOnSchedule(...); ``` -### Step Scaling +## Step Scaling This type of scaling scales in and out in deterministic steps that you configure, in response to metric values. For example, your scaling strategy to scale in response to CPU usage might look like this: -``` +```plaintext Scaling -1 (no change) +1 +3 │ │ │ │ │ ├────────┼───────────────────────┼────────┼────────┤ @@ -97,7 +99,7 @@ capacity.scaleOnMetric('ScaleToCPU', { The AutoScaling construct library will create the required CloudWatch alarms and AutoScaling policies for you. -### Target Tracking Scaling +## Target Tracking Scaling This type of scaling scales in and out in order to keep a metric (typically representing utilization) around a value you prefer. This type of scaling is @@ -118,7 +120,7 @@ readCapacity.scaleOnUtilization({ }); ``` -### Scheduled Scaling +## Scheduled Scaling This type of scaling is used to change capacities based on time. It works by changing the `minCapacity` and `maxCapacity` of the attribute, and so @@ -177,7 +179,7 @@ def handler(event, context): }`), reservedConcurrentExecutions: 2, }); - + const fnVer = handler.addVersion('CDKLambdaVersion', undefined, 'demo alias', 10); new apigateway.LambdaRestApi(this, 'API', { handler: fnVer }) diff --git a/packages/@aws-cdk/aws-applicationinsights/README.md b/packages/@aws-cdk/aws-applicationinsights/README.md index b4e6e05197b26..24c74eacaf545 100644 --- a/packages/@aws-cdk/aws-applicationinsights/README.md +++ b/packages/@aws-cdk/aws-applicationinsights/README.md @@ -1,12 +1,16 @@ -## AWS::ApplicationInsights Construct Library +# AWS::ApplicationInsights Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-appmesh/README.md b/packages/@aws-cdk/aws-appmesh/README.md index 7de09d776eff5..c417378403c24 100644 --- a/packages/@aws-cdk/aws-appmesh/README.md +++ b/packages/@aws-cdk/aws-appmesh/README.md @@ -1,16 +1,24 @@ -## AWS App Mesh Construct Library +# AWS App Mesh Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib ![cdk-constructs: Developer Preview](https://img.shields.io/badge/cdk--constructs-developer--preview-informational.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are in **developer preview** before they become stable. We will only make breaking changes to address unforeseen API issues. Therefore, these APIs are not subject to [Semantic Versioning](https://semver.org/), and breaking changes will be announced in release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are in **developer preview** before they +> become stable. We will only make breaking changes to address unforeseen API issues. Therefore, +> these APIs are not subject to [Semantic Versioning](https://semver.org/), and breaking changes +> will be announced in release notes. This means that while you may use them, you may need to +> update your source code when upgrading to a newer version of this package. --- + AWS App Mesh is a service mesh based on the [Envoy](https://www.envoyproxy.io/) proxy that makes it easy to monitor and control microservices. App Mesh standardizes how your microservices communicate, giving you end-to-end visibility and helping to ensure high-availability for your applications. @@ -23,7 +31,7 @@ For futher information on **AWS AppMesh** visit the [AWS Docs for AppMesh](https ## Create the App and Stack -```typescript +```ts const app = new cdk.App(); const stack = new cdk.Stack(app, 'stack'); ``` @@ -36,7 +44,7 @@ After you create your service mesh, you can create virtual services, virtual nod The following example creates the `AppMesh` service mesh with the default filter of `DROP_ALL`, see [docs](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-mesh-egressfilter.html) here for more info on egress filters. -```typescript +```ts const mesh = new Mesh(stack, 'AppMesh', { meshName: 'myAwsmMesh', }); @@ -44,7 +52,7 @@ const mesh = new Mesh(stack, 'AppMesh', { The mesh can also be created with the "ALLOW_ALL" egress filter by overwritting the property. -```typescript +```ts const mesh = new Mesh(stack, 'AppMesh', { meshName: 'myAwsmMesh', egressFilter: MeshFilterType.ALLOW_ALL, @@ -58,7 +66,7 @@ The _Mesh_ needs _VirtualRouters_ as logical units to route requests to _Virtual Virtual routers handle traffic for one or more virtual services within your mesh. After you create a virtual router, you can create and associate routes to your virtual router that direct incoming requests to different virtual nodes. -```typescript +```ts const router = mesh.addVirtualRouter('router', { listeners: [ appmesh.VirtualRouterListener.http(8080) ], }); @@ -69,7 +77,7 @@ The same pattern applies to all constructs within the appmesh library, for any m This is particularly useful for cross stack resources are required. Where creating the `mesh` as part of an infrastructure stack and creating the `resources` such as `nodes` is more useful to keep in the application stack. -```typescript +```ts const mesh = new Mesh(stack, 'AppMesh', { meshName: 'myAwsmMesh', egressFilter: MeshFilterType.Allow_All, @@ -100,7 +108,7 @@ When creating a virtual service: Adding a virtual router as the provider: -```typescript +```ts mesh.addVirtualService('virtual-service', { virtualRouter: router, virtualServiceName: 'my-service.default.svc.cluster.local', @@ -109,7 +117,7 @@ mesh.addVirtualService('virtual-service', { Adding a virtual node as the provider: -```typescript +```ts mesh.addVirtualService('virtual-service', { virtualNode: node, virtualServiceName: `my-service.default.svc.cluster.local`, @@ -129,7 +137,7 @@ The response metadata for your new `virtual node` contains the Amazon Resource N > Note > If you require your Envoy stats or tracing to use a different name, you can override the node.cluster value that is set by APPMESH_VIRTUAL_NODE_NAME with the APPMESH_VIRTUAL_NODE_CLUSTER environment variable. -```typescript +```ts const vpc = new ec2.Vpc(stack, 'vpc'); const namespace = new servicediscovery.PrivateDnsNamespace(this, 'test-namespace', { vpc, @@ -157,7 +165,7 @@ const node = mesh.addVirtualNode('virtual-node', { Create a `VirtualNode` with the the constructor and add tags. -```typescript +```ts const node = new VirtualNode(this, 'node', { mesh, cloudMapService: service, @@ -171,7 +179,7 @@ const node = new VirtualNode(this, 'node', { protocol: Protocol.HTTP, timeout: Duration.seconds(2), // min unhealthyThreshold: 2, - }, + }, timeout: { idle: cdk.Duration.seconds(5), }, @@ -190,7 +198,7 @@ A `route` is associated with a virtual router, and it's used to match requests f If your `route` matches a request, you can distribute traffic to one or more target virtual nodes with relative weighting. -```typescript +```ts router.addRoute('route-http', { routeSpec: appmesh.RouteSpec.http({ weightedTargets: [ @@ -207,7 +215,7 @@ router.addRoute('route-http', { Add a single route with multiple targets and split traffic 50/50 -```typescript +```ts router.addRoute('route-http', { routeSpec: appmesh.RouteSpec.http({ weightedTargets: [ @@ -233,7 +241,7 @@ The `tcp()`, `http()` and `http2()` methods provide the spec necessary to define For HTTP based routes, the match field can be used to match on a route prefix. By default, an HTTP based route will match on `/`. All matches must start with a leading `/`. -```typescript +```ts router.addRoute('route-http', { routeSpec: appmesh.RouteSpec.grpc({ weightedTargets: [ @@ -260,7 +268,7 @@ using rules defined in gateway routes which can be added to your virtual gateway Create a virtual gateway with the constructor: -```typescript +```ts const gateway = new appmesh.VirtualGateway(stack, 'gateway', { mesh: mesh, listeners: [appmesh.VirtualGatewayListener.http({ @@ -276,7 +284,7 @@ const gateway = new appmesh.VirtualGateway(stack, 'gateway', { Add a virtual gateway directly to the mesh: -```typescript +```ts const gateway = mesh.addVirtualGateway('gateway', { accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout'), virtualGatewayName: 'virtualGateway', @@ -300,7 +308,7 @@ If a route matches a request, it can distribute traffic to a target virtual serv For HTTP based routes, the match field can be used to match on a route prefix. By default, an HTTP based route will match on `/`. All matches must start with a leading `/`. -```typescript +```ts gateway.addGatewayRoute('gateway-route-http', { routeSpec: appmesh.GatewayRouteSpec.http({ routeTarget: virtualService, @@ -314,7 +322,7 @@ gateway.addGatewayRoute('gateway-route-http', { For GRPC based routes, the match field can be used to match on service names. You cannot omit the field, and must specify a match for these routes. -```typescript +```ts gateway.addGatewayRoute('gateway-route-grpc', { routeSpec: appmesh.GatewayRouteSpec.grpc({ routeTarget: virtualService, @@ -331,12 +339,12 @@ Each mesh resource comes with two static methods for importing a reference to an These imported resources can be used as references for other resources in your mesh. There are two static methods, `fromArn` and `fromAttributes` where the `` is replaced with the resource name. -```typescript +```ts const arn = "arn:aws:appmesh:us-east-1:123456789012:mesh/testMesh/virtualNode/testNode"; appmesh.VirtualNode.fromVirtualNodeArn(stack, 'importedVirtualNode', arn); ``` -```typescript +```ts appmesh.VirtualNode.fromVirtualNodeAttributes(stack, 'imported-virtual-node', { mesh: appmesh.Mesh.fromMeshName(stack, 'Mesh', 'testMesh'), virtualNodeName: virtualNodeName, @@ -345,11 +353,11 @@ appmesh.VirtualNode.fromVirtualNodeAttributes(stack, 'imported-virtual-node', { To import a mesh, there are two static methods, `fromMeshArn` and `fromMeshName`. -```typescript +```ts const arn = 'arn:aws:appmesh:us-east-1:123456789012:mesh/testMesh'; appmesh.Mesh.fromMeshArn(stack, 'imported-mesh', arn); ``` -```typescript +```ts appmesh.Mesh.fromMeshName(stack, 'imported-mesh', 'abc'); ``` diff --git a/packages/@aws-cdk/aws-appstream/README.md b/packages/@aws-cdk/aws-appstream/README.md index e7e274eebe21d..34f0ffafdb52f 100644 --- a/packages/@aws-cdk/aws-appstream/README.md +++ b/packages/@aws-cdk/aws-appstream/README.md @@ -1,12 +1,16 @@ -## Amazon AppStream 2.0 Construct Library +# Amazon AppStream 2.0 Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + ```ts diff --git a/packages/@aws-cdk/aws-appsync/README.md b/packages/@aws-cdk/aws-appsync/README.md index 56c4cf6e0504a..ddd947cf0ab83 100644 --- a/packages/@aws-cdk/aws-appsync/README.md +++ b/packages/@aws-cdk/aws-appsync/README.md @@ -1,24 +1,32 @@ -## AWS AppSync Construct Library +# AWS AppSync Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + The `@aws-cdk/aws-appsync` package contains constructs for building flexible -APIs that use GraphQL. +APIs that use GraphQL. -### Example +## Example -### DynamoDB +## DynamoDB Example of a GraphQL API with `AWS_IAM` authorization resolving into a DynamoDb backend data source. @@ -147,7 +155,8 @@ rdsDS.createResolver({ }); ``` -#### HTTP Endpoints +### HTTP Endpoints + GraphQL schema file `schema.graphql`: ```gql @@ -167,7 +176,7 @@ type Mutation { GraphQL request mapping template `request.vtl`: -``` +```json { "version": "2018-05-29", "method": "POST", @@ -187,7 +196,7 @@ GraphQL request mapping template `request.vtl`: GraphQL response mapping template `response.vtl`: -``` +```json { "id": "${context.result.id}" } @@ -204,8 +213,8 @@ const api = new appsync.GraphqlApi(scope, 'api', { }); const httpDs = api.addHttpDataSource( - 'ds', - 'https://states.amazonaws.com', + 'ds', + 'https://states.amazonaws.com', { name: 'httpDsWithStepF', description: 'from appsync to StepFunctions Workflow', @@ -233,7 +242,7 @@ or schema-first. #### Code-First When declaring your GraphQL Api, CDK defaults to a code-first approach if the -`schema` property is not configured. +`schema` property is not configured. ```ts const api = new appsync.GraphqlApi(stack, 'api', { name: 'myApi' }); @@ -271,8 +280,9 @@ const api = appsync.GraphqlApi(stack, 'api', { ``` ### Imports -Any GraphQL Api that has been created outside the stack can be imported from -another stack into your CDK app. Utilizing the `fromXxx` function, you have + +Any GraphQL Api that has been created outside the stack can be imported from +another stack into your CDK app. Utilizing the `fromXxx` function, you have the ability to add data sources and resolvers through a `IGraphqlApi` interface. ```ts @@ -284,7 +294,7 @@ importedApi.addDynamoDbDataSource('TableDataSource', table); ``` If you don't specify `graphqlArn` in `fromXxxAttributes`, CDK will autogenerate -the expected `arn` for the imported api, given the `apiId`. For creating data +the expected `arn` for the imported api, given the `apiId`. For creating data sources and resolvers, an `apiId` is sufficient. ### Permissions @@ -297,6 +307,7 @@ accessible by `IAM` authorization. For example, if you want to only allow mutabi for `IAM` authorized access you would configure the following. In `schema.graphql`: + ```ts type Mutation { updateExample(...): ... @@ -305,6 +316,7 @@ type Mutation { ``` In `IAM`: + ```json { "Version": "2012-10-17", @@ -354,6 +366,7 @@ In order to use the `grant` functions, you need to use the class `IamResource`. Alternatively, you can use more generic `grant` functions to accomplish the same usage. These include: + - grantMutation (use to grant access to Mutation fields) - grantQuery (use to grant access to Query fields) - grantSubscription (use to grant access to Subscription fields) @@ -368,8 +381,9 @@ api.grant(role, appsync.IamResource.ofType('Mutation', 'updateExample'), 'appsyn ### Code-First Schema -CDK offers the ability to generate your schema in a code-first approach. +CDK offers the ability to generate your schema in a code-first approach. A code-first approach offers a developer workflow with: + - **modularity**: organizing schema type definitions into different files - **reusability**: simplifying down boilerplate/repetitive code - **consistency**: resolvers and schema definition will always be synced @@ -400,7 +414,7 @@ type FilmConnection { } type FilmEdge { - node: Film + node: Film cursor: String } ``` @@ -420,7 +434,7 @@ export const int = appsync.GraphqlType.int(); In another separate file, we can declare our object types and related functions. We will call this file `object-types.ts` and we will have created it in a way that -allows us to generate other `XxxConnection` and `XxxEdges` in the future. +allows us to generate other `XxxConnection` and `XxxEdges` in the future. ```ts const pluralize = require('pluralize'); @@ -428,7 +442,7 @@ import * as scalar from './scalar-types.ts'; import * as appsync from '@aws-cdk/aws-appsync'; export const args = { - after: scalar.string, + after: scalar.string, first: scalar.int, before: scalar.string, last: scalar.int, @@ -494,18 +508,19 @@ Check out a more in-depth example [here](https://github.com/BryanPan342/starwars #### GraphQL Types -One of the benefits of GraphQL is its strongly typed nature. We define the -types within an object, query, mutation, interface, etc. as **GraphQL Types**. +One of the benefits of GraphQL is its strongly typed nature. We define the +types within an object, query, mutation, interface, etc. as **GraphQL Types**. -GraphQL Types are the building blocks of types, whether they are scalar, objects, +GraphQL Types are the building blocks of types, whether they are scalar, objects, interfaces, etc. GraphQL Types can be: -- [**Scalar Types**](https://docs.aws.amazon.com/appsync/latest/devguide/scalars.html): Id, Int, String, AWSDate, etc. + +- [**Scalar Types**](https://docs.aws.amazon.com/appsync/latest/devguide/scalars.html): Id, Int, String, AWSDate, etc. - [**Object Types**](#Object-Types): types that you generate (i.e. `demo` from the example above) -- [**Interface Types**](#Interface-Types): abstract types that define the base implementation of other +- [**Interface Types**](#Interface-Types): abstract types that define the base implementation of other Intermediate Types -More concretely, GraphQL Types are simply the types appended to variables. -Referencing the object type `Demo` in the previous example, the GraphQL Types +More concretely, GraphQL Types are simply the types appended to variables. +Referencing the object type `Demo` in the previous example, the GraphQL Types is `String!` and is applied to both the names `id` and `version`. #### Directives @@ -573,7 +588,7 @@ The CDK code required would be: ```ts const info = new appsync.ObjectType('Info', { - definition: { + definition: { node: new appsync.ResolvableField({ returnType: appsync.GraphqlType.string(), args: { @@ -601,7 +616,7 @@ The CDK code required would be: ```ts const query = new appsync.ObjectType('Query', { - definition: { + definition: { get: new appsync.ResolvableField({ returnType: appsync.GraphqlType.string(), args: { @@ -619,11 +634,12 @@ Learn more about fields and resolvers [here](https://docs.aws.amazon.com/appsync #### Intermediate Types -Intermediate Types are defined by Graphql Types and Fields. They have a set of defined -fields, where each field corresponds to another type in the system. Intermediate +Intermediate Types are defined by Graphql Types and Fields. They have a set of defined +fields, where each field corresponds to another type in the system. Intermediate Types will be the meat of your GraphQL Schema as they are the types defined by you. Intermediate Types include: + - [**Interface Types**](#Interface-Types) - [**Object Types**](#Object-Types) - [**Enum Types**](#Enum-Types) @@ -637,6 +653,7 @@ intermediate types. They are useful for eliminating duplication and can be used to generate Object Types with less work. You can create Interface Types ***externally***. + ```ts const node = new appsync.InterfaceType('Node', { definition: { @@ -650,12 +667,13 @@ To learn more about **Interface Types**, read the docs [here](https://graphql.or ##### Object Types **Object Types** are types that you declare. For example, in the [code-first example](#code-first-example) -the `demo` variable is an **Object Type**. **Object Types** are defined by +the `demo` variable is an **Object Type**. **Object Types** are defined by GraphQL Types and are only usable when linked to a GraphQL Api. You can create Object Types in three ways: 1. Object Types can be created ***externally***. + ```ts const api = new appsync.GraphqlApi(stack, 'Api', { name: 'demo', @@ -669,15 +687,18 @@ You can create Object Types in three ways: api.addType(object); ``` - > This method allows for reusability and modularity, ideal for larger projects. + + > This method allows for reusability and modularity, ideal for larger projects. For example, imagine moving all Object Type definition outside the stack. `scalar-types.ts` - a file for scalar type definitions + ```ts export const required_string = appsync.GraphqlType.string({ isRequired: true }); ``` `object-types.ts` - a file for object type definitions + ```ts import { required_string } from './scalar-types'; export const demo = new appsync.ObjectType('Demo', { @@ -689,12 +710,14 @@ You can create Object Types in three ways: ``` `cdk-stack.ts` - a file containing our cdk stack + ```ts import { demo } from './object-types'; api.addType(demo); ``` 2. Object Types can be created ***externally*** from an Interface Type. + ```ts const node = new appsync.InterfaceType('Node', { definition: { @@ -708,6 +731,7 @@ You can create Object Types in three ways: }, }); ``` + > This method allows for reusability and modularity, ideal for reducing code duplication. To learn more about **Object Types**, read the docs [here](https://graphql.org/learn/schema/#object-types-and-fields). @@ -737,13 +761,13 @@ const episode = new appsync.EnumType('Episode', { 'EMPIRE', 'JEDI', ], -}); +}); api.addType(episode); ``` To learn more about **Enum Types**, read the docs [here](https://graphql.org/learn/schema/#enumeration-types). -##### Input Types +#### Input Types **Input Types** are special types of Intermediate Types. They give users an easy way to pass complex objects for top level Mutation and Queries. @@ -763,7 +787,7 @@ const review = new appsync.InputType('Review', { stars: GraphqlType.int({ isRequired: true }), commentary: GraphqlType.string(), }, -}); +}); api.addType(review); ``` @@ -791,7 +815,7 @@ const droid = new appsync.ObjectType('Droid', { definition: { name: string } }); const starship = new appsync.ObjectType('Starship', { definition: { name: string } });); const search = new appsync.UnionType('Search', { definition: [ human, droid, starship ], -}); +}); api.addType(search); ``` @@ -818,7 +842,7 @@ api.addQuery('allFilms', new appsync.ResolvableField({ })); ``` -To learn more about top level operations, check out the docs [here](https://docs.aws.amazon.com/appsync/latest/devguide/graphql-overview.html). +To learn more about top level operations, check out the docs [here](https://docs.aws.amazon.com/appsync/latest/devguide/graphql-overview.html). #### Mutation @@ -841,14 +865,14 @@ api.addMutation('addFilm', new appsync.ResolvableField({ })); ``` -To learn more about top level operations, check out the docs [here](https://docs.aws.amazon.com/appsync/latest/devguide/graphql-overview.html). +To learn more about top level operations, check out the docs [here](https://docs.aws.amazon.com/appsync/latest/devguide/graphql-overview.html). #### Subscription Every schema **can** have a top level Subscription type. The top level `Subscription` Type is the only exposed type that users can access to invoke a response to a mutation. `Subscriptions` notify users when a mutation specific mutation is called. This means you can make any data source -real time by specify a GraphQL Schema directive on a mutation. +real time by specify a GraphQL Schema directive on a mutation. **Note**: The AWS AppSync client SDK automatically handles subscription connection management. @@ -863,4 +887,4 @@ api.addSubscription('addedFilm', new appsync.ResolvableField({ })); ``` -To learn more about top level operations, check out the docs [here](https://docs.aws.amazon.com/appsync/latest/devguide/real-time-data.html). +To learn more about top level operations, check out the docs [here](https://docs.aws.amazon.com/appsync/latest/devguide/real-time-data.html). diff --git a/packages/@aws-cdk/aws-athena/README.md b/packages/@aws-cdk/aws-athena/README.md index 0bda8c19ea85e..60b234d13f16a 100644 --- a/packages/@aws-cdk/aws-athena/README.md +++ b/packages/@aws-cdk/aws-athena/README.md @@ -1,12 +1,16 @@ -## Amazon Athena Construct Library +# Amazon Athena Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-autoscaling-common/README.md b/packages/@aws-cdk/aws-autoscaling-common/README.md index a9e20cab39d00..83b483af43573 100644 --- a/packages/@aws-cdk/aws-autoscaling-common/README.md +++ b/packages/@aws-cdk/aws-autoscaling-common/README.md @@ -1,16 +1,22 @@ -## AWS AutoScaling Common Library +# AWS AutoScaling Common Library + --- ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + This is a sister package to `@aws-cdk/aws-autoscaling` and `@aws-cdk/aws-applicationautoscaling`. It contains shared implementation details between them. -It does not need to be used directly. \ No newline at end of file +It does not need to be used directly. diff --git a/packages/@aws-cdk/aws-autoscaling-hooktargets/README.md b/packages/@aws-cdk/aws-autoscaling-hooktargets/README.md index b4e70cd38f6e4..806170e6fd167 100644 --- a/packages/@aws-cdk/aws-autoscaling-hooktargets/README.md +++ b/packages/@aws-cdk/aws-autoscaling-hooktargets/README.md @@ -1,10 +1,12 @@ # Lifecycle Hook for the CDK AWS AutoScaling Library + --- ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + This library contains integration classes for AutoScaling lifecycle hooks. diff --git a/packages/@aws-cdk/aws-autoscaling/README.md b/packages/@aws-cdk/aws-autoscaling/README.md index cdddcfbe55ba6..95e1a25963afe 100644 --- a/packages/@aws-cdk/aws-autoscaling/README.md +++ b/packages/@aws-cdk/aws-autoscaling/README.md @@ -1,6 +1,6 @@ -## Amazon EC2 Auto Scaling Construct Library - +# Amazon EC2 Auto Scaling Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -8,11 +8,13 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. -### Auto Scaling Group +## Auto Scaling Group An `AutoScalingGroup` represents a number of instances on which you run your code. You pick the size of the fleet, the instance type and the OS image: @@ -43,7 +45,7 @@ new autoscaling.AutoScalingGroup(this, 'ASG', { }); ``` -### Machine Images (AMIs) +## Machine Images (AMIs) AMIs control the OS that gets launched when you start your EC2 instance. The EC2 library contains constructs to select the AMI you want to use. @@ -62,7 +64,7 @@ selectable by instantiating one of these classes: > > We will add command-line options to make this step easier in the future. -### AutoScaling Instance Counts +## AutoScaling Instance Counts AutoScalingGroups make it possible to raise and lower the number of instances in the group, in response to (or in advance of) changes in workload. @@ -107,14 +109,14 @@ autoScalingGroup.scaleToTrackMetric(...); autoScalingGroup.scaleOnSchedule(...); ``` -#### Step Scaling +### Step Scaling This type of scaling scales in and out in deterministics steps that you configure, in response to metric values. For example, your scaling strategy to scale in response to a metric that represents your average worker pool usage might look like this: -``` +```plaintext Scaling -1 (no change) +1 +3 │ │ │ │ │ ├────────┼───────────────────────┼────────┼────────┤ @@ -152,7 +154,7 @@ capacity.scaleOnMetric('ScaleToCPU', { The AutoScaling construct library will create the required CloudWatch alarms and AutoScaling policies for you. -#### Target Tracking Scaling +### Target Tracking Scaling This type of scaling scales in and out in order to keep a metric around a value you prefer. There are four types of predefined metrics you can track, or you can @@ -194,7 +196,7 @@ autoScalingGroup.scaleOnRequestCount('LimitRPS', { }); ``` -#### Scheduled Scaling +### Scheduled Scaling This type of scaling is used to change capacities based on time. It works by changing `minCapacity`, `maxCapacity` and `desiredCapacity` of the @@ -223,7 +225,7 @@ autoScalingGroup.scaleOnSchedule('AllowDownscalingAtNight', { }); ``` -### Configuring Instances using CloudFormation Init +## Configuring Instances using CloudFormation Init It is possible to use the CloudFormation Init mechanism to configure the instances in the AutoScalingGroup. You can write files to it, run commands, @@ -256,7 +258,7 @@ new autoscaling.AutoScalingGroup(this, 'ASG', { }); ``` -### Signals +## Signals In normal operation, CloudFormation will send a Create or Update command to an AutoScalingGroup and proceed with the rest of the deployment without waiting @@ -292,7 +294,7 @@ There are two `options` you can configure: update to succeed. If you set this value lower than 100, some percentage of hosts may report failure, while still considering the deployment a success. Default is 100%. -### Update Policy +## Update Policy The *update policy* describes what should happen to running instances when the definition of the AutoScalingGroup is changed. For example, if you add a command to the UserData @@ -318,24 +320,24 @@ The following update policies are available: If the deployment needs to be rolled back, the new AutoScalingGroup is deleted and the old one is left unchanged. -### Allowing Connections +## Allowing Connections See the documentation of the `@aws-cdk/aws-ec2` package for more information about allowing connections between resources backed by instances. -### Max Instance Lifetime +## Max Instance Lifetime To enable the max instance lifetime support, specify `maxInstanceLifetime` property for the `AutoscalingGroup` resource. The value must be between 7 and 365 days(inclusive). To clear a previously set value, leave this property undefined. -### Instance Monitoring +## Instance Monitoring To disable detailed instance monitoring, specify `instanceMonitoring` property for the `AutoscalingGroup` resource as `Monitoring.BASIC`. Otherwise detailed monitoring will be enabled. -### Monitoring Group Metrics +## Monitoring Group Metrics Group metrics are used to monitor group level properties; they describe the group rather than any of its instances (e.g GroupMaxSize, the group maximum size). To enable group metrics monitoring, use the `groupMetrics` property. All group metrics are reported in a granularity of 1 minute at no additional charge. @@ -358,7 +360,7 @@ new autoscaling.AutoScalingGroup(stack, 'ASG', { }); ``` -### Future work +## Future work -- [ ] CloudWatch Events (impossible to add currently as the AutoScalingGroup ARN is +* [ ] CloudWatch Events (impossible to add currently as the AutoScalingGroup ARN is necessary to make this rule and this cannot be accessed from CloudFormation). diff --git a/packages/@aws-cdk/aws-autoscalingplans/README.md b/packages/@aws-cdk/aws-autoscalingplans/README.md index 7b55756246b51..72bc8e028968f 100644 --- a/packages/@aws-cdk/aws-autoscalingplans/README.md +++ b/packages/@aws-cdk/aws-autoscalingplans/README.md @@ -1,12 +1,16 @@ -## AWS Auto Scaling Plans Construct Library +# AWS Auto Scaling Plans Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-backup/README.md b/packages/@aws-cdk/aws-backup/README.md index 57e47aee1081a..47b54313a8fc9 100644 --- a/packages/@aws-cdk/aws-backup/README.md +++ b/packages/@aws-cdk/aws-backup/README.md @@ -1,21 +1,29 @@ -## AWS Backup Construct Library +# AWS Backup Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + AWS Backup is a fully managed backup service that makes it easy to centralize and automate the backup of data across AWS services in the cloud and on premises. Using AWS Backup, you can configure backup policies and monitor backup activity for your AWS resources in one place. -### Backup plan and selection +## Backup plan and selection In AWS Backup, a *backup plan* is a policy expression that defines when and how you want to back up your AWS resources, such as Amazon DynamoDB tables or Amazon Elastic File System (Amazon EFS) file systems. You can assign resources to backup plans, and AWS Backup automatically backs up and retains backups for those resources according to the backup plan. You can create multiple backup plans if you have workloads with different backup requirements. @@ -74,7 +82,8 @@ const plan = backup.BackupPlan.daily35DayRetention(this, 'Plan', myVault); // Us plan.addRule(BackupPlanRule.monthly1Year(otherVault)); // Use `otherVault` for this specific rule ``` -### Backup vault +## Backup vault + In AWS Backup, a *backup vault* is a container that you organize your backups in. You can use backup vaults to set the AWS Key Management Service (AWS KMS) encryption key that is used to encrypt backups in the backup vault and to control access to the backups in the backup vault. If you require different encryption keys or access policies for different groups of backups, you can optionally create multiple backup vaults. ```ts diff --git a/packages/@aws-cdk/aws-batch/README.md b/packages/@aws-cdk/aws-batch/README.md index c4a818e7abc6a..da6edc3d55998 100644 --- a/packages/@aws-cdk/aws-batch/README.md +++ b/packages/@aws-cdk/aws-batch/README.md @@ -1,17 +1,24 @@ -## AWS Batch Construct Library - +# AWS Batch Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. @@ -71,14 +78,14 @@ const spotEnvironment = new batch.ComputeEnvironment(stack, 'MySpotEnvironment', AWS Batch uses an [allocation strategy](https://docs.aws.amazon.com/batch/latest/userguide/allocation-strategies.html) to determine what compute resource will efficiently handle incoming job requests. By default, **BEST_FIT** will pick an available compute instance based on vCPU requirements. If none exist, the job will wait until resources become available. However, with this strategy, you may have jobs waiting in the queue unnecessarily despite having more powerful instances available. Below is an example of how that situation might look like: -``` +```plaintext Compute Environment: 1. m5.xlarge => 4 vCPU 2. m5.2xlarge => 8 vCPU ``` -``` +```plaintext Job Queue: --------- | A | B | @@ -96,7 +103,8 @@ The alternative would be to use the `BEST_FIT_PROGRESSIVE` strategy in order for ### Launch template support Simply define your Launch Template: -```typescript + +```ts const myLaunchTemplate = new ec2.CfnLaunchTemplate(this, 'LaunchTemplate', { launchTemplateName: 'extra-storage-template', launchTemplateData: { @@ -116,7 +124,7 @@ const myLaunchTemplate = new ec2.CfnLaunchTemplate(this, 'LaunchTemplate', { and use it: -```typescript +```ts const myComputeEnv = new batch.ComputeEnvironment(this, 'ComputeEnv', { computeResources: { launchTemplate: { diff --git a/packages/@aws-cdk/aws-budgets/README.md b/packages/@aws-cdk/aws-budgets/README.md index 8458bff0dea78..90c1e8567a673 100644 --- a/packages/@aws-cdk/aws-budgets/README.md +++ b/packages/@aws-cdk/aws-budgets/README.md @@ -1,12 +1,16 @@ -## AWS Budgets Construct Library +# AWS Budgets Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-cassandra/README.md b/packages/@aws-cdk/aws-cassandra/README.md index c616a9e89e55d..50e34cd63ba9d 100644 --- a/packages/@aws-cdk/aws-cassandra/README.md +++ b/packages/@aws-cdk/aws-cassandra/README.md @@ -1,12 +1,16 @@ -## AWS::Cassandra Construct Library +# AWS::Cassandra Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-ce/README.md b/packages/@aws-cdk/aws-ce/README.md index f2236a104f111..c5723bd9714db 100644 --- a/packages/@aws-cdk/aws-ce/README.md +++ b/packages/@aws-cdk/aws-ce/README.md @@ -1,12 +1,16 @@ -## AWS::CE Construct Library +# AWS::CE Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-certificatemanager/README.md b/packages/@aws-cdk/aws-certificatemanager/README.md index f90edaf1ef9bf..5c27597f6701b 100644 --- a/packages/@aws-cdk/aws-certificatemanager/README.md +++ b/packages/@aws-cdk/aws-certificatemanager/README.md @@ -1,6 +1,6 @@ -## AWS Certificate Manager Construct Library - +# AWS Certificate Manager Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -8,8 +8,10 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + + AWS Certificate Manager (ACM) handles the complexity of creating, storing, and renewing public and private SSL/TLS X.509 certificates and keys that protect your AWS websites and applications. ACM certificates can secure singular domain names, multiple specific domain names, wildcard domains, or combinations of these. ACM wildcard certificates can protect an unlimited number of subdomains. @@ -28,7 +30,7 @@ service, or provision them manually and import them into your CDK application. The default limit is 2000, but this limit may be (much) lower on new AWS accounts. See https://docs.aws.amazon.com/acm/latest/userguide/acm-limits.html for more information. -### DNS validation +## DNS validation DNS validation is the preferred method to validate domain ownership, as it has a number of advantages over email validation. See also [Validate with DNS](https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-dns.html) @@ -81,7 +83,7 @@ const cert = new acm.Certificate(this, 'Certificate', { }); ``` -### Email validation +## Email validation Email-validated certificates (the default) are validated by receiving an email on one of a number of predefined domains and following the instructions @@ -97,7 +99,7 @@ new acm.Certificate(this, 'Certificate', { }); ``` -### Cross-region Certificates +## Cross-region Certificates ACM certificates that are used with CloudFront -- or higher-level constructs which rely on CloudFront -- must be in the `us-east-1` region. The `DnsValidatedCertificate` construct exists to faciliate creating these certificates cross-region. This resource can only be used with @@ -111,7 +113,7 @@ new acm.DnsValidatedCertificate(this, 'CrossRegionCertificate', { }); ``` -### Importing +## Importing If you want to import an existing certificate, you can do so from its ARN: @@ -120,7 +122,7 @@ const arn = 'arn:aws:...'; const certificate = Certificate.fromCertificateArn(this, 'Certificate', arn); ``` -### Sharing between Stacks +## Sharing between Stacks To share the certificate between stacks in the same CDK application, simply pass the `Certificate` object between the stacks. diff --git a/packages/@aws-cdk/aws-chatbot/README.md b/packages/@aws-cdk/aws-chatbot/README.md index 27954ad252d9d..d46f0e704110e 100644 --- a/packages/@aws-cdk/aws-chatbot/README.md +++ b/packages/@aws-cdk/aws-chatbot/README.md @@ -1,16 +1,24 @@ -## AWS::Chatbot Construct Library +# AWS::Chatbot Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + AWS Chatbot is an AWS service that enables DevOps and software development teams to use Slack chat rooms to monitor and respond to operational events in their AWS Cloud. AWS Chatbot processes AWS service notifications from Amazon Simple Notification Service (Amazon SNS), and forwards them to Slack chat rooms so teams can analyze and act on them immediately, regardless of location. @@ -40,7 +48,7 @@ slackChannel.addToPrincipalPolicy(new iam.PolicyStatement({ })); ``` -### Log Group +## Log Group Slack channel configuration automatically create a log group with the name `/aws/chatbot/` in `us-east-1` upon first execution with log data set to never expire. diff --git a/packages/@aws-cdk/aws-cloud9/README.md b/packages/@aws-cdk/aws-cloud9/README.md index 6f7ca79297807..36bdc6d4a3d4c 100644 --- a/packages/@aws-cdk/aws-cloud9/README.md +++ b/packages/@aws-cdk/aws-cloud9/README.md @@ -1,16 +1,24 @@ -## AWS Cloud9 Construct Library +# AWS Cloud9 Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. @@ -18,7 +26,7 @@ This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aw AWS Cloud9 is a cloud-based integrated development environment (IDE) that lets you write, run, and debug your code with just a browser. It includes a code editor, debugger, and terminal. Cloud9 comes prepackaged with essential tools for popular programming languages, including JavaScript, Python, PHP, and more, so you don’t need to install files or configure your development machine to start new projects. Since your Cloud9 IDE is cloud-based, you can work on your projects from your office, home, or anywhere using an internet-connected machine. Cloud9 also provides a seamless experience for developing serverless applications enabling you to easily define resources, debug, and switch between local and remote execution of serverless applications. With Cloud9, you can quickly share your development environment with your team, enabling you to pair program and track each other's inputs in real time. -### Creating EC2 Environment +## Creating EC2 Environment EC2 Environments are defined with `Ec2Environment`. To create an EC2 environment in the private subnet, specify `subnetSelection` with private `subnetType`. @@ -49,7 +57,7 @@ const c9env = new cloud9.Ec2Environment(this, 'Cloud9Env3', { new cdk.CfnOutput(this, 'URL', { value: c9env.ideUrl }); ``` -### Cloning Repositories +## Cloning Repositories Use `clonedRepositories` to clone one or multiple AWS Codecommit repositories into the environment: diff --git a/packages/@aws-cdk/aws-cloudformation/README.md b/packages/@aws-cdk/aws-cloudformation/README.md index b9106ce98a114..f37db8ba71325 100644 --- a/packages/@aws-cdk/aws-cloudformation/README.md +++ b/packages/@aws-cdk/aws-cloudformation/README.md @@ -1,5 +1,6 @@ -## AWS CloudFormation Construct Library +# AWS CloudFormation Construct Library + --- ![Deprecated](https://img.shields.io/badge/deprecated-critical.svg?style=for-the-badge) @@ -7,6 +8,7 @@ > This API may emit warnings. Backward compatibility is not guaranteed. --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-cloudfront-origins/README.md b/packages/@aws-cdk/aws-cloudfront-origins/README.md index 8047fd612b814..b795fe6bc86b8 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/README.md +++ b/packages/@aws-cdk/aws-cloudfront-origins/README.md @@ -1,13 +1,18 @@ # CloudFront Origins for the CDK CloudFront Library - + --- ![cdk-constructs: Developer Preview](https://img.shields.io/badge/cdk--constructs-developer--preview-informational.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are in **developer preview** before they become stable. We will only make breaking changes to address unforeseen API issues. Therefore, these APIs are not subject to [Semantic Versioning](https://semver.org/), and breaking changes will be announced in release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are in **developer preview** before they +> become stable. We will only make breaking changes to address unforeseen API issues. Therefore, +> these APIs are not subject to [Semantic Versioning](https://semver.org/), and breaking changes +> will be announced in release notes. This means that while you may use them, you may need to +> update your source code when upgrading to a newer version of this package. --- + This library contains convenience methods for defining origins for a CloudFront distribution. You can use this library to create origins from diff --git a/packages/@aws-cdk/aws-cloudfront/README.md b/packages/@aws-cdk/aws-cloudfront/README.md index d752286bac5d5..689cb77945452 100644 --- a/packages/@aws-cdk/aws-cloudfront/README.md +++ b/packages/@aws-cdk/aws-cloudfront/README.md @@ -1,21 +1,35 @@ -## Amazon CloudFront Construct Library - +# Amazon CloudFront Construct Library + --- -| Features | Stability | -| --- | --- | -| CFN Resources | ![Stable](https://img.shields.io/badge/stable-success.svg?style=for-the-badge) | -| Higher level constructs for Distribution | ![Developer Preview](https://img.shields.io/badge/developer--preview-informational.svg?style=for-the-badge) | -| Higher level constructs for CloudFrontWebDistribution | ![Stable](https://img.shields.io/badge/stable-success.svg?style=for-the-badge) | +Features | Stability +------------------------------------------------------|--------------------------------------------- +CFN Resources | ![Stable](https://img.shields.io/badge/stable-success.svg?style=for-the-badge) +Higher level constructs for Distribution | ![Developer Preview](https://img.shields.io/badge/developer--preview-informational.svg?style=for-the-badge) +Higher level constructs for CloudFrontWebDistribution | ![Stable](https://img.shields.io/badge/stable-success.svg?style=for-the-badge) + +> **CFN Resources:** All classes with the `Cfn` prefix in this module ([CFN Resources]) are always +> stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib -> **CFN Resources:** All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. + -> **Developer Preview:** Higher level constructs in this module that are marked as developer preview have completed their phase of active development and are looking for adoption and feedback. While the same caveats around non-backward compatible as Experimental constructs apply, they will undergo fewer breaking changes. Just as with Experimental constructs, these are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. +> **Developer Preview:** Higher level constructs in this module that are marked as developer +> preview have completed their phase of active development and are looking for adoption and +> feedback. While the same caveats around non-backward compatible as Experimental constructs apply, +> they will undergo fewer breaking changes. Just as with Experimental constructs, these are not +> subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. -> **Stable:** Higher level constructs in this module that are marked stable will not undergo any breaking changes. They will strictly follow the [Semantic Versioning](https://semver.org/) model. + + +> **Stable:** Higher level constructs in this module that are marked stable will not undergo any +> breaking changes. They will strictly follow the [Semantic Versioning](https://semver.org/) model. --- + Amazon CloudFront is a web service that speeds up distribution of your static and dynamic web content, such as .html, .css, .js, and image files, to @@ -288,7 +302,7 @@ const myFunc = new lambda.Function(this, 'MyFunction', { Lambda@Edge functions can also be associated with additional behaviors, either at or after Distribution creation time. -```typescript +```ts // assigning at Distribution creation const myOrigin = new origins.S3Origin(myBucket); new cloudfront.Distribution(this, 'myDist', { diff --git a/packages/@aws-cdk/aws-cloudtrail/README.md b/packages/@aws-cdk/aws-cloudtrail/README.md index 358eb9c5a796b..2e4f38576b540 100644 --- a/packages/@aws-cdk/aws-cloudtrail/README.md +++ b/packages/@aws-cdk/aws-cloudtrail/README.md @@ -1,5 +1,6 @@ -## AWS CloudTrail Construct Library +# AWS CloudTrail Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -7,6 +8,7 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + ## Trail @@ -180,4 +182,4 @@ const amazingFunction = new lambda.Function(stack, 'AnAmazingFunction', { // Add an event selector to log data events for the provided Lambda functions. trail.addLambdaEventSelector([ lambdaFunction ]); -``` \ No newline at end of file +``` diff --git a/packages/@aws-cdk/aws-cloudwatch-actions/README.md b/packages/@aws-cdk/aws-cloudwatch-actions/README.md index 73f541d4a47b9..03d84220c5c08 100644 --- a/packages/@aws-cdk/aws-cloudwatch-actions/README.md +++ b/packages/@aws-cdk/aws-cloudwatch-actions/README.md @@ -1,12 +1,14 @@ # CloudWatch Alarm Actions library + --- ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + This library contains a set of classes which can be used as CloudWatch Alarm actions. -See `@aws-cdk/aws-cloudwatch` for more information. \ No newline at end of file +See `@aws-cdk/aws-cloudwatch` for more information. diff --git a/packages/@aws-cdk/aws-cloudwatch/README.md b/packages/@aws-cdk/aws-cloudwatch/README.md index e1a120a085b4a..77ee7844757be 100644 --- a/packages/@aws-cdk/aws-cloudwatch/README.md +++ b/packages/@aws-cdk/aws-cloudwatch/README.md @@ -1,5 +1,6 @@ -## Amazon CloudWatch Construct Library +# Amazon CloudWatch Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -7,6 +8,7 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + ## Metric objects diff --git a/packages/@aws-cdk/aws-codeartifact/README.md b/packages/@aws-cdk/aws-codeartifact/README.md index f86672c07c50a..3e65e5cb8dbaf 100644 --- a/packages/@aws-cdk/aws-codeartifact/README.md +++ b/packages/@aws-cdk/aws-codeartifact/README.md @@ -1,12 +1,16 @@ -## AWS::CodeArtifact Construct Library +# AWS::CodeArtifact Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-codebuild/README.md b/packages/@aws-cdk/aws-codebuild/README.md index 8dc9d1db9f9ec..83b1977014074 100644 --- a/packages/@aws-cdk/aws-codebuild/README.md +++ b/packages/@aws-cdk/aws-codebuild/README.md @@ -1,5 +1,6 @@ -## AWS CodeBuild Construct Library +# AWS CodeBuild Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -7,6 +8,7 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + AWS CodeBuild is a fully managed continuous integration service that compiles @@ -85,7 +87,7 @@ new codebuild.Project(this, 'MyProject', { These source types can be used to build code from a GitHub repository. Example: -```typescript +```ts const gitHubSource = codebuild.Source.gitHub({ owner: 'awslabs', repo: 'aws-cdk', @@ -103,7 +105,7 @@ To provide GitHub credentials, please either go to AWS CodeBuild Console to conn or call `ImportSourceCredentials` to persist your personal access token. Example: -``` +```console aws codebuild import-source-credentials --server-type GITHUB --auth-type PERSONAL_ACCESS_TOKEN --token ``` @@ -122,7 +124,7 @@ const bbSource = codebuild.Source.bitBucket({ For all Git sources, you can fetch submodules while cloing git repo. -```typescript +```ts const gitHubSource = codebuild.Source.gitHub({ owner: 'awslabs', repo: 'aws-cdk', @@ -163,7 +165,7 @@ It's a simple class that doesn't allow you to specify `sources`, as these are handled by setting input and output CodePipeline `Artifact` instances on the Action, instead of setting them on the Project. -```typescript +```ts const project = new codebuild.PipelineProject(this, 'Project', { // properties as above... }) @@ -179,7 +181,7 @@ You can save time when your project builds by using a cache. A cache can store r With S3 caching, the cache is stored in an S3 bucket which is available from multiple hosts. -```typescript +```ts new codebuild.Project(this, 'Project', { source: codebuild.Source.bitBucket({ owner: 'awslabs', @@ -199,7 +201,7 @@ guarantee cache hits. For example, when a build starts and caches files locally, * `LocalCacheMode.DOCKER_LAYER` caches existing Docker layers. * `LocalCacheMode.CUSTOM` caches directories you specify in the buildspec file. -```typescript +```ts new codebuild.Project(this, 'Project', { source: codebuild.Source.gitHubEnterprise({ httpsCloneUrl: 'https://my-github-enterprise.com/owner/repo', @@ -247,10 +249,10 @@ or one of the corresponding methods on `WindowsBuildImage`: * `WindowsBuildImage.fromEcrRepository(repo[, tag, imageType])` * `WindowsBuildImage.fromAsset(parent, id, props, [, imageType])` -Note that the `WindowsBuildImage` version of the static methods accepts an optional parameter of type `WindowsImageType`, +Note that the `WindowsBuildImage` version of the static methods accepts an optional parameter of type `WindowsImageType`, which can be either `WindowsImageType.STANDARD`, the default, or `WindowsImageType.SERVER_2019`: -```typescript +```ts new codebuild.Project(this, 'Project', { environment: { buildImage: codebuild.WindowsBuildImage.fromEcrRepository(ecrRepository, 'v1.0', codebuild.WindowsImageType.SERVER_2019), @@ -277,7 +279,7 @@ The class `LinuxGpuBuildImage` contains constants for working with [AWS Deep Learning Container images](https://aws.amazon.com/releasenotes/available-deep-learning-containers-images): -```typescript +```ts new codebuild.Project(this, 'Project', { environment: { buildImage: codebuild.LinuxGpuBuildImage.DLC_TENSORFLOW_2_1_0_INFERENCE, @@ -295,7 +297,7 @@ you can always specify the account (along with the repository name and tag) explicitly using the `awsDeepLearningContainersImage` method: -```typescript +```ts new codebuild.Project(this, 'Project', { environment: { buildImage: codebuild.LinuxGpuBuildImage.awsDeepLearningContainersImage( @@ -313,7 +315,7 @@ By default, logs will go to cloudwatch. ### CloudWatch Logs Example -```typescript +```ts new codebuild.Project(this, 'Project', { logging: { cloudWatch: { @@ -326,7 +328,7 @@ new codebuild.Project(this, 'Project', { ### S3 Logs Example -```typescript +```ts new codebuild.Project(this, 'Project', { logging: { s3: { @@ -342,7 +344,7 @@ new codebuild.Project(this, 'Project', { CodeBuild allows you to store credentials used when communicating with various sources, like GitHub: -```typescript +```ts new codebuild.GitHubSourceCredentials(this, 'CodeBuildGitHubCreds', { accessToken: cdk.SecretValue.secretsManager('my-token'), }); @@ -352,7 +354,7 @@ new codebuild.GitHubSourceCredentials(this, 'CodeBuildGitHubCreds', { and BitBucket: -```typescript +```ts new codebuild.BitBucketSourceCredentials(this, 'CodeBuildBitBucketCreds', { username: cdk.SecretValue.secretsManager('my-bitbucket-creds', { jsonField: 'username' }), password: cdk.SecretValue.secretsManager('my-bitbucket-creds', { jsonField: 'password' }), @@ -372,7 +374,7 @@ to inspect what credentials are stored in your account. You can specify a test report in your buildspec: -```typescript +```ts const project = new codebuild.Project(this, 'Project', { buildSpec: codebuild.BuildSpec.fromObject({ // ... @@ -394,7 +396,7 @@ with names starting with the project's name; if you'd rather not have those permissions added, you can opt out of it when creating the project: -```typescript +```ts const project = new codebuild.Project(this, 'Project', { // ... grantReportGroupPermissions: false, @@ -404,7 +406,7 @@ const project = new codebuild.Project(this, 'Project', { Alternatively, you can specify an ARN of an existing resource group, instead of a simple name, in your buildspec: -```typescript +```ts // create a new ReportGroup const reportGroup = new codebuild.ReportGroup(this, 'ReportGroup'); @@ -423,7 +425,7 @@ const project = new codebuild.Project(this, 'Project', { If you do that, you need to grant the project's role permissions to write reports to that report group: -```typescript +```ts reportGroup.grantWrite(project); ``` @@ -498,7 +500,7 @@ with their identifier. So, a buildspec for the above Project could look something like this: -```typescript +```ts const project = new codebuild.Project(this, 'MyProject', { // secondary sources and artifacts as above... buildSpec: codebuild.BuildSpec.fromObject({ diff --git a/packages/@aws-cdk/aws-codecommit/README.md b/packages/@aws-cdk/aws-codecommit/README.md index 856111b6a1626..e52d3cdc834e7 100644 --- a/packages/@aws-cdk/aws-codecommit/README.md +++ b/packages/@aws-cdk/aws-codecommit/README.md @@ -1,5 +1,6 @@ -## AWS CodeCommit Construct Library +# AWS CodeCommit Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -7,6 +8,7 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + AWS CodeCommit is a version control service that enables you to privately store and manage Git repositories in the AWS cloud. diff --git a/packages/@aws-cdk/aws-codedeploy/README.md b/packages/@aws-cdk/aws-codedeploy/README.md index 972ca7ef0a523..e8f878973ee6a 100644 --- a/packages/@aws-cdk/aws-codedeploy/README.md +++ b/packages/@aws-cdk/aws-codedeploy/README.md @@ -1,5 +1,6 @@ -## AWS CodeDeploy Construct Library +# AWS CodeDeploy Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -7,6 +8,7 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + AWS CodeDeploy is a deployment service that automates application deployments to @@ -15,7 +17,7 @@ Amazon ECS services. The CDK currently supports Amazon EC2, on-premise and AWS Lambda applications. -### EC2/on-premise Applications +## EC2/on-premise Applications To create a new CodeDeploy Application that deploys to EC2/on-premise instances: @@ -35,7 +37,7 @@ const application = codedeploy.ServerApplication.fromServerApplicationName( ); ``` -### EC2/on-premise Deployment Groups +## EC2/on-premise Deployment Groups To create a new CodeDeploy Deployment Group that deploys to EC2/on-premise instances: @@ -96,7 +98,7 @@ const deploymentGroup = codedeploy.ServerDeploymentGroup.fromLambdaDeploymentGro }); ``` -#### Load balancers +### Load balancers You can [specify a load balancer](https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-aws-elastic-load-balancing.html) with the `loadBalancer` property when creating a Deployment Group. @@ -142,7 +144,7 @@ const deploymentGroup = new codedeploy.ServerDeploymentGroup(this, 'DeploymentGr }); ``` -### Deployment Configurations +## Deployment Configurations You can also pass a Deployment Configuration when creating the Deployment Group: @@ -173,7 +175,7 @@ const deploymentConfig = codedeploy.ServerDeploymentConfig.fromServerDeploymentC ); ``` -### Lambda Applications +## Lambda Applications To create a new CodeDeploy Application that deploys to a Lambda function: @@ -193,7 +195,7 @@ const application = codedeploy.LambdaApplication.fromLambdaApplicationName( ); ``` -### Lambda Deployment Groups +## Lambda Deployment Groups To enable traffic shifting deployments for Lambda functions, CodeDeploy uses Lambda Aliases, which can balance incoming traffic between two different versions of your function. Before deployment, the alias sends 100% of invokes to the version used in production. @@ -221,12 +223,13 @@ const deploymentGroup = new codedeploy.LambdaDeploymentGroup(stack, 'BlueGreenDe ``` In order to deploy a new version of this function: + 1. Increment the version, e.g. `const version = func.addVersion('2')`. 2. Re-deploy the stack (this will trigger a deployment). 3. Monitor the CodeDeploy deployment as traffic shifts between the versions. -#### Create a custom Deployment Config +### Create a custom Deployment Config CodeDeploy for Lambda comes with built-in configurations for traffic shifting. If you want to specify your own strategy, @@ -247,6 +250,7 @@ const deploymentGroup = new codedeploy.LambdaDeploymentGroup(stack, 'BlueGreenDe ``` You can specify a custom name for your deployment config, but if you do you will not be able to update the interval/percentage through CDK. + ```ts const config = new codedeploy.CustomLambdaDeploymentConfig(stack, 'CustomConfig', { type: codedeploy.CustomLambdaDeploymentConfigType.CANARY, @@ -255,7 +259,8 @@ const config = new codedeploy.CustomLambdaDeploymentConfig(stack, 'CustomConfig' deploymentConfigName: 'MyDeploymentConfig', }); ``` -#### Rollbacks and Alarms + +### Rollbacks and Alarms CodeDeploy will roll back if the deployment fails. You can optionally trigger a rollback when one or more alarms are in a failed state: @@ -283,7 +288,7 @@ deploymentGroup.addAlarm(new cloudwatch.Alarm(stack, 'BlueGreenErrors', { })); ``` -#### Pre and Post Hooks +### Pre and Post Hooks CodeDeploy allows you to run an arbitrary Lambda function before traffic shifting actually starts (PreTraffic Hook) and after it completes (PostTraffic Hook). With either hook, you have the opportunity to run logic that determines whether the deployment must succeed or fail. @@ -304,7 +309,7 @@ const deploymentGroup = new codedeploy.LambdaDeploymentGroup(stack, 'BlueGreenDe deploymentGroup.onPostHook(endToEndValidation); ``` -#### Import an existing Deployment Group +### Import an existing Deployment Group To import an already existing Deployment Group: diff --git a/packages/@aws-cdk/aws-codeguruprofiler/README.md b/packages/@aws-cdk/aws-codeguruprofiler/README.md index b4d97ceb8921b..3d7fb906f537e 100644 --- a/packages/@aws-cdk/aws-codeguruprofiler/README.md +++ b/packages/@aws-cdk/aws-codeguruprofiler/README.md @@ -1,21 +1,29 @@ -## AWS::CodeGuruProfiler Construct Library +# AWS::CodeGuruProfiler Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib ![cdk-constructs: Developer Preview](https://img.shields.io/badge/cdk--constructs-developer--preview-informational.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are in **developer preview** before they become stable. We will only make breaking changes to address unforeseen API issues. Therefore, these APIs are not subject to [Semantic Versioning](https://semver.org/), and breaking changes will be announced in release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are in **developer preview** before they +> become stable. We will only make breaking changes to address unforeseen API issues. Therefore, +> these APIs are not subject to [Semantic Versioning](https://semver.org/), and breaking changes +> will be announced in release notes. This means that while you may use them, you may need to +> update your source code when upgrading to a newer version of this package. --- + Amazon CodeGuru Profiler collects runtime performance data from your live applications, and provides recommendations that can help you fine-tune your application performance. -### Installation +## Installation Import to your project: @@ -23,7 +31,7 @@ Import to your project: import * as codeguruprofiler from '@aws-cdk/aws-codeguruprofiler'; ``` -### Basic usage +## Basic usage Here's how to setup a profiling group and give your compute role permissions to publish to the profiling group to the profiling agent can publish profiling information: @@ -37,7 +45,7 @@ const profilingGroup = new ProfilingGroup(stack, 'MyProfilingGroup'); profilingGroup.grantPublish(publishAppRole); ``` -### Compute Platform configuration +## Compute Platform configuration Code Guru Profiler supports multiple compute environments. They can be configured when creating a Profiling Group by using the `computePlatform` property: diff --git a/packages/@aws-cdk/aws-codegurureviewer/README.md b/packages/@aws-cdk/aws-codegurureviewer/README.md index cd8ce1a29a9cc..d0bfe0650fe69 100644 --- a/packages/@aws-cdk/aws-codegurureviewer/README.md +++ b/packages/@aws-cdk/aws-codegurureviewer/README.md @@ -1,12 +1,16 @@ -## AWS::CodeGuruReviewer Construct Library +# AWS::CodeGuruReviewer Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-codepipeline-actions/README.md b/packages/@aws-cdk/aws-codepipeline-actions/README.md index 12e2bfa5437cf..b84b9e574d8e5 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/README.md +++ b/packages/@aws-cdk/aws-codepipeline-actions/README.md @@ -1,15 +1,17 @@ -## AWS CodePipeline Actions +# AWS CodePipeline Actions + --- ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + This package contains Actions that can be used in a CodePipeline. -```typescript +```ts import * as codepipeline from '@aws-cdk/aws-codepipeline'; import * as codepipeline_actions from '@aws-cdk/aws-codepipeline-actions'; ``` @@ -57,7 +59,7 @@ const sourceAction = new codepipeline_actions.CodeCommitSourceAction({ The CodeCommit source action emits variables: -```typescript +```ts const sourceAction = new codepipeline_actions.CodeCommitSourceAction({ // ... variablesNamespace: 'MyNamespace', // optional - by default, a name will be generated for you @@ -83,15 +85,15 @@ If you want to use a GitHub repository as the source, you must create: with scopes **repo** and **admin:repo_hook**. * A [Secrets Manager Secret](https://docs.aws.amazon.com/secretsmanager/latest/userguide/manage_create-basic-secret.html) with the value of the **GitHub Access Token**. Pick whatever name you want (for example `my-github-token`). - This token can be stored either as Plaintext or as a Secret key/value. - If you stored the token as Plaintext, - set `cdk.SecretValue.secretsManager('my-github-token')` as the value of `oauthToken`. - If you stored it as a Secret key/value, + This token can be stored either as Plaintext or as a Secret key/value. + If you stored the token as Plaintext, + set `cdk.SecretValue.secretsManager('my-github-token')` as the value of `oauthToken`. + If you stored it as a Secret key/value, you must set `cdk.SecretValue.secretsManager('my-github-token', { jsonField : 'my-github-token' })` as the value of `oauthToken`. To use GitHub as the source of a CodePipeline: -```typescript +```ts // Read the secret from Secrets Manager const sourceOutput = new codepipeline.Artifact(); const sourceAction = new codepipeline_actions.GitHubSourceAction({ @@ -110,7 +112,7 @@ pipeline.addStage({ The GitHub source action emits variables: -```typescript +```ts const sourceAction = new codepipeline_actions.GitHubSourceAction({ // ... variablesNamespace: 'MyNamespace', // optional - by default, a name will be generated for you @@ -144,7 +146,7 @@ to find it. After that, you can safely abort creating or editing the pipeline - the connection has already been created. -```typescript +```ts const sourceOutput = new codepipeline.Artifact(); const sourceAction = new codepipeline_actions.BitBucketSourceAction({ actionName: 'BitBucket_Source', @@ -159,7 +161,7 @@ const sourceAction = new codepipeline_actions.BitBucketSourceAction({ the above class `BitBucketSourceAction` is experimental - we reserve the right to make breaking changes to it. -### AWS S3 +### AWS S3 Source To use an S3 Bucket as a source in CodePipeline: @@ -205,7 +207,7 @@ otherwise, the CloudWatch Events will not be emitted, and your Pipeline will not react to changes in the Bucket. You can do it through the CDK: -```typescript +```ts import * as cloudtrail from '@aws-cdk/aws-cloudtrail'; const key = 'some/key.zip'; @@ -224,7 +226,7 @@ const sourceAction = new codepipeline_actions.S3SourceAction({ The S3 source action emits variables: -```typescript +```ts const sourceAction = new codepipeline_actions.S3SourceAction({ // ... variablesNamespace: 'MyNamespace', // optional - by default, a name will be generated for you @@ -265,7 +267,7 @@ pipeline.addStage({ The ECR source action emits variables: -```typescript +```ts const sourceAction = new codepipeline_actions.EcrSourceAction({ // ... variablesNamespace: 'MyNamespace', // optional - by default, a name will be generated for you @@ -289,7 +291,7 @@ new codepipeline_actions.CodeBuildAction({ Example of a CodeBuild Project used in a Pipeline, alongside CodeCommit: -```typescript +```ts import * as codebuild from '@aws-cdk/aws-codebuild'; import * as codecommit from '@aws-cdk/aws-codecommit'; @@ -329,7 +331,7 @@ The default category of the CodeBuild Action is `Build`; if you want a `Test` Action instead, override the `type` property: -```typescript +```ts const testAction = new codepipeline_actions.CodeBuildAction({ actionName: 'IntegrationTest', project, @@ -420,7 +422,7 @@ but dynamic, defined in the buildspec, in the 'exported-variables' subsection of the 'env' section. Example: -```typescript +```ts const buildAction = new codepipeline_actions.CodeBuildAction({ actionName: 'Build1', input: sourceOutput, @@ -510,7 +512,7 @@ directly from a CodeCommit repository, with a manual approval step in between to See [the AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/continuous-delivery-codepipeline.html) for more details about using CloudFormation in CodePipeline. -##### Actions defined by this package +#### Actions defined by this package This package defines the following actions: @@ -523,7 +525,7 @@ This package defines the following actions: changes from the people (or system) applying the changes. * **CloudFormationExecuteChangeSetAction** - Execute a change set prepared previously. -##### Lambda deployed through CodePipeline +#### Lambda deployed through CodePipeline If you want to deploy your Lambda through CodePipeline, and you don't use assets (for example, because your CDK code and Lambda code are separate), @@ -539,7 +541,7 @@ using a CloudFormation CodePipeline Action. Example: If you want to update stacks in a different account, pass the `account` property when creating the action: -```typescript +```ts new codepipeline_actions.CloudFormationCreateUpdateStackAction({ // ... account: '123456789012', @@ -554,7 +556,7 @@ You can also pass a role explicitly when creating the action - in that case, the `account` property is ignored, and the action will operate in the same account the role belongs to: -```typescript +```ts import { PhysicalName } from '@aws-cdk/core'; // in stack for account 123456789012... @@ -601,7 +603,7 @@ pipeline.addStage({ To use CodeDeploy for blue-green Lambda deployments in a Pipeline: -```typescript +```ts const lambdaCode = lambda.Code.fromCfnParameters(); const func = new lambda.Function(lambdaStack, 'Lambda', { code: lambdaCode, @@ -631,7 +633,7 @@ and deploy the `lambdaStack` using a CloudFormation CodePipeline Action CodePipeline can deploy an ECS service. The deploy Action receives one input Artifact which contains the [image definition file]: -```typescript +```ts const deployStage = pipeline.addStage({ stageName: 'Deploy', actions: [ @@ -654,7 +656,7 @@ const deployStage = pipeline.addStage({ [image definition file]: https://docs.aws.amazon.com/codepipeline/latest/userguide/pipelines-create.html#pipelines-create-image-definitions -### AWS S3 +### AWS S3 Deployment To use an S3 Bucket as a deployment target in CodePipeline: @@ -754,7 +756,7 @@ new codepipeline.Pipeline(this, 'Pipeline', { This package contains an Action that stops the Pipeline until someone manually clicks the approve button: -```typescript +```ts const manualApprovalAction = new codepipeline_actions.ManualApprovalAction({ actionName: 'Approve', notificationTopic: new sns.Topic(this, 'Topic'), // optional @@ -794,7 +796,7 @@ pipeline.addStage({ The Lambda Action can have up to 5 inputs, and up to 5 outputs: -```typescript +```ts const lambdaAction = new codepipeline_actions.LambdaInvokeAction({ actionName: 'Lambda', @@ -816,7 +818,7 @@ but dynamic, defined by the function calling the `PutJobSuccessResult` API with the `outputVariables` property filled with the map of variables Example: -```typescript +```ts import * as lambda from '@aws-cdk/aws-lambda'; const lambdaInvokeAction = new codepipeline_actions.LambdaInvokeAction({ diff --git a/packages/@aws-cdk/aws-codepipeline/README.md b/packages/@aws-cdk/aws-codepipeline/README.md index e32f07f486c0f..6a1731b614131 100644 --- a/packages/@aws-cdk/aws-codepipeline/README.md +++ b/packages/@aws-cdk/aws-codepipeline/README.md @@ -1,5 +1,6 @@ -## AWS CodePipeline Construct Library +# AWS CodePipeline Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -7,9 +8,10 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + -### Pipeline +## Pipeline To construct an empty Pipeline: @@ -43,11 +45,11 @@ const pipeline = new codepipeline.Pipeline(this, 'MyFirstPipeline', { }); ``` -### Stages +## Stages You can provide Stages when creating the Pipeline: -```typescript +```ts const pipeline = new codepipeline.Pipeline(this, 'MyFirstPipeline', { stages: [ { @@ -84,7 +86,7 @@ const someStage = pipeline.addStage({ }); ``` -### Actions +## Actions Actions live in a separate package, `@aws-cdk/aws-codepipeline-actions`. @@ -96,7 +98,7 @@ or you can use the `IStage.addAction()` method to mutate an existing Stage: sourceStage.addAction(someAction); ``` -### Cross-account CodePipelines +## Cross-account CodePipelines > Cross-account Pipeline actions require that the Pipeline has *not* been > created with `crossAccountKeys: false`. @@ -115,7 +117,7 @@ These resources can be in different accounts than the pipeline itself. For example, the following action deploys to an imported S3 bucket from a different account: -```typescript +```ts stage.addAction(new codepipeline_actions.S3DeployAction({ bucket: s3.Bucket.fromBucketAttributes(this, 'Bucket', { account: '123456789012', @@ -127,7 +129,7 @@ stage.addAction(new codepipeline_actions.S3DeployAction({ Actions that don't accept a resource object accept an explicit `account` parameter: -```typescript +```ts stage.addAction(new codepipeline_actions.CloudFormationCreateUpdateStackAction({ account: '123456789012', // ... @@ -151,13 +153,13 @@ stage.addAction(new codepipeline_actions.CloudFormationCreateUpdateStackAction({ })); ``` -### Cross-region CodePipelines +## Cross-region CodePipelines Similar to how you set up a cross-account Action, the AWS resource object you pass to actions can also be in different *Regions*. For example, the following Action deploys to an imported S3 bucket from a different Region: -```typescript +```ts stage.addAction(new codepipeline_actions.S3DeployAction({ bucket: s3.Bucket.fromBucketAttributes(this, 'Bucket', { region: 'us-west-1', @@ -170,7 +172,7 @@ stage.addAction(new codepipeline_actions.S3DeployAction({ Actions that don't take an AWS resource will accept an explicit `region` parameter: -```typescript +```ts stage.addAction(new codepipeline_actions.CloudFormationCreateUpdateStackAction({ // ... region: 'us-west-1', @@ -207,12 +209,12 @@ const pipeline = new codepipeline.Pipeline(this, 'MyFirstPipeline', { /* ... */ See [the AWS docs here](https://docs.aws.amazon.com/codepipeline/latest/userguide/actions-create-cross-region.html) for more information on cross-region CodePipelines. -#### Creating an encrypted replication bucket +### Creating an encrypted replication bucket If you're passing a replication bucket created in a different stack, like this: -```typescript +```ts const replicationStack = new Stack(app, 'ReplicationStack', { env: { region: 'us-west-1', @@ -241,7 +243,7 @@ and so you can't reference them across environments. In this case, you need to use an alias in place of the key when creating the bucket: -```typescript +```ts const key = new kms.Key(replicationStack, 'ReplicationKey'); const alias = new kms.Alias(replicationStack, 'ReplicationAlias', { // aliasName is required @@ -254,7 +256,7 @@ const replicationBucket = new s3.Bucket(replicationStack, 'ReplicationBucket', { }); ``` -### Variables +## Variables The library supports the CodePipeline Variables feature. Each action class that emits variables has a separate variables interface, @@ -265,7 +267,7 @@ you access the appropriate property of the interface returned from `variables`, which represents a single variable. Example: -```typescript +```ts // MyAction is some action type that produces variables const myAction = new MyAction({ // ... @@ -280,7 +282,7 @@ The namespace name that will be used will be automatically generated by the pipe based on the stage and action name; you can pass a custom name when creating the action instance: -```typescript +```ts const myAction = new MyAction({ // ... variablesNamespace: 'MyNamespace', @@ -291,7 +293,7 @@ There are also global variables available, not tied to any action; these are accessed through static properties of the `GlobalVariables` class: -```typescript +```ts new OtherAction({ // ... config: codepipeline.GlobalVariables.executionId, @@ -304,9 +306,9 @@ for details on how to use the variables for each action class. See the [CodePipeline documentation](https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-variables.html) for more details on how to use the variables feature. -### Events +## Events -#### Using a pipeline as an event target +### Using a pipeline as an event target A pipeline can be used as a target for a CloudWatch event rule: @@ -326,7 +328,7 @@ When a pipeline is used as an event target, the "codepipeline:StartPipelineExecution" permission is granted to the AWS CloudWatch Events service. -#### Event sources +### Event sources Pipelines emit CloudWatch events. To define event rules for events emitted by the pipeline, stages or action, use the `onXxx` methods on the respective diff --git a/packages/@aws-cdk/aws-codestar/README.md b/packages/@aws-cdk/aws-codestar/README.md index 87c1685ad6ffd..e9c6ec2e4bf75 100644 --- a/packages/@aws-cdk/aws-codestar/README.md +++ b/packages/@aws-cdk/aws-codestar/README.md @@ -1,16 +1,24 @@ -## AWS::CodeStar Construct Library +# AWS::CodeStar Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + ## GitHub Repository diff --git a/packages/@aws-cdk/aws-codestarconnections/README.md b/packages/@aws-cdk/aws-codestarconnections/README.md index 0f231a3fbfceb..5f6e7e73fc163 100644 --- a/packages/@aws-cdk/aws-codestarconnections/README.md +++ b/packages/@aws-cdk/aws-codestarconnections/README.md @@ -1,12 +1,16 @@ -## AWS::CodeStarConnections Construct Library +# AWS::CodeStarConnections Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-codestarnotifications/README.md b/packages/@aws-cdk/aws-codestarnotifications/README.md index 9352d8f188b7c..cc63ebe8ecd28 100644 --- a/packages/@aws-cdk/aws-codestarnotifications/README.md +++ b/packages/@aws-cdk/aws-codestarnotifications/README.md @@ -1,12 +1,16 @@ -## AWS::CodeStarNotifications Construct Library +# AWS::CodeStarNotifications Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-cognito/README.md b/packages/@aws-cdk/aws-cognito/README.md index 881db02148556..5f88107b767c9 100644 --- a/packages/@aws-cdk/aws-cognito/README.md +++ b/packages/@aws-cdk/aws-cognito/README.md @@ -1,18 +1,26 @@ -## Amazon Cognito Construct Library +# Amazon Cognito Construct Library + --- -| Features | Stability | -| --- | --- | -| CFN Resources | ![Stable](https://img.shields.io/badge/stable-success.svg?style=for-the-badge) | -| Higher level constructs for User Pools | ![Stable](https://img.shields.io/badge/stable-success.svg?style=for-the-badge) | -| Higher level constructs for Identity Pools | ![Not Implemented](https://img.shields.io/badge/not--implemented-black.svg?style=for-the-badge) | +Features | Stability +-------------------------------------------|-------------------------------------------------------- +CFN Resources | ![Stable](https://img.shields.io/badge/stable-success.svg?style=for-the-badge) +Higher level constructs for User Pools | ![Stable](https://img.shields.io/badge/stable-success.svg?style=for-the-badge) +Higher level constructs for Identity Pools | ![Not Implemented](https://img.shields.io/badge/not--implemented-black.svg?style=for-the-badge) + +> **CFN Resources:** All classes with the `Cfn` prefix in this module ([CFN Resources]) are always +> stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib -> **CFN Resources:** All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. + -> **Stable:** Higher level constructs in this module that are marked stable will not undergo any breaking changes. They will strictly follow the [Semantic Versioning](https://semver.org/) model. +> **Stable:** Higher level constructs in this module that are marked stable will not undergo any +> breaking changes. They will strictly follow the [Semantic Versioning](https://semver.org/) model. --- + [Amazon Cognito](https://docs.aws.amazon.com/cognito/latest/developerguide/what-is-amazon-cognito.html) provides @@ -113,10 +121,10 @@ here](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-poo Users registering or signing in into your application can do so with multiple identifiers. There are 4 options available: -* `username`: Allow signing in using the one time immutable user name that the user chose at the time of sign up. -* `email`: Allow signing in using the email address that is associated with the account. -* `phone`: Allow signing in using the phone number that is associated with the account. -* `preferredUsername`: Allow signing in with an alternate user name that the user can change at any time. However, this +- `username`: Allow signing in using the one time immutable user name that the user chose at the time of sign up. +- `email`: Allow signing in using the email address that is associated with the account. +- `phone`: Allow signing in using the phone number that is associated with the account. +- `preferredUsername`: Allow signing in with an alternate user name that the user can change at any time. However, this is not available if the `username` option is not chosen. The following code sets up a user pool so that the user can sign in with either their username or their email address - @@ -407,9 +415,9 @@ Party](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-po The following third-party identity providers are currently supported in the CDK - -* [Login With Amazon](https://developer.amazon.com/apps-and-games/login-with-amazon) -* [Facebook Login](https://developers.facebook.com/docs/facebook-login/) -* [Google Login](https://developers.google.com/identity/sign-in/web/sign-in) +- [Login With Amazon](https://developer.amazon.com/apps-and-games/login-with-amazon) +- [Facebook Login](https://developers.facebook.com/docs/facebook-login/) +- [Google Login](https://developers.google.com/identity/sign-in/web/sign-in) The following code configures a user pool to federate with the third party provider, 'Login with Amazon'. The identity provider needs to be configured with a set of credentials that the Cognito backend can use to federate with the diff --git a/packages/@aws-cdk/aws-config/README.md b/packages/@aws-cdk/aws-config/README.md index 50aec9900ce8a..3d3e24f361549 100644 --- a/packages/@aws-cdk/aws-config/README.md +++ b/packages/@aws-cdk/aws-config/README.md @@ -1,18 +1,26 @@ -## AWS Config Construct Library +# AWS Config Construct Library + --- -| Features | Stability | -| --- | --- | -| CFN Resources | ![Stable](https://img.shields.io/badge/stable-success.svg?style=for-the-badge) | -| Higher level constructs for Config Rules | ![Stable](https://img.shields.io/badge/stable-success.svg?style=for-the-badge) | -| Higher level constructs for initial set-up (delivery channel & configuration recorder) | ![Not Implemented](https://img.shields.io/badge/not--implemented-black.svg?style=for-the-badge) | +Features | Stability +---------------------------------------------------------------------------------------|------------ +CFN Resources | ![Stable](https://img.shields.io/badge/stable-success.svg?style=for-the-badge) +Higher level constructs for Config Rules | ![Stable](https://img.shields.io/badge/stable-success.svg?style=for-the-badge) +Higher level constructs for initial set-up (delivery channel & configuration recorder) | ![Not Implemented](https://img.shields.io/badge/not--implemented-black.svg?style=for-the-badge) + +> **CFN Resources:** All classes with the `Cfn` prefix in this module ([CFN Resources]) are always +> stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib -> **CFN Resources:** All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. + -> **Stable:** Higher level constructs in this module that are marked stable will not undergo any breaking changes. They will strictly follow the [Semantic Versioning](https://semver.org/) model. +> **Stable:** Higher level constructs in this module that are marked stable will not undergo any +> breaking changes. They will strictly follow the [Semantic Versioning](https://semver.org/) model. --- + [AWS Config](https://docs.aws.amazon.com/config/latest/developerguide/WhatIsConfig.html) provides a detailed view of the configuration of AWS resources in your AWS account. @@ -21,7 +29,7 @@ past so that you can see how the configurations and relationships change over ti This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. -### Initial Setup +## Initial Setup Before using the constructs provided in this module, you need to set up AWS Config in the region in which it will be used. This setup includes the one-time creation of the @@ -35,14 +43,14 @@ The following guides provide the steps for getting started with AWS Config: - [Using the AWS Console](https://docs.aws.amazon.com/config/latest/developerguide/gs-console.html) - [Using the AWS CLI](https://docs.aws.amazon.com/config/latest/developerguide/gs-cli.html) -### Rules +## Rules AWS Config can evaluate the configuration settings of your AWS resources by creating AWS Config rules, which represent your ideal configuration settings. See [Evaluating Resources with AWS Config Rules](https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config.html) to learn more about AWS Config rules. -#### AWS Managed Rules +### AWS Managed Rules AWS Config provides AWS managed rules, which are predefined, customizable rules that AWS Config uses to evaluate whether your AWS resources comply with common best practices. @@ -69,7 +77,7 @@ You can find supported input parameters in the [List of AWS Config Managed Rules The following higher level constructs for AWS managed rules are available. -##### Access Key rotation +#### Access Key rotation Checks whether your active access keys are rotated within the number of days specified. @@ -81,7 +89,7 @@ import * as cdk from '@aws-cdk/aws-cdk'; new config.AccessKeysRotated(this, 'AccessKeyRotated'); ``` -##### CloudFormation Stack drift detection +#### CloudFormation Stack drift detection Checks whether your CloudFormation stack's actual configuration differs, or has drifted, from it's expected configuration. @@ -97,7 +105,7 @@ new config.CloudFormationStackDriftDetectionCheck(stack, 'Drift', { }); ``` -##### CloudFormation Stack notifications +#### CloudFormation Stack notifications Checks whether your CloudFormation stacks are sending event notifications to a SNS topic. @@ -115,13 +123,13 @@ new config.CloudFormationStackNotificationCheck(this, 'NotificationCheck', { }) ``` -#### Custom rules +### Custom rules You can develop custom rules and add them to AWS Config. You associate each custom rule with an AWS Lambda function, which contains the logic that evaluates whether your AWS resources comply with the rule. -#### Triggers +### Triggers AWS Lambda executes functions in response to events that are published by AWS Services. The function for a custom Config rule receives an event that is published by AWS Config, @@ -149,7 +157,7 @@ The AWS documentation has examples of Lambda functions for evaluations that are [triggered by configuration changes](https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config_develop-rules_nodejs-sample.html#event-based-example-rule) and [triggered periodically](https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config_develop-rules_nodejs-sample.html#periodic-example-rule) -#### Scope +### Scope By default rules are triggered by changes to all [resources](https://docs.aws.amazon.com/config/latest/developerguide/resource-config-reference.html#supported-resources). @@ -177,7 +185,7 @@ const tagRule = new config.CustomRule(this, 'CostCenterTagRule', { }); ``` -#### Events +### Events You can define Amazon EventBridge event rules which trigger when a compliance check fails or when a rule is re-evaluated. @@ -214,7 +222,7 @@ rule.onReEvaluationStatus('ReEvaluationEvent', { }) ``` -#### Example +### Example The following example creates a custom rule that evaluates whether EC2 instances are compliant. Compliance events are published to an SNS topic. diff --git a/packages/@aws-cdk/aws-databrew/README.md b/packages/@aws-cdk/aws-databrew/README.md index ef80e10589356..66ed60292f316 100644 --- a/packages/@aws-cdk/aws-databrew/README.md +++ b/packages/@aws-cdk/aws-databrew/README.md @@ -1,12 +1,16 @@ # AWS::DataBrew Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-datapipeline/README.md b/packages/@aws-cdk/aws-datapipeline/README.md index e0dfce4b998fd..6f0564d8a12aa 100644 --- a/packages/@aws-cdk/aws-datapipeline/README.md +++ b/packages/@aws-cdk/aws-datapipeline/README.md @@ -1,12 +1,16 @@ -## AWS Data Pipeline Construct Library +# AWS Data Pipeline Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-dax/README.md b/packages/@aws-cdk/aws-dax/README.md index 9bb7cb14d9e86..5b0287374de26 100644 --- a/packages/@aws-cdk/aws-dax/README.md +++ b/packages/@aws-cdk/aws-dax/README.md @@ -1,12 +1,16 @@ -## Amazon DynamoDB Accelerator Construct Library +# Amazon DynamoDB Accelerator Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-detective/README.md b/packages/@aws-cdk/aws-detective/README.md index e8381d86bdf35..af4fca54d905d 100644 --- a/packages/@aws-cdk/aws-detective/README.md +++ b/packages/@aws-cdk/aws-detective/README.md @@ -1,12 +1,16 @@ -## AWS::Detective Construct Library +# AWS::Detective Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-directoryservice/README.md b/packages/@aws-cdk/aws-directoryservice/README.md index 7375c912fc652..5e7a656ebb37d 100644 --- a/packages/@aws-cdk/aws-directoryservice/README.md +++ b/packages/@aws-cdk/aws-directoryservice/README.md @@ -1,12 +1,16 @@ -## AWS Directory Service Construct Library +# AWS Directory Service Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-dlm/README.md b/packages/@aws-cdk/aws-dlm/README.md index 7174b307064f4..c6172c8f0f683 100644 --- a/packages/@aws-cdk/aws-dlm/README.md +++ b/packages/@aws-cdk/aws-dlm/README.md @@ -1,12 +1,16 @@ -## Amazon Data Lifecycle Manager Construct Library +# Amazon Data Lifecycle Manager Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + ```ts diff --git a/packages/@aws-cdk/aws-dms/README.md b/packages/@aws-cdk/aws-dms/README.md index 97b6e6567f363..3df28c7cf517b 100644 --- a/packages/@aws-cdk/aws-dms/README.md +++ b/packages/@aws-cdk/aws-dms/README.md @@ -1,12 +1,16 @@ -## AWS Database Migration Service Construct Library +# AWS Database Migration Service Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-docdb/README.md b/packages/@aws-cdk/aws-docdb/README.md index a2d38da952212..826033de4c134 100644 --- a/packages/@aws-cdk/aws-docdb/README.md +++ b/packages/@aws-cdk/aws-docdb/README.md @@ -1,19 +1,27 @@ -## Amazon DocumentDB Construct Library +# Amazon DocumentDB Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + -### Starting a Clustered Database +## Starting a Clustered Database To set up a clustered DocumentDB database, define a `DatabaseCluster`. You must always launch a database in a VPC. Use the `vpcSubnets` attribute to control whether @@ -33,11 +41,12 @@ const cluster = new DatabaseCluster(this, 'Database', { } }); ``` + By default, the master password will be generated and stored in AWS Secrets Manager with auto-generated description. Your cluster will be empty by default. -### Connecting +## Connecting To control who can access the cluster, use the `.connections` attribute. DocumentDB databases have a default port, so you don't need to specify the port: @@ -53,8 +62,10 @@ attributes: const writeAddress = cluster.clusterEndpoint.socketAddress; // "HOSTNAME:PORT" ``` -### Rotating credentials +## Rotating credentials + When the master password is generated and stored in AWS Secrets Manager, it can be rotated automatically: + ```ts cluster.addRotationSingleUser(); // Will rotate automatically after 30 days ``` @@ -62,6 +73,7 @@ cluster.addRotationSingleUser(); // Will rotate automatically after 30 days [example of setting up master password rotation for a cluster](test/integ.cluster-rotation.lit.ts) The multi user rotation scheme is also available: + ```ts cluster.addRotationMultiUser('MyUser', { secret: myImportedSecret // This secret must have the `masterarn` key @@ -69,6 +81,7 @@ cluster.addRotationMultiUser('MyUser', { ``` It's also possible to create user credentials together with the cluster and add rotation: + ```ts const myUserSecret = new docdb.DatabaseSecret(this, 'MyUserSecret', { username: 'myuser', @@ -80,6 +93,7 @@ cluster.addRotationMultiUser('MyUser', { // Add rotation using the multi user sc secret: myUserSecretAttached // This secret must have the `masterarn` key }); ``` + **Note**: This user must be created manually in the database using the master credentials. The rotation will start as soon as this user exists. diff --git a/packages/@aws-cdk/aws-dynamodb-global/README.md b/packages/@aws-cdk/aws-dynamodb-global/README.md index 5883da00b0423..a31c37eb3e114 100644 --- a/packages/@aws-cdk/aws-dynamodb-global/README.md +++ b/packages/@aws-cdk/aws-dynamodb-global/README.md @@ -1,5 +1,6 @@ -## @aws-cdk/aws-dynamodb-global +# @aws-cdk/aws-dynamodb-global + --- ![Deprecated](https://img.shields.io/badge/deprecated-critical.svg?style=for-the-badge) @@ -7,9 +8,10 @@ > This API may emit warnings. Backward compatibility is not guaranteed. --- + -### NOTICE: This module has been deprecated in favor of `@aws-cdk/aws-dynamodb.Table.replicationRegions` +## NOTICE: This module has been deprecated in favor of `@aws-cdk/aws-dynamodb.Table.replicationRegions` --- @@ -17,7 +19,7 @@ Global Tables builds upon DynamoDB’s global footprint to provide you with a fu Here is a minimal deployable Global DynamoDB tables definition: -```typescript +```ts import { AttributeType } from '@aws-cdk/aws-dynamodb'; import { GlobalTable } from '@aws-cdk/aws-dynamodb-global'; import { App } from '@aws-cdk/core'; @@ -32,6 +34,7 @@ app.synth(); ``` ## Implementation Notes + AWS Global DynamoDB Tables is an odd case currently. The way this package works - * Creates a DynamoDB table in a separate stack in each `DynamoDBGlobalStackProps.region` specified diff --git a/packages/@aws-cdk/aws-dynamodb/README.md b/packages/@aws-cdk/aws-dynamodb/README.md index de76cdb238b81..72d10f35c1c15 100644 --- a/packages/@aws-cdk/aws-dynamodb/README.md +++ b/packages/@aws-cdk/aws-dynamodb/README.md @@ -1,5 +1,6 @@ -## Amazon DynamoDB Construct Library +# Amazon DynamoDB Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -7,6 +8,7 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + Here is a minimal deployable DynamoDB table definition: @@ -19,7 +21,7 @@ const table = new dynamodb.Table(this, 'Table', { }); ``` -### Importing existing tables +## Importing existing tables To import an existing table into your CDK application, use the `Table.fromTableName`, `Table.fromTableArn` or `Table.fromTableAttributes` factory method. This method accepts table name or table ARN which describes the properties of an already @@ -35,14 +37,15 @@ If you intend to use the `tableStreamArn` (including indirectly, for example by `@aws-cdk/aws-lambda-event-source.DynamoEventSource` on the imported table), you *must* use the `Table.fromTableAttributes` method and the `tableStreamArn` property *must* be populated. -### Keys +## Keys When a table is defined, you must define it's schema using the `partitionKey` (required) and `sortKey` (optional) properties. -### Billing Mode +## Billing Mode DynamoDB supports two billing modes: + * PROVISIONED - the default mode where the table and global secondary indexes have configured read and write capacity. * PAY_PER_REQUEST - on-demand pricing and scaling. You only pay for what you use and there is no read and write capacity for the table or its global secondary indexes. @@ -58,7 +61,7 @@ const table = new dynamodb.Table(this, 'Table', { Further reading: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode. -### Configure AutoScaling for your table +## Configure AutoScaling for your table You can have DynamoDB automatically raise and lower the read and write capacities of your table by setting up autoscaling. You can use this to either keep your @@ -73,7 +76,7 @@ Further reading: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/AutoScaling.html https://aws.amazon.com/blogs/database/how-to-use-aws-cloudformation-to-configure-auto-scaling-for-amazon-dynamodb-tables-and-indexes/ -### Amazon DynamoDB Global Tables +## Amazon DynamoDB Global Tables You can create DynamoDB Global Tables by setting the `replicationRegions` property on a `Table`: @@ -89,9 +92,10 @@ const globalTable = new dynamodb.Table(this, 'Table', { When doing so, a CloudFormation Custom Resource will be added to the stack in order to create the replica tables in the selected regions. -### Encryption +## Encryption All user data stored in Amazon DynamoDB is fully encrypted at rest. When creating a new table, you can choose to encrypt using the following customer master keys (CMK) to encrypt your table: + * AWS owned CMK - By default, all tables are encrypted under an AWS owned customer master key (CMK) in the DynamoDB service account (no additional charges apply). * AWS managed CMK - AWS KMS keys (one per region) are created in your account, managed, and used on your behalf by AWS DynamoDB (AWS KMS chages apply). * Customer managed CMK - You have full control over the KMS key used to encrypt the DynamoDB Table (AWS KMS charges apply). diff --git a/packages/@aws-cdk/aws-ec2/README.md b/packages/@aws-cdk/aws-ec2/README.md index 0a3114dc34d27..664f3c2b2eff2 100644 --- a/packages/@aws-cdk/aws-ec2/README.md +++ b/packages/@aws-cdk/aws-ec2/README.md @@ -1,6 +1,6 @@ -## Amazon EC2 Construct Library - +# Amazon EC2 Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -8,8 +8,10 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + + The `@aws-cdk/aws-ec2` package contains primitives for setting up networking and instances. diff --git a/packages/@aws-cdk/aws-ecr-assets/README.md b/packages/@aws-cdk/aws-ecr-assets/README.md index 5334028d15664..dc621f942b430 100644 --- a/packages/@aws-cdk/aws-ecr-assets/README.md +++ b/packages/@aws-cdk/aws-ecr-assets/README.md @@ -1,12 +1,18 @@ # AWS CDK Docker Image Assets + --- ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + This module allows bundling Docker images as assets. @@ -15,7 +21,7 @@ Images are built from a local Docker context directory (with a `Dockerfile`), uploaded to ECR by the CDK toolkit and/or your app's CI-CD pipeline, and can be naturally referenced in your CDK app. -```typescript +```ts import { DockerImageAsset } from '@aws-cdk/aws-ecr-assets'; const asset = new DockerImageAsset(this, 'MyBuildImage', { @@ -50,7 +56,7 @@ and tag. You can optionally pass build args to the `docker build` command by specifying the `buildArgs` property: -```typescript +```ts const asset = new DockerImageAsset(this, 'MyBuildImage', { directory: path.join(__dirname, 'my-image'), buildArgs: { @@ -62,13 +68,14 @@ const asset = new DockerImageAsset(this, 'MyBuildImage', { You can optionally pass a target to the `docker build` command by specifying the `target` property: -```typescript +```ts const asset = new DockerImageAsset(this, 'MyBuildImage', { directory: path.join(__dirname, 'my-image'), target: 'a-target' }) ``` -### Pull Permissions + +## Pull Permissions Depending on the consumer of your image asset, you will need to make sure the principal has permissions to pull the image. diff --git a/packages/@aws-cdk/aws-ecr/README.md b/packages/@aws-cdk/aws-ecr/README.md index a2e4ab8ee3d35..0a2ef76458ac3 100644 --- a/packages/@aws-cdk/aws-ecr/README.md +++ b/packages/@aws-cdk/aws-ecr/README.md @@ -1,5 +1,6 @@ -## Amazon ECR Construct Library +# Amazon ECR Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -7,11 +8,12 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + This package contains constructs for working with Amazon Elastic Container Registry. -### Repositories +## Repositories Define a repository by creating a new instance of `Repository`. A repository holds multiple verions of a single container image. @@ -20,7 +22,7 @@ holds multiple verions of a single container image. const repository = new ecr.Repository(this, 'Repository'); ``` -### Image scanning +## Image scanning Amazon ECR image scanning helps in identifying software vulnerabilities in your container images. You can manually scan container images stored in Amazon ECR, or you can configure your repositories to scan images when you push them to a repository. To create a new repository to scan on push, simply enable `imageScanOnPush` in the properties @@ -54,7 +56,7 @@ const user = new iam.User(this, 'User', { ... }); AuthorizationToken.grantRead(user); ``` -### Automatically clean up repositories +## Automatically clean up repositories You can set life cycle rules to automatically clean up old images from your repository. The first life cycle rule that matches an image will be applied diff --git a/packages/@aws-cdk/aws-ecs-patterns/README.md b/packages/@aws-cdk/aws-ecs-patterns/README.md index e799d7f35d84b..33fef16ac9865 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/README.md +++ b/packages/@aws-cdk/aws-ecs-patterns/README.md @@ -1,10 +1,12 @@ # CDK Construct library for higher-level ECS Constructs + --- ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + This library provides higher-level Amazon ECS constructs which follow common architectural patterns. It contains: diff --git a/packages/@aws-cdk/aws-ecs/README.md b/packages/@aws-cdk/aws-ecs/README.md index ae5e085018f46..a5f2b09e8e92b 100644 --- a/packages/@aws-cdk/aws-ecs/README.md +++ b/packages/@aws-cdk/aws-ecs/README.md @@ -1,5 +1,6 @@ -## Amazon ECS Construct Library +# Amazon ECS Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -7,6 +8,7 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + This package contains constructs for working with **Amazon Elastic Container @@ -207,6 +209,7 @@ const fargateTaskDefinition = new ecs.FargateTaskDefinition(this, 'TaskDef', { cpu: 256 }); ``` + To add containers to a task definition, call `addContainer()`: ```ts @@ -276,13 +279,13 @@ const taskDefinition = new ecs.TaskDefinition(this, 'TaskDef', { Images supply the software that runs inside the container. Images can be obtained from either DockerHub or from ECR repositories, or built directly from a local Dockerfile. -* `ecs.ContainerImage.fromRegistry(imageName)`: use a public image. -* `ecs.ContainerImage.fromRegistry(imageName, { credentials: mySecret })`: use a private image that requires credentials. -* `ecs.ContainerImage.fromEcrRepository(repo, tag)`: use the given ECR repository as the image +- `ecs.ContainerImage.fromRegistry(imageName)`: use a public image. +- `ecs.ContainerImage.fromRegistry(imageName, { credentials: mySecret })`: use a private image that requires credentials. +- `ecs.ContainerImage.fromEcrRepository(repo, tag)`: use the given ECR repository as the image to start. If no tag is provided, "latest" is assumed. -* `ecs.ContainerImage.fromAsset('./image')`: build and upload an +- `ecs.ContainerImage.fromAsset('./image')`: build and upload an image directly from a `Dockerfile` in your source directory. -* `ecs.ContainerImage.fromDockerImageAsset(asset)`: uses an existing +- `ecs.ContainerImage.fromDockerImageAsset(asset)`: uses an existing `@aws-cdk/aws-ecr-assets.DockerImageAsset` as a container image. ### Environment variables @@ -328,6 +331,7 @@ const service = new ecs.FargateService(this, 'Service', { desiredCount: 5 }); ``` + `Services` by default will create a security group if not provided. If you'd like to specify which security groups to use you can override the `securityGroups` property. @@ -394,6 +398,7 @@ See the [ecs/cross-stack-load-balancer example](https://github.com/aws-samples/a for the alternatives. ### Include a classic load balancer + `Services` can also be directly attached to a classic load balancer as targets: ```ts @@ -423,8 +428,8 @@ lb.addTarget(service.loadBalancerTarget{ There are two higher-level constructs available which include a load balancer for you that can be found in the aws-ecs-patterns module: -* `LoadBalancedFargateService` -* `LoadBalancedEc2Service` +- `LoadBalancedFargateService` +- `LoadBalancedEc2Service` ## Task Auto-Scaling diff --git a/packages/@aws-cdk/aws-efs/README.md b/packages/@aws-cdk/aws-efs/README.md index 6a598f1146624..16e04aa27462b 100644 --- a/packages/@aws-cdk/aws-efs/README.md +++ b/packages/@aws-cdk/aws-efs/README.md @@ -1,16 +1,24 @@ -## Amazon Elastic File System Construct Library +# Amazon Elastic File System Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + This construct library allows you to set up AWS Elastic File System (EFS). @@ -37,7 +45,7 @@ const fileSystem = new FileSystem(this, 'EfsFileSystem', { }); ``` -### Access Point +## Access Point An access point is an application-specific view into an EFS file system that applies an operating system user and group, and a file system path, to any file system request made through the access point. The operating system user @@ -75,7 +83,7 @@ efs.AccessPoint.fromAccessPointAttributes(this, 'ap', { mount targets created in all availability zones the function will execute in, but not all are in the available life cycle state yet. Please wait for them to become available and try the request again. -### Connecting +## Connecting To control who can access the EFS, use the `.connections` attribute. EFS has a fixed default port, so you don't need to specify the port: @@ -83,10 +91,12 @@ a fixed default port, so you don't need to specify the port: ```ts fileSystem.connections.allowDefaultPortFrom(instance); ``` -### Mounting the file system using User Data + +## Mounting the file system using User Data In order to automatically mount this file system during instance launch, following code can be used as reference: + ```ts const vpc = new ec2.Vpc(this, 'VPC'); diff --git a/packages/@aws-cdk/aws-eks-legacy/README.md b/packages/@aws-cdk/aws-eks-legacy/README.md index 73d34d7a9b624..35db7f23efb1e 100644 --- a/packages/@aws-cdk/aws-eks-legacy/README.md +++ b/packages/@aws-cdk/aws-eks-legacy/README.md @@ -1,6 +1,6 @@ -## Amazon EKS Construct Library - +# Amazon EKS Construct Library + --- ![Deprecated](https://img.shields.io/badge/deprecated-critical.svg?style=for-the-badge) @@ -8,11 +8,14 @@ > This API may emit warnings. Backward compatibility is not guaranteed. --- + + **This module is available for backwards compatibility purposes only ([details](https://github.com/aws/aws-cdk/pull/5540)). It will no longer be released with the CDK starting March 1st, 2020. See [issue -# 5544](https://github.com/aws/aws-cdk/issues/5544) for upgrade instructions.** + +## 5544](https://github.com/aws/aws-cdk/issues/5544) for upgrade instructions.** --- @@ -165,7 +168,7 @@ with the `update-kubeconfig` command. Something like this: -``` +```plaintext Outputs: eks-integ-defaults.ClusterConfigCommand43AAE40F = aws eks update-kubeconfig --name cluster-ba7c166b-c4f3-421c-bf8a-6812e4036a33 --role-arn arn:aws:iam::112233445566:role/eks-integ-defaults-Role1ABCC5F0-1EFK2W5ZJD98Y ``` diff --git a/packages/@aws-cdk/aws-eks/README.md b/packages/@aws-cdk/aws-eks/README.md index f2730bf9146eb..1b09a3ac995e5 100644 --- a/packages/@aws-cdk/aws-eks/README.md +++ b/packages/@aws-cdk/aws-eks/README.md @@ -1,24 +1,30 @@ -## Amazon EKS Construct Library - +# Amazon EKS Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib ![cdk-constructs: Developer Preview](https://img.shields.io/badge/cdk--constructs-developer--preview-informational.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are in **developer preview** before they become stable. We will only make breaking changes to address unforeseen API issues. Therefore, these APIs are not subject to [Semantic Versioning](https://semver.org/), and breaking changes will be announced in release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are in **developer preview** before they +> become stable. We will only make breaking changes to address unforeseen API issues. Therefore, +> these APIs are not subject to [Semantic Versioning](https://semver.org/), and breaking changes +> will be announced in release notes. This means that while you may use them, you may need to +> update your source code when upgrading to a newer version of this package. --- + This construct library allows you to define [Amazon Elastic Container Service for Kubernetes (EKS)](https://aws.amazon.com/eks/) clusters. In addition, the library also supports defining Kubernetes resource manifests within EKS clusters. -Table Of Contents -================= +## Table Of Contents * [Quick Start](#quick-start) * [API Reference](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-eks-readme.html) @@ -47,8 +53,8 @@ Table Of Contents This example defines an Amazon EKS cluster with the following configuration: -- Dedicated VPC with default configuration (Implicitly created using [ec2.Vpc](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-ec2-readme.html#vpc)) -- A Kubernetes pod with a container based on the [paulbouwer/hello-kubernetes](https://github.com/paulbouwer/hello-kubernetes) image. +* Dedicated VPC with default configuration (Implicitly created using [ec2.Vpc](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-ec2-readme.html#vpc)) +* A Kubernetes pod with a container based on the [paulbouwer/hello-kubernetes](https://github.com/paulbouwer/hello-kubernetes) image. ```ts // provisiong a cluster @@ -76,7 +82,7 @@ cluster.addManifest('mypod', { In order to interact with your cluster through `kubectl`, you can use the `aws eks update-kubeconfig` [AWS CLI command](https://docs.aws.amazon.com/cli/latest/reference/eks/update-kubeconfig.html) to configure your local kubeconfig. The EKS module will define a CloudFormation output in your stack which contains the command to run. For example: -``` +```plaintext Outputs: ClusterConfigCommand43AAE40F = aws eks update-kubeconfig --name cluster-xxxxx --role-arn arn:aws:iam::112233445566:role/yyyyy ``` @@ -131,12 +137,12 @@ The following is a qualitative diagram of the various possible components involv In a nutshell: -- `EKS Cluster` - The cluster endpoint created by EKS. -- `Managed Node Group` - EC2 worker nodes managed by EKS. -- `Fargate Profile` - Fargate worker nodes managed by EKS. -- `Auto Scaling Group` - EC2 worker nodes managed by the user. -- `KubectlHandler` - Lambda function for invoking `kubectl` commands on the cluster - created by CDK. -- `ClusterHandler` - Lambda function for interacting with EKS API to manage the cluster lifecycle - created by CDK. +* `EKS Cluster` - The cluster endpoint created by EKS. +* `Managed Node Group` - EC2 worker nodes managed by EKS. +* `Fargate Profile` - Fargate worker nodes managed by EKS. +* `Auto Scaling Group` - EC2 worker nodes managed by the user. +* `KubectlHandler` - Lambda function for invoking `kubectl` commands on the cluster - created by CDK. +* `ClusterHandler` - Lambda function for interacting with EKS API to manage the cluster lifecycle - created by CDK. A more detailed breakdown of each is provided further down this README. @@ -144,7 +150,7 @@ A more detailed breakdown of each is provided further down this README. Creating a new cluster is done using the `Cluster` or `FargateCluster` constructs. The only required property is the kubernetes `version`. -```typescript +```ts new eks.Cluster(this, 'HelloEKS', { version: eks.KubernetesVersion.V1_18, }); @@ -152,7 +158,7 @@ new eks.Cluster(this, 'HelloEKS', { You can also use `FargateCluster` to provision a cluster that uses only fargate workers. -```typescript +```ts new eks.FargateCluster(this, 'HelloEKS', { version: eks.KubernetesVersion.V1_18, }); @@ -176,7 +182,7 @@ By default, this library will allocate a managed node group with 2 *m5.large* in At cluster instantiation time, you can customize the number of instances and their type: -```typescript +```ts new eks.Cluster(this, 'HelloEKS', { version: eks.KubernetesVersion.V1_18, defaultCapacity: 5, @@ -188,7 +194,7 @@ To access the node group that was created on your behalf, you can use `cluster.d Additional customizations are available post instantiation. To apply them, set the default capacity to 0, and use the `cluster.addNodegroupCapacity` method: -```typescript +```ts const cluster = new eks.Cluster(this, 'HelloEKS', { version: eks.KubernetesVersion.V1_18, defaultCapacity: 0, @@ -393,7 +399,7 @@ AWS Identity and Access Management (IAM) and native Kubernetes [Role Based Acces You can configure the [cluster endpoint access](https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html) by using the `endpointAccess` property: -```typescript +```ts const cluster = new eks.Cluster(this, 'hello-eks', { version: eks.KubernetesVersion.V1_18, endpointAccess: eks.EndpointAccess.PRIVATE // No access outside of your VPC. @@ -446,7 +452,7 @@ The `ClusterHandler` is a Lambda function responsible to interact the EKS API in The resources are created in the cluster by running `kubectl apply` from a python lambda function. You can configure the environment of this function by specifying it at cluster instantiation. For example, this can be useful in order to configure an http proxy: -```typescript +```ts const cluster = new eks.Cluster(this, 'hello-eks', { version: eks.KubernetesVersion.V1_18, kubectlEnvironment: { @@ -643,8 +649,9 @@ new cdk.CfnOutput(this, 'ServiceAccountIamRole', { value: sa.role.roleArn }) Note that using `sa.serviceAccountName` above **does not** translate into a resource dependency. This is why an explicit dependency is needed. See for more details. -You can also add service accounts to existing clusters. +You can also add service accounts to existing clusters. To do so, pass the `openIdConnectProvider` property when you import the cluster into the application. + ```ts // you can import an existing provider const provider = eks.OpenIdConnectProvider.fromOpenIdConnectProviderArn(this, 'Provider', 'arn:aws:iam::123456:oidc-provider/oidc.eks.eu-west-1.amazonaws.com/id/AB123456ABC'); @@ -664,9 +671,10 @@ const bucket = new Bucket(this, 'Bucket'); bucket.grantReadWrite(serviceAccount); // ... -``` +``` + Note that adding service accounts requires running `kubectl` commands against the cluster. -This means you must also pass the `kubectlRoleArn` when importing the cluster. +This means you must also pass the `kubectlRoleArn` when importing the cluster. See [Using existing Clusters](https://github.com/aws/aws-cdk/tree/master/packages/@aws-cdk/aws-eks#using-existing-clusters). ## Applying Kubernetes Resources @@ -985,7 +993,7 @@ and use that as part of your CDK application. For example, you can fetch the address of a [`LoadBalancer`](https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) type service: -```typescript +```ts // query the load balancer address const myServiceAddress = new KubernetesObjectValue(this, 'LoadBalancerAttribute', { cluster: cluster, @@ -1005,7 +1013,7 @@ const proxyFunction = new lambda.Function(this, 'ProxyFunction', { Specifically, since the above use-case is quite common, there is an easier way to access that information: -```typescript +```ts const loadBalancerAddress = cluster.getServiceLoadBalancerAddress('my-service'); ``` @@ -1045,8 +1053,8 @@ cluster.addManifest('Test', { At the minimum, when importing clusters for `kubectl` management, you will need to specify: -- `clusterName` - the name of the cluster. -- `kubectlRoleArn` - the ARN of an IAM role mapped to the `system:masters` RBAC +* `clusterName` - the name of the cluster. +* `kubectlRoleArn` - the ARN of an IAM role mapped to the `system:masters` RBAC role. If the cluster you are importing was created using the AWS CDK, the CloudFormation stack has an output that includes an IAM role that can be used. Otherwise, you can create an IAM role and map it to `system:masters` manually. @@ -1057,14 +1065,14 @@ to specify: If the cluster is configured with private-only or private and restricted public Kubernetes [endpoint access](#endpoint-access), you must also specify: -- `kubectlSecurityGroupId` - the ID of an EC2 security group that is allowed +* `kubectlSecurityGroupId` - the ID of an EC2 security group that is allowed connections to the cluster's control security group. For example, the EKS managed [cluster security group](#cluster-security-group). -- `kubectlPrivateSubnetIds` - a list of private VPC subnets IDs that will be used +* `kubectlPrivateSubnetIds` - a list of private VPC subnets IDs that will be used to access the Kubernetes endpoint. ## Known Issues and Limitations -- [One cluster per stack](https://github.com/aws/aws-cdk/issues/10073) -- [Object pruning](https://github.com/aws/aws-cdk/issues/10495) -- [Service Account dependencies](https://github.com/aws/aws-cdk/issues/9910) -- [Attach all Lambda Functions to VPC](https://github.com/aws/aws-cdk/issues/9509) +* [One cluster per stack](https://github.com/aws/aws-cdk/issues/10073) +* [Object pruning](https://github.com/aws/aws-cdk/issues/10495) +* [Service Account dependencies](https://github.com/aws/aws-cdk/issues/9910) +* [Attach all Lambda Functions to VPC](https://github.com/aws/aws-cdk/issues/9509) diff --git a/packages/@aws-cdk/aws-elasticache/README.md b/packages/@aws-cdk/aws-elasticache/README.md index 90826ef92f1c1..486be94c97bdb 100644 --- a/packages/@aws-cdk/aws-elasticache/README.md +++ b/packages/@aws-cdk/aws-elasticache/README.md @@ -1,12 +1,16 @@ -## Amazon ElastiCache Construct Library +# Amazon ElastiCache Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-elasticbeanstalk/README.md b/packages/@aws-cdk/aws-elasticbeanstalk/README.md index 5131196b64725..e8e2b25ec2c49 100644 --- a/packages/@aws-cdk/aws-elasticbeanstalk/README.md +++ b/packages/@aws-cdk/aws-elasticbeanstalk/README.md @@ -1,12 +1,16 @@ -## AWS Elastic Beanstalk Construct Library +# AWS Elastic Beanstalk Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-elasticloadbalancing/README.md b/packages/@aws-cdk/aws-elasticloadbalancing/README.md index 8188658ccdb0d..6d66ca5965c69 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancing/README.md +++ b/packages/@aws-cdk/aws-elasticloadbalancing/README.md @@ -1,5 +1,6 @@ -## Amazon Elastic Load Balancing Construct Library +# Amazon Elastic Load Balancing Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -7,12 +8,13 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + The `@aws-cdk/aws-elasticloadbalancing` package provides constructs for configuring classic load balancers. -### Configuring a Load Balancer +## Configuring a Load Balancer Load balancers send traffic to one or more AutoScalingGroups. Create a load balancer, set up listeners and a health check, and supply the fleet(s) you want diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/README.md b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/README.md index 874938a793b90..456473576fe33 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/README.md +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/README.md @@ -1,10 +1,12 @@ # Actions for AWS Elastic Load Balancing V2 + --- ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + This package contains integration actions for ELBv2. See the README of the `@aws-cdk/aws-elasticloadbalancingv2` library. diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/README.md b/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/README.md index 9e64b505478aa..9b3a3745cb679 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/README.md +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/README.md @@ -1,12 +1,18 @@ # Targets for AWS Elastic Load Balancing V2 + --- ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + This package contains targets for ELBv2. See the README of the `@aws-cdk/aws-elasticloadbalancingv2` library. diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/README.md b/packages/@aws-cdk/aws-elasticloadbalancingv2/README.md index 49cfd5dc5db81..ac397ba62bd94 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/README.md +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/README.md @@ -1,6 +1,6 @@ -## Amazon Elastic Load Balancing V2 Construct Library - +# Amazon Elastic Load Balancing V2 Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -8,8 +8,10 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + + The `@aws-cdk/aws-elasticloadbalancingv2` package provides constructs for configuring application and network load balancers. @@ -17,7 +19,7 @@ For more information, see the AWS documentation for [Application Load Balancers](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html) and [Network Load Balancers](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/introduction.html). -### Defining an Application Load Balancer +## Defining an Application Load Balancer You define an application load balancer by creating an instance of `ApplicationLoadBalancer`, adding a Listener to the load balancer @@ -77,7 +79,7 @@ const securityGroup2 = new ec2.SecurityGroup(stack, 'SecurityGroup2', { vpc }); lb.addSecurityGroup(securityGroup2); ``` -#### Conditions +### Conditions It's possible to route traffic to targets based on conditions in the incoming HTTP request. For example, the following will route requests to the indicated @@ -104,7 +106,7 @@ targets with conditions. The lowest number wins. Every listener must have at least one target without conditions, which is where all requests that didn't match any of the conditions will be sent. -#### Convenience methods and more complex Actions +### Convenience methods and more complex Actions Routing traffic from a Load Balancer to a Target involves the following steps: @@ -180,7 +182,7 @@ lb.addRedirect({ If you do not provide any options for this method, it redirects HTTP port 80 to HTTPS port 443. -### Defining a Network Load Balancer +## Defining a Network Load Balancer Network Load Balancers are defined in a similar way to Application Load Balancers: @@ -219,7 +221,7 @@ and [Register targets with your Target Group](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/target-group-register-targets.html) for more information. -### Targets and Target Groups +## Targets and Target Groups Application and Network Load Balancers organize load balancing targets in Target Groups. If you add your balancing targets (such as AutoScalingGroups, ECS @@ -241,7 +243,7 @@ const group = listener.addTargets('AppFleet', { group.addTarget(asg2); ``` -### Using Lambda Targets +## Using Lambda Targets To use a Lambda Function as a target, use the integration class in the `@aws-cdk/aws-elasticloadbalancingv2-targets` package: @@ -268,7 +270,7 @@ listener.addTargets('Targets', { Only a single Lambda function can be added to a single listener rule. -### Configuring Health Checks +## Configuring Health Checks Health checks are configured upon creation of a target group: @@ -303,7 +305,7 @@ listener.addTargets('AppFleet', { listener.connections.allowFrom(lb, ec2.Port.tcp(8088)); ``` -### Using a Load Balancer from a different Stack +## Using a Load Balancer from a different Stack If you want to put your Load Balancer and the Targets it is load balancing to in different stacks, you may not be able to use the convenience methods @@ -319,7 +321,7 @@ For an example of the alternatives while load balancing to an ECS service, see t [ecs/cross-stack-load-balancer example](https://github.com/aws-samples/aws-cdk-examples/tree/master/typescript/ecs/cross-stack-load-balancer/). -### Protocol for Load Balancer Targets +## Protocol for Load Balancer Targets Constructs that want to be a load balancer target should implement `IApplicationLoadBalancerTarget` and/or `INetworkLoadBalancerTarget`, and @@ -380,6 +382,7 @@ than one load balancer matches, CDK will throw an error requesting that you provide more specific criteria. **Look up a Application Load Balancer by ARN** + ```ts const loadBalancer = ApplicationLoadBalancer.fromLookup(stack, 'ALB', { loadBalancerArn: YOUR_ALB_ARN, @@ -387,6 +390,7 @@ const loadBalancer = ApplicationLoadBalancer.fromLookup(stack, 'ALB', { ``` **Look up an Application Load Balancer by tags** + ```ts const loadBalancer = ApplicationLoadBalancer.fromLookup(stack, 'ALB', { loadBalancerTags: { diff --git a/packages/@aws-cdk/aws-elasticsearch/README.md b/packages/@aws-cdk/aws-elasticsearch/README.md index b7902ed654392..502085c85d9c5 100644 --- a/packages/@aws-cdk/aws-elasticsearch/README.md +++ b/packages/@aws-cdk/aws-elasticsearch/README.md @@ -1,20 +1,32 @@ -## Amazon Elasticsearch Service Construct Library - +# Amazon Elasticsearch Service Construct Library + --- -| Features | Stability | -| --- | --- | -| CFN Resources | ![Stable](https://img.shields.io/badge/stable-success.svg?style=for-the-badge) | -| Higher level constructs for Domain | ![Experimental](https://img.shields.io/badge/experimental-important.svg?style=for-the-badge) | +Features | Stability +-----------------------------------|---------------------------------------------------------------- +CFN Resources | ![Stable](https://img.shields.io/badge/stable-success.svg?style=for-the-badge) +Higher level constructs for Domain | ![Experimental](https://img.shields.io/badge/experimental-important.svg?style=for-the-badge) + +> **CFN Resources:** All classes with the `Cfn` prefix in this module ([CFN Resources]) are always +> stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib -> **CFN Resources:** All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. + -> **Experimental:** Higher level constructs in this module that are marked as experimental are under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> **Experimental:** Higher level constructs in this module that are marked as experimental are +> under active development. They are subject to non-backward compatible changes or removal in any +> future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and +> breaking changes will be announced in the release notes. This means that while you may use them, +> you may need to update your source code when upgrading to a newer version of this package. --- + +## Quick start + Create a development cluster by simply specifying the version: ```ts @@ -51,7 +63,7 @@ const prodDomain = new es.Domain(this, 'Domain', { This creates an Elasticsearch cluster and automatically sets up log groups for logging the domain logs and slow search logs. -### Importing existing domains +## Importing existing domains To import an existing domain into your CDK application, use the `Domain.fromDomainEndpoint` factory method. This method accepts a domain endpoint of an already existing domain: @@ -61,9 +73,9 @@ const domainEndpoint = 'https://my-domain-jcjotrt6f7otem4sqcwbch3c4u.us-east-1.e const domain = Domain.fromDomainEndpoint(this, 'ImportedDomain', domainEndpoint); ``` -### Permissions +## Permissions -#### IAM +### IAM Helper methods also exist for managing access to the domain. @@ -77,7 +89,7 @@ domain.grantIndexWrite('app-search', lambda); domain.grantPathRead('app-search/_search', lambda); ``` -### Encryption +## Encryption The domain can also be created with encryption enabled: @@ -99,7 +111,7 @@ This sets up the domain with node to node encryption and encryption at rest. You can also choose to supply your own KMS key to use for encryption at rest. -### Metrics +## Metrics Helper methods exist to access common domain metrics for example: @@ -110,7 +122,7 @@ const masterSysMemoryUtilization = domain.metric('MasterSysMemoryUtilization'); This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. -### Fine grained access control +## Fine grained access control The domain can also be created with a master user configured. The password can be supplied or dynamically created if not supplied. @@ -131,7 +143,7 @@ const domain = new es.Domain(this, 'Domain', { const masterUserPassword = domain.masterUserPassword; ``` -### Using unsigned basic auth +## Using unsigned basic auth For convenience, the domain can be configured to allow unsigned HTTP requests that use basic auth. Unless the domain is configured to be part of a VPC this diff --git a/packages/@aws-cdk/aws-emr/README.md b/packages/@aws-cdk/aws-emr/README.md index eb97e0086c75a..3cf2fe80fd10d 100644 --- a/packages/@aws-cdk/aws-emr/README.md +++ b/packages/@aws-cdk/aws-emr/README.md @@ -1,12 +1,16 @@ -## Amazon EMR Construct Library +# Amazon EMR Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-events-targets/README.md b/packages/@aws-cdk/aws-events-targets/README.md index c99441f05d32a..787bfcc433d30 100644 --- a/packages/@aws-cdk/aws-events-targets/README.md +++ b/packages/@aws-cdk/aws-events-targets/README.md @@ -1,10 +1,12 @@ # Event Targets for Amazon EventBridge + --- ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + This library contains integration classes to send Amazon EventBridge to any diff --git a/packages/@aws-cdk/aws-events/README.md b/packages/@aws-cdk/aws-events/README.md index 77263d685eb67..d19309455559d 100644 --- a/packages/@aws-cdk/aws-events/README.md +++ b/packages/@aws-cdk/aws-events/README.md @@ -1,5 +1,6 @@ -## Amazon EventBridge Construct Library +# Amazon EventBridge Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -7,6 +8,7 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + Amazon EventBridge delivers a near real-time stream of system events that @@ -80,7 +82,7 @@ onCommitRule.addTarget(new targets.SnsTopic(topic, { ## Scheduling -You can configure a Rule to run on a schedule (cron or rate). +You can configure a Rule to run on a schedule (cron or rate). The following example runs a task every day at 4am: @@ -98,6 +100,7 @@ new Rule(this, 'ScheduleRule', { ``` If you want to specify Fargate platform version, set `platformVersion` in EcsTask's props like the following example: + ```ts const platformVersion = ecs.FargatePlatformVersion.VERSION1_4; const ecsTaskTarget = new EcsTask({ cluster, taskDefinition, role, platformVersion }); @@ -124,7 +127,7 @@ The following targets are supported: It's possible to have the source of the event and a target in separate AWS accounts: -```typescript +```ts import { App, Stack } from '@aws-cdk/core'; import * as codebuild from '@aws-cdk/aws-codebuild'; import * as codecommit from '@aws-cdk/aws-codecommit'; diff --git a/packages/@aws-cdk/aws-eventschemas/README.md b/packages/@aws-cdk/aws-eventschemas/README.md index f20b96e145ca5..84b02b1657fa4 100644 --- a/packages/@aws-cdk/aws-eventschemas/README.md +++ b/packages/@aws-cdk/aws-eventschemas/README.md @@ -1,12 +1,16 @@ -## AWS::EventSchemas Construct Library +# AWS::EventSchemas Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-fms/README.md b/packages/@aws-cdk/aws-fms/README.md index 90008887dd6ed..a96ed41040664 100644 --- a/packages/@aws-cdk/aws-fms/README.md +++ b/packages/@aws-cdk/aws-fms/README.md @@ -1,12 +1,16 @@ -## AWS::FMS Construct Library +# AWS::FMS Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-fsx/README.md b/packages/@aws-cdk/aws-fsx/README.md index 7a6ce6d03c502..bcb2497f145ff 100644 --- a/packages/@aws-cdk/aws-fsx/README.md +++ b/packages/@aws-cdk/aws-fsx/README.md @@ -1,16 +1,24 @@ -## Amazon FSx Construct Library +# Amazon FSx Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + [Amazon FSx](https://docs.aws.amazon.com/fsx/?id=docs_gateway) provides fully managed third-party file systems with the diff --git a/packages/@aws-cdk/aws-gamelift/README.md b/packages/@aws-cdk/aws-gamelift/README.md index 1f4430ef14d1d..2c912d4a2f830 100644 --- a/packages/@aws-cdk/aws-gamelift/README.md +++ b/packages/@aws-cdk/aws-gamelift/README.md @@ -1,12 +1,16 @@ -## Amazon GameLift Construct Library +# Amazon GameLift Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-globalaccelerator/README.md b/packages/@aws-cdk/aws-globalaccelerator/README.md index 7d32fc8c72bae..d959a2e9238ad 100644 --- a/packages/@aws-cdk/aws-globalaccelerator/README.md +++ b/packages/@aws-cdk/aws-globalaccelerator/README.md @@ -1,27 +1,35 @@ -## AWS::GlobalAccelerator Construct Library +# AWS::GlobalAccelerator Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + ## Introduction AWS Global Accelerator (AGA) is a service that improves the availability and performance of your applications with local or global users. It provides static IP addresses that act as a fixed entry point to your application endpoints in a single or multiple AWS Regions, such as your Application Load Balancers, Network Load Balancers or Amazon EC2 instances. -This module supports features under [AWS Global Accelerator](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_GlobalAccelerator.html) that allows users set up resources using the `@aws-cdk/aws-globalaccelerator` module. +This module supports features under [AWS Global Accelerator](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_GlobalAccelerator.html) that allows users set up resources using the `@aws-cdk/aws-globalaccelerator` module. ## Accelerator -The `Accelerator` resource is a Global Accelerator resource type that contains information about how you create an accelerator. An accelerator includes one or more listeners that process inbound connections and direct traffic to one or more endpoint groups, each of which includes endpoints, such as Application Load Balancers, Network Load Balancers, and Amazon EC2 instances. +The `Accelerator` resource is a Global Accelerator resource type that contains information about how you create an accelerator. An accelerator includes one or more listeners that process inbound connections and direct traffic to one or more endpoint groups, each of which includes endpoints, such as Application Load Balancers, Network Load Balancers, and Amazon EC2 instances. To create the `Accelerator`: @@ -34,7 +42,7 @@ new globalaccelerator.Accelerator(stack, 'Accelerator'); ## Listener -The `Listener` resource is a Global Accelerator resource type that contains information about how you create a listener to process inbound connections from clients to an accelerator. Connections arrive to assigned static IP addresses on a port, port range, or list of port ranges that you specify. +The `Listener` resource is a Global Accelerator resource type that contains information about how you create a listener to process inbound connections from clients to an accelerator. Connections arrive to assigned static IP addresses on a port, port range, or list of port ranges that you specify. To create the `Listener` listening on TCP 80: @@ -53,7 +61,7 @@ new globalaccelerator.Listener(stack, 'Listener', { ## EndpointGroup -The `EndpointGroup` resource is a Global Accelerator resource type that contains information about how you create an endpoint group for the specified listener. An endpoint group is a collection of endpoints in one AWS Region. +The `EndpointGroup` resource is a Global Accelerator resource type that contains information about how you create an endpoint group for the specified listener. An endpoint group is a collection of endpoints in one AWS Region. To create the `EndpointGroup`: @@ -97,15 +105,15 @@ endpointGroup.addEndpoint('InstanceEndpoint2', instances[1].instanceId); ## Accelerator Security Groups When using certain AGA features (client IP address preservation), AGA creates elastic network interfaces (ENI) in your AWS account which are -associated with a Security Group, and which are reused for all AGAs associated with that VPC. Per the -[best practices](https://docs.aws.amazon.com/global-accelerator/latest/dg/best-practices-aga.html) page, AGA creates a specific security group -called `GlobalAccelerator` for each VPC it has an ENI in. You can use the security group created by AGA as a source group in other security +associated with a Security Group, and which are reused for all AGAs associated with that VPC. Per the +[best practices](https://docs.aws.amazon.com/global-accelerator/latest/dg/best-practices-aga.html) page, AGA creates a specific security group +called `GlobalAccelerator` for each VPC it has an ENI in. You can use the security group created by AGA as a source group in other security groups, such as those for EC2 instances or Elastic Load Balancers, in order to implement least-privilege security group rules. CloudFormation doesn't support referencing the security group created by AGA. CDK has a library that enables you to reference the AGA security group for a VPC using an AwsCustomResource. -``` +```ts const vpc = new Vpc(stack, 'VPC', {}); const alb = new elbv2.ApplicationLoadBalancer(stack, 'ALB', { vpc, internetFacing: false }); const accelerator = new ga.Accelerator(stack, 'Accelerator'); @@ -127,4 +135,4 @@ const agaSg = ga.AcceleratorSecurityGroup.fromVpc(stack, 'GlobalAcceleratorSG', // Allow connections from the AGA to the ALB alb.connections.allowFrom(agaSg, Port.tcp(443)); -``` \ No newline at end of file +``` diff --git a/packages/@aws-cdk/aws-glue/README.md b/packages/@aws-cdk/aws-glue/README.md index 15f9e3494d7c1..77ee00834ddd7 100644 --- a/packages/@aws-cdk/aws-glue/README.md +++ b/packages/@aws-cdk/aws-glue/README.md @@ -1,21 +1,29 @@ -## AWS Glue Construct Library +# AWS Glue Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. -### Database +## Database A `Database` is a logical grouping of `Tables` in the Glue Catalog. @@ -25,7 +33,7 @@ new glue.Database(stack, 'MyDatabase', { }); ``` -### Table +## Table A Glue table describes a table of data in S3: its structure (column names and types), location of data (S3 objects with a common prefix in a S3 bucket), and format for the files (Json, Avro, Parquet, etc.): @@ -57,7 +65,7 @@ new glue.Table(stack, 'MyTable', { By default, an S3 bucket will be created to store the table's data and stored in the bucket root. You can also manually pass the `bucket` and `s3Prefix`: -#### Partitions +### Partitions To improve query performance, a table can specify `partitionKeys` on which data is stored and queried separately. For example, you might partition a table by `year` and `month` to optimize queries based on a time window: @@ -80,17 +88,20 @@ new glue.Table(stack, 'MyTable', { }); ``` -### [Encryption](https://docs.aws.amazon.com/athena/latest/ug/encryption.html) +## [Encryption](https://docs.aws.amazon.com/athena/latest/ug/encryption.html) You can enable encryption on a Table's data: + * `Unencrypted` - files are not encrypted. The default encryption setting. * [S3Managed](https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html) - Server side encryption (`SSE-S3`) with an Amazon S3-managed key. + ```ts new glue.Table(stack, 'MyTable', { encryption: glue.TableEncryption.S3_MANAGED ... }); ``` + * [Kms](https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html) - Server-side encryption (`SSE-KMS`) with an AWS KMS Key managed by the account owner. ```ts @@ -107,14 +118,18 @@ new glue.Table(stack, 'MyTable', { ... }); ``` + * [KmsManaged](https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html) - Server-side encryption (`SSE-KMS`), like `Kms`, except with an AWS KMS Key managed by the AWS Key Management Service. + ```ts new glue.Table(stack, 'MyTable', { encryption: glue.TableEncryption.KMS_MANAGED ... }); ``` + * [ClientSideKms](https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html#client-side-encryption-kms-managed-master-key-intro) - Client-side encryption (`CSE-KMS`) with an AWS KMS Key managed by the account owner. + ```ts // KMS key is created automatically new glue.Table(stack, 'MyTable', { @@ -132,7 +147,7 @@ new glue.Table(stack, 'MyTable', { *Note: you cannot provide a `Bucket` when creating the `Table` if you wish to use server-side encryption (`KMS`, `KMS_MANAGED` or `S3_MANAGED`)*. -### Types +## Types A table's schema is a collection of columns, each of which have a `name` and a `type`. Types are recursive structures, consisting of primitive and complex types: @@ -163,9 +178,10 @@ new glue.Table(stack, 'MyTable', { ... ``` -#### Primitives +### Primitives + +#### Numeric -##### Numeric | Name | Type | Comments | |----------- |---------- |------------------------------------------------------------------------------------------------------------------ | | FLOAT | Constant | A 32-bit single-precision floating point number | @@ -175,14 +191,14 @@ new glue.Table(stack, 'MyTable', { | SMALL_INT | Constant | A 16-bit signed INTEGER in two’s complement format, with a minimum value of -2^15 and a maximum value of 2^15-1 | | TINY_INT | Constant | A 8-bit signed INTEGER in two’s complement format, with a minimum value of -2^7 and a maximum value of 2^7-1 | -##### Date and time +#### Date and time | Name | Type | Comments | |----------- |---------- |------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | DATE | Constant | A date in UNIX format, such as YYYY-MM-DD. | | TIMESTAMP | Constant | Date and time instant in the UNiX format, such as yyyy-mm-dd hh:mm:ss[.f...]. For example, TIMESTAMP '2008-09-15 03:04:05.324'. This format uses the session time zone. | -##### String +#### String | Name | Type | Comments | |-------------------------------------------- |---------- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -191,14 +207,14 @@ new glue.Table(stack, 'MyTable', { | char(length: number) | Function | Fixed length character data, with a specified length between 1 and 255, such as char(10) | | varchar(length: number) | Function | Variable length character data, with a specified length between 1 and 65535, such as varchar(10) | -##### Miscellaneous +#### Miscellaneous | Name | Type | Comments | |--------- |---------- |------------------------------- | | BOOLEAN | Constant | Values are `true` and `false` | | BINARY | Constant | Value is in binary | -#### Complex +### Complex | Name | Type | Comments | |------------------------------------- |---------- |------------------------------------------------------------------- | diff --git a/packages/@aws-cdk/aws-greengrass/README.md b/packages/@aws-cdk/aws-greengrass/README.md index af3bf2cee4f42..ca6177fcab834 100644 --- a/packages/@aws-cdk/aws-greengrass/README.md +++ b/packages/@aws-cdk/aws-greengrass/README.md @@ -1,12 +1,16 @@ -## AWS IoT Greengrass Construct Library +# AWS IoT Greengrass Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-guardduty/README.md b/packages/@aws-cdk/aws-guardduty/README.md index 09b39f85698d4..aa7ad63e9bef0 100644 --- a/packages/@aws-cdk/aws-guardduty/README.md +++ b/packages/@aws-cdk/aws-guardduty/README.md @@ -1,12 +1,16 @@ -## Amazon GuardDuty Construct Library +# Amazon GuardDuty Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-iam/README.md b/packages/@aws-cdk/aws-iam/README.md index d32237517eaac..a676af6352cf2 100644 --- a/packages/@aws-cdk/aws-iam/README.md +++ b/packages/@aws-cdk/aws-iam/README.md @@ -1,5 +1,6 @@ -## AWS Identity and Access Management Construct Library +# AWS Identity and Access Management Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -7,6 +8,7 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + Define a role and add permissions to it. This will automatically create and @@ -23,11 +25,11 @@ Managed policies can be attached using `xxx.addManagedPolicy(ManagedPolicy.fromA [attaching managed policies](test/example.managedpolicy.lit.ts) -### Granting permissions to resources +## Granting permissions to resources Many of the AWS CDK resources have `grant*` methods that allow you to grant other resources access to that resource. As an example, the following code gives a Lambda function write permissions (Put, Update, Delete) to a DynamoDB table. -```typescript +```ts const fn = new lambda.Function(this, 'Function', functionProps); const table = new dynamodb.Table(this, 'Table', tableProps); @@ -36,7 +38,7 @@ table.grantWriteData(fn); The more generic `grant` method allows you to give specific permissions to a resource: -```typescript +```ts const fn = new lambda.Function(this, 'Function', functionProps); const table = new dynamodb.Table(this, 'Table', tableProps); @@ -47,7 +49,7 @@ The `grant*` methods accept an `IGrantable` object. This interface is implemente You can find which `grant*` methods exist for a resource in the [AWS CDK API Reference](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-construct-library.html). -### Roles +## Roles Many AWS resources require *Roles* to operate. These Roles define the AWS API calls an instance or other AWS service is allowed to make. @@ -66,7 +68,7 @@ an *AWS Lambda Function*, the Pipeline's Role will automatically get or if you explicitly grant permissions using `grant` functions (see the previous section). -#### Opting out of automatic permissions management +### Opting out of automatic permissions management You may prefer to manage a Role's permissions yourself instead of having the CDK automatically manage them for you. This may happen in one of the @@ -103,7 +105,7 @@ role.addToPolicy(new iam.PolicyStatement({ })); ``` -#### Using existing roles +### Using existing roles If there are Roles in your account that have already been created which you would like to use in your CDK application, you can use `Role.fromRoleArn` to @@ -118,7 +120,7 @@ const role = iam.Role.fromRoleArn(this, 'Role', 'arn:aws:iam::123456789012:role/ }); ``` -### Configuring an ExternalId +## Configuring an ExternalId If you need to create Roles that will be assumed by third parties, it is generally a good idea to [require an `ExternalId` to assume them](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html). Configuring @@ -126,7 +128,7 @@ an `ExternalId` works like this: [supplying an external ID](test/example.external-id.lit.ts) -### Principals vs Identities +## Principals vs Identities When we say *Principal*, we mean an entity you grant permissions to. This entity can be an AWS Service, a Role, or something more abstract such as "all @@ -134,7 +136,7 @@ users in this account" or even "all users in this organization". An *Identity* is an IAM representing a single IAM entity that can have a policy attached, one of `Role`, `User`, or `Group`. -### IAM Principals +## IAM Principals When defining policy statements as part of an AssumeRole policy or as part of a resource policy, statements would usually refer to a specific IAM principal @@ -214,7 +216,7 @@ const principal = new iam.WebIdentityPrincipal('cognito-identity.amazonaws.com') }); ``` -### Parsing JSON Policy Documents +## Parsing JSON Policy Documents The `PolicyDocument.fromJson` and `PolicyStatement.fromJson` static methods can be used to parse JSON objects. For example: @@ -262,7 +264,7 @@ const newPolicy = new Policy(stack, 'MyNewPolicy', { }); ``` -### OpenID Connect Providers +## OpenID Connect Providers OIDC identity providers are entities in IAM that describe an external identity provider (IdP) service that supports the [OpenID Connect] (OIDC) standard, such @@ -318,7 +320,7 @@ const provider = new iam.OpenIdConnectProvider(this, 'MyProvider', { const principal = new iam.OpenIdConnectPrincipal(provider); ``` -### Features +## Features * Policy name uniqueness is enforced. If two policies by the same name are attached to the same principal, the attachment will fail. diff --git a/packages/@aws-cdk/aws-imagebuilder/README.md b/packages/@aws-cdk/aws-imagebuilder/README.md index ef5f4bc99f7fa..0d2596a505862 100644 --- a/packages/@aws-cdk/aws-imagebuilder/README.md +++ b/packages/@aws-cdk/aws-imagebuilder/README.md @@ -1,12 +1,16 @@ -## AWS::ImageBuilder Construct Library +# AWS::ImageBuilder Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-inspector/README.md b/packages/@aws-cdk/aws-inspector/README.md index ac5d983c2ce08..52406518d3f50 100644 --- a/packages/@aws-cdk/aws-inspector/README.md +++ b/packages/@aws-cdk/aws-inspector/README.md @@ -1,12 +1,16 @@ -## Amazon Inspector Construct Library +# Amazon Inspector Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-iot/README.md b/packages/@aws-cdk/aws-iot/README.md index 14195b08d2692..7334c9d4e108e 100644 --- a/packages/@aws-cdk/aws-iot/README.md +++ b/packages/@aws-cdk/aws-iot/README.md @@ -1,12 +1,16 @@ -## AWS IoT Construct Library +# AWS IoT Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-iot1click/README.md b/packages/@aws-cdk/aws-iot1click/README.md index 59528dce9dc3b..91c7751093fe1 100644 --- a/packages/@aws-cdk/aws-iot1click/README.md +++ b/packages/@aws-cdk/aws-iot1click/README.md @@ -1,12 +1,16 @@ -## AWS IoT 1-Click Construct Library +# AWS IoT 1-Click Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + ```ts diff --git a/packages/@aws-cdk/aws-iotanalytics/README.md b/packages/@aws-cdk/aws-iotanalytics/README.md index 866f2024bebd0..f618a736f9c63 100644 --- a/packages/@aws-cdk/aws-iotanalytics/README.md +++ b/packages/@aws-cdk/aws-iotanalytics/README.md @@ -1,12 +1,16 @@ -## AWS IoT Analytics Construct Library +# AWS IoT Analytics Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + ```ts diff --git a/packages/@aws-cdk/aws-iotevents/README.md b/packages/@aws-cdk/aws-iotevents/README.md index 6c06b5936c778..e750952ae5550 100644 --- a/packages/@aws-cdk/aws-iotevents/README.md +++ b/packages/@aws-cdk/aws-iotevents/README.md @@ -1,12 +1,16 @@ -## AWS::IoTEvents Construct Library +# AWS::IoTEvents Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-iotsitewise/README.md b/packages/@aws-cdk/aws-iotsitewise/README.md index c92df247f85b4..a793ab3aa3f8e 100644 --- a/packages/@aws-cdk/aws-iotsitewise/README.md +++ b/packages/@aws-cdk/aws-iotsitewise/README.md @@ -1,12 +1,16 @@ -## AWS::IoTSiteWise Construct Library +# AWS::IoTSiteWise Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-iotthingsgraph/README.md b/packages/@aws-cdk/aws-iotthingsgraph/README.md index dc14e05f30879..a8f6689bbd794 100644 --- a/packages/@aws-cdk/aws-iotthingsgraph/README.md +++ b/packages/@aws-cdk/aws-iotthingsgraph/README.md @@ -1,12 +1,16 @@ -## AWS IoT Things Graph Construct Library +# AWS IoT Things Graph Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-ivs/README.md b/packages/@aws-cdk/aws-ivs/README.md index 0e8b591f39c21..8ebb729640cf4 100644 --- a/packages/@aws-cdk/aws-ivs/README.md +++ b/packages/@aws-cdk/aws-ivs/README.md @@ -1,12 +1,16 @@ -## AWS::IVS Construct Library +# AWS::IVS Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-kendra/README.md b/packages/@aws-cdk/aws-kendra/README.md index 8a71d718fa68a..32663d6737fe4 100644 --- a/packages/@aws-cdk/aws-kendra/README.md +++ b/packages/@aws-cdk/aws-kendra/README.md @@ -1,12 +1,16 @@ -## AWS::Kendra Construct Library +# AWS::Kendra Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-kinesis/README.md b/packages/@aws-cdk/aws-kinesis/README.md index ec0a4eb19b3bc..ebf5bdb74e3ae 100644 --- a/packages/@aws-cdk/aws-kinesis/README.md +++ b/packages/@aws-cdk/aws-kinesis/README.md @@ -1,5 +1,6 @@ -## Amazon Kinesis Construct Library +# Amazon Kinesis Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -7,6 +8,7 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + [Amazon Kinesis](https://docs.aws.amazon.com/streams/latest/dev/introduction.html) provides collection and processing of large diff --git a/packages/@aws-cdk/aws-kinesisanalytics/README.md b/packages/@aws-cdk/aws-kinesisanalytics/README.md index 53c28c92ab5d9..e65b812cefc97 100644 --- a/packages/@aws-cdk/aws-kinesisanalytics/README.md +++ b/packages/@aws-cdk/aws-kinesisanalytics/README.md @@ -1,12 +1,16 @@ -## Amazon Kinesis Data Analytics Construct Library +# Amazon Kinesis Data Analytics Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-kinesisfirehose/README.md b/packages/@aws-cdk/aws-kinesisfirehose/README.md index a9ff58880ad98..9c4d9f96c6f36 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose/README.md +++ b/packages/@aws-cdk/aws-kinesisfirehose/README.md @@ -1,12 +1,16 @@ -## Amazon Kinesis Data Firehose Construct Library +# Amazon Kinesis Data Firehose Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-kms/README.md b/packages/@aws-cdk/aws-kms/README.md index 5bd6f5e6f1474..0f9c4c6df67cc 100644 --- a/packages/@aws-cdk/aws-kms/README.md +++ b/packages/@aws-cdk/aws-kms/README.md @@ -1,5 +1,6 @@ -## AWS Key Management Service Construct Library +# AWS Key Management Service Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -7,6 +8,7 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + Define a KMS key: @@ -27,7 +29,7 @@ key.addAlias('alias/foo'); key.addAlias('alias/bar'); ``` -### Sharing keys between stacks +## Sharing keys between stacks > see Trust Account Identities for additional details @@ -37,7 +39,7 @@ pass the construct to the other stack: [sharing key between stacks](test/integ.key-sharing.lit.ts) -### Importing existing keys +## Importing existing keys > see Trust Account Identities for additional details @@ -70,7 +72,7 @@ Note that calls to `addToResourcePolicy` and `grant*` methods on `myKeyAlias` wi no-ops, and `addAlias` and `aliasTargetKey` will fail, as the imported alias does not have a reference to the underlying KMS Key. -### Trust Account Identities +## Trust Account Identities KMS keys can be created to trust IAM policies. This is the default behavior in the console and is described diff --git a/packages/@aws-cdk/aws-lakeformation/README.md b/packages/@aws-cdk/aws-lakeformation/README.md index b8f496983be3b..d2e2e6c205e98 100644 --- a/packages/@aws-cdk/aws-lakeformation/README.md +++ b/packages/@aws-cdk/aws-lakeformation/README.md @@ -1,12 +1,16 @@ -## AWS::LakeFormation Construct Library +# AWS::LakeFormation Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-lambda-destinations/README.md b/packages/@aws-cdk/aws-lambda-destinations/README.md index d1a03a4ba5bdd..8459820e9686e 100644 --- a/packages/@aws-cdk/aws-lambda-destinations/README.md +++ b/packages/@aws-cdk/aws-lambda-destinations/README.md @@ -1,10 +1,12 @@ -## Amazon Lambda Destinations Library +# Amazon Lambda Destinations Library + --- ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + This library provides constructs for adding destinations to a Lambda function. @@ -37,6 +39,7 @@ const myFn = new lambda.Function(this, 'Fn', { See also [Configuring Destinations for Asynchronous Invocation](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations). ### Invocation record + When a lambda function is configured with a destination, an invocation record is created by the Lambda service when the lambda function completes. The invocation record contains the details of the function, its context, and the request and response payloads. @@ -93,6 +96,7 @@ In case of failure, the record contains the reason and error object: ``` #### Destination-specific JSON format + * For SNS/SQS (`SnsDestionation`/`SqsDestination`), the invocation record JSON is passed as the `Message` to the destination. * For Lambda (`LambdaDestination`), the invocation record JSON is passed as the payload to the function. * For EventBridge (`EventBridgeDestination`), the invocation record JSON is passed as the `detail` in the PutEvents call. @@ -103,6 +107,7 @@ contains the function and destination ARNs. See [AWS Events](https://docs.aws.am for the different event fields. ### Auto-extract response payload with lambda destination + The `responseOnly` option of `LambdaDestination` allows to auto-extract the response payload from the invocation record: diff --git a/packages/@aws-cdk/aws-lambda-event-sources/README.md b/packages/@aws-cdk/aws-lambda-event-sources/README.md index 656d09f56f448..5e1578d9aefd4 100644 --- a/packages/@aws-cdk/aws-lambda-event-sources/README.md +++ b/packages/@aws-cdk/aws-lambda-event-sources/README.md @@ -1,10 +1,12 @@ -## AWS Lambda Event Sources +# AWS Lambda Event Sources + --- ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + An event source mapping is an AWS Lambda resource that reads from an event source and invokes a Lambda function. @@ -34,7 +36,7 @@ The `eventSourceId` property contains the event source id. This will be a [token](https://docs.aws.amazon.com/cdk/latest/guide/tokens.html) that will resolve to the final value at the time of deployment. -### SQS +## SQS Amazon Simple Queue Service (Amazon SQS) allows you to build asynchronous workflows. For more information about Amazon SQS, see Amazon Simple Queue @@ -68,7 +70,7 @@ lambda.addEventSource(new SqsEventSource(queue, { })); ``` -### S3 +## S3 You can write Lambda functions to process S3 bucket events, such as the object-created or object-deleted events. For example, when a user uploads a @@ -91,7 +93,7 @@ lambda.addEventSource(new S3EventSource(bucket, { })); ``` -### SNS +## SNS You can write Lambda functions to process Amazon Simple Notification Service notifications. When a message is published to an Amazon SNS topic, the service @@ -130,7 +132,7 @@ times. After three tries, if Amazon SNS still could not successfully invoke the Lambda function, then Amazon SNS will send a delivery status failure message to CloudWatch. -### DynamoDB Streams +## DynamoDB Streams You can write Lambda functions to process change events from a DynamoDB Table. An event is emitted to a DynamoDB stream (if configured) whenever a write (Put, Delete, Update) operation is performed against the table. See [Using AWS Lambda with Amazon DynamoDB](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html) for more information about configuring Lambda function event sources with DynamoDB. @@ -171,7 +173,7 @@ function.addEventSource(new DynamoEventSource(table, { })); ``` -### Kinesis +## Kinesis You can write Lambda functions to process streaming data in Amazon Kinesis Streams. For more information about Amazon Kinesis, see [Amazon Kinesis Service](https://aws.amazon.com/kinesis/data-streams/). To learn more about configuring Lambda function event sources with kinesis and view a sample event, diff --git a/packages/@aws-cdk/aws-lambda-nodejs/README.md b/packages/@aws-cdk/aws-lambda-nodejs/README.md index 38f06c88a252f..66e1a4bcbbcd0 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/README.md +++ b/packages/@aws-cdk/aws-lambda-nodejs/README.md @@ -1,19 +1,26 @@ -## Amazon Lambda Node.js Library +# Amazon Lambda Node.js Library + --- ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + This library provides constructs for Node.js Lambda functions. To use this module, you will need to have Docker installed. -### Node.js Function +## Node.js Function + Define a `NodejsFunction`: ```ts @@ -22,7 +29,8 @@ new lambda.NodejsFunction(this, 'my-handler'); By default, the construct will use the name of the defining file and the construct's id to look up the entry file: -``` + +```plaintext . ├── stack.ts # defines a 'NodejsFunction' with 'my-handler' as id ├── stack.my-handler.ts # exports a function named 'handler' @@ -84,7 +92,8 @@ should also have `npm` or `yarn` depending on the lock file you're using. Use the [default image provided by `@aws-cdk/aws-lambda-nodejs`](https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-lambda-nodejs/lib/Dockerfile) as a source of inspiration. -### Lock file +## Lock file + The `NodejsFunction` requires a dependencies lock file (`yarn.lock` or `package-lock.json`). When bundling in a Docker container, the path containing this lock file is used as the source (`/asset-input`) for the volume mounted in the @@ -96,6 +105,7 @@ case you need to ensure that this path includes `entry` and any module/dependenc used by your function. Otherwise bundling will fail. ### Configuring esbuild + The `NodejsFunction` construct exposes some [esbuild](https://esbuild.github.io/) options via properties under `bundling`: `minify`, `sourceMap`, `target` and `loader`. ```ts @@ -111,9 +121,10 @@ new lambda.NodejsFunction(this, 'my-handler', { }); ``` -### Working with modules +## Working with modules + +### Externals -#### Externals By default, all node modules are bundled except for `aws-sdk`. This can be configured by specifying the `externalModules` prop under `bundling`. @@ -128,7 +139,8 @@ new lambda.NodejsFunction(this, 'my-handler', { }); ``` -#### Install modules +### Install modules + By default, all node modules referenced in your Lambda code will be bundled by esbuild. Use the `nodeModules` prop under `bundling` to specify a list of modules that should not be bundled but instead included in the `node_modules` folder of the Lambda package. This is useful @@ -146,7 +158,8 @@ The modules listed in `nodeModules` must be present in the `package.json`'s depe same version will be used for installation. The lock file (`yarn.lock` or `package-lock.json`) will be used along with the right installer (`yarn` or `npm`). -### Local bundling +## Local bundling + If esbuild is available it will be used to bundle your code in your environment. Otherwise, bundling will happen in a [Lambda compatible Docker container](https://hub.docker.com/r/amazon/aws-sam-cli-build-image-nodejs12.x). @@ -154,13 +167,13 @@ For macOS the recommendend approach is to install esbuild as Docker volume perfo esbuild can be installed with: -```bash +```console $ npm install --save-dev esbuild@0 ``` OR -```bash +```console $ yarn add --dev esbuild@0 ``` @@ -169,6 +182,7 @@ is useful if your function relies on node modules that should be installed (`nod case with modules using native dependencies. ### Command hooks + It is possible to run additional commands by specifying the `commandHooks` prop: ```ts @@ -184,6 +198,7 @@ new lambda.NodejsFunction(this, 'my-handler-with-commands', { ``` The following hooks are available: + - `beforeBundling`: runs before all bundling commands - `beforeInstall`: runs before node modules installation - `afterBundling`: runs after all bundling commands diff --git a/packages/@aws-cdk/aws-lambda-python/README.md b/packages/@aws-cdk/aws-lambda-python/README.md index 97229dc225fe3..5cec4ff077a48 100644 --- a/packages/@aws-cdk/aws-lambda-python/README.md +++ b/packages/@aws-cdk/aws-lambda-python/README.md @@ -1,19 +1,26 @@ -## Amazon Lambda Python Library +# Amazon Lambda Python Library + --- ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + This library provides constructs for Python Lambda functions. To use this module, you will need to have Docker installed. -### Python Function +## Python Function + Define a `PythonFunction`: ```ts @@ -30,21 +37,23 @@ new PythonFunction(this, 'MyFunction', { All other properties of `lambda.Function` are supported, see also the [AWS Lambda construct library](https://github.com/aws/aws-cdk/tree/master/packages/%40aws-cdk/aws-lambda). -### Module Dependencies +## Module Dependencies If `requirements.txt` or `Pipfile` exists at the entry path, the construct will handle installing all required modules in a [Lambda compatible Docker container](https://hub.docker.com/r/amazon/aws-sam-cli-build-image-python3.7) according to the `runtime`. **Lambda with a requirements.txt** -``` + +```plaintext . ├── lambda_function.py # exports a function named 'handler' ├── requirements.txt # has to be present at the entry path ``` **Lambda with a Pipfile** -``` + +```plaintext . ├── lambda_function.py # exports a function named 'handler' ├── Pipfile # has to be present at the entry path diff --git a/packages/@aws-cdk/aws-lambda/README.md b/packages/@aws-cdk/aws-lambda/README.md index ea1d256c976bc..19eac465349ee 100644 --- a/packages/@aws-cdk/aws-lambda/README.md +++ b/packages/@aws-cdk/aws-lambda/README.md @@ -1,5 +1,6 @@ -## AWS Lambda Construct Library +# AWS Lambda Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -7,6 +8,7 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + This construct library allows you to define AWS Lambda Functions. @@ -22,7 +24,7 @@ const fn = new lambda.Function(this, 'MyFunction', { }); ``` -### Handler Code +## Handler Code The `lambda.Code` class includes static convenience methods for various types of runtime code. @@ -50,7 +52,7 @@ to our CDK project directory. This is especially important when we want to share this construct through a library. Different programming languages will have different techniques for bundling resources into libraries. -### Docker Images +## Docker Images Lambda functions allow specifying their handlers within docker images. The docker image can be an image from ECR or a local asset that the CDK will package and load @@ -76,7 +78,7 @@ new lambda.DockerImageFunction(this, 'ECRFunction', { }); ``` -### Execution Role +## Execution Role Lambda functions assume an IAM role during execution. In CDK by default, Lambda functions will use an autogenerated Role if one is not provided. @@ -109,7 +111,7 @@ myRole.addManagedPolicy(ManagedPolicy.fromAwsManagedPolicyName("service-role/AWS myRole.addManagedPolicy(ManagedPolicy.fromAwsManagedPolicyName("service-role/AWSLambdaVPCAccessExecutionRole")); // only required if your function lives in a VPC ``` -### Versions and Aliases +## Versions and Aliases You can use [versions](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) @@ -119,10 +121,10 @@ the stable production version. The function version includes the following information: -- The function code and all associated dependencies. -- The Lambda runtime that executes the function. -- All of the function settings, including the environment variables. -- A unique Amazon Resource Name (ARN) to identify this version of the function. +* The function code and all associated dependencies. +* The Lambda runtime that executes the function. +* All of the function settings, including the environment variables. +* A unique Amazon Resource Name (ARN) to identify this version of the function. You can define one or more [aliases](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) @@ -167,14 +169,14 @@ fn.currentVersion.addAlias('live'); > AWS Lambda version, and won't allow you to use `$LATEST`. Therefore, you would > normally want to use `lambda.currentVersion`. -### Layers +## Layers The `lambda.LayerVersion` class can be used to define Lambda layers and manage granting permissions to other AWS accounts or organizations. [Example of Lambda Layer usage](test/integ.layer-version.lit.ts) -### Event Rule Target +## Event Rule Target You can use an AWS Lambda function as a target for an Amazon CloudWatch event rule: @@ -184,7 +186,7 @@ import * as targets from '@aws-cdk/aws-events-targets'; rule.addTarget(new targets.LambdaFunction(myFunction)); ``` -### Event Sources +## Event Sources AWS Lambda supports a [variety of event sources](https://docs.aws.amazon.com/lambda/latest/dg/invoking-lambda-function.html). @@ -216,7 +218,7 @@ fn.addEventSource(new S3EventSource(bucket, { See the documentation for the __@aws-cdk/aws-lambda-event-sources__ module for more details. -### Lambda with DLQ +## Lambda with DLQ A dead-letter queue can be automatically created for a Lambda function by setting the `deadLetterQueueEnabled: true` configuration. @@ -250,7 +252,7 @@ const fn = new lambda.Function(this, 'MyFunction', { See [the AWS documentation](https://docs.aws.amazon.com/lambda/latest/dg/dlq.html) to learn more about AWS Lambdas and DLQs. -### Lambda with X-Ray Tracing +## Lambda with X-Ray Tracing ```ts import * as lambda from '@aws-cdk/aws-lambda'; @@ -266,7 +268,7 @@ const fn = new lambda.Function(this, 'MyFunction', { See [the AWS documentation](https://docs.aws.amazon.com/lambda/latest/dg/lambda-x-ray.html) to learn more about AWS Lambda's X-Ray support. -### Lambda with Profiling +## Lambda with Profiling ```ts import * as lambda from '@aws-cdk/aws-lambda'; @@ -282,7 +284,7 @@ const fn = new lambda.Function(this, 'MyFunction', { See [the AWS documentation](https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html) to learn more about AWS Lambda's Profiling support. -### Lambda with Reserved Concurrent Executions +## Lambda with Reserved Concurrent Executions ```ts import * as lambda from '@aws-cdk/aws-lambda'; @@ -298,7 +300,7 @@ const fn = new lambda.Function(this, 'MyFunction', { See [the AWS documentation](https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html) managing concurrency. -### AutoScaling +## AutoScaling You can use Application AutoScaling to automatically configure the provisioned concurrency for your functions. AutoScaling can be set to track utilization or be based on a schedule. To configure AutoScaling on a function alias: @@ -327,7 +329,7 @@ as.scaleOnSchedule('ScaleUpInTheMorning', { See [the AWS documentation](https://docs.aws.amazon.com/lambda/latest/dg/invocation-scaling.html) on autoscaling lambda functions. -### Log Group +## Log Group Lambda functions automatically create a log group with the name `/aws/lambda/` upon first execution with log data set to never expire. @@ -348,7 +350,7 @@ correct log retention period (never expire, by default). *Further note* that, if the log group already exists and the `logRetention` is not set, the custom resource will reset the log retention to never expire even if it was configured with a different value. -### FileSystem Access +## FileSystem Access You can configure a function to mount an Amazon Elastic File System (Amazon EFS) to a directory in your runtime environment with the `filesystem` property. To access Amazon EFS @@ -388,7 +390,7 @@ const fn = new lambda.Function(stack, 'MyLambda', { ``` -### Singleton Function +## Singleton Function The `SingletonFunction` construct is a way to guarantee that a lambda function will be guaranteed to be part of the stack, once and only once, irrespective of how many times the construct is declared to be part of the stack. This is guaranteed @@ -402,13 +404,15 @@ number of times and with different properties. Using `SingletonFunction` here wi For example, the `LogRetention` construct requires only one single lambda function for all different log groups whose retention it seeks to manage. -### Bundling Asset Code +## Bundling Asset Code + When using `lambda.Code.fromAsset(path)` it is possible to bundle the code by running a command in a Docker container. The asset path will be mounted at `/asset-input`. The Docker container is responsible for putting content at `/asset-output`. The content at `/asset-output` will be zipped and used as Lambda code. Example with Python: + ```ts new lambda.Function(this, 'Function', { code: lambda.Code.fromAsset(path.join(__dirname, 'my-python-handler'), { @@ -426,6 +430,7 @@ new lambda.Function(this, 'Function', { handler: 'index.handler', }); ``` + Runtimes expose a `bundlingDockerImage` property that points to the [AWS SAM](https://github.com/awslabs/aws-sam-cli) build image. Use `cdk.BundlingDockerImage.fromRegistry(image)` to use an existing image or @@ -449,7 +454,8 @@ new lambda.Function(this, 'Function', { }); ``` -### Language-specific APIs +## Language-specific APIs + Language-specific higher level constructs are provided in separate modules: * Node.js: [`@aws-cdk/aws-lambda-nodejs`](https://github.com/aws/aws-cdk/tree/master/packages/%40aws-cdk/aws-lambda-nodejs) diff --git a/packages/@aws-cdk/aws-logs-destinations/README.md b/packages/@aws-cdk/aws-logs-destinations/README.md index ea1c68ca1c0e2..28d124c669017 100644 --- a/packages/@aws-cdk/aws-logs-destinations/README.md +++ b/packages/@aws-cdk/aws-logs-destinations/README.md @@ -1,10 +1,12 @@ # CDK Construct Libray for AWS XXX + --- ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + A short description here. diff --git a/packages/@aws-cdk/aws-logs/README.md b/packages/@aws-cdk/aws-logs/README.md index 880113852e355..497526ca6ec60 100644 --- a/packages/@aws-cdk/aws-logs/README.md +++ b/packages/@aws-cdk/aws-logs/README.md @@ -1,5 +1,6 @@ -## Amazon CloudWatch Logs Construct Library +# Amazon CloudWatch Logs Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -7,11 +8,12 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + This library supplies constructs for working with CloudWatch Logs. -### Log Groups/Streams +## Log Groups/Streams The basic unit of CloudWatch is a *Log Group*. Every log group typically has the same kind of data logged to it, in the same format. If there are multiple @@ -32,7 +34,7 @@ retention period (including infinite retention). [retention example](test/example.retention.lit.ts) -### LogRetention +## LogRetention The `LogRetention` construct is a way to control the retention period of log groups that are created outside of the CDK. The construct is usually used on log groups that are auto created by AWS services, such as [AWS @@ -46,7 +48,7 @@ By default, the log group will be created in the same region as the stack. The ` log groups in other regions. This is typically useful when controlling retention for log groups auto-created by global services that publish their log group to a specific region, such as AWS Chatbot creating a log group in `us-east-1`. -### Encrypting Log Groups +## Encrypting Log Groups By default, log group data is always encrypted in CloudWatch Logs. You have the option to encrypt log group data using a AWS KMS customer master key (CMK) should @@ -67,7 +69,7 @@ new LogGroup(this, 'LogGroup', { See the AWS documentation for more detailed information about [encrypting CloudWatch Logs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/encrypt-log-data-kms.html). -### Subscriptions and Destinations +## Subscriptions and Destinations Log events matching a particular filter can be sent to either a Lambda function or a Kinesis stream. @@ -91,7 +93,7 @@ new SubscriptionFilter(this, 'Subscription', { }); ``` -### Metric Filters +## Metric Filters CloudWatch Logs can extract and emit metrics based on a textual log stream. Depending on your needs, this may be a more convenient way of generating metrics @@ -119,7 +121,7 @@ Will extract the value of `jsonField` wherever it occurs in JSON-structed log records in the LogGroup, and emit them to CloudWatch Metrics under the name `Namespace/MetricName`. -#### Exposing Metric on a Metric Filter +### Exposing Metric on a Metric Filter You can expose a metric on a metric filter by calling the `MetricFilter.metric()` API. This has a default of `statistic = 'avg'` if the statistic is not set in the `props`. @@ -144,7 +146,7 @@ new Alarm(this, 'alarm from metric filter', { }); ``` -### Patterns +## Patterns Patterns describe which log events match a subscription or metric filter. There are three types of patterns: @@ -164,7 +166,7 @@ In addition to the patterns above, the following special patterns exist: more information, see the [Filter and Pattern Syntax](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html). -#### Text Patterns +### Text Patterns Text patterns match if the literal strings appear in the text form of the log line. @@ -192,7 +194,7 @@ const pattern2 = FilterPattern.anyGroup( ); ``` -### JSON Patterns +## JSON Patterns JSON patterns apply if the log event is the JSON representation of an object (without any other characters, so it cannot include a prefix such as timestamp @@ -241,7 +243,7 @@ const pattern = FilterPattern.all( )); ``` -### Space-delimited table patterns +## Space-delimited table patterns If the log events are rows of a space-delimited table, this pattern can be used to identify the columns in that structure and add conditions on any of them. The @@ -277,7 +279,7 @@ const pattern = FilterPattern.spaceDelimited('time', 'component', '...', 'result .whereNumber('result_code', '!=', 200); ``` -### Notes +## Notes Be aware that Log Group ARNs will always have the string `:*` appended to them, to match the behavior of [the CloudFormation `AWS::Logs::LogGroup` diff --git a/packages/@aws-cdk/aws-macie/README.md b/packages/@aws-cdk/aws-macie/README.md index 9f4352257b41e..d4154b38a9d9b 100644 --- a/packages/@aws-cdk/aws-macie/README.md +++ b/packages/@aws-cdk/aws-macie/README.md @@ -1,12 +1,16 @@ -## AWS::Macie Construct Library +# AWS::Macie Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-managedblockchain/README.md b/packages/@aws-cdk/aws-managedblockchain/README.md index 3836525debc28..bc8534fd8bf22 100644 --- a/packages/@aws-cdk/aws-managedblockchain/README.md +++ b/packages/@aws-cdk/aws-managedblockchain/README.md @@ -1,12 +1,16 @@ -## AWS::ManagedBlockchain Construct Library +# AWS::ManagedBlockchain Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-mediaconvert/README.md b/packages/@aws-cdk/aws-mediaconvert/README.md index 9d9620c86bcae..c58e480114a6d 100644 --- a/packages/@aws-cdk/aws-mediaconvert/README.md +++ b/packages/@aws-cdk/aws-mediaconvert/README.md @@ -1,12 +1,16 @@ -## AWS::MediaConvert Construct Library +# AWS::MediaConvert Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-medialive/README.md b/packages/@aws-cdk/aws-medialive/README.md index fcf8befcf1e06..6a13191e2a7bc 100644 --- a/packages/@aws-cdk/aws-medialive/README.md +++ b/packages/@aws-cdk/aws-medialive/README.md @@ -1,12 +1,16 @@ -## AWS Elemental MediaLive Construct Library +# AWS Elemental MediaLive Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-mediapackage/README.md b/packages/@aws-cdk/aws-mediapackage/README.md index 11d84261af563..f49ba1fb5fd87 100644 --- a/packages/@aws-cdk/aws-mediapackage/README.md +++ b/packages/@aws-cdk/aws-mediapackage/README.md @@ -1,12 +1,16 @@ -## AWS::MediaPackage Construct Library +# AWS::MediaPackage Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-mediastore/README.md b/packages/@aws-cdk/aws-mediastore/README.md index edc56812b49d6..f420f2299d899 100644 --- a/packages/@aws-cdk/aws-mediastore/README.md +++ b/packages/@aws-cdk/aws-mediastore/README.md @@ -1,12 +1,16 @@ -## AWS Elemental MediaStore Construct Library +# AWS Elemental MediaStore Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-msk/README.md b/packages/@aws-cdk/aws-msk/README.md index a4e00a5f29fa5..1de05861fc74f 100644 --- a/packages/@aws-cdk/aws-msk/README.md +++ b/packages/@aws-cdk/aws-msk/README.md @@ -1,12 +1,16 @@ -## Amazon Managed Streaming for Apache Kafka Construct Library +# Amazon Managed Streaming for Apache Kafka Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-neptune/README.md b/packages/@aws-cdk/aws-neptune/README.md index 069e0feb746af..6b2eddde67362 100644 --- a/packages/@aws-cdk/aws-neptune/README.md +++ b/packages/@aws-cdk/aws-neptune/README.md @@ -1,12 +1,16 @@ -## Amazon Neptune Construct Library +# Amazon Neptune Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + ```ts diff --git a/packages/@aws-cdk/aws-networkfirewall/README.md b/packages/@aws-cdk/aws-networkfirewall/README.md index 046f36a97d5c7..9b6dc5712e4de 100644 --- a/packages/@aws-cdk/aws-networkfirewall/README.md +++ b/packages/@aws-cdk/aws-networkfirewall/README.md @@ -1,12 +1,16 @@ # AWS::NetworkFirewall Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-networkmanager/README.md b/packages/@aws-cdk/aws-networkmanager/README.md index 898602195a05a..0cee3e1290f04 100644 --- a/packages/@aws-cdk/aws-networkmanager/README.md +++ b/packages/@aws-cdk/aws-networkmanager/README.md @@ -1,12 +1,16 @@ -## AWS::NetworkManager Construct Library +# AWS::NetworkManager Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-opsworks/README.md b/packages/@aws-cdk/aws-opsworks/README.md index 228ba9a58e9d1..f5cc663c1b4d9 100644 --- a/packages/@aws-cdk/aws-opsworks/README.md +++ b/packages/@aws-cdk/aws-opsworks/README.md @@ -1,12 +1,16 @@ -## AWS OpsWorks Construct Library +# AWS OpsWorks Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-opsworkscm/README.md b/packages/@aws-cdk/aws-opsworkscm/README.md index ed16e51350cb6..84a537a7012ad 100644 --- a/packages/@aws-cdk/aws-opsworkscm/README.md +++ b/packages/@aws-cdk/aws-opsworkscm/README.md @@ -1,12 +1,16 @@ -## AWS OpsWorks CM Construct Library +# AWS OpsWorks CM Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-pinpoint/README.md b/packages/@aws-cdk/aws-pinpoint/README.md index d127f147031ce..3f2622e8063ca 100644 --- a/packages/@aws-cdk/aws-pinpoint/README.md +++ b/packages/@aws-cdk/aws-pinpoint/README.md @@ -1,12 +1,16 @@ -## Amazon Pinpoint Construct Library +# Amazon Pinpoint Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-pinpointemail/README.md b/packages/@aws-cdk/aws-pinpointemail/README.md index 77f4461014e52..c2a0bf252be8f 100644 --- a/packages/@aws-cdk/aws-pinpointemail/README.md +++ b/packages/@aws-cdk/aws-pinpointemail/README.md @@ -1,12 +1,16 @@ -## Amazon Pinpoint Email Construct Library +# Amazon Pinpoint Email Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-qldb/README.md b/packages/@aws-cdk/aws-qldb/README.md index ec2a460377447..3df572f4dfcae 100644 --- a/packages/@aws-cdk/aws-qldb/README.md +++ b/packages/@aws-cdk/aws-qldb/README.md @@ -1,12 +1,16 @@ -## AWS::QLDB Construct Library +# AWS::QLDB Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-ram/README.md b/packages/@aws-cdk/aws-ram/README.md index c7a0e83c0dfc0..a2099d1f65a47 100644 --- a/packages/@aws-cdk/aws-ram/README.md +++ b/packages/@aws-cdk/aws-ram/README.md @@ -1,12 +1,16 @@ -## AWS Resource Access Manager Construct Library +# AWS Resource Access Manager Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-rds/README.md b/packages/@aws-cdk/aws-rds/README.md index 4b5683d2dc37f..dc38706bc94eb 100644 --- a/packages/@aws-cdk/aws-rds/README.md +++ b/packages/@aws-cdk/aws-rds/README.md @@ -1,6 +1,6 @@ -## Amazon Relational Database Service Construct Library - +# Amazon Relational Database Service Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -8,13 +8,15 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + -```typescript + +```ts import * as rds from '@aws-cdk/aws-rds'; ``` -### Starting a clustered database +## Starting a clustered database To set up a clustered database (like Aurora), define a `DatabaseCluster`. You must always launch a database in a VPC. Use the `vpcSubnets` attribute to control whether @@ -59,7 +61,7 @@ new rds.DatabaseClusterFromSnapshot(stack, 'Database', { }); ``` -### Starting an instance database +## Starting an instance database To set up a instance database, define a `DatabaseInstance`. You must always launch a database in a VPC. Use the `vpcSubnets` attribute to control whether @@ -125,7 +127,7 @@ Creating a "production" Oracle database instance with option and parameter group [example of setting up a production oracle instance](test/integ.instance.lit.ts) -### Instance events +## Instance events To define Amazon CloudWatch event rules for database instances, use the `onEvent` method: @@ -134,7 +136,7 @@ method: const rule = instance.onEvent('InstanceEvent', { target: new targets.LambdaFunction(fn) }); ``` -### Login credentials +## Login credentials By default, database instances and clusters will have `admin` user with an auto-generated password. An alternative username (and password) may be specified for the admin user instead of the default. @@ -163,7 +165,7 @@ new rds.DatabaseInstance(this, 'InstanceWithSecretLogin', { }); ``` -### Connecting +## Connecting To control who can access the cluster or instance, use the `.connections` attribute. RDS databases have a default port, so you don't need to specify the port: @@ -185,7 +187,7 @@ For an instance database: const address = instance.instanceEndpoint.socketAddress; // "HOSTNAME:PORT" ``` -### Rotating credentials +## Rotating credentials When the master password is generated and stored in AWS Secrets Manager, it can be rotated automatically: @@ -226,7 +228,7 @@ The rotation will start as soon as this user exists. See also [@aws-cdk/aws-secretsmanager](https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-secretsmanager/README.md) for credentials rotation of existing clusters/instances. -### IAM Authentication +## IAM Authentication You can also authenticate to a database instance using AWS Identity and Access Management (IAM) database authentication; See for more information @@ -247,7 +249,7 @@ instance.grantConnect(role); // Grant the role connection access to the DB. **Note**: In addition to the setup above, a database user will need to be created to support IAM auth. See for setup instructions. -### Kerberos Authentication +## Kerberos Authentication You can also authenticate using Kerberos to a database instance using AWS Managed Microsoft AD for authentication; See for more information @@ -277,7 +279,7 @@ appropriate security groups/network ACL to allow traffic between the database in Once configured, see for details on configuring users for each available database engine. -### Metrics +## Metrics Database instances and clusters both expose metrics (`cloudwatch.Metric`): @@ -292,7 +294,7 @@ const cpuUtilization = cluster.metricCPUUtilization(); const readLatency = instance.metric('ReadLatency', { statistic: 'Average', periodSec: 60 }); ``` -### Enabling S3 integration +## Enabling S3 integration Data in S3 buckets can be imported to and exported from certain database engines using SQL queries. To enable this functionality, set the `s3ImportBuckets` and `s3ExportBuckets` properties for import and export respectively. When @@ -323,7 +325,7 @@ new rds.DatabaseCluster(this, 'dbcluster', { }); ``` -### Creating a Database Proxy +## Creating a Database Proxy Amazon RDS Proxy sits between your application and your relational database to efficiently manage connections to the database and improve scalability of the application. Learn more about at [Amazon RDS Proxy](https://aws.amazon.com/rds/proxy/) @@ -349,7 +351,7 @@ const proxy = dbInstance.addProxy('proxy', { }); ``` -### Exporting Logs +## Exporting Logs You can publish database logs to Amazon CloudWatch Logs. With CloudWatch Logs, you can perform real-time analysis of the log data, store the data in highly durable storage, and manage the data with the CloudWatch Logs Agent. This is available for both database @@ -379,7 +381,7 @@ const instance = new rds.DatabaseInstance(this, 'Instance', { }); ``` -### Option Groups +## Option Groups Some DB engines offer additional features that make it easier to manage data and databases, and to provide additional security for your database. Amazon RDS uses option groups to enable and configure these features. An option group can specify features, called options, @@ -403,7 +405,7 @@ new rds.OptionGroup(stack, 'Options', { }); ``` -### Serverless +## Serverless [Amazon Aurora Serverless]((https://aws.amazon.com/rds/aurora/serverless/)) is an on-demand, auto-scaling configuration for Amazon Aurora. The database will automatically start up, shut down, and scale capacity @@ -451,7 +453,7 @@ Read more about the [limitations of Aurora Serverless](https://docs.aws.amazon.c Learn more about using Amazon Aurora Serverless by reading the [documentation](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html) -#### Data API +### Data API You can access your Aurora Serverless DB cluster using the built-in Data API. The Data API doesn't require a persistent connection to the DB cluster. Instead, it provides a secure HTTP endpoint and integration with AWS SDKs. diff --git a/packages/@aws-cdk/aws-redshift/README.md b/packages/@aws-cdk/aws-redshift/README.md index 8ecdd21f72ca8..576068b02f818 100644 --- a/packages/@aws-cdk/aws-redshift/README.md +++ b/packages/@aws-cdk/aws-redshift/README.md @@ -1,20 +1,27 @@ -## Amazon Redshift Construct Library - +# Amazon Redshift Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + -### Starting a Redshift Cluster Database +## Starting a Redshift Cluster Database To set up a Redshift cluster, define a `Cluster`. It will be launched in a VPC. You can specify a VPC, otherwise one will be created. The nodes are always launched in private subnets and are encrypted by default. @@ -37,7 +44,7 @@ A default database named `default_db` will be created in the cluster. To change By default, the cluster will not be publicly accessible. Depending on your use case, you can make the cluster publicly accessible with the `publiclyAccessible` property. -### Connecting +## Connecting To control who can access the cluster, use the `.connections` attribute. Redshift Clusters have a default port, so you don't need to specify the port: @@ -52,7 +59,7 @@ The endpoint to access your database cluster will be available as the `.clusterE cluster.clusterEndpoint.socketAddress; // "HOSTNAME:PORT" ``` -### Rotating credentials +## Rotating credentials When the master password is generated and stored in AWS Secrets Manager, it can be rotated automatically: diff --git a/packages/@aws-cdk/aws-resourcegroups/README.md b/packages/@aws-cdk/aws-resourcegroups/README.md index 736924d3b4d08..b24c366c8a3ca 100644 --- a/packages/@aws-cdk/aws-resourcegroups/README.md +++ b/packages/@aws-cdk/aws-resourcegroups/README.md @@ -1,12 +1,16 @@ -## AWS::ResourceGroups Construct Library +# AWS::ResourceGroups Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-robomaker/README.md b/packages/@aws-cdk/aws-robomaker/README.md index 0141c367bfdb8..4951007e3c051 100644 --- a/packages/@aws-cdk/aws-robomaker/README.md +++ b/packages/@aws-cdk/aws-robomaker/README.md @@ -1,12 +1,16 @@ -## AWS RoboMaker Construct Library +# AWS RoboMaker Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-route53-patterns/README.md b/packages/@aws-cdk/aws-route53-patterns/README.md index 0b21ed1340580..4fa852aaad777 100644 --- a/packages/@aws-cdk/aws-route53-patterns/README.md +++ b/packages/@aws-cdk/aws-route53-patterns/README.md @@ -1,10 +1,12 @@ # CDK Construct library for higher-level Route 53 Constructs + --- ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + This library provides higher-level Amazon Route 53 constructs which follow common diff --git a/packages/@aws-cdk/aws-route53-targets/README.md b/packages/@aws-cdk/aws-route53-targets/README.md index 06d7dd6568255..5270482564ee8 100644 --- a/packages/@aws-cdk/aws-route53-targets/README.md +++ b/packages/@aws-cdk/aws-route53-targets/README.md @@ -1,14 +1,18 @@ # Route53 Alias Record Targets for the CDK Route53 Library + --- ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + This library contains Route53 Alias Record targets for: + * API Gateway custom domains + ```ts new route53.ARecord(this, 'AliasRecord', { zone, @@ -16,21 +20,27 @@ This library contains Route53 Alias Record targets for: // or - route53.RecordTarget.fromAlias(new alias.ApiGatewayDomain(domainName)), }); ``` + * API Gateway V2 custom domains + ```ts new route53.ARecord(this, 'AliasRecord', { zone, target: route53.RecordTarget.fromAlias(new alias.ApiGatewayv2Domain(domainName)), }); ``` + * CloudFront distributions + ```ts new route53.ARecord(this, 'AliasRecord', { zone, target: route53.RecordTarget.fromAlias(new alias.CloudFrontTarget(distribution)), }); ``` + * ELBv2 load balancers + ```ts new route53.ARecord(this, 'AliasRecord', { zone, @@ -38,7 +48,9 @@ This library contains Route53 Alias Record targets for: // or - route53.RecordTarget.fromAlias(new alias.ApiGatewayDomain(domainName)), }); ``` + * Classic load balancers + ```ts new route53.ARecord(this, 'AliasRecord', { zone, @@ -54,16 +66,19 @@ For example, if the Amazon-provided DNS for the load balancer is `ALB-xxxxxxx.us * InterfaceVpcEndpoints **Important:** Based on the CFN docs for VPCEndpoints - [see here](attrDnsEntries) - the attributes returned for DnsEntries in CloudFormation is a combination of the hosted zone ID and the DNS name. The entries are ordered as follows: regional public DNS, zonal public DNS, private DNS, and wildcard DNS. This order is not enforced for AWS Marketplace services, and therefore this CDK construct is ONLY guaranteed to work with non-marketplace services. + ```ts new route53.ARecord(stack, "AliasRecord", { zone, target: route53.RecordTarget.fromAlias(new alias.InterfaceVpcEndpointTarget(interfaceVpcEndpoint)) }); ``` + * S3 Bucket Website: **Important:** The Bucket name must strictly match the full DNS name. See [the Developer Guide](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/getting-started.html) for more info. + ```ts const [recordName, domainName] = ['www', 'example.com']; @@ -81,7 +96,9 @@ See [the Developer Guide](https://docs.aws.amazon.com/Route53/latest/DeveloperGu target: route53.RecordTarget.fromAlias(new alias.BucketWebsiteTarget(bucket)), }); ``` + * User pool domain + ```ts new route53.ARecord(this, 'AliasRecord', { zone, diff --git a/packages/@aws-cdk/aws-route53/README.md b/packages/@aws-cdk/aws-route53/README.md index cb88a5a8f16d8..d83ba3a547915 100644 --- a/packages/@aws-cdk/aws-route53/README.md +++ b/packages/@aws-cdk/aws-route53/README.md @@ -1,5 +1,6 @@ -## Amazon Route53 Construct Library +# Amazon Route53 Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -7,6 +8,7 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + To add a public hosted zone: @@ -37,9 +39,10 @@ const zone = new route53.PrivateHostedZone(this, 'HostedZone', { Additional VPCs can be added with `zone.addVpc()`. -### Adding Records +## Adding Records To add a TXT record to your zone: + ```ts import * as route53 from '@aws-cdk/aws-route53'; @@ -58,6 +61,7 @@ new route53.TxtRecord(this, 'TXTRecord', { ``` To add a A record to your zone: + ```ts import * as route53 from '@aws-cdk/aws-route53'; @@ -68,6 +72,7 @@ new route53.ARecord(this, 'ARecord', { ``` To add a AAAA record pointing to a CloudFront distribution: + ```ts import * as route53 from '@aws-cdk/aws-route53'; import * as targets from '@aws-cdk/aws-route53-targets'; @@ -83,7 +88,7 @@ Constructs are available for A, AAAA, CAA, CNAME, MX, NS, SRV and TXT records. Use the `CaaAmazonRecord` construct to easily restrict certificate authorities allowed to issue certificates for a domain to Amazon only. -### Imports +## Imports If you don't know the ID of the Hosted Zone to import, you can use the `HostedZone.fromLookup`: @@ -123,4 +128,4 @@ you know the ID and the retrieval for the `zoneName` is undesirable. const zone = HostedZone.fromHostedZoneId(this, 'MyZone', { hostedZoneId: 'ZOJJZC49E0EPZ', }); -``` \ No newline at end of file +``` diff --git a/packages/@aws-cdk/aws-route53resolver/README.md b/packages/@aws-cdk/aws-route53resolver/README.md index 3afc83c252d8f..f6eea77064f22 100644 --- a/packages/@aws-cdk/aws-route53resolver/README.md +++ b/packages/@aws-cdk/aws-route53resolver/README.md @@ -1,16 +1,24 @@ -## Amazon Route53 Resolver Construct Library +# Amazon Route53 Resolver Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + ```ts diff --git a/packages/@aws-cdk/aws-s3-assets/README.md b/packages/@aws-cdk/aws-s3-assets/README.md index 287406b534559..3d508070d6a50 100644 --- a/packages/@aws-cdk/aws-s3-assets/README.md +++ b/packages/@aws-cdk/aws-s3-assets/README.md @@ -1,12 +1,18 @@ -## AWS CDK Assets +# AWS CDK Assets + --- ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + Assets are local files or directories which are needed by a CDK app. A common @@ -50,7 +56,7 @@ The following examples grants an IAM group read permissions on an asset: [Example of granting read access to an asset](./test/integ.assets.permissions.lit.ts) -## How does it work? +## How does it work When an asset is defined in a construct, a construct metadata entry `aws:cdk:asset` is emitted with instructions on where to find the asset and what @@ -128,8 +134,8 @@ locally for debugging purposes. To enable such use cases, external tools will consult a set of metadata entries on AWS CloudFormation resources: -- `aws:asset:path` points to the local path of the asset. -- `aws:asset:property` is the name of the resource property where the asset is used +* `aws:asset:path` points to the local path of the asset. +* `aws:asset:property` is the name of the resource property where the asset is used Using these two metadata entries, tools will be able to identify that assets are used by a certain resource, and enable advanced local experiences. diff --git a/packages/@aws-cdk/aws-s3-deployment/README.md b/packages/@aws-cdk/aws-s3-deployment/README.md index 9c922719e5e96..9530ca3b61c34 100644 --- a/packages/@aws-cdk/aws-s3-deployment/README.md +++ b/packages/@aws-cdk/aws-s3-deployment/README.md @@ -1,13 +1,18 @@ -## AWS S3 Deployment Construct Library - +# AWS S3 Deployment Construct Library + --- ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + > __Status: Experimental__ @@ -71,7 +76,7 @@ By default, files in the destination bucket that don't exist in the source will when the `BucketDeployment` resource is created or updated. You can use the option `prune: false` to disable this behavior, in which case the files will not be deleted. -```typescript +```ts new s3deploy.BucketDeployment(this, 'DeployMeWithoutDeletingFilesOnDestination', { sources: [s3deploy.Source.asset(path.join(__dirname, 'my-website'))], destinationBucket, @@ -83,7 +88,7 @@ This option also enables you to specify multiple bucket deployments for the same each with its own characteristics. For example, you can set different cache-control headers based on file extensions: -```typescript +```ts new BucketDeployment(this, 'BucketDeployment', { sources: [Source.asset('./website', { exclude: ['index.html' })], destinationBucket: bucket, @@ -199,18 +204,18 @@ size of the AWS Lambda resource handler. ## Notes - * This library uses an AWS CloudFormation custom resource which about 10MiB in - size. The code of this resource is bundled with this library. - * AWS Lambda execution time is limited to 15min. This limits the amount of data which can - be deployed into the bucket by this timeout. - * When the `BucketDeployment` is removed from the stack, the contents are retained - in the destination bucket ([#952](https://github.com/aws/aws-cdk/issues/952)). - * Bucket deployment _only happens_ during stack create/update. This means that - if you wish to update the contents of the destination, you will need to - change the source s3 key (or bucket), so that the resource will be updated. - This is inline with best practices. If you use local disk assets, this will - happen automatically whenever you modify the asset, since the S3 key is based - on a hash of the asset contents. +- This library uses an AWS CloudFormation custom resource which about 10MiB in + size. The code of this resource is bundled with this library. +- AWS Lambda execution time is limited to 15min. This limits the amount of data + which can be deployed into the bucket by this timeout. +- When the `BucketDeployment` is removed from the stack, the contents are retained + in the destination bucket ([#952](https://github.com/aws/aws-cdk/issues/952)). +- Bucket deployment _only happens_ during stack create/update. This means that + if you wish to update the contents of the destination, you will need to + change the source s3 key (or bucket), so that the resource will be updated. + This is inline with best practices. If you use local disk assets, this will + happen automatically whenever you modify the asset, since the S3 key is based + on a hash of the asset contents. ## Development diff --git a/packages/@aws-cdk/aws-s3-notifications/README.md b/packages/@aws-cdk/aws-s3-notifications/README.md index 0fbf2e68ab9c9..8efbb5149f627 100644 --- a/packages/@aws-cdk/aws-s3-notifications/README.md +++ b/packages/@aws-cdk/aws-s3-notifications/README.md @@ -1,10 +1,12 @@ -## S3 Bucket Notifications Destinations +# S3 Bucket Notifications Destinations + --- ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + This module includes integration classes for using Topics, Queues or Lambdas @@ -22,4 +24,4 @@ const bucket = new s3.Bucket(stack, 'Bucket'); const topic = new sns.Topic(stack, 'Topic'); bucket.addEventNotification(s3.EventType.OBJECT_CREATED_PUT, new s3n.SnsDestination(topic)); -``` \ No newline at end of file +``` diff --git a/packages/@aws-cdk/aws-s3/README.md b/packages/@aws-cdk/aws-s3/README.md index b3eb2e1a4707d..f453a84daa447 100644 --- a/packages/@aws-cdk/aws-s3/README.md +++ b/packages/@aws-cdk/aws-s3/README.md @@ -1,5 +1,6 @@ -## Amazon S3 Construct Library +# Amazon S3 Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -7,6 +8,7 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + Define an unencrypted S3 bucket. @@ -36,7 +38,7 @@ new Bucket(this, 'MyFirstBucket'); * `s3UrlForObject(key)` - the S3 URL of an object within the bucket (i.e. `s3://bucket/mykey`) -### Encryption +## Encryption Define a KMS-encrypted bucket: @@ -72,7 +74,7 @@ const bucket = new Bucket(this, 'Buck', { assert(bucket.encryptionKey == null); ``` -### Permissions +## Permissions A bucket policy will be automatically created for the bucket upon the first call to `addToResourcePolicy(statement)`: @@ -107,13 +109,13 @@ bucket.grantReadWrite(lambda); Will give the Lambda's execution role permissions to read and write from the bucket. -### Sharing buckets between stacks +## Sharing buckets between stacks To use a bucket in a different stack in the same CDK application, pass the object to the other stack: [sharing bucket between stacks](test/integ.bucket-sharing.lit.ts) -### Importing existing buckets +## Importing existing buckets To import an existing bucket into your CDK application, use the `Bucket.fromBucketAttributes` factory method. This method accepts `BucketAttributes` which describes the properties of an already @@ -148,7 +150,7 @@ const myCrossRegionBucket = Bucket.fromBucketAttributes(this, 'CrossRegionImport // myCrossRegionBucket.bucketRegionalDomainName === 'my-bucket.s3.us-east-1.amazonaws.com' ``` -### Bucket Notifications +## Bucket Notifications The Amazon S3 notification feature enables you to receive notifications when certain events happen in your bucket as described under [S3 Bucket @@ -185,11 +187,12 @@ bucket.addEventNotification(s3.EventType.OBJECT_REMOVED, [S3 Bucket Notifications]: https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html -### Block Public Access +## Block Public Access Use `blockPublicAccess` to specify [block public access settings] on the bucket. Enable all block public access settings: + ```ts const bucket = new Bucket(this, 'MyBlockedBucket', { blockPublicAccess: BlockPublicAccess.BLOCK_ALL @@ -197,6 +200,7 @@ const bucket = new Bucket(this, 'MyBlockedBucket', { ``` Block and ignore public ACLs: + ```ts const bucket = new Bucket(this, 'MyBlockedBucket', { blockPublicAccess: BlockPublicAccess.BLOCK_ACLS @@ -204,6 +208,7 @@ const bucket = new Bucket(this, 'MyBlockedBucket', { ``` Alternatively, specify the settings manually: + ```ts const bucket = new Bucket(this, 'MyBlockedBucket', { blockPublicAccess: new BlockPublicAccess({ blockPublicPolicy: true }) @@ -214,7 +219,7 @@ When `blockPublicPolicy` is set to `true`, `grantPublicRead()` throws an error. [block public access settings]: https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html -### Logging configuration +## Logging configuration Use `serverAccessLogsBucket` to describe where server access logs are to be stored. @@ -237,7 +242,7 @@ const bucket = new Bucket(this, 'MyBucket', { [S3 Server access logging]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerLogs.html -### S3 Inventory +## S3 Inventory An [inventory](https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html) contains a list of the objects in the source bucket and metadata for each object. The inventory lists are stored in the destination bucket as a CSV file compressed with GZIP, as an Apache optimized row columnar (ORC) file compressed with ZLIB, or as an Apache Parquet (Parquet) file compressed with Snappy. @@ -270,7 +275,7 @@ const dataBucket = new s3.Bucket(this, 'DataBucket', { If the destination bucket is created as part of the same CDK application, the necessary permissions will be automatically added to the bucket policy. However, if you use an imported bucket (i.e `Bucket.fromXXX()`), you'll have to make sure it contains the following policy document: -``` +```json { "Version": "2012-10-17", "Statement": [ @@ -285,13 +290,13 @@ However, if you use an imported bucket (i.e `Bucket.fromXXX()`), you'll have to } ``` -### Website redirection +## Website redirection You can use the two following properties to specify the bucket [redirection policy]. Please note that these methods cannot both be applied to the same bucket. [redirection policy]: https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html#advanced-conditional-redirects -#### Static redirection +### Static redirection You can statically redirect a to a given Bucket URL or any other host name with `websiteRedirect`: @@ -301,7 +306,7 @@ const bucket = new Bucket(this, 'MyRedirectedBucket', { }); ``` -#### Routing rules +### Routing rules Alternatively, you can also define multiple `websiteRoutingRules`, to define complex, conditional redirections: @@ -320,13 +325,13 @@ const bucket = new Bucket(this, 'MyRedirectedBucket', { }); ``` -### Filling the bucket as part of deployment +## Filling the bucket as part of deployment To put files into a bucket as part of a deployment (for example, to host a website), see the `@aws-cdk/aws-s3-deployment` package, which provides a resource that can do just that. -### The URL for objects +## The URL for objects S3 provides two types of URLs for accessing objects via HTTP(S). Path-Style and [Virtual Hosted-Style](https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html) diff --git a/packages/@aws-cdk/aws-sagemaker/README.md b/packages/@aws-cdk/aws-sagemaker/README.md index 52ccd036c1cf5..b3e6c5c20fbe3 100644 --- a/packages/@aws-cdk/aws-sagemaker/README.md +++ b/packages/@aws-cdk/aws-sagemaker/README.md @@ -1,12 +1,16 @@ -## Amazon SageMaker Construct Library +# Amazon SageMaker Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + ```ts diff --git a/packages/@aws-cdk/aws-sam/README.md b/packages/@aws-cdk/aws-sam/README.md index 8e4c28bed41de..caf5119f08c7e 100644 --- a/packages/@aws-cdk/aws-sam/README.md +++ b/packages/@aws-cdk/aws-sam/README.md @@ -1,12 +1,16 @@ -## AWS Serverless Application Model Construct Library +# AWS Serverless Application Model Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module includes low-level constructs that synthesize into `AWS::Serverless` resources. @@ -15,7 +19,7 @@ This module includes low-level constructs that synthesize into `AWS::Serverless` import * as sam from '@aws-cdk/aws-sam'; ``` -### Related +## Related The following AWS CDK modules include constructs that can be used to work with Amazon API Gateway and AWS Lambda: diff --git a/packages/@aws-cdk/aws-sdb/README.md b/packages/@aws-cdk/aws-sdb/README.md index 89ea4107fec62..228ed6b04074a 100644 --- a/packages/@aws-cdk/aws-sdb/README.md +++ b/packages/@aws-cdk/aws-sdb/README.md @@ -1,12 +1,16 @@ -## Amazon SimpleDB Construct Library +# Amazon SimpleDB Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-secretsmanager/README.md b/packages/@aws-cdk/aws-secretsmanager/README.md index 383a4ff2870c1..959b73e12a669 100644 --- a/packages/@aws-cdk/aws-secretsmanager/README.md +++ b/packages/@aws-cdk/aws-secretsmanager/README.md @@ -1,6 +1,6 @@ -## AWS Secrets Manager Construct Library - +# AWS Secrets Manager Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -8,13 +8,15 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + + ```ts import * as secretsmanager from '@aws-cdk/aws-secretsmanager'; ``` -### Create a new Secret in a Stack +## Create a new Secret in a Stack In order to have SecretsManager generate a new secret value automatically, you can get started with the following: @@ -43,7 +45,7 @@ list of properties, see [the CloudFormation Dynamic References documentation](ht A secret can set `RemovalPolicy`. If it set to `RETAIN`, that removing a secret will fail. -### Grant permission to use the secret to a role +## Grant permission to use the secret to a role You must grant permission to a resource for that resource to be allowed to use a secret. This can be achieved with the `Secret.grantRead` and/or `Secret.grantUpdate` @@ -69,9 +71,9 @@ then `Secret.grantRead` and `Secret.grantWrite` will also grant the role the relevant encrypt and decrypt permissions to the KMS key through the SecretsManager service principal. -### Rotating a Secret +## Rotating a Secret -#### Using a Custom Lambda Function +### Using a Custom Lambda Function A rotation schedule can be added to a Secret using a custom Lambda function: @@ -87,7 +89,7 @@ secret.addRotationSchedule('RotationSchedule', { See [Overview of the Lambda Rotation Function](https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets-lambda-function-overview.html) on how to implement a Lambda Rotation Function. -#### Using a Hosted Lambda Function +### Using a Hosted Lambda Function Use the `hostedRotation` prop to rotate a secret with a hosted Lambda function: @@ -112,7 +114,7 @@ dbConnections.allowDefaultPortFrom(hostedRotation); See also [Automating secret creation in AWS CloudFormation](https://docs.aws.amazon.com/secretsmanager/latest/userguide/integrating_cloudformation.html). -### Rotating database credentials +## Rotating database credentials Define a `SecretRotation` to rotate database credentials: @@ -157,7 +159,7 @@ new secretsmanager.SecretRotation(stack, 'SecretRotation', { See also [aws-rds](https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-rds/README.md) where credentials generation and rotation is integrated. -### Importing Secrets +## Importing Secrets Existing secrets can be imported by ARN, name, and other attributes (including the KMS key used to encrypt the secret). Secrets imported by name should use the short-form of the name (without the SecretsManager-provided suffx); diff --git a/packages/@aws-cdk/aws-securityhub/README.md b/packages/@aws-cdk/aws-securityhub/README.md index 602d90dffb1c1..831f2af57d18b 100644 --- a/packages/@aws-cdk/aws-securityhub/README.md +++ b/packages/@aws-cdk/aws-securityhub/README.md @@ -1,12 +1,16 @@ -## AWS Security Hub Construct Library +# AWS Security Hub Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-servicecatalog/README.md b/packages/@aws-cdk/aws-servicecatalog/README.md index c3ca1c57aeeb9..b3f20916fcac4 100644 --- a/packages/@aws-cdk/aws-servicecatalog/README.md +++ b/packages/@aws-cdk/aws-servicecatalog/README.md @@ -1,12 +1,16 @@ -## AWS Service Catalog Construct Library +# AWS Service Catalog Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-servicediscovery/README.md b/packages/@aws-cdk/aws-servicediscovery/README.md index 64d767620f329..888d3af744a37 100644 --- a/packages/@aws-cdk/aws-servicediscovery/README.md +++ b/packages/@aws-cdk/aws-servicediscovery/README.md @@ -1,5 +1,6 @@ -## Amazon ECS Service Discovery Construct Library +# Amazon ECS Service Discovery Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -7,6 +8,7 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. @@ -20,7 +22,7 @@ depend on. For further information on AWS Cloud Map, see the [AWS Cloud Map documentation](https://docs.aws.amazon.com/cloud-map) -### HTTP Namespace Example +## HTTP Namespace Example The following example creates an AWS Cloud Map namespace that supports API calls, creates a service in that namespace, and @@ -28,7 +30,7 @@ registers an instance to it: [Creating a Cloud Map service within an HTTP namespace](test/integ.service-with-http-namespace.lit.ts) -### Private DNS Namespace Example +## Private DNS Namespace Example The following example creates an AWS Cloud Map namespace that supports both API calls and DNS queries within a vpc, creates a @@ -37,7 +39,7 @@ instance: [Creating a Cloud Map service within a Private DNS namespace](test/integ.service-with-private-dns-namespace.lit.ts) -### Public DNS Namespace Example +## Public DNS Namespace Example The following example creates an AWS Cloud Map namespace that supports both API calls and public DNS queries, creates a service in diff --git a/packages/@aws-cdk/aws-ses-actions/README.md b/packages/@aws-cdk/aws-ses-actions/README.md index 4c17690062751..37d4ff339145a 100644 --- a/packages/@aws-cdk/aws-ses-actions/README.md +++ b/packages/@aws-cdk/aws-ses-actions/README.md @@ -1,18 +1,25 @@ -## Amazon Simple Email Service Actions Library +# Amazon Simple Email Service Actions Library + --- ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + This module contains integration classes to add action to SES email receiving rules. Instances of these classes should be passed to the `rule.addAction()` method. Currently supported are: + * [Add header](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-add-header.html) * [Bounce](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-bounce.html) * [Lambda](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-lambda.html) diff --git a/packages/@aws-cdk/aws-ses/README.md b/packages/@aws-cdk/aws-ses/README.md index 3050718215fd4..b8543970796ad 100644 --- a/packages/@aws-cdk/aws-ses/README.md +++ b/packages/@aws-cdk/aws-ses/README.md @@ -1,21 +1,30 @@ -## Amazon Simple Email Service Construct Library +# Amazon Simple Email Service Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. -### Email receiving +## Email receiving + Create a receipt rule set with rules and actions (actions can be found in the `@aws-cdk/aws-ses-actions` package): @@ -57,6 +66,7 @@ new ses.ReceiptRuleSet(stack, 'RuleSet', { ``` Alternatively, rules can be added to a rule set: + ```ts const ruleSet = new ses.ReceiptRuleSet(this, 'RuleSet'): @@ -66,14 +76,17 @@ const awsRule = ruleSet.addRule('Aws', { ``` And actions to rules: + ```ts awsRule.addAction(new actions.Sns({ topic })); ``` + When using `addRule`, the new rule is added after the last added rule unless `after` is specified. -#### Drop spams +### Drop spams + A rule to drop spam can be added by setting `dropSpam` to `true`: ```ts @@ -85,8 +98,10 @@ new ses.ReceiptRuleSet(this, 'RuleSet', { This will add a rule at the top of the rule set with a Lambda action that stops processing messages that have at least one spam indicator. See [Lambda Function Examples](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-lambda-example-functions.html). -### Receipt filter +## Receipt filter + Create a receipt filter: + ```ts new ses.ReceiptFilter(this, 'Filter', { ip: '1.2.3.4/16' // Will be blocked @@ -94,6 +109,7 @@ new ses.ReceiptFilter(this, 'Filter', { ``` A white list filter is also available: + ```ts new ses.WhiteListReceiptFilter(this, 'WhiteList', { ips: [ @@ -102,4 +118,5 @@ new ses.WhiteListReceiptFilter(this, 'WhiteList', { ] }); ``` + This will first create a block all filter and then create allow filters for the listed ip addresses. diff --git a/packages/@aws-cdk/aws-signer/README.md b/packages/@aws-cdk/aws-signer/README.md index 8bdebf06d67dd..5482a0b23c900 100644 --- a/packages/@aws-cdk/aws-signer/README.md +++ b/packages/@aws-cdk/aws-signer/README.md @@ -1,12 +1,16 @@ -## AWS::Signer Construct Library +# AWS::Signer Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-sns-subscriptions/README.md b/packages/@aws-cdk/aws-sns-subscriptions/README.md index 4195220f8ec93..3e047f2e802b6 100644 --- a/packages/@aws-cdk/aws-sns-subscriptions/README.md +++ b/packages/@aws-cdk/aws-sns-subscriptions/README.md @@ -1,10 +1,12 @@ # CDK Construct Library for Amazon Simple Notification Service Subscriptions + --- ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + This library provides constructs for adding subscriptions to an Amazon SNS topic. diff --git a/packages/@aws-cdk/aws-sns/README.md b/packages/@aws-cdk/aws-sns/README.md index 244fab4e0ba60..9067d10ded8c4 100644 --- a/packages/@aws-cdk/aws-sns/README.md +++ b/packages/@aws-cdk/aws-sns/README.md @@ -1,5 +1,6 @@ -## Amazon Simple Notification Service Construct Library +# Amazon Simple Notification Service Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -7,6 +8,7 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + Add an SNS Topic to your stack: @@ -19,7 +21,7 @@ const topic = new sns.Topic(this, 'Topic', { }); ``` -### Subscriptions +## Subscriptions Various subscriptions can be added to the topic by calling the `.addSubscription(...)` method on the topic. It accepts a *subscription* object, @@ -45,10 +47,12 @@ myTopic.addSubscription(new subs.SqsSubscription(queue)); Note that subscriptions of queues in different accounts need to be manually confirmed by reading the initial message from the queue and visiting the link found in it. -#### Filter policy +### Filter policy + A filter policy can be specified when subscribing an endpoint to a topic. Example with a Lambda subscription: + ```ts const myTopic = new sns.Topic(this, 'MyTopic'); const fn = new lambda.Function(this, 'Function', ...); @@ -76,7 +80,8 @@ topic.addSubscription(new subs.LambdaSubscription(fn, { })); ``` -### DLQ setup for SNS Subscription +## DLQ setup for SNS Subscription + CDK can attach provided Queue as DLQ for your SNS subscription. See the [SNS DLQ configuration docs](https://docs.aws.amazon.com/sns/latest/dg/sns-configure-dead-letter-queue.html) for more information about this feature. @@ -97,7 +102,7 @@ new sns.Subscription(stack, 'Subscription', { }); ``` -### CloudWatch Event Rule Target +## CloudWatch Event Rule Target SNS topics can be used as targets for CloudWatch event rules. diff --git a/packages/@aws-cdk/aws-sqs/README.md b/packages/@aws-cdk/aws-sqs/README.md index 2238a07445eec..a66e03a07aa20 100644 --- a/packages/@aws-cdk/aws-sqs/README.md +++ b/packages/@aws-cdk/aws-sqs/README.md @@ -1,5 +1,6 @@ -## Amazon Simple Queue Service Construct Library +# Amazon Simple Queue Service Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -7,6 +8,7 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + Amazon Simple Queue Service (SQS) is a fully managed message queuing service that @@ -16,7 +18,7 @@ operating message oriented middleware, and empowers developers to focus on diffe Using SQS, you can send, store, and receive messages between software components at any volume, without losing messages or requiring other services to be available. -### Installation +## Installation Import to your project: @@ -24,7 +26,7 @@ Import to your project: import * as sqs from '@aws-cdk/aws-sqs'; ``` -### Basic usage +## Basic usage Here's how to add a basic queue to your application: @@ -33,7 +35,7 @@ Here's how to add a basic queue to your application: new sqs.Queue(this, 'Queue'); ``` -### Encryption +## Encryption If you want to encrypt the queue contents, set the `encryption` property. You can have the messages encrypted with a key that SQS manages for you, or a key that you @@ -54,7 +56,7 @@ new sqs.Queue(this, 'Queue', { }); ``` -### First-In-First-Out (FIFO) queues +## First-In-First-Out (FIFO) queues FIFO queues give guarantees on the order in which messages are dequeued, and have additional features in order to help guarantee exactly-once processing. For more information, see diff --git a/packages/@aws-cdk/aws-ssm/README.md b/packages/@aws-cdk/aws-ssm/README.md index 482aede27c9be..2a47ba47c2529 100644 --- a/packages/@aws-cdk/aws-ssm/README.md +++ b/packages/@aws-cdk/aws-ssm/README.md @@ -1,5 +1,6 @@ -## AWS Systems Manager Construct Library +# AWS Systems Manager Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -7,11 +8,13 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. -### Installation +## Installation + Install the module: ```console @@ -24,14 +27,14 @@ Import it into your code: import * as ssm from '@aws-cdk/aws-ssm'; ``` -### Using existing SSM Parameters in your CDK app +## Using existing SSM Parameters in your CDK app You can reference existing SSM Parameter Store values that you want to use in your CDK app by using `ssm.ParameterStoreString`: [using SSM parameter](test/integ.parameter-store-string.lit.ts) -### Creating new SSM Parameters in your CDK app +## Creating new SSM Parameters in your CDK app You can create either `ssm.StringParameter` or `ssm.StringListParameter`s in a CDK app. These are public (not secret) values. Parameters of type diff --git a/packages/@aws-cdk/aws-sso/README.md b/packages/@aws-cdk/aws-sso/README.md index 474dcd0d59dfa..8da757ee4994c 100644 --- a/packages/@aws-cdk/aws-sso/README.md +++ b/packages/@aws-cdk/aws-sso/README.md @@ -1,12 +1,16 @@ -## AWS::SSO Construct Library +# AWS::SSO Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/README.md b/packages/@aws-cdk/aws-stepfunctions-tasks/README.md index 269135eed0652..eaa556e10882c 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/README.md +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/README.md @@ -1,10 +1,12 @@ # Tasks for AWS Step Functions + --- ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + [AWS Step Functions](https://docs.aws.amazon.com/step-functions/latest/dg/welcome.html) is a web service that enables you to coordinate the diff --git a/packages/@aws-cdk/aws-stepfunctions/README.md b/packages/@aws-cdk/aws-stepfunctions/README.md index 206c6e8f0981d..1fb164cc6e8e2 100644 --- a/packages/@aws-cdk/aws-stepfunctions/README.md +++ b/packages/@aws-cdk/aws-stepfunctions/README.md @@ -1,5 +1,6 @@ -## AWS Step Functions Construct Library +# AWS Step Functions Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -7,6 +8,7 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + The `@aws-cdk/aws-stepfunctions` package contains constructs for building @@ -17,7 +19,7 @@ to call other AWS services. Defining a workflow looks like this (for the [Step Functions Job Poller example](https://docs.aws.amazon.com/step-functions/latest/dg/job-status-poller-sample.html)): -### Example +## Example ```ts import * as sfn from '@aws-cdk/aws-stepfunctions'; @@ -217,8 +219,10 @@ If your `Choice` doesn't have an `otherwise()` and none of the conditions match the JSON state, a `NoChoiceMatched` error will be thrown. Wrap the state machine in a `Parallel` state if you want to catch and recover from this. -#### Available Conditions: +#### Available Conditions + see [step function comparison operators](https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-choice-state.html#amazon-states-language-choice-state-rules) + * `Condition.isPresent` - matches if a json path is present * `Condition.isNotPresent` - matches if a json path is not present * `Condition.isString` - matches if a json path contains a string @@ -481,6 +485,7 @@ new stepfunctions.Parallel(this, 'All jobs') ``` A few utility functions are available to parse state machine fragments. + * `State.findReachableStates`: Retrieve the list of states reachable from a given state. * `State.findReachableEndStates`: Retrieve the list of end or terminal states reachable from a given state. @@ -590,13 +595,13 @@ IAM roles, users, or groups which need to be able to work with a State Machine s Any object that implements the `IGrantable` interface (has an associated principal) can be granted permissions by calling: -- `stateMachine.grantStartExecution(principal)` - grants the principal the ability to execute the state machine -- `stateMachine.grantRead(principal)` - grants the principal read access -- `stateMachine.grantTaskResponse(principal)` - grants the principal the ability to send task tokens to the state machine -- `stateMachine.grantExecution(principal, actions)` - grants the principal execution-level permissions for the IAM actions specified -- `stateMachine.grant(principal, actions)` - grants the principal state-machine-level permissions for the IAM actions specified +* `stateMachine.grantStartExecution(principal)` - grants the principal the ability to execute the state machine +* `stateMachine.grantRead(principal)` - grants the principal read access +* `stateMachine.grantTaskResponse(principal)` - grants the principal the ability to send task tokens to the state machine +* `stateMachine.grantExecution(principal, actions)` - grants the principal execution-level permissions for the IAM actions specified +* `stateMachine.grant(principal, actions)` - grants the principal state-machine-level permissions for the IAM actions specified -### Start Execution Permission +### Start Execution Permission Grant permission to start an execution of a state machine by calling the `grantStartExecution()` API. @@ -615,7 +620,7 @@ stateMachine.grantStartExecution(role); The following permission is provided to a service principal by the `grantStartExecution()` API: -- `states:StartExecution` - to state machine +* `states:StartExecution` - to state machine ### Read Permissions @@ -636,14 +641,14 @@ stateMachine.grantRead(role); The following read permissions are provided to a service principal by the `grantRead()` API: -- `states:ListExecutions` - to state machine -- `states:ListStateMachines` - to state machine -- `states:DescribeExecution` - to executions -- `states:DescribeStateMachineForExecution` - to executions -- `states:GetExecutionHistory` - to executions -- `states:ListActivities` - to `*` -- `states:DescribeStateMachine` - to `*` -- `states:DescribeActivity` - to `*` +* `states:ListExecutions` - to state machine +* `states:ListStateMachines` - to state machine +* `states:DescribeExecution` - to executions +* `states:DescribeStateMachineForExecution` - to executions +* `states:GetExecutionHistory` - to executions +* `states:ListActivities` - to `*` +* `states:DescribeStateMachine` - to `*` +* `states:DescribeActivity` - to `*` ### Task Response Permissions @@ -664,9 +669,9 @@ stateMachine.grantTaskResponse(role); The following read permissions are provided to a service principal by the `grantRead()` API: -- `states:SendTaskSuccess` - to state machine -- `states:SendTaskFailure` - to state machine -- `states:SendTaskHeartbeat` - to state machine +* `states:SendTaskSuccess` - to state machine +* `states:SendTaskFailure` - to state machine +* `states:SendTaskHeartbeat` - to state machine ### Execution-level Permissions diff --git a/packages/@aws-cdk/aws-synthetics/README.md b/packages/@aws-cdk/aws-synthetics/README.md index 82eb6be1c27d5..53ed300db49ab 100644 --- a/packages/@aws-cdk/aws-synthetics/README.md +++ b/packages/@aws-cdk/aws-synthetics/README.md @@ -1,17 +1,24 @@ -## Amazon CloudWatch Synthetics Construct Library - +# Amazon CloudWatch Synthetics Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib ![cdk-constructs: Developer Preview](https://img.shields.io/badge/cdk--constructs-developer--preview-informational.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are in **developer preview** before they become stable. We will only make breaking changes to address unforeseen API issues. Therefore, these APIs are not subject to [Semantic Versioning](https://semver.org/), and breaking changes will be announced in release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are in **developer preview** before they +> become stable. We will only make breaking changes to address unforeseen API issues. Therefore, +> these APIs are not subject to [Semantic Versioning](https://semver.org/), and breaking changes +> will be announced in release notes. This means that while you may use them, you may need to +> update your source code when upgrading to a newer version of this package. --- + Amazon CloudWatch Synthetics allow you to monitor your application by generating **synthetic** traffic. The traffic is produced by a **canary**: a configurable script that runs on a schedule. You configure the canary script to follow the same routes and perform the same actions as a user, which allows you to continually verify your user experience even when you don't have any traffic on your applications. @@ -20,13 +27,13 @@ Amazon CloudWatch Synthetics allow you to monitor your application by generating To illustrate how to use a canary, assume your application defines the following endpoint: -```bash +```console % curl "https://api.example.com/user/books/topbook/" The Hitchhikers Guide to the Galaxy ``` -The below code defines a canary that will hit the `books/topbook` endpoint every 5 minutes: +The below code defines a canary that will hit the `books/topbook` endpoint every 5 minutes: ```ts import * as synthetics from '@aws-cdk/aws-synthetics'; @@ -85,7 +92,7 @@ To learn more about Synthetics capabilities, check out the [docs](https://docs.a To configure the script the canary executes, use the `test` property. The `test` property accepts a `Test` instance that can be initialized by the `Test` class static methods. Currently, the only implemented method is `Test.custom()`, which allows you to bring your own code. In the future, other methods will be added. `Test.custom()` accepts `code` and `handler` properties -- both are required by Synthetics to create a lambda function on your behalf. -The `synthetics.Code` class exposes static methods to bundle your code artifacts: +The `synthetics.Code` class exposes static methods to bundle your code artifacts: - `code.fromInline(code)` - specify an inline script. - `code.fromAsset(path)` - specify a .zip file or a directory in the local filesystem which will be zipped and uploaded to S3 on deployment. See the above Note for directory structure. @@ -119,21 +126,24 @@ const canary = new Canary(this, 'MyCanary', { handler: 'index.handler', // must end with '.handler' }), runtime: synthetics.Runtime.SYNTHETICS_NODEJS_2_0, -}); +}); ``` > **Note:** For `code.fromAsset()` and `code.fromBucket()`, the canary resource requires the following folder structure: ->``` ->canary/ ->├── nodejs/ -> ├── node_modules/ -> ├── .js ->``` +> +> ```plaintext +> canary/ +> ├── nodejs/ +> ├── node_modules/ +> ├── .js +> ``` +> > See Synthetics [docs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary.html). ### Alarms You can configure a CloudWatch Alarm on a canary metric. Metrics are emitted by CloudWatch automatically and can be accessed by the following APIs: + - `canary.metricSuccessPercent()` - percentage of successful canary runs over a given time - `canary.metricDuration()` - how much time each canary run takes, in seconds. - `canary.metricFailed()` - number of failed canary runs over a given time diff --git a/packages/@aws-cdk/aws-timestream/README.md b/packages/@aws-cdk/aws-timestream/README.md index 231eeb65ba599..80120fe64f2ca 100644 --- a/packages/@aws-cdk/aws-timestream/README.md +++ b/packages/@aws-cdk/aws-timestream/README.md @@ -1,12 +1,16 @@ -## AWS::Timestream Construct Library +# AWS::Timestream Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-transfer/README.md b/packages/@aws-cdk/aws-transfer/README.md index 968a06223499b..0420a5e279d0b 100644 --- a/packages/@aws-cdk/aws-transfer/README.md +++ b/packages/@aws-cdk/aws-transfer/README.md @@ -1,12 +1,16 @@ -## AWS Transfer for SFTP Construct Library +# AWS Transfer for SFTP Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-waf/README.md b/packages/@aws-cdk/aws-waf/README.md index e5d4abb34fc26..c0622ec0b0479 100644 --- a/packages/@aws-cdk/aws-waf/README.md +++ b/packages/@aws-cdk/aws-waf/README.md @@ -1,12 +1,16 @@ -## AWS Web Application Firewall Construct Library +# AWS Web Application Firewall Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-wafregional/README.md b/packages/@aws-cdk/aws-wafregional/README.md index d1846dff252c2..e2194b636bdc0 100644 --- a/packages/@aws-cdk/aws-wafregional/README.md +++ b/packages/@aws-cdk/aws-wafregional/README.md @@ -1,12 +1,16 @@ -## AWS WAF Regional Construct Library +# AWS WAF Regional Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-wafv2/README.md b/packages/@aws-cdk/aws-wafv2/README.md index 33dfa7b0b3815..0d1a5610493db 100644 --- a/packages/@aws-cdk/aws-wafv2/README.md +++ b/packages/@aws-cdk/aws-wafv2/README.md @@ -1,12 +1,16 @@ -## AWS::WAFv2 Construct Library +# AWS::WAFv2 Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/aws-workspaces/README.md b/packages/@aws-cdk/aws-workspaces/README.md index 86e1e38788829..f8fbe73f105b1 100644 --- a/packages/@aws-cdk/aws-workspaces/README.md +++ b/packages/@aws-cdk/aws-workspaces/README.md @@ -1,12 +1,16 @@ -## Amazon WorkSpaces Construct Library +# Amazon WorkSpaces Construct Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/cdk-assets-schema/README.md b/packages/@aws-cdk/cdk-assets-schema/README.md index 01fbb7c07584f..e2244353ab879 100644 --- a/packages/@aws-cdk/cdk-assets-schema/README.md +++ b/packages/@aws-cdk/cdk-assets-schema/README.md @@ -1,5 +1,6 @@ # cdk-assets-schema + --- ![Deprecated](https://img.shields.io/badge/deprecated-critical.svg?style=for-the-badge) @@ -7,6 +8,7 @@ > This API may emit warnings. Backward compatibility is not guaranteed. --- + -This schema is now part of @aws-cdk/cloud-assembly-schema. \ No newline at end of file +This schema is now part of @aws-cdk/cloud-assembly-schema. diff --git a/packages/@aws-cdk/cfnspec/README.md b/packages/@aws-cdk/cfnspec/README.md index dcfe13e36de17..59d2a3ccb549e 100644 --- a/packages/@aws-cdk/cfnspec/README.md +++ b/packages/@aws-cdk/cfnspec/README.md @@ -2,14 +2,13 @@ To update the CloudFormation spec, you can run `bump-cfnspec.sh` from a clean repo, as so - -``` +```console ./scripts/bump-cfnspec.sh ``` If you wish to only update the CFN spec, make sure to install all dependencies and build the `cfnspec` module, and then you can just run: -``` +```console yarn update ``` - diff --git a/packages/@aws-cdk/cfnspec/build-tools/create-missing-libraries.ts b/packages/@aws-cdk/cfnspec/build-tools/create-missing-libraries.ts index f02d4d12a2797..cf074e49d58f9 100644 --- a/packages/@aws-cdk/cfnspec/build-tools/create-missing-libraries.ts +++ b/packages/@aws-cdk/cfnspec/build-tools/create-missing-libraries.ts @@ -265,7 +265,7 @@ async function main() { ]); await write('README.md', [ - `## ${namespace} Construct Library`, + `# ${namespace} Construct Library`, '', '---', '', diff --git a/packages/@aws-cdk/cloud-assembly-schema/README.md b/packages/@aws-cdk/cloud-assembly-schema/README.md index 8429cfc5d880b..c91769b1de3f9 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/README.md +++ b/packages/@aws-cdk/cloud-assembly-schema/README.md @@ -1,10 +1,12 @@ -## Cloud Assembly Schema +# Cloud Assembly Schema + --- ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. @@ -19,6 +21,7 @@ Its essentially a set of files and directories, one of which is the `manifest.js needed in order to deploy the assembly directory. > For example, when `cdk deploy` is executed, the CLI reads this file and performs its instructions: +> > - Build container images. > - Upload assets. > - Deploy CloudFormation templates. @@ -57,4 +60,4 @@ cannot be guaranteed because some instructions will be ignored. ## Contributing -See [Contribution Guide](./CONTRIBUTING.md) \ No newline at end of file +See [Contribution Guide](./CONTRIBUTING.md) diff --git a/packages/@aws-cdk/cloudformation-diff/README.md b/packages/@aws-cdk/cloudformation-diff/README.md index ff8c570eb00e8..678bc2c9ba0d2 100644 --- a/packages/@aws-cdk/cloudformation-diff/README.md +++ b/packages/@aws-cdk/cloudformation-diff/README.md @@ -1,12 +1,18 @@ -## Utilities to diff AWS CDK stacks against CloudFormation templates +# Utilities to diff AWS CDK stacks against CloudFormation templates + --- ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/cloudformation-include/README.md b/packages/@aws-cdk/cloudformation-include/README.md index 0e2324128c2c3..e72e92e3b4425 100644 --- a/packages/@aws-cdk/cloudformation-include/README.md +++ b/packages/@aws-cdk/cloudformation-include/README.md @@ -1,13 +1,18 @@ # Include CloudFormation templates in the CDK - + --- ![cdk-constructs: Developer Preview](https://img.shields.io/badge/cdk--constructs-developer--preview-informational.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are in **developer preview** before they become stable. We will only make breaking changes to address unforeseen API issues. Therefore, these APIs are not subject to [Semantic Versioning](https://semver.org/), and breaking changes will be announced in release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are in **developer preview** before they +> become stable. We will only make breaking changes to address unforeseen API issues. Therefore, +> these APIs are not subject to [Semantic Versioning](https://semver.org/), and breaking changes +> will be announced in release notes. This means that while you may use them, you may need to +> update your source code when upgrading to a newer version of this package. --- + This module contains a set of classes whose goal is to facilitate working @@ -45,7 +50,7 @@ Resources: It can be included in a CDK application with the following code: -```typescript +```ts import * as cfn_inc from '@aws-cdk/cloudformation-include'; const cfnTemplate = new cfn_inc.CfnInclude(this, 'Template', { @@ -55,7 +60,7 @@ const cfnTemplate = new cfn_inc.CfnInclude(this, 'Template', { Or, if your template uses YAML: -```typescript +```ts const cfnTemplate = new cfn_inc.CfnInclude(this, 'Template', { templateFile: 'my-template.yaml', }); @@ -81,7 +86,7 @@ Any resource from the included template can be retrieved by referring to it by i If you know the class of the CDK object that corresponds to that resource, you can cast the returned object to the correct type: -```typescript +```ts import * as s3 from '@aws-cdk/aws-s3'; const cfnBucket = cfnTemplate.getResource('Bucket') as s3.CfnBucket; @@ -97,7 +102,7 @@ and so cannot be cast to a different resource type. Any modifications made to that resource will be reflected in the resulting CDK template; for example, the name of the bucket can be changed: -```typescript +```ts cfnBucket.bucketName = 'my-bucket-name'; ``` @@ -106,7 +111,7 @@ including the higher-level ones (those whose name does not start with `Cfn`), for example: -```typescript +```ts import * as iam from '@aws-cdk/aws-iam'; const role = new iam.Role(this, 'Role', { @@ -121,7 +126,7 @@ role.addToPolicy(new iam.PolicyStatement({ If you need, you can also convert the CloudFormation resource to a higher-level resource by importing it: -```typescript +```ts const bucket = s3.Bucket.fromBucketName(this, 'L2Bucket', cfnBucket.ref); // bucket is of type s3.IBucket ``` @@ -133,44 +138,44 @@ you can also retrieve and mutate all other template elements: * [Parameters](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html): - ```typescript + ```ts import * as core from '@aws-cdk/core'; - + const param: core.CfnParameter = cfnTemplate.getParameter('MyParameter'); - + // mutating the parameter param.default = 'MyDefault'; ``` * [Conditions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/conditions-section-structure.html): - ```typescript + ```ts import * as core from '@aws-cdk/core'; - + const condition: core.CfnCondition = cfnTemplate.getCondition('MyCondition'); - + // mutating the condition condition.expression = core.Fn.conditionEquals(1, 2); ``` * [Mappings](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/mappings-section-structure.html): - ```typescript + ```ts import * as core from '@aws-cdk/core'; - + const mapping: core.CfnMapping = cfnTemplate.getMapping('MyMapping'); - + // mutating the mapping mapping.setValue('my-region', 'AMI', 'ami-04681a1dbd79675a5'); ``` * [Service Catalog template Rules](https://docs.aws.amazon.com/servicecatalog/latest/adminguide/reference-template_constraint_rules.html): - ```typescript + ```ts import * as core from '@aws-cdk/core'; - + const rule: core.CfnRule = cfnTemplate.getRule('MyRule'); - + // mutating the rule rule.addAssertion(core.Fn.conditionContains(['m1.small'], myParameter.value), 'MyParameter has to be m1.small'); @@ -178,22 +183,22 @@ you can also retrieve and mutate all other template elements: * [Outputs](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/outputs-section-structure.html): - ```typescript + ```ts import * as core from '@aws-cdk/core'; - + const output: core.CfnOutput = cfnTemplate.getOutput('MyOutput'); - + // mutating the output output.value = cfnBucket.attrArn; ``` * [Hooks for blue-green deployments](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/blue-green.html): - ```typescript + ```ts import * as core from '@aws-cdk/core'; - + const hook: core.CfnHook = cfnTemplate.getHook('MyOutput'); - + // mutating the hook const codeDeployHook = hook as core.CfnCodeDeployBlueGreenHook; codeDeployHook.serviceRole = myRole.roleArn; @@ -205,7 +210,7 @@ If your existing template uses CloudFormation Parameters, you may want to remove them in favor of build-time values. You can do that using the `parameters` property: -```typescript +```ts new inc.CfnInclude(this, 'includeTemplate', { templateFile: 'path/to/my/template', parameters: { @@ -251,7 +256,7 @@ where the child template pointed to by `https://my-s3-template-source.s3.amazona You can include both the parent stack, and the nested stack in your CDK application as follows: -```typescript +```ts const parentTemplate = new inc.CfnInclude(this, 'ParentStack', { templateFile: 'path/to/my-parent-template.json', loadNestedStacks: { @@ -272,7 +277,7 @@ will be modified to point to that asset. The included nested stack can be accessed with the `getNestedStack` method: -```typescript +```ts const includedChildStack = parentTemplate.getNestedStack('ChildStack'); const childStack: core.NestedStack = includedChildStack.stack; const childTemplate: cfn_inc.CfnInclude = includedChildStack.includedTemplate; @@ -281,7 +286,7 @@ const childTemplate: cfn_inc.CfnInclude = includedChildStack.includedTemplate; Now you can reference resources from `ChildStack`, and modify them like any other included template: -```typescript +```ts const cfnBucket = childTemplate.getResource('MyBucket') as s3.CfnBucket; cfnBucket.bucketName = 'my-new-bucket-name'; diff --git a/packages/@aws-cdk/cloudformation-include/lib/cfn-include.ts b/packages/@aws-cdk/cloudformation-include/lib/cfn-include.ts index 7c3c36de9196a..5a54d36aefcc8 100644 --- a/packages/@aws-cdk/cloudformation-include/lib/cfn-include.ts +++ b/packages/@aws-cdk/cloudformation-include/lib/cfn-include.ts @@ -1,6 +1,6 @@ import * as core from '@aws-cdk/core'; -import { Construct } from 'constructs'; import * as cfn_parse from '@aws-cdk/core/lib/cfn-parse'; +import { Construct } from 'constructs'; import * as cfn_type_to_l1_mapping from './cfn-type-to-l1-mapping'; import * as futils from './file-utils'; diff --git a/packages/@aws-cdk/core/README.md b/packages/@aws-cdk/core/README.md index 92ad2b49dc84f..ffa333cd0634f 100644 --- a/packages/@aws-cdk/core/README.md +++ b/packages/@aws-cdk/core/README.md @@ -1,5 +1,6 @@ -## AWS Cloud Development Kit Core Library +# AWS Cloud Development Kit Core Library + --- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) @@ -7,6 +8,7 @@ ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + This library includes the basic building blocks of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) (AWS CDK). It defines the core classes that are used in the rest of the @@ -152,10 +154,10 @@ const secret = SecretValue.secretsManager('secretId', { Using AWS Secrets Manager is the recommended way to reference secrets in a CDK app. `SecretValue` also supports the following secret sources: - * `SecretValue.plainText(secret)`: stores the secret as plain text in your app and the resulting template (not recommended). - * `SecretValue.ssmSecure(param, version)`: refers to a secret stored as a SecureString in the SSM Parameter Store. - * `SecretValue.cfnParameter(param)`: refers to a secret passed through a CloudFormation parameter (must have `NoEcho: true`). - * `SecretValue.cfnDynamicReference(dynref)`: refers to a secret described by a CloudFormation dynamic reference (used by `ssmSecure` and `secretsManager`). + - `SecretValue.plainText(secret)`: stores the secret as plain text in your app and the resulting template (not recommended). + - `SecretValue.ssmSecure(param, version)`: refers to a secret stored as a SecureString in the SSM Parameter Store. + - `SecretValue.cfnParameter(param)`: refers to a secret passed through a CloudFormation parameter (must have `NoEcho: true`). + - `SecretValue.cfnDynamicReference(dynref)`: refers to a secret described by a CloudFormation dynamic reference (used by `ssmSecure` and `secretsManager`). ## ARN manipulation @@ -240,13 +242,13 @@ between two stacks by using the `stackA.addDependency(stackB)` method. A stack dependency has the following implications: -* Cyclic dependencies are not allowed, so if `stackA` is using resources from +- Cyclic dependencies are not allowed, so if `stackA` is using resources from `stackB`, the reverse is not possible anymore. -* Stacks with dependencies between them are treated specially by the CDK +- Stacks with dependencies between them are treated specially by the CDK toolkit: - * If `stackA` depends on `stackB`, running `cdk deploy stackA` will also + - If `stackA` depends on `stackB`, running `cdk deploy stackA` will also automatically deploy `stackB`. - * `stackB`'s deployment will be performed *before* `stackA`'s deployment. + - `stackB`'s deployment will be performed *before* `stackA`'s deployment. ## Custom Resources @@ -774,6 +776,7 @@ new CfnInclude(this, 'ID', { ``` ### Termination Protection + You can prevent a stack from being accidentally deleted by enabling termination protection on the stack. If a user attempts to delete a stack with termination protection enabled, the deletion fails and the stack--including its status--remains diff --git a/packages/@aws-cdk/custom-resources/README.md b/packages/@aws-cdk/custom-resources/README.md index 44f9e01bef5e3..0be6398f162c0 100644 --- a/packages/@aws-cdk/custom-resources/README.md +++ b/packages/@aws-cdk/custom-resources/README.md @@ -1,10 +1,12 @@ # AWS CDK Custom Resources + --- ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + ## Provider Framework @@ -195,7 +197,7 @@ must return this name in `PhysicalResourceId` and make sure to handle replacement properly. The `S3File` example demonstrates this through the `objectKey` property. -### Error Handling +### Handling Provider Framework Error As mentioned above, if any of the user handlers fail (i.e. throws an exception) or times out (due to their AWS Lambda timing out), the framework will trap these @@ -211,15 +213,15 @@ When AWS CloudFormation receives a "FAILED" response, it will attempt to roll back the stack to it's last state. This has different meanings for different lifecycle events: -- If a `Create` event fails, the resource provider framework will automatically +* If a `Create` event fails, the resource provider framework will automatically ignore the subsequent `Delete` operation issued by AWS CloudFormation. The framework currently does not support customizing this behavior (see https://github.com/aws/aws-cdk/issues/5524). -- If an `Update` event fails, CloudFormation will issue an additional `Update` +* If an `Update` event fails, CloudFormation will issue an additional `Update` with the previous properties. -- If a `Delete` event fails, CloudFormation will abandon this resource. +* If a `Delete` event fails, CloudFormation will abandon this resource. -### Execution Policy +### Provider Framework Execution Policy Similarly to any AWS Lambda function, if the user-defined handlers require access to AWS resources, you will have to define these permissions @@ -254,7 +256,7 @@ implement an [asynchronous provider](#asynchronous-providers-iscomplete), and then configure the timeouts for the asynchronous retries through the `queryInterval` and the `totalTimeout` options. -### Examples +### Provider Framework Examples This module includes a few examples for custom resource implementations: @@ -280,12 +282,12 @@ new S3File(this, 'MyFile', { This sample demonstrates the following concepts: -- Synchronous implementation (`isComplete` is not defined) -- Automatically generates the physical name if `objectKey` is not defined -- Handles physical name changes -- Returns resource attributes -- Handles deletions -- Implemented in TypeScript +* Synchronous implementation (`isComplete` is not defined) +* Automatically generates the physical name if `objectKey` is not defined +* Handles physical name changes +* Returns resource attributes +* Handles deletions +* Implemented in TypeScript #### S3Assert @@ -304,9 +306,9 @@ new S3Assert(this, 'AssertMyFile', { This sample demonstrates the following concepts: -- Asynchronous implementation -- Non-intrinsic physical IDs -- Implemented in Python +* Asynchronous implementation +* Non-intrinsic physical IDs +* Implemented in Python ## Custom Resources for AWS APIs @@ -332,14 +334,14 @@ in the Lambda function implementing the custom resource. The installation takes seconds. If you prefer to optimize for speed, you can disable the installation by setting the `installLatestAwsSdk` prop to `false`. -### Execution Policy +### Custom Resource Execution Policy You must provide the `policy` property defining the IAM Policy that will be applied to the API calls. The library provides two factory methods to quickly configure this: -- **`AwsCustomResourcePolicy.fromSdkCalls`** - Use this to auto-generate IAM Policy statements based on the configured SDK calls. +* **`AwsCustomResourcePolicy.fromSdkCalls`** - Use this to auto-generate IAM Policy statements based on the configured SDK calls. Note that you will have to either provide specific ARN's, or explicitly use `AwsCustomResourcePolicy.ANY_RESOURCE` to allow access to any resource. -- **`AwsCustomResourcePolicy.fromStatements`** - Use this to specify your own custom statements. +* **`AwsCustomResourcePolicy.fromStatements`** - Use this to specify your own custom statements. The custom resource also implements `iam.IGrantable`, making it possible to use the `grantXxx()` methods. @@ -348,6 +350,7 @@ that the function's role will eventually accumulate the permissions/grants from resources. Chained API calls can be achieved by creating dependencies: + ```ts const awsCustom1 = new AwsCustomResource(this, 'API1', { onCreate: { @@ -372,9 +375,10 @@ const awsCustom2 = new AwsCustomResource(this, 'API2', { ``` ### Physical Resource Id Parameter + Some AWS APIs may require passing the physical resource id in as a parameter for doing updates and deletes. You can pass it by using `PhysicalResourceIdReference`. -``` +```ts const awsCustom = new AwsCustomResource(this, '...', { onCreate: { service: '...', @@ -396,7 +400,7 @@ const awsCustom = new AwsCustomResource(this, '...', { }) ``` -### Error Handling +### Handling Custom Resource Errors Every error produced by the API call is treated as is and will cause a "FAILED" response to be submitted to CloudFormation. You can ignore some errors by specifying the `ignoreErrorCodesMatching` property, which accepts a regular expression that is @@ -404,12 +408,13 @@ tested against the `code` property of the response. If matched, a "SUCCESS" resp Note that in such a case, the call response data and the `Data` key submitted to CloudFormation would both be an empty JSON object. Since a successful resource provisioning might or might not produce outputs, this presents us with some limitations: -- `PhysicalResourceId.fromResponse` - Since the call response data might be empty, we cannot use it to extract the physical id. -- `getResponseField` and `getResponseFieldReference` - Since the `Data` key is empty, the resource will not have any attributes, and therefore, invoking these functions will result in an error. +* `PhysicalResourceId.fromResponse` - Since the call response data might be empty, we cannot use it to extract the physical id. +* `getResponseField` and `getResponseFieldReference` - Since the `Data` key is empty, the resource will not have any attributes, and therefore, invoking these functions will result in an error. In both the cases, you will get a synth time error if you attempt to use it in conjunction with `ignoreErrorCodesMatching`. ### Customizing the Lambda function implementing the custom resource + Use the `role`, `timeout`, `logRetention` and `functionName` properties to customize the Lambda function implementing the custom resource: @@ -423,7 +428,7 @@ new AwsCustomResource(this, 'Customized', { }) ``` -### Examples +### Custom Resource Examples #### Verify a domain with SES @@ -467,9 +472,6 @@ const getParameter = new AwsCustomResource(this, 'GetParameter', { getParameter.getResponseField('Parameter.Value') ``` - - --- This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. - diff --git a/packages/@aws-cdk/cx-api/README.md b/packages/@aws-cdk/cx-api/README.md index 989733d31bfeb..e0983d9d8e092 100644 --- a/packages/@aws-cdk/cx-api/README.md +++ b/packages/@aws-cdk/cx-api/README.md @@ -1,12 +1,18 @@ -## Cloud Executable API +# Cloud Executable API + --- ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/example-construct-library/README.md b/packages/@aws-cdk/example-construct-library/README.md index 74a34f0a2c484..441e0a75bec6e 100644 --- a/packages/@aws-cdk/example-construct-library/README.md +++ b/packages/@aws-cdk/example-construct-library/README.md @@ -1,6 +1,7 @@ -## An example Construct Library module +# An example Construct Library module + --- ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) @@ -8,6 +9,7 @@ > The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. --- + This package contains an example CDK construct library diff --git a/packages/@aws-cdk/pipelines/README.md b/packages/@aws-cdk/pipelines/README.md index 42b0a435242e1..58064177abf74 100644 --- a/packages/@aws-cdk/pipelines/README.md +++ b/packages/@aws-cdk/pipelines/README.md @@ -1,14 +1,19 @@ # CDK Pipelines + --- ![cdk-constructs: Developer Preview](https://img.shields.io/badge/cdk--constructs-developer--preview-informational.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are in **developer preview** before they become stable. We will only make breaking changes to address unforeseen API issues. Therefore, these APIs are not subject to [Semantic Versioning](https://semver.org/), and breaking changes will be announced in release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are in **developer preview** before they +> become stable. We will only make breaking changes to address unforeseen API issues. Therefore, +> these APIs are not subject to [Semantic Versioning](https://semver.org/), and breaking changes +> will be announced in release notes. This means that while you may use them, you may need to +> update your source code when upgrading to a newer version of this package. --- - + A construct library for painless Continuous Delivery of CDK applications. @@ -93,9 +98,9 @@ stacks. This library uses prerelease features of the CDK framework, which can be enabled by adding the following to `cdk.json`: -``` +```js { - ... + // ... "context": { "@aws-cdk/core:newStyleStackSynthesis": true } @@ -214,7 +219,7 @@ bootstrapped (see below), and then executing deploying the `PipelineStack` Run the following commands to get the pipeline going: -``` +```console $ git commit -a $ git push $ cdk deploy PipelineStack @@ -341,7 +346,7 @@ testingStage.addApplication(new MyApplication2(this, 'MyApp2', { })); ``` -Even more, adding a manual approval action or reserving space for some extra sequential actions +Even more, adding a manual approval action or reserving space for some extra sequential actions between 'Prepare' and 'Execute' ChangeSet actions is possible. ```ts @@ -568,7 +573,7 @@ off temporarily, by passing `selfMutating: false` property, example: ```ts const pipeline = new CdkPipeline(this, 'Pipeline', { selfMutating: false, - ... + ... }); ``` @@ -604,7 +609,7 @@ also have to bootstrap those and be sure to add a *trust* relationship. To bootstrap an environment for provisioning the pipeline: -``` +```console $ env CDK_NEW_BOOTSTRAP=1 npx cdk bootstrap \ [--profile admin-profile-1] \ --cloudformation-execution-policies arn:aws:iam::aws:policy/AdministratorAccess \ @@ -614,7 +619,7 @@ $ env CDK_NEW_BOOTSTRAP=1 npx cdk bootstrap \ To bootstrap a different environment for deploying CDK applications into using a pipeline in account `111111111111`: -``` +```console $ env CDK_NEW_BOOTSTRAP=1 npx cdk bootstrap \ [--profile admin-profile-2] \ --cloudformation-execution-policies arn:aws:iam::aws:policy/AdministratorAccess \ @@ -695,7 +700,7 @@ Here are some common errors you may encounter while using this library. If you see the following error during deployment of your pipeline: -``` +```plaintext CREATE_FAILED | AWS::CodePipeline::Pipeline | Pipeline/Pipeline Internal Failure ``` @@ -707,7 +712,7 @@ right permissions to access the repository you're trying to access. If you see the following error during deployment of your pipeline: -``` +```plaintext CREATE_FAILED | AWS::KMS::Key | Pipeline/Pipeline/ArtifactsBucketEncryptionKey Policy contains a statement with one or more invalid principals. ``` @@ -716,11 +721,11 @@ One of the target (account, region) environments has not been bootstrapped with the new bootstrap stack. Check your target environments and make sure they are all bootstrapped. -### is in ROLLBACK_COMPLETE state and can not be updated. +### is in ROLLBACK_COMPLETE state and can not be updated If you see the following error during execution of your pipeline: -``` +```plaintext Stack ... is in ROLLBACK_COMPLETE state and can not be updated. (Service: AmazonCloudFormation; Status Code: 400; Error Code: ValidationError; Request ID: ...) @@ -741,14 +746,14 @@ Limitations that we are aware of and will address: There are some usability issues that are caused by underlying technology, and cannot be remedied by CDK at this point. They are reproduced here for completeness. -- **Console links to other accounts will not work**: the AWS CodePipeline +* **Console links to other accounts will not work**: the AWS CodePipeline console will assume all links are relative to the current account. You will not be able to use the pipeline console to click through to a CloudFormation stack in a different account. -- **If a change set failed to apply the pipeline must restarted**: if a change +* **If a change set failed to apply the pipeline must restarted**: if a change set failed to apply, it cannot be retried. The pipeline must be restarted from the top by clicking **Release Change**. -- **A stack that failed to create must be deleted manually**: if a stack +* **A stack that failed to create must be deleted manually**: if a stack failed to create on the first attempt, you must delete it using the CloudFormation console before starting the pipeline again by clicking **Release Change**. diff --git a/packages/@aws-cdk/region-info/README.md b/packages/@aws-cdk/region-info/README.md index fca8a1222a8b1..07119849babb4 100644 --- a/packages/@aws-cdk/region-info/README.md +++ b/packages/@aws-cdk/region-info/README.md @@ -1,20 +1,28 @@ # AWS Region-Specific Information Directory + --- ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + ## Usage + Some information used in CDK Applications differs from one AWS region to another, such as service principals used in IAM policies, S3 static website endpoints, ... ### The `RegionInfo` class + The library offers a simple interface to obtain region specific information in the form of the `RegionInfo` class. This is the preferred way to interact with the regional information database: @@ -35,6 +43,7 @@ below and can be used to register additional data, including user-defined facts that are not available through the `RegionInfo` interface. ### Low-Level API + This library offers a primitive database of such information so that CDK constructs can easily access regional information. The `FactName` class provides a list of known fact names, which can then be used with the `RegionInfo` to @@ -51,6 +60,7 @@ const staticWebsite = regionInfo.Fact.find('ap-northeast-1', regionInfo.FactName ``` ## Supplying new or missing information + As new regions are released, it might happen that a particular fact you need is missing from the library. In such cases, the `Fact.register` method can be used to inject FactName into the database: @@ -64,6 +74,7 @@ regionInfo.Fact.register({ ``` ## Overriding incorrect information + In the event information provided by the library is incorrect, it can be overridden using the same `Fact.register` method demonstrated above, simply adding an extra boolean argument: diff --git a/packages/@aws-cdk/yaml-cfn/README.md b/packages/@aws-cdk/yaml-cfn/README.md index b4dcb167f1e58..5045163f84ce6 100644 --- a/packages/@aws-cdk/yaml-cfn/README.md +++ b/packages/@aws-cdk/yaml-cfn/README.md @@ -1,13 +1,18 @@ -## CloudFormation YAML utilities - +# CloudFormation YAML utilities + --- ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + This module contains utilities for parsing and emitting diff --git a/packages/@monocdk-experiment/rewrite-imports/README.md b/packages/@monocdk-experiment/rewrite-imports/README.md index 1255d2913afb6..9b705523ef4b8 100644 --- a/packages/@monocdk-experiment/rewrite-imports/README.md +++ b/packages/@monocdk-experiment/rewrite-imports/README.md @@ -1,12 +1,18 @@ # @monocdk-experiment/rewrite-imports + --- ![cdk-constructs: Developer Preview](https://img.shields.io/badge/cdk--constructs-developer--preview-informational.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are in **developer preview** before they become stable. We will only make breaking changes to address unforeseen API issues. Therefore, these APIs are not subject to [Semantic Versioning](https://semver.org/), and breaking changes will be announced in release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are in **developer preview** before they +> become stable. We will only make breaking changes to address unforeseen API issues. Therefore, +> these APIs are not subject to [Semantic Versioning](https://semver.org/), and breaking changes +> will be announced in release notes. This means that while you may use them, you may need to +> update your source code when upgrading to a newer version of this package. --- + Migrate TypeScript `import` statements from modular CDK (i.e. `@aws-cdk/aws-s3`) to mono-cdk (i.e. `monocdk/aws-s3`); @@ -17,4 +23,4 @@ Usage: $ rewrite-imports lib/**/*.ts ``` -NOTE: `node_modules` and `*.d.ts` files are ignored. \ No newline at end of file +NOTE: `node_modules` and `*.d.ts` files are ignored. diff --git a/packages/@monocdk-experiment/rewrite-imports/bin/rewrite-imports.ts b/packages/@monocdk-experiment/rewrite-imports/bin/rewrite-imports.ts index fe70da35a582b..42dd59f43ad43 100644 --- a/packages/@monocdk-experiment/rewrite-imports/bin/rewrite-imports.ts +++ b/packages/@monocdk-experiment/rewrite-imports/bin/rewrite-imports.ts @@ -1,8 +1,8 @@ /* eslint-disable no-console */ import * as fs from 'fs'; +import { promisify } from 'util'; import * as _glob from 'glob'; -import { promisify } from 'util'; import { rewriteImports } from '../lib/rewrite'; const glob = promisify(_glob); diff --git a/packages/@monocdk-experiment/rewrite-imports/package.json b/packages/@monocdk-experiment/rewrite-imports/package.json index ddb0a7bbf5671..ee88c8d1f9074 100644 --- a/packages/@monocdk-experiment/rewrite-imports/package.json +++ b/packages/@monocdk-experiment/rewrite-imports/package.json @@ -11,6 +11,7 @@ "build": "cdk-build", "watch": "cdk-watch", "test": "cdk-test", + "lint": "cdk-lint", "pkglint": "pkglint -f", "package": "cdk-package", "build+test+package": "npm run build+test && npm run package", diff --git a/packages/aws-cdk-lib/README.md b/packages/aws-cdk-lib/README.md index de21ae0684304..d7b2d367ad94b 100644 --- a/packages/aws-cdk-lib/README.md +++ b/packages/aws-cdk-lib/README.md @@ -18,6 +18,7 @@ To use this package, you need to declare this package and the `constructs` packa dependencies. According to the kind of project you are developing: + - For projects that are CDK libraries, declare them both under the `devDependencies` **and** `peerDependencies` sections. - For CDK apps, declare them under the `dependencies` section only. diff --git a/packages/aws-cdk/README.md b/packages/aws-cdk/README.md index ee81fae4afb1d..64b542ed4b2fd 100644 --- a/packages/aws-cdk/README.md +++ b/packages/aws-cdk/README.md @@ -1,10 +1,12 @@ -## AWS CDK Toolkit +# AWS CDK Toolkit + --- ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- + The AWS CDK Toolkit provides the `cdk` command-line interface that can be used to work with AWS CDK applications. @@ -23,8 +25,10 @@ Command | Description This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. -### Commands -#### `cdk docs` +## Commands + +### `cdk docs` + Outputs the URL to the documentation for the current toolkit version, and attempts to open a browser to that URL. ```console @@ -37,7 +41,8 @@ $ cdk docs --browser='chrome %u' https://docs.aws.amazon.com/cdk/api/latest/ ``` -#### `cdk init` +### `cdk init` + Creates a new CDK project. ```console @@ -55,7 +60,8 @@ $ # Create a new library application in typescript $ cdk init lib --language=typescript ``` -#### `cdk list` +### `cdk list` + Lists the stacks modeled in the CDK app. ```console @@ -87,7 +93,8 @@ $ cdk list --app='node bin/main.js' --long region: bermuda-triangle-3 ``` -#### `cdk synthesize` +### `cdk synthesize` + Synthesizes the CDK app and produces a cloud assembly to a designated output (defaults to `cdk.out`) Typically you don't interact directly with cloud assemblies. They are files that include everything @@ -114,7 +121,8 @@ See the [AWS Documentation](https://docs.aws.amazon.com/cdk/latest/guide/apps.ht See the [CDK reference documentation](https://docs.aws.amazon.com/cdk/api/latest/docs/cloud-assembly-schema-readme.html) for details on the cloud assembly specification -#### `cdk diff` +### `cdk diff` + Computes differences between the infrastructure specified in the current state of the CDK app and the currently deployed application (or a user-specified CloudFormation template). This command returns non-zero if any differences are found. @@ -127,7 +135,8 @@ $ # Diff against a specific template document $ cdk diff --app='node bin/main.js' MyStackName --template=path/to/template.yml ``` -#### `cdk deploy` +### `cdk deploy` + Deploys a stack of your CDK app to it's environment. During the deployment, the toolkit will output progress indications, similar to what can be observed in the AWS CloudFormation Console. If the environment was never bootstrapped (using `cdk bootstrap`), only stacks that are not using assets and synthesize to a template that is under @@ -142,15 +151,15 @@ currently deployed stack to the template and tags that are about to be deployed will skip deployment if they are identical. Use `--force` to override this behavior and always deploy the stack. -##### Deploying multiple stacks +#### Deploying multiple stacks You can have multiple stacks in a cdk app. An example can be found in [how to create multiple stacks](https://docs.aws.amazon.com/cdk/latest/guide/stack_how_to_create_multiple_stacks.html). In order to deploy them, you can list the stacks you want to deploy. -If you want to deploy all of them, you can use the flag `--all` or the wildcard `*` to deploy all stacks in an app. +If you want to deploy all of them, you can use the flag `--all` or the wildcard `*` to deploy all stacks in an app. -##### Parameters +#### Parameters Pass parameters to your template during deployment by using `--parameters (STACK:KEY=VALUE)`. This will apply the value `VALUE` to the key `KEY` for stack `STACK`. @@ -158,6 +167,7 @@ Pass parameters to your template during deployment by using `--parameters Example of providing an attribute value for an SNS Topic through a parameter in TypeScript: Usage of parameter in CDK Stack: + ```ts new sns.Topic(this, 'TopicParameter', { topicName: new cdk.CfnParameter(this, 'TopicNameParam').value.toString() @@ -165,12 +175,14 @@ new sns.Topic(this, 'TopicParameter', { ``` Parameter values as a part of `cdk deploy` + ```console $ cdk deploy --parameters "MyStackName:TopicNameParam=parameterized" ``` Parameter values can be overwritten by supplying the `--force` flag. Example of overwriting the topic name from a previous deployment. + ```console $ cdk deploy --parameters "ParametersStack:TopicNameParam=blahagain" --force ``` @@ -181,13 +193,14 @@ Parameters provided to Stacks that do not make use of the parameter will not suc ⚠️ Parameters do not propagate to NestedStacks. These must be sent with the constructor. See Nested Stack [documentation](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-cloudformation.NestedStack.html) -##### Outputs +#### Outputs Write stack outputs from deployments into a file. When your stack finishes deploying, all stack outputs will be written to the output file as JSON. Usage of output in a CDK stack -```typescript + +```ts const fn = new lambda.Function(this, "fn", { handler: "index.handler", code: lambda.Code.fromInline(`exports.handler = \${handler.toString()}`), @@ -206,6 +219,7 @@ $ cdk deploy --outputs-file outputs.json ``` When the stack finishes deployment, `outputs.json` would look like this: + ```json { "MyStack": { @@ -226,6 +240,7 @@ $ cdk deploy '*' --outputs-file "/Users/code/myproject/outputs.json" ``` Example `outputs.json` after deployment of multiple stacks + ```json { "MyStack": { @@ -237,12 +252,13 @@ Example `outputs.json` after deployment of multiple stacks } ``` -##### Deployment Progress +#### Deployment Progress By default, stack deployment events are displayed as a progress bar with the events for the resource currently being deployed. Set the `--progress` flag to request the complete history which includes all CloudFormation events + ```console $ cdk deploy --progress events ``` @@ -251,7 +267,8 @@ Alternatively, the `progress` key can be specified in the project config (`cdk.j The following shows a sample `cdk.json` where the `progress` key is set to *events*. When `cdk deploy` is executed, deployment events will include the complete history. -``` + +```json { "app": "npx ts-node bin/myproject.ts", "context": { @@ -262,9 +279,11 @@ When `cdk deploy` is executed, deployment events will include the complete histo "progress": "events" } ``` + The `progress` key can also be specified as a user setting (`~/.cdk.json`) -#### `cdk destroy` +### `cdk destroy` + Deletes a stack from it's environment. This will cause the resources in the stack to be destroyed (unless they were configured with a `DeletionPolicy` of `Retain`). During the stack destruction, the command will output progress information similar to what `cdk deploy` provides. @@ -273,7 +292,8 @@ information similar to what `cdk deploy` provides. $ cdk destroy --app='node bin/main.js' MyStackName ``` -#### `cdk bootstrap` +### `cdk bootstrap` + Deploys a `CDKToolkit` CloudFormation stack into the specified environment(s), that provides an S3 bucket that `cdk deploy` will use to store synthesized templates and the related assets, before triggering a CloudFormation stack update. The name of the deployed stack can be configured using the `--toolkit-stack-name` argument. The S3 Bucket @@ -304,7 +324,8 @@ $ cdk bootstrap --show-template > bootstrap-template.yaml $ cdk bootstrap --template bootstrap-template.yaml ``` -#### `cdk doctor` +### `cdk doctor` + Inspect the current command-line environment and configurations, and collect information that can be useful for troubleshooting problems. It is usually a good idea to include the information provided by this command when submitting a bug report. @@ -317,17 +338,19 @@ $ cdk doctor - AWS_SDK_LOAD_CONFIG = 1 ``` -#### Bundling +### Bundling + By default asset bundling is skipped for `cdk list` and `cdk destroy`. For `cdk deploy`, `cdk diff` and `cdk synthesize` the default is to bundle assets for all stacks unless `exclusively` is specified. In this case, only the listed stacks will have their assets bundled. -### MFA support +## MFA support If `mfa_serial` is found in the active profile of the shared ini file AWS CDK will ask for token defined in the `mfa_serial`. This token will be provided to STS assume role call. Example profile in `~/.aws/config` where `mfa_serial` is used to assume role: + ```ini [profile my_assume_role_profile] source_profile=my_source_role @@ -335,15 +358,19 @@ role_arn=arn:aws:iam::123456789123:role/role_to_be_assumed mfa_serial=arn:aws:iam::123456789123:mfa/my_user ``` -### Configuration +## Configuration + On top of passing configuration through command-line arguments, it is possible to use JSON configuration files. The configuration's order of precedence is: + 1. Command-line arguments 2. Project configuration (`./cdk.json`) 3. User configuration (`~/.cdk.json`) -#### JSON Configuration files +### JSON Configuration files + Some of the interesting keys that can be used in the JSON configuration files: + ```json5 { "app": "node bin/main.js", // Command to start the CDK app (--app='node bin/main.js') @@ -356,9 +383,9 @@ Some of the interesting keys that can be used in the JSON configuration files: } ``` -#### Environment +### Environment The following environment variables affect aws-cdk: - `CDK_DISABLE_VERSION_CHECK`: If set, disable automatic check for newer versions. -- `CDK_NEW_BOOTSTRAP`: use the modern bootstrapping stack. \ No newline at end of file +- `CDK_NEW_BOOTSTRAP`: use the modern bootstrapping stack. diff --git a/packages/awslint/README.md b/packages/awslint/README.md index 126a50884297b..d51258ad7d8b0 100644 --- a/packages/awslint/README.md +++ b/packages/awslint/README.md @@ -1,14 +1,19 @@ # awslint + --- ![cdk-constructs: Developer Preview](https://img.shields.io/badge/cdk--constructs-developer--preview-informational.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are in **developer preview** before they become stable. We will only make breaking changes to address unforeseen API issues. Therefore, these APIs are not subject to [Semantic Versioning](https://semver.org/), and breaking changes will be announced in release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are in **developer preview** before they +> become stable. We will only make breaking changes to address unforeseen API issues. Therefore, +> these APIs are not subject to [Semantic Versioning](https://semver.org/), and breaking changes +> will be announced in release notes. This means that while you may use them, you may need to +> update your source code when upgrading to a newer version of this package. --- - + A linter for the AWS Construct Library's API. It reflects a construct library's module via it's `.jsii` manifest and checks that the module adheres to the [AWS diff --git a/packages/cdk-assets/README.md b/packages/cdk-assets/README.md index ac7381b7083cf..2eb10ae621947 100644 --- a/packages/cdk-assets/README.md +++ b/packages/cdk-assets/README.md @@ -1,12 +1,18 @@ # cdk-assets + --- ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. --- + A tool for publishing CDK assets to AWS environments. @@ -44,7 +50,7 @@ default [`aws-sdk`](https://github.com/aws/aws-sdk-js) implementation allows. Command-line use looks like this: -``` +```console $ cdk-assets /path/to/cdk.out [ASSET:DEST] [ASSET] [:DEST] [...] ``` @@ -58,7 +64,7 @@ asset IDs or destination IDs. An asset manifest looks like this: -``` +```json { "version": "1.22.0", "files": { diff --git a/packages/monocdk/README.md b/packages/monocdk/README.md index fe98c56b654b1..7845a38f8621e 100644 --- a/packages/monocdk/README.md +++ b/packages/monocdk/README.md @@ -11,12 +11,14 @@ An __experiment__ to bundle all of the CDK into a single module. ## Usage ### Installation + To try out `monocdk` replace all references to CDK Construct Libraries (most `@aws-cdk/*` packages) in your `package.json` file with a single entrey referring to `monocdk`. You also need to add a reference to the `constructs` library, according to the kind of project you are developing: + - For libraries, model the dependency under `devDependencies` **and** `peerDependencies` - For apps, model the dependency under `dependencies` only diff --git a/tools/cdk-build-tools/config/markdownlint.json b/tools/cdk-build-tools/config/markdownlint.json new file mode 100644 index 0000000000000..43f7b2f1f490c --- /dev/null +++ b/tools/cdk-build-tools/config/markdownlint.json @@ -0,0 +1,30 @@ +{ + "default": false, + "heading-increment": true, + "heading-style": { "style": "atx" }, + "ul-style": { "style": "consistent" }, + "list-indent": true, + "no-missing-space-atx": true, + "no-multiple-space-atx": true, + "blanks-around-headings": true, + "heading-start-left": true, + "no-duplicate-heading": true, + "single-title": true, + "no-trailing-punctuation": true, + "no-multiple-space-blockquote": true, + "no-blanks-blockquote": true, + "ol-prefix": { "style": "one_or_ordered" }, + "list-marker-space": true, + "blanks-around-fences": true, + "blanks-around-lists": true, + "no-space-in-emphasis": true, + "no-space-in-code": true, + "no-space-in-links": true, + "fenced-code-language": true, + "first-line-heading": true, + "proper-names": ["jsii"], + "no-alt-text": true, + "code-block-style": { "style": "fenced" }, + "single-trailing-newline": true, + "code-fence-style": { "style": "backtick" } +} diff --git a/tools/cdk-build-tools/lib/lint.ts b/tools/cdk-build-tools/lib/lint.ts index ca9128a4e5f82..27eae0588c828 100644 --- a/tools/cdk-build-tools/lib/lint.ts +++ b/tools/cdk-build-tools/lib/lint.ts @@ -1,21 +1,40 @@ import * as path from 'path'; +import * as process from 'process'; +import * as fs from 'fs-extra'; import { shell } from './os'; import { CDKBuildOptions, CompilerOverrides } from './package-info'; export async function lintCurrentPackage(options: CDKBuildOptions, compilers: CompilerOverrides & { fix?: boolean } = {}): Promise { const env = options.env; + const fixOption = compilers.fix ? ['--fix'] : []; + if (!options.eslint?.disable) { await shell([ compilers.eslint || require.resolve('eslint/bin/eslint'), '.', '--ext=.ts', `--resolve-plugins-relative-to=${__dirname}`, - ...compilers.fix ? ['--fix'] : [], + ...fixOption, ], { env }); } if (!options.pkglint?.disable) { - await shell(['pkglint'], { env }); + await shell([ + 'pkglint', + ...fixOption, + ], { env }); + } + + if (await fs.pathExists('README.md')) { + await shell([ + process.execPath, + ...process.execArgv, + '--', + require.resolve('markdownlint-cli'), + '--config', path.resolve(__dirname, '..', 'config', 'markdownlint.json'), + ...fixOption, + 'README.md', + ]); } await shell([path.join(__dirname, '..', 'bin', 'cdk-awslint')], { env }); diff --git a/tools/cdk-build-tools/package.json b/tools/cdk-build-tools/package.json index d6b806024eec1..be63aba66b068 100644 --- a/tools/cdk-build-tools/package.json +++ b/tools/cdk-build-tools/package.json @@ -41,17 +41,18 @@ "dependencies": { "@typescript-eslint/eslint-plugin": "^4.9.0", "@typescript-eslint/parser": "^4.7.0", - "eslint-plugin-cdk": "0.0.0", "awslint": "0.0.0", "colors": "^1.4.0", "eslint": "^7.13.0", "eslint-import-resolver-node": "^0.3.4", "eslint-import-resolver-typescript": "^2.3.0", + "eslint-plugin-cdk": "0.0.0", "eslint-plugin-import": "^2.22.1", "fs-extra": "^9.0.1", "jest": "^26.6.3", "jsii": "^1.15.0", "jsii-pacmak": "^1.15.0", + "markdownlint-cli": "^0.25.0", "nodeunit": "^0.11.3", "nyc": "^15.1.0", "ts-jest": "^26.4.4", diff --git a/tools/cdk-build-tools/tsconfig.json b/tools/cdk-build-tools/tsconfig.json index 14499cd2abfaf..f6b1789bd46ad 100644 --- a/tools/cdk-build-tools/tsconfig.json +++ b/tools/cdk-build-tools/tsconfig.json @@ -7,14 +7,13 @@ "alwaysStrict": true, "declaration": true, "inlineSourceMap": true, - "inlineSources": true, "noUnusedLocals": true, "noUnusedParameters": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, "resolveJsonModule": true, "composite": true, - "incremental": true + "incremental": true, }, "include": ["**/*.ts"] } diff --git a/tools/cdk-integ-tools/README.md b/tools/cdk-integ-tools/README.md index 6e6ea17673cbe..31b50e21d9dca 100644 --- a/tools/cdk-integ-tools/README.md +++ b/tools/cdk-integ-tools/README.md @@ -7,7 +7,7 @@ If deployment succeeds, the synthesized template is saved in a local file and "locked". During build, the test app is only synthesized and compared against the checked-in file to protect against regressions. -### Setup +## Setup Create any number of files called `integ.*.ts` in your `test` directory. These should be CDK apps containing a single stack. @@ -43,7 +43,9 @@ This installs two tools into your scripts: Usage: - cdk-integ [TEST...] [--no-clean] [--verbose] +```console +cdk-integ [TEST...] [--no-clean] [--verbose] +``` Will deploy test stacks from `test/integ.*.js` and store the synthesized output under `test/integ.*.expected.json`. diff --git a/tools/pkglint/lib/banners/features-cfn-stable.md b/tools/pkglint/lib/banners/features-cfn-stable.md index a72b593f64508..fafb417eb86b3 100644 --- a/tools/pkglint/lib/banners/features-cfn-stable.md +++ b/tools/pkglint/lib/banners/features-cfn-stable.md @@ -1 +1,4 @@ -> **CFN Resources:** All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. \ No newline at end of file +> **CFN Resources:** All classes with the `Cfn` prefix in this module ([CFN Resources]) are always +> stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib diff --git a/tools/pkglint/lib/banners/features-developer-preview.md b/tools/pkglint/lib/banners/features-developer-preview.md index f60d5d7cbd00f..3bb6924e3bd33 100644 --- a/tools/pkglint/lib/banners/features-developer-preview.md +++ b/tools/pkglint/lib/banners/features-developer-preview.md @@ -1 +1,6 @@ -> **Developer Preview:** Higher level constructs in this module that are marked as developer preview have completed their phase of active development and are looking for adoption and feedback. While the same caveats around non-backward compatible as Experimental constructs apply, they will undergo fewer breaking changes. Just as with Experimental constructs, these are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. \ No newline at end of file +> **Developer Preview:** Higher level constructs in this module that are marked as developer +> preview have completed their phase of active development and are looking for adoption and +> feedback. While the same caveats around non-backward compatible as Experimental constructs apply, +> they will undergo fewer breaking changes. Just as with Experimental constructs, these are not +> subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. diff --git a/tools/pkglint/lib/banners/features-experimental.md b/tools/pkglint/lib/banners/features-experimental.md index 3d56c6c4890e9..921f47b563b99 100644 --- a/tools/pkglint/lib/banners/features-experimental.md +++ b/tools/pkglint/lib/banners/features-experimental.md @@ -1 +1,5 @@ -> **Experimental:** Higher level constructs in this module that are marked as experimental are under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. \ No newline at end of file +> **Experimental:** Higher level constructs in this module that are marked as experimental are +> under active development. They are subject to non-backward compatible changes or removal in any +> future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and +> breaking changes will be announced in the release notes. This means that while you may use them, +> you may need to update your source code when upgrading to a newer version of this package. diff --git a/tools/pkglint/lib/banners/features-stable.md b/tools/pkglint/lib/banners/features-stable.md index d104c3e06d282..b8a40e1190e00 100644 --- a/tools/pkglint/lib/banners/features-stable.md +++ b/tools/pkglint/lib/banners/features-stable.md @@ -1 +1,2 @@ -> **Stable:** Higher level constructs in this module that are marked stable will not undergo any breaking changes. They will strictly follow the [Semantic Versioning](https://semver.org/) model. \ No newline at end of file +> **Stable:** Higher level constructs in this module that are marked stable will not undergo any +> breaking changes. They will strictly follow the [Semantic Versioning](https://semver.org/) model. diff --git a/tools/pkglint/lib/banners/l1.cfn-only.md b/tools/pkglint/lib/banners/l1.cfn-only.md index bd9e5186ed7aa..266f51dc14cdd 100644 --- a/tools/pkglint/lib/banners/l1.cfn-only.md +++ b/tools/pkglint/lib/banners/l1.cfn-only.md @@ -1,3 +1,5 @@ ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib diff --git a/tools/pkglint/lib/banners/l1.developer-preview.md b/tools/pkglint/lib/banners/l1.developer-preview.md index bd9e5186ed7aa..266f51dc14cdd 100644 --- a/tools/pkglint/lib/banners/l1.developer-preview.md +++ b/tools/pkglint/lib/banners/l1.developer-preview.md @@ -1,3 +1,5 @@ ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib diff --git a/tools/pkglint/lib/banners/l1.experimental.md b/tools/pkglint/lib/banners/l1.experimental.md index bd9e5186ed7aa..266f51dc14cdd 100644 --- a/tools/pkglint/lib/banners/l1.experimental.md +++ b/tools/pkglint/lib/banners/l1.experimental.md @@ -1,3 +1,5 @@ ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib diff --git a/tools/pkglint/lib/banners/l2.developer-preview.md b/tools/pkglint/lib/banners/l2.developer-preview.md index 03e696e649dd9..22a238c9456d1 100644 --- a/tools/pkglint/lib/banners/l2.developer-preview.md +++ b/tools/pkglint/lib/banners/l2.developer-preview.md @@ -1,5 +1,9 @@ ![cdk-constructs: Developer Preview](https://img.shields.io/badge/cdk--constructs-developer--preview-informational.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are in **developer preview** before they become stable. We will only make breaking changes to address unforeseen API issues. Therefore, these APIs are not subject to [Semantic Versioning](https://semver.org/), and breaking changes will be announced in release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are in **developer preview** before they +> become stable. We will only make breaking changes to address unforeseen API issues. Therefore, +> these APIs are not subject to [Semantic Versioning](https://semver.org/), and breaking changes +> will be announced in release notes. This means that while you may use them, you may need to +> update your source code when upgrading to a newer version of this package. diff --git a/tools/pkglint/lib/banners/l2.experimental.md b/tools/pkglint/lib/banners/l2.experimental.md index 14606e1bafe53..886148b93a71d 100644 --- a/tools/pkglint/lib/banners/l2.experimental.md +++ b/tools/pkglint/lib/banners/l2.experimental.md @@ -1,3 +1,7 @@ ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. diff --git a/tools/pkglint/lib/rules.ts b/tools/pkglint/lib/rules.ts index 002b63f92cb61..1729eaef0a23d 100644 --- a/tools/pkglint/lib/rules.ts +++ b/tools/pkglint/lib/rules.ts @@ -215,13 +215,13 @@ export class ReadmeFile extends ValidationRule { fix: () => fs.writeFileSync( readmeFile, [ - `## ${headline || pkg.json.description}`, + `# ${headline || pkg.json.description}`, 'This module is part of the[AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.', ].join('\n'), ), }); } else if (headline) { - const requiredFirstLine = `## ${headline}`; + const requiredFirstLine = `# ${headline}`; const [firstLine, ...rest] = fs.readFileSync(readmeFile, { encoding: 'utf8' }).split('\n'); if (firstLine !== requiredFirstLine) { pkg.report({ @@ -323,11 +323,13 @@ export class MaturitySetting extends ValidationRule { return [ '', + '', '---', '', ...bannerLines, '', '---', + '', '', '', ].join('\n'); @@ -407,17 +409,25 @@ export class FeatureStabilityRule extends ValidationRule { return; } + const featuresColumnWitdh = Math.max( + 13, // 'CFN Resources'.length + ...pkg.json.features.map((feat: { name: string; }) => feat.name.length), + ); + const stabilityBanner: string = [ '', + '', '---', '', - '| Features | Stability |', - '| --- | --- |', - ...this.featureEntries(pkg), + `Features${' '.repeat(featuresColumnWitdh - 8)} | Stability`, + `--------${'-'.repeat(featuresColumnWitdh - 8)}-|-----------${'-'.repeat(Math.max(0, 100 - featuresColumnWitdh - 13))}`, + ...this.featureEntries(pkg, featuresColumnWitdh), '', ...this.bannerNotices(pkg), '---', + '', '', + '', ].join('\n'); const readmeFile = path.join(pkg.packageRoot, 'README.md'); @@ -437,17 +447,17 @@ export class FeatureStabilityRule extends ValidationRule { } } - private featureEntries(pkg: PackageJson): string[] { + private featureEntries(pkg: PackageJson, featuresColumnWitdh: number): string[] { const entries: string[] = []; if (pkg.json['cdk-build']?.cloudformation) { - entries.push(`| CFN Resources | ![Stable](${this.badges.Stable}) |`); + entries.push(`CFN Resources${' '.repeat(featuresColumnWitdh - 13)} | ![Stable](${this.badges.Stable})`); } pkg.json.features.forEach((feature: { [key: string]: string }) => { const badge = this.badges[feature.stability]; if (!badge) { throw new Error(`Unknown stability - ${feature.stability}`); } - entries.push(`| ${feature.name} | ![${feature.stability}](${badge}) |`); + entries.push(`${feature.name}${' '.repeat(featuresColumnWitdh - feature.name.length)} | ![${feature.stability}](${badge})`); }); return entries; } @@ -462,11 +472,15 @@ export class FeatureStabilityRule extends ValidationRule { const noticeOrder = ['Experimental', 'Developer Preview', 'Stable']; const stabilities = pkg.json.features.map((f: { [k: string]: string }) => f.stability); const filteredNotices = noticeOrder.filter(v => stabilities.includes(v)); - filteredNotices.map((notice) => { + for (const notice of filteredNotices) { + if (notices.length !== 0) { + // This delimiter helps ensure proper parsing & rendering with various parsers + notices.push('', ''); + } const lowerTrainCase = notice.toLowerCase().replace(/\s/g, '-'); notices.push(readBannerFile(`features-${lowerTrainCase}.md`)); notices.push(''); - }); + } return notices; } } @@ -1596,5 +1610,5 @@ function toRegExp(str: string): RegExp { } function readBannerFile(file: string): string { - return fs.readFileSync(path.join(__dirname, 'banners', file), { encoding: 'utf-8' }); + return fs.readFileSync(path.join(__dirname, 'banners', file), { encoding: 'utf-8' }).trim(); } diff --git a/tools/pkglint/test/rules.test.ts b/tools/pkglint/test/rules.test.ts index 767dbe81b1e1d..3169a747a08f3 100644 --- a/tools/pkglint/test/rules.test.ts +++ b/tools/pkglint/test/rules.test.ts @@ -40,10 +40,10 @@ describe('FeatureStabilityRule', () => { expect(pkgJson.hasReports).toBe(true); pkgJson.applyFixes(); const fixedContents = await fs.readFile(path.join(dirPath, 'README.md'), { encoding: 'utf8' }); - expect(fixedContents).toMatch(/Experimental Feature \| \!\[Experimental\]/); - expect(fixedContents).toMatch(/Dev Preview Feature \| \!\[Developer Preview\]/); - expect(fixedContents).toMatch(/Stable Feature \| \!\[Stable\]/); - expect(fixedContents).toMatch(/Not Implemented Feature \| \!\[Not Implemented\]/); + expect(fixedContents).toMatch(/Experimental Feature\s* \| \!\[Experimental\]/); + expect(fixedContents).toMatch(/Dev Preview Feature\s* \| \!\[Developer Preview\]/); + expect(fixedContents).toMatch(/Stable Feature\s* \| \!\[Stable\]/); + expect(fixedContents).toMatch(/Not Implemented Feature\s* \| \!\[Not Implemented\]/); expect(fixedContents).not.toMatch(/CFN Resources/); }); diff --git a/tools/pkglint/tsconfig.json b/tools/pkglint/tsconfig.json index 14499cd2abfaf..6b870d2cb95a2 100644 --- a/tools/pkglint/tsconfig.json +++ b/tools/pkglint/tsconfig.json @@ -7,7 +7,6 @@ "alwaysStrict": true, "declaration": true, "inlineSourceMap": true, - "inlineSources": true, "noUnusedLocals": true, "noUnusedParameters": true, "noImplicitReturns": true, diff --git a/tools/pkgtools/README.md b/tools/pkgtools/README.md index 5bfda521f079d..31b20f8d98428 100644 --- a/tools/pkgtools/README.md +++ b/tools/pkgtools/README.md @@ -1,2 +1,3 @@ -## Tools for generating cross-package artifacts +# Tools for generating cross-package artifacts + This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/tools/ubergen/README.md b/tools/ubergen/README.md index 36b6249ae245c..98fbb47c7caad 100644 --- a/tools/ubergen/README.md +++ b/tools/ubergen/README.md @@ -4,4 +4,4 @@ Aggregates all individual CDK construct library modules into a single uber package. This is used in the CDK to create a monolithic package that is then -published for customers to consume. \ No newline at end of file +published for customers to consume. diff --git a/tools/ubergen/package.json b/tools/ubergen/package.json index 12c4c622f2fe4..483d7ecfa4dfa 100644 --- a/tools/ubergen/package.json +++ b/tools/ubergen/package.json @@ -14,6 +14,7 @@ "scripts": { "build": "cdk-build", "watch": "cdk-watch", + "lint": "cdk-lint", "pkglint": "pkglint -f", "test": "echo success", "build+test+package": "npm run build+test", diff --git a/yarn.lock b/yarn.lock index c8df9dd1ba3fc..359874150b0b2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -257,7 +257,7 @@ globals "^11.1.0" lodash "^4.17.19" -"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.11.0", "@babel/types@^7.12.1", "@babel/types@^7.12.5", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.0": +"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.11.0", "@babel/types@^7.12.5", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.0": version "7.12.6" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.6.tgz#ae0e55ef1cce1fbc881cd26f8234eb3e657edc96" integrity sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA== @@ -266,6 +266,15 @@ lodash "^4.17.19" to-fast-properties "^2.0.0" +"@babel/types@^7.12.1": + version "7.12.7" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.7.tgz#6039ff1e242640a29452c9ae572162ec9a8f5d13" + integrity sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ== + dependencies: + "@babel/helper-validator-identifier" "^7.10.4" + lodash "^4.17.19" + to-fast-properties "^2.0.0" + "@balena/dockerignore@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@balena/dockerignore/-/dockerignore-1.0.2.tgz#9ffe4726915251e8eb69f44ef3547e0da2c03e0d" @@ -2048,6 +2057,11 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" +app-root-path@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.2.1.tgz#d0df4a682ee408273583d43f6f79e9892624bc9a" + integrity sha512-91IFKeKk7FjfmezPKkwtaRvSpnUc4gDwPAjA1YZ9Gn0q0PPeW+vbeUsZuyDwjI7+QTHhcLen2v25fi/AmhvbJA== + append-transform@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab" @@ -2285,7 +2299,7 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" -aws-sdk@^2.637.0, aws-sdk@^2.802.0: +aws-sdk@^2.596.0, aws-sdk@^2.637.0, aws-sdk@^2.802.0: version "2.802.0" resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.802.0.tgz#7215be2437c196f1b0b39a10feffdc1d1b980a62" integrity sha512-PfjBr5Ag4PdcEYPrfMclVWk85kFSJNe7qllZBE8RhYNu+K+Z2pveKfYkC5mqYoKEYIQyI9by9N47F+Tqm1GXtg== @@ -2924,6 +2938,11 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" +commander@~6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.0.tgz#b990bfb8ac030aedc6d11bc04d1488ffef56db75" + integrity sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q== + commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -3514,6 +3533,11 @@ deep-equal@^2.0.4: which-collection "^1.0.1" which-typed-array "^1.1.2" +deep-extend@^0.6.0, deep-extend@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + deep-is@^0.1.3, deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" @@ -3713,6 +3737,16 @@ dot-prop@^5.1.0: dependencies: is-obj "^2.0.0" +dotenv-json@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/dotenv-json/-/dotenv-json-1.0.0.tgz#fc7f672aafea04bed33818733b9f94662332815c" + integrity sha512-jAssr+6r4nKhKRudQ0HOzMskOFFi9+ubXWwmrSGJFgTvpjyPXCXsCsYbjif6mXp7uxA7xY3/LGaiTQukZzSbOQ== + +dotenv@^8.0.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" + integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== + dotgitignore@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/dotgitignore/-/dotgitignore-2.1.0.tgz#a4b15a4e4ef3cf383598aaf1dfa4a04bcc089b7b" @@ -3792,7 +3826,7 @@ enquirer@^2.3.5: dependencies: ansi-colors "^4.1.1" -entities@~2.0: +entities@~2.0, entities@~2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.3.tgz#5c487e5742ab93c15abb5da22759b8590ec03b7f" integrity sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ== @@ -3936,6 +3970,11 @@ escodegen@^1.14.1, escodegen@^1.8.1: optionalDependencies: source-map "~0.6.1" +eslint-config-standard@^14.1.1: + version "14.1.1" + resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz#830a8e44e7aef7de67464979ad06b406026c56ea" + integrity sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg== + eslint-import-resolver-node@^0.3.4: version "0.3.4" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" @@ -3963,6 +4002,14 @@ eslint-module-utils@^2.6.0: debug "^2.6.9" pkg-dir "^2.0.0" +eslint-plugin-es@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893" + integrity sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ== + dependencies: + eslint-utils "^2.0.0" + regexpp "^3.0.0" + eslint-plugin-import@^2.22.1: version "2.22.1" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz#0896c7e6a0cf44109a2d97b95903c2bb689d7702" @@ -3982,11 +4029,33 @@ eslint-plugin-import@^2.22.1: resolve "^1.17.0" tsconfig-paths "^3.9.0" +eslint-plugin-node@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d" + integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g== + dependencies: + eslint-plugin-es "^3.0.0" + eslint-utils "^2.0.0" + ignore "^5.1.1" + minimatch "^3.0.4" + resolve "^1.10.1" + semver "^6.1.0" + +eslint-plugin-promise@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz#845fd8b2260ad8f82564c1222fce44ad71d9418a" + integrity sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw== + eslint-plugin-rulesdir@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/eslint-plugin-rulesdir/-/eslint-plugin-rulesdir-0.1.0.tgz#ad144d7e98464fda82963eff3fab331aecb2bf08" integrity sha1-rRRNfphGT9qClj7/P6szGuyyvwg= +eslint-plugin-standard@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.1.0.tgz#0c3bf3a67e853f8bbbc580fb4945fbf16f41b7c5" + integrity sha512-ZL7+QRixjTR6/528YNGyDotyffm5OQst/sGxKDwGb9Uqs4In5Egi4+jbobhqJoyoCM6/7v/1A5fhQ7ScMtDjaQ== + eslint-scope@^5.0.0, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -4664,6 +4733,11 @@ get-stdin@^4.0.1: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= +get-stdin@~8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-8.0.0.tgz#cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53" + integrity sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg== + get-stream@^4.0.0, get-stream@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" @@ -4789,7 +4863,7 @@ glob-to-regexp@^0.3.0: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= -glob@^7.0.0, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: +glob@^7.0.0, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@~7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -5092,7 +5166,7 @@ ignore@^4.0.3, ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.1.4, ignore@^5.1.8: +ignore@^5.1.1, ignore@^5.1.4, ignore@^5.1.8, ignore@~5.1.8: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== @@ -5174,7 +5248,7 @@ inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, i resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -ini@^1.3.2, ini@^1.3.4: +ini@^1.3.2, ini@^1.3.4, ini@~1.3.0: version "1.3.5" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== @@ -5278,7 +5352,7 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" -is-core-module@^2.0.0: +is-core-module@^2.0.0, is-core-module@^2.1.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== @@ -6092,7 +6166,7 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@^3.13.1, js-yaml@^3.2.7: +js-yaml@^3.13.1, js-yaml@^3.2.7, js-yaml@~3.14.0: version "3.14.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== @@ -6273,6 +6347,11 @@ json5@^1.0.1: dependencies: minimist "^1.2.0" +jsonc-parser@~2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.3.1.tgz#59549150b133f2efacca48fe9ce1ec0659af2342" + integrity sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg== + jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" @@ -6358,6 +6437,24 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== +lambda-leak@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lambda-leak/-/lambda-leak-2.0.0.tgz#771985d3628487f6e885afae2b54510dcfb2cd7e" + integrity sha1-dxmF02KEh/boha+uK1RRDc+yzX4= + +lambda-tester@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/lambda-tester/-/lambda-tester-3.6.0.tgz#ceb7d4f4f0da768487a05cff37dcd088508b5247" + integrity sha512-F2ZTGWCLyIR95o/jWK46V/WnOCFAEUG/m/V7/CLhPJ7PCM+pror1rZ6ujP3TkItSGxUfpJi0kqwidw+M/nEqWw== + dependencies: + app-root-path "^2.2.1" + dotenv "^8.0.0" + dotenv-json "^1.0.0" + lambda-leak "^2.0.0" + semver "^6.1.1" + uuid "^3.3.2" + vandium-utils "^1.1.1" + lazystream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" @@ -6427,6 +6524,13 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= +linkify-it@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-3.0.2.tgz#f55eeb8bc1d3ae754049e124ab3bb56d97797fb8" + integrity sha512-gDBO4aHNZS6coiZCKVhSNh43F9ioIL4JwRjLZPkoLIY4yZFwg264Y5lu2x6rb1Js42Gh6Yqm2f6L2AJcnkzinQ== + dependencies: + uc.micro "^1.0.1" + load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" @@ -6512,7 +6616,12 @@ lodash.difference@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.difference/-/lodash.difference-4.5.0.tgz#9ccb4e505d486b91651345772885a2df27fd017c" integrity sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw= -lodash.flatten@^4.4.0: +lodash.differencewith@~4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.differencewith/-/lodash.differencewith-4.5.0.tgz#bafafbc918b55154e179176a00bb0aefaac854b7" + integrity sha1-uvr7yRi1UVTheRdqALsK76rIVLc= + +lodash.flatten@^4.4.0, lodash.flatten@~4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8= @@ -6719,6 +6828,49 @@ map-visit@^1.0.0: dependencies: object-visit "^1.0.0" +markdown-it@11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-11.0.0.tgz#dbfc30363e43d756ebc52c38586b91b90046b876" + integrity sha512-+CvOnmbSubmQFSA9dKz1BRiaSMV7rhexl3sngKqFyXSagoA3fBdJQ8oZWtRy2knXdpDXaBw44euz37DeJQ9asg== + dependencies: + argparse "^1.0.7" + entities "~2.0.0" + linkify-it "^3.0.1" + mdurl "^1.0.1" + uc.micro "^1.0.5" + +markdownlint-cli@^0.25.0: + version "0.25.0" + resolved "https://registry.yarnpkg.com/markdownlint-cli/-/markdownlint-cli-0.25.0.tgz#806b2c234259fa621af27673644506d447bdb6a1" + integrity sha512-pmiXJgPQtAx6YOMXPCCO3AudMWv8Gnhfrprn0raqevofOhO95nJZ6bTEXkUVbzEwvYhvGxE0Yl888aZwuRGMGw== + dependencies: + commander "~6.2.0" + deep-extend "~0.6.0" + get-stdin "~8.0.0" + glob "~7.1.6" + ignore "~5.1.8" + js-yaml "~3.14.0" + jsonc-parser "~2.3.1" + lodash.differencewith "~4.5.0" + lodash.flatten "~4.4.0" + markdownlint "~0.21.1" + markdownlint-rule-helpers "~0.12.0" + minimatch "~3.0.4" + minimist "~1.2.5" + rc "~1.2.8" + +markdownlint-rule-helpers@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/markdownlint-rule-helpers/-/markdownlint-rule-helpers-0.12.0.tgz#c41d9b990c50911572e8eb2fba3e6975a5514b7e" + integrity sha512-Q7qfAk+AJvx82ZY52OByC4yjoQYryOZt6D8TKrZJIwCfhZvcj8vCQNuwDqILushtDBTvGFmUPq+uhOb1KIMi6A== + +markdownlint@~0.21.1: + version "0.21.1" + resolved "https://registry.yarnpkg.com/markdownlint/-/markdownlint-0.21.1.tgz#9442afcf12bf65ce9d613212028cf85741677421" + integrity sha512-8kc88w5dyEzlmOWIElp8J17qBgzouOQfJ0LhCcpBFrwgyYK6JTKvILsk4FCEkiNqHkTxwxopT2RS2DYb/10qqg== + dependencies: + markdown-it "11.0.0" + md5@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/md5/-/md5-2.3.0.tgz#c3da9a6aae3a30b46b7b0c349b87b110dc3bda4f" @@ -6728,7 +6880,7 @@ md5@^2.3.0: crypt "0.0.2" is-buffer "~1.1.6" -mdurl@~1.0.1: +mdurl@^1.0.1, mdurl@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4= @@ -6874,7 +7026,7 @@ min-indent@^1.0.0: resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== -minimatch@>=3.0, minimatch@^3.0.4: +minimatch@>=3.0, minimatch@^3.0.4, minimatch@~3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== @@ -6898,7 +7050,7 @@ minimist-options@^3.0.1: arrify "^1.0.1" is-plain-obj "^1.1.0" -minimist@>=1.2.2, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5: +minimist@>=1.2.2, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5, minimist@~1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== @@ -8129,6 +8281,16 @@ raw-body@^2.2.0: iconv-lite "0.4.24" unpipe "1.0.0" +rc@~1.2.8: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + react-is@^17.0.1: version "17.0.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.1.tgz#5b3531bd76a645a4c9fb6e693ed36419e3301339" @@ -8468,6 +8630,14 @@ resolve@^1.1.6, resolve@^1.10.0, resolve@^1.11.1, resolve@^1.13.1, resolve@^1.17 dependencies: path-parse "^1.0.6" +resolve@^1.10.1: + version "1.19.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" + integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== + dependencies: + is-core-module "^2.1.0" + path-parse "^1.0.6" + resolve@^1.18.1: version "1.18.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.18.1.tgz#018fcb2c5b207d2a6424aee361c5a266da8f4130" @@ -8625,7 +8795,7 @@ semver@7.x, semver@^7.1.1, semver@^7.2.1, semver@^7.3.2: resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== -semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: +semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -9232,6 +9402,11 @@ strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + strong-log-transformer@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz#0f5ed78d325e0421ac6f90f7f10e691d6ae3ae10" @@ -9807,6 +9982,11 @@ typescript@~3.8.3: resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== +uc.micro@^1.0.1, uc.micro@^1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" + integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== + uglify-js@^3.1.4: version "3.11.6" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.11.6.tgz#144b50d3e05eadd3ad4dd047c60ca541a8cd4e9c" @@ -9985,6 +10165,11 @@ validate-npm-package-name@^3.0.0: dependencies: builtins "^1.0.3" +vandium-utils@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/vandium-utils/-/vandium-utils-1.2.0.tgz#44735de4b7641a05de59ebe945f174e582db4f59" + integrity sha1-RHNd5LdkGgXeWevpRfF05YLbT1k= + verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" From a07b98744c5050381a95467af9de79fe2aacdfaf Mon Sep 17 00:00:00 2001 From: Titan Lin Date: Wed, 2 Dec 2020 21:09:01 +0800 Subject: [PATCH 259/314] fix(events): match values in event pattern array are not deduplicated (#11744) Since event pattern supports content filtering expression and the expression only allow one key, for example: `{ prefix: '2017-10-02' }`, we can use **JSON.stringify** instead of **deepEqual** to compare element in event pattern array. Please refer to [Content-based Filtering with Event Patterns](https://docs.aws.amazon.com/eventbridge/latest/userguide/content-filtering-with-event-patterns.html). The following screenshot is the event pattern output when I use `cloudtrail.Trail.onEvent`. First red is the example of duplicate match values. Second red is the example of prefix rule. Screen Shot 2020-12-02 at 12 26 43 AM ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-events/lib/util.ts | 6 ++- .../@aws-cdk/aws-events/test/test.rule.ts | 35 ++++++++++++++++- .../@aws-cdk/aws-events/test/test.util.ts | 38 +++++++++++++++++++ 3 files changed, 75 insertions(+), 4 deletions(-) diff --git a/packages/@aws-cdk/aws-events/lib/util.ts b/packages/@aws-cdk/aws-events/lib/util.ts index 1b1c860d7850d..345bfda4ff89e 100644 --- a/packages/@aws-cdk/aws-events/lib/util.ts +++ b/packages/@aws-cdk/aws-events/lib/util.ts @@ -38,9 +38,11 @@ export function mergeEventPattern(dest: any, src: any) { `Type mismatch between existing pattern ${JSON.stringify(destValue)} and added pattern ${JSON.stringify(srcValue)}`); } - // if this is an array, concat the values + // if this is an array, concat and deduplicate the values if (Array.isArray(srcValue)) { - destObj[field] = destValue.concat(srcValue); + const result = [...destValue, ...srcValue]; + const resultJson = result.map(i => JSON.stringify(i)); + destObj[field] = result.filter((value, index) => resultJson.indexOf(JSON.stringify(value)) === index); continue; } diff --git a/packages/@aws-cdk/aws-events/test/test.rule.ts b/packages/@aws-cdk/aws-events/test/test.rule.ts index 991d2e83d0249..80cf91948f5fa 100644 --- a/packages/@aws-cdk/aws-events/test/test.rule.ts +++ b/packages/@aws-cdk/aws-events/test/test.rule.ts @@ -126,14 +126,14 @@ export = { rule.addEventPattern({ account: ['12345'], detail: { - foo: ['hello'], + foo: ['hello', 'bar', 'hello'], }, }); rule.addEventPattern({ source: ['aws.source'], detail: { - foo: ['bar'], + foo: ['bar', 'hello'], goo: { hello: ['world'], }, @@ -172,6 +172,37 @@ export = { test.done(); }, + 'addEventPattern can de-duplicate filters and keep the order'(test: Test) { + const stack = new cdk.Stack(); + + const rule = new Rule(stack, 'MyRule'); + rule.addEventPattern({ + detailType: ['AWS API Call via CloudTrail', 'AWS API Call via CloudTrail'], + }); + + rule.addEventPattern({ + detailType: ['EC2 Instance State-change Notification', 'AWS API Call via CloudTrail'], + }); + + expect(stack).toMatch({ + 'Resources': { + 'MyRuleA44AB831': { + 'Type': 'AWS::Events::Rule', + 'Properties': { + 'EventPattern': { + 'detail-type': [ + 'AWS API Call via CloudTrail', + 'EC2 Instance State-change Notification', + ], + }, + 'State': 'ENABLED', + }, + }, + }, + }); + test.done(); + }, + 'targets can be added via props or addTarget with input transformer'(test: Test) { const stack = new cdk.Stack(); const t1: IRuleTarget = { diff --git a/packages/@aws-cdk/aws-events/test/test.util.ts b/packages/@aws-cdk/aws-events/test/test.util.ts index 4c81ab07c2da4..80cbe36ddbba4 100644 --- a/packages/@aws-cdk/aws-events/test/test.util.ts +++ b/packages/@aws-cdk/aws-events/test/test.util.ts @@ -55,5 +55,43 @@ export = { }), /Invalid event pattern field array. Type mismatch between existing pattern \[1\] and added pattern \{"value":\["hello"\]\}/); test.done(); }, + + 'deduplicate match values in pattern array'(test: Test) { + test.deepEqual(mergeEventPattern({ + 'detail-type': ['AWS API Call via CloudTrail'], + }, { + 'detail-type': ['AWS API Call via CloudTrail'], + }), { + 'detail-type': ['AWS API Call via CloudTrail'], + }); + test.deepEqual(mergeEventPattern({ + time: [{ prefix: '2017-10-02' }], + }, { + time: [{ prefix: '2017-10-02' }, { prefix: '2017-10-03' }], + }), { + time: [{ prefix: '2017-10-02' }, { prefix: '2017-10-03' }], + }); + test.deepEqual(mergeEventPattern({ + 'detail-type': ['AWS API Call via CloudTrail'], + 'time': [{ prefix: '2017-10-02' }], + }, { + 'detail-type': ['AWS API Call via CloudTrail'], + 'time': [{ prefix: '2017-10-02' }, { prefix: '2017-10-03' }], + }), { + 'detail-type': ['AWS API Call via CloudTrail'], + 'time': [{ prefix: '2017-10-02' }, { prefix: '2017-10-03' }], + }); + test.deepEqual(mergeEventPattern({ + 'detail-type': ['AWS API Call via CloudTrail', 'AWS API Call via CloudTrail'], + 'time': [{ prefix: '2017-10-02' }], + }, { + 'detail-type': ['AWS API Call via CloudTrail', 'AWS API Call via CloudTrail'], + 'time': [{ prefix: '2017-10-02' }, { prefix: '2017-10-03' }, { prefix: '2017-10-02' }], + }), { + 'detail-type': ['AWS API Call via CloudTrail'], + 'time': [{ prefix: '2017-10-02' }, { prefix: '2017-10-03' }], + }); + test.done(); + }, }, }; From 6bf0da05348557386a72af6323d0165c594caf6c Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Wed, 2 Dec 2020 13:39:22 +0000 Subject: [PATCH 260/314] feat(apigatewayv2): private integration with imported services (#11661) Switch the interface to use `IApplicationLoadBalancer`, `INetworkLoadBalancer` and `IService` so that imported services and other implementations can be used. This means that in some cases the `vpcLink` property is mandatory. BREAKING CHANGE: The `VpcLink.fromVpcLinkId()` API has been replaced with `VpcLink.fromVpcLinkAttributes()`. fixes #11603 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-apigatewayv2-integrations/README.md | 8 +++-- .../lib/http/alb.ts | 13 ++++++-- .../lib/http/nlb.ts | 15 +++++++-- .../lib/http/service-discovery.ts | 22 +++++-------- .../test/http/alb.test.ts | 18 +++++++++++ .../test/http/nlb.test.ts | 16 +++++++++- .../test/http/service-discovery.test.ts | 20 ++++++++++++ .../aws-apigatewayv2/lib/http/vpc-link.ts | 32 +++++++++++++++---- .../test/http/vpc-link.test.ts | 8 ++++- 9 files changed, 122 insertions(+), 30 deletions(-) diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/README.md b/packages/@aws-cdk/aws-apigatewayv2-integrations/README.md index ee973a6186f56..6dd9de9e4e475 100644 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/README.md +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/README.md @@ -97,12 +97,14 @@ listener.addTargets('target', { }); const httpEndpoint = new HttpApi(stack, 'HttpProxyPrivateApi', { - defaultIntegration: new HttpAlbIntegrationProps({ + defaultIntegration: new HttpAlbIntegration({ listener, }), }); ``` +When an imported load balancer is used, the `vpc` option must be specified for `HttpAlbIntegration`. + #### Network Load Balancer The following code is a basic network load balancer private integration of HTTP API: @@ -116,12 +118,14 @@ listener.addTargets('target', { }); const httpEndpoint = new HttpApi(stack, 'HttpProxyPrivateApi', { - defaultIntegration: new HttpNlbIntegrationProps({ + defaultIntegration: new HttpNlbIntegration({ listener, }), }); ``` +When an imported load balancer is used, the `vpc` option must be specified for `HttpNlbIntegration`. + #### Cloud Map Service Discovery The following code is a basic discovery service private integration of HTTP API: diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/alb.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/alb.ts index 2d35f89e8206e..b6afd1cc76450 100644 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/alb.ts +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/alb.ts @@ -1,4 +1,5 @@ import { HttpRouteIntegrationBindOptions, HttpRouteIntegrationConfig } from '@aws-cdk/aws-apigatewayv2'; +import * as ec2 from '@aws-cdk/aws-ec2'; import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; import { HttpPrivateIntegrationOptions } from './base-types'; import { HttpPrivateIntegration } from './private/integration'; @@ -10,7 +11,7 @@ export interface HttpAlbIntegrationProps extends HttpPrivateIntegrationOptions { /** * The listener to the application load balancer used for the integration */ - readonly listener: elbv2.ApplicationListener; + readonly listener: elbv2.IApplicationListener; } /** @@ -22,9 +23,17 @@ export class HttpAlbIntegration extends HttpPrivateIntegration { } public bind(options: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig { + let vpc: ec2.IVpc | undefined = this.props.vpcLink?.vpc; + if (!vpc && (this.props.listener instanceof elbv2.ApplicationListener)) { + vpc = this.props.listener.loadBalancer.vpc; + } + if (!vpc) { + throw new Error('The vpcLink property must be specified when using an imported Application Listener.'); + } + const vpcLink = this._configureVpcLink(options, { vpcLink: this.props.vpcLink, - vpc: this.props.listener.loadBalancer.vpc, + vpc, }); return { diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/nlb.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/nlb.ts index 1ee7ce4f208ed..85e3f3773d1c4 100644 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/nlb.ts +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/nlb.ts @@ -1,4 +1,5 @@ import { HttpRouteIntegrationBindOptions, HttpRouteIntegrationConfig } from '@aws-cdk/aws-apigatewayv2'; +import * as ec2 from '@aws-cdk/aws-ec2'; import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; import { HttpPrivateIntegrationOptions } from './base-types'; import { HttpPrivateIntegration } from './private/integration'; @@ -8,9 +9,9 @@ import { HttpPrivateIntegration } from './private/integration'; */ export interface HttpNlbIntegrationProps extends HttpPrivateIntegrationOptions { /** - * The listener to the netwwork load balancer used for the integration + * The listener to the network load balancer used for the integration */ - readonly listener: elbv2.NetworkListener; + readonly listener: elbv2.INetworkListener; } /** @@ -22,9 +23,17 @@ export class HttpNlbIntegration extends HttpPrivateIntegration { } public bind(options: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig { + let vpc: ec2.IVpc | undefined = this.props.vpcLink?.vpc; + if (!vpc && (this.props.listener instanceof elbv2.NetworkListener)) { + vpc = this.props.listener.loadBalancer.vpc; + } + if (!vpc) { + throw new Error('The vpcLink property must be specified when using an imported Network Listener.'); + } + const vpcLink = this._configureVpcLink(options, { vpcLink: this.props.vpcLink, - vpc: this.props.listener.loadBalancer.vpc, + vpc, }); return { diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/service-discovery.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/service-discovery.ts index 96e13d0a03273..44e8b148754dd 100644 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/service-discovery.ts +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/service-discovery.ts @@ -1,26 +1,16 @@ -import { HttpMethod, IVpcLink, HttpRouteIntegrationBindOptions, HttpRouteIntegrationConfig } from '@aws-cdk/aws-apigatewayv2'; +import { HttpRouteIntegrationBindOptions, HttpRouteIntegrationConfig } from '@aws-cdk/aws-apigatewayv2'; import * as servicediscovery from '@aws-cdk/aws-servicediscovery'; +import { HttpPrivateIntegrationOptions } from './base-types'; import { HttpPrivateIntegration } from './private/integration'; /** * Properties to initialize `HttpServiceDiscoveryIntegration`. */ -export interface HttpServiceDiscoveryIntegrationProps { +export interface HttpServiceDiscoveryIntegrationProps extends HttpPrivateIntegrationOptions { /** * The discovery service used for the integration */ - readonly service: servicediscovery.Service; - - /** - * The vpc link to be used for the private integration - */ - readonly vpcLink: IVpcLink; - - /** - * The HTTP method that must be used to invoke the underlying HTTP proxy. - * @default HttpMethod.ANY - */ - readonly method?: HttpMethod; + readonly service: servicediscovery.IService; } /** @@ -32,6 +22,10 @@ export class HttpServiceDiscoveryIntegration extends HttpPrivateIntegration { } public bind(_: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig { + if (!this.props.vpcLink) { + throw new Error('The vpcLink property is mandatory'); + } + return { method: this.props.method ?? this.httpMethod, payloadFormatVersion: this.payloadFormatVersion, diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/alb.test.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/alb.test.ts index 691da1e4c3b9f..aa2c2fe3e4c4c 100644 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/alb.test.ts +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/alb.test.ts @@ -98,4 +98,22 @@ describe('HttpAlbIntegration', () => { IntegrationMethod: 'PATCH', }); }); + + test('fails when imported ALB is used without specifying load balancer', () => { + const stack = new Stack(); + const securityGroup = ec2.SecurityGroup.fromSecurityGroupId(stack, 'MySecurityGroup', 'sg-903004f8'); + const listener = elbv2.ApplicationListener.fromApplicationListenerAttributes(stack, 'Listener', { + listenerArn: 'arn:aws:elasticloadbalancing:us-east-1:012345655:listener/app/myloadbalancer/lb-12345/listener-12345', + securityGroup, + }); + const api = new HttpApi(stack, 'HttpApi'); + + expect(() => new HttpRoute(stack, 'HttpProxyPrivateRoute', { + httpApi: api, + integration: new HttpAlbIntegration({ + listener, + }), + routeKey: HttpRouteKey.with('/pets'), + })).toThrow(/vpcLink property must be specified/); + }); }); diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/nlb.test.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/nlb.test.ts index ec537cfedb311..13d25f0cd896f 100644 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/nlb.test.ts +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/nlb.test.ts @@ -74,7 +74,6 @@ describe('HttpNlbIntegration', () => { }); }); - test('method option is correctly recognized', () => { // GIVEN const stack = new Stack(); @@ -99,4 +98,19 @@ describe('HttpNlbIntegration', () => { IntegrationMethod: 'PATCH', }); }); + + test('fails when imported NLB is used without specifying vpcLink', () => { + const stack = new Stack(); + const listener = elbv2.NetworkListener.fromNetworkListenerArn(stack, 'Listener', + 'arn:aws:elasticloadbalancing:us-east-1:012345655:listener/net/myloadbalancer/lb-12345/listener-12345'); + const api = new HttpApi(stack, 'HttpApi'); + + expect(() => new HttpRoute(stack, 'HttpProxyPrivateRoute', { + httpApi: api, + integration: new HttpNlbIntegration({ + listener, + }), + routeKey: HttpRouteKey.with('/pets'), + })).toThrow(/vpcLink property must be specified/); + }); }); diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/service-discovery.test.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/service-discovery.test.ts index 62097b9d0a3c0..ebd491e2c2ab8 100644 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/service-discovery.test.ts +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/service-discovery.test.ts @@ -74,4 +74,24 @@ describe('HttpServiceDiscoveryIntegration', () => { IntegrationMethod: 'PATCH', }); }); + + test('fails if vpcLink is not specified', () => { + const stack = new Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const namespace = new servicediscovery.PrivateDnsNamespace(stack, 'Namespace', { + name: 'foobar.com', + vpc, + }); + const service = namespace.createService('Service'); + const api = new HttpApi(stack, 'HttpApi'); + + expect(() => new HttpRoute(stack, 'HttpProxyPrivateRoute', { + httpApi: api, + integration: new HttpServiceDiscoveryIntegration({ + service, + method: HttpMethod.PATCH, + }), + routeKey: HttpRouteKey.with('/pets'), + })).toThrow(/vpcLink property is mandatory/); + }); }); diff --git a/packages/@aws-cdk/aws-apigatewayv2/lib/http/vpc-link.ts b/packages/@aws-cdk/aws-apigatewayv2/lib/http/vpc-link.ts index ac832a730e62c..27d478c335963 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/lib/http/vpc-link.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/lib/http/vpc-link.ts @@ -12,6 +12,11 @@ export interface IVpcLink extends IResource { * @attribute */ readonly vpcLinkId: string; + + /** + * The VPC to which this VPC Link is associated with. + */ + readonly vpc: ec2.IVpc; } /** @@ -44,6 +49,20 @@ export interface VpcLinkProps { readonly securityGroups?: ec2.ISecurityGroup[]; } +/** + * Attributes when importing a new VpcLink + */ +export interface VpcLinkAttributes { + /** + * The VPC Link id + */ + readonly vpcLinkId: string; + /** + * The VPC to which this VPC link is associated with. + */ + readonly vpc: ec2.IVpc; +} + /** * Define a new VPC Link @@ -51,27 +70,26 @@ export interface VpcLinkProps { */ export class VpcLink extends Resource implements IVpcLink { /** - * Import a VPC Link by its Id + * Import a VPC Link by specifying its attributes. */ - public static fromVpcLinkId(scope: Construct, id: string, vpcLinkId: string): IVpcLink { + public static fromVpcLinkAttributes(scope: Construct, id: string, attrs: VpcLinkAttributes): IVpcLink { class Import extends Resource implements IVpcLink { - public vpcLinkId = vpcLinkId; + public vpcLinkId = attrs.vpcLinkId; + public vpc = attrs.vpc; } return new Import(scope, id); } - /** - * Physical ID of the VpcLink resource - * @attribute - */ public readonly vpcLinkId: string; + public readonly vpc: ec2.IVpc; private readonly subnets = new Array(); private readonly securityGroups = new Array(); constructor(scope: Construct, id: string, props: VpcLinkProps) { super(scope, id); + this.vpc = props.vpc; const cfnResource = new CfnVpcLink(this, 'Resource', { name: props.vpcLinkName || Lazy.stringValue({ produce: () => this.node.uniqueId }), diff --git a/packages/@aws-cdk/aws-apigatewayv2/test/http/vpc-link.test.ts b/packages/@aws-cdk/aws-apigatewayv2/test/http/vpc-link.test.ts index b5f7dc178e458..1571ceef39f6d 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/test/http/vpc-link.test.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/test/http/vpc-link.test.ts @@ -180,7 +180,13 @@ describe('VpcLink', () => { const stack = new Stack(); // WHEN - VpcLink.fromVpcLinkId(stack, 'ImportedVpcLink', 'vpclink-id'); + VpcLink.fromVpcLinkAttributes(stack, 'ImportedVpcLink', { + vpcLinkId: 'vpclink-id', + vpc: ec2.Vpc.fromVpcAttributes(stack, 'ImportedVpc', { + vpcId: 'vpc-12345', + availabilityZones: ['us-east-1'], + }), + }); // THEN expect(stack).not.toHaveResource('AWS::ApiGatewayV2::VpcLink'); From 48b3fa95b3ce3c5843aa35d48772e31d8c85c505 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Wed, 2 Dec 2020 15:17:42 +0100 Subject: [PATCH 261/314] fix(core): custom resource providers cannot be used in CDK Pipelines (#11807) The Custom Resource Provider was using an absolute path staging assets. Needed to be a relative path. Fixes #11760. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/core/lib/asset-staging.ts | 19 +++++++++ .../custom-resource-provider.ts | 2 +- .../custom-resource-provider.test.ts | 39 ++++++++++++++++++- 3 files changed, 58 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/core/lib/asset-staging.ts b/packages/@aws-cdk/core/lib/asset-staging.ts index dfb9768671d74..66c65e3d14864 100644 --- a/packages/@aws-cdk/core/lib/asset-staging.ts +++ b/packages/@aws-cdk/core/lib/asset-staging.ts @@ -93,9 +93,27 @@ export class AssetStaging extends CoreConstruct { * a temporary directory used for bundling. * * If asset staging is enabled it will be the staged path. + * + * IMPORTANT: If you are going to call `addFileAsset()`, use + * `relativeStagedPath()` instead. + * + * @deprecated - Use `absoluteStagedPath` instead. */ public readonly stagedPath: string; + /** + * Absolute path to the asset data. + * + * If asset staging is disabled, this will just be the source path or + * a temporary directory used for bundling. + * + * If asset staging is enabled it will be the staged path. + * + * IMPORTANT: If you are going to call `addFileAsset()`, use + * `relativeStagedPath()` instead. + */ + public readonly absoluteStagedPath: string; + /** * The absolute path of the asset as it was referenced by the user. */ @@ -172,6 +190,7 @@ export class AssetStaging extends CoreConstruct { const staged = AssetStaging.assetCache.obtain(this.cacheKey, stageThisAsset); this.stagedPath = staged.stagedPath; + this.absoluteStagedPath = staged.stagedPath; this.assetHash = staged.assetHash; } diff --git a/packages/@aws-cdk/core/lib/custom-resource-provider/custom-resource-provider.ts b/packages/@aws-cdk/core/lib/custom-resource-provider/custom-resource-provider.ts index 9f49174ad0171..ea5b0882dbb44 100644 --- a/packages/@aws-cdk/core/lib/custom-resource-provider/custom-resource-provider.ts +++ b/packages/@aws-cdk/core/lib/custom-resource-provider/custom-resource-provider.ts @@ -139,7 +139,7 @@ export class CustomResourceProvider extends CoreConstruct { }); const asset = stack.addFileAsset({ - fileName: staging.stagedPath, + fileName: staging.relativeStagedPath(stack), sourceHash: staging.sourceHash, packaging: FileAssetPackaging.ZIP_DIRECTORY, }); diff --git a/packages/@aws-cdk/core/test/custom-resource-provider/custom-resource-provider.test.ts b/packages/@aws-cdk/core/test/custom-resource-provider/custom-resource-provider.test.ts index 3a08468d9dc32..c56a991298574 100644 --- a/packages/@aws-cdk/core/test/custom-resource-provider/custom-resource-provider.test.ts +++ b/packages/@aws-cdk/core/test/custom-resource-provider/custom-resource-provider.test.ts @@ -1,7 +1,7 @@ import * as fs from 'fs'; import * as path from 'path'; import { nodeunitShim, Test } from 'nodeunit-shim'; -import { AssetStaging, CustomResourceProvider, CustomResourceProviderRuntime, Duration, Size, Stack } from '../../lib'; +import { App, AssetStaging, CustomResourceProvider, CustomResourceProviderRuntime, DockerImageAssetLocation, DockerImageAssetSource, Duration, FileAssetLocation, FileAssetSource, ISynthesisSession, Size, Stack } from '../../lib'; import { toCloudFormation } from '../util'; const TEST_HANDLER = `${__dirname}/mock-provider`; @@ -123,6 +123,43 @@ nodeunitShim({ test.done(); }, + 'custom resource provided creates asset in new-style synthesis with relative path'(test: Test) { + // GIVEN + + let assetFilename : string | undefined; + + const app = new App(); + const stack = new Stack(app, 'Stack', { + synthesizer: { + bind(_stack: Stack): void { }, + + addFileAsset(asset: FileAssetSource): FileAssetLocation { + assetFilename = asset.fileName; + return { bucketName: '', httpUrl: '', objectKey: '', s3ObjectUrl: '', s3Url: '', kmsKeyArn: '' }; + }, + + addDockerImageAsset(_asset: DockerImageAssetSource): DockerImageAssetLocation { + return { imageUri: '', repositoryName: '' }; + }, + + synthesize(_session: ISynthesisSession): void { }, + }, + }); + + // WHEN + CustomResourceProvider.getOrCreate(stack, 'Custom:MyResourceType', { + codeDirectory: TEST_HANDLER, + runtime: CustomResourceProviderRuntime.NODEJS_12, + }); + + // THEN -- no exception + if (!assetFilename || assetFilename.startsWith(path.sep)) { + throw new Error(`Asset filename must be a relative path, got: ${assetFilename}`); + } + + test.done(); + }, + 'policyStatements can be used to add statements to the inline policy'(test: Test) { // GIVEN const stack = new Stack(); From cacb1d7fc3b0f299c17a86464c20e32a428e881d Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Wed, 2 Dec 2020 15:46:15 +0100 Subject: [PATCH 262/314] fix(iam): OIDC provider cannot be imported from parameter (#11789) The "resource name" part of the OIDC Provider ARN contains the ARN separator (`/`), which cannot be properly split into components using the primitives that CloudFormation gives us. Introduce a new helper method on `Arn` which can obtain the resource name, slashes and all, provided that we know the resource type for a fact. Fixes #11705. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../test/integ.eks-cluster.expected.json | 4 +- .../@aws-cdk/aws-iam/lib/oidc-provider.ts | 15 +- .../aws-iam/test/oidc-provider.test.ts | 19 ++- packages/@aws-cdk/aws-s3/test/util.test.ts | 2 +- packages/@aws-cdk/core/lib/arn.ts | 145 ++++++++++++------ packages/@aws-cdk/core/lib/stack.ts | 44 +++--- packages/@aws-cdk/core/test/arn.test.ts | 35 ++++- packages/@aws-cdk/core/test/evaluate-cfn.ts | 57 +++++-- 8 files changed, 217 insertions(+), 104 deletions(-) diff --git a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json index 3cccffb7a31e3..7e5d81152c4d8 100644 --- a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json +++ b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json @@ -3530,7 +3530,7 @@ 1, { "Fn::Split": [ - "oidc-provider/", + ":oidc-provider/", { "Ref": "ClusterOpenIdConnectProviderE7EB0530" } @@ -3544,7 +3544,7 @@ 1, { "Fn::Split": [ - "oidc-provider/", + ":oidc-provider/", { "Ref": "ClusterOpenIdConnectProviderE7EB0530" } diff --git a/packages/@aws-cdk/aws-iam/lib/oidc-provider.ts b/packages/@aws-cdk/aws-iam/lib/oidc-provider.ts index ba2ebc880893d..91c221ec55652 100644 --- a/packages/@aws-cdk/aws-iam/lib/oidc-provider.ts +++ b/packages/@aws-cdk/aws-iam/lib/oidc-provider.ts @@ -1,13 +1,12 @@ import * as path from 'path'; import { + Arn, CustomResource, CustomResourceProvider, CustomResourceProviderRuntime, IResource, Resource, - Stack, Token, - Fn, } from '@aws-cdk/core'; import { Construct } from 'constructs'; @@ -113,15 +112,7 @@ export class OpenIdConnectProvider extends Resource implements IOpenIdConnectPro * @param openIdConnectProviderArn the ARN to import */ public static fromOpenIdConnectProviderArn(scope: Construct, id: string, openIdConnectProviderArn: string): IOpenIdConnectProvider { - const parsedResourceName = Stack.of(scope).parseArn(openIdConnectProviderArn).resourceName; - if (!parsedResourceName) { - throw new Error(`Invalid arn: ${openIdConnectProviderArn}. Unable to extract issuer url`); - } - - // this needed because TS don't understand that prev. condition - // actually does mutate the type from "string | undefined" to "string" - // inside class definition, - const resourceName = parsedResourceName; + const resourceName = Arn.extractResourceName(openIdConnectProviderArn, 'oidc-provider'); class Import extends Resource implements IOpenIdConnectProvider { public readonly openIdConnectProviderArn = openIdConnectProviderArn; @@ -158,7 +149,7 @@ export class OpenIdConnectProvider extends Resource implements IOpenIdConnectPro }); this.openIdConnectProviderArn = Token.asString(resource.ref); - this.openIdConnectProviderIssuer = Fn.select(1, Fn.split('oidc-provider/', this.openIdConnectProviderArn)); + this.openIdConnectProviderIssuer = Arn.extractResourceName(this.openIdConnectProviderArn, 'oidc-provider'); } private getOrCreateProvider() { diff --git a/packages/@aws-cdk/aws-iam/test/oidc-provider.test.ts b/packages/@aws-cdk/aws-iam/test/oidc-provider.test.ts index 4f157be9ab191..b0beb5d5843f1 100644 --- a/packages/@aws-cdk/aws-iam/test/oidc-provider.test.ts +++ b/packages/@aws-cdk/aws-iam/test/oidc-provider.test.ts @@ -1,5 +1,5 @@ import '@aws-cdk/assert/jest'; -import { App, Stack } from '@aws-cdk/core'; +import { App, Stack, Token } from '@aws-cdk/core'; import * as sinon from 'sinon'; import * as iam from '../lib'; import { arrayDiff } from '../lib/oidc-provider/diff'; @@ -402,11 +402,11 @@ describe('OIDC issuer', () => { // THEN expect(stack.resolve(provider.openIdConnectProviderIssuer)).toStrictEqual( - { 'Fn::Select': [1, { 'Fn::Split': ['oidc-provider/', { Ref: 'MyProvider730BA1C8' }] }] }, + { 'Fn::Select': [1, { 'Fn::Split': [':oidc-provider/', { Ref: 'MyProvider730BA1C8' }] }] }, ); }); - test('extract issuer properly in the imported provider', () => { + test('extract issuer properly in a literal imported provider', () => { // GIVEN const stack = new Stack(); @@ -416,6 +416,19 @@ describe('OIDC issuer', () => { // THEN expect(stack.resolve(provider.openIdConnectProviderIssuer)).toStrictEqual('oidc.eks.us-east-1.amazonaws.com/id/someid'); }); + + test('extract issuer properly in a Token imported provider', () => { + // GIVEN + const stack = new Stack(); + + // WHEN + const provider = iam.OpenIdConnectProvider.fromOpenIdConnectProviderArn(stack, 'MyProvider', Token.asString({ Ref: 'ARN' })); + + // THEN + expect(stack.resolve(provider.openIdConnectProviderIssuer)).toStrictEqual({ + 'Fn::Select': [1, { 'Fn::Split': [':oidc-provider/', { Ref: 'ARN' }] }], + }); + }); }); async function invokeHandler(event: Partial) { diff --git a/packages/@aws-cdk/aws-s3/test/util.test.ts b/packages/@aws-cdk/aws-s3/test/util.test.ts index 13a6376847ee9..528b83b10404b 100644 --- a/packages/@aws-cdk/aws-s3/test/util.test.ts +++ b/packages/@aws-cdk/aws-s3/test/util.test.ts @@ -61,7 +61,7 @@ nodeunitShim({ 'fails if ARN has invalid format'(test: Test) { const stack = new cdk.Stack(); const bucketArn = 'invalid-arn'; - test.throws(() => parseBucketName(stack, { bucketArn }), /ARNs must have at least 6 components/); + test.throws(() => parseBucketName(stack, { bucketArn }), /ARNs must/); test.done(); }, }, diff --git a/packages/@aws-cdk/core/lib/arn.ts b/packages/@aws-cdk/core/lib/arn.ts index 60dc79ab79d35..2ed3485a6c9b6 100644 --- a/packages/@aws-cdk/core/lib/arn.ts +++ b/packages/@aws-cdk/core/lib/arn.ts @@ -99,28 +99,28 @@ export class Arn { /** * Given an ARN, parses it and returns components. * - * If the ARN is a concrete string, it will be parsed and validated. The - * separator (`sep`) will be set to '/' if the 6th component includes a '/', - * in which case, `resource` will be set to the value before the '/' and - * `resourceName` will be the rest. In case there is no '/', `resource` will - * be set to the 6th components and `resourceName` will be set to the rest - * of the string. + * IF THE ARN IS A CONCRETE STRING... * - * If the ARN includes tokens (or is a token), the ARN cannot be validated, - * since we don't have the actual value yet at the time of this function - * call. You will have to know the separator and the type of ARN. The - * resulting `ArnComponents` object will contain tokens for the - * subexpressions of the ARN, not string literals. In this case this - * function cannot properly parse the complete final resourceName (path) out - * of ARNs that use '/' to both separate the 'resource' from the - * 'resourceName' AND to subdivide the resourceName further. For example, in - * S3 ARNs: + * ...it will be parsed and validated. The separator (`sep`) will be set to '/' + * if the 6th component includes a '/', in which case, `resource` will be set + * to the value before the '/' and `resourceName` will be the rest. In case + * there is no '/', `resource` will be set to the 6th components and + * `resourceName` will be set to the rest of the string. * - * arn:aws:s3:::my_corporate_bucket/path/to/exampleobject.png + * IF THE ARN IS A TOKEN... * - * After parsing the resourceName will not contain - * 'path/to/exampleobject.png' but simply 'path'. This is a limitation - * because there is no slicing functionality in CloudFormation templates. + * ...it cannot be validated, since we don't have the actual value yet at the + * time of this function call. You will have to supply `sepIfToken` and + * whether or not ARNs of the expected format usually have resource names + * in order to parse it properly. The resulting `ArnComponents` object will + * contain tokens for the subexpressions of the ARN, not string literals. + * + * If the resource name could possibly contain the separator char, the actual + * resource name cannot be properly parsed. This only occurs if the separator + * char is '/', and happens for example for S3 object ARNs, IAM Role ARNs, + * IAM OIDC Provider ARNs, etc. To properly extract the resource name from a + * Tokenized ARN, you must know the resource type and call + * `Arn.extractResourceName`. * * @param arn The ARN to parse * @param sepIfToken The separator used to separate resource from resourceName @@ -135,39 +135,18 @@ export class Arn { * components of the ARN. */ public static parse(arn: string, sepIfToken: string = '/', hasName: boolean = true): ArnComponents { - const components = arn.split(':') as Array; - const looksLikeArn = arn.startsWith('arn:') && components.length >= 6 && components.length <= 7; - if (Token.isUnresolved(arn) && !looksLikeArn) { + const components = parseArnShape(arn); + if (components === 'token') { return parseToken(arn, sepIfToken, hasName); } - // If the ARN merely contains Tokens, but otherwise *looks* mostly like an ARN, - // it's a string of the form 'arn:${partition}:service:${region}:${account}:abc/xyz'. - // Parse fields out to the best of our ability. - // Tokens won't contain ":", so this won't break them. - - if (components.length < 6) { - throw new Error('ARNs must have at least 6 components: ' + arn); - } - - const [arnPrefix, partition, service, region, account, sixth, ...rest] = components; - - if (arnPrefix !== 'arn') { - throw new Error('ARNs must start with "arn:": ' + arn); - } - if (!service) { - throw new Error('The `service` component (3rd component) is required: ' + arn); - } - - if (!sixth) { - throw new Error('The `resource` component (6th component) is required: ' + arn); - } + const [, partition, service, region, account, resourceTypeOrName, ...rest] = components; let resource: string; let resourceName: string | undefined; let sep: string | undefined; - let sepIndex = sixth.indexOf('/'); + let sepIndex = resourceTypeOrName.indexOf('/'); if (sepIndex !== -1) { sep = '/'; } else if (rest.length > 0) { @@ -176,10 +155,10 @@ export class Arn { } if (sepIndex !== -1) { - resource = sixth.substr(0, sepIndex); - resourceName = sixth.substr(sepIndex + 1); + resource = resourceTypeOrName.substr(0, sepIndex); + resourceName = resourceTypeOrName.substr(sepIndex + 1); } else { - resource = sixth; + resource = resourceTypeOrName; } if (rest.length > 0) { @@ -206,6 +185,39 @@ export class Arn { }); } + /** + * Extract the full resource name from an ARN + * + * Necessary for resource names (paths) that may contain the separator, like + * `arn:aws:iam::111111111111:role/path/to/role/name`. + * + * Only works if we statically know the expected `resourceType` beforehand, since we're going + * to use that to split the string on ':/' (and take the right-hand side). + * + * We can't extract the 'resourceType' from the ARN at hand, because CloudFormation Expressions + * only allow literals in the 'separator' argument to `{ Fn::Split }`, and so it can't be + * `{ Fn::Select: [5, { Fn::Split: [':', ARN] }}`. + * + * Only necessary for ARN formats for which the type-name separator is `/`. + */ + public static extractResourceName(arn: string, resourceType: string): string { + const components = parseArnShape(arn); + if (components === 'token') { + return Fn.select(1, Fn.split(`:${resourceType}/`, arn)); + } + + // Apparently we could just parse this right away. Validate that we got the right + // resource type (to notify authors of incorrect assumptions right away). + const parsed = Arn.parse(arn, '/', true); + if (!Token.isUnresolved(parsed.resource) && parsed.resource !== resourceType) { + throw new Error(`Expected resource type '${resourceType}' in ARN, got '${parsed.resource}' in '${arn}'`); + } + if (!parsed.resourceName) { + throw new Error(`Expected resource name in ARN, didn't find one: '${arn}'`); + } + return parsed.resourceName; + } + private constructor() { } } @@ -268,3 +280,42 @@ function parseToken(arnToken: string, sep: string = '/', hasName: boolean = true return { partition, service, region, account, resource, resourceName, sep }; } } + + +/** + * Validate that a string is either unparseable or looks mostly like an ARN + */ +function parseArnShape(arn: string): 'token' | string[] { + const components = arn.split(':'); + const looksLikeArn = arn.startsWith('arn:') && components.length >= 6; + + if (!looksLikeArn) { + if (Token.isUnresolved(arn)) { return 'token'; } + throw new Error(`ARNs must start with "arn:" and have at least 6 components: ${arn}`); + } + + // If the ARN merely contains Tokens, but otherwise *looks* mostly like an ARN, + // it's a string of the form 'arn:${partition}:service:${region}:${account}:abc/xyz'. + // Parse fields out to the best of our ability. + // Tokens won't contain ":", so this won't break them. + + const [/* arn */, partition, service, /* region */ , /* account */ , resource] = components; + + if (!partition) { + throw new Error('The `partition` component (2nd component) is required: ' + arn); + } + + if (!service) { + throw new Error('The `service` component (3rd component) is required: ' + arn); + } + + if (!resource) { + throw new Error('The `resource` component (6th component) is required: ' + arn); + } + + // Region can be missing in global ARNs (such as used by IAM) + + // Account can be missing in some ARN types (such as used for S3 buckets) + + return components; +} \ No newline at end of file diff --git a/packages/@aws-cdk/core/lib/stack.ts b/packages/@aws-cdk/core/lib/stack.ts index f54266c7ed922..e1664e2996a90 100644 --- a/packages/@aws-cdk/core/lib/stack.ts +++ b/packages/@aws-cdk/core/lib/stack.ts @@ -565,28 +565,28 @@ export class Stack extends CoreConstruct implements ITaggable { /** * Given an ARN, parses it and returns components. * - * If the ARN is a concrete string, it will be parsed and validated. The - * separator (`sep`) will be set to '/' if the 6th component includes a '/', - * in which case, `resource` will be set to the value before the '/' and - * `resourceName` will be the rest. In case there is no '/', `resource` will - * be set to the 6th components and `resourceName` will be set to the rest - * of the string. - * - * If the ARN includes tokens (or is a token), the ARN cannot be validated, - * since we don't have the actual value yet at the time of this function - * call. You will have to know the separator and the type of ARN. The - * resulting `ArnComponents` object will contain tokens for the - * subexpressions of the ARN, not string literals. In this case this - * function cannot properly parse the complete final resourceName (path) out - * of ARNs that use '/' to both separate the 'resource' from the - * 'resourceName' AND to subdivide the resourceName further. For example, in - * S3 ARNs: - * - * arn:aws:s3:::my_corporate_bucket/path/to/exampleobject.png - * - * After parsing the resourceName will not contain - * 'path/to/exampleobject.png' but simply 'path'. This is a limitation - * because there is no slicing functionality in CloudFormation templates. + * IF THE ARN IS A CONCRETE STRING... + * + * ...it will be parsed and validated. The separator (`sep`) will be set to '/' + * if the 6th component includes a '/', in which case, `resource` will be set + * to the value before the '/' and `resourceName` will be the rest. In case + * there is no '/', `resource` will be set to the 6th components and + * `resourceName` will be set to the rest of the string. + * + * IF THE ARN IS A TOKEN... + * + * ...it cannot be validated, since we don't have the actual value yet at the + * time of this function call. You will have to supply `sepIfToken` and + * whether or not ARNs of the expected format usually have resource names + * in order to parse it properly. The resulting `ArnComponents` object will + * contain tokens for the subexpressions of the ARN, not string literals. + * + * If the resource name could possibly contain the separator char, the actual + * resource name cannot be properly parsed. This only occurs if the separator + * char is '/', and happens for example for S3 object ARNs, IAM Role ARNs, + * IAM OIDC Provider ARNs, etc. To properly extract the resource name from a + * Tokenized ARN, you must know the resource type and call + * `Arn.extractResourceName`. * * @param arn The ARN string to parse * @param sepIfToken The separator used to separate resource from resourceName diff --git a/packages/@aws-cdk/core/test/arn.test.ts b/packages/@aws-cdk/core/test/arn.test.ts index 5fa7a83d98f7a..b4b135fff94e6 100644 --- a/packages/@aws-cdk/core/test/arn.test.ts +++ b/packages/@aws-cdk/core/test/arn.test.ts @@ -1,6 +1,7 @@ import { nodeunitShim, Test } from 'nodeunit-shim'; -import { ArnComponents, Aws, CfnOutput, ScopedAws, Stack } from '../lib'; +import { Arn, ArnComponents, Aws, CfnOutput, ScopedAws, Stack, Token } from '../lib'; import { Intrinsic } from '../lib/private/intrinsic'; +import { evaluateCFN } from './evaluate-cfn'; import { toCloudFormation } from './util'; nodeunitShim({ @@ -103,13 +104,13 @@ nodeunitShim({ fails: { 'if doesn\'t start with "arn:"'(test: Test) { const stack = new Stack(); - test.throws(() => stack.parseArn('barn:foo:x:a:1:2'), /ARNs must start with "arn:": barn:foo/); + test.throws(() => stack.parseArn('barn:foo:x:a:1:2'), /ARNs must start with "arn:".*barn:foo/); test.done(); }, 'if the ARN doesnt have enough components'(test: Test) { const stack = new Stack(); - test.throws(() => stack.parseArn('arn:is:too:short'), /ARNs must have at least 6 components: arn:is:too:short/); + test.throws(() => stack.parseArn('arn:is:too:short'), /ARNs must.*have at least 6 components.*arn:is:too:short/); test.done(); }, @@ -156,10 +157,11 @@ nodeunitShim({ resourceName: '81e900317347585a0601e04c8d52eaEX', sep: ':', }, - 'arn::cognito-sync:::identitypool/us-east-1:1a1a1a1a-ffff-1111-9999-12345678:bla': { + 'arn:aws:cognito-sync:::identitypool/us-east-1:1a1a1a1a-ffff-1111-9999-12345678:bla': { service: 'cognito-sync', region: '', account: '', + partition: 'aws', resource: 'identitypool', resourceName: 'us-east-1:1a1a1a1a-ffff-1111-9999-12345678:bla', sep: '/', @@ -212,6 +214,31 @@ nodeunitShim({ test.done(); }, + 'extracting resource name from a complex ARN'(test: Test) { + // GIVEN + const stack = new Stack(); + const theToken = Token.asString({ Ref: 'SomeParameter' }); + + // WHEN + const parsed = Arn.extractResourceName(theToken, 'role'); + + // THEN + test.deepEqual(evaluateCFN(stack.resolve(parsed), { + SomeParameter: 'arn:aws:iam::111111111111:role/path/to/role/name', + }), 'path/to/role/name'); + + test.done(); + }, + + 'extractResourceName validates resource type if possible'(test: Test) { + // WHEN + test.throws(() => { + Arn.extractResourceName('arn:aws:iam::111111111111:banana/rama', 'role'); + }, /Expected resource type/); + + test.done(); + }, + 'returns empty string ARN components'(test: Test) { const stack = new Stack(); const arn = 'arn:aws:iam::123456789012:role/abc123'; diff --git a/packages/@aws-cdk/core/test/evaluate-cfn.ts b/packages/@aws-cdk/core/test/evaluate-cfn.ts index 7dfa66328c319..6d60949cc3193 100644 --- a/packages/@aws-cdk/core/test/evaluate-cfn.ts +++ b/packages/@aws-cdk/core/test/evaluate-cfn.ts @@ -6,9 +6,25 @@ import { isNameOfCloudFormationIntrinsic } from '../lib/private/cloudformation-lang'; export function evaluateCFN(object: any, context: {[key: string]: string} = {}): any { - const intrinsics: any = { + const intrinsicFns: any = { 'Fn::Join'(separator: string, args: string[]) { - return args.map(evaluate).join(separator); + if (typeof separator !== 'string') { + // CFN does not support expressions here! + throw new Error('\'separator\' argument of { Fn::Join } must be a string literal'); + } + return evaluate(args).map(evaluate).join(separator); + }, + + 'Fn::Split'(separator: string, args: any) { + if (typeof separator !== 'string') { + // CFN does not support expressions here! + throw new Error('\'separator\' argument of { Fn::Split } must be a string literal'); + } + return evaluate(args).split(separator); + }, + + 'Fn::Select'(index: number, args: any) { + return evaluate(args).map(evaluate)[index]; }, 'Ref'(logicalId: string) { @@ -56,13 +72,13 @@ export function evaluateCFN(object: any, context: {[key: string]: string} = {}): } if (typeof obj === 'object') { - const keys = Object.keys(obj); - if (keys.length === 1 && (isNameOfCloudFormationIntrinsic(keys[0]) || keys[0] === 'Ref')) { - return evaluateIntrinsic(keys[0], obj[keys[0]]); + const intrinsic = parseIntrinsic(obj); + if (intrinsic) { + return evaluateIntrinsic(intrinsic); } const ret: {[key: string]: any} = {}; - for (const key of keys) { + for (const key of Object.keys(obj)) { ret[key] = evaluateCFN(obj[key]); } return ret; @@ -71,15 +87,30 @@ export function evaluateCFN(object: any, context: {[key: string]: string} = {}): return obj; } - function evaluateIntrinsic(name: string, args: any) { - if (!(name in intrinsics)) { - throw new Error(`Intrinsic ${name} not supported here`); + function evaluateIntrinsic(intrinsic: Intrinsic) { + if (!(intrinsic.name in intrinsicFns)) { + throw new Error(`Intrinsic ${intrinsic.name} not supported here`); } - if (!Array.isArray(args)) { - args = [args]; - } + const argsAsArray = Array.isArray(intrinsic.args) ? intrinsic.args : [intrinsic.args]; - return intrinsics[name].apply(intrinsics, args); + return intrinsicFns[intrinsic.name].apply(intrinsicFns, argsAsArray); } } + +interface Intrinsic { + readonly name: string; + readonly args: any; +} + +function parseIntrinsic(x: any): Intrinsic | undefined { + if (typeof x !== 'object' || x === null) { return undefined; } + const keys = Object.keys(x); + if (keys.length === 1 && (isNameOfCloudFormationIntrinsic(keys[0]) || keys[0] === 'Ref')) { + return { + name: keys[0], + args: x[keys[0]], + }; + } + return undefined; +} \ No newline at end of file From 3dcd1a8345a20caad5100f810517f8e742bd65e8 Mon Sep 17 00:00:00 2001 From: Tom Jenkinson Date: Thu, 3 Dec 2020 00:35:43 +0000 Subject: [PATCH 263/314] feat(codepipeline-actions): support `executeBatchBuild` on `CodeBuildAction` (#11741) See [this doc](https://docs.aws.amazon.com/codebuild/latest/userguide/sample-pipeline-batch.html) which says >To enable batch builds in CodePipeline, set the BatchEnabled parameter of the configuration object to true. The configuration object it is referring to is [this](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-stages-actions.html#cfn-codepipeline-pipeline-stages-actions-configuration). I didn't add a test to ensure that `BatchEnabled` is not present by default because I wasn't sure exactly how to do this. Let me know if this is needed. It looks like `haveResourceLike` can take a function on `properties`, so maybe it's doable with that? Closes #11662 --- .../aws-codepipeline-actions/README.md | 1 + .../lib/codebuild/build-action.ts | 10 ++++ .../test/codebuild/test.codebuild-action.ts | 55 +++++++++++++++++++ 3 files changed, 66 insertions(+) diff --git a/packages/@aws-cdk/aws-codepipeline-actions/README.md b/packages/@aws-cdk/aws-codepipeline-actions/README.md index b84b9e574d8e5..ac6db2b9fab00 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/README.md +++ b/packages/@aws-cdk/aws-codepipeline-actions/README.md @@ -311,6 +311,7 @@ const buildAction = new codepipeline_actions.CodeBuildAction({ project, input: sourceOutput, outputs: [new codepipeline.Artifact()], // optional + executeBatchBuild: true // optional, defaults to false }); new codepipeline.Pipeline(this, 'MyPipeline', { diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/codebuild/build-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/codebuild/build-action.ts index cedc1db5ca90b..e81095b746eee 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/codebuild/build-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/codebuild/build-action.ts @@ -77,6 +77,13 @@ export interface CodeBuildActionProps extends codepipeline.CommonAwsActionProps * @default - No additional environment variables are specified. */ readonly environmentVariables?: { [name: string]: codebuild.BuildEnvironmentVariable }; + + /** + * Trigger a batch build. + * + * @default false + */ + readonly executeBatchBuild?: boolean; } /** @@ -176,6 +183,9 @@ export class CodeBuildAction extends Action { // lazy, because the Artifact name might be generated lazily configuration.PrimarySource = cdk.Lazy.string({ produce: () => this.props.input.artifactName }); } + if (this.props.executeBatchBuild) { + configuration.BatchEnabled = 'true'; + } return { configuration, }; diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/codebuild/test.codebuild-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/codebuild/test.codebuild-action.ts index 3dc54909d8f53..f5d5abaeb4934 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/codebuild/test.codebuild-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/codebuild/test.codebuild-action.ts @@ -202,5 +202,60 @@ export = { test.done(); }, + + 'sets the BatchEnabled configuration'(test: Test) { + const stack = new Stack(); + + const codeBuildProject = new codebuild.PipelineProject(stack, 'CodeBuild'); + + const sourceOutput = new codepipeline.Artifact(); + new codepipeline.Pipeline(stack, 'Pipeline', { + stages: [ + { + stageName: 'Source', + actions: [ + new cpactions.S3SourceAction({ + actionName: 'S3_Source', + bucket: new s3.Bucket(stack, 'Bucket'), + bucketKey: 'key', + output: sourceOutput, + }), + ], + }, + { + stageName: 'Build', + actions: [ + new cpactions.CodeBuildAction({ + actionName: 'CodeBuild', + input: sourceOutput, + project: codeBuildProject, + executeBatchBuild: true, + }), + ], + }, + ], + }); + + expect(stack).to(haveResourceLike('AWS::CodePipeline::Pipeline', { + 'Stages': [ + { + 'Name': 'Source', + }, + { + 'Name': 'Build', + 'Actions': [ + { + 'Name': 'CodeBuild', + 'Configuration': { + 'BatchEnabled': 'true', + }, + }, + ], + }, + ], + })); + + test.done(); + }, }, }; From 7458a9129a063be4b89c7755f7f65f7cc62e8db0 Mon Sep 17 00:00:00 2001 From: Neta Nir Date: Thu, 3 Dec 2020 02:08:54 -0800 Subject: [PATCH 264/314] chore: remove packaging prerequisites requirements from build (#11691) Split the prerequisites check for `pack` and `build`. Executing `build` does not execute pack, which means it does not require the tools for packaging (`mvn`, `python`, `.Net`, `java`) to be installed locally. This PR splits `check-prerequisites` into two separate scripts, `check-build-prerequisites` and `check-pack-prerequisites`. For build check: * `node` * `yarn` * `docker` (arguable, but fine) For pack check: * all build prerequisites * `mvn` * `java` * `.Net` * `python` ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- build.sh | 2 +- pack.sh | 4 + scripts/check-build-prerequisites.sh | 91 +++++++++++++++++++ ...uisites.sh => check-pack-prerequisites.sh} | 67 ++------------ 4 files changed, 102 insertions(+), 62 deletions(-) create mode 100644 scripts/check-build-prerequisites.sh rename scripts/{check-prerequisites.sh => check-pack-prerequisites.sh} (61%) diff --git a/build.sh b/build.sh index 13d525731b16e..14d8c27935405 100755 --- a/build.sh +++ b/build.sh @@ -56,7 +56,7 @@ fail() { # Verify all required tools are present before starting the build if [ "$check_prereqs" == "true" ]; then - /bin/bash ./scripts/check-prerequisites.sh + /bin/bash ./scripts/check-build-prerequisites.sh fi # Prepare for build with references diff --git a/pack.sh b/pack.sh index de48b7dea0c2f..727c6faaf63cd 100755 --- a/pack.sh +++ b/pack.sh @@ -19,6 +19,10 @@ distdir="$PWD/dist" rm -fr ${distdir} mkdir -p ${distdir} +if ${CHECK_PREREQS:-true}; then + /bin/bash ./scripts/check-pack-prerequisites.sh +fi + # Split out jsii and non-jsii packages. Jsii packages will be built all at once. # Non-jsii packages will be run individually. echo "Collecting package list..." >&2 diff --git a/scripts/check-build-prerequisites.sh b/scripts/check-build-prerequisites.sh new file mode 100644 index 0000000000000..c703d9f3e94e7 --- /dev/null +++ b/scripts/check-build-prerequisites.sh @@ -0,0 +1,91 @@ +#!/bin/bash +set -euo pipefail + +scriptdir=$(cd $(dirname $0) && pwd) + +# Testing with this to simulate different installed apps: +# docker run -it -v ~/Source/aws-cdk:/var/cdk ubuntu bash + +# Note: Don't use \d in regex, it doesn't work on Macs without GNU tools installed +# Use [0-9] instead + +die() { echo "$*" 1>&2 ; exit 1; } +wrong_version() { echo "Found $app version $app_v. Install $app >= $app_min" 1>&2; exit 1; } + +check_which() { + local app=$1 + local min=$2 + + echo -e "Checking if $app is installed... \c" + + w=$(which ${app}) || w="" + + if [ -z "$w" ] || [ "$w" == "$app not found" ] + then + die "Missing dependency: $app. Install $app >= $min" + else + echo "Ok" + fi +} + +app="" +app_min="" +app_v="" + +# [Node.js >= 10.13.0] +# ⚠️ versions `13.0.0` to `13.6.0` are not supported due to compatibility issues with our dependencies. +app="node" +app_min="v10.13.0" +check_which $app $app_min +app_v=$(node --version) + +# Check for version 10.*.* - 29.*.* +echo -e "Checking node version... \c" +if [ $(echo $app_v | grep -c -E "v[12][0-9]\.[0-9]+\.[0-9]+") -eq 1 ] +then + # Check for version 13.0 to 13.6 + if [ $(echo $app_v | grep -c -E "v13\.[0-6]\.[0-9]+") -eq 1 ] + then + die "node versions 13.0.0 to 13.6.0 are not supported due to compatibility issues with our dependencies." + else + # Check for version < 10.13 + if [ $(echo $app_v | grep -c -E "v10\.([0-9]|1[0-2])\.[0-9]+") -eq 1 ] + then + wrong_version + else + echo "Ok" + fi + fi +else + echo "Not 12" + wrong_version +fi + +# [Yarn >= 1.19.1, < 1.30] +app="yarn" +app_min="1.19.1" +check_which $app $app_min +app_v=$(${app} --version) +echo -e "Checking yarn version... \c" +if [ $(echo $app_v | grep -c -E "1\.(19|2[0-9])\.[0-9]+") -eq 1 ] +then + echo "Ok" +else + wrong_version +fi + +# [Docker >= 19.03] +app="docker" +app_min="19.03.0" +check_which $app $app_min + +# Make sure docker is running +echo -e "Checking if docker is running... \c" +docker_running=$(docker ps) +if [ $? -eq 0 ] +then + echo "Ok" +else + die "Docker is not running" +fi + diff --git a/scripts/check-prerequisites.sh b/scripts/check-pack-prerequisites.sh similarity index 61% rename from scripts/check-prerequisites.sh rename to scripts/check-pack-prerequisites.sh index 9a4232d9e3e2d..8dca0902114e5 100755 --- a/scripts/check-prerequisites.sh +++ b/scripts/check-pack-prerequisites.sh @@ -1,16 +1,15 @@ #!/bin/bash set -euo pipefail +scriptdir=$(cd $(dirname $0) && pwd) +source ${scriptdir}/check-build-prerequisites.sh + # Testing with this to simulate different installed apps: # docker run -it -v ~/Source/aws-cdk:/var/cdk ubuntu bash # Note: Don't use \d in regex, it doesn't work on Macs without GNU tools installed # Use [0-9] instead -app="" -app_min="" -app_v="" - die() { echo "$*" 1>&2 ; exit 1; } wrong_version() { echo "Found $app version $app_v. Install $app >= $app_min" 1>&2; exit 1; } @@ -30,47 +29,9 @@ check_which() { fi } -# [Node.js >= 10.13.0] -# ⚠️ versions `13.0.0` to `13.6.0` are not supported due to compatibility issues with our dependencies. -app="node" -app_min="v10.13.0" -check_which $app $app_min -app_v=$(node --version) - -# Check for version 10.*.* - 29.*.* -echo -e "Checking node version... \c" -if [ $(echo $app_v | grep -c -E "v[12][0-9]\.[0-9]+\.[0-9]+") -eq 1 ] -then - # Check for version 13.0 to 13.6 - if [ $(echo $app_v | grep -c -E "v13\.[0-6]\.[0-9]+") -eq 1 ] - then - die "node versions 13.0.0 to 13.6.0 are not supported due to compatibility issues with our dependencies." - else - # Check for version < 10.13 - if [ $(echo $app_v | grep -c -E "v10\.([0-9]|1[0-2])\.[0-9]+") -eq 1 ] - then - wrong_version - else - echo "Ok" - fi - fi -else - echo "Not 12" - wrong_version -fi - -# [Yarn >= 1.19.1, < 1.30] -app="yarn" -app_min="1.19.1" -check_which $app $app_min -app_v=$(${app} --version) -echo -e "Checking yarn version... \c" -if [ $(echo $app_v | grep -c -E "1\.(19|2[0-9])\.[0-9]+") -eq 1 ] -then - echo "Ok" -else - wrong_version -fi +app="" +app_min="" +app_v="" # [Java OpenJDK 8, 11, 14] @@ -143,19 +104,3 @@ then else wrong_version fi - -# [Docker >= 19.03] -app="docker" -app_min="19.03.0" -check_which $app $app_min - -# Make sure docker is running -echo -e "Checking if docker is running... \c" -docker_running=$(docker ps) -if [ $? -eq 0 ] -then - echo "Ok" -else - die "Docker is not running" -fi - From 384bb04e0eb458e25f90cac8157a2e6c3571bd69 Mon Sep 17 00:00:00 2001 From: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Date: Thu, 3 Dec 2020 02:49:03 -0800 Subject: [PATCH 265/314] docs(lambda): fix link for bundling asset code (#11847) Fixes: https://github.com/aws/aws-cdk/issues/11846 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-lambda/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-lambda/README.md b/packages/@aws-cdk/aws-lambda/README.md index 19eac465349ee..87910c3f9c4de 100644 --- a/packages/@aws-cdk/aws-lambda/README.md +++ b/packages/@aws-cdk/aws-lambda/README.md @@ -35,7 +35,7 @@ runtime code. limited to supported runtimes and the code cannot exceed 4KiB. * `lambda.Code.fromAsset(path)` - specify a directory or a .zip file in the local filesystem which will be zipped and uploaded to S3 before deployment. See also - [bundling asset code](#Bundling-Asset-Code). + [bundling asset code](#bundling-asset-code). The following example shows how to define a Python function and deploy the code from the local directory `my-lambda-handler` to it: From b37fad9ed25bfa39d681ef355462d17a28022bd0 Mon Sep 17 00:00:00 2001 From: Minchao Date: Fri, 4 Dec 2020 00:05:27 +0800 Subject: [PATCH 266/314] docs(lambda): fix docker image function example (#11830) The doc for lambda docker image function contains example code that doesn't work. ref: https://github.com/aws/aws-cdk/blob/e55f3cc5cf68fd5d79553934b3bb4bce333945be/packages/%40aws-cdk/aws-lambda/lib/image-function.ts#L30-L44 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-lambda/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda/README.md b/packages/@aws-cdk/aws-lambda/README.md index 87910c3f9c4de..54e7811688134 100644 --- a/packages/@aws-cdk/aws-lambda/README.md +++ b/packages/@aws-cdk/aws-lambda/README.md @@ -63,7 +63,7 @@ Dockerfile as the asset that will be used as the function handler. ```ts new lambda.DockerImageFunction(this, 'AssetFunction', { - code: DockerImageCode.fromAssetImage(path.join(__dirname, 'docker-handler')), + code: lambda.DockerImageCode.fromImageAsset(path.join(__dirname, 'docker-handler')), }); ``` @@ -74,7 +74,7 @@ import * as ecr from '@aws-cdk/aws-ecr'; const repo = new ecr.Repository(this, 'Repository'); new lambda.DockerImageFunction(this, 'ECRFunction', { - code: DockerImageCode.fromEcrImage(repo), + code: lambda.DockerImageCode.fromEcr(repo), }); ``` From 78b3c3934c054ef27dc0e164af88d83692ead91d Mon Sep 17 00:00:00 2001 From: jumi-dev <61919471+jumi-dev@users.noreply.github.com> Date: Thu, 3 Dec 2020 17:36:35 +0100 Subject: [PATCH 267/314] feat(cognito): user pool client - token validity (#11752) Configuration to specify accessTokenValidity, idTokenValidity and refreshTokenValidity when a new user pool client is created in Cognito. Closes #11689 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-cognito/README.md | 14 + .../aws-cognito/lib/user-pool-client.ts | 56 +++- .../aws-cognito/test/user-pool-client.test.ts | 289 +++++++++++++++++- 3 files changed, 357 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-cognito/README.md b/packages/@aws-cdk/aws-cognito/README.md index 5f88107b767c9..f139f9e7b55bc 100644 --- a/packages/@aws-cdk/aws-cognito/README.md +++ b/packages/@aws-cdk/aws-cognito/README.md @@ -558,6 +558,20 @@ pool.addClient('app-client', { }); ``` +In accordance with the OIDC open standard, Cognito user pool clients provide access tokens, ID tokens and refresh tokens. +More information is available at [Using Tokens with User Pools](https://docs.aws.amazon.com/en_us/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html). +The expiration time for these tokens can be configured as shown below. + +```ts +const pool = new cognito.UserPool(this, 'Pool'); +pool.addClient('app-client', { + // ... + accessTokenValidity: Duration.minutes(60), + idTokenValidity: Duration.minutes(60), + refreshTokenValidity: Duration.days(30), +}); +``` + ### Resource Servers A resource server is a server for access-protected resources. It handles authenticated requests from an app that has an diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool-client.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool-client.ts index 34e6f13f75cae..d8c8ae2d946bf 100644 --- a/packages/@aws-cdk/aws-cognito/lib/user-pool-client.ts +++ b/packages/@aws-cdk/aws-cognito/lib/user-pool-client.ts @@ -1,4 +1,4 @@ -import { IResource, Resource } from '@aws-cdk/core'; +import { IResource, Resource, Duration } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnUserPoolClient } from './cognito.generated'; import { IUserPool } from './user-pool'; @@ -248,6 +248,30 @@ export interface UserPoolClientOptions { * registered with the user pool using the `UserPool.registerIdentityProvider()` API. */ readonly supportedIdentityProviders?: UserPoolClientIdentityProvider[]; + + /** + * Validity of the ID token. + * Values between 5 minutes and 1 day are valid. The duration can not be longer than the refresh token validity. + * @see https://docs.aws.amazon.com/en_us/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html#amazon-cognito-user-pools-using-the-id-token + * @default Duration.minutes(60) + */ + readonly idTokenValidity?: Duration; + + /** + * Validity of the refresh token. + * Values between 60 minutes and 10 years are valid. + * @see https://docs.aws.amazon.com/en_us/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html#amazon-cognito-user-pools-using-the-refresh-token + * @default Duration.days(30) + */ + readonly refreshTokenValidity?: Duration; + + /** + * Validity of the access token. + * Values between 5 minutes and 1 day are valid. The duration can not be longer than the refresh token validity. + * @see https://docs.aws.amazon.com/en_us/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html#amazon-cognito-user-pools-using-the-access-token + * @default Duration.minutes(60) + */ + readonly accessTokenValidity?: Duration; } /** @@ -335,6 +359,7 @@ export class UserPoolClient extends Resource implements IUserPoolClient { preventUserExistenceErrors: this.configurePreventUserExistenceErrors(props.preventUserExistenceErrors), supportedIdentityProviders: this.configureIdentityProviders(props), }); + this.configureTokenValidity(resource, props); this.userPoolClientId = resource.ref; this._userPoolClientName = props.userPoolClientName; @@ -416,4 +441,33 @@ export class UserPoolClient extends Resource implements IUserPoolClient { if (providers.length === 0) { return undefined; } return Array.from(providers); } + + private configureTokenValidity(resource: CfnUserPoolClient, props: UserPoolClientProps) { + this.validateDuration('idTokenValidity', Duration.minutes(5), Duration.days(1), props.idTokenValidity); + this.validateDuration('accessTokenValidity', Duration.minutes(5), Duration.days(1), props.accessTokenValidity); + this.validateDuration('refreshTokenValidity', Duration.minutes(60), Duration.days(10 * 365), props.refreshTokenValidity); + if (props.refreshTokenValidity) { + this.validateDuration('idTokenValidity', Duration.minutes(5), props.refreshTokenValidity, props.idTokenValidity); + this.validateDuration('accessTokenValidity', Duration.minutes(5), props.refreshTokenValidity, props.accessTokenValidity); + } + + if (props.accessTokenValidity || props.idTokenValidity || props.refreshTokenValidity) { + resource.tokenValidityUnits = { + idToken: props.idTokenValidity ? 'minutes' : undefined, + accessToken: props.accessTokenValidity ? 'minutes' : undefined, + refreshToken: props.refreshTokenValidity ? 'minutes' : undefined, + }; + }; + + resource.idTokenValidity = props.idTokenValidity ? props.idTokenValidity.toMinutes() : undefined; + resource.refreshTokenValidity = props.refreshTokenValidity ? props.refreshTokenValidity.toMinutes() : undefined; + resource.accessTokenValidity = props.accessTokenValidity ? props.accessTokenValidity.toMinutes() : undefined; + } + + private validateDuration(name: string, min: Duration, max: Duration, value?: Duration) { + if (value === undefined) { return; } + if (value.toMilliseconds() < min.toMilliseconds() || value.toMilliseconds() > max.toMilliseconds()) { + throw new Error(`${name}: Must be a duration between ${min.toHumanString()} and ${max.toHumanString()} (inclusive); received ${value.toHumanString()}.`); + } + } } diff --git a/packages/@aws-cdk/aws-cognito/test/user-pool-client.test.ts b/packages/@aws-cdk/aws-cognito/test/user-pool-client.test.ts index 93c8937dba68b..1f961616b095b 100644 --- a/packages/@aws-cdk/aws-cognito/test/user-pool-client.test.ts +++ b/packages/@aws-cdk/aws-cognito/test/user-pool-client.test.ts @@ -1,6 +1,6 @@ import { ABSENT } from '@aws-cdk/assert'; import '@aws-cdk/assert/jest'; -import { Stack } from '@aws-cdk/core'; +import { Stack, Duration } from '@aws-cdk/core'; import { OAuthScope, ResourceServerScope, UserPool, UserPoolClient, UserPoolClientIdentityProvider, UserPoolIdentityProvider } from '../lib'; describe('User Pool Client', () => { @@ -540,4 +540,291 @@ describe('User Pool Client', () => { }, })).toThrow(/disableOAuth is set/); }); + + describe('token validity', () => { + test('default', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'Pool'); + + // WHEN + pool.addClient('Client1', { + userPoolClientName: 'Client1', + accessTokenValidity: Duration.minutes(60), + idTokenValidity: Duration.minutes(60), + refreshTokenValidity: Duration.days(30), + }); + pool.addClient('Client2', { + userPoolClientName: 'Client2', + accessTokenValidity: Duration.minutes(60), + }); + pool.addClient('Client3', { + userPoolClientName: 'Client3', + idTokenValidity: Duration.minutes(60), + }); + pool.addClient('Client4', { + userPoolClientName: 'Client4', + refreshTokenValidity: Duration.days(30), + }); + pool.addClient('Client5', { + userPoolClientName: 'Client5', + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::Cognito::UserPoolClient', { + ClientName: 'Client1', + AccessTokenValidity: 60, + IdTokenValidity: 60, + RefreshTokenValidity: 43200, + TokenValidityUnits: { + AccessToken: 'minutes', + IdToken: 'minutes', + RefreshToken: 'minutes', + }, + }); + expect(stack).toHaveResourceLike('AWS::Cognito::UserPoolClient', { + ClientName: 'Client2', + AccessTokenValidity: 60, + IdTokenValidity: ABSENT, + RefreshTokenValidity: ABSENT, + TokenValidityUnits: { + AccessToken: 'minutes', + IdToken: ABSENT, + RefreshToken: ABSENT, + }, + }); + expect(stack).toHaveResourceLike('AWS::Cognito::UserPoolClient', { + ClientName: 'Client3', + AccessTokenValidity: ABSENT, + IdTokenValidity: 60, + RefreshTokenValidity: ABSENT, + TokenValidityUnits: { + AccessToken: ABSENT, + IdToken: 'minutes', + RefreshToken: ABSENT, + }, + }); + expect(stack).toHaveResourceLike('AWS::Cognito::UserPoolClient', { + ClientName: 'Client4', + AccessTokenValidity: ABSENT, + IdTokenValidity: ABSENT, + RefreshTokenValidity: 43200, + TokenValidityUnits: { + AccessToken: ABSENT, + IdToken: ABSENT, + RefreshToken: 'minutes', + }, + }); + expect(stack).toHaveResourceLike('AWS::Cognito::UserPoolClient', { + ClientName: 'Client5', + TokenValidityUnits: ABSENT, + IdTokenValidity: ABSENT, + RefreshTokenValidity: ABSENT, + AccessTokenValidity: ABSENT, + }); + }); + + test.each([ + Duration.minutes(0), + Duration.minutes(4), + Duration.days(1).plus(Duration.minutes(1)), + Duration.days(2), + ])('validates accessTokenValidity is a duration between 5 minutes and 1 day', (validity) => { + const stack = new Stack(); + const pool = new UserPool(stack, 'Pool'); + expect(() => { + pool.addClient('Client1', { + userPoolClientName: 'Client1', + accessTokenValidity: validity, + }); + }).toThrow(`accessTokenValidity: Must be a duration between 5 minutes and 1 day (inclusive); received ${validity.toHumanString()}.`); + }); + + test.each([ + Duration.minutes(0), + Duration.minutes(4), + Duration.days(1).plus(Duration.minutes(1)), + Duration.days(2), + ])('validates idTokenValidity is a duration between 5 minutes and 1 day', (validity) => { + const stack = new Stack(); + const pool = new UserPool(stack, 'Pool'); + expect(() => { + pool.addClient('Client1', { + userPoolClientName: 'Client1', + idTokenValidity: validity, + }); + }).toThrow(`idTokenValidity: Must be a duration between 5 minutes and 1 day (inclusive); received ${validity.toHumanString()}.`); + }); + + test.each([ + Duration.hours(1).plus(Duration.minutes(1)), + Duration.hours(12), + Duration.days(1), + ])('validates accessTokenValidity is not greater than refresh token expiration', (validity) => { + const stack = new Stack(); + const pool = new UserPool(stack, 'Pool'); + expect(() => { + pool.addClient('Client1', { + userPoolClientName: 'Client1', + accessTokenValidity: validity, + refreshTokenValidity: Duration.hours(1), + }); + }).toThrow(`accessTokenValidity: Must be a duration between 5 minutes and 60 minutes (inclusive); received ${validity.toHumanString()}.`); + }); + + test.each([ + Duration.hours(1).plus(Duration.minutes(1)), + Duration.hours(12), + Duration.days(1), + ])('validates idTokenValidity is not greater than refresh token expiration', (validity) => { + const stack = new Stack(); + const pool = new UserPool(stack, 'Pool'); + expect(() => { + pool.addClient('Client1', { + userPoolClientName: 'Client1', + idTokenValidity: validity, + refreshTokenValidity: Duration.hours(1), + }); + }).toThrow(`idTokenValidity: Must be a duration between 5 minutes and 60 minutes (inclusive); received ${validity.toHumanString()}.`); + }); + + test.each([ + Duration.minutes(0), + Duration.minutes(59), + Duration.days(10 * 365).plus(Duration.minutes(1)), + Duration.days(10 * 365 + 1), + ])('validates refreshTokenValidity is a duration between 60 minutes and 10 years', (validity) => { + const stack = new Stack(); + const pool = new UserPool(stack, 'Pool'); + expect(() => { + pool.addClient('Client1', { + userPoolClientName: 'Client1', + refreshTokenValidity: validity, + }); + }).toThrow(`refreshTokenValidity: Must be a duration between 60 minutes and 3650 days (inclusive); received ${validity.toHumanString()}.`); + }); + + test.each([ + Duration.minutes(5), + Duration.minutes(60), + Duration.days(1), + ])('validates accessTokenValidity is a duration between 5 minutes and 1 day (valid)', (validity) => { + const stack = new Stack(); + const pool = new UserPool(stack, 'Pool'); + + // WHEN + pool.addClient('Client1', { + userPoolClientName: 'Client1', + accessTokenValidity: validity, + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::Cognito::UserPoolClient', { + ClientName: 'Client1', + AccessTokenValidity: validity.toMinutes(), + TokenValidityUnits: { + AccessToken: 'minutes', + }, + }); + }); + + test.each([ + Duration.minutes(5), + Duration.minutes(60), + Duration.days(1), + ])('validates idTokenValidity is a duration between 5 minutes and 1 day (valid)', (validity) => { + const stack = new Stack(); + const pool = new UserPool(stack, 'Pool'); + + // WHEN + pool.addClient('Client1', { + userPoolClientName: 'Client1', + idTokenValidity: validity, + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::Cognito::UserPoolClient', { + ClientName: 'Client1', + IdTokenValidity: validity.toMinutes(), + TokenValidityUnits: { + IdToken: 'minutes', + }, + }); + }); + + test.each([ + Duration.minutes(60), + Duration.minutes(120), + Duration.days(365), + Duration.days(10 * 365), + ])('validates refreshTokenValidity is a duration between 60 minutes and 10 years (valid)', (validity) => { + const stack = new Stack(); + const pool = new UserPool(stack, 'Pool'); + + // WHEN + pool.addClient('Client1', { + userPoolClientName: 'Client1', + refreshTokenValidity: validity, + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::Cognito::UserPoolClient', { + ClientName: 'Client1', + RefreshTokenValidity: validity.toMinutes(), + TokenValidityUnits: { + RefreshToken: 'minutes', + }, + }); + }); + + test.each([ + Duration.minutes(5), + Duration.minutes(60), + Duration.hours(1), + ])('validates accessTokenValidity is not greater than refresh token expiration (valid)', (validity) => { + const stack = new Stack(); + const pool = new UserPool(stack, 'Pool'); + + // WHEN + pool.addClient('Client1', { + userPoolClientName: 'Client1', + accessTokenValidity: validity, + refreshTokenValidity: Duration.hours(1), + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::Cognito::UserPoolClient', { + ClientName: 'Client1', + AccessTokenValidity: validity.toMinutes(), + TokenValidityUnits: { + AccessToken: 'minutes', + }, + }); + }); + + test.each([ + Duration.minutes(5), + Duration.minutes(60), + Duration.hours(1), + ])('validates idTokenValidity is not greater than refresh token expiration (valid)', (validity) => { + const stack = new Stack(); + const pool = new UserPool(stack, 'Pool'); + + // WHEN + pool.addClient('Client1', { + userPoolClientName: 'Client1', + idTokenValidity: validity, + refreshTokenValidity: Duration.hours(1), + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::Cognito::UserPoolClient', { + ClientName: 'Client1', + IdTokenValidity: validity.toMinutes(), + TokenValidityUnits: { + IdToken: 'minutes', + }, + }); + }); + }); }); \ No newline at end of file From c5c258ac8c7cf24e541472d1fce1e971604e0aaa Mon Sep 17 00:00:00 2001 From: Setu Shah Date: Fri, 4 Dec 2020 02:07:02 -0800 Subject: [PATCH 268/314] feat(lambda-python): support poetry packaging for PythonFunction (#11850) This PR adds [poetry](https://python-poetry.org/) support to building Lambda dependencies for the PythonFunction. I used the pipenv setup for inspiration. I'm not very familiar with writing integration tests, so there's a possibility that I could've missed something. Closes #11753. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-lambda-python/README.md | 16 +- .../lib/Dockerfile.dependencies | 7 +- .../aws-lambda-python/lib/bundling.ts | 4 + .../aws-lambda-python/test/bundling.test.ts | 11 + .../test/integ.function.poetry.expected.json | 314 ++++++++++++++++++ .../test/integ.function.poetry.ts | 45 +++ .../test/lambda-handler-poetry/index.py | 11 + .../test/lambda-handler-poetry/poetry.lock | 122 +++++++ .../test/lambda-handler-poetry/pyproject.toml | 16 + 9 files changed, 540 insertions(+), 6 deletions(-) create mode 100644 packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.expected.json create mode 100644 packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.ts create mode 100644 packages/@aws-cdk/aws-lambda-python/test/lambda-handler-poetry/index.py create mode 100644 packages/@aws-cdk/aws-lambda-python/test/lambda-handler-poetry/poetry.lock create mode 100644 packages/@aws-cdk/aws-lambda-python/test/lambda-handler-poetry/pyproject.toml diff --git a/packages/@aws-cdk/aws-lambda-python/README.md b/packages/@aws-cdk/aws-lambda-python/README.md index 5cec4ff077a48..7f9afc15072b9 100644 --- a/packages/@aws-cdk/aws-lambda-python/README.md +++ b/packages/@aws-cdk/aws-lambda-python/README.md @@ -1,4 +1,5 @@ # Amazon Lambda Python Library + --- @@ -25,13 +26,13 @@ Define a `PythonFunction`: ```ts import * as lambda from "@aws-cdk/aws-lambda"; -import { PythonFunction } from "@aws-cdk/aws-lambda-python" +import { PythonFunction } from "@aws-cdk/aws-lambda-python"; new PythonFunction(this, 'MyFunction', { entry: '/path/to/my/function', // required index: 'my_index.py', // optional, defaults to 'index.py' handler: 'my_exported_func', // optional, defaults to 'handler' - runtime: lambda.Runtime.PYTHON_3_6 // optional, defaults to lambda.Runtime.PYTHON_3_7 + runtime: lambda.Runtime.PYTHON_3_6, // optional, defaults to lambda.Runtime.PYTHON_3_7 }); ``` @@ -60,10 +61,19 @@ according to the `runtime`. ├── Pipfile.lock # your lock file ``` +**Lambda with a poetry.lock** + +```plaintext +. +├── lambda_function.py # exports a function named 'handler' +├── pyproject.toml # has to be present at the entry path +├── poetry.lock # your poetry lock file +``` + **Lambda Layer Support** You may create a python-based lambda layer with `PythonLayerVersion`. If `PythonLayerVersion` detects a `requirements.txt` -or `Pipfile` at the entry path, then `PythonLayerVersion` will include the dependencies inline with your code in the +or `Pipfile` or `poetry.lock` with the associated `pyproject.toml` at the entry path, then `PythonLayerVersion` will include the dependencies inline with your code in the layer. ```ts diff --git a/packages/@aws-cdk/aws-lambda-python/lib/Dockerfile.dependencies b/packages/@aws-cdk/aws-lambda-python/lib/Dockerfile.dependencies index 4d02d028b187b..bfdb9e093ed4a 100644 --- a/packages/@aws-cdk/aws-lambda-python/lib/Dockerfile.dependencies +++ b/packages/@aws-cdk/aws-lambda-python/lib/Dockerfile.dependencies @@ -6,13 +6,14 @@ FROM $IMAGE # Ensure rsync is installed RUN yum -q list installed rsync &>/dev/null || yum install -y rsync -# Install pipenv so we can create a requirements.txt if we detect pipfile -RUN pip install pipenv +# Install pipenv and poetry so we can create a requirements.txt if we detect pipfile or poetry.lock respectively +RUN pip install pipenv poetry # Install the dependencies in a cacheable layer WORKDIR /var/dependencies -COPY Pipfile* requirements.tx[t] ./ +COPY Pipfile* pyproject* poetry* requirements.tx[t] ./ RUN [ -f 'Pipfile' ] && pipenv lock -r >requirements.txt; \ + [ -f 'poetry.lock' ] && poetry export --with-credentials --format requirements.txt --output requirements.txt; \ [ -f 'requirements.txt' ] && pip install -r requirements.txt -t .; CMD [ "python" ] diff --git a/packages/@aws-cdk/aws-lambda-python/lib/bundling.ts b/packages/@aws-cdk/aws-lambda-python/lib/bundling.ts index 937d420397773..d5747e169abb2 100644 --- a/packages/@aws-cdk/aws-lambda-python/lib/bundling.ts +++ b/packages/@aws-cdk/aws-lambda-python/lib/bundling.ts @@ -80,6 +80,10 @@ export function hasDependencies(entry: string): boolean { return true; } + if (fs.existsSync(path.join(entry, 'poetry.lock'))) { + return true; + } + if (fs.existsSync(path.join(entry, 'requirements.txt'))) { return true; } diff --git a/packages/@aws-cdk/aws-lambda-python/test/bundling.test.ts b/packages/@aws-cdk/aws-lambda-python/test/bundling.test.ts index ca415f60e5476..4286d092adf8f 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/bundling.test.ts +++ b/packages/@aws-cdk/aws-lambda-python/test/bundling.test.ts @@ -140,6 +140,17 @@ describe('Dependency detection', () => { expect(hasDependencies('/asset-input')).toEqual(true); }); + test('Detects poetry', () => { + existsSyncMock.mockImplementation((p: fs.PathLike) => { + if (/poetry.lock/.test(p.toString())) { + return true; + } + return existsSyncOriginal(p); + }); + + expect(hasDependencies('/asset-input')).toEqual(true); + }); + test('Detects requirements.txt', () => { existsSyncMock.mockImplementation((p: fs.PathLike) => { if (/requirements.txt/.test(p.toString())) { diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.expected.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.expected.json new file mode 100644 index 0000000000000..0c310b5f52e7e --- /dev/null +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.expected.json @@ -0,0 +1,314 @@ +{ + "Resources": { + "myhandlerinlineServiceRole10C681F6": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ] + } + }, + "myhandlerinline53D120C7": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Ref": "AssetParameterseef17c074659b655f9b413019323db3976d06067e78d53c4e609ebe177ce255bS3BucketDF70124D" + }, + "S3Key": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParameterseef17c074659b655f9b413019323db3976d06067e78d53c4e609ebe177ce255bS3VersionKey530C68B0" + } + ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParameterseef17c074659b655f9b413019323db3976d06067e78d53c4e609ebe177ce255bS3VersionKey530C68B0" + } + ] + } + ] + } + ] + ] + } + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "myhandlerinlineServiceRole10C681F6", + "Arn" + ] + }, + "Runtime": "python3.6" + }, + "DependsOn": [ + "myhandlerinlineServiceRole10C681F6" + ] + }, + "myhandlerpython27ServiceRole2ED49C06": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ] + } + }, + "myhandlerpython274D7465EA": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Ref": "AssetParametersf37a4de97ca8831930cd2d0dc3f0962e653d756a118ce33271752a745489c014S3BucketB5A59BD8" + }, + "S3Key": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParametersf37a4de97ca8831930cd2d0dc3f0962e653d756a118ce33271752a745489c014S3VersionKey7657015C" + } + ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParametersf37a4de97ca8831930cd2d0dc3f0962e653d756a118ce33271752a745489c014S3VersionKey7657015C" + } + ] + } + ] + } + ] + ] + } + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "myhandlerpython27ServiceRole2ED49C06", + "Arn" + ] + }, + "Runtime": "python2.7" + }, + "DependsOn": [ + "myhandlerpython27ServiceRole2ED49C06" + ] + }, + "myhandlerpython38ServiceRole2049AFF7": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ] + } + }, + "myhandlerpython384D62BBB5": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Ref": "AssetParameters3eb927f8df31281e22c710f842018fa10b0dde86f74f89313c9a27db6e75846aS3Bucket31144813" + }, + "S3Key": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParameters3eb927f8df31281e22c710f842018fa10b0dde86f74f89313c9a27db6e75846aS3VersionKeyB48E8383" + } + ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParameters3eb927f8df31281e22c710f842018fa10b0dde86f74f89313c9a27db6e75846aS3VersionKeyB48E8383" + } + ] + } + ] + } + ] + ] + } + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "myhandlerpython38ServiceRole2049AFF7", + "Arn" + ] + }, + "Runtime": "python3.8" + }, + "DependsOn": [ + "myhandlerpython38ServiceRole2049AFF7" + ] + } + }, + "Parameters": { + "AssetParameterseef17c074659b655f9b413019323db3976d06067e78d53c4e609ebe177ce255bS3BucketDF70124D": { + "Type": "String", + "Description": "S3 bucket for asset \"eef17c074659b655f9b413019323db3976d06067e78d53c4e609ebe177ce255b\"" + }, + "AssetParameterseef17c074659b655f9b413019323db3976d06067e78d53c4e609ebe177ce255bS3VersionKey530C68B0": { + "Type": "String", + "Description": "S3 key for asset version \"eef17c074659b655f9b413019323db3976d06067e78d53c4e609ebe177ce255b\"" + }, + "AssetParameterseef17c074659b655f9b413019323db3976d06067e78d53c4e609ebe177ce255bArtifactHashEE8E0CE9": { + "Type": "String", + "Description": "Artifact hash for asset \"eef17c074659b655f9b413019323db3976d06067e78d53c4e609ebe177ce255b\"" + }, + "AssetParametersf37a4de97ca8831930cd2d0dc3f0962e653d756a118ce33271752a745489c014S3BucketB5A59BD8": { + "Type": "String", + "Description": "S3 bucket for asset \"f37a4de97ca8831930cd2d0dc3f0962e653d756a118ce33271752a745489c014\"" + }, + "AssetParametersf37a4de97ca8831930cd2d0dc3f0962e653d756a118ce33271752a745489c014S3VersionKey7657015C": { + "Type": "String", + "Description": "S3 key for asset version \"f37a4de97ca8831930cd2d0dc3f0962e653d756a118ce33271752a745489c014\"" + }, + "AssetParametersf37a4de97ca8831930cd2d0dc3f0962e653d756a118ce33271752a745489c014ArtifactHash7768674B": { + "Type": "String", + "Description": "Artifact hash for asset \"f37a4de97ca8831930cd2d0dc3f0962e653d756a118ce33271752a745489c014\"" + }, + "AssetParameters3eb927f8df31281e22c710f842018fa10b0dde86f74f89313c9a27db6e75846aS3Bucket31144813": { + "Type": "String", + "Description": "S3 bucket for asset \"3eb927f8df31281e22c710f842018fa10b0dde86f74f89313c9a27db6e75846a\"" + }, + "AssetParameters3eb927f8df31281e22c710f842018fa10b0dde86f74f89313c9a27db6e75846aS3VersionKeyB48E8383": { + "Type": "String", + "Description": "S3 key for asset version \"3eb927f8df31281e22c710f842018fa10b0dde86f74f89313c9a27db6e75846a\"" + }, + "AssetParameters3eb927f8df31281e22c710f842018fa10b0dde86f74f89313c9a27db6e75846aArtifactHash652F614E": { + "Type": "String", + "Description": "Artifact hash for asset \"3eb927f8df31281e22c710f842018fa10b0dde86f74f89313c9a27db6e75846a\"" + } + }, + "Outputs": { + "InlineFunctionName": { + "Value": { + "Ref": "myhandlerinline53D120C7" + } + }, + "Python27FunctionName": { + "Value": { + "Ref": "myhandlerpython274D7465EA" + } + }, + "Python38FunctionName": { + "Value": { + "Ref": "myhandlerpython384D62BBB5" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.ts b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.ts new file mode 100644 index 0000000000000..d3eaafe75a120 --- /dev/null +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.ts @@ -0,0 +1,45 @@ +/// !cdk-integ pragma:ignore-assets +import * as path from 'path'; +import { Runtime } from '@aws-cdk/aws-lambda'; +import { App, CfnOutput, Stack, StackProps } from '@aws-cdk/core'; +import { Construct } from 'constructs'; +import * as lambda from '../lib'; + +/* + * Stack verification steps: + * aws lambda invoke --function-name --invocation-type Event --payload $(base64 <<<''OK'') response.json + */ + +class TestStack extends Stack { + constructor(scope: Construct, id: string, props?: StackProps) { + super(scope, id, props); + + const pythonFunctionInline = new lambda.PythonFunction(this, 'my_handler_inline', { + entry: path.join(__dirname, 'lambda-handler-poetry'), + runtime: Runtime.PYTHON_3_6, + }); + new CfnOutput(this, 'InlineFunctionName', { + value: pythonFunctionInline.functionName, + }); + + const pythonFunction27 = new lambda.PythonFunction(this, 'my_handler_python_27', { + entry: path.join(__dirname, 'lambda-handler-poetry'), + runtime: Runtime.PYTHON_2_7, + }); + new CfnOutput(this, 'Python27FunctionName', { + value: pythonFunction27.functionName, + }); + + const pythonFunction38 = new lambda.PythonFunction(this, 'my_handler_python_38', { + entry: path.join(__dirname, 'lambda-handler-poetry'), + runtime: Runtime.PYTHON_3_8, + }); + new CfnOutput(this, 'Python38FunctionName', { + value: pythonFunction38.functionName, + }); + } +} + +const app = new App(); +new TestStack(app, 'cdk-integ-lambda-python'); +app.synth(); diff --git a/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-poetry/index.py b/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-poetry/index.py new file mode 100644 index 0000000000000..c033f37560534 --- /dev/null +++ b/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-poetry/index.py @@ -0,0 +1,11 @@ +import requests +from PIL import Image + +def handler(event, context): + response = requests.get('https://a0.awsstatic.com/main/images/logos/aws_smile-header-desktop-en-white_59x35.png', stream=True) + img = Image.open(response.raw) + + print(response.status_code) + print(img.size) + + return response.status_code diff --git a/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-poetry/poetry.lock b/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-poetry/poetry.lock new file mode 100644 index 0000000000000..3d343fcf061a2 --- /dev/null +++ b/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-poetry/poetry.lock @@ -0,0 +1,122 @@ +[[package]] +name = "certifi" +version = "2020.11.8" +description = "Python package for providing Mozilla's CA Bundle." +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "chardet" +version = "3.0.4" +description = "Universal encoding detector for Python 2 and 3" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "idna" +version = "2.10" +description = "Internationalized Domain Names in Applications (IDNA)" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[[package]] +name = "pillow" +version = "6.2.2" +description = "Python Imaging Library (Fork)" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[[package]] +name = "requests" +version = "2.23.0" +description = "Python HTTP for Humans." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[package.dependencies] +certifi = ">=2017.4.17" +chardet = ">=3.0.2,<4" +idna = ">=2.5,<3" +urllib3 = ">=1.21.1,<1.25.0 || >1.25.0,<1.25.1 || >1.25.1,<1.26" + +[package.extras] +security = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)"] +socks = ["PySocks (>=1.5.6,!=1.5.7)", "win-inet-pton"] + +[[package]] +name = "urllib3" +version = "1.25.11" +description = "HTTP library with thread-safe connection pooling, file post, and more." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" + +[package.extras] +brotli = ["brotlipy (>=0.6.0)"] +secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"] +socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] + +[metadata] +lock-version = "1.1" +python-versions = "^2.7" +content-hash = "033798f820d979d69232ab05eb36fb9d517a49e5a6887c6d0e709aea9671464d" + +[metadata.files] +certifi = [ + {file = "certifi-2020.11.8-py2.py3-none-any.whl", hash = "sha256:1f422849db327d534e3d0c5f02a263458c3955ec0aae4ff09b95f195c59f4edd"}, + {file = "certifi-2020.11.8.tar.gz", hash = "sha256:f05def092c44fbf25834a51509ef6e631dc19765ab8a57b4e7ab85531f0a9cf4"}, +] +chardet = [ + {file = "chardet-3.0.4-py2.py3-none-any.whl", hash = "sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"}, + {file = "chardet-3.0.4.tar.gz", hash = "sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae"}, +] +idna = [ + {file = "idna-2.10-py2.py3-none-any.whl", hash = "sha256:b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0"}, + {file = "idna-2.10.tar.gz", hash = "sha256:b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6"}, +] +pillow = [ + {file = "Pillow-6.2.2-cp27-cp27m-macosx_10_6_intel.whl", hash = "sha256:834dd023b7f987d6b700ad93dc818098d7eb046bd445e9992b3093c6f9d7a95f"}, + {file = "Pillow-6.2.2-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:d3a98444a00b4643b22b0685dbf9e0ddcaf4ebfd4ea23f84f228adf5a0765bb2"}, + {file = "Pillow-6.2.2-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:2b4a94be53dff02af90760c10a2e3634c3c7703410f38c98154d5ce71fe63d20"}, + {file = "Pillow-6.2.2-cp27-cp27m-win32.whl", hash = "sha256:87ef0eca169f7f0bc050b22f05c7e174a65c36d584428431e802c0165c5856ea"}, + {file = "Pillow-6.2.2-cp27-cp27m-win_amd64.whl", hash = "sha256:cbd5647097dc55e501f459dbac7f1d0402225636deeb9e0a98a8d2df649fc19d"}, + {file = "Pillow-6.2.2-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:4adc3302df4faf77c63ab3a83e1a3e34b94a6a992084f4aa1cb236d1deaf4b39"}, + {file = "Pillow-6.2.2-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:e3a797a079ce289e59dbd7eac9ca3bf682d52687f718686857281475b7ca8e6a"}, + {file = "Pillow-6.2.2-cp35-cp35m-macosx_10_6_intel.whl", hash = "sha256:bb7861e4618a0c06c40a2e509c1bea207eea5fd4320d486e314e00745a402ca5"}, + {file = "Pillow-6.2.2-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:535e8e0e02c9f1fc2e307256149d6ee8ad3aa9a6e24144b7b6e6fb6126cb0e99"}, + {file = "Pillow-6.2.2-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:bc149dab804291a18e1186536519e5e122a2ac1316cb80f506e855a500b1cdd4"}, + {file = "Pillow-6.2.2-cp35-cp35m-win32.whl", hash = "sha256:1a3bc8e1db5af40a81535a62a591fafdb30a8a1b319798ea8052aa65ef8f06d2"}, + {file = "Pillow-6.2.2-cp35-cp35m-win_amd64.whl", hash = "sha256:d6b4dc325170bee04ca8292bbd556c6f5398d52c6149ca881e67daf62215426f"}, + {file = "Pillow-6.2.2-cp36-cp36m-macosx_10_6_intel.whl", hash = "sha256:43ef1cff7ee57f9c8c8e6fa02a62eae9fa23a7e34418c7ce88c0e3fe09d1fb38"}, + {file = "Pillow-6.2.2-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:900de1fdc93764be13f6b39dc0dd0207d9ff441d87ad7c6e97e49b81987dc0f3"}, + {file = "Pillow-6.2.2-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:92b83b380f9181cacc994f4c983d95a9c8b00b50bf786c66d235716b526a3332"}, + {file = "Pillow-6.2.2-cp36-cp36m-win32.whl", hash = "sha256:00e0bbe9923adc5cc38a8da7d87d4ce16cde53b8d3bba8886cb928e84522d963"}, + {file = "Pillow-6.2.2-cp36-cp36m-win_amd64.whl", hash = "sha256:5ccfcb0a34ad9b77ad247c231edb781763198f405a5c8dc1b642449af821fb7f"}, + {file = "Pillow-6.2.2-cp37-cp37m-macosx_10_6_intel.whl", hash = "sha256:5dcbbaa3a24d091a64560d3c439a8962866a79a033d40eb1a75f1b3413bfc2bc"}, + {file = "Pillow-6.2.2-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:6e2a7e74d1a626b817ecb7a28c433b471a395c010b2a1f511f976e9ea4363e64"}, + {file = "Pillow-6.2.2-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:c424d35a5259be559b64490d0fd9e03fba81f1ce8e5b66e0a59de97547351d80"}, + {file = "Pillow-6.2.2-cp37-cp37m-win32.whl", hash = "sha256:aa4792ab056f51b49e7d59ce5733155e10a918baf8ce50f64405db23d5627fa2"}, + {file = "Pillow-6.2.2-cp37-cp37m-win_amd64.whl", hash = "sha256:0d5c99f80068f13231ac206bd9b2e80ea357f5cf9ae0fa97fab21e32d5b61065"}, + {file = "Pillow-6.2.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:03457e439d073770d88afdd90318382084732a5b98b0eb6f49454746dbaae701"}, + {file = "Pillow-6.2.2-cp38-cp38-manylinux1_i686.whl", hash = "sha256:ccf16fe444cc43800eeacd4f4769971200982200a71b1368f49410d0eb769543"}, + {file = "Pillow-6.2.2-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:b72c39585f1837d946bd1a829a4820ccf86e361f28cbf60f5d646f06318b61e2"}, + {file = "Pillow-6.2.2-cp38-cp38-win32.whl", hash = "sha256:3ba7d8f1d962780f86aa747fef0baf3211b80cb13310fff0c375da879c0656d4"}, + {file = "Pillow-6.2.2-cp38-cp38-win_amd64.whl", hash = "sha256:3e81485cec47c24f5fb27acb485a4fc97376b2b332ed633867dc68ac3077998c"}, + {file = "Pillow-6.2.2-pp273-pypy_73-win32.whl", hash = "sha256:aa1b0297e352007ec781a33f026afbb062a9a9895bb103c8f49af434b1666880"}, + {file = "Pillow-6.2.2-pp373-pypy36_pp73-win32.whl", hash = "sha256:82859575005408af81b3e9171ae326ff56a69af5439d3fc20e8cb76cd51c8246"}, + {file = "Pillow-6.2.2.tar.gz", hash = "sha256:db9ff0c251ed066d367f53b64827cc9e18ccea001b986d08c265e53625dab950"}, +] +requests = [ + {file = "requests-2.23.0-py2.7.egg", hash = "sha256:5d2d0ffbb515f39417009a46c14256291061ac01ba8f875b90cad137de83beb4"}, + {file = "requests-2.23.0-py2.py3-none-any.whl", hash = "sha256:43999036bfa82904b6af1d99e4882b560e5e2c68e5c4b0aa03b655f3d7d73fee"}, + {file = "requests-2.23.0.tar.gz", hash = "sha256:b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6"}, +] +urllib3 = [ + {file = "urllib3-1.25.11-py2.py3-none-any.whl", hash = "sha256:f5321fbe4bf3fefa0efd0bfe7fb14e90909eb62a48ccda331726b4319897dd5e"}, + {file = "urllib3-1.25.11.tar.gz", hash = "sha256:8d7eaa5a82a1cac232164990f04874c594c9453ec55eef02eab885aa02fc17a2"}, +] diff --git a/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-poetry/pyproject.toml b/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-poetry/pyproject.toml new file mode 100644 index 0000000000000..15fec8cc54bec --- /dev/null +++ b/packages/@aws-cdk/aws-lambda-python/test/lambda-handler-poetry/pyproject.toml @@ -0,0 +1,16 @@ +[tool.poetry] +name = "lambda-handler-poetry" +version = "0.1.0" +description = "" +authors = ["Your Name "] + +[tool.poetry.dependencies] +python = "^2.7" +requests = "2.23.0" +pillow = "6.2.2" + +[tool.poetry.dev-dependencies] + +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" From cfb1c366797c53dbd434f1d50363dd871cd46ebc Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 4 Dec 2020 10:39:30 +0000 Subject: [PATCH 269/314] chore(deps-dev): bump typescript-json-schema from 0.44.1 to 0.45.0 (#11835) Bumps [typescript-json-schema](https://github.com/YousefED/typescript-json-schema) from 0.44.1 to 0.45.0. - [Release notes](https://github.com/YousefED/typescript-json-schema/releases) - [Commits](https://github.com/YousefED/typescript-json-schema/compare/v0.44.1...v0.45.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- .../cloud-assembly-schema/package.json | 2 +- yarn.lock | 97 ++----------------- 2 files changed, 9 insertions(+), 90 deletions(-) diff --git a/packages/@aws-cdk/cloud-assembly-schema/package.json b/packages/@aws-cdk/cloud-assembly-schema/package.json index 79504139bfd06..1f5489ce20b18 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/package.json +++ b/packages/@aws-cdk/cloud-assembly-schema/package.json @@ -66,7 +66,7 @@ "jest": "^26.6.3", "mock-fs": "^4.13.0", "pkglint": "0.0.0", - "typescript-json-schema": "^0.44.1" + "typescript-json-schema": "^0.45.0" }, "repository": { "url": "https://github.com/aws/aws-cdk.git", diff --git a/yarn.lock b/yarn.lock index 359874150b0b2..2a75227a20a35 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2057,11 +2057,6 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" -app-root-path@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.2.1.tgz#d0df4a682ee408273583d43f6f79e9892624bc9a" - integrity sha512-91IFKeKk7FjfmezPKkwtaRvSpnUc4gDwPAjA1YZ9Gn0q0PPeW+vbeUsZuyDwjI7+QTHhcLen2v25fi/AmhvbJA== - append-transform@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab" @@ -2299,7 +2294,7 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" -aws-sdk@^2.596.0, aws-sdk@^2.637.0, aws-sdk@^2.802.0: +aws-sdk@^2.637.0, aws-sdk@^2.802.0: version "2.802.0" resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.802.0.tgz#7215be2437c196f1b0b39a10feffdc1d1b980a62" integrity sha512-PfjBr5Ag4PdcEYPrfMclVWk85kFSJNe7qllZBE8RhYNu+K+Z2pveKfYkC5mqYoKEYIQyI9by9N47F+Tqm1GXtg== @@ -3737,16 +3732,6 @@ dot-prop@^5.1.0: dependencies: is-obj "^2.0.0" -dotenv-json@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/dotenv-json/-/dotenv-json-1.0.0.tgz#fc7f672aafea04bed33818733b9f94662332815c" - integrity sha512-jAssr+6r4nKhKRudQ0HOzMskOFFi9+ubXWwmrSGJFgTvpjyPXCXsCsYbjif6mXp7uxA7xY3/LGaiTQukZzSbOQ== - -dotenv@^8.0.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" - integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== - dotgitignore@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/dotgitignore/-/dotgitignore-2.1.0.tgz#a4b15a4e4ef3cf383598aaf1dfa4a04bcc089b7b" @@ -3970,11 +3955,6 @@ escodegen@^1.14.1, escodegen@^1.8.1: optionalDependencies: source-map "~0.6.1" -eslint-config-standard@^14.1.1: - version "14.1.1" - resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz#830a8e44e7aef7de67464979ad06b406026c56ea" - integrity sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg== - eslint-import-resolver-node@^0.3.4: version "0.3.4" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" @@ -4002,14 +3982,6 @@ eslint-module-utils@^2.6.0: debug "^2.6.9" pkg-dir "^2.0.0" -eslint-plugin-es@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893" - integrity sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ== - dependencies: - eslint-utils "^2.0.0" - regexpp "^3.0.0" - eslint-plugin-import@^2.22.1: version "2.22.1" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz#0896c7e6a0cf44109a2d97b95903c2bb689d7702" @@ -4029,33 +4001,11 @@ eslint-plugin-import@^2.22.1: resolve "^1.17.0" tsconfig-paths "^3.9.0" -eslint-plugin-node@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d" - integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g== - dependencies: - eslint-plugin-es "^3.0.0" - eslint-utils "^2.0.0" - ignore "^5.1.1" - minimatch "^3.0.4" - resolve "^1.10.1" - semver "^6.1.0" - -eslint-plugin-promise@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz#845fd8b2260ad8f82564c1222fce44ad71d9418a" - integrity sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw== - eslint-plugin-rulesdir@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/eslint-plugin-rulesdir/-/eslint-plugin-rulesdir-0.1.0.tgz#ad144d7e98464fda82963eff3fab331aecb2bf08" integrity sha1-rRRNfphGT9qClj7/P6szGuyyvwg= -eslint-plugin-standard@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.1.0.tgz#0c3bf3a67e853f8bbbc580fb4945fbf16f41b7c5" - integrity sha512-ZL7+QRixjTR6/528YNGyDotyffm5OQst/sGxKDwGb9Uqs4In5Egi4+jbobhqJoyoCM6/7v/1A5fhQ7ScMtDjaQ== - eslint-scope@^5.0.0, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -5166,7 +5116,7 @@ ignore@^4.0.3, ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.1.1, ignore@^5.1.4, ignore@^5.1.8, ignore@~5.1.8: +ignore@^5.1.4, ignore@^5.1.8, ignore@~5.1.8: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== @@ -5352,7 +5302,7 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" -is-core-module@^2.0.0, is-core-module@^2.1.0: +is-core-module@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== @@ -6437,24 +6387,6 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== -lambda-leak@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lambda-leak/-/lambda-leak-2.0.0.tgz#771985d3628487f6e885afae2b54510dcfb2cd7e" - integrity sha1-dxmF02KEh/boha+uK1RRDc+yzX4= - -lambda-tester@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/lambda-tester/-/lambda-tester-3.6.0.tgz#ceb7d4f4f0da768487a05cff37dcd088508b5247" - integrity sha512-F2ZTGWCLyIR95o/jWK46V/WnOCFAEUG/m/V7/CLhPJ7PCM+pror1rZ6ujP3TkItSGxUfpJi0kqwidw+M/nEqWw== - dependencies: - app-root-path "^2.2.1" - dotenv "^8.0.0" - dotenv-json "^1.0.0" - lambda-leak "^2.0.0" - semver "^6.1.1" - uuid "^3.3.2" - vandium-utils "^1.1.1" - lazystream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" @@ -8630,14 +8562,6 @@ resolve@^1.1.6, resolve@^1.10.0, resolve@^1.11.1, resolve@^1.13.1, resolve@^1.17 dependencies: path-parse "^1.0.6" -resolve@^1.10.1: - version "1.19.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" - integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== - dependencies: - is-core-module "^2.1.0" - path-parse "^1.0.6" - resolve@^1.18.1: version "1.18.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.18.1.tgz#018fcb2c5b207d2a6424aee361c5a266da8f4130" @@ -8795,7 +8719,7 @@ semver@7.x, semver@^7.1.1, semver@^7.2.1, semver@^7.3.2: resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== -semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.2.0, semver@^6.3.0: +semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -9956,10 +9880,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript-json-schema@^0.44.1: - version "0.44.1" - resolved "https://registry.yarnpkg.com/typescript-json-schema/-/typescript-json-schema-0.44.1.tgz#eeac4ffc6ec271a699e7958038ff49810402698b" - integrity sha512-DKB7rKzubOTXxT2CnQTQoCbS6SgJpqukJr2TWE9FbRK0iJY++wc24Pib3OAzIA+c9WylgfT3CxxCCetDsE55Nw== +typescript-json-schema@^0.45.0: + version "0.45.0" + resolved "https://registry.yarnpkg.com/typescript-json-schema/-/typescript-json-schema-0.45.0.tgz#2f244e99518e589a442ee5f9c1d2c85a1ec7dc84" + integrity sha512-4MeX0HIODRd+K1/sIbkPryGXG43PVQ9cvIC8gDYml6yBgcsWLjvPMpTNr9VV+bQwpDLncB8Ie4qSenuKUwNZpg== dependencies: "@types/json-schema" "^7.0.6" glob "^7.1.6" @@ -10165,11 +10089,6 @@ validate-npm-package-name@^3.0.0: dependencies: builtins "^1.0.3" -vandium-utils@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/vandium-utils/-/vandium-utils-1.2.0.tgz#44735de4b7641a05de59ebe945f174e582db4f59" - integrity sha1-RHNd5LdkGgXeWevpRfF05YLbT1k= - verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" From f3a59c8b5f5e50bfcef22af0adca8ebe0c5bd650 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 4 Dec 2020 13:56:22 +0000 Subject: [PATCH 270/314] chore(deps-dev): bump ts-node from 9.0.0 to 9.1.0 (#11873) Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 9.0.0 to 9.1.0. - [Release notes](https://github.com/TypeStrong/ts-node/releases) - [Commits](https://github.com/TypeStrong/ts-node/compare/v9.0.0...v9.1.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/aws-cdk-lib/package.json | 2 +- packages/monocdk/package.json | 2 +- yarn.lock | 14 ++++++++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index 5374e3242c745..3e637757b47de 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -274,7 +274,7 @@ "constructs": "^3.2.0", "fs-extra": "^9.0.1", "pkglint": "0.0.0", - "ts-node": "^9.0.0", + "ts-node": "^9.1.0", "typescript": "~3.8.3", "ubergen": "0.0.0" }, diff --git a/packages/monocdk/package.json b/packages/monocdk/package.json index 21b825dd89f55..b78a8c6adcc9c 100644 --- a/packages/monocdk/package.json +++ b/packages/monocdk/package.json @@ -273,7 +273,7 @@ "constructs": "^3.2.0", "fs-extra": "^9.0.1", "pkglint": "0.0.0", - "ts-node": "^9.0.0", + "ts-node": "^9.1.0", "typescript": "~3.8.3", "ubergen": "0.0.0" }, diff --git a/yarn.lock b/yarn.lock index 2a75227a20a35..73e7fd97cdafc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3337,6 +3337,11 @@ crc32-stream@^4.0.1: crc-32 "^1.2.0" readable-stream "^3.4.0" +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + cross-spawn@^4: version "4.0.2" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41" @@ -9764,12 +9769,13 @@ ts-node@^8.0.2: source-map-support "^0.5.17" yn "3.1.1" -ts-node@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.0.0.tgz#e7699d2a110cc8c0d3b831715e417688683460b3" - integrity sha512-/TqB4SnererCDR/vb4S/QvSZvzQMJN8daAslg7MeaiHvD8rDZsSfXmNeNumyZZzMned72Xoq/isQljYSt8Ynfg== +ts-node@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.1.0.tgz#95eae4c6d0f94f2545884078e1eb1b14d2155639" + integrity sha512-0yqcL4sgruCvM+w64LiAfNJo6+lHfCYc5Ajj4yiLNkJ9oZ2HWaa+Kso7htYOOxVQ7+csAjdUjffOe9PIqC4pMg== dependencies: arg "^4.1.0" + create-require "^1.1.0" diff "^4.0.1" make-error "^1.1.1" source-map-support "^0.5.17" From 5b7d0f225d0f4972f014d0a0dec83fd9efc4f216 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 4 Dec 2020 20:18:30 +0000 Subject: [PATCH 271/314] chore(deps): bump aws-sdk from 2.802.0 to 2.804.0 (#11880) Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.802.0 to 2.804.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.802.0...v2.804.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/aws-cloudfront-origins/package.json | 2 +- packages/@aws-cdk/aws-cloudfront/package.json | 2 +- packages/@aws-cdk/aws-cloudtrail/package.json | 2 +- packages/@aws-cdk/aws-codebuild/package.json | 2 +- packages/@aws-cdk/aws-codecommit/package.json | 2 +- packages/@aws-cdk/aws-dynamodb/package.json | 2 +- packages/@aws-cdk/aws-eks/package.json | 2 +- packages/@aws-cdk/aws-events-targets/package.json | 2 +- packages/@aws-cdk/aws-logs/package.json | 2 +- packages/@aws-cdk/aws-route53/package.json | 2 +- packages/@aws-cdk/aws-sqs/package.json | 2 +- packages/@aws-cdk/custom-resources/package.json | 2 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- yarn.lock | 8 ++++---- 15 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudfront-origins/package.json b/packages/@aws-cdk/aws-cloudfront-origins/package.json index 3b6d348539c5b..212652a19cb89 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/package.json +++ b/packages/@aws-cdk/aws-cloudfront-origins/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", - "aws-sdk": "^2.802.0", + "aws-sdk": "^2.804.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "pkglint": "0.0.0" diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index 1de410fc56061..a47d074758e54 100644 --- a/packages/@aws-cdk/aws-cloudfront/package.json +++ b/packages/@aws-cdk/aws-cloudfront/package.json @@ -74,7 +74,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.802.0", + "aws-sdk": "^2.804.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index 05b83b1a6a97d..2d8379f1c8844 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -74,7 +74,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.802.0", + "aws-sdk": "^2.804.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codebuild/package.json b/packages/@aws-cdk/aws-codebuild/package.json index e034dcb072bc2..eee1dd901175d 100644 --- a/packages/@aws-cdk/aws-codebuild/package.json +++ b/packages/@aws-cdk/aws-codebuild/package.json @@ -80,7 +80,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.802.0", + "aws-sdk": "^2.804.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codecommit/package.json b/packages/@aws-cdk/aws-codecommit/package.json index e6e186bcf45c6..346cb4b594477 100644 --- a/packages/@aws-cdk/aws-codecommit/package.json +++ b/packages/@aws-cdk/aws-codecommit/package.json @@ -80,7 +80,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.802.0", + "aws-sdk": "^2.804.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index bfc886963eaee..25dd08d054ce4 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -75,7 +75,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/jest": "^26.0.15", - "aws-sdk": "^2.802.0", + "aws-sdk": "^2.804.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index c692953141b1e..a57aaa253db2f 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -75,7 +75,7 @@ "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", "@types/yaml": "1.9.6", - "aws-sdk": "^2.802.0", + "aws-sdk": "^2.804.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index 8f4a6c182f959..8412ba1ed7adf 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -76,7 +76,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-codecommit": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", - "aws-sdk": "^2.802.0", + "aws-sdk": "^2.804.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index 25f2b8ee57a3e..487f538d138cb 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -74,7 +74,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.802.0", + "aws-sdk": "^2.804.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-route53/package.json b/packages/@aws-cdk/aws-route53/package.json index e1145ffe231d4..c7cdda9c49f38 100644 --- a/packages/@aws-cdk/aws-route53/package.json +++ b/packages/@aws-cdk/aws-route53/package.json @@ -74,7 +74,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.802.0", + "aws-sdk": "^2.804.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-sqs/package.json b/packages/@aws-cdk/aws-sqs/package.json index 7ecbf046d339c..73c4a2be0e5fd 100644 --- a/packages/@aws-cdk/aws-sqs/package.json +++ b/packages/@aws-cdk/aws-sqs/package.json @@ -75,7 +75,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.802.0", + "aws-sdk": "^2.804.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index 97a5df0c054e3..61908e19814c2 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -80,7 +80,7 @@ "@types/aws-lambda": "^8.10.64", "@types/fs-extra": "^8.1.1", "@types/sinon": "^9.0.9", - "aws-sdk": "^2.802.0", + "aws-sdk": "^2.804.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 7bfee17d1ee1c..a9f8562bf935f 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -71,7 +71,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "archiver": "^5.1.0", - "aws-sdk": "^2.802.0", + "aws-sdk": "^2.804.0", "camelcase": "^6.2.0", "cdk-assets": "0.0.0", "colors": "^1.4.0", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index 8bcc27443613a..7a22d08ad043d 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -47,7 +47,7 @@ "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "archiver": "^5.1.0", - "aws-sdk": "^2.802.0", + "aws-sdk": "^2.804.0", "glob": "^7.1.6", "yargs": "^16.1.1" }, diff --git a/yarn.lock b/yarn.lock index 73e7fd97cdafc..c778a4b567a3b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2294,10 +2294,10 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" -aws-sdk@^2.637.0, aws-sdk@^2.802.0: - version "2.802.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.802.0.tgz#7215be2437c196f1b0b39a10feffdc1d1b980a62" - integrity sha512-PfjBr5Ag4PdcEYPrfMclVWk85kFSJNe7qllZBE8RhYNu+K+Z2pveKfYkC5mqYoKEYIQyI9by9N47F+Tqm1GXtg== +aws-sdk@^2.637.0, aws-sdk@^2.804.0: + version "2.804.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.804.0.tgz#ff7e6f91b86b4878ec69e3de895c10eb8203fc4b" + integrity sha512-a02pZdjL06MunElAZPPEjpghOp/ZA+16f+t4imh1k9FCDpsNVQrT23HRq/PMvRADA5uZZRkYwX8r9o6oH/1RlA== dependencies: buffer "4.9.2" events "1.1.1" From 45677cac1b8a13d272c8e7ecea74b2beba590df7 Mon Sep 17 00:00:00 2001 From: Adam Ruka Date: Fri, 4 Dec 2020 12:51:48 -0800 Subject: [PATCH 272/314] feat(cfn-include): preserve properties of resources that are not in the current CFN schema (#11822) Currently, if cloudformation-include encounters a property in one of the resources the CDK has an L1 for that is not in the version of the CloudFormation resource schema the module uses, the property will be silently dropped. Of course, that is not ideal. Make changes to our L1 code generation to preserve all properties that are not in the CFN schema. Fixes #9717 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../properties-not-in-cfn-spec.json | 50 ++++++ .../test/valid-templates.test.ts | 8 + packages/@aws-cdk/core/lib/cfn-parse.ts | 167 ++++++++++++------ tools/cfn2ts/lib/codegen.ts | 63 ++++--- 4 files changed, 211 insertions(+), 77 deletions(-) create mode 100644 packages/@aws-cdk/cloudformation-include/test/test-templates/properties-not-in-cfn-spec.json diff --git a/packages/@aws-cdk/cloudformation-include/test/test-templates/properties-not-in-cfn-spec.json b/packages/@aws-cdk/cloudformation-include/test/test-templates/properties-not-in-cfn-spec.json new file mode 100644 index 0000000000000..eec4fc6f608c7 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-include/test/test-templates/properties-not-in-cfn-spec.json @@ -0,0 +1,50 @@ +{ + "Resources": { + "Bucket": { + "Type": "AWS::S3::Bucket", + "Properties": { + "PropertyNotInCfnSchema": 1, + "AccelerateConfiguration": { + "AccelerationStatus": "Enabled", + "PropertyNotInCfnSchema": false + }, + "CorsConfiguration": { + "CorsRules": [ + { + "AllowedMethods": [ + "GET" + ], + "AllowedOrigins": [ + "origin1" + ], + "MaxAge": 5, + "PropertyNotInCfnSchema": "unmodeled property in array" + } + ] + } + } + }, + "Function": { + "Type": "AWS::Serverless::Function", + "Properties": { + "Handler": "index.handler", + "Runtime": "nodejs12.x", + "CodeUri": { + "Bucket": "bucket", + "Key": "key" + }, + "Events": { + "Api": { + "Properties": { + "Method": "GET", + "Path": "/" + }, + "Type": "Api", + "PropertyNotInCfnSchema": "unmodeled property in map" + } + } + } + } + }, + "Transform": "AWS::Serverless-2016-10-31" +} diff --git a/packages/@aws-cdk/cloudformation-include/test/valid-templates.test.ts b/packages/@aws-cdk/cloudformation-include/test/valid-templates.test.ts index 3c2d4b81f3fe4..873add618b9d0 100644 --- a/packages/@aws-cdk/cloudformation-include/test/valid-templates.test.ts +++ b/packages/@aws-cdk/cloudformation-include/test/valid-templates.test.ts @@ -999,6 +999,14 @@ describe('CDK Include', () => { }); }).toThrow(/Parameter with logical ID 'FakeParameter' was not found in the template/); }); + + test('can ingest a template that contains properties not in the current CFN spec, and output it unchanged', () => { + includeTestTemplate(stack, 'properties-not-in-cfn-spec.json'); + + expect(stack).toMatchTemplate( + loadTestFileToJsObject('properties-not-in-cfn-spec.json'), + ); + }); }); interface IncludeTestTemplateProps { diff --git a/packages/@aws-cdk/core/lib/cfn-parse.ts b/packages/@aws-cdk/core/lib/cfn-parse.ts index c5fc563c3778f..1a5c245b61c4e 100644 --- a/packages/@aws-cdk/core/lib/cfn-parse.ts +++ b/packages/@aws-cdk/core/lib/cfn-parse.ts @@ -12,10 +12,62 @@ import { CfnTag } from './cfn-tag'; import { Lazy } from './lazy'; import { CfnReference, ReferenceRendering } from './private/cfn-reference'; import { IResolvable } from './resolvable'; -import { Mapper, Validator } from './runtime'; +import { Validator } from './runtime'; import { isResolvableObject, Token } from './token'; import { undefinedIfAllValuesAreEmpty } from './util'; +/** + * The class used as the intermediate result from the generated L1 methods + * that convert from CloudFormation's UpperCase to CDK's lowerCase property names. + * Saves any extra properties that were present in the argument object, + * but that were not found in the CFN schema, + * so that they're not lost from the final CDK-rendered template. + */ +export class FromCloudFormationResult { + public readonly value: T; + public readonly extraProperties: { [key: string]: any }; + + public constructor(value: T) { + this.value = value; + this.extraProperties = {}; + } + + public appendExtraProperties(prefix: string, properties: { [key: string]: any } | undefined): void { + for (const [key, val] of Object.entries(properties ?? {})) { + this.extraProperties[`${prefix}.${key}`] = val; + } + } +} + +/** + * A property object we will accumulate properties into + */ +export class FromCloudFormationPropertyObject> extends FromCloudFormationResult { + private readonly recognizedProperties = new Set(); + + public constructor() { + super({} as any); // We're still accumulating + } + + /** + * Add a parse result under a given key + */ + public addPropertyResult(cdkPropName: keyof T, cfnPropName: string, result?: FromCloudFormationResult): void { + this.recognizedProperties.add(cfnPropName); + if (!result) { return; } + this.value[cdkPropName] = result.value; + this.appendExtraProperties(cfnPropName, result.extraProperties); + } + + public addUnrecognizedPropertiesAsExtra(properties: object): void { + for (const [key, val] of Object.entries(properties)) { + if (!this.recognizedProperties.has(key)) { + this.extraProperties[key] = val; + } + } + } +} + /** * This class contains static methods called when going from * translated values received from {@link CfnParser.parseValue} @@ -31,90 +83,92 @@ import { undefinedIfAllValuesAreEmpty } from './util'; */ export class FromCloudFormation { // nothing to for any but return it - public static getAny(value: any) { return value; } + public static getAny(value: any): FromCloudFormationResult { + return new FromCloudFormationResult(value); + } - public static getBoolean(value: any): boolean | IResolvable { + public static getBoolean(value: any): FromCloudFormationResult { if (typeof value === 'string') { // CloudFormation allows passing strings as boolean switch (value) { - case 'true': return true; - case 'false': return false; + case 'true': return new FromCloudFormationResult(true); + case 'false': return new FromCloudFormationResult(false); default: throw new Error(`Expected 'true' or 'false' for boolean value, got: '${value}'`); } } // in all other cases, just return the value, // and let a validator handle if it's not a boolean - return value; + return new FromCloudFormationResult(value); } - public static getDate(value: any): Date | IResolvable { + public static getDate(value: any): FromCloudFormationResult { // if the date is a deploy-time value, just return it if (isResolvableObject(value)) { - return value; + return new FromCloudFormationResult(value); } // if the date has been given as a string, convert it if (typeof value === 'string') { - return new Date(value); + return new FromCloudFormationResult(new Date(value)); } // all other cases - just return the value, // if it's not a Date, a validator should catch it - return value; + return new FromCloudFormationResult(value); } // won't always return a string; if the input can't be resolved to a string, // the input will be returned. - public static getString(value: any): string { + public static getString(value: any): FromCloudFormationResult { // if the string is a deploy-time value, serialize it to a Token if (isResolvableObject(value)) { - return value.toString(); + return new FromCloudFormationResult(value.toString()); } // CloudFormation treats numbers and strings interchangeably; // so, if we get a number here, convert it to a string if (typeof value === 'number') { - return value.toString(); + return new FromCloudFormationResult(value.toString()); } // in all other cases, just return the input, // and let a validator handle it if it's not a string - return value; + return new FromCloudFormationResult(value); } // won't always return a number; if the input can't be parsed to a number, // the input will be returned. - public static getNumber(value: any): number { + public static getNumber(value: any): FromCloudFormationResult { // if the string is a deploy-time value, serialize it to a Token if (isResolvableObject(value)) { - return Token.asNumber(value); + return new FromCloudFormationResult(Token.asNumber(value)); } // return a number, if the input can be parsed as one if (typeof value === 'string') { const parsedValue = parseFloat(value); if (!isNaN(parsedValue)) { - return parsedValue; + return new FromCloudFormationResult(parsedValue); } } // otherwise return the input, // and let a validator handle it if it's not a number - return value; + return new FromCloudFormationResult(value); } - public static getStringArray(value: any): string[] { + public static getStringArray(value: any): FromCloudFormationResult { // if the array is a deploy-time value, serialize it to a Token if (isResolvableObject(value)) { - return Token.asList(value); + return new FromCloudFormationResult(Token.asList(value)); } // in all other cases, delegate to the standard mapping logic return this.getArray(this.getString)(value); } - public static getArray(mapper: (arg: any) => T): (x: any) => T[] { + public static getArray(mapper: (arg: any) => FromCloudFormationResult): (x: any) => FromCloudFormationResult { return (value: any) => { if (!Array.isArray(value)) { // break the type system, and just return the given value, @@ -122,54 +176,65 @@ export class FromCloudFormation { // of the property we're transforming // (unless it's a deploy-time value, // which we can't map over at build time anyway) - return value; + return new FromCloudFormationResult(value); } - return value.map(mapper); + const values = new Array(); + const ret = new FromCloudFormationResult(values); + for (let i = 0; i < value.length; i++) { + const result = mapper(value[i]); + values.push(result.value); + ret.appendExtraProperties(`${i}`, result.extraProperties); + } + return ret; }; } - public static getMap(mapper: (arg: any) => T): (x: any) => { [key: string]: T } { + public static getMap(mapper: (arg: any) => FromCloudFormationResult): (x: any) => FromCloudFormationResult<{ [key: string]: T }> { return (value: any) => { if (typeof value !== 'object') { // if the input is not a map (= object in JS land), // just return it, and let the validator of this property handle it // (unless it's a deploy-time value, // which we can't map over at build time anyway) - return value; + return new FromCloudFormationResult(value); } - const ret: { [key: string]: T } = {}; + const values: { [key: string]: T } = {}; + const ret = new FromCloudFormationResult(values); for (const [key, val] of Object.entries(value)) { - ret[key] = mapper(val); + const result = mapper(val); + values[key] = result.value; + ret.appendExtraProperties(key, result.extraProperties); } return ret; }; } - public static getCfnTag(tag: any): CfnTag { + public static getCfnTag(tag: any): FromCloudFormationResult { return tag == null - ? { } as any // break the type system - this should be detected at runtime by a tag validator - : { + ? new FromCloudFormationResult({ } as any) // break the type system - this should be detected at runtime by a tag validator + : new FromCloudFormationResult({ key: tag.Key, value: tag.Value, - }; + }); } /** * Return a function that, when applied to a value, will return the first validly deserialized one */ - public static getTypeUnion(validators: Validator[], mappers: Mapper[]): (x: any) => any { - return (value: any): any => { + public static getTypeUnion(validators: Validator[], mappers: Array<(x: any) => FromCloudFormationResult>): + (x: any) => FromCloudFormationResult { + return (value: any) => { for (let i = 0; i < validators.length; i++) { const candidate = mappers[i](value); - if (validators[i](candidate).isSuccess) { + if (validators[i](candidate.value).isSuccess) { return candidate; } } // if nothing matches, just return the input unchanged, and let validators catch it - return value; + return new FromCloudFormationResult(value); }; } } @@ -326,7 +391,7 @@ export class CfnParser { if (typeof p !== 'object') { return undefined; } return undefinedIfAllValuesAreEmpty({ - minSuccessfulInstancesPercent: FromCloudFormation.getNumber(p.MinSuccessfulInstancesPercent), + minSuccessfulInstancesPercent: FromCloudFormation.getNumber(p.MinSuccessfulInstancesPercent).value, }); } @@ -334,8 +399,8 @@ export class CfnParser { if (typeof p !== 'object') { return undefined; } return undefinedIfAllValuesAreEmpty({ - count: FromCloudFormation.getNumber(p.Count), - timeout: FromCloudFormation.getString(p.Timeout), + count: FromCloudFormation.getNumber(p.Count).value, + timeout: FromCloudFormation.getString(p.Timeout).value, }); } } @@ -351,8 +416,8 @@ export class CfnParser { autoScalingRollingUpdate: parseAutoScalingRollingUpdate(policy.AutoScalingRollingUpdate), autoScalingScheduledAction: parseAutoScalingScheduledAction(policy.AutoScalingScheduledAction), codeDeployLambdaAliasUpdate: parseCodeDeployLambdaAliasUpdate(policy.CodeDeployLambdaAliasUpdate), - enableVersionUpgrade: FromCloudFormation.getBoolean(policy.EnableVersionUpgrade), - useOnlineResharding: FromCloudFormation.getBoolean(policy.UseOnlineResharding), + enableVersionUpgrade: FromCloudFormation.getBoolean(policy.EnableVersionUpgrade).value, + useOnlineResharding: FromCloudFormation.getBoolean(policy.UseOnlineResharding).value, }); function parseAutoScalingReplacingUpdate(p: any): CfnAutoScalingReplacingUpdate | undefined { @@ -367,12 +432,12 @@ export class CfnParser { if (typeof p !== 'object') { return undefined; } return undefinedIfAllValuesAreEmpty({ - maxBatchSize: FromCloudFormation.getNumber(p.MaxBatchSize), - minInstancesInService: FromCloudFormation.getNumber(p.MinInstancesInService), - minSuccessfulInstancesPercent: FromCloudFormation.getNumber(p.MinSuccessfulInstancesPercent), - pauseTime: FromCloudFormation.getString(p.PauseTime), - suspendProcesses: FromCloudFormation.getStringArray(p.SuspendProcesses), - waitOnResourceSignals: FromCloudFormation.getBoolean(p.WaitOnResourceSignals), + maxBatchSize: FromCloudFormation.getNumber(p.MaxBatchSize).value, + minInstancesInService: FromCloudFormation.getNumber(p.MinInstancesInService).value, + minSuccessfulInstancesPercent: FromCloudFormation.getNumber(p.MinSuccessfulInstancesPercent).value, + pauseTime: FromCloudFormation.getString(p.PauseTime).value, + suspendProcesses: FromCloudFormation.getStringArray(p.SuspendProcesses).value, + waitOnResourceSignals: FromCloudFormation.getBoolean(p.WaitOnResourceSignals).value, }); } @@ -380,10 +445,10 @@ export class CfnParser { if (typeof p !== 'object') { return undefined; } return { - beforeAllowTrafficHook: FromCloudFormation.getString(p.BeforeAllowTrafficHook), - afterAllowTrafficHook: FromCloudFormation.getString(p.AfterAllowTrafficHook), - applicationName: FromCloudFormation.getString(p.ApplicationName), - deploymentGroupName: FromCloudFormation.getString(p.DeploymentGroupName), + beforeAllowTrafficHook: FromCloudFormation.getString(p.BeforeAllowTrafficHook).value, + afterAllowTrafficHook: FromCloudFormation.getString(p.AfterAllowTrafficHook).value, + applicationName: FromCloudFormation.getString(p.ApplicationName).value, + deploymentGroupName: FromCloudFormation.getString(p.DeploymentGroupName).value, }; } @@ -391,7 +456,7 @@ export class CfnParser { if (typeof p !== 'object') { return undefined; } return undefinedIfAllValuesAreEmpty({ - ignoreUnmodifiedGroupSizeProperties: p.IgnoreUnmodifiedGroupSizeProperties, + ignoreUnmodifiedGroupSizeProperties: FromCloudFormation.getBoolean(p.IgnoreUnmodifiedGroupSizeProperties).value, }); } } diff --git a/tools/cfn2ts/lib/codegen.ts b/tools/cfn2ts/lib/codegen.ts index d208976668925..f1e9f184e67af 100644 --- a/tools/cfn2ts/lib/codegen.ts +++ b/tools/cfn2ts/lib/codegen.ts @@ -241,9 +241,13 @@ export default class CodeGenerator { // translate the template properties to CDK objects this.code.line('const resourceProperties = options.parser.parseValue(resourceAttributes.Properties);'); // translate to props, using a (module-private) factory function - this.code.line(`const props = ${genspec.fromCfnFactoryName(propsType).fqn}(resourceProperties);`); + this.code.line(`const propsResult = ${genspec.fromCfnFactoryName(propsType).fqn}(resourceProperties);`); // finally, instantiate the resource class - this.code.line(`const ret = new ${resourceName.className}(scope, id, props);`); + this.code.line(`const ret = new ${resourceName.className}(scope, id, propsResult.value);`); + // save all keys from extraProperties in the resource using property overrides + this.code.openBlock('for (const [propKey, propVal] of Object.entries(propsResult.extraProperties)) '); + this.code.line('ret.addPropertyOverride(propKey, propVal);'); + this.code.closeBlock(); } else { // no props type - we simply instantiate the construct without the third argument this.code.line(`const ret = new ${resourceName.className}(scope, id);`); @@ -373,6 +377,9 @@ export default class CodeGenerator { } this.code.unindent('};'); this.code.closeBlock(); + + this.code.line(); + this.code.openBlock('protected renderProperties(props: {[key: string]: any}): { [key: string]: any } '); this.code.line(`return ${genspec.cfnMapperName(propsType).fqn}(props);`); this.code.closeBlock(); @@ -447,7 +454,7 @@ export default class CodeGenerator { this.code.line(`${validatorName.fqn}(properties).assertSuccess();`); // Generate the return object - this.code.line('return {'); + this.code.indent('return {'); const self = this; Object.keys(nameConversionTable).forEach(cfnName => { @@ -500,9 +507,9 @@ export default class CodeGenerator { }, }); - self.code.line(` ${cfnName}: ${mapperExpression}(properties.${propName}),`); + self.code.line(`${cfnName}: ${mapperExpression}(properties.${propName}),`); }); - this.code.line('};'); + this.code.unindent('};'); this.code.closeBlock(); } @@ -530,20 +537,21 @@ export default class CodeGenerator { // but never used as types of properties, // and in those cases this function will never be called. this.code.line('// @ts-ignore TS6133'); - this.code.openBlock(`function ${factoryName.functionName}(properties: any): ${typeName.fqn}` + - (allowReturningIResolvable ? ` | ${CORE}.IResolvable` : '')); + + const returnType = `${typeName.fqn}${allowReturningIResolvable ? ' | ' + CORE + '.IResolvable' : ''}`; + this.code.openBlock(`function ${factoryName.functionName}(properties: any): ` + + `${CFN_PARSE}.FromCloudFormationResult<${returnType}>`); if (allowReturningIResolvable) { this.code.openBlock(`if (${CORE}.isResolvableObject(properties))`); - this.code.line('return properties;'); + this.code.line(`return new ${CFN_PARSE}.FromCloudFormationResult(properties);`); this.code.closeBlock(); } this.code.line('properties = properties || {};'); - // Generate the return object - this.code.indent('return {'); - const self = this; + this.code.line(`const ret = new ${CFN_PARSE}.FromCloudFormationPropertyObject<${typeName.fqn}>();`); + const self = this; // class used for the visitor class FromCloudFormationFactoryVisitor implements genspec.PropertyVisitor { public visitAtom(type: genspec.CodeName): string { @@ -618,17 +626,16 @@ export default class CodeGenerator { } } - Object.keys(nameConversionTable).forEach(cfnName => { - const propName = nameConversionTable[cfnName]; - const propSpec = propSpecs[cfnName]; - - const simpleCfnPropAccessExpr = `properties.${cfnName}`; - - const deserializer = genspec.typeDispatch(resource, propSpec, new FromCloudFormationFactoryVisitor()); - const deserialized = `${deserializer}(${simpleCfnPropAccessExpr})`; - let valueExpression = propSpec.Required ? deserialized : `${simpleCfnPropAccessExpr} != null ? ${deserialized} : undefined`; - - if (schema.isTagPropertyName(cfnName)) { + for (const [cfnPropName, cdkPropName] of Object.entries(nameConversionTable)) { + const propSpec = propSpecs[cfnPropName]; + const simpleCfnPropAccessExpr = `properties.${cfnPropName}`; + const deserializedExpression = genspec.typeDispatch(resource, propSpec, new FromCloudFormationFactoryVisitor()) + + `(${simpleCfnPropAccessExpr})`; + + let valueExpression = propSpec.Required + ? deserializedExpression + : `${simpleCfnPropAccessExpr} != null ? ${deserializedExpression} : undefined`; + if (schema.isTagPropertyName(cfnPropName)) { // Properties that have names considered to denote tags // have their type generated without a union with IResolvable. // However, we can't possibly know that when generating the factory @@ -640,10 +647,14 @@ export default class CodeGenerator { valueExpression += ' as any'; } - self.code.line(`${propName}: ${valueExpression},`); - }); - // close the return object brace - this.code.unindent('};'); + self.code.line(`ret.addPropertyResult('${cdkPropName}', '${cfnPropName}', ${valueExpression});`); + } + + // save any extra properties we find on this level + this.code.line('ret.addUnrecognizedPropertiesAsExtra(properties);'); + + // return the result object + this.code.line('return ret;'); // close the function brace this.code.closeBlock(); From 11df56b7fa1c976641da1a26f3c5ce012d9a92fa Mon Sep 17 00:00:00 2001 From: Adam Ruka Date: Fri, 4 Dec 2020 15:02:42 -0800 Subject: [PATCH 273/314] feat: the cloudformation-include module is now Generally Available (stable) (#11882) As part of making the module stable, also deprecate the `CfnInclude` class from the core module. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/cloudformation-include/README.md | 9 ++------- packages/@aws-cdk/cloudformation-include/package.json | 4 ++-- packages/@aws-cdk/core/lib/cfn-include.ts | 7 +++++++ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/packages/@aws-cdk/cloudformation-include/README.md b/packages/@aws-cdk/cloudformation-include/README.md index e72e92e3b4425..2dcd71edc2b38 100644 --- a/packages/@aws-cdk/cloudformation-include/README.md +++ b/packages/@aws-cdk/cloudformation-include/README.md @@ -1,15 +1,10 @@ # Include CloudFormation templates in the CDK + --- -![cdk-constructs: Developer Preview](https://img.shields.io/badge/cdk--constructs-developer--preview-informational.svg?style=for-the-badge) - -> The APIs of higher level constructs in this module are in **developer preview** before they -> become stable. We will only make breaking changes to address unforeseen API issues. Therefore, -> these APIs are not subject to [Semantic Versioning](https://semver.org/), and breaking changes -> will be announced in release notes. This means that while you may use them, you may need to -> update your source code when upgrading to a newer version of this package. +![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- diff --git a/packages/@aws-cdk/cloudformation-include/package.json b/packages/@aws-cdk/cloudformation-include/package.json index 2d5dea8e514ec..b0afdaaeb368b 100644 --- a/packages/@aws-cdk/cloudformation-include/package.json +++ b/packages/@aws-cdk/cloudformation-include/package.json @@ -367,8 +367,8 @@ "props-no-cfn-types:@aws-cdk/cloudformation-include.CfnIncludeProps.loadNestedStacks" ] }, - "stability": "experimental", - "maturity": "developer-preview", + "stability": "stable", + "maturity": "stable", "awscdkio": { "announce": false } diff --git a/packages/@aws-cdk/core/lib/cfn-include.ts b/packages/@aws-cdk/core/lib/cfn-include.ts index 4cfedc1c03c25..dc7c7312da490 100644 --- a/packages/@aws-cdk/core/lib/cfn-include.ts +++ b/packages/@aws-cdk/core/lib/cfn-include.ts @@ -1,6 +1,11 @@ import { Construct } from 'constructs'; import { CfnElement } from './cfn-element'; +/** + * Construction properties for {@link CfnInclude}. + * + * @deprecated use the CfnInclude class from the cloudformation-include module instead + */ export interface CfnIncludeProps { /** * The CloudFormation template to include in the stack (as is). @@ -11,6 +16,8 @@ export interface CfnIncludeProps { /** * Includes a CloudFormation template into a stack. All elements of the template will be merged into * the current stack, together with any elements created programmatically. + * + * @deprecated use the CfnInclude class from the cloudformation-include module instead */ export class CfnInclude extends CfnElement { /** From 4bb4d40bbf4f3b7d86f4f60ad14e05d02016541c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 5 Dec 2020 08:53:44 +0000 Subject: [PATCH 274/314] chore(deps-dev): bump esbuild from 0.8.17 to 0.8.19 (#11887) Bumps [esbuild](https://github.com/evanw/esbuild) from 0.8.17 to 0.8.19. - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.8.17...v0.8.19) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/aws-lambda-nodejs/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda-nodejs/package.json b/packages/@aws-cdk/aws-lambda-nodejs/package.json index 2542a3f314479..26f9c1f757d9b 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/package.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/package.json @@ -69,7 +69,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "delay": "4.4.0", - "esbuild": "^0.8.17", + "esbuild": "^0.8.19", "pkglint": "0.0.0" }, "dependencies": { diff --git a/yarn.lock b/yarn.lock index c778a4b567a3b..138ad39e9977a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3923,10 +3923,10 @@ es6-promisify@^5.0.0: dependencies: es6-promise "^4.0.3" -esbuild@^0.8.17: - version "0.8.17" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.8.17.tgz#1c16c6d5988dcfdcf27a7e1612b7fd05e1477c54" - integrity sha512-ReHap+Iyn5BQF0B8F3xrLwu+j57ri5uDUw2ej9XTPAuFDebYiWwRzBY4jhF610bklveXLbCGim/8/2wQKQlu1w== +esbuild@^0.8.19: + version "0.8.19" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.8.19.tgz#773a85175cc911a77d7edae5ebabb55f26a25c43" + integrity sha512-KeLnk6TA7yX+KEz9+eDUigJ6ZG5Z7P1pscYdBjlCMuiOFjtbm7/BCHLpLkxfaMT04KwXbS8Lovrzl9rA5xctQg== escalade@^3.1.1: version "3.1.1" From c52eafb72f6dfb9e80bd0b4ab42245c6b2e9358d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 5 Dec 2020 23:50:08 +0000 Subject: [PATCH 275/314] chore(deps): bump yargs from 16.1.1 to 16.2.0 (#11889) Bumps [yargs](https://github.com/yargs/yargs) from 16.1.1 to 16.2.0. - [Release notes](https://github.com/yargs/yargs/releases) - [Changelog](https://github.com/yargs/yargs/blob/master/CHANGELOG.md) - [Commits](https://github.com/yargs/yargs/compare/v16.1.1...v16.2.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/aws-cdk/package.json | 2 +- packages/awslint/package.json | 2 +- packages/cdk-assets/package.json | 2 +- packages/decdk/package.json | 2 +- tools/cdk-build-tools/package.json | 2 +- tools/cdk-integ-tools/package.json | 2 +- tools/cfn2ts/package.json | 2 +- tools/pkglint/package.json | 2 +- tools/pkgtools/package.json | 2 +- yarn.lock | 8 ++++---- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index a9f8562bf935f..b64d83e4ec133 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -87,7 +87,7 @@ "table": "^6.0.4", "uuid": "^8.3.1", "wrap-ansi": "^7.0.0", - "yargs": "^16.1.1" + "yargs": "^16.2.0" }, "repository": { "url": "https://github.com/aws/aws-cdk.git", diff --git a/packages/awslint/package.json b/packages/awslint/package.json index db6e88aead475..7e9ed60a7b4b3 100644 --- a/packages/awslint/package.json +++ b/packages/awslint/package.json @@ -21,7 +21,7 @@ "colors": "^1.4.0", "fs-extra": "^9.0.1", "jsii-reflect": "^1.15.0", - "yargs": "^16.1.1" + "yargs": "^16.2.0" }, "devDependencies": { "@types/fs-extra": "^8.1.1", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index 7a22d08ad043d..d5474607e63f1 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -49,7 +49,7 @@ "archiver": "^5.1.0", "aws-sdk": "^2.804.0", "glob": "^7.1.6", - "yargs": "^16.1.1" + "yargs": "^16.2.0" }, "repository": { "url": "https://github.com/aws/aws-cdk.git", diff --git a/packages/decdk/package.json b/packages/decdk/package.json index c70af5999bace..f32367e7265ea 100644 --- a/packages/decdk/package.json +++ b/packages/decdk/package.json @@ -199,7 +199,7 @@ "jsii-reflect": "^1.15.0", "jsonschema": "^1.4.0", "yaml": "1.10.0", - "yargs": "^16.1.1" + "yargs": "^16.2.0" }, "devDependencies": { "@types/fs-extra": "^8.1.1", diff --git a/tools/cdk-build-tools/package.json b/tools/cdk-build-tools/package.json index be63aba66b068..e5b2b0c5f8479 100644 --- a/tools/cdk-build-tools/package.json +++ b/tools/cdk-build-tools/package.json @@ -57,7 +57,7 @@ "nyc": "^15.1.0", "ts-jest": "^26.4.4", "typescript": "~3.9.7", - "yargs": "^16.1.1", + "yargs": "^16.2.0", "yarn-cling": "0.0.0" }, "keywords": [ diff --git a/tools/cdk-integ-tools/package.json b/tools/cdk-integ-tools/package.json index 150ffb66dba19..8685d8435f8dc 100644 --- a/tools/cdk-integ-tools/package.json +++ b/tools/cdk-integ-tools/package.json @@ -40,7 +40,7 @@ "@aws-cdk/assert": "0.0.0", "aws-cdk": "0.0.0", "fs-extra": "^9.0.1", - "yargs": "^16.1.1" + "yargs": "^16.2.0" }, "keywords": [ "aws", diff --git a/tools/cfn2ts/package.json b/tools/cfn2ts/package.json index af1d394c0f71b..785d1a52c18b0 100644 --- a/tools/cfn2ts/package.json +++ b/tools/cfn2ts/package.json @@ -33,7 +33,7 @@ "codemaker": "^1.15.0", "fast-json-patch": "^3.0.0-1", "fs-extra": "^9.0.1", - "yargs": "^16.1.1" + "yargs": "^16.2.0" }, "devDependencies": { "@types/fs-extra": "^8.1.1", diff --git a/tools/pkglint/package.json b/tools/pkglint/package.json index 59d5137c9e75a..7f913f6d12abe 100644 --- a/tools/pkglint/package.json +++ b/tools/pkglint/package.json @@ -49,6 +49,6 @@ "glob": "^7.1.6", "npm-bundled": "^1.1.1", "semver": "^7.3.2", - "yargs": "^16.1.1" + "yargs": "^16.2.0" } } diff --git a/tools/pkgtools/package.json b/tools/pkgtools/package.json index 056c886e1b4c9..d5255e81d465d 100644 --- a/tools/pkgtools/package.json +++ b/tools/pkgtools/package.json @@ -36,7 +36,7 @@ }, "dependencies": { "fs-extra": "^9.0.1", - "yargs": "^16.1.1" + "yargs": "^16.2.0" }, "keywords": [ "aws", diff --git a/yarn.lock b/yarn.lock index 138ad39e9977a..54251b357fbaf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10515,10 +10515,10 @@ yargs@^15.0.2, yargs@^15.3.1, yargs@^15.4.1: y18n "^4.0.0" yargs-parser "^18.1.2" -yargs@^16.0.3, yargs@^16.1.1: - version "16.1.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.1.1.tgz#5a4a095bd1ca806b0a50d0c03611d38034d219a1" - integrity sha512-hAD1RcFP/wfgfxgMVswPE+z3tlPFtxG8/yWUrG2i17sTWGCGqWnxKcLTF4cUKDUK8fzokwsmO9H0TDkRbMHy8w== +yargs@^16.0.3, yargs@^16.1.1, yargs@^16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== dependencies: cliui "^7.0.2" escalade "^3.1.1" From 6dec33e2c0edc2b1f286d813e9e70f7d162542aa Mon Sep 17 00:00:00 2001 From: Setu Shah Date: Sat, 5 Dec 2020 22:04:09 -0800 Subject: [PATCH 276/314] test(aws-lambda-python): consolidate integration tests for pipenv (#11891) Following the request from @eladb in https://github.com/aws/aws-cdk/pull/11850#pullrequestreview-543829993, consolidating some of the integration tests in the package. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- ...integ.function.pipenv-inline.expected.json | 110 ------ .../test/integ.function.pipenv-inline.ts | 30 -- .../test/integ.function.pipenv.expected.json | 314 ++++++++++++++++++ .../integ.function.pipenv.py27.expected.json | 110 ------ .../test/integ.function.pipenv.py27.ts | 30 -- .../integ.function.pipenv.py38.expected.json | 110 ------ .../test/integ.function.pipenv.py38.ts | 30 -- .../test/integ.function.pipenv.ts | 45 +++ 8 files changed, 359 insertions(+), 420 deletions(-) delete mode 100644 packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv-inline.expected.json delete mode 100644 packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv-inline.ts create mode 100644 packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.expected.json delete mode 100644 packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.py27.expected.json delete mode 100644 packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.py27.ts delete mode 100644 packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.py38.expected.json delete mode 100644 packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.py38.ts create mode 100644 packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.ts diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv-inline.expected.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv-inline.expected.json deleted file mode 100644 index 19cc6231599e4..0000000000000 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv-inline.expected.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "Resources": { - "myhandlerServiceRole77891068": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "myhandlerD202FA8E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameterseef17c074659b655f9b413019323db3976d06067e78d53c4e609ebe177ce255bS3BucketDF70124D" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameterseef17c074659b655f9b413019323db3976d06067e78d53c4e609ebe177ce255bS3VersionKey530C68B0" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameterseef17c074659b655f9b413019323db3976d06067e78d53c4e609ebe177ce255bS3VersionKey530C68B0" - } - ] - } - ] - } - ] - ] - } - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "myhandlerServiceRole77891068", - "Arn" - ] - }, - "Runtime": "python3.6" - }, - "DependsOn": [ - "myhandlerServiceRole77891068" - ] - } - }, - "Parameters": { - "AssetParameterseef17c074659b655f9b413019323db3976d06067e78d53c4e609ebe177ce255bS3BucketDF70124D": { - "Type": "String", - "Description": "S3 bucket for asset \"eef17c074659b655f9b413019323db3976d06067e78d53c4e609ebe177ce255b\"" - }, - "AssetParameterseef17c074659b655f9b413019323db3976d06067e78d53c4e609ebe177ce255bS3VersionKey530C68B0": { - "Type": "String", - "Description": "S3 key for asset version \"eef17c074659b655f9b413019323db3976d06067e78d53c4e609ebe177ce255b\"" - }, - "AssetParameterseef17c074659b655f9b413019323db3976d06067e78d53c4e609ebe177ce255bArtifactHashEE8E0CE9": { - "Type": "String", - "Description": "Artifact hash for asset \"eef17c074659b655f9b413019323db3976d06067e78d53c4e609ebe177ce255b\"" - } - }, - "Outputs": { - "FunctionName": { - "Value": { - "Ref": "myhandlerD202FA8E" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv-inline.ts b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv-inline.ts deleted file mode 100644 index ad5db171f719a..0000000000000 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv-inline.ts +++ /dev/null @@ -1,30 +0,0 @@ -/// !cdk-integ pragma:ignore-assets -import * as path from 'path'; -import { Runtime } from '@aws-cdk/aws-lambda'; -import { App, CfnOutput, Stack, StackProps } from '@aws-cdk/core'; -import { Construct } from 'constructs'; -import * as lambda from '../lib'; - -/* - * Stack verification steps: - * aws lambda invoke --function-name --invocation-type Event --payload $(base64 <<<'"OK"') response.json - */ - -class TestStack extends Stack { - constructor(scope: Construct, id: string, props?: StackProps) { - super(scope, id, props); - - const fn = new lambda.PythonFunction(this, 'my_handler', { - entry: path.join(__dirname, 'lambda-handler-pipenv'), - runtime: Runtime.PYTHON_3_6, - }); - - new CfnOutput(this, 'FunctionName', { - value: fn.functionName, - }); - } -} - -const app = new App(); -new TestStack(app, 'cdk-integ-lambda-python-inline'); -app.synth(); diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.expected.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.expected.json new file mode 100644 index 0000000000000..0c310b5f52e7e --- /dev/null +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.expected.json @@ -0,0 +1,314 @@ +{ + "Resources": { + "myhandlerinlineServiceRole10C681F6": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ] + } + }, + "myhandlerinline53D120C7": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Ref": "AssetParameterseef17c074659b655f9b413019323db3976d06067e78d53c4e609ebe177ce255bS3BucketDF70124D" + }, + "S3Key": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParameterseef17c074659b655f9b413019323db3976d06067e78d53c4e609ebe177ce255bS3VersionKey530C68B0" + } + ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParameterseef17c074659b655f9b413019323db3976d06067e78d53c4e609ebe177ce255bS3VersionKey530C68B0" + } + ] + } + ] + } + ] + ] + } + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "myhandlerinlineServiceRole10C681F6", + "Arn" + ] + }, + "Runtime": "python3.6" + }, + "DependsOn": [ + "myhandlerinlineServiceRole10C681F6" + ] + }, + "myhandlerpython27ServiceRole2ED49C06": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ] + } + }, + "myhandlerpython274D7465EA": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Ref": "AssetParametersf37a4de97ca8831930cd2d0dc3f0962e653d756a118ce33271752a745489c014S3BucketB5A59BD8" + }, + "S3Key": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParametersf37a4de97ca8831930cd2d0dc3f0962e653d756a118ce33271752a745489c014S3VersionKey7657015C" + } + ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParametersf37a4de97ca8831930cd2d0dc3f0962e653d756a118ce33271752a745489c014S3VersionKey7657015C" + } + ] + } + ] + } + ] + ] + } + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "myhandlerpython27ServiceRole2ED49C06", + "Arn" + ] + }, + "Runtime": "python2.7" + }, + "DependsOn": [ + "myhandlerpython27ServiceRole2ED49C06" + ] + }, + "myhandlerpython38ServiceRole2049AFF7": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ] + } + }, + "myhandlerpython384D62BBB5": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Ref": "AssetParameters3eb927f8df31281e22c710f842018fa10b0dde86f74f89313c9a27db6e75846aS3Bucket31144813" + }, + "S3Key": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParameters3eb927f8df31281e22c710f842018fa10b0dde86f74f89313c9a27db6e75846aS3VersionKeyB48E8383" + } + ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParameters3eb927f8df31281e22c710f842018fa10b0dde86f74f89313c9a27db6e75846aS3VersionKeyB48E8383" + } + ] + } + ] + } + ] + ] + } + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "myhandlerpython38ServiceRole2049AFF7", + "Arn" + ] + }, + "Runtime": "python3.8" + }, + "DependsOn": [ + "myhandlerpython38ServiceRole2049AFF7" + ] + } + }, + "Parameters": { + "AssetParameterseef17c074659b655f9b413019323db3976d06067e78d53c4e609ebe177ce255bS3BucketDF70124D": { + "Type": "String", + "Description": "S3 bucket for asset \"eef17c074659b655f9b413019323db3976d06067e78d53c4e609ebe177ce255b\"" + }, + "AssetParameterseef17c074659b655f9b413019323db3976d06067e78d53c4e609ebe177ce255bS3VersionKey530C68B0": { + "Type": "String", + "Description": "S3 key for asset version \"eef17c074659b655f9b413019323db3976d06067e78d53c4e609ebe177ce255b\"" + }, + "AssetParameterseef17c074659b655f9b413019323db3976d06067e78d53c4e609ebe177ce255bArtifactHashEE8E0CE9": { + "Type": "String", + "Description": "Artifact hash for asset \"eef17c074659b655f9b413019323db3976d06067e78d53c4e609ebe177ce255b\"" + }, + "AssetParametersf37a4de97ca8831930cd2d0dc3f0962e653d756a118ce33271752a745489c014S3BucketB5A59BD8": { + "Type": "String", + "Description": "S3 bucket for asset \"f37a4de97ca8831930cd2d0dc3f0962e653d756a118ce33271752a745489c014\"" + }, + "AssetParametersf37a4de97ca8831930cd2d0dc3f0962e653d756a118ce33271752a745489c014S3VersionKey7657015C": { + "Type": "String", + "Description": "S3 key for asset version \"f37a4de97ca8831930cd2d0dc3f0962e653d756a118ce33271752a745489c014\"" + }, + "AssetParametersf37a4de97ca8831930cd2d0dc3f0962e653d756a118ce33271752a745489c014ArtifactHash7768674B": { + "Type": "String", + "Description": "Artifact hash for asset \"f37a4de97ca8831930cd2d0dc3f0962e653d756a118ce33271752a745489c014\"" + }, + "AssetParameters3eb927f8df31281e22c710f842018fa10b0dde86f74f89313c9a27db6e75846aS3Bucket31144813": { + "Type": "String", + "Description": "S3 bucket for asset \"3eb927f8df31281e22c710f842018fa10b0dde86f74f89313c9a27db6e75846a\"" + }, + "AssetParameters3eb927f8df31281e22c710f842018fa10b0dde86f74f89313c9a27db6e75846aS3VersionKeyB48E8383": { + "Type": "String", + "Description": "S3 key for asset version \"3eb927f8df31281e22c710f842018fa10b0dde86f74f89313c9a27db6e75846a\"" + }, + "AssetParameters3eb927f8df31281e22c710f842018fa10b0dde86f74f89313c9a27db6e75846aArtifactHash652F614E": { + "Type": "String", + "Description": "Artifact hash for asset \"3eb927f8df31281e22c710f842018fa10b0dde86f74f89313c9a27db6e75846a\"" + } + }, + "Outputs": { + "InlineFunctionName": { + "Value": { + "Ref": "myhandlerinline53D120C7" + } + }, + "Python27FunctionName": { + "Value": { + "Ref": "myhandlerpython274D7465EA" + } + }, + "Python38FunctionName": { + "Value": { + "Ref": "myhandlerpython384D62BBB5" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.py27.expected.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.py27.expected.json deleted file mode 100644 index c0cb2b260d146..0000000000000 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.py27.expected.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "Resources": { - "myhandlerServiceRole77891068": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "myhandlerD202FA8E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersf37a4de97ca8831930cd2d0dc3f0962e653d756a118ce33271752a745489c014S3BucketB5A59BD8" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf37a4de97ca8831930cd2d0dc3f0962e653d756a118ce33271752a745489c014S3VersionKey7657015C" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf37a4de97ca8831930cd2d0dc3f0962e653d756a118ce33271752a745489c014S3VersionKey7657015C" - } - ] - } - ] - } - ] - ] - } - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "myhandlerServiceRole77891068", - "Arn" - ] - }, - "Runtime": "python2.7" - }, - "DependsOn": [ - "myhandlerServiceRole77891068" - ] - } - }, - "Parameters": { - "AssetParametersf37a4de97ca8831930cd2d0dc3f0962e653d756a118ce33271752a745489c014S3BucketB5A59BD8": { - "Type": "String", - "Description": "S3 bucket for asset \"f37a4de97ca8831930cd2d0dc3f0962e653d756a118ce33271752a745489c014\"" - }, - "AssetParametersf37a4de97ca8831930cd2d0dc3f0962e653d756a118ce33271752a745489c014S3VersionKey7657015C": { - "Type": "String", - "Description": "S3 key for asset version \"f37a4de97ca8831930cd2d0dc3f0962e653d756a118ce33271752a745489c014\"" - }, - "AssetParametersf37a4de97ca8831930cd2d0dc3f0962e653d756a118ce33271752a745489c014ArtifactHash7768674B": { - "Type": "String", - "Description": "Artifact hash for asset \"f37a4de97ca8831930cd2d0dc3f0962e653d756a118ce33271752a745489c014\"" - } - }, - "Outputs": { - "FunctionName": { - "Value": { - "Ref": "myhandlerD202FA8E" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.py27.ts b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.py27.ts deleted file mode 100644 index e97ca65f8d035..0000000000000 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.py27.ts +++ /dev/null @@ -1,30 +0,0 @@ -/// !cdk-integ pragma:ignore-assets -import * as path from 'path'; -import { Runtime } from '@aws-cdk/aws-lambda'; -import { App, CfnOutput, Stack, StackProps } from '@aws-cdk/core'; -import { Construct } from 'constructs'; -import * as lambda from '../lib'; - -/* - * Stack verification steps: - * aws lambda invoke --function-name --invocation-type Event --payload $(base64 <<<'"OK"') response.json - */ - -class TestStack extends Stack { - constructor(scope: Construct, id: string, props?: StackProps) { - super(scope, id, props); - - const fn = new lambda.PythonFunction(this, 'my_handler', { - entry: path.join(__dirname, 'lambda-handler-pipenv'), - runtime: Runtime.PYTHON_2_7, - }); - - new CfnOutput(this, 'FunctionName', { - value: fn.functionName, - }); - } -} - -const app = new App(); -new TestStack(app, 'cdk-integ-lambda-python-pipenv-py27'); -app.synth(); diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.py38.expected.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.py38.expected.json deleted file mode 100644 index 07e4ea8cf45f9..0000000000000 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.py38.expected.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "Resources": { - "myhandlerServiceRole77891068": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "myhandlerD202FA8E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters3eb927f8df31281e22c710f842018fa10b0dde86f74f89313c9a27db6e75846aS3Bucket31144813" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3eb927f8df31281e22c710f842018fa10b0dde86f74f89313c9a27db6e75846aS3VersionKeyB48E8383" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3eb927f8df31281e22c710f842018fa10b0dde86f74f89313c9a27db6e75846aS3VersionKeyB48E8383" - } - ] - } - ] - } - ] - ] - } - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "myhandlerServiceRole77891068", - "Arn" - ] - }, - "Runtime": "python3.8" - }, - "DependsOn": [ - "myhandlerServiceRole77891068" - ] - } - }, - "Parameters": { - "AssetParameters3eb927f8df31281e22c710f842018fa10b0dde86f74f89313c9a27db6e75846aS3Bucket31144813": { - "Type": "String", - "Description": "S3 bucket for asset \"3eb927f8df31281e22c710f842018fa10b0dde86f74f89313c9a27db6e75846a\"" - }, - "AssetParameters3eb927f8df31281e22c710f842018fa10b0dde86f74f89313c9a27db6e75846aS3VersionKeyB48E8383": { - "Type": "String", - "Description": "S3 key for asset version \"3eb927f8df31281e22c710f842018fa10b0dde86f74f89313c9a27db6e75846a\"" - }, - "AssetParameters3eb927f8df31281e22c710f842018fa10b0dde86f74f89313c9a27db6e75846aArtifactHash652F614E": { - "Type": "String", - "Description": "Artifact hash for asset \"3eb927f8df31281e22c710f842018fa10b0dde86f74f89313c9a27db6e75846a\"" - } - }, - "Outputs": { - "FunctionName": { - "Value": { - "Ref": "myhandlerD202FA8E" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.py38.ts b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.py38.ts deleted file mode 100644 index 75538599ca463..0000000000000 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.py38.ts +++ /dev/null @@ -1,30 +0,0 @@ -/// !cdk-integ pragma:ignore-assets -import * as path from 'path'; -import { Runtime } from '@aws-cdk/aws-lambda'; -import { App, CfnOutput, Stack, StackProps } from '@aws-cdk/core'; -import { Construct } from 'constructs'; -import * as lambda from '../lib'; - -/* - * Stack verification steps: - * aws lambda invoke --function-name --invocation-type Event --payload $(base64 <<<'"OK"') response.json - */ - -class TestStack extends Stack { - constructor(scope: Construct, id: string, props?: StackProps) { - super(scope, id, props); - - const fn = new lambda.PythonFunction(this, 'my_handler', { - entry: path.join(__dirname, 'lambda-handler-pipenv'), - runtime: Runtime.PYTHON_3_8, - }); - - new CfnOutput(this, 'FunctionName', { - value: fn.functionName, - }); - } -} - -const app = new App(); -new TestStack(app, 'cdk-integ-lambda-python-pipenv-py38'); -app.synth(); diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.ts b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.ts new file mode 100644 index 0000000000000..2b51c5d1efc67 --- /dev/null +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.ts @@ -0,0 +1,45 @@ +/// !cdk-integ pragma:ignore-assets +import * as path from 'path'; +import { Runtime } from '@aws-cdk/aws-lambda'; +import { App, CfnOutput, Stack, StackProps } from '@aws-cdk/core'; +import { Construct } from 'constructs'; +import * as lambda from '../lib'; + +/* + * Stack verification steps: + * aws lambda invoke --function-name --invocation-type Event --payload $(base64 <<<''OK'') response.json + */ + +class TestStack extends Stack { + constructor(scope: Construct, id: string, props?: StackProps) { + super(scope, id, props); + + const pythonFunctionInline = new lambda.PythonFunction(this, 'my_handler_inline', { + entry: path.join(__dirname, 'lambda-handler-pipenv'), + runtime: Runtime.PYTHON_3_6, + }); + new CfnOutput(this, 'InlineFunctionName', { + value: pythonFunctionInline.functionName, + }); + + const pythonFunction27 = new lambda.PythonFunction(this, 'my_handler_python_27', { + entry: path.join(__dirname, 'lambda-handler-pipenv'), + runtime: Runtime.PYTHON_2_7, + }); + new CfnOutput(this, 'Python27FunctionName', { + value: pythonFunction27.functionName, + }); + + const pythonFunction38 = new lambda.PythonFunction(this, 'my_handler_python_38', { + entry: path.join(__dirname, 'lambda-handler-pipenv'), + runtime: Runtime.PYTHON_3_8, + }); + new CfnOutput(this, 'Python38FunctionName', { + value: pythonFunction38.functionName, + }); + } +} + +const app = new App(); +new TestStack(app, 'cdk-integ-lambda-python'); +app.synth(); From 8216738dc4a496a4114bad46b4a11bc1e205d8bc Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 6 Dec 2020 09:40:27 +0000 Subject: [PATCH 277/314] chore(deps-dev): bump esbuild from 0.8.19 to 0.8.20 (#11895) Bumps [esbuild](https://github.com/evanw/esbuild) from 0.8.19 to 0.8.20. - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.8.19...v0.8.20) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/aws-lambda-nodejs/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda-nodejs/package.json b/packages/@aws-cdk/aws-lambda-nodejs/package.json index 26f9c1f757d9b..6baff764219f4 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/package.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/package.json @@ -69,7 +69,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "delay": "4.4.0", - "esbuild": "^0.8.19", + "esbuild": "^0.8.20", "pkglint": "0.0.0" }, "dependencies": { diff --git a/yarn.lock b/yarn.lock index 54251b357fbaf..d838b8d976915 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3923,10 +3923,10 @@ es6-promisify@^5.0.0: dependencies: es6-promise "^4.0.3" -esbuild@^0.8.19: - version "0.8.19" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.8.19.tgz#773a85175cc911a77d7edae5ebabb55f26a25c43" - integrity sha512-KeLnk6TA7yX+KEz9+eDUigJ6ZG5Z7P1pscYdBjlCMuiOFjtbm7/BCHLpLkxfaMT04KwXbS8Lovrzl9rA5xctQg== +esbuild@^0.8.20: + version "0.8.20" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.8.20.tgz#e56b594c3bfc1b87f9299b4a43eead3e0a10f49c" + integrity sha512-xXNLXa2SraaAoeTybOMAvOf6KW/DthI3ATXMG+W3yMav1iFpEGvo4XS22AzCPE3rTXbK/7TykxpwI8mD6lYUOg== escalade@^3.1.1: version "3.1.1" From 60875a5d6cd93b7d6f0f9b1b94153f6d1f4766b1 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Mon, 7 Dec 2020 10:27:56 +0100 Subject: [PATCH 278/314] fix(core): floating list tokens synthesize to template (#11899) Encoded token lists are represented as `["#{Token[1234]}"]` (as opposed to encoded strings, which are represented as `"${Token[1234]}"`, notice the different sigil). If a string that looks like `"#{Token[...]}"` ever appears outside of a list context, that's an error. Someone got there by doing: ``` list[0] ``` Which we cannot allow, because things list `list[n]` are not detectable by us and so cannot be adequately converted to CloudFormation syntax. They are supposed to use `Fn.select(n, list)` instead. We did not use to test for this, but of course people *will* do this and then get confused about the results, so add an explicit test and error message. Closes #11750 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/core/lib/private/resolve.ts | 6 ++++++ packages/@aws-cdk/core/test/tokens.test.ts | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/packages/@aws-cdk/core/lib/private/resolve.ts b/packages/@aws-cdk/core/lib/private/resolve.ts index 7098dc4e3ec99..d6ae73cdb8796 100644 --- a/packages/@aws-cdk/core/lib/private/resolve.ts +++ b/packages/@aws-cdk/core/lib/private/resolve.ts @@ -89,6 +89,12 @@ export function resolve(obj: any, options: IResolveOptions): any { // string - potentially replace all stringified Tokens // if (typeof(obj) === 'string') { + // If this is a "list element" Token, it should never occur by itself in string context + if (TokenString.forListToken(obj).test()) { + throw new Error('Found an encoded list token string in a scalar string context. Use \'Fn.select(0, list)\' (not \'list[0]\') to extract elements from token lists.'); + } + + // Otherwise look for a stringified Token in this object const str = TokenString.forString(obj); if (str.test()) { const fragments = str.split(tokenMap.lookupToken.bind(tokenMap)); diff --git a/packages/@aws-cdk/core/test/tokens.test.ts b/packages/@aws-cdk/core/test/tokens.test.ts index 39f4332d0ad86..72b37d0881f73 100644 --- a/packages/@aws-cdk/core/test/tokens.test.ts +++ b/packages/@aws-cdk/core/test/tokens.test.ts @@ -474,6 +474,18 @@ nodeunitShim({ test.done(); }, + + 'detect and error when list token values are illegally extracted'(test: Test) { + // GIVEN + const encoded: string[] = Token.asList({ Ref: 'Other' }); + + // THEN + test.throws(() => { + resolve({ value: encoded[0] }); + }, /Found an encoded list/); + + test.done(); + }, }, 'number encoding': { From a820293c9c8be6cdb6564407a8ffeeb6edddf9af Mon Sep 17 00:00:00 2001 From: AWS CDK Team Date: Mon, 7 Dec 2020 09:49:34 +0000 Subject: [PATCH 279/314] chore(release): 1.77.0 --- CHANGELOG.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ version.v1.json | 2 +- 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index edfe0eacdef1d..492b7473c6cb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,57 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.77.0](https://github.com/aws/aws-cdk/compare/v1.76.0...v1.77.0) (2020-12-07) + + +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES + +* **apigatewayv2:** The `VpcLink.fromVpcLinkId()` API has been +replaced with `VpcLink.fromVpcLinkAttributes()`. +* **secretsmanager:** (feature flag) Secret.secretName for owned secrets will now +only the secret name (without suffix) and not the full resource name. This is +enabled through the `@aws-cdk/secretsmanager:parseOwnedSecretName` flag. +* **lambda-nodejs:** bundling customization options like `minify` or `sourceMap` are now gathered under a new `bundling` prop. +* **lambda-nodejs**: `bundlingEnvironment` is now `bundling.environment` +* **lambda-nodejs**: `bundlingDockerImage` is now `bundling.dockerImage` + +### Features + +* **apigatewayv2:** private integration with imported services ([#11661](https://github.com/aws/aws-cdk/issues/11661)) ([6bf0da0](https://github.com/aws/aws-cdk/commit/6bf0da05348557386a72af6323d0165c594caf6c)), closes [#11603](https://github.com/aws/aws-cdk/issues/11603) +* **cfn-include:** preserve properties of resources that are not in the current CFN schema ([#11822](https://github.com/aws/aws-cdk/issues/11822)) ([45677ca](https://github.com/aws/aws-cdk/commit/45677cac1b8a13d272c8e7ecea74b2beba590df7)), closes [#9717](https://github.com/aws/aws-cdk/issues/9717) +* **cfnspec:** cloudformation spec v21.0.0 ([#11694](https://github.com/aws/aws-cdk/issues/11694)) ([d1d9fc4](https://github.com/aws/aws-cdk/commit/d1d9fc49afbd5bfde6b30bbfb92bb179e79d5743)) +* **cli:** support WebIdentityCredentials (as used by EKS) ([#11559](https://github.com/aws/aws-cdk/issues/11559)) ([5cfbe6c](https://github.com/aws/aws-cdk/commit/5cfbe6c96df5d590588337c1ca8e41272a8d09fb)), closes [#11543](https://github.com/aws/aws-cdk/issues/11543) +* **cloudfront:** Lambda@Edge construct ([#10500](https://github.com/aws/aws-cdk/issues/10500)) ([3b30123](https://github.com/aws/aws-cdk/commit/3b301231a2d28c3f46d22d44010eb75adc77bc6b)), closes [#9833](https://github.com/aws/aws-cdk/issues/9833) [#1575](https://github.com/aws/aws-cdk/issues/1575) [#9862](https://github.com/aws/aws-cdk/issues/9862) +* **codepipeline-actions:** support `executeBatchBuild` on `CodeBuildAction` ([#11741](https://github.com/aws/aws-cdk/issues/11741)) ([3dcd1a8](https://github.com/aws/aws-cdk/commit/3dcd1a8345a20caad5100f810517f8e742bd65e8)), closes [#11662](https://github.com/aws/aws-cdk/issues/11662) +* **cognito:** user pool client - token validity ([#11752](https://github.com/aws/aws-cdk/issues/11752)) ([78b3c39](https://github.com/aws/aws-cdk/commit/78b3c3934c054ef27dc0e164af88d83692ead91d)), closes [#11689](https://github.com/aws/aws-cdk/issues/11689) +* **ecr:** authorization token retrieval grants ([#11783](https://github.com/aws/aws-cdk/issues/11783)) ([c072981](https://github.com/aws/aws-cdk/commit/c072981c175bf0509e9c606ff9ed441a0c7aef31)) +* **ecs-patterns:** allow to select vpc subnets for LB fargate service ([#11823](https://github.com/aws/aws-cdk/issues/11823)) ([869c884](https://github.com/aws/aws-cdk/commit/869c884a9bd02a5fa116a8339ef7a6cedbeb33ac)), closes [#8621](https://github.com/aws/aws-cdk/issues/8621) +* the cloudformation-include module is now Generally Available (stable) ([#11882](https://github.com/aws/aws-cdk/issues/11882)) ([11df56b](https://github.com/aws/aws-cdk/commit/11df56b7fa1c976641da1a26f3c5ce012d9a92fa)) +* **lambda-nodejs:** command hooks ([#11583](https://github.com/aws/aws-cdk/issues/11583)) ([0608670](https://github.com/aws/aws-cdk/commit/0608670f5a4d78c0de2e394b3dee8f87211a7c61)), closes [#11468](https://github.com/aws/aws-cdk/issues/11468) +* **lambda-python:** support poetry packaging for PythonFunction ([#11850](https://github.com/aws/aws-cdk/issues/11850)) ([c5c258a](https://github.com/aws/aws-cdk/commit/c5c258ac8c7cf24e541472d1fce1e971604e0aaa)), closes [#11753](https://github.com/aws/aws-cdk/issues/11753) + + +### Bug Fixes + +* **codebuild:** Project lacks permissions for SSM ParameterStore environment variables ([#11770](https://github.com/aws/aws-cdk/issues/11770)) ([3c5c2f4](https://github.com/aws/aws-cdk/commit/3c5c2f415dc1d8f2f5b4fe2e7668b76f155675c6)), closes [#11769](https://github.com/aws/aws-cdk/issues/11769) +* **codepipeline-actions:** incorrect IAM statement in StepFunctionInvokeAction ([#11728](https://github.com/aws/aws-cdk/issues/11728)) ([ece9b23](https://github.com/aws/aws-cdk/commit/ece9b237e7da4b493e34c801bb0f17b1a5edf68e)), closes [#11397](https://github.com/aws/aws-cdk/issues/11397) [#11688](https://github.com/aws/aws-cdk/issues/11688) +* **core:** custom resource providers cannot be used in CDK Pipelines ([#11807](https://github.com/aws/aws-cdk/issues/11807)) ([48b3fa9](https://github.com/aws/aws-cdk/commit/48b3fa95b3ce3c5843aa35d48772e31d8c85c505)), closes [#11760](https://github.com/aws/aws-cdk/issues/11760) +* **core:** floating list tokens synthesize to template ([#11899](https://github.com/aws/aws-cdk/issues/11899)) ([60875a5](https://github.com/aws/aws-cdk/commit/60875a5d6cd93b7d6f0f9b1b94153f6d1f4766b1)), closes [#11750](https://github.com/aws/aws-cdk/issues/11750) +* **core:** init templates not initialized when running the CLI from source ([#11731](https://github.com/aws/aws-cdk/issues/11731)) ([2e067d7](https://github.com/aws/aws-cdk/commit/2e067d7d00b10b4c5e26665386c0a86340a83379)), closes [#11665](https://github.com/aws/aws-cdk/issues/11665) +* **core:** regression: source directory is fingerprinted even if bundling is skipped ([#11440](https://github.com/aws/aws-cdk/issues/11440)) ([3cbc7fa](https://github.com/aws/aws-cdk/commit/3cbc7fa58a69330b82935f9d464446fb2d410344)), closes [#11008](https://github.com/aws/aws-cdk/issues/11008) [/github.com/aws/aws-cdk/pull/11008/files#diff-62eef996be8abeb157518522c3cbf84a33dd4751c103304df87b04eb6d7bbab6L160](https://github.com/aws//github.com/aws/aws-cdk/pull/11008/files/issues/diff-62eef996be8abeb157518522c3cbf84a33dd4751c103304df87b04eb6d7bbab6L160) [#11008](https://github.com/aws/aws-cdk/issues/11008) [40aws-cdk/core/lib/asset-staging.ts#L159-L160](https://github.com/40aws-cdk/core/lib/asset-staging.ts/issues/L159-L160) [#11459](https://github.com/aws/aws-cdk/issues/11459) [#11460](https://github.com/aws/aws-cdk/issues/11460) +* **ec2:** instance not replaced when changing asset in UserData ([#11780](https://github.com/aws/aws-cdk/issues/11780)) ([17bde5a](https://github.com/aws/aws-cdk/commit/17bde5a27983cff322edce8d7d0eab7f4551e553)), closes [#11704](https://github.com/aws/aws-cdk/issues/11704) +* **eks:** addManifest can accept `any` but only works if a map is passed ([#11768](https://github.com/aws/aws-cdk/issues/11768)) ([f85c08c](https://github.com/aws/aws-cdk/commit/f85c08cfcf0fd0d3c1f4a0e835787fd0c3de7b63)), closes [#11483](https://github.com/aws/aws-cdk/issues/11483) +* **events:** match values in event pattern array are not deduplicated ([#11744](https://github.com/aws/aws-cdk/issues/11744)) ([a07b987](https://github.com/aws/aws-cdk/commit/a07b98744c5050381a95467af9de79fe2aacdfaf)) +* **iam:** OIDC provider cannot be imported from parameter ([#11789](https://github.com/aws/aws-cdk/issues/11789)) ([cacb1d7](https://github.com/aws/aws-cdk/commit/cacb1d7fc3b0f299c17a86464c20e32a428e881d)), closes [#11705](https://github.com/aws/aws-cdk/issues/11705) +* **kinesis:** Unable to use retention periods longer than 7 days ([#11798](https://github.com/aws/aws-cdk/issues/11798)) ([80e5d90](https://github.com/aws/aws-cdk/commit/80e5d90c0cf7a5ed8f8bb1c37768be34efb32e01)) +* **lambda-nodejs:** automatic entry finding with compilerOptions.outDir ([#11729](https://github.com/aws/aws-cdk/issues/11729)) ([1000cf9](https://github.com/aws/aws-cdk/commit/1000cf9a56c7671ab954c35604f8c282a6263977)) +* **lambda-nodejs:** maximum call stack size exceeded or converting circular structure to JSON ([#11698](https://github.com/aws/aws-cdk/issues/11698)) ([4401725](https://github.com/aws/aws-cdk/commit/44017253483488fc7113301ffc184a4c6be497db)), closes [#11693](https://github.com/aws/aws-cdk/issues/11693) [#11726](https://github.com/aws/aws-cdk/issues/11726) [#11762](https://github.com/aws/aws-cdk/issues/11762) +* **lambda-nodejs:** yarn cannot find a writable cache ([#11656](https://github.com/aws/aws-cdk/issues/11656)) ([b16a8d3](https://github.com/aws/aws-cdk/commit/b16a8d3079d1d293ce127d616f82b54cb869f2e5)) +* **redshift:** multi-node redshift cluster not allowing parameter ([#11677](https://github.com/aws/aws-cdk/issues/11677)) ([13c05be](https://github.com/aws/aws-cdk/commit/13c05bee5882114ccdd4c917cb5cc0204ce15e49)), closes [#11610](https://github.com/aws/aws-cdk/issues/11610) +* **secretsmanager:** secretName for owned secrets includes suffix (under feature flag) ([#11736](https://github.com/aws/aws-cdk/issues/11736)) ([f6b4334](https://github.com/aws/aws-cdk/commit/f6b4334c59a1ac0bfb8b877baccb02b894ef24e4)), closes [#11202](https://github.com/aws/aws-cdk/issues/11202) [#11727](https://github.com/aws/aws-cdk/issues/11727) +* **sqs:** queueUrl property has incorrect region and account for imported queue ([#11651](https://github.com/aws/aws-cdk/issues/11651)) ([7b8b665](https://github.com/aws/aws-cdk/commit/7b8b6656f909a023d8d66445b58d2d5b9dde1c15)) +* **stepfunctions-tasks:** instance type cannot be provided to SageMakerCreateEndpointConfig as input path ([#11749](https://github.com/aws/aws-cdk/issues/11749)) ([5fb0ea6](https://github.com/aws/aws-cdk/commit/5fb0ea6276db26f76b99b1826d742eae979f4ed9)), closes [#11605](https://github.com/aws/aws-cdk/issues/11605) + ## [1.76.0](https://github.com/aws/aws-cdk/compare/v1.75.0...v1.76.0) (2020-12-01) diff --git a/version.v1.json b/version.v1.json index cbf6099fbebec..3c551277a8f31 100644 --- a/version.v1.json +++ b/version.v1.json @@ -1,3 +1,3 @@ { - "version": "1.76.0" + "version": "1.77.0" } From d1d953a17413fa862e36a18786cd2adb9c3f2c47 Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Mon, 7 Dec 2020 10:05:42 +0000 Subject: [PATCH 280/314] CHANGELOG fixes Added a missing word to a secretsmanager breaking change; added the module prefix and re-sorted the order of the cfn-include GA announcement. --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 492b7473c6cb2..24a5e76898065 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ All notable changes to this project will be documented in this file. See [standa * **apigatewayv2:** The `VpcLink.fromVpcLinkId()` API has been replaced with `VpcLink.fromVpcLinkAttributes()`. -* **secretsmanager:** (feature flag) Secret.secretName for owned secrets will now +* **secretsmanager:** (feature flag) Secret.secretName for owned secrets will now return only the secret name (without suffix) and not the full resource name. This is enabled through the `@aws-cdk/secretsmanager:parseOwnedSecretName` flag. * **lambda-nodejs:** bundling customization options like `minify` or `sourceMap` are now gathered under a new `bundling` prop. @@ -20,6 +20,7 @@ enabled through the `@aws-cdk/secretsmanager:parseOwnedSecretName` flag. * **apigatewayv2:** private integration with imported services ([#11661](https://github.com/aws/aws-cdk/issues/11661)) ([6bf0da0](https://github.com/aws/aws-cdk/commit/6bf0da05348557386a72af6323d0165c594caf6c)), closes [#11603](https://github.com/aws/aws-cdk/issues/11603) * **cfn-include:** preserve properties of resources that are not in the current CFN schema ([#11822](https://github.com/aws/aws-cdk/issues/11822)) ([45677ca](https://github.com/aws/aws-cdk/commit/45677cac1b8a13d272c8e7ecea74b2beba590df7)), closes [#9717](https://github.com/aws/aws-cdk/issues/9717) +* **cfn-include:** the cloudformation-include module is now Generally Available (stable) ([#11882](https://github.com/aws/aws-cdk/issues/11882)) ([11df56b](https://github.com/aws/aws-cdk/commit/11df56b7fa1c976641da1a26f3c5ce012d9a92fa)) * **cfnspec:** cloudformation spec v21.0.0 ([#11694](https://github.com/aws/aws-cdk/issues/11694)) ([d1d9fc4](https://github.com/aws/aws-cdk/commit/d1d9fc49afbd5bfde6b30bbfb92bb179e79d5743)) * **cli:** support WebIdentityCredentials (as used by EKS) ([#11559](https://github.com/aws/aws-cdk/issues/11559)) ([5cfbe6c](https://github.com/aws/aws-cdk/commit/5cfbe6c96df5d590588337c1ca8e41272a8d09fb)), closes [#11543](https://github.com/aws/aws-cdk/issues/11543) * **cloudfront:** Lambda@Edge construct ([#10500](https://github.com/aws/aws-cdk/issues/10500)) ([3b30123](https://github.com/aws/aws-cdk/commit/3b301231a2d28c3f46d22d44010eb75adc77bc6b)), closes [#9833](https://github.com/aws/aws-cdk/issues/9833) [#1575](https://github.com/aws/aws-cdk/issues/1575) [#9862](https://github.com/aws/aws-cdk/issues/9862) @@ -27,7 +28,6 @@ enabled through the `@aws-cdk/secretsmanager:parseOwnedSecretName` flag. * **cognito:** user pool client - token validity ([#11752](https://github.com/aws/aws-cdk/issues/11752)) ([78b3c39](https://github.com/aws/aws-cdk/commit/78b3c3934c054ef27dc0e164af88d83692ead91d)), closes [#11689](https://github.com/aws/aws-cdk/issues/11689) * **ecr:** authorization token retrieval grants ([#11783](https://github.com/aws/aws-cdk/issues/11783)) ([c072981](https://github.com/aws/aws-cdk/commit/c072981c175bf0509e9c606ff9ed441a0c7aef31)) * **ecs-patterns:** allow to select vpc subnets for LB fargate service ([#11823](https://github.com/aws/aws-cdk/issues/11823)) ([869c884](https://github.com/aws/aws-cdk/commit/869c884a9bd02a5fa116a8339ef7a6cedbeb33ac)), closes [#8621](https://github.com/aws/aws-cdk/issues/8621) -* the cloudformation-include module is now Generally Available (stable) ([#11882](https://github.com/aws/aws-cdk/issues/11882)) ([11df56b](https://github.com/aws/aws-cdk/commit/11df56b7fa1c976641da1a26f3c5ce012d9a92fa)) * **lambda-nodejs:** command hooks ([#11583](https://github.com/aws/aws-cdk/issues/11583)) ([0608670](https://github.com/aws/aws-cdk/commit/0608670f5a4d78c0de2e394b3dee8f87211a7c61)), closes [#11468](https://github.com/aws/aws-cdk/issues/11468) * **lambda-python:** support poetry packaging for PythonFunction ([#11850](https://github.com/aws/aws-cdk/issues/11850)) ([c5c258a](https://github.com/aws/aws-cdk/commit/c5c258ac8c7cf24e541472d1fce1e971604e0aaa)), closes [#11753](https://github.com/aws/aws-cdk/issues/11753) From c6052aead191fca8d384be8377fd4d3990b3ba03 Mon Sep 17 00:00:00 2001 From: Jonathan Goldwasser Date: Mon, 7 Dec 2020 14:50:12 +0100 Subject: [PATCH 281/314] feat(cloudfront): responseHttpStatus defaults to httpStatus in errorResponses (#11879) Make `responseHttpStatus` default to `httpStatus` if `responsePagePath` is defined. This avoids repeating the error code and is more in line with the actual `@default` documentation (which actually led me to think that it already defaulted to `httpStatus`). ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-cloudfront/lib/distribution.ts | 19 +++++------- .../aws-cloudfront/test/distribution.test.ts | 30 +++++++++---------- 2 files changed, 22 insertions(+), 27 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts b/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts index 0eacc04f44cc7..e339f9d7541a6 100644 --- a/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts +++ b/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts @@ -393,21 +393,18 @@ export class Distribution extends Resource implements IDistribution { private renderErrorResponses(): CfnDistribution.CustomErrorResponseProperty[] | undefined { if (this.errorResponses.length === 0) { return undefined; } - function validateCustomErrorResponse(errorResponse: ErrorResponse) { - if (errorResponse.responsePagePath && !errorResponse.responseHttpStatus) { - throw new Error('\'responseCode\' must be provided if \'responsePagePath\' is defined'); - } - if (!errorResponse.responseHttpStatus && !errorResponse.ttl) { - throw new Error('A custom error response without either a \'responseCode\' or \'errorCachingMinTtl\' is not valid.'); - } - } - this.errorResponses.forEach(e => validateCustomErrorResponse(e)); return this.errorResponses.map(errorConfig => { + if (!errorConfig.responseHttpStatus && !errorConfig.ttl && !errorConfig.responsePagePath) { + throw new Error('A custom error response without either a \'responseHttpStatus\', \'ttl\' or \'responsePagePath\' is not valid.'); + } + return { errorCachingMinTtl: errorConfig.ttl?.toSeconds(), errorCode: errorConfig.httpStatus, - responseCode: errorConfig.responseHttpStatus, + responseCode: errorConfig.responsePagePath + ? errorConfig.responseHttpStatus ?? errorConfig.httpStatus + : errorConfig.responseHttpStatus, responsePagePath: errorConfig.responsePagePath, }; }); @@ -577,7 +574,7 @@ export interface ErrorResponse { * * If you specify a value for `responseHttpStatus`, you must also specify a value for `responsePagePath`. * - * @default - not set, the error code will be returned as the response code. + * @default - the error code will be returned as the response code. */ readonly responseHttpStatus?: number; /** diff --git a/packages/@aws-cdk/aws-cloudfront/test/distribution.test.ts b/packages/@aws-cdk/aws-cloudfront/test/distribution.test.ts index fe0e218e1d407..644d91d4d7a77 100644 --- a/packages/@aws-cdk/aws-cloudfront/test/distribution.test.ts +++ b/packages/@aws-cdk/aws-cloudfront/test/distribution.test.ts @@ -318,20 +318,6 @@ describe('certificates', () => { describe('custom error responses', () => { - test('should fail if responsePagePath is defined but responseCode is not', () => { - const origin = defaultOrigin(); - - expect(() => { - new Distribution(stack, 'Dist', { - defaultBehavior: { origin }, - errorResponses: [{ - httpStatus: 404, - responsePagePath: '/errors/404.html', - }], - }); - }).toThrow(/\'responseCode\' must be provided if \'responsePagePath\' is defined/); - }); - test('should fail if only the error code is provided', () => { const origin = defaultOrigin(); @@ -340,7 +326,7 @@ describe('custom error responses', () => { defaultBehavior: { origin }, errorResponses: [{ httpStatus: 404 }], }); - }).toThrow(/A custom error response without either a \'responseCode\' or \'errorCachingMinTtl\' is not valid./); + }).toThrow(/A custom error response without either a \'responseHttpStatus\', \'ttl\' or \'responsePagePath\' is not valid./); }); test('should render the array of error configs if provided', () => { @@ -348,13 +334,20 @@ describe('custom error responses', () => { new Distribution(stack, 'Dist', { defaultBehavior: { origin }, errorResponses: [{ + // responseHttpStatus defaults to httpsStatus httpStatus: 404, - responseHttpStatus: 404, responsePagePath: '/errors/404.html', }, { + // without responsePagePath httpStatus: 500, ttl: Duration.seconds(2), + }, + { + // with responseHttpStatus different from httpStatus + httpStatus: 403, + responseHttpStatus: 200, + responsePagePath: '/index.html', }], }); @@ -370,6 +363,11 @@ describe('custom error responses', () => { ErrorCachingMinTTL: 2, ErrorCode: 500, }, + { + ErrorCode: 403, + ResponseCode: 200, + ResponsePagePath: '/index.html', + }, ], }, }); From 0df79a278755ced9c60b78c5cdea69111cd8d8b3 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Mon, 7 Dec 2020 16:15:48 +0100 Subject: [PATCH 282/314] fix(core): autogenerated exports do not account for stack name length (#11909) Autogenerated IDs are limited to 248 characters. However, for exports these are combined with a stack name, which may make the combination exceed the maximum length of 255 characters. Account for the stack name length while generating these IDs. Fixes #9733. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/core/lib/cfn-output.ts | 8 ++++++ packages/@aws-cdk/core/lib/private/refs.ts | 5 ++-- packages/@aws-cdk/core/test/output.test.ts | 14 ++++++++- packages/@aws-cdk/core/test/stack.test.ts | 33 ++++++++++++++++++++++ 4 files changed, 57 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/core/lib/cfn-output.ts b/packages/@aws-cdk/core/lib/cfn-output.ts index 480de577db06c..e296ecce34375 100644 --- a/packages/@aws-cdk/core/lib/cfn-output.ts +++ b/packages/@aws-cdk/core/lib/cfn-output.ts @@ -163,10 +163,18 @@ export class CfnOutput extends CfnElement { }, }; } + + protected validate(): string[] { + if (this._exportName && !Token.isUnresolved(this._exportName) && this._exportName.length > 255) { + return [`Export name cannot exceed 255 characters (got ${this._exportName.length} characters)`]; + } + return []; + } } import { CfnCondition } from './cfn-condition'; import { Fn } from './cfn-fn'; import { Lazy } from './lazy'; import { Stack } from './stack'; +import { Token } from './token'; diff --git a/packages/@aws-cdk/core/lib/private/refs.ts b/packages/@aws-cdk/core/lib/private/refs.ts index 05bb7930bc34f..46d44563b4a96 100644 --- a/packages/@aws-cdk/core/lib/private/refs.ts +++ b/packages/@aws-cdk/core/lib/private/refs.ts @@ -213,8 +213,9 @@ function generateExportName(stackExports: Construct, id: string) { id, ]; const prefix = stack.stackName ? stack.stackName + ':' : ''; - const exportName = prefix + makeUniqueId(components); - return exportName; + const localPart = makeUniqueId(components); + const maxLength = 255; + return prefix + localPart.slice(Math.max(0, localPart.length - maxLength + prefix.length)); } // ------------------------------------------------------------------------------------------------ diff --git a/packages/@aws-cdk/core/test/output.test.ts b/packages/@aws-cdk/core/test/output.test.ts index 1179c3111c0c9..0359049756946 100644 --- a/packages/@aws-cdk/core/test/output.test.ts +++ b/packages/@aws-cdk/core/test/output.test.ts @@ -1,5 +1,5 @@ import { nodeunitShim, Test } from 'nodeunit-shim'; -import { App, CfnOutput, CfnResource, Stack } from '../lib'; +import { App, CfnOutput, CfnResource, ConstructNode, Stack, ValidationError } from '../lib'; import { toCloudFormation } from './util'; let app: App; @@ -113,4 +113,16 @@ nodeunitShim({ test.done(); }, + + 'Verify maximum length of export name'(test: Test) { + new CfnOutput(stack, 'SomeOutput', { value: 'x', exportName: 'x'.repeat(260) }); + + const errors = ConstructNode.validate(stack.node).map((v: ValidationError) => v.message); + + expect(errors).toEqual([ + expect.stringContaining('Export name cannot exceed 255 characters'), + ]); + + test.done(); + }, }); diff --git a/packages/@aws-cdk/core/test/stack.test.ts b/packages/@aws-cdk/core/test/stack.test.ts index dad2a64b3235c..63c04be2e81de 100644 --- a/packages/@aws-cdk/core/test/stack.test.ts +++ b/packages/@aws-cdk/core/test/stack.test.ts @@ -261,6 +261,39 @@ nodeunitShim({ test.done(); }, + 'Cross-stack export names account for stack name lengths'(test: Test) { + // GIVEN + const app = new App(); + const stack1 = new Stack(app, 'Stack1', { + stackName: 'SoThisCouldPotentiallyBeAVeryLongStackName', + }); + let scope: Construct = stack1; + + // WHEN - deeply nested + for (let i = 0; i < 50; i++) { + scope = new Construct(scope, `ChildConstruct${i}`); + } + + const resource1 = new CfnResource(scope, 'Resource', { type: 'BLA' }); + const stack2 = new Stack(app, 'Stack2'); + + // WHEN - used in another resource + new CfnResource(stack2, 'SomeResource', { + type: 'AWS::Some::Resource', + properties: { + someProperty: new Intrinsic(resource1.ref), + }, + }); + + // THEN + const assembly = app.synth(); + const template1 = assembly.getStackByName(stack1.stackName).template; + + const theOutput = template1.Outputs[Object.keys(template1.Outputs)[0]]; + expect(theOutput.Export.Name.length).toEqual(255); + test.done(); + }, + 'Cross-stack reference export names are relative to the stack (when the flag is set)'(test: Test) { // GIVEN const app = new App({ From da4ef80b843e46081ceec9d74a7325b6183f4a7d Mon Sep 17 00:00:00 2001 From: Benjamin Macher <32685580+bmacher@users.noreply.github.com> Date: Mon, 7 Dec 2020 17:24:01 +0100 Subject: [PATCH 283/314] chore: rename OSX to macOS in github template (#11904) This PR does a small correction in the generall-issues template see #11903. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .github/ISSUE_TEMPLATE/general-issues.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/general-issues.md b/.github/ISSUE_TEMPLATE/general-issues.md index dcd6520c0cfda..2b478904a6fca 100644 --- a/.github/ISSUE_TEMPLATE/general-issues.md +++ b/.github/ISSUE_TEMPLATE/general-issues.md @@ -27,7 +27,7 @@ falling prey to the [X/Y problem][2]! - **CDK CLI Version:** - **Module Version:** - **Node.js Version:** - - **OS:** + - **OS:** - **Language (Version):** From e8c8d77b94ae5d49cc06d7a11527acf7f3650dcd Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Mon, 7 Dec 2020 16:56:02 +0000 Subject: [PATCH 284/314] chore(kms): convert kms tests from nodeunit to jest (#11911) Straight conversion from nodeunit to jest, with no changes, except: * Fixed one error message with a typo * Fixed a throws exception to pass (was erroneously passing before) * Converted a few output-based tests to use `toHaveOutput` rather than synthesizing and doing a partial template match. As always, each time I convert a module from nodeunit to jest I find at least one broken test. Two tests this time! ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-kms/.gitignore | 3 +- packages/@aws-cdk/aws-kms/.npmignore | 3 +- packages/@aws-cdk/aws-kms/jest.config.js | 2 + packages/@aws-cdk/aws-kms/lib/alias.ts | 2 +- packages/@aws-cdk/aws-kms/package.json | 3 +- packages/@aws-cdk/aws-kms/test/alias.test.ts | 220 ++++++++ packages/@aws-cdk/aws-kms/test/key.test.ts | 435 ++++++++++++++ packages/@aws-cdk/aws-kms/test/test.alias.ts | 250 --------- packages/@aws-cdk/aws-kms/test/test.key.ts | 529 ------------------ .../test/test.via-service-principal.ts | 50 -- .../test/via-service-principal.test.ts | 44 ++ 11 files changed, 707 insertions(+), 834 deletions(-) create mode 100644 packages/@aws-cdk/aws-kms/jest.config.js create mode 100644 packages/@aws-cdk/aws-kms/test/alias.test.ts create mode 100644 packages/@aws-cdk/aws-kms/test/key.test.ts delete mode 100644 packages/@aws-cdk/aws-kms/test/test.alias.ts delete mode 100644 packages/@aws-cdk/aws-kms/test/test.key.ts delete mode 100644 packages/@aws-cdk/aws-kms/test/test.via-service-principal.ts create mode 100644 packages/@aws-cdk/aws-kms/test/via-service-principal.test.ts diff --git a/packages/@aws-cdk/aws-kms/.gitignore b/packages/@aws-cdk/aws-kms/.gitignore index 86fc837df8fca..a82230b5888d0 100644 --- a/packages/@aws-cdk/aws-kms/.gitignore +++ b/packages/@aws-cdk/aws-kms/.gitignore @@ -15,4 +15,5 @@ nyc.config.js *.snk !.eslintrc.js -junit.xml \ No newline at end of file +junit.xml +!jest.config.js \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kms/.npmignore b/packages/@aws-cdk/aws-kms/.npmignore index a94c531529866..9e88226921c33 100644 --- a/packages/@aws-cdk/aws-kms/.npmignore +++ b/packages/@aws-cdk/aws-kms/.npmignore @@ -23,4 +23,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +jest.config.js \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kms/jest.config.js b/packages/@aws-cdk/aws-kms/jest.config.js new file mode 100644 index 0000000000000..54e28beb9798b --- /dev/null +++ b/packages/@aws-cdk/aws-kms/jest.config.js @@ -0,0 +1,2 @@ +const baseConfig = require('cdk-build-tools/config/jest.config'); +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-kms/lib/alias.ts b/packages/@aws-cdk/aws-kms/lib/alias.ts index 7e622ef95fae9..af538f6f17780 100644 --- a/packages/@aws-cdk/aws-kms/lib/alias.ts +++ b/packages/@aws-cdk/aws-kms/lib/alias.ts @@ -151,7 +151,7 @@ export class Alias extends AliasBase { public readonly keyArn = Stack.of(this).formatArn({ service: 'kms', resource: aliasName }); public readonly keyId = aliasName; public readonly aliasName = aliasName; - public get aliasTargetKey(): IKey { throw new Error('Cannot access aliasTargetKey on an Alias imnported by Alias.fromAliasName().'); } + public get aliasTargetKey(): IKey { throw new Error('Cannot access aliasTargetKey on an Alias imported by Alias.fromAliasName().'); } public addAlias(_alias: string): Alias { throw new Error('Cannot call addAlias on an Alias imported by Alias.fromAliasName().'); } public addToResourcePolicy(_statement: iam.PolicyStatement, _allowNoOp?: boolean): iam.AddToResourcePolicyResult { return { statementAdded: false }; diff --git a/packages/@aws-cdk/aws-kms/package.json b/packages/@aws-cdk/aws-kms/package.json index d9c0c40fc3239..65c05ca946fbf 100644 --- a/packages/@aws-cdk/aws-kms/package.json +++ b/packages/@aws-cdk/aws-kms/package.json @@ -55,6 +55,7 @@ }, "cdk-build": { "cloudformation": "AWS::KMS", + "jest": true, "env": { "AWSLINT_BASE_CONSTRUCT": "true" } @@ -73,11 +74,9 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "nodeunit": "^0.11.3", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-kms/test/alias.test.ts b/packages/@aws-cdk/aws-kms/test/alias.test.ts new file mode 100644 index 0000000000000..b39ea8bf5b232 --- /dev/null +++ b/packages/@aws-cdk/aws-kms/test/alias.test.ts @@ -0,0 +1,220 @@ +import '@aws-cdk/assert/jest'; +import { ArnPrincipal, PolicyStatement } from '@aws-cdk/aws-iam'; +import { App, CfnOutput, Construct, Stack } from '@aws-cdk/core'; +import { Alias } from '../lib/alias'; +import { IKey, Key } from '../lib/key'; + +test('default alias', () => { + const app = new App(); + const stack = new Stack(app, 'Test'); + const key = new Key(stack, 'Key'); + + new Alias(stack, 'Alias', { targetKey: key, aliasName: 'alias/foo' }); + + expect(stack).toHaveResource('AWS::KMS::Alias', { + AliasName: 'alias/foo', + TargetKeyId: { 'Fn::GetAtt': ['Key961B73FD', 'Arn'] }, + }); +}); + +test('add "alias/" prefix if not given.', () => { + const app = new App(); + const stack = new Stack(app, 'Test'); + + const key = new Key(stack, 'Key', { + enableKeyRotation: true, + enabled: false, + }); + + new Alias(stack, 'Alias', { + aliasName: 'foo', + targetKey: key, + }); + + expect(stack).toHaveResource('AWS::KMS::Alias', { + AliasName: 'alias/foo', + TargetKeyId: { 'Fn::GetAtt': ['Key961B73FD', 'Arn'] }, + }); +}); + +test('can create alias directly while creating the key', () => { + const app = new App(); + const stack = new Stack(app, 'Test'); + + new Key(stack, 'Key', { + enableKeyRotation: true, + enabled: false, + alias: 'foo', + }); + + expect(stack).toHaveResource('AWS::KMS::Alias', { + AliasName: 'alias/foo', + TargetKeyId: { 'Fn::GetAtt': ['Key961B73FD', 'Arn'] }, + }); +}); + +test('fails if alias is "alias/" (and nothing more)', () => { + const app = new App(); + const stack = new Stack(app, 'Test'); + + const key = new Key(stack, 'MyKey', { + enableKeyRotation: true, + enabled: false, + }); + + expect(() => new Alias(stack, 'Alias', { + aliasName: 'alias/', + targetKey: key, + })).toThrow(/Alias must include a value after/); +}); + +test('fails if alias contains illegal characters', () => { + const app = new App(); + const stack = new Stack(app, 'Test'); + + const key = new Key(stack, 'MyKey', { + enableKeyRotation: true, + enabled: false, + }); + + expect(() => new Alias(stack, 'Alias', { + aliasName: 'alias/@Nope', + targetKey: key, + })).toThrow('a-zA-Z0-9:/_-'); +}); + +test('fails if alias starts with "alias/aws/"', () => { + const app = new App(); + const stack = new Stack(app, 'Test'); + + const key = new Key(stack, 'MyKey', { + enableKeyRotation: true, + enabled: false, + }); + + expect(() => new Alias(stack, 'Alias1', { + aliasName: 'alias/aws/', + targetKey: key, + })).toThrow(/Alias cannot start with alias\/aws\/: alias\/aws\//); + + expect(() => new Alias(stack, 'Alias2', { + aliasName: 'alias/aws/Awesome', + targetKey: key, + })).toThrow(/Alias cannot start with alias\/aws\/: alias\/aws\/Awesome/); + + expect(() => new Alias(stack, 'Alias3', { + aliasName: 'alias/AWS/awesome', + targetKey: key, + })).toThrow(/Alias cannot start with alias\/aws\/: alias\/AWS\/awesome/); +}); + +test('can be used wherever a key is expected', () => { + const stack = new Stack(); + + const myKey = new Key(stack, 'MyKey', { + enableKeyRotation: true, + enabled: false, + }); + const myAlias = new Alias(stack, 'MyAlias', { + targetKey: myKey, + aliasName: 'alias/myAlias', + }); + + /* eslint-disable cdk/no-core-construct */ + class MyConstruct extends Construct { + constructor(scope: Construct, id: string, key: IKey) { + super(scope, id); + + new CfnOutput(stack, 'OutId', { + value: key.keyId, + }); + new CfnOutput(stack, 'OutArn', { + value: key.keyArn, + }); + } + } + new MyConstruct(stack, 'MyConstruct', myAlias); + /* eslint-enable cdk/no-core-construct */ + + expect(stack).toHaveOutput({ + outputName: 'OutId', + outputValue: 'alias/myAlias', + }); + expect(stack).toHaveOutput({ + outputName: 'OutArn', + outputValue: { + 'Fn::Join': ['', [ + 'arn:', + { Ref: 'AWS::Partition' }, + ':kms:', + { Ref: 'AWS::Region' }, + ':', + { Ref: 'AWS::AccountId' }, + ':alias/myAlias', + ]], + }, + }); +}); + +test('imported alias by name - can be used where a key is expected', () => { + const stack = new Stack(); + + const myAlias = Alias.fromAliasName(stack, 'MyAlias', 'alias/myAlias'); + + /* eslint-disable cdk/no-core-construct */ + class MyConstruct extends Construct { + constructor(scope: Construct, id: string, key: IKey) { + super(scope, id); + + new CfnOutput(stack, 'OutId', { + value: key.keyId, + }); + new CfnOutput(stack, 'OutArn', { + value: key.keyArn, + }); + } + } + new MyConstruct(stack, 'MyConstruct', myAlias); + /* eslint-enable cdk/no-core-construct */ + + expect(stack).toHaveOutput({ + outputName: 'OutId', + outputValue: 'alias/myAlias', + }); + expect(stack).toHaveOutput({ + outputName: 'OutArn', + outputValue: { + 'Fn::Join': ['', [ + 'arn:', + { Ref: 'AWS::Partition' }, + ':kms:', + { Ref: 'AWS::Region' }, + ':', + { Ref: 'AWS::AccountId' }, + ':alias/myAlias', + ]], + }, + }); +}); + +test('imported alias by name - will throw an error when accessing the key', () => { + const stack = new Stack(); + + const myAlias = Alias.fromAliasName(stack, 'MyAlias', 'alias/myAlias'); + + expect(() => myAlias.aliasTargetKey).toThrow('Cannot access aliasTargetKey on an Alias imported by Alias.fromAliasName().'); +}); + +test('fails if alias policy is invalid', () => { + const app = new App(); + const stack = new Stack(app, 'my-stack'); + const key = new Key(stack, 'MyKey'); + const alias = new Alias(stack, 'Alias', { targetKey: key, aliasName: 'alias/foo' }); + + alias.addToResourcePolicy(new PolicyStatement({ + resources: ['*'], + principals: [new ArnPrincipal('arn')], + })); + + expect(() => app.synth()).toThrow(/A PolicyStatement must specify at least one \'action\' or \'notAction\'/); +}); diff --git a/packages/@aws-cdk/aws-kms/test/key.test.ts b/packages/@aws-cdk/aws-kms/test/key.test.ts new file mode 100644 index 0000000000000..93b5d1bc67e31 --- /dev/null +++ b/packages/@aws-cdk/aws-kms/test/key.test.ts @@ -0,0 +1,435 @@ +import { ResourcePart } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; +import * as iam from '@aws-cdk/aws-iam'; +import { App, CfnOutput, RemovalPolicy, Stack, Tags } from '@aws-cdk/core'; +import { Key } from '../lib'; + +const ACTIONS: string[] = [ + 'kms:Create*', + 'kms:Describe*', + 'kms:Enable*', + 'kms:List*', + 'kms:Put*', + 'kms:Update*', + 'kms:Revoke*', + 'kms:Disable*', + 'kms:Get*', + 'kms:Delete*', + 'kms:ScheduleKeyDeletion', + 'kms:CancelKeyDeletion', + 'kms:GenerateDataKey', + 'kms:TagResource', + 'kms:UntagResource', +]; + +test('default key', () => { + const stack = new Stack(); + + new Key(stack, 'MyKey'); + + expect(stack).toMatchTemplate({ + Resources: { + MyKey6AB29FA6: { + Type: 'AWS::KMS::Key', + Properties: { + KeyPolicy: { + Statement: [ + { + Action: ACTIONS, + Effect: 'Allow', + Principal: { + AWS: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::', { Ref: 'AWS::AccountId' }, ':root']] }, + }, + Resource: '*', + }, + ], + Version: '2012-10-17', + }, + }, + DeletionPolicy: 'Retain', + UpdateReplacePolicy: 'Retain', + }, + }, + }); +}); + +test('default with no retention', () => { + const app = new App(); + const stack = new Stack(app, 'TestStack'); + + new Key(stack, 'MyKey', { removalPolicy: RemovalPolicy.DESTROY }); + + expect(stack).toHaveResource('AWS::KMS::Key', { DeletionPolicy: 'Delete', UpdateReplacePolicy: 'Delete' }, ResourcePart.CompleteDefinition); +}); + +test('default with some permission', () => { + const app = new App(); + const stack = new Stack(app, 'Test'); + + const key = new Key(stack, 'MyKey'); + const p = new iam.PolicyStatement({ resources: ['*'], actions: ['kms:encrypt'] }); + p.addArnPrincipal('arn'); + key.addToResourcePolicy(p); + + expect(stack).toMatchTemplate({ + Resources: { + MyKey6AB29FA6: { + Type: 'AWS::KMS::Key', + Properties: { + KeyPolicy: { + Statement: [ + { + Action: ACTIONS, + Effect: 'Allow', + Principal: { + AWS: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::', { Ref: 'AWS::AccountId' }, ':root']] }, + }, + Resource: '*', + }, + { + Action: 'kms:encrypt', + Effect: 'Allow', + Principal: { + AWS: 'arn', + }, + Resource: '*', + }, + ], + Version: '2012-10-17', + }, + }, + DeletionPolicy: 'Retain', + UpdateReplacePolicy: 'Retain', + }, + }, + }); + +}); + +test('key with some options', () => { + const stack = new Stack(); + + const key = new Key(stack, 'MyKey', { + enableKeyRotation: true, + enabled: false, + }); + const p = new iam.PolicyStatement({ resources: ['*'], actions: ['kms:encrypt'] }); + p.addArnPrincipal('arn'); + key.addToResourcePolicy(p); + + Tags.of(key).add('tag1', 'value1'); + Tags.of(key).add('tag2', 'value2'); + Tags.of(key).add('tag3', ''); + + expect(stack).toMatchTemplate({ + Resources: { + MyKey6AB29FA6: { + Type: 'AWS::KMS::Key', + Properties: { + KeyPolicy: { + Statement: [ + { + Action: ACTIONS, + Effect: 'Allow', + Principal: { + AWS: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::', { Ref: 'AWS::AccountId' }, ':root']] }, + }, + Resource: '*', + }, + { + Action: 'kms:encrypt', + Effect: 'Allow', + Principal: { + AWS: 'arn', + }, + Resource: '*', + }, + ], + Version: '2012-10-17', + }, + Enabled: false, + EnableKeyRotation: true, + Tags: [ + { + Key: 'tag1', + Value: 'value1', + }, + { + Key: 'tag2', + Value: 'value2', + }, + { + Key: 'tag3', + Value: '', + }, + ], + }, + DeletionPolicy: 'Retain', + UpdateReplacePolicy: 'Retain', + }, + }, + }); +}); + +test('addAlias creates an alias', () => { + const app = new App(); + const stack = new Stack(app, 'Test'); + + const key = new Key(stack, 'MyKey', { + enableKeyRotation: true, + enabled: false, + }); + + const alias = key.addAlias('alias/xoo'); + expect(alias.aliasName).toBeDefined(); + + expect(stack).toCountResources('AWS::KMS::Alias', 1); + expect(stack).toHaveResource('AWS::KMS::Alias', { + AliasName: 'alias/xoo', + TargetKeyId: { + 'Fn::GetAtt': [ + 'MyKey6AB29FA6', + 'Arn', + ], + }, + }); +}); + +test('can run multiple addAlias', () => { + const app = new App(); + const stack = new Stack(app, 'Test'); + + const key = new Key(stack, 'MyKey', { + enableKeyRotation: true, + enabled: false, + }); + + const alias1 = key.addAlias('alias/alias1'); + const alias2 = key.addAlias('alias/alias2'); + expect(alias1.aliasName).toBeDefined(); + expect(alias2.aliasName).toBeDefined(); + + expect(stack).toCountResources('AWS::KMS::Alias', 2); + expect(stack).toHaveResource('AWS::KMS::Alias', { + AliasName: 'alias/alias1', + TargetKeyId: { + 'Fn::GetAtt': [ + 'MyKey6AB29FA6', + 'Arn', + ], + }, + }); + expect(stack).toHaveResource('AWS::KMS::Alias', { + AliasName: 'alias/alias2', + TargetKeyId: { + 'Fn::GetAtt': [ + 'MyKey6AB29FA6', + 'Arn', + ], + }, + }); +}); + +test('grant decrypt on a key', () => { + // GIVEN + const stack = new Stack(); + const key = new Key(stack, 'Key'); + const user = new iam.User(stack, 'User'); + + // WHEN + key.grantDecrypt(user); + + // THEN + expect(stack).toHaveResource('AWS::KMS::Key', { + KeyPolicy: { + Statement: [ + // This one is there by default + { + Action: ACTIONS, + Effect: 'Allow', + Principal: { AWS: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::', { Ref: 'AWS::AccountId' }, ':root']] } }, + Resource: '*', + }, + // This is the interesting one + { + Action: 'kms:Decrypt', + Effect: 'Allow', + Principal: { AWS: { 'Fn::GetAtt': ['User00B015A1', 'Arn'] } }, + Resource: '*', + }, + ], + Version: '2012-10-17', + }, + }); + + expect(stack).toHaveResource('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ + { + Action: 'kms:Decrypt', + Effect: 'Allow', + Resource: { 'Fn::GetAtt': ['Key961B73FD', 'Arn'] }, + }, + ], + Version: '2012-10-17', + }, + }); + +}); + +test('grant for a principal in a dependent stack works correctly', () => { + const app = new App(); + + const principalStack = new Stack(app, 'PrincipalStack'); + const principal = new iam.Role(principalStack, 'Role', { + assumedBy: new iam.AnyPrincipal(), + }); + + const keyStack = new Stack(app, 'KeyStack'); + const key = new Key(keyStack, 'Key'); + + principalStack.addDependency(keyStack); + + key.grantEncrypt(principal); + + expect(keyStack).toHaveResourceLike('AWS::KMS::Key', { + KeyPolicy: { + Statement: [ + { + // owning account management permissions - we don't care about them in this test + }, + { + Action: [ + 'kms:Encrypt', + 'kms:ReEncrypt*', + 'kms:GenerateDataKey*', + ], + Effect: 'Allow', + Principal: { + AWS: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::', { Ref: 'AWS::AccountId' }, ':root']] }, + }, + Resource: '*', + }, + ], + }, + }); + +}); + +test('keyId resolves to a Ref', () => { + const stack = new Stack(); + const key = new Key(stack, 'MyKey'); + + new CfnOutput(stack, 'Out', { + value: key.keyId, + }); + + expect(stack).toHaveOutput({ + outputName: 'Out', + outputValue: { Ref: 'MyKey6AB29FA6' }, + }); +}); + +test('enablePolicyControl changes key policy to allow IAM control', () => { + const stack = new Stack(); + new Key(stack, 'MyKey', { trustAccountIdentities: true }); + expect(stack).toHaveResourceLike('AWS::KMS::Key', { + KeyPolicy: { + Statement: [ + { + Action: 'kms:*', + Effect: 'Allow', + Principal: { + AWS: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::', { Ref: 'AWS::AccountId' }, ':root']] }, + }, + Resource: '*', + }, + ], + }, + }); +}); + +test('fails if key policy has no actions', () => { + const app = new App(); + const stack = new Stack(app, 'my-stack'); + const key = new Key(stack, 'MyKey'); + + key.addToResourcePolicy(new iam.PolicyStatement({ + resources: ['*'], + principals: [new iam.ArnPrincipal('arn')], + })); + + expect(() => app.synth()).toThrow(/A PolicyStatement must specify at least one \'action\' or \'notAction\'/); +}); + +test('fails if key policy has no IAM principals', () => { + const app = new App(); + const stack = new Stack(app, 'my-stack'); + const key = new Key(stack, 'MyKey'); + + key.addToResourcePolicy(new iam.PolicyStatement({ + resources: ['*'], + actions: ['kms:*'], + })); + + expect(() => app.synth()).toThrow(/A PolicyStatement used in a resource-based policy must specify at least one IAM principal/); +}); + +describe('imported keys', () => { + test('throw an error when providing something that is not a valid key ARN', () => { + const stack = new Stack(); + + expect(() => { + Key.fromKeyArn(stack, 'Imported', 'arn:aws:kms:us-east-1:123456789012:key'); + }).toThrow(/KMS key ARN must be in the format 'arn:aws:kms:::key\/', got: 'arn:aws:kms:us-east-1:123456789012:key'/); + + }); + + test('can have aliases added to them', () => { + const stack2 = new Stack(); + const myKeyImported = Key.fromKeyArn(stack2, 'MyKeyImported', + 'arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012'); + + // addAlias can be called on imported keys. + myKeyImported.addAlias('alias/hello'); + + expect(myKeyImported.keyId).toEqual('12345678-1234-1234-1234-123456789012'); + + expect(stack2).toMatchTemplate({ + Resources: { + MyKeyImportedAliasB1C5269F: { + Type: 'AWS::KMS::Alias', + Properties: { + AliasName: 'alias/hello', + TargetKeyId: 'arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012', + }, + }, + }, + }); + }); + +}); + +describe('addToResourcePolicy allowNoOp and there is no policy', () => { + test('succeed if set to true (default)', () => { + const stack = new Stack(); + + const key = Key.fromKeyArn(stack, 'Imported', + 'arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012'); + + key.addToResourcePolicy(new iam.PolicyStatement({ resources: ['*'], actions: ['*'] })); + + }); + + test('fails if set to false', () => { + const stack = new Stack(); + + const key = Key.fromKeyArn(stack, 'Imported', + 'arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012'); + + expect(() => { + key.addToResourcePolicy(new iam.PolicyStatement({ resources: ['*'], actions: ['*'] }), /* allowNoOp */ false); + }).toThrow('Unable to add statement to IAM resource policy for KMS key: "arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012"'); + + }); +}); diff --git a/packages/@aws-cdk/aws-kms/test/test.alias.ts b/packages/@aws-cdk/aws-kms/test/test.alias.ts deleted file mode 100644 index 7d10d326ebf96..0000000000000 --- a/packages/@aws-cdk/aws-kms/test/test.alias.ts +++ /dev/null @@ -1,250 +0,0 @@ -import { expect, haveResource, SynthUtils } from '@aws-cdk/assert'; -import { ArnPrincipal, PolicyStatement } from '@aws-cdk/aws-iam'; -import { App, CfnOutput, Construct, Stack } from '@aws-cdk/core'; -import { Test } from 'nodeunit'; -import { Alias } from '../lib/alias'; -import { IKey, Key } from '../lib/key'; - -/* eslint-disable quote-props */ - -export = { - 'default alias'(test: Test) { - const app = new App(); - const stack = new Stack(app, 'Test'); - const key = new Key(stack, 'Key'); - - new Alias(stack, 'Alias', { targetKey: key, aliasName: 'alias/foo' }); - - expect(stack).to(haveResource('AWS::KMS::Alias', { - AliasName: 'alias/foo', - TargetKeyId: { 'Fn::GetAtt': ['Key961B73FD', 'Arn'] }, - })); - - test.done(); - }, - - 'add "alias/" prefix if not given.'(test: Test) { - const app = new App(); - const stack = new Stack(app, 'Test'); - - const key = new Key(stack, 'Key', { - enableKeyRotation: true, - enabled: false, - }); - - new Alias(stack, 'Alias', { - aliasName: 'foo', - targetKey: key, - }); - - expect(stack).to(haveResource('AWS::KMS::Alias', { - AliasName: 'alias/foo', - TargetKeyId: { 'Fn::GetAtt': ['Key961B73FD', 'Arn'] }, - })); - - test.done(); - }, - - 'can create alias directly while creating the key'(test: Test) { - const app = new App(); - const stack = new Stack(app, 'Test'); - - new Key(stack, 'Key', { - enableKeyRotation: true, - enabled: false, - alias: 'foo', - }); - - expect(stack).to(haveResource('AWS::KMS::Alias', { - AliasName: 'alias/foo', - TargetKeyId: { 'Fn::GetAtt': ['Key961B73FD', 'Arn'] }, - })); - - test.done(); - }, - - 'fails if alias is "alias/" (and nothing more)'(test: Test) { - const app = new App(); - const stack = new Stack(app, 'Test'); - - const key = new Key(stack, 'MyKey', { - enableKeyRotation: true, - enabled: false, - }); - - test.throws(() => new Alias(stack, 'Alias', { - aliasName: 'alias/', - targetKey: key, - })); - - test.done(); - }, - - 'fails if alias contains illegal characters'(test: Test) { - const app = new App(); - const stack = new Stack(app, 'Test'); - - const key = new Key(stack, 'MyKey', { - enableKeyRotation: true, - enabled: false, - }); - - test.throws(() => new Alias(stack, 'Alias', { - aliasName: 'alias/@Nope', - targetKey: key, - }), 'a-zA-Z0-9:/_-'); - - test.done(); - }, - - 'fails if alias starts with "alias/aws/"'(test: Test) { - const app = new App(); - const stack = new Stack(app, 'Test'); - - const key = new Key(stack, 'MyKey', { - enableKeyRotation: true, - enabled: false, - }); - - test.throws(() => new Alias(stack, 'Alias1', { - aliasName: 'alias/aws/', - targetKey: key, - }), /Alias cannot start with alias\/aws\/: alias\/aws\//); - - test.throws(() => new Alias(stack, 'Alias2', { - aliasName: 'alias/aws/Awesome', - targetKey: key, - }), /Alias cannot start with alias\/aws\/: alias\/aws\/Awesome/); - - test.throws(() => new Alias(stack, 'Alias3', { - aliasName: 'alias/AWS/awesome', - targetKey: key, - }), /Alias cannot start with alias\/aws\/: alias\/AWS\/awesome/); - - test.done(); - }, - - 'can be used wherever a key is expected'(test: Test) { - const stack = new Stack(); - - const myKey = new Key(stack, 'MyKey', { - enableKeyRotation: true, - enabled: false, - }); - const myAlias = new Alias(stack, 'MyAlias', { - targetKey: myKey, - aliasName: 'alias/myAlias', - }); - - /* eslint-disable cdk/no-core-construct */ - class MyConstruct extends Construct { - constructor(scope: Construct, id: string, key: IKey) { - super(scope, id); - - new CfnOutput(stack, 'OutId', { - value: key.keyId, - }); - new CfnOutput(stack, 'OutArn', { - value: key.keyArn, - }); - } - } - /* eslint-enable cdk/no-core-construct */ - - new MyConstruct(stack, 'MyConstruct', myAlias); - - const template = SynthUtils.synthesize(stack).template.Outputs; - - test.deepEqual(template, { - 'OutId': { - 'Value': 'alias/myAlias', - }, - 'OutArn': { - 'Value': { - 'Fn::Join': ['', [ - 'arn:', - { Ref: 'AWS::Partition' }, - ':kms:', - { Ref: 'AWS::Region' }, - ':', - { Ref: 'AWS::AccountId' }, - ':alias/myAlias', - ]], - }, - }, - }); - - test.done(); - }, - - 'imported alias by name - can be used where a key is expected'(test: Test) { - const stack = new Stack(); - - const myAlias = Alias.fromAliasName(stack, 'MyAlias', 'alias/myAlias'); - - /* eslint-disable cdk/no-core-construct */ - class MyConstruct extends Construct { - constructor(scope: Construct, id: string, key: IKey) { - super(scope, id); - - new CfnOutput(stack, 'OutId', { - value: key.keyId, - }); - new CfnOutput(stack, 'OutArn', { - value: key.keyArn, - }); - } - } - /* eslint-enable cdk/no-core-construct */ - - new MyConstruct(stack, 'MyConstruct', myAlias); - - const template = SynthUtils.synthesize(stack).template.Outputs; - - test.deepEqual(template, { - 'OutId': { - 'Value': 'alias/myAlias', - }, - 'OutArn': { - 'Value': { - 'Fn::Join': ['', [ - 'arn:', - { Ref: 'AWS::Partition' }, - ':kms:', - { Ref: 'AWS::Region' }, - ':', - { Ref: 'AWS::AccountId' }, - ':alias/myAlias', - ]], - }, - }, - }); - - test.done(); - }, - - 'imported alias by name - will throw an error when accessing the key'(test: Test) { - const stack = new Stack(); - - const myAlias = Alias.fromAliasName(stack, 'MyAlias', 'alias/myAlias'); - - test.throws(() => myAlias.aliasTargetKey, 'Cannot access aliasTargetKey on an Alias imported by Alias.fromAliasName().'); - - test.done(); - }, - - 'fails if alias policy is invalid'(test: Test) { - const app = new App(); - const stack = new Stack(app, 'my-stack'); - const key = new Key(stack, 'MyKey'); - const alias = new Alias(stack, 'Alias', { targetKey: key, aliasName: 'alias/foo' }); - - alias.addToResourcePolicy(new PolicyStatement({ - resources: ['*'], - principals: [new ArnPrincipal('arn')], - })); - - test.throws(() => app.synth(), /A PolicyStatement must specify at least one \'action\' or \'notAction\'/); - test.done(); - }, -}; diff --git a/packages/@aws-cdk/aws-kms/test/test.key.ts b/packages/@aws-cdk/aws-kms/test/test.key.ts deleted file mode 100644 index bcbaaec7f1c13..0000000000000 --- a/packages/@aws-cdk/aws-kms/test/test.key.ts +++ /dev/null @@ -1,529 +0,0 @@ -import { - countResources, - exactlyMatchTemplate, - expect, - haveResource, - haveResourceLike, - ResourcePart, - SynthUtils, -} from '@aws-cdk/assert'; -import * as iam from '@aws-cdk/aws-iam'; -import { App, CfnOutput, RemovalPolicy, Stack, Tags } from '@aws-cdk/core'; -import { Test } from 'nodeunit'; -import { Key } from '../lib'; - -/* eslint-disable quote-props */ -const ACTIONS: string[] = [ - 'kms:Create*', - 'kms:Describe*', - 'kms:Enable*', - 'kms:List*', - 'kms:Put*', - 'kms:Update*', - 'kms:Revoke*', - 'kms:Disable*', - 'kms:Get*', - 'kms:Delete*', - 'kms:ScheduleKeyDeletion', - 'kms:CancelKeyDeletion', - 'kms:GenerateDataKey', - 'kms:TagResource', - 'kms:UntagResource', -]; - -export = { - 'default key'(test: Test) { - const stack = new Stack(); - - new Key(stack, 'MyKey'); - - expect(stack).to(exactlyMatchTemplate({ - Resources: { - MyKey6AB29FA6: { - Type: 'AWS::KMS::Key', - Properties: { - KeyPolicy: { - Statement: [ - { - Action: ACTIONS, - Effect: 'Allow', - Principal: { - AWS: { - 'Fn::Join': [ - '', - [ - 'arn:', - { - Ref: 'AWS::Partition', - }, - ':iam::', - { - Ref: 'AWS::AccountId', - }, - ':root', - ], - ], - }, - }, - Resource: '*', - }, - ], - Version: '2012-10-17', - }, - }, - DeletionPolicy: 'Retain', - UpdateReplacePolicy: 'Retain', - }, - }, - })); - test.done(); - }, - - 'default with no retention'(test: Test) { - const app = new App(); - const stack = new Stack(app, 'TestStack'); - - new Key(stack, 'MyKey', { removalPolicy: RemovalPolicy.DESTROY }); - - expect(stack).to(haveResource('AWS::KMS::Key', { DeletionPolicy: 'Delete', UpdateReplacePolicy: 'Delete' }, ResourcePart.CompleteDefinition)); - test.done(); - }, - - 'default with some permission'(test: Test) { - const app = new App(); - const stack = new Stack(app, 'Test'); - - const key = new Key(stack, 'MyKey'); - const p = new iam.PolicyStatement({ resources: ['*'], actions: ['kms:encrypt'] }); - p.addArnPrincipal('arn'); - key.addToResourcePolicy(p); - - expect(stack).to(exactlyMatchTemplate({ - Resources: { - MyKey6AB29FA6: { - Type: 'AWS::KMS::Key', - Properties: { - KeyPolicy: { - Statement: [ - { - Action: ACTIONS, - Effect: 'Allow', - Principal: { - AWS: { - 'Fn::Join': [ - '', - [ - 'arn:', - { - Ref: 'AWS::Partition', - }, - ':iam::', - { - Ref: 'AWS::AccountId', - }, - ':root', - ], - ], - }, - }, - Resource: '*', - }, - { - Action: 'kms:encrypt', - Effect: 'Allow', - Principal: { - AWS: 'arn', - }, - Resource: '*', - }, - ], - Version: '2012-10-17', - }, - }, - DeletionPolicy: 'Retain', - UpdateReplacePolicy: 'Retain', - }, - }, - })); - - test.done(); - }, - - 'key with some options'(test: Test) { - const stack = new Stack(); - - const key = new Key(stack, 'MyKey', { - enableKeyRotation: true, - enabled: false, - }); - const p = new iam.PolicyStatement({ resources: ['*'], actions: ['kms:encrypt'] }); - p.addArnPrincipal('arn'); - key.addToResourcePolicy(p); - - Tags.of(key).add('tag1', 'value1'); - Tags.of(key).add('tag2', 'value2'); - Tags.of(key).add('tag3', ''); - - expect(stack).to(exactlyMatchTemplate({ - Resources: { - MyKey6AB29FA6: { - Type: 'AWS::KMS::Key', - Properties: { - KeyPolicy: { - Statement: [ - { - Action: ACTIONS, - Effect: 'Allow', - Principal: { - AWS: { - 'Fn::Join': [ - '', - [ - 'arn:', - { - Ref: 'AWS::Partition', - }, - ':iam::', - { - Ref: 'AWS::AccountId', - }, - ':root', - ], - ], - }, - }, - Resource: '*', - }, - { - Action: 'kms:encrypt', - Effect: 'Allow', - Principal: { - AWS: 'arn', - }, - Resource: '*', - }, - ], - Version: '2012-10-17', - }, - Enabled: false, - EnableKeyRotation: true, - Tags: [ - { - Key: 'tag1', - Value: 'value1', - }, - { - Key: 'tag2', - Value: 'value2', - }, - { - Key: 'tag3', - Value: '', - }, - ], - }, - DeletionPolicy: 'Retain', - UpdateReplacePolicy: 'Retain', - }, - }, - })); - - test.done(); - }, - - 'addAlias creates an alias'(test: Test) { - const app = new App(); - const stack = new Stack(app, 'Test'); - - const key = new Key(stack, 'MyKey', { - enableKeyRotation: true, - enabled: false, - }); - - const alias = key.addAlias('alias/xoo'); - test.ok(alias.aliasName); - - expect(stack).to(countResources('AWS::KMS::Alias', 1)); - expect(stack).to(haveResource('AWS::KMS::Alias', { - AliasName: 'alias/xoo', - TargetKeyId: { - 'Fn::GetAtt': [ - 'MyKey6AB29FA6', - 'Arn', - ], - }, - })); - test.done(); - }, - - 'can run multiple addAlias'(test: Test) { - const app = new App(); - const stack = new Stack(app, 'Test'); - - const key = new Key(stack, 'MyKey', { - enableKeyRotation: true, - enabled: false, - }); - - const alias1 = key.addAlias('alias/alias1'); - const alias2 = key.addAlias('alias/alias2'); - test.ok(alias1.aliasName); - test.ok(alias2.aliasName); - - expect(stack).to(countResources('AWS::KMS::Alias', 2)); - expect(stack).to(haveResource('AWS::KMS::Alias', { - AliasName: 'alias/alias1', - TargetKeyId: { - 'Fn::GetAtt': [ - 'MyKey6AB29FA6', - 'Arn', - ], - }, - })); - expect(stack).to(haveResource('AWS::KMS::Alias', { - AliasName: 'alias/alias2', - TargetKeyId: { - 'Fn::GetAtt': [ - 'MyKey6AB29FA6', - 'Arn', - ], - }, - })); - test.done(); - }, - - 'grant decrypt on a key'(test: Test) { - // GIVEN - const stack = new Stack(); - const key = new Key(stack, 'Key'); - const user = new iam.User(stack, 'User'); - - // WHEN - key.grantDecrypt(user); - - // THEN - expect(stack).to(haveResource('AWS::KMS::Key', { - KeyPolicy: { - Statement: [ - // This one is there by default - { - Action: ACTIONS, - Effect: 'Allow', - Principal: { AWS: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::', { Ref: 'AWS::AccountId' }, ':root']] } }, - Resource: '*', - }, - // This is the interesting one - { - Action: 'kms:Decrypt', - Effect: 'Allow', - Principal: { AWS: { 'Fn::GetAtt': ['User00B015A1', 'Arn'] } }, - Resource: '*', - }, - ], - Version: '2012-10-17', - }, - })); - - expect(stack).to(haveResource('AWS::IAM::Policy', { - PolicyDocument: { - Statement: [ - { - Action: 'kms:Decrypt', - Effect: 'Allow', - Resource: { 'Fn::GetAtt': ['Key961B73FD', 'Arn'] }, - }, - ], - Version: '2012-10-17', - }, - })); - - test.done(); - }, - - 'grant for a principal in a dependent stack works correctly'(test: Test) { - const app = new App(); - - const principalStack = new Stack(app, 'PrincipalStack'); - const principal = new iam.Role(principalStack, 'Role', { - assumedBy: new iam.AnyPrincipal(), - }); - - const keyStack = new Stack(app, 'KeyStack'); - const key = new Key(keyStack, 'Key'); - - principalStack.addDependency(keyStack); - - key.grantEncrypt(principal); - - expect(keyStack).to(haveResourceLike('AWS::KMS::Key', { - 'KeyPolicy': { - 'Statement': [ - { - // owning account management permissions - we don't care about them in this test - }, - { - 'Action': [ - 'kms:Encrypt', - 'kms:ReEncrypt*', - 'kms:GenerateDataKey*', - ], - 'Effect': 'Allow', - 'Principal': { - 'AWS': { - 'Fn::Join': ['', [ - 'arn:', - { 'Ref': 'AWS::Partition' }, - ':iam::', - { 'Ref': 'AWS::AccountId' }, - ':root', - ]], - }, - }, - 'Resource': '*', - }, - ], - }, - })); - - test.done(); - }, - - 'keyId resolves to a Ref'(test: Test) { - const stack = new Stack(); - const key = new Key(stack, 'MyKey'); - - new CfnOutput(stack, 'Out', { - value: key.keyId, - }); - - const template = SynthUtils.synthesize(stack).template.Outputs; - - test.deepEqual(template, { - 'Out': { - 'Value': { - 'Ref': 'MyKey6AB29FA6', - }, - }, - }); - - test.done(); - }, - 'enablePolicyControl changes key policy to allow IAM control'(test: Test) { - const stack = new Stack(); - new Key(stack, 'MyKey', { trustAccountIdentities: true }); - expect(stack).to(haveResourceLike('AWS::KMS::Key', { - 'KeyPolicy': { - 'Statement': [ - { - 'Action': 'kms:*', - 'Effect': 'Allow', - 'Principal': { - 'AWS': { - 'Fn::Join': ['', [ - 'arn:', - { 'Ref': 'AWS::Partition' }, - ':iam::', - { 'Ref': 'AWS::AccountId' }, - ':root', - ]], - }, - }, - 'Resource': '*', - }, - ], - }, - })); - test.done(); - }, - - 'fails if key policy has no actions'(test: Test) { - const app = new App(); - const stack = new Stack(app, 'my-stack'); - const key = new Key(stack, 'MyKey'); - - key.addToResourcePolicy(new iam.PolicyStatement({ - resources: ['*'], - principals: [new iam.ArnPrincipal('arn')], - })); - - test.throws(() => app.synth(), /A PolicyStatement must specify at least one \'action\' or \'notAction\'/); - test.done(); - }, - - 'fails if key policy has no IAM principals'(test: Test) { - const app = new App(); - const stack = new Stack(app, 'my-stack'); - const key = new Key(stack, 'MyKey'); - - key.addToResourcePolicy(new iam.PolicyStatement({ - resources: ['*'], - actions: ['kms:*'], - })); - - test.throws(() => app.synth(), /A PolicyStatement used in a resource-based policy must specify at least one IAM principal/); - test.done(); - }, - - 'imported keys': { - 'throw an error when providing something that is not a valid key ARN'(test: Test) { - const stack = new Stack(); - - test.throws(() => { - Key.fromKeyArn(stack, 'Imported', 'arn:aws:kms:us-east-1:123456789012:key'); - }, /KMS key ARN must be in the format 'arn:aws:kms:::key\/', got: 'arn:aws:kms:us-east-1:123456789012:key'/); - - test.done(); - }, - - 'can have aliases added to them'(test: Test) { - const stack2 = new Stack(); - const myKeyImported = Key.fromKeyArn(stack2, 'MyKeyImported', - 'arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012'); - - // addAlias can be called on imported keys. - myKeyImported.addAlias('alias/hello'); - - test.equal(myKeyImported.keyId, '12345678-1234-1234-1234-123456789012'); - - expect(stack2).toMatch({ - Resources: { - MyKeyImportedAliasB1C5269F: { - Type: 'AWS::KMS::Alias', - Properties: { - AliasName: 'alias/hello', - TargetKeyId: 'arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012', - }, - }, - }, - }); - - test.done(); - }, - - 'addToResourcePolicy allowNoOp and there is no policy': { - 'succeed if set to true (default)'(test: Test) { - const stack = new Stack(); - - const key = Key.fromKeyArn(stack, 'Imported', - 'arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012'); - - key.addToResourcePolicy(new iam.PolicyStatement({ resources: ['*'], actions: ['*'] })); - - test.done(); - }, - - 'fails if set to false'(test: Test) { - const stack = new Stack(); - - const key = Key.fromKeyArn(stack, 'Imported', - 'arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012'); - - test.throws(() => { - key.addToResourcePolicy(new iam.PolicyStatement({ resources: ['*'], actions: ['*'] }), /* allowNoOp */ false); - }, 'Unable to add statement to IAM resource policy for KMS key: "foo/bar"'); - - test.done(); - }, - }, - }, -}; diff --git a/packages/@aws-cdk/aws-kms/test/test.via-service-principal.ts b/packages/@aws-cdk/aws-kms/test/test.via-service-principal.ts deleted file mode 100644 index 5e415c6057f5b..0000000000000 --- a/packages/@aws-cdk/aws-kms/test/test.via-service-principal.ts +++ /dev/null @@ -1,50 +0,0 @@ -import * as iam from '@aws-cdk/aws-iam'; -import { Test } from 'nodeunit'; -import * as kms from '../lib'; - -export = { - 'Via service, any principal'(test: Test) { - // WHEN - const statement = new iam.PolicyStatement({ - actions: ['abc:call'], - principals: [new kms.ViaServicePrincipal('bla.amazonaws.com')], - resources: ['*'], - }); - - // THEN - test.deepEqual(statement.toStatementJson(), { - Action: 'abc:call', - Condition: { StringEquals: { 'kms:ViaService': 'bla.amazonaws.com' } }, - Effect: 'Allow', - Principal: '*', - Resource: '*', - }); - - test.done(); - }, - - 'Via service, principal with conditions'(test: Test) { - // WHEN - const statement = new iam.PolicyStatement({ - actions: ['abc:call'], - principals: [new kms.ViaServicePrincipal('bla.amazonaws.com', new iam.OrganizationPrincipal('o-1234'))], - resources: ['*'], - }); - - // THEN - test.deepEqual(statement.toStatementJson(), { - Action: 'abc:call', - Condition: { - StringEquals: { - 'kms:ViaService': 'bla.amazonaws.com', - 'aws:PrincipalOrgID': 'o-1234', - }, - }, - Effect: 'Allow', - Principal: '*', - Resource: '*', - }); - - test.done(); - }, -}; diff --git a/packages/@aws-cdk/aws-kms/test/via-service-principal.test.ts b/packages/@aws-cdk/aws-kms/test/via-service-principal.test.ts new file mode 100644 index 0000000000000..53d0d33d02933 --- /dev/null +++ b/packages/@aws-cdk/aws-kms/test/via-service-principal.test.ts @@ -0,0 +1,44 @@ +import '@aws-cdk/assert/jest'; +import * as iam from '@aws-cdk/aws-iam'; +import * as kms from '../lib'; + +test('Via service, any principal', () => { + // WHEN + const statement = new iam.PolicyStatement({ + actions: ['abc:call'], + principals: [new kms.ViaServicePrincipal('bla.amazonaws.com')], + resources: ['*'], + }); + + // THEN + expect(statement.toStatementJson()).toEqual({ + Action: 'abc:call', + Condition: { StringEquals: { 'kms:ViaService': 'bla.amazonaws.com' } }, + Effect: 'Allow', + Principal: '*', + Resource: '*', + }); +}); + +test('Via service, principal with conditions', () => { + // WHEN + const statement = new iam.PolicyStatement({ + actions: ['abc:call'], + principals: [new kms.ViaServicePrincipal('bla.amazonaws.com', new iam.OrganizationPrincipal('o-1234'))], + resources: ['*'], + }); + + // THEN + expect(statement.toStatementJson()).toEqual({ + Action: 'abc:call', + Condition: { + StringEquals: { + 'kms:ViaService': 'bla.amazonaws.com', + 'aws:PrincipalOrgID': 'o-1234', + }, + }, + Effect: 'Allow', + Principal: '*', + Resource: '*', + }); +}); From 4e5b8cafb484f0fc8fa94961b1bdb7d1bd61aaf8 Mon Sep 17 00:00:00 2001 From: Nathan Peck Date: Mon, 7 Dec 2020 13:43:57 -0500 Subject: [PATCH 285/314] chore(ecs-service-extensions): Adding defined return types to the ServiceExtension abstract class (#11916) The ServiceExtension abstract class was missing a TypeScript definition for the return type of the hook. This worked through TypeScript type inference, but did not result in a helpful tooltip guide when attempting to implement your own ServiceExtension. This change should result in proper warnings and tooltips in IDE's when implementing a ServiceExtension ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../ecs-service-extensions/lib/extensions/appmesh.ts | 4 ++-- .../lib/extensions/assign-public-ip/assign-public-ip.ts | 2 +- .../ecs-service-extensions/lib/extensions/container.ts | 2 +- .../lib/extensions/extension-interfaces.ts | 6 +++--- .../ecs-service-extensions/lib/extensions/firelens.ts | 2 +- .../lib/extensions/http-load-balancer.ts | 2 +- .../lib/extensions/scale-on-cpu-utilization.ts | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts index 3c7bfae78d7f9..1c17ed4628181 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts +++ b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts @@ -78,7 +78,7 @@ export class AppMeshExtension extends ServiceExtension { } } - public modifyTaskDefinitionProps(props: ecs.TaskDefinitionProps) { + public modifyTaskDefinitionProps(props: ecs.TaskDefinitionProps): ecs.TaskDefinitionProps { // Find the app extension, to get its port const containerextension = this.parentService.serviceDescription.get('service-container') as Container; @@ -223,7 +223,7 @@ export class AppMeshExtension extends ServiceExtension { } // Enable CloudMap for the service. - public modifyServiceProps(props: ServiceBuild) { + public modifyServiceProps(props: ServiceBuild): ServiceBuild { return { ...props, diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/assign-public-ip/assign-public-ip.ts b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/assign-public-ip/assign-public-ip.ts index 747b06dc2d72a..57f71764019b8 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/assign-public-ip/assign-public-ip.ts +++ b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/assign-public-ip/assign-public-ip.ts @@ -60,7 +60,7 @@ export class AssignPublicIpExtension extends ServiceExtension { } } - public modifyServiceProps(props: ServiceBuild) { + public modifyServiceProps(props: ServiceBuild): ServiceBuild { return { ...props, assignPublicIp: true, diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/container.ts b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/container.ts index 98c047cc0b2ec..3ae65bfe6994b 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/container.ts +++ b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/container.ts @@ -65,7 +65,7 @@ export class Container extends ServiceExtension { // This hook sets the overall task resource requirements to the // resource requirements of the application itself. - public modifyTaskDefinitionProps(props: ecs.TaskDefinitionProps) { + public modifyTaskDefinitionProps(props: ecs.TaskDefinitionProps): ecs.TaskDefinitionProps { return { ...props, cpu: this.props.cpu.toString(), diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/extension-interfaces.ts b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/extension-interfaces.ts index 1dac2d9257e73..bf1b213a25ba3 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/extension-interfaces.ts +++ b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/extension-interfaces.ts @@ -141,7 +141,7 @@ export abstract class ServiceExtension { * the task. * @param props - Properties of the task definition to be created */ - public modifyTaskDefinitionProps(props: ecs.TaskDefinitionProps) { + public modifyTaskDefinitionProps(props: ecs.TaskDefinitionProps): ecs.TaskDefinitionProps { return { ...props, } as ecs.TaskDefinitionProps; @@ -185,7 +185,7 @@ export abstract class ServiceExtension { * of the service to be created * @param props - The service properties to mutate */ - public modifyServiceProps(props: ServiceBuild) { + public modifyServiceProps(props: ServiceBuild): ServiceBuild { return { ...props, } as ServiceBuild; @@ -225,7 +225,7 @@ export abstract class ContainerMutatingHook { * settings of the application container. * @param props - The container definition to mutate */ - public mutateContainerDefinition(props: ecs.ContainerDefinitionOptions) { + public mutateContainerDefinition(props: ecs.ContainerDefinitionOptions): ecs.ContainerDefinitionOptions { return { ...props, } as ecs.ContainerDefinitionOptions; diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/firelens.ts b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/firelens.ts index c96ce40e99fe6..03c23e015eaf7 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/firelens.ts +++ b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/firelens.ts @@ -35,7 +35,7 @@ export class FirelensMutatingHook extends ContainerMutatingHook { this.logGroup = props.logGroup; } - public mutateContainerDefinition(props: ecs.ContainerDefinitionOptions) { + public mutateContainerDefinition(props: ecs.ContainerDefinitionOptions): ecs.ContainerDefinitionOptions { return { ...props, diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/http-load-balancer.ts b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/http-load-balancer.ts index 114aa1350249b..c00481d1f424c 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/http-load-balancer.ts +++ b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/http-load-balancer.ts @@ -37,7 +37,7 @@ export class HttpLoadBalancerExtension extends ServiceExtension { } // Minor service configuration tweaks to work better with a load balancer - public modifyServiceProps(props: ServiceBuild) { + public modifyServiceProps(props: ServiceBuild): ServiceBuild { return { ...props, diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/scale-on-cpu-utilization.ts b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/scale-on-cpu-utilization.ts index 1fa993fae3ecc..c0ee8b0e12ac0 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/scale-on-cpu-utilization.ts +++ b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/scale-on-cpu-utilization.ts @@ -105,7 +105,7 @@ export class ScaleOnCpuUtilization extends ServiceExtension { // This service modifies properties of the service prior // to construct creation. - public modifyServiceProps(props: ServiceBuild) { + public modifyServiceProps(props: ServiceBuild): ServiceBuild { return { ...props, From 442bf7e097768646f8c8a7502762a8455f87e371 Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Mon, 7 Dec 2020 19:44:37 +0000 Subject: [PATCH 286/314] feat(cloudfront): the Distribution construct is now Generally Available (stable) (#11919) Marking the `Distribution` construct APIs -- and so the whole module -- as stable/GA. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-cloudfront/README.md | 36 ++++--------------- .../aws-cloudfront/lib/cache-policy.ts | 6 ---- .../aws-cloudfront/lib/distribution.ts | 12 ------- .../lib/origin-request-policy.ts | 6 ---- .../@aws-cdk/aws-cloudfront/lib/origin.ts | 6 ---- .../aws-cloudfront/lib/web_distribution.ts | 2 -- packages/@aws-cdk/aws-cloudfront/package.json | 14 ++------ 7 files changed, 8 insertions(+), 74 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudfront/README.md b/packages/@aws-cdk/aws-cloudfront/README.md index 689cb77945452..cccfb7405488e 100644 --- a/packages/@aws-cdk/aws-cloudfront/README.md +++ b/packages/@aws-cdk/aws-cloudfront/README.md @@ -3,30 +3,9 @@ --- -Features | Stability -------------------------------------------------------|--------------------------------------------- -CFN Resources | ![Stable](https://img.shields.io/badge/stable-success.svg?style=for-the-badge) -Higher level constructs for Distribution | ![Developer Preview](https://img.shields.io/badge/developer--preview-informational.svg?style=for-the-badge) -Higher level constructs for CloudFrontWebDistribution | ![Stable](https://img.shields.io/badge/stable-success.svg?style=for-the-badge) +![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> **CFN Resources:** All classes with the `Cfn` prefix in this module ([CFN Resources]) are always -> stable and safe to use. -> -> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib - - - -> **Developer Preview:** Higher level constructs in this module that are marked as developer -> preview have completed their phase of active development and are looking for adoption and -> feedback. While the same caveats around non-backward compatible as Experimental constructs apply, -> they will undergo fewer breaking changes. Just as with Experimental constructs, these are not -> subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be -> announced in the release notes. - - - -> **Stable:** Higher level constructs in this module that are marked stable will not undergo any -> breaking changes. They will strictly follow the [Semantic Versioning](https://semver.org/) model. +![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- @@ -37,9 +16,7 @@ your users. CloudFront delivers your content through a worldwide network of data you're serving with CloudFront, the user is routed to the edge location that provides the lowest latency, so that content is delivered with the best possible performance. -## Distribution API - Developer Preview - -![Developer Preview](https://img.shields.io/badge/developer--preview-informational.svg?style=for-the-badge) +## Distribution API The `Distribution` API is currently being built to replace the existing `CloudFrontWebDistribution` API. The `Distribution` API is optimized for the most common use cases of CloudFront distributions (e.g., single origin and behavior, few customizations) while still providing the ability for more @@ -384,11 +361,10 @@ const distribution = cloudfront.Distribution.fromDistributionAttributes(scope, ' }); ``` -## CloudFrontWebDistribution API - Stable - -![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) +## CloudFrontWebDistribution API -A CloudFront construct - for setting up the AWS CDN with ease! +> The `CloudFrontWebDistribution` construct is the original construct written for working with CloudFront distributions. +> Users are encouraged to use the newer `Distribution` instead, as it has a simpler interface and receives new features faster. Example usage: diff --git a/packages/@aws-cdk/aws-cloudfront/lib/cache-policy.ts b/packages/@aws-cdk/aws-cloudfront/lib/cache-policy.ts index 30d3e6b97db74..18924ade79748 100644 --- a/packages/@aws-cdk/aws-cloudfront/lib/cache-policy.ts +++ b/packages/@aws-cdk/aws-cloudfront/lib/cache-policy.ts @@ -4,7 +4,6 @@ import { CfnCachePolicy } from './cloudfront.generated'; /** * Represents a Cache Policy - * @experimental */ export interface ICachePolicy { /** @@ -16,7 +15,6 @@ export interface ICachePolicy { /** * Properties for creating a Cache Policy - * @experimental */ export interface CachePolicyProps { /** @@ -87,7 +85,6 @@ export interface CachePolicyProps { * A Cache Policy configuration. * * @resource AWS::CloudFront::CachePolicy - * @experimental */ export class CachePolicy extends Resource implements ICachePolicy { @@ -178,7 +175,6 @@ export class CachePolicy extends Resource implements ICachePolicy { /** * Determines whether any cookies in viewer requests are included in the cache key and * automatically included in requests that CloudFront sends to the origin. - * @experimental */ export class CacheCookieBehavior { /** @@ -226,7 +222,6 @@ export class CacheCookieBehavior { /** * Determines whether any HTTP headers are included in the cache key and automatically included in requests that CloudFront sends to the origin. - * @experimental */ export class CacheHeaderBehavior { /** HTTP headers are not included in the cache key and are not automatically included in requests that CloudFront sends to the origin. */ @@ -253,7 +248,6 @@ export class CacheHeaderBehavior { /** * Determines whether any URL query strings in viewer requests are included in the cache key * and automatically included in requests that CloudFront sends to the origin. - * @experimental */ export class CacheQueryStringBehavior { /** diff --git a/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts b/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts index e339f9d7541a6..af66ab1faa205 100644 --- a/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts +++ b/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts @@ -43,8 +43,6 @@ export interface IDistribution extends IResource { /** * Attributes used to import a Distribution. - * - * @experimental */ export interface DistributionAttributes { /** @@ -69,8 +67,6 @@ interface BoundOrigin extends OriginBindOptions, OriginBindConfig { /** * Properties for a Distribution - * - * @experimental */ export interface DistributionProps { /** @@ -214,8 +210,6 @@ export interface DistributionProps { /** * A CloudFront distribution with associated origin(s) and caching behavior(s). - * - * @experimental */ export class Distribution extends Resource implements IDistribution { @@ -555,8 +549,6 @@ export class CachedMethods { /** * Options for configuring custom error responses. - * - * @experimental */ export interface ErrorResponse { /** @@ -640,8 +632,6 @@ export interface EdgeLambda { /** * Options for adding a new behavior to a Distribution. - * - * @experimental */ export interface AddBehaviorOptions { /** @@ -709,8 +699,6 @@ export interface AddBehaviorOptions { /** * Options for creating a new behavior. - * - * @experimental */ export interface BehaviorOptions extends AddBehaviorOptions { /** diff --git a/packages/@aws-cdk/aws-cloudfront/lib/origin-request-policy.ts b/packages/@aws-cdk/aws-cloudfront/lib/origin-request-policy.ts index 8f279c7ddb213..3d45cf2bc56fb 100644 --- a/packages/@aws-cdk/aws-cloudfront/lib/origin-request-policy.ts +++ b/packages/@aws-cdk/aws-cloudfront/lib/origin-request-policy.ts @@ -4,7 +4,6 @@ import { CfnOriginRequestPolicy } from './cloudfront.generated'; /** * Represents a Origin Request Policy - * @experimental */ export interface IOriginRequestPolicy { /** @@ -16,7 +15,6 @@ export interface IOriginRequestPolicy { /** * Properties for creating a Origin Request Policy - * @experimental */ export interface OriginRequestPolicyProps { /** @@ -55,7 +53,6 @@ export interface OriginRequestPolicyProps { * A Origin Request Policy configuration. * * @resource AWS::CloudFront::OriginRequestPolicy - * @experimental */ export class OriginRequestPolicy extends Resource implements IOriginRequestPolicy { @@ -126,7 +123,6 @@ export class OriginRequestPolicy extends Resource implements IOriginRequestPolic /** * Ddetermines whether any cookies in viewer requests (and if so, which cookies) * are included in requests that CloudFront sends to the origin. - * @experimental */ export class OriginRequestCookieBehavior { /** @@ -159,7 +155,6 @@ export class OriginRequestCookieBehavior { /** * Determines whether any HTTP headers (and if so, which headers) are included in requests that CloudFront sends to the origin. - * @experimental */ export class OriginRequestHeaderBehavior { /** @@ -206,7 +201,6 @@ export class OriginRequestHeaderBehavior { /** * Determines whether any URL query strings in viewer requests (and if so, which query strings) * are included in requests that CloudFront sends to the origin. - * @experimental */ export class OriginRequestQueryStringBehavior { /** diff --git a/packages/@aws-cdk/aws-cloudfront/lib/origin.ts b/packages/@aws-cdk/aws-cloudfront/lib/origin.ts index 8581ffa5e8aee..0722dff17099d 100644 --- a/packages/@aws-cdk/aws-cloudfront/lib/origin.ts +++ b/packages/@aws-cdk/aws-cloudfront/lib/origin.ts @@ -48,8 +48,6 @@ export interface IOrigin { /** * Properties to define an Origin. - * - * @experimental */ export interface OriginProps { /** @@ -85,8 +83,6 @@ export interface OriginProps { /** * Options passed to Origin.bind(). - * - * @experimental */ export interface OriginBindOptions { /** @@ -99,8 +95,6 @@ export interface OriginBindOptions { /** * Represents a distribution origin, that describes the Amazon S3 bucket, HTTP server (for example, a web server), * Amazon MediaStore, or other server from which CloudFront gets your files. - * - * @experimental */ export abstract class OriginBase implements IOrigin { private readonly domainName: string; diff --git a/packages/@aws-cdk/aws-cloudfront/lib/web_distribution.ts b/packages/@aws-cdk/aws-cloudfront/lib/web_distribution.ts index 6889e50739f7e..dad54c3b1488a 100644 --- a/packages/@aws-cdk/aws-cloudfront/lib/web_distribution.ts +++ b/packages/@aws-cdk/aws-cloudfront/lib/web_distribution.ts @@ -640,8 +640,6 @@ interface BehaviorWithOrigin extends Behavior { /** * Attributes used to import a Distribution. - * - * @experimental */ export interface CloudFrontWebDistributionAttributes { /** diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index a47d074758e54..680d41b669489 100644 --- a/packages/@aws-cdk/aws-cloudfront/package.json +++ b/packages/@aws-cdk/aws-cloudfront/package.json @@ -109,18 +109,8 @@ "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" }, - "stability": "experimental", - "maturity": "experimental", - "features": [ - { - "name": "Higher level constructs for Distribution", - "stability": "Developer Preview" - }, - { - "name": "Higher level constructs for CloudFrontWebDistribution", - "stability": "Stable" - } - ], + "stability": "stable", + "maturity": "stable", "awslint": { "exclude": [ "props-physical-name:@aws-cdk/aws-cloudfront.Distribution", From cb703c7a7efaeb5d64d4dc73f5f6c3680928dd40 Mon Sep 17 00:00:00 2001 From: Bryan Pan Date: Mon, 7 Dec 2020 12:13:31 -0800 Subject: [PATCH 287/314] feat(appsync): support appsync functions for pipelineConfig (#10111) Support AppSync Function by exposing Function Configuration. **BREAKING CHANGES**: `Resolver.pipelineConfig` no longer supports `string[]` - **AppSync**: `Resolver.pipelineConfig` no longer supports `string[]`, instead use `AppsyncFunction` - **AppSync**: Resolvers are scoped from `GraphqlApi` instead of its `Data Source`, this means that the **logical id** of resolvers will change! Fixes #9092 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-appsync/README.md | 38 +- .../aws-appsync/lib/appsync-function.ts | 148 ++++++ .../@aws-cdk/aws-appsync/lib/data-source.ts | 11 +- .../aws-appsync/lib/graphqlapi-base.ts | 16 + packages/@aws-cdk/aws-appsync/lib/index.ts | 1 + packages/@aws-cdk/aws-appsync/lib/resolver.ts | 29 +- .../@aws-cdk/aws-appsync/lib/schema-base.ts | 2 +- .../@aws-cdk/aws-appsync/lib/schema-field.ts | 3 +- .../aws-appsync/lib/schema-intermediate.ts | 37 +- packages/@aws-cdk/aws-appsync/lib/schema.ts | 2 +- packages/@aws-cdk/aws-appsync/package.json | 2 +- .../aws-appsync/test/appsync-lambda.test.ts | 16 + .../test/appsync-object-type.test.ts | 27 +- .../@aws-cdk/aws-appsync/test/appsync.test.ts | 45 +- .../test/integ.api-import.expected.json | 43 +- .../aws-appsync/test/integ.api-import.ts | 25 +- .../test/integ.auth-apikey.expected.json | 4 +- .../test/integ.graphql-iam.expected.json | 6 +- .../test/integ.graphql-schema.expected.json | 4 +- .../aws-appsync/test/integ.graphql-schema.ts | 2 +- .../test/integ.graphql.expected.json | 438 +++++++++--------- 21 files changed, 632 insertions(+), 267 deletions(-) create mode 100644 packages/@aws-cdk/aws-appsync/lib/appsync-function.ts diff --git a/packages/@aws-cdk/aws-appsync/README.md b/packages/@aws-cdk/aws-appsync/README.md index ddd947cf0ab83..794cff6db3cda 100644 --- a/packages/@aws-cdk/aws-appsync/README.md +++ b/packages/@aws-cdk/aws-appsync/README.md @@ -379,6 +379,38 @@ api.grantMutation(role, 'updateExample'); api.grant(role, appsync.IamResource.ofType('Mutation', 'updateExample'), 'appsync:GraphQL'); ``` +### Pipeline Resolvers and AppSync Functions + +AppSync Functions are local functions that perform certain operations onto a +backend data source. Developers can compose operations (Functions) and execute +them in sequence with Pipeline Resolvers. + +```ts +const appsyncFunction = new appsync.AppsyncFunction(stack, 'function', { + name: 'appsync_function', + api: api, + dataSource: apiDataSource, + requestMappingTemplate: appsync.MappingTemplate.fromFile('request.vtl'), + responseMappingTemplate: appsync.MappingTemplate.fromFile('response.vtl'), +}); +``` + +AppSync Functions are used in tandem with pipeline resolvers to compose multiple +operations. + +```ts +const pipelineResolver = new appsync.Resolver(stack, 'pipeline', { + name: 'pipeline_resolver', + api: api, + dataSource: apiDataSource, + requestMappingTemplate: appsync.MappingTemplate.fromFile('beforeRequest.vtl'), + pipelineConfig: [appsyncFunction], + responseMappingTemplate: appsync.MappingTemplate.fromFile('afterResponse.vtl'), +}); +``` + +Learn more about Pipeline Resolvers and AppSync Functions [here](https://docs.aws.amazon.com/appsync/latest/devguide/pipeline-resolvers.html). + ### Code-First Schema CDK offers the ability to generate your schema in a code-first approach. @@ -543,7 +575,7 @@ To learn more about authorization and directives, read these docs [here](https:/ While `GraphqlType` is a base implementation for GraphQL fields, we have abstractions on top of `GraphqlType` that provide finer grain support. -##### Field +#### Field `Field` extends `GraphqlType` and will allow you to define arguments. [**Interface Types**](#Interface-Types) are not resolvable and this class will allow you to define arguments, but not its resolvers. @@ -570,7 +602,7 @@ const type = new appsync.InterfaceType('Node', { }); ``` -##### Resolvable Fields +#### Resolvable Fields `ResolvableField` extends `Field` and will allow you to define arguments and its resolvers. [**Object Types**](#Object-Types) can have fields that resolve and perform operations on @@ -646,7 +678,7 @@ Intermediate Types include: - [**Input Types**](#Input-Types) - [**Union Types**](#Union-Types) -##### Interface Types +#### Interface Types **Interface Types** are abstract types that define the implementation of other intermediate types. They are useful for eliminating duplication and can be used diff --git a/packages/@aws-cdk/aws-appsync/lib/appsync-function.ts b/packages/@aws-cdk/aws-appsync/lib/appsync-function.ts new file mode 100644 index 0000000000000..7423317d0fa3e --- /dev/null +++ b/packages/@aws-cdk/aws-appsync/lib/appsync-function.ts @@ -0,0 +1,148 @@ +import { Resource, IResource, Lazy, Fn } from '@aws-cdk/core'; +import { Construct } from 'constructs'; +import { CfnFunctionConfiguration } from './appsync.generated'; +import { BaseDataSource } from './data-source'; +import { IGraphqlApi } from './graphqlapi-base'; +import { MappingTemplate } from './mapping-template'; + +/** + * the base properties for AppSync Functions + */ +export interface BaseAppsyncFunctionProps { + /** + * the name of the AppSync Function + */ + readonly name: string; + /** + * the description for this AppSync Function + * + * @default - no description + */ + readonly description?: string; + /** + * the request mapping template for the AppSync Function + * + * @default - no request mapping template + */ + readonly requestMappingTemplate?: MappingTemplate; + /** + * the response mapping template for the AppSync Function + * + * @default - no response mapping template + */ + readonly responseMappingTemplate?: MappingTemplate; +} + +/** + * the CDK properties for AppSync Functions + */ +export interface AppsyncFunctionProps extends BaseAppsyncFunctionProps { + /** + * the GraphQL Api linked to this AppSync Function + */ + readonly api: IGraphqlApi; + /** + * the data source linked to this AppSync Function + */ + readonly dataSource: BaseDataSource; +} + +/** + * The attributes for imported AppSync Functions + */ +export interface AppsyncFunctionAttributes { + /** + * the ARN of the AppSync function + */ + readonly functionArn: string; +} + +/** + * Interface for AppSync Functions + */ +export interface IAppsyncFunction extends IResource { + /** + * the name of this AppSync Function + * + * @attribute + */ + readonly functionId: string; + /** + * the ARN of the AppSync function + * + * @attribute + */ + readonly functionArn: string; +} + +/** + * AppSync Functions are local functions that perform certain operations + * onto a backend data source. Developers can compose operations (Functions) + * and execute them in sequence with Pipeline Resolvers. + * + * @resource AWS::AppSync::FunctionConfiguration + */ +export class AppsyncFunction extends Resource implements IAppsyncFunction { + /** + * Import Appsync Function from arn + */ + public static fromAppsyncFunctionAttributes(scope: Construct, id: string, attrs: AppsyncFunctionAttributes): IAppsyncFunction { + class Import extends Resource { + public readonly functionId = Lazy.stringValue({ + produce: () => Fn.select(3, Fn.split('/', attrs.functionArn)), + }); + public readonly functionArn = attrs.functionArn; + constructor (s: Construct, i: string) { + super(s, i); + } + } + return new Import(scope, id); + } + + /** + * the name of this AppSync Function + * + * @attribute Name + */ + public readonly functionName: string; + /** + * the ARN of the AppSync function + * + * @attribute + */ + public readonly functionArn: string; + /** + * the ID of the AppSync function + * + * @attribute + */ + public readonly functionId: string; + /** + * the data source of this AppSync Function + * + * @attribute DataSourceName + */ + public readonly dataSource: BaseDataSource; + + private readonly function: CfnFunctionConfiguration; + + public constructor(scope: Construct, id: string, props: AppsyncFunctionProps) { + super(scope, id); + this.function = new CfnFunctionConfiguration(this, 'Resource', { + name: props.name, + description: props.description, + apiId: props.api.apiId, + dataSourceName: props.dataSource.name, + functionVersion: '2018-05-29', + requestMappingTemplate: props.requestMappingTemplate?.renderTemplate(), + responseMappingTemplate: props.responseMappingTemplate?.renderTemplate(), + }); + this.functionName = this.function.attrName; + this.functionArn = this.function.attrFunctionArn; + this.functionId = this.function.attrFunctionId; + this.dataSource = props.dataSource; + + this.function.addDependsOn(this.dataSource.ds); + props.api.addSchemaDependency(this.function); + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/lib/data-source.ts b/packages/@aws-cdk/aws-appsync/lib/data-source.ts index cb6c42de28f14..96c578390dfbc 100644 --- a/packages/@aws-cdk/aws-appsync/lib/data-source.ts +++ b/packages/@aws-cdk/aws-appsync/lib/data-source.ts @@ -5,6 +5,7 @@ import { IDatabaseCluster } from '@aws-cdk/aws-rds'; import { ISecret } from '@aws-cdk/aws-secretsmanager'; import { IResolvable, Stack } from '@aws-cdk/core'; import { Construct } from 'constructs'; +import { BaseAppsyncFunctionProps, AppsyncFunction } from './appsync-function'; import { CfnDataSource } from './appsync.generated'; import { IGraphqlApi } from './graphqlapi-base'; import { BaseResolverProps, Resolver } from './resolver'; @@ -125,7 +126,14 @@ export abstract class BaseDataSource extends CoreConstruct { * creates a new resolver for this datasource and API using the given properties */ public createResolver(props: BaseResolverProps): Resolver { - return new Resolver(this, `${props.typeName}${props.fieldName}Resolver`, { + return this.api.createResolver({ dataSource: this, ...props }); + } + + /** + * creates a new appsync function for this datasource and API using the given properties + */ + public createFunction(props: BaseAppsyncFunctionProps): AppsyncFunction { + return new AppsyncFunction(this, `${props.name}Function`, { api: this.api, dataSource: this, ...props, @@ -172,7 +180,6 @@ export class NoneDataSource extends BaseDataSource { export interface DynamoDbDataSourceProps extends BackedDataSourceProps { /** * The DynamoDB table backing this data source - * [disable-awslint:ref-via-interface] */ readonly table: ITable; /** diff --git a/packages/@aws-cdk/aws-appsync/lib/graphqlapi-base.ts b/packages/@aws-cdk/aws-appsync/lib/graphqlapi-base.ts index 288384c6454a5..3b037101e97ee 100644 --- a/packages/@aws-cdk/aws-appsync/lib/graphqlapi-base.ts +++ b/packages/@aws-cdk/aws-appsync/lib/graphqlapi-base.ts @@ -4,6 +4,7 @@ import { IDatabaseCluster } from '@aws-cdk/aws-rds'; import { ISecret } from '@aws-cdk/aws-secretsmanager'; import { CfnResource, IResource, Resource } from '@aws-cdk/core'; import { DynamoDbDataSource, HttpDataSource, LambdaDataSource, NoneDataSource, RdsDataSource, AwsIamConfig } from './data-source'; +import { Resolver, ExtendedResolverProps } from './resolver'; /** * Optional configuration for data sources @@ -107,6 +108,11 @@ export interface IGraphqlApi extends IResource { options?: DataSourceOptions ): RdsDataSource; + /** + * creates a new resolver for this datasource and API using the given properties + */ + createResolver(props: ExtendedResolverProps): Resolver; + /** * Add schema dependency if not imported * @@ -217,6 +223,16 @@ export abstract class GraphqlApiBase extends Resource implements IGraphqlApi { }); } + /** + * creates a new resolver for this datasource and API using the given properties + */ + public createResolver(props: ExtendedResolverProps): Resolver { + return new Resolver(this, `${props.typeName}${props.fieldName}Resolver`, { + api: this, + ...props, + }); + } + /** * Add schema dependency if not imported * diff --git a/packages/@aws-cdk/aws-appsync/lib/index.ts b/packages/@aws-cdk/aws-appsync/lib/index.ts index c4e05e9a5300e..5b0f12cf75844 100644 --- a/packages/@aws-cdk/aws-appsync/lib/index.ts +++ b/packages/@aws-cdk/aws-appsync/lib/index.ts @@ -1,4 +1,5 @@ // AWS::AppSync CloudFormation Resources: +export * from './appsync-function'; export * from './appsync.generated'; export * from './key'; export * from './data-source'; diff --git a/packages/@aws-cdk/aws-appsync/lib/resolver.ts b/packages/@aws-cdk/aws-appsync/lib/resolver.ts index 91abfea5f3cb4..eb65a59f494fd 100644 --- a/packages/@aws-cdk/aws-appsync/lib/resolver.ts +++ b/packages/@aws-cdk/aws-appsync/lib/resolver.ts @@ -1,4 +1,5 @@ import { Construct } from 'constructs'; +import { IAppsyncFunction } from './appsync-function'; import { CfnResolver } from './appsync.generated'; import { BaseDataSource } from './data-source'; import { IGraphqlApi } from './graphqlapi-base'; @@ -26,7 +27,7 @@ export interface BaseResolverProps { * @default - no pipeline resolver configuration * An empty array | undefined sets resolver to be of kind, unit */ - readonly pipelineConfig?: string[]; + readonly pipelineConfig?: IAppsyncFunction[]; /** * The request mapping template for this resolver * @@ -42,13 +43,9 @@ export interface BaseResolverProps { } /** - * Additional properties for an AppSync resolver like GraphQL API reference and datasource + * Additional property for an AppSync resolver for data source reference */ -export interface ResolverProps extends BaseResolverProps { - /** - * The API this resolver is attached to - */ - readonly api: IGraphqlApi; +export interface ExtendedResolverProps extends BaseResolverProps { /** * The data source this resolver is using * @@ -57,6 +54,16 @@ export interface ResolverProps extends BaseResolverProps { readonly dataSource?: BaseDataSource; } +/** + * Additional property for an AppSync resolver for GraphQL API reference + */ +export interface ResolverProps extends ExtendedResolverProps { + /** + * The API this resolver is attached to + */ + readonly api: IGraphqlApi; +} + /** * An AppSync resolver */ @@ -71,7 +78,13 @@ export class Resolver extends CoreConstruct { constructor(scope: Construct, id: string, props: ResolverProps) { super(scope, id); - const pipelineConfig = props.pipelineConfig && props.pipelineConfig.length ? { functions: props.pipelineConfig } : undefined; + const pipelineConfig = props.pipelineConfig && props.pipelineConfig.length ? + { functions: props.pipelineConfig.map((func) => func.functionId) } + : undefined; + + if (pipelineConfig && props.dataSource) { + throw new Error(`Pipeline Resolver cannot have data source. Received: ${props.dataSource.name}`); + } this.resolver = new CfnResolver(this, 'Resource', { apiId: props.api.apiId, diff --git a/packages/@aws-cdk/aws-appsync/lib/schema-base.ts b/packages/@aws-cdk/aws-appsync/lib/schema-base.ts index a639c747ca208..b824d2b29c4e6 100644 --- a/packages/@aws-cdk/aws-appsync/lib/schema-base.ts +++ b/packages/@aws-cdk/aws-appsync/lib/schema-base.ts @@ -142,7 +142,7 @@ export interface IIntermediateType { /** * Method called when the stringifying Intermediate Types for schema generation * - * @param api The binding GraphQL Api [disable-awslint:ref-via-interface] + * @param api The binding GraphQL Api * * @internal */ diff --git a/packages/@aws-cdk/aws-appsync/lib/schema-field.ts b/packages/@aws-cdk/aws-appsync/lib/schema-field.ts index ed7c8790818db..b276644873a7d 100644 --- a/packages/@aws-cdk/aws-appsync/lib/schema-field.ts +++ b/packages/@aws-cdk/aws-appsync/lib/schema-field.ts @@ -1,3 +1,4 @@ +import { IAppsyncFunction } from './appsync-function'; import { BaseDataSource } from './data-source'; import { AuthorizationType } from './graphqlapi'; import { MappingTemplate } from './mapping-template'; @@ -423,7 +424,7 @@ export interface ResolvableFieldOptions extends FieldOptions { * @default - no pipeline resolver configuration * An empty array or undefined prop will set resolver to be of type unit */ - readonly pipelineConfig?: string[]; + readonly pipelineConfig?: IAppsyncFunction[]; /** * The request mapping template for this resolver * diff --git a/packages/@aws-cdk/aws-appsync/lib/schema-intermediate.ts b/packages/@aws-cdk/aws-appsync/lib/schema-intermediate.ts index cc778aee51a50..5d87ba2e7f130 100644 --- a/packages/@aws-cdk/aws-appsync/lib/schema-intermediate.ts +++ b/packages/@aws-cdk/aws-appsync/lib/schema-intermediate.ts @@ -1,8 +1,9 @@ import { AuthorizationType, GraphqlApi } from './graphqlapi'; +import { IGraphqlApi } from './graphqlapi-base'; import { shapeAddition } from './private'; import { Resolver } from './resolver'; import { Directive, IField, IIntermediateType, AddFieldOptions } from './schema-base'; -import { BaseTypeOptions, GraphqlType, ResolvableFieldOptions } from './schema-field'; +import { BaseTypeOptions, GraphqlType, ResolvableFieldOptions, ResolvableField } from './schema-field'; /** * Properties for configuring an Intermediate Type @@ -159,11 +160,27 @@ export class ObjectType extends InterfaceType implements IIntermediateType { super(name, options); this.interfaceTypes = props.interfaceTypes; this.resolvers = []; + } + /** + * Method called when the stringifying Intermediate Types for schema generation + * + * @internal + */ + public _bindToGraphqlApi(api: GraphqlApi): IIntermediateType { + this.modes = api.modes; + // If the resolvers have been generated, skip the bind + if (this.resolvers && this.resolvers.length > 0) { + return this; + } Object.keys(this.definition).forEach((fieldName) => { const field = this.definition[fieldName]; - this.generateResolver(fieldName, field.fieldOptions); + if (field instanceof ResolvableField) { + if (!this.resolvers) this.resolvers = []; + this.resolvers.push(this.generateResolver(api, fieldName, field.fieldOptions)); + } }); + return this; } /** @@ -177,7 +194,6 @@ export class ObjectType extends InterfaceType implements IIntermediateType { if (!options.fieldName || !options.field) { throw new Error('Object Types must have both fieldName and field options.'); } - this.generateResolver(options.fieldName, options.field.fieldOptions); this.definition[options.fieldName] = options.field; } @@ -201,16 +217,15 @@ export class ObjectType extends InterfaceType implements IIntermediateType { /** * Generate the resolvers linked to this Object Type */ - protected generateResolver(fieldName: string, options?: ResolvableFieldOptions): void { - if (!options?.dataSource) return; - if (!this.resolvers) { this.resolvers = []; } - this.resolvers.push(options.dataSource.createResolver({ + protected generateResolver(api: IGraphqlApi, fieldName: string, options?: ResolvableFieldOptions): Resolver { + return api.createResolver({ typeName: this.name, fieldName: fieldName, - pipelineConfig: options.pipelineConfig, - requestMappingTemplate: options.requestMappingTemplate, - responseMappingTemplate: options.responseMappingTemplate, - })); + dataSource: options?.dataSource, + pipelineConfig: options?.pipelineConfig, + requestMappingTemplate: options?.requestMappingTemplate, + responseMappingTemplate: options?.responseMappingTemplate, + }); } } diff --git a/packages/@aws-cdk/aws-appsync/lib/schema.ts b/packages/@aws-cdk/aws-appsync/lib/schema.ts index 3ab8a800d16fb..1ae6964bda346 100644 --- a/packages/@aws-cdk/aws-appsync/lib/schema.ts +++ b/packages/@aws-cdk/aws-appsync/lib/schema.ts @@ -81,7 +81,7 @@ export class Schema { apiId: api.apiId, definition: this.mode === SchemaMode.CODE ? Lazy.string({ - produce: () => this.types.reduce((acc, type) => { return `${acc}${type._bindToGraphqlApi(api).toString()}\n`; }, + produce: () => this.types.reduce((acc, type) => `${acc}${type._bindToGraphqlApi(api).toString()}\n`, `${this.declareSchema()}${this.definition}`), }) : this.definition, diff --git a/packages/@aws-cdk/aws-appsync/package.json b/packages/@aws-cdk/aws-appsync/package.json index 906bf0f2ef751..3d55d00b96177 100644 --- a/packages/@aws-cdk/aws-appsync/package.json +++ b/packages/@aws-cdk/aws-appsync/package.json @@ -115,7 +115,7 @@ "no-unused-type:@aws-cdk/aws-appsync.UserPoolConfig", "no-unused-type:@aws-cdk/aws-appsync.UserPoolDefaultAction", "props-physical-name:@aws-cdk/aws-appsync.GraphqlApiProps", - "from-method:@aws-cdk/aws-appsync.GraphqlApi" + "props-physical-name:@aws-cdk/aws-appsync.AppsyncFunctionProps" ] }, "stability": "experimental", diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-lambda.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-lambda.test.ts index 0cc8396382017..11190591974a8 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-lambda.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-lambda.test.ts @@ -72,6 +72,22 @@ describe('Lambda Data Source configuration', () => { api.addLambdaDataSource('ds', func); }).toThrow("There is already a Construct with name 'ds' in GraphqlApi [baseApi]"); }); + + test('lambda data sources dont require mapping templates', () => { + // WHEN + const ds = api.addLambdaDataSource('ds', func, { + name: 'custom', + description: 'custom description', + }); + + ds.createResolver({ + typeName: 'test', + fieldName: 'field', + }); + + // THEN + expect(stack).toHaveResource('AWS::AppSync::Resolver'); + }); }); describe('adding lambda data source from imported api', () => { diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-object-type.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-object-type.test.ts index 0a6c45d24fd85..ef05e857c8eb6 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-object-type.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-object-type.test.ts @@ -100,6 +100,7 @@ describe('testing Object Type properties', () => { args: { arg: t.int, }, + }); const test = new appsync.ObjectType('Test', { definition: { @@ -124,6 +125,7 @@ describe('testing Object Type properties', () => { args: { arg: t.int, }, + }); const test = new appsync.ObjectType('Test', { definition: { @@ -142,15 +144,27 @@ describe('testing Object Type properties', () => { test('Object Type can implement Resolvable Field for pipelineResolvers', () => { // WHEN + const ds = api.addNoneDataSource('none'); + const test1 = ds.createFunction({ + name: 'test1', + }); + const test2 = ds.createFunction({ + name: 'test2', + }); const test = new appsync.ObjectType('Test', { definition: { resolve: new appsync.ResolvableField({ returnType: t.string, - dataSource: api.addNoneDataSource('none'), args: { arg: t.int, }, - pipelineConfig: ['test', 'test'], + pipelineConfig: [test1, test2], + requestMappingTemplate: appsync.MappingTemplate.fromString(JSON.stringify({ + version: '2017-02-28', + })), + responseMappingTemplate: appsync.MappingTemplate.fromString(JSON.stringify({ + version: 'v1', + })), }), }, }); @@ -159,7 +173,12 @@ describe('testing Object Type properties', () => { // THEN expect(stack).toHaveResourceLike('AWS::AppSync::Resolver', { Kind: 'PIPELINE', - PipelineConfig: { Functions: ['test', 'test'] }, + PipelineConfig: { + Functions: [ + { 'Fn::GetAtt': ['apinonetest1FunctionEF63046F', 'FunctionId'] }, + { 'Fn::GetAtt': ['apinonetest2Function615111D0', 'FunctionId'] }, + ], + }, }); }); @@ -169,6 +188,7 @@ describe('testing Object Type properties', () => { returnType: t.string, dataSource: api.addNoneDataSource('none'), args: { arg: t.int }, + }); const test = new appsync.ObjectType('Test', { definition: { @@ -227,6 +247,7 @@ describe('testing Object Type properties', () => { args: { arg: t.string, }, + }); test.addField({ fieldName: 'resolve', field }); diff --git a/packages/@aws-cdk/aws-appsync/test/appsync.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync.test.ts index 252051de6f0c6..ca496e99afbff 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync.test.ts @@ -18,24 +18,58 @@ beforeEach(() => { test('appsync should configure pipeline when pipelineConfig has contents', () => { // WHEN - new appsync.Resolver(stack, 'resolver', { - api: api, + const ds = api.addNoneDataSource('none'); + const test1 = ds.createFunction({ + name: 'test1', + }); + const test2 = ds.createFunction({ + name: 'test2', + }); + api.createResolver({ typeName: 'test', fieldName: 'test2', - pipelineConfig: ['test', 'test'], + pipelineConfig: [test1, test2], }); // THEN expect(stack).toHaveResourceLike('AWS::AppSync::Resolver', { Kind: 'PIPELINE', - PipelineConfig: { Functions: ['test', 'test'] }, + PipelineConfig: { + Functions: [ + { 'Fn::GetAtt': ['apinonetest1FunctionEF63046F', 'FunctionId'] }, + { 'Fn::GetAtt': ['apinonetest2Function615111D0', 'FunctionId'] }, + ], + }, + }); +}); + +test('appsync should error when creating pipeline resolver with data source', () => { + // WHEN + const ds = api.addNoneDataSource('none'); + const test1 = ds.createFunction({ + name: 'test1', }); + const test2 = ds.createFunction({ + name: 'test2', + }); + + // THEN + expect(() => { + api.createResolver({ + dataSource: ds, + typeName: 'test', + fieldName: 'test2', + pipelineConfig: [test1, test2], + }); + }).toThrowError('Pipeline Resolver cannot have data source. Received: none'); }); test('appsync should configure resolver as unit when pipelineConfig is empty', () => { // WHEN + const ds = api.addNoneDataSource('none'); new appsync.Resolver(stack, 'resolver', { api: api, + dataSource: ds, typeName: 'test', fieldName: 'test2', }); @@ -48,8 +82,7 @@ test('appsync should configure resolver as unit when pipelineConfig is empty', ( test('appsync should configure resolver as unit when pipelineConfig is empty array', () => { // WHEN - new appsync.Resolver(stack, 'resolver', { - api: api, + api.createResolver({ typeName: 'test', fieldName: 'test2', pipelineConfig: [], diff --git a/packages/@aws-cdk/aws-appsync/test/integ.api-import.expected.json b/packages/@aws-cdk/aws-appsync/test/integ.api-import.expected.json index c8692067ef47a..1a760c0d715a1 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.api-import.expected.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.api-import.expected.json @@ -134,7 +134,7 @@ } } }, - "ApidsQuerygetTestsResolver952F49EE": { + "ApiQuerygetTestsResolver025B8E0A": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -151,7 +151,7 @@ "Apids0DB53FEA" ] }, - "ApidsMutationaddTestResolverBCF0400B": { + "ApiMutationaddTestResolver7A08AE91": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -197,6 +197,45 @@ "Name": "none", "Type": "NONE" } + }, + "api2nonepipelinefunctionFunction2426F465": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::ImportValue": "baseStack:ExportsOutputFnGetAttbaseApiCDA4D43AApiId50287E68" + }, + "DataSourceName": "none", + "FunctionVersion": "2018-05-29", + "Name": "pipeline_function", + "RequestMappingTemplate": "{\"version\":\"2017-02-28\"}", + "ResponseMappingTemplate": "{\"version\":\"v1\"}" + }, + "DependsOn": [ + "api2noneC88DB89F" + ] + }, + "pipelineresolver843133EA": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::ImportValue": "baseStack:ExportsOutputFnGetAttbaseApiCDA4D43AApiId50287E68" + }, + "FieldName": "version", + "TypeName": "test", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "api2nonepipelinefunctionFunction2426F465", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": "{\"version\":\"2017-02-28\"}", + "ResponseMappingTemplate": "{\"version\":\"v1\"}" + } } } } diff --git a/packages/@aws-cdk/aws-appsync/test/integ.api-import.ts b/packages/@aws-cdk/aws-appsync/test/integ.api-import.ts index 8781f83fe117e..a4ebc3105209e 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.api-import.ts +++ b/packages/@aws-cdk/aws-appsync/test/integ.api-import.ts @@ -62,6 +62,29 @@ const api2 = appsync.GraphqlApi.fromGraphqlApiAttributes(stack, 'api2', { graphqlApiArn: baseApi.arn, }); -api2.addNoneDataSource('none'); +const none = api2.addNoneDataSource('none'); + +const func = none.createFunction({ + name: 'pipeline_function', + requestMappingTemplate: appsync.MappingTemplate.fromString(JSON.stringify({ + version: '2017-02-28', + })), + responseMappingTemplate: appsync.MappingTemplate.fromString(JSON.stringify({ + version: 'v1', + })), +}); + +new appsync.Resolver(stack, 'pipeline_resolver', { + api: api2, + typeName: 'test', + fieldName: 'version', + pipelineConfig: [func], + requestMappingTemplate: appsync.MappingTemplate.fromString(JSON.stringify({ + version: '2017-02-28', + })), + responseMappingTemplate: appsync.MappingTemplate.fromString(JSON.stringify({ + version: 'v1', + })), +}); app.synth(); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.expected.json b/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.expected.json index 17fec6fbed787..62c6b75e725d4 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.expected.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.expected.json @@ -120,7 +120,7 @@ } } }, - "ApitestDataSourceQuerygetTestsResolverA3BBB672": { + "ApiQuerygetTestsResolver025B8E0A": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -141,7 +141,7 @@ "ApitestDataSource96AE54D5" ] }, - "ApitestDataSourceMutationaddTestResolver36203D6B": { + "ApiMutationaddTestResolver7A08AE91": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.expected.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.expected.json index eda4a662ffc58..1788c675b2c67 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.expected.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.expected.json @@ -149,7 +149,7 @@ } } }, - "ApidsQuerygetTestResolverCCED7EC2": { + "ApiQuerygetTestResolver4C1F8B0C": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -170,7 +170,7 @@ "ApiSchema510EECD7" ] }, - "ApidsQuerygetTestsResolver952F49EE": { + "ApiQuerygetTestsResolver025B8E0A": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -191,7 +191,7 @@ "ApiSchema510EECD7" ] }, - "ApidsMutationaddTestResolverBCF0400B": { + "ApiMutationaddTestResolver7A08AE91": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.expected.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.expected.json index 1e49940a8f92a..60e71fe2c0293 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.expected.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.expected.json @@ -119,7 +119,7 @@ } } }, - "codefirstapiplanetsQuerygetPlanetsResolver633EA597": { + "codefirstapiQuerygetPlanetsResolver54E13D9A": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -140,7 +140,7 @@ "codefirstapiSchema148B6CDE" ] }, - "codefirstapiplanetsMutationaddPlanetResolver155AF87E": { + "codefirstapiMutationaddPlanetResolver49A375A3": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.ts b/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.ts index 4c02dd07f4a5a..6475b0bfae971 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.ts +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.ts @@ -103,7 +103,7 @@ api.addMutation('addPlanet', new appsync.ResolvableField({ responseMappingTemplate: appsync.MappingTemplate.dynamoDbResultItem(), })); -api.addSubscription('addedPlanets', new appsync.ResolvableField({ +api.addSubscription('addedPlanets', new appsync.Field({ returnType: planet.attribute(), args: { id: ScalarType.required_id }, directives: [appsync.Directive.subscribe('addPlanet')], diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql.expected.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql.expected.json index 503471f25c9a6..be40ad91870b7 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql.expected.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql.expected.json @@ -90,7 +90,7 @@ "Type": "NONE" } }, - "ApinoneQuerygetServiceVersionResolver336A3C2C": { + "ApiQuerygetServiceVersionResolver269A74C1": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -197,7 +197,202 @@ } } }, - "ApicustomerDsQuerygetCustomersResolverA74C8A2E": { + "ApiorderDsServiceRoleCC2040C0": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "ApiorderDsServiceRoleDefaultPolicy3315FCF4": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "OrderTable416EB896", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "OrderTable416EB896", + "Arn" + ] + }, + "/index/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ApiorderDsServiceRoleDefaultPolicy3315FCF4", + "Roles": [ + { + "Ref": "ApiorderDsServiceRoleCC2040C0" + } + ] + } + }, + "ApiorderDsB50C8AAD": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "Name": "Order", + "Type": "AMAZON_DYNAMODB", + "DynamoDBConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "TableName": { + "Ref": "OrderTable416EB896" + } + }, + "ServiceRoleArn": { + "Fn::GetAtt": [ + "ApiorderDsServiceRoleCC2040C0", + "Arn" + ] + } + } + }, + "ApipaymentDsServiceRole0DAC58D6": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "ApipaymentDsServiceRoleDefaultPolicy528E42B0": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":dynamodb:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":table/PaymentTable" + ] + ] + }, + { + "Ref": "AWS::NoValue" + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ApipaymentDsServiceRoleDefaultPolicy528E42B0", + "Roles": [ + { + "Ref": "ApipaymentDsServiceRole0DAC58D6" + } + ] + } + }, + "ApipaymentDs95C7AC36": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "Name": "Payment", + "Type": "AMAZON_DYNAMODB", + "DynamoDBConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "TableName": "PaymentTable" + }, + "ServiceRoleArn": { + "Fn::GetAtt": [ + "ApipaymentDsServiceRole0DAC58D6", + "Arn" + ] + } + } + }, + "ApiQuerygetCustomersResolver522EE433": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -218,7 +413,7 @@ "ApiSchema510EECD7" ] }, - "ApicustomerDsQuerygetCustomerResolver3649A130": { + "ApiQuerygetCustomerResolver007520DC": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -239,7 +434,7 @@ "ApiSchema510EECD7" ] }, - "ApicustomerDsMutationaddCustomerResolver4DE5B517": { + "ApiMutationaddCustomerResolver53321A05": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -260,7 +455,7 @@ "ApiSchema510EECD7" ] }, - "ApicustomerDsMutationsaveCustomerResolver241DD231": { + "ApiMutationsaveCustomerResolver85516C23": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -281,7 +476,7 @@ "ApiSchema510EECD7" ] }, - "ApicustomerDsMutationsaveCustomerWithFirstOrderResolver7DE2CBC8": { + "ApiMutationsaveCustomerWithFirstOrderResolver66DBDFD0": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -302,7 +497,7 @@ "ApiSchema510EECD7" ] }, - "ApicustomerDsMutationremoveCustomerResolverAD3AE7F5": { + "ApiMutationremoveCustomerResolver8435F803": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -323,104 +518,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsServiceRoleCC2040C0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ApiorderDsServiceRoleDefaultPolicy3315FCF4": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:GetRecords", - "dynamodb:GetShardIterator", - "dynamodb:Query", - "dynamodb:GetItem", - "dynamodb:Scan", - "dynamodb:BatchWriteItem", - "dynamodb:PutItem", - "dynamodb:UpdateItem", - "dynamodb:DeleteItem" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "OrderTable416EB896", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "OrderTable416EB896", - "Arn" - ] - }, - "/index/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ApiorderDsServiceRoleDefaultPolicy3315FCF4", - "Roles": [ - { - "Ref": "ApiorderDsServiceRoleCC2040C0" - } - ] - } - }, - "ApiorderDsB50C8AAD": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "Name": "Order", - "Type": "AMAZON_DYNAMODB", - "DynamoDBConfig": { - "AwsRegion": { - "Ref": "AWS::Region" - }, - "TableName": { - "Ref": "OrderTable416EB896" - } - }, - "ServiceRoleArn": { - "Fn::GetAtt": [ - "ApiorderDsServiceRoleCC2040C0", - "Arn" - ] - } - } - }, - "ApiorderDsQuerygetCustomerOrdersEqResolverEF9D5350": { + "ApiQuerygetCustomerOrdersEqResolver6DA88A11": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -441,7 +539,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetOrderCustomersEqResolverE58570FF": { + "ApiQuerygetOrderCustomersEqResolverA8612570": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -462,7 +560,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetCustomerOrdersLtResolver909F3D8F": { + "ApiQuerygetCustomerOrdersLtResolver284B37E8": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -483,7 +581,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetOrderCustomersLtResolver77468800": { + "ApiQuerygetOrderCustomersLtResolver618A88A9": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -504,7 +602,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetCustomerOrdersLeResolverF230A8BE": { + "ApiQuerygetCustomerOrdersLeResolverFB2A506A": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -525,7 +623,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetOrderCustomersLeResolver836A0389": { + "ApiQuerygetOrderCustomersLeResolverFAA205B9": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -546,7 +644,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetCustomerOrdersGtResolverF01F806B": { + "ApiQuerygetCustomerOrdersGtResolver13F90EA5": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -567,7 +665,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetOrderCustomersGtResolver3197CCFE": { + "ApiQuerygetOrderCustomersGtResolver9487ECD9": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -588,7 +686,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetCustomerOrdersGeResolver63CAD303": { + "ApiQuerygetCustomerOrdersGeResolver2A181899": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -609,7 +707,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetOrderCustomersGeResolver0B78B0B4": { + "ApiQuerygetOrderCustomersGeResolver8441E608": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -630,7 +728,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetCustomerOrdersFilterResolverCD2B8747": { + "ApiQuerygetCustomerOrdersFilterResolver96245084": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -651,7 +749,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetCustomerOrdersBetweenResolver7DEE368E": { + "ApiQuerygetCustomerOrdersBetweenResolver97B6D708": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -672,7 +770,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetOrderCustomersFilterResolver628CC68D": { + "ApiQuerygetOrderCustomersFilterResolverF1015ABD": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -693,7 +791,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetOrderCustomersBetweenResolver2048F3CB": { + "ApiQuerygetOrderCustomersBetweenResolver92680CEC": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -714,105 +812,7 @@ "ApiSchema510EECD7" ] }, - "ApipaymentDsServiceRole0DAC58D6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ApipaymentDsServiceRoleDefaultPolicy528E42B0": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:GetRecords", - "dynamodb:GetShardIterator", - "dynamodb:Query", - "dynamodb:GetItem", - "dynamodb:Scan", - "dynamodb:BatchWriteItem", - "dynamodb:PutItem", - "dynamodb:UpdateItem", - "dynamodb:DeleteItem" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":dynamodb:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":table/PaymentTable" - ] - ] - }, - { - "Ref": "AWS::NoValue" - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ApipaymentDsServiceRoleDefaultPolicy528E42B0", - "Roles": [ - { - "Ref": "ApipaymentDsServiceRole0DAC58D6" - } - ] - } - }, - "ApipaymentDs95C7AC36": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "Name": "Payment", - "Type": "AMAZON_DYNAMODB", - "DynamoDBConfig": { - "AwsRegion": { - "Ref": "AWS::Region" - }, - "TableName": "PaymentTable" - }, - "ServiceRoleArn": { - "Fn::GetAtt": [ - "ApipaymentDsServiceRole0DAC58D6", - "Arn" - ] - } - } - }, - "ApipaymentDsQuerygetPaymentResolverD172BFC9": { + "ApiQuerygetPaymentResolver29598AC3": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -833,7 +833,7 @@ "ApiSchema510EECD7" ] }, - "ApipaymentDsMutationsavePaymentResolverE09FE5BB": { + "ApiMutationsavePaymentResolver03088E76": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -893,7 +893,7 @@ } } }, - "ApidsMutationdoPostOnAwsResolver9583D8A3": { + "ApiMutationdoPostOnAwsResolverEDACEA42": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { From bfee58c702c31fb8e89cf99c8b6fb944ef6a96a4 Mon Sep 17 00:00:00 2001 From: Shivam Verma <68244110+sshver@users.noreply.github.com> Date: Mon, 7 Dec 2020 12:46:14 -0800 Subject: [PATCH 288/314] feat(appmesh): add ClientPolicy to VirtualNode, VirtualGateway and VirtualService (#11563) Adds backend defaults to Virtual Node and Virtual Gateways. Adds validation context for the backend defined on the Virtual Node. Before merging (TODO): - [ ] Update README ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-acmpca/lib/certificate-authority.ts | 33 ++++++ packages/@aws-cdk/aws-acmpca/lib/index.ts | 1 + packages/@aws-cdk/aws-appmesh/README.md | 53 ++++++++- .../@aws-cdk/aws-appmesh/lib/client-policy.ts | 110 ++++++++++++++++++ packages/@aws-cdk/aws-appmesh/lib/index.ts | 1 + .../aws-appmesh/lib/shared-interfaces.ts | 3 +- .../aws-appmesh/lib/virtual-gateway.ts | 10 +- .../@aws-cdk/aws-appmesh/lib/virtual-node.ts | 14 ++- .../aws-appmesh/lib/virtual-service.ts | 24 ++++ packages/@aws-cdk/aws-appmesh/package.json | 2 + .../aws-appmesh/test/integ.mesh.expected.json | 26 +++++ .../@aws-cdk/aws-appmesh/test/integ.mesh.ts | 10 +- .../aws-appmesh/test/test.virtual-gateway.ts | 43 +++++++ .../aws-appmesh/test/test.virtual-node.ts | 104 ++++++++++++++++- 14 files changed, 427 insertions(+), 7 deletions(-) create mode 100644 packages/@aws-cdk/aws-acmpca/lib/certificate-authority.ts create mode 100644 packages/@aws-cdk/aws-appmesh/lib/client-policy.ts diff --git a/packages/@aws-cdk/aws-acmpca/lib/certificate-authority.ts b/packages/@aws-cdk/aws-acmpca/lib/certificate-authority.ts new file mode 100644 index 0000000000000..2c3131976e925 --- /dev/null +++ b/packages/@aws-cdk/aws-acmpca/lib/certificate-authority.ts @@ -0,0 +1,33 @@ +import * as cdk from '@aws-cdk/core'; +import { Construct } from 'constructs'; + +/** + * Interface which all CertificateAuthority based class must implement + */ +export interface ICertificateAuthority extends cdk.IResource { + /** + * The Amazon Resource Name of the Certificate + * + * @attribute + */ + readonly certificateAuthorityArn: string; +} + +/** + * Defines a Certificate for ACMPCA + * + * @resource AWS::ACMPCA::CertificateAuthority + */ +export class CertificateAuthority { + /** + * Import an existing Certificate given an ARN + */ + public static fromCertificateAuthorityArn(scope: Construct, id: string, certificateAuthorityArn: string): ICertificateAuthority { + return new class extends cdk.Resource implements ICertificateAuthority { + readonly certificateAuthorityArn = certificateAuthorityArn; + }(scope, id); + } + + private constructor() { + } +} diff --git a/packages/@aws-cdk/aws-acmpca/lib/index.ts b/packages/@aws-cdk/aws-acmpca/lib/index.ts index 6a40358cf4409..11c6bf8e1b620 100644 --- a/packages/@aws-cdk/aws-acmpca/lib/index.ts +++ b/packages/@aws-cdk/aws-acmpca/lib/index.ts @@ -1,2 +1,3 @@ // AWS::ACMPCA CloudFormation Resources: export * from './acmpca.generated'; +export * from './certificate-authority'; diff --git a/packages/@aws-cdk/aws-appmesh/README.md b/packages/@aws-cdk/aws-appmesh/README.md index c417378403c24..4b38e150a042e 100644 --- a/packages/@aws-cdk/aws-appmesh/README.md +++ b/packages/@aws-cdk/aws-appmesh/README.md @@ -163,7 +163,7 @@ const node = mesh.addVirtualNode('virtual-node', { }); ``` -Create a `VirtualNode` with the the constructor and add tags. +Create a `VirtualNode` with the constructor and add tags. ```ts const node = new VirtualNode(this, 'node', { @@ -184,14 +184,57 @@ const node = new VirtualNode(this, 'node', { idle: cdk.Duration.seconds(5), }, })], + backendsDefaultClientPolicy: appmesh.ClientPolicy.fileTrust({ + certificateChain: '/keys/local_cert_chain.pem', + }), accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout'), }); cdk.Tag.add(node, 'Environment', 'Dev'); ``` +Create a `VirtualNode` with the constructor and add backend virtual service. + +```ts +const node = new VirtualNode(this, 'node', { + mesh, + cloudMapService: service, + listeners: [appmesh.VirtualNodeListener.httpNodeListener({ + port: 8080, + healthCheck: { + healthyThreshold: 3, + interval: Duration.seconds(5), // min + path: '/ping', + port: 8080, + protocol: Protocol.HTTP, + timeout: Duration.seconds(2), // min + unhealthyThreshold: 2, + }, + timeout: { + idle: cdk.Duration.seconds(5), + }, + })], + accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout'), +}); + +const virtualService = new appmesh.VirtualService(stack, 'service-1', { + virtualServiceName: 'service1.domain.local', + mesh, + clientPolicy: appmesh.ClientPolicy.fileTrust({ + certificateChain: '/keys/local_cert_chain.pem', + ports: [8080, 8081], + }), +}); + +node.addBackend(virtualService); +``` + The `listeners` property can be left blank and added later with the `node.addListener()` method. The `healthcheck` and `timeout` properties are optional but if specifying a listener, the `port` must be added. +The `backends` property can be added with `node.addBackend()`. We define a virtual service and add it to the virtual node to allow egress traffic to other node. + +The `backendsDefaultClientPolicy` property are added to the node while creating the virtual node. These are virtual node's service backends client policy defaults. + ## Adding a Route A `route` is associated with a virtual router, and it's used to match requests for a virtual router and distribute traffic accordingly to its associated virtual nodes. @@ -269,6 +312,8 @@ using rules defined in gateway routes which can be added to your virtual gateway Create a virtual gateway with the constructor: ```ts +const certificateAuthorityArn = 'arn:aws:acm-pca:us-east-1:123456789012:certificate-authority/12345678-1234-1234-1234-123456789012'; + const gateway = new appmesh.VirtualGateway(stack, 'gateway', { mesh: mesh, listeners: [appmesh.VirtualGatewayListener.http({ @@ -277,6 +322,10 @@ const gateway = new appmesh.VirtualGateway(stack, 'gateway', { interval: cdk.Duration.seconds(10), }, })], + backendsDefaultClientPolicy: appmesh.ClientPolicy.acmTrust({ + certificateAuthorities: [acmpca.CertificateAuthority.fromCertificateAuthorityArn(stack, 'certificate', certificateAuthorityArn)], + ports: [8080, 8081], + }), accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout'), virtualGatewayName: 'virtualGateway', }); @@ -300,6 +349,8 @@ const gateway = mesh.addVirtualGateway('gateway', { The listeners field can be omitted which will default to an HTTP Listener on port 8080. A gateway route can be added using the `gateway.addGatewayRoute()` method. +The `backendsDefaultClientPolicy` property are added to the node while creating the virtual gateway. These are virtual gateway's service backends client policy defaults. + ## Adding a Gateway Route A _gateway route_ is attached to a virtual gateway and routes traffic to an existing virtual service. diff --git a/packages/@aws-cdk/aws-appmesh/lib/client-policy.ts b/packages/@aws-cdk/aws-appmesh/lib/client-policy.ts new file mode 100644 index 0000000000000..03236ee1c8f32 --- /dev/null +++ b/packages/@aws-cdk/aws-appmesh/lib/client-policy.ts @@ -0,0 +1,110 @@ +import * as acmpca from '@aws-cdk/aws-acmpca'; +import * as cdk from '@aws-cdk/core'; +import { CfnVirtualNode } from './appmesh.generated'; + +enum CertificateType { + ACMPCA = 'acm', + FILE = 'file', +} + +/** + * Properties of TLS Client Policy + */ +export interface ClientPolicyConfig { + /** + * Represents single Client Policy property + */ + readonly clientPolicy: CfnVirtualNode.ClientPolicyProperty; +} + +/** + * Represents the property needed to define a Client Policy + */ +export interface ClientPolicyOptions { + /** + * TLS is enforced on the ports specified here. + * If no ports are specified, TLS will be enforced on all the ports. + * + * @default - none + */ + readonly ports?: number[]; +} + +/** + * ACM Trust Properties + */ +export interface AcmTrustOptions extends ClientPolicyOptions { + /** + * Contains information for your private certificate authority + */ + readonly certificateAuthorities: acmpca.ICertificateAuthority[]; +} + +/** + * File Trust Properties + */ +export interface FileTrustOptions extends ClientPolicyOptions { + /** + * Path to the Certificate Chain file on the file system where the Envoy is deployed. + */ + readonly certificateChain: string; +} + +/** + * Defines the TLS validation context trust. + */ +export abstract class ClientPolicy { + /** + * Tells envoy where to fetch the validation context from + */ + public static fileTrust(props: FileTrustOptions): ClientPolicy { + return new ClientPolicyImpl(props.ports, CertificateType.FILE, props.certificateChain, undefined); + } + + /** + * TLS validation context trust for ACM Private Certificate Authority (CA). + */ + public static acmTrust(props: AcmTrustOptions): ClientPolicy { + return new ClientPolicyImpl(props.ports, CertificateType.ACMPCA, undefined, props.certificateAuthorities); + } + + /** + * Returns Trust context based on trust type. + */ + public abstract bind(scope: cdk.Construct): ClientPolicyConfig; + +} + +class ClientPolicyImpl extends ClientPolicy { + constructor (private readonly ports: number[] | undefined, + private readonly certificateType: CertificateType, + private readonly certificateChain: string | undefined, + private readonly certificateAuthorityArns: acmpca.ICertificateAuthority[] | undefined) { super(); } + + public bind(_scope: cdk.Construct): ClientPolicyConfig { + if (this.certificateType === CertificateType.ACMPCA && this.certificateAuthorityArns?.map(certificateArn => + certificateArn.certificateAuthorityArn).length === 0) { + throw new Error('You must provide at least one Certificate Authority when creating an ACM Trust ClientPolicy'); + } else { + return { + clientPolicy: { + tls: { + ports: this.ports, + validation: { + trust: { + [this.certificateType]: this.certificateType === CertificateType.FILE + ? { + certificateChain: this.certificateChain, + } + : { + certificateAuthorityArns: this.certificateAuthorityArns?.map(certificateArn => + certificateArn.certificateAuthorityArn), + }, + }, + }, + }, + }, + }; + } + } +} diff --git a/packages/@aws-cdk/aws-appmesh/lib/index.ts b/packages/@aws-cdk/aws-appmesh/lib/index.ts index 1b468f21ec613..f9e4b6a07ff36 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/index.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/index.ts @@ -13,3 +13,4 @@ export * from './virtual-gateway'; export * from './virtual-gateway-listener'; export * from './gateway-route'; export * from './gateway-route-spec'; +export * from './client-policy'; diff --git a/packages/@aws-cdk/aws-appmesh/lib/shared-interfaces.ts b/packages/@aws-cdk/aws-appmesh/lib/shared-interfaces.ts index 21ab96b6ce56a..c8b3ba88f6378 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/shared-interfaces.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/shared-interfaces.ts @@ -138,4 +138,5 @@ class FileAccessLog extends AccessLog { }, }; } -} \ No newline at end of file +} + diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway.ts index 4a0c5fef1af75..1e1144fed1038 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway.ts @@ -1,8 +1,8 @@ import * as cdk from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnVirtualGateway } from './appmesh.generated'; +import { ClientPolicy } from './client-policy'; import { GatewayRoute, GatewayRouteBaseProps } from './gateway-route'; - import { IMesh, Mesh } from './mesh'; import { AccessLog } from './shared-interfaces'; import { VirtualGatewayListener, VirtualGatewayListenerConfig } from './virtual-gateway-listener'; @@ -60,6 +60,13 @@ export interface VirtualGatewayBaseProps { * @default - no access logging */ readonly accessLog?: AccessLog; + + /** + * Default Configuration Virtual Node uses to communicate with Virtual Service + * + * @default - No Config + */ + readonly backendsDefaultClientPolicy?: ClientPolicy; } /** @@ -173,6 +180,7 @@ export class VirtualGateway extends VirtualGatewayBase { meshName: this.mesh.meshName, spec: { listeners: this.listeners.map(listener => listener.listener), + backendDefaults: props.backendsDefaultClientPolicy?.bind(this), logging: accessLogging !== undefined ? { accessLog: accessLogging.virtualGatewayAccessLog, } : undefined, diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts index e868ce69936c7..f092b85caa0e2 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts @@ -2,6 +2,7 @@ import * as cloudmap from '@aws-cdk/aws-servicediscovery'; import * as cdk from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnVirtualNode } from './appmesh.generated'; +import { ClientPolicy } from './client-policy'; import { IMesh, Mesh } from './mesh'; import { AccessLog } from './shared-interfaces'; import { VirtualNodeListener, VirtualNodeListenerConfig } from './virtual-node-listener'; @@ -94,6 +95,13 @@ export interface VirtualNodeBaseProps { * @default - No access logging */ readonly accessLog?: AccessLog; + + /** + * Default Configuration Virtual Node uses to communicate with Virtual Service + * + * @default - No Config + */ + readonly backendsDefaultClientPolicy?: ClientPolicy; } /** @@ -193,8 +201,9 @@ export class VirtualNode extends VirtualNodeBase { virtualNodeName: this.physicalName, meshName: this.mesh.meshName, spec: { - backends: cdk.Lazy.any({ produce: () => this.backends }, { omitEmptyArray: true }), - listeners: cdk.Lazy.any({ produce: () => this.listeners.map(listener => listener.listener) }, { omitEmptyArray: true }), + backends: cdk.Lazy.anyValue({ produce: () => this.backends }, { omitEmptyArray: true }), + listeners: cdk.Lazy.anyValue({ produce: () => this.listeners.map(listener => listener.listener) }, { omitEmptyArray: true }), + backendDefaults: props.backendsDefaultClientPolicy?.bind(this), serviceDiscovery: { dns: props.dnsHostName !== undefined ? { hostname: props.dnsHostName } : undefined, awsCloudMap: props.cloudMapService !== undefined ? { @@ -231,6 +240,7 @@ export class VirtualNode extends VirtualNodeBase { this.backends.push({ virtualService: { virtualServiceName: virtualService.virtualServiceName, + clientPolicy: virtualService.clientPolicy?.bind(this).clientPolicy, }, }); } diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-service.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-service.ts index 677eb96b3e4a8..9ca5d5010b7f4 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/virtual-service.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-service.ts @@ -1,6 +1,7 @@ import * as cdk from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnVirtualService } from './appmesh.generated'; +import { ClientPolicy } from './client-policy'; import { IMesh, Mesh } from './mesh'; import { IVirtualNode } from './virtual-node'; import { IVirtualRouter } from './virtual-router'; @@ -27,6 +28,11 @@ export interface IVirtualService extends cdk.IResource { * The Mesh which the VirtualService belongs to */ readonly mesh: IMesh; + + /** + * Client policy for this Virtual Service + */ + readonly clientPolicy?: ClientPolicy; } /** @@ -57,6 +63,13 @@ export interface VirtualServiceBaseProps { * @default - At most one of virtualRouter and virtualNode is allowed. */ readonly virtualNode?: IVirtualNode; + + /** + * Client policy for this Virtual Service + * + * @default - none + */ + readonly clientPolicy?: ClientPolicy; } /** @@ -96,6 +109,7 @@ export class VirtualService extends cdk.Resource implements IVirtualService { return new class extends cdk.Resource implements IVirtualService { readonly virtualServiceName = attrs.virtualServiceName; readonly mesh = attrs.mesh; + readonly clientPolicy = attrs.clientPolicy; readonly virtualServiceArn = cdk.Stack.of(this).formatArn({ service: 'appmesh', resource: `mesh/${attrs.mesh.meshName}/virtualService`, @@ -119,6 +133,8 @@ export class VirtualService extends cdk.Resource implements IVirtualService { */ public readonly mesh: IMesh; + public readonly clientPolicy?: ClientPolicy; + private readonly virtualServiceProvider?: CfnVirtualService.VirtualServiceProviderProperty; constructor(scope: Construct, id: string, props: VirtualServiceProps) { @@ -131,6 +147,7 @@ export class VirtualService extends cdk.Resource implements IVirtualService { } this.mesh = props.mesh; + this.clientPolicy = props.clientPolicy; // Check which provider to use node or router (or neither) if (props.virtualRouter) { @@ -186,4 +203,11 @@ export interface VirtualServiceAttributes { * The Mesh which the VirtualService belongs to */ readonly mesh: IMesh; + + /** + * Client policy for this Virtual Service + * + * @default - none + */ + readonly clientPolicy?: ClientPolicy; } diff --git a/packages/@aws-cdk/aws-appmesh/package.json b/packages/@aws-cdk/aws-appmesh/package.json index f200312093d3a..c956c2e77c844 100644 --- a/packages/@aws-cdk/aws-appmesh/package.json +++ b/packages/@aws-cdk/aws-appmesh/package.json @@ -86,6 +86,7 @@ "pkglint": "0.0.0" }, "dependencies": { + "@aws-cdk/aws-acmpca": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-servicediscovery": "0.0.0", @@ -93,6 +94,7 @@ "constructs": "^3.2.0" }, "peerDependencies": { + "@aws-cdk/aws-acmpca": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-servicediscovery": "0.0.0", diff --git a/packages/@aws-cdk/aws-appmesh/test/integ.mesh.expected.json b/packages/@aws-cdk/aws-appmesh/test/integ.mesh.expected.json index e74a824311783..e3a9f98c5a016 100644 --- a/packages/@aws-cdk/aws-appmesh/test/integ.mesh.expected.json +++ b/packages/@aws-cdk/aws-appmesh/test/integ.mesh.expected.json @@ -691,6 +691,19 @@ ] }, "Spec": { + "BackendDefaults": { + "ClientPolicy": { + "TLS": { + "Validation": { + "Trust": { + "ACM": { + "CertificateAuthorityArns": ["arn:aws:acm-pca:us-east-1:123456789012:certificate-authority/12345678-1234-1234-1234-123456789012"] + } + } + } + } + } + }, "Backends": [ { "VirtualService": { @@ -739,6 +752,19 @@ ] }, "Spec": { + "BackendDefaults": { + "ClientPolicy": { + "TLS": { + "Validation": { + "Trust": { + "File": { + "CertificateChain": "path-to-certificate" + } + } + } + } + } + }, "Listeners": [ { "HealthCheck": { diff --git a/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts b/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts index 1a064b5ce7031..63e027b8ef0e5 100644 --- a/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts +++ b/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts @@ -1,7 +1,7 @@ +import * as acmpca from '@aws-cdk/aws-acmpca'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as cloudmap from '@aws-cdk/aws-servicediscovery'; import * as cdk from '@aws-cdk/core'; - import * as appmesh from '../lib/'; export const app = new cdk.App(); @@ -62,6 +62,8 @@ router.addRoute('route-1', { }), }); +const certificateAuthorityArn = 'arn:aws:acm-pca:us-east-1:123456789012:certificate-authority/12345678-1234-1234-1234-123456789012'; + const node2 = mesh.addVirtualNode('node2', { dnsHostName: `node2.${namespace.namespaceName}`, listeners: [appmesh.VirtualNodeListener.http({ @@ -75,6 +77,9 @@ const node2 = mesh.addVirtualNode('node2', { unhealthyThreshold: 2, }, })], + backendsDefaultClientPolicy: appmesh.ClientPolicy.acmTrust({ + certificateAuthorities: [acmpca.CertificateAuthority.fromCertificateAuthorityArn(stack, 'certificate', certificateAuthorityArn)], + }), backends: [ new appmesh.VirtualService(stack, 'service-3', { virtualServiceName: 'service3.domain.local', @@ -96,6 +101,9 @@ const node3 = mesh.addVirtualNode('node3', { unhealthyThreshold: 2, }, })], + backendsDefaultClientPolicy: appmesh.ClientPolicy.fileTrust({ + certificateChain: 'path-to-certificate', + }), accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout'), }); diff --git a/packages/@aws-cdk/aws-appmesh/test/test.virtual-gateway.ts b/packages/@aws-cdk/aws-appmesh/test/test.virtual-gateway.ts index 8e76b0f5c85f5..6207e49ce0be1 100644 --- a/packages/@aws-cdk/aws-appmesh/test/test.virtual-gateway.ts +++ b/packages/@aws-cdk/aws-appmesh/test/test.virtual-gateway.ts @@ -238,6 +238,49 @@ export = { test.done(); }, }, + + 'When creating a VirtualGateway with backend defaults': { + 'should add backend defaults to the VirtualGateway'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + const mesh = new appmesh.Mesh(stack, 'mesh', { + meshName: 'test-mesh', + }); + + new appmesh.VirtualGateway(stack, 'virtual-gateway', { + virtualGatewayName: 'virtual-gateway', + mesh: mesh, + backendsDefaultClientPolicy: appmesh.ClientPolicy.fileTrust({ + certificateChain: 'path-to-certificate', + }), + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::AppMesh::VirtualGateway', { + VirtualGatewayName: 'virtual-gateway', + Spec: { + BackendDefaults: { + ClientPolicy: { + TLS: { + Validation: { + Trust: { + File: { + CertificateChain: 'path-to-certificate', + }, + }, + }, + }, + }, + }, + }, + })); + + test.done(); + }, + }, + 'Can import VirtualGateways using an ARN'(test: Test) { const app = new cdk.App(); // GIVEN diff --git a/packages/@aws-cdk/aws-appmesh/test/test.virtual-node.ts b/packages/@aws-cdk/aws-appmesh/test/test.virtual-node.ts index 75c7d0579e71b..739b34476331c 100644 --- a/packages/@aws-cdk/aws-appmesh/test/test.virtual-node.ts +++ b/packages/@aws-cdk/aws-appmesh/test/test.virtual-node.ts @@ -1,7 +1,7 @@ import { expect, haveResourceLike } from '@aws-cdk/assert'; +import * as acmpca from '@aws-cdk/aws-acmpca'; import * as cdk from '@aws-cdk/core'; import { Test } from 'nodeunit'; - import * as appmesh from '../lib'; export = { @@ -255,6 +255,108 @@ export = { test.done(); }, }, + + 'when a default backend is added': { + 'should add a backend default to the resource'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + const mesh = new appmesh.Mesh(stack, 'mesh', { + meshName: 'test-mesh', + }); + + const certificateAuthorityArn = 'arn:aws:acm-pca:us-east-1:123456789012:certificate-authority/12345678-1234-1234-1234-123456789012'; + + new appmesh.VirtualNode(stack, 'test-node', { + mesh, + dnsHostName: 'test', + backendsDefaultClientPolicy: appmesh.ClientPolicy.acmTrust({ + certificateAuthorities: [acmpca.CertificateAuthority.fromCertificateAuthorityArn(stack, 'certificate', certificateAuthorityArn)], + ports: [8080, 8081], + }), + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::AppMesh::VirtualNode', { + Spec: { + BackendDefaults: { + ClientPolicy: { + TLS: { + Ports: [8080, 8081], + Validation: { + Trust: { + ACM: { + CertificateAuthorityArns: [`${certificateAuthorityArn}`], + }, + }, + }, + }, + }, + }, + }, + })); + + test.done(); + }, + }, + + 'when a backend is added': { + 'should add a backend virtual service to the resource'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + const mesh = new appmesh.Mesh(stack, 'mesh', { + meshName: 'test-mesh', + }); + + const node = new appmesh.VirtualNode(stack, 'test-node', { + mesh, + dnsHostName: 'test', + }); + + const service1 = new appmesh.VirtualService(stack, 'service-1', { + virtualServiceName: 'service1.domain.local', + mesh, + clientPolicy: appmesh.ClientPolicy.fileTrust({ + certificateChain: 'path-to-certificate', + ports: [8080, 8081], + }), + }); + + node.addBackend(service1); + + // THEN + expect(stack).to(haveResourceLike('AWS::AppMesh::VirtualNode', { + Spec: { + Backends: [ + { + VirtualService: { + VirtualServiceName: { + 'Fn::GetAtt': ['service1A48078CF', 'VirtualServiceName'], + }, + ClientPolicy: { + TLS: { + Ports: [8080, 8081], + Validation: { + Trust: { + File: { + CertificateChain: 'path-to-certificate', + }, + }, + }, + }, + }, + }, + }, + ], + }, + })); + + test.done(); + }, + }, }, 'Can import Virtual Nodes using an ARN'(test: Test) { // GIVEN From 4182c40a237efa9f663e46263b8d9424104f5363 Mon Sep 17 00:00:00 2001 From: Adam Ruka Date: Mon, 7 Dec 2020 15:10:08 -0800 Subject: [PATCH 289/314] feat(ecs): introduce a new Image type, TagParameterContainerImage, to be used in CodePipeline (#11795) While CDK Pipelines is the idiomatic way of deploying ECS applications in CDK, it does not handle the case where the application's source code is kept in a separate source code repository from the CDK infrastructure code. This adds a new class to the ECS module, `TagParameterContainerImage`, that allows deploying a service managed that way through CodePipeline. Related to #1237 Related to #7746 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-codepipeline-actions/README.md | 14 +- ...line-ecs-separate-source.lit.expected.json | 1906 +++++++++++++++++ .../integ.pipeline-ecs-separate-source.lit.ts | 221 ++ .../images/tag-parameter-container-image.ts | 48 + packages/@aws-cdk/aws-ecs/lib/index.ts | 1 + .../test.tag-parameter-container-image.ts | 25 + 6 files changed, 2214 insertions(+), 1 deletion(-) create mode 100644 packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-separate-source.lit.expected.json create mode 100644 packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-separate-source.lit.ts create mode 100644 packages/@aws-cdk/aws-ecs/lib/images/tag-parameter-container-image.ts create mode 100644 packages/@aws-cdk/aws-ecs/test/images/test.tag-parameter-container-image.ts diff --git a/packages/@aws-cdk/aws-codepipeline-actions/README.md b/packages/@aws-cdk/aws-codepipeline-actions/README.md index ac6db2b9fab00..e64ce8b9d349e 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/README.md +++ b/packages/@aws-cdk/aws-codepipeline-actions/README.md @@ -515,7 +515,7 @@ for more details about using CloudFormation in CodePipeline. #### Actions defined by this package -This package defines the following actions: +This package contains the following CloudFormation actions: * **CloudFormationCreateUpdateStackAction** - Deploy a CloudFormation template directly from the pipeline. The indicated stack is created, or updated if it already exists. If the stack is in a failure state, deployment will fail (unless `replaceOnFailure` @@ -657,6 +657,18 @@ const deployStage = pipeline.addStage({ [image definition file]: https://docs.aws.amazon.com/codepipeline/latest/userguide/pipelines-create.html#pipelines-create-image-definitions +#### Deploying ECS applications stored in a separate source code repository + +The idiomatic CDK way of deploying an ECS application is to have your Dockerfiles and your CDK code in the same source code repository, +leveraging [Docker Assets])(https://docs.aws.amazon.com/cdk/latest/guide/assets.html#assets_types_docker), +and use the [CDK Pipelines module](https://docs.aws.amazon.com/cdk/api/latest/docs/pipelines-readme.html). + +However, if you want to deploy a Docker application whose source code is kept in a separate version control repository than the CDK code, +you can use the `TagParameterContainerImage` class from the ECS module. +Here's an example: + +[example ECS pipeline for an application in a separate source code repository](test/integ.pipeline-ecs-separate-source.lit.ts) + ### AWS S3 Deployment To use an S3 Bucket as a deployment target in CodePipeline: diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-separate-source.lit.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-separate-source.lit.expected.json new file mode 100644 index 0000000000000..4576cb2ca969c --- /dev/null +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-separate-source.lit.expected.json @@ -0,0 +1,1906 @@ +[ + { + "Resources": { + "EcsDeployRepositoryE7A569C0": { + "Type": "AWS::ECR::Repository", + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "AppCodeDockerImageBuildAndPushProjectRole991CF4D7": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "codebuild.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "AppCodeDockerImageBuildAndPushProjectRoleDefaultPolicyDDF56E3F": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":log-group:/aws/codebuild/", + { + "Ref": "AppCodeDockerImageBuildAndPushProject00DD6671" + } + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":log-group:/aws/codebuild/", + { + "Ref": "AppCodeDockerImageBuildAndPushProject00DD6671" + }, + ":*" + ] + ] + } + ] + }, + { + "Action": [ + "codebuild:CreateReportGroup", + "codebuild:CreateReport", + "codebuild:UpdateReport", + "codebuild:BatchPutTestCases", + "codebuild:BatchPutCodeCoverages" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":codebuild:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":report-group/", + { + "Ref": "AppCodeDockerImageBuildAndPushProject00DD6671" + }, + "-*" + ] + ] + } + }, + { + "Action": [ + "ecr:BatchCheckLayerAvailability", + "ecr:GetDownloadUrlForLayer", + "ecr:BatchGetImage" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EcsDeployRepositoryE7A569C0", + "Arn" + ] + } + }, + { + "Action": "ecr:GetAuthorizationToken", + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": [ + "ecr:PutImage", + "ecr:InitiateLayerUpload", + "ecr:UploadLayerPart", + "ecr:CompleteLayerUpload" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EcsDeployRepositoryE7A569C0", + "Arn" + ] + } + }, + { + "Action": [ + "s3:GetObject*", + "s3:GetBucket*", + "s3:List*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "ArtifactBucket7410C9EF", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "ArtifactBucket7410C9EF", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "AppCodeDockerImageBuildAndPushProjectRoleDefaultPolicyDDF56E3F", + "Roles": [ + { + "Ref": "AppCodeDockerImageBuildAndPushProjectRole991CF4D7" + } + ] + } + }, + "AppCodeDockerImageBuildAndPushProject00DD6671": { + "Type": "AWS::CodeBuild::Project", + "Properties": { + "Artifacts": { + "Type": "CODEPIPELINE" + }, + "Environment": { + "ComputeType": "BUILD_GENERAL1_SMALL", + "EnvironmentVariables": [ + { + "Name": "REPOSITORY_URI", + "Type": "PLAINTEXT", + "Value": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 4, + { + "Fn::Split": [ + ":", + { + "Fn::GetAtt": [ + "EcsDeployRepositoryE7A569C0", + "Arn" + ] + } + ] + } + ] + }, + ".dkr.ecr.", + { + "Fn::Select": [ + 3, + { + "Fn::Split": [ + ":", + { + "Fn::GetAtt": [ + "EcsDeployRepositoryE7A569C0", + "Arn" + ] + } + ] + } + ] + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "EcsDeployRepositoryE7A569C0" + } + ] + ] + } + } + ], + "Image": "aws/codebuild/standard:1.0", + "ImagePullCredentialsType": "CODEBUILD", + "PrivilegedMode": true, + "Type": "LINUX_CONTAINER" + }, + "ServiceRole": { + "Fn::GetAtt": [ + "AppCodeDockerImageBuildAndPushProjectRole991CF4D7", + "Arn" + ] + }, + "Source": { + "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"$(aws ecr get-login --region $AWS_DEFAULT_REGION --no-include-email)\",\n \"docker build -t $REPOSITORY_URI:$CODEBUILD_RESOLVED_SOURCE_VERSION .\"\n ]\n },\n \"post_build\": {\n \"commands\": [\n \"docker push $REPOSITORY_URI:$CODEBUILD_RESOLVED_SOURCE_VERSION\",\n \"export imageTag=$CODEBUILD_RESOLVED_SOURCE_VERSION\"\n ]\n }\n },\n \"env\": {\n \"exported-variables\": [\n \"imageTag\"\n ]\n }\n}", + "Type": "CODEPIPELINE" + }, + "EncryptionKey": "alias/aws/s3" + } + }, + "CdkCodeBuildProjectRole6830A58A": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "codebuild.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "CdkCodeBuildProjectRoleDefaultPolicyA531D3BE": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":log-group:/aws/codebuild/", + { + "Ref": "CdkCodeBuildProject98C8CAB8" + } + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":log-group:/aws/codebuild/", + { + "Ref": "CdkCodeBuildProject98C8CAB8" + }, + ":*" + ] + ] + } + ] + }, + { + "Action": [ + "codebuild:CreateReportGroup", + "codebuild:CreateReport", + "codebuild:UpdateReport", + "codebuild:BatchPutTestCases", + "codebuild:BatchPutCodeCoverages" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":codebuild:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":report-group/", + { + "Ref": "CdkCodeBuildProject98C8CAB8" + }, + "-*" + ] + ] + } + }, + { + "Action": [ + "s3:GetObject*", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + "s3:PutObject*", + "s3:Abort*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "ArtifactBucket7410C9EF", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "ArtifactBucket7410C9EF", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "CdkCodeBuildProjectRoleDefaultPolicyA531D3BE", + "Roles": [ + { + "Ref": "CdkCodeBuildProjectRole6830A58A" + } + ] + } + }, + "CdkCodeBuildProject98C8CAB8": { + "Type": "AWS::CodeBuild::Project", + "Properties": { + "Artifacts": { + "Type": "CODEPIPELINE" + }, + "Environment": { + "ComputeType": "BUILD_GENERAL1_SMALL", + "Image": "aws/codebuild/standard:1.0", + "ImagePullCredentialsType": "CODEBUILD", + "PrivilegedMode": false, + "Type": "LINUX_CONTAINER" + }, + "ServiceRole": { + "Fn::GetAtt": [ + "CdkCodeBuildProjectRole6830A58A", + "Arn" + ] + }, + "Source": { + "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"install\": {\n \"commands\": [\n \"npm install\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"npx cdk synth --verbose\"\n ]\n }\n },\n \"artifacts\": {\n \"base-directory\": \"cdk.out\",\n \"files\": \"**/*\"\n }\n}", + "Type": "CODEPIPELINE" + }, + "EncryptionKey": "alias/aws/s3" + } + }, + "ArtifactBucket7410C9EF": { + "Type": "AWS::S3::Bucket", + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "AppCodeSourceRepository9F7363A1": { + "Type": "AWS::CodeCommit::Repository", + "Properties": { + "RepositoryName": "AppCodeSourceRepository" + } + }, + "AppCodeSourceRepositoryawscdkpipelineecsseparatesourcesCodePipelineDeployingEcsApplicationF8E9E764EventRuleA9D5E83B": { + "Type": "AWS::Events::Rule", + "Properties": { + "EventPattern": { + "source": [ + "aws.codecommit" + ], + "resources": [ + { + "Fn::GetAtt": [ + "AppCodeSourceRepository9F7363A1", + "Arn" + ] + } + ], + "detail-type": [ + "CodeCommit Repository State Change" + ], + "detail": { + "event": [ + "referenceCreated", + "referenceUpdated" + ], + "referenceName": [ + "master" + ] + } + }, + "State": "ENABLED", + "Targets": [ + { + "Arn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":codepipeline:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":", + { + "Ref": "CodePipelineDeployingEcsApplication81EB9383" + } + ] + ] + }, + "Id": "Target0", + "RoleArn": { + "Fn::GetAtt": [ + "CodePipelineDeployingEcsApplicationEventsRoleEEEA39E5", + "Arn" + ] + } + } + ] + } + }, + "CdkCodeSourceRepositoryF10B9DC6": { + "Type": "AWS::CodeCommit::Repository", + "Properties": { + "RepositoryName": "CdkCodeSourceRepository" + } + }, + "CdkCodeSourceRepositoryawscdkpipelineecsseparatesourcesCodePipelineDeployingEcsApplicationF8E9E764EventRule94D5EE4B": { + "Type": "AWS::Events::Rule", + "Properties": { + "EventPattern": { + "source": [ + "aws.codecommit" + ], + "resources": [ + { + "Fn::GetAtt": [ + "CdkCodeSourceRepositoryF10B9DC6", + "Arn" + ] + } + ], + "detail-type": [ + "CodeCommit Repository State Change" + ], + "detail": { + "event": [ + "referenceCreated", + "referenceUpdated" + ], + "referenceName": [ + "master" + ] + } + }, + "State": "ENABLED", + "Targets": [ + { + "Arn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":codepipeline:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":", + { + "Ref": "CodePipelineDeployingEcsApplication81EB9383" + } + ] + ] + }, + "Id": "Target0", + "RoleArn": { + "Fn::GetAtt": [ + "CodePipelineDeployingEcsApplicationEventsRoleEEEA39E5", + "Arn" + ] + } + } + ] + } + }, + "CodePipelineDeployingEcsApplicationRole138CDC17": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "codepipeline.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "CodePipelineDeployingEcsApplicationRoleDefaultPolicyDBDC1339": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetObject*", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + "s3:PutObject*", + "s3:Abort*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "ArtifactBucket7410C9EF", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "ArtifactBucket7410C9EF", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "CodePipelineDeployingEcsApplicationSourceAppCodeSourceCodePipelineActionRole6D88B36F", + "Arn" + ] + } + }, + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "CodePipelineDeployingEcsApplicationSourceCdkCodeSourceCodePipelineActionRoleA1E3A5E9", + "Arn" + ] + } + }, + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "CodePipelineDeployingEcsApplicationBuildAppCodeDockerImageBuildAndPushCodePipelineActionRole9B025737", + "Arn" + ] + } + }, + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "CodePipelineDeployingEcsApplicationBuildCdkCodeBuildAndSynthCodePipelineActionRole54094521", + "Arn" + ] + } + }, + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "CodePipelineDeployingEcsApplicationDeployCFNDeployCodePipelineActionRoleC97FFCE2", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "CodePipelineDeployingEcsApplicationRoleDefaultPolicyDBDC1339", + "Roles": [ + { + "Ref": "CodePipelineDeployingEcsApplicationRole138CDC17" + } + ] + } + }, + "CodePipelineDeployingEcsApplication81EB9383": { + "Type": "AWS::CodePipeline::Pipeline", + "Properties": { + "RoleArn": { + "Fn::GetAtt": [ + "CodePipelineDeployingEcsApplicationRole138CDC17", + "Arn" + ] + }, + "Stages": [ + { + "Actions": [ + { + "ActionTypeId": { + "Category": "Source", + "Owner": "AWS", + "Provider": "CodeCommit", + "Version": "1" + }, + "Configuration": { + "RepositoryName": { + "Fn::GetAtt": [ + "AppCodeSourceRepository9F7363A1", + "Name" + ] + }, + "BranchName": "master", + "PollForSourceChanges": false + }, + "Name": "AppCodeSource", + "OutputArtifacts": [ + { + "Name": "Artifact_Source_AppCodeSource" + } + ], + "RoleArn": { + "Fn::GetAtt": [ + "CodePipelineDeployingEcsApplicationSourceAppCodeSourceCodePipelineActionRole6D88B36F", + "Arn" + ] + }, + "RunOrder": 1 + }, + { + "ActionTypeId": { + "Category": "Source", + "Owner": "AWS", + "Provider": "CodeCommit", + "Version": "1" + }, + "Configuration": { + "RepositoryName": { + "Fn::GetAtt": [ + "CdkCodeSourceRepositoryF10B9DC6", + "Name" + ] + }, + "BranchName": "master", + "PollForSourceChanges": false + }, + "Name": "CdkCodeSource", + "OutputArtifacts": [ + { + "Name": "Artifact_Source_CdkCodeSource" + } + ], + "RoleArn": { + "Fn::GetAtt": [ + "CodePipelineDeployingEcsApplicationSourceCdkCodeSourceCodePipelineActionRoleA1E3A5E9", + "Arn" + ] + }, + "RunOrder": 1 + } + ], + "Name": "Source" + }, + { + "Actions": [ + { + "ActionTypeId": { + "Category": "Build", + "Owner": "AWS", + "Provider": "CodeBuild", + "Version": "1" + }, + "Configuration": { + "ProjectName": { + "Ref": "AppCodeDockerImageBuildAndPushProject00DD6671" + } + }, + "InputArtifacts": [ + { + "Name": "Artifact_Source_AppCodeSource" + } + ], + "Name": "AppCodeDockerImageBuildAndPush", + "Namespace": "Build_AppCodeDockerImageBuildAndPush_NS", + "RoleArn": { + "Fn::GetAtt": [ + "CodePipelineDeployingEcsApplicationBuildAppCodeDockerImageBuildAndPushCodePipelineActionRole9B025737", + "Arn" + ] + }, + "RunOrder": 1 + }, + { + "ActionTypeId": { + "Category": "Build", + "Owner": "AWS", + "Provider": "CodeBuild", + "Version": "1" + }, + "Configuration": { + "ProjectName": { + "Ref": "CdkCodeBuildProject98C8CAB8" + } + }, + "InputArtifacts": [ + { + "Name": "Artifact_Source_CdkCodeSource" + } + ], + "Name": "CdkCodeBuildAndSynth", + "OutputArtifacts": [ + { + "Name": "Artifact_Build_CdkCodeBuildAndSynth" + } + ], + "RoleArn": { + "Fn::GetAtt": [ + "CodePipelineDeployingEcsApplicationBuildCdkCodeBuildAndSynthCodePipelineActionRole54094521", + "Arn" + ] + }, + "RunOrder": 1 + } + ], + "Name": "Build" + }, + { + "Actions": [ + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "SampleEcsStackDeployedFromCodePipeline", + "Capabilities": "CAPABILITY_NAMED_IAM", + "RoleArn": { + "Fn::GetAtt": [ + "CodePipelineDeployingEcsApplicationDeployCFNDeployRole71BFA647", + "Arn" + ] + }, + "ParameterOverrides": "{\"TaskDefinitionAppContainerImageTagParam6DBCD720\":\"#{Build_AppCodeDockerImageBuildAndPush_NS.imageTag}\"}", + "ActionMode": "CREATE_UPDATE", + "TemplatePath": "Artifact_Build_CdkCodeBuildAndSynth::EcsStackDeployedInPipeline.template.json" + }, + "InputArtifacts": [ + { + "Name": "Artifact_Build_CdkCodeBuildAndSynth" + } + ], + "Name": "CFN_Deploy", + "RoleArn": { + "Fn::GetAtt": [ + "CodePipelineDeployingEcsApplicationDeployCFNDeployCodePipelineActionRoleC97FFCE2", + "Arn" + ] + }, + "RunOrder": 1 + } + ], + "Name": "Deploy" + } + ], + "ArtifactStore": { + "Location": { + "Ref": "ArtifactBucket7410C9EF" + }, + "Type": "S3" + } + }, + "DependsOn": [ + "CodePipelineDeployingEcsApplicationRoleDefaultPolicyDBDC1339", + "CodePipelineDeployingEcsApplicationRole138CDC17" + ] + }, + "CodePipelineDeployingEcsApplicationSourceAppCodeSourceCodePipelineActionRole6D88B36F": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + } + } + ], + "Version": "2012-10-17" + } + } + }, + "CodePipelineDeployingEcsApplicationSourceAppCodeSourceCodePipelineActionRoleDefaultPolicy9DFF92D6": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetObject*", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + "s3:PutObject*", + "s3:Abort*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "ArtifactBucket7410C9EF", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "ArtifactBucket7410C9EF", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "codecommit:GetBranch", + "codecommit:GetCommit", + "codecommit:UploadArchive", + "codecommit:GetUploadArchiveStatus", + "codecommit:CancelUploadArchive" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "AppCodeSourceRepository9F7363A1", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "CodePipelineDeployingEcsApplicationSourceAppCodeSourceCodePipelineActionRoleDefaultPolicy9DFF92D6", + "Roles": [ + { + "Ref": "CodePipelineDeployingEcsApplicationSourceAppCodeSourceCodePipelineActionRole6D88B36F" + } + ] + } + }, + "CodePipelineDeployingEcsApplicationSourceCdkCodeSourceCodePipelineActionRoleA1E3A5E9": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + } + } + ], + "Version": "2012-10-17" + } + } + }, + "CodePipelineDeployingEcsApplicationSourceCdkCodeSourceCodePipelineActionRoleDefaultPolicyB5DFA55D": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetObject*", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + "s3:PutObject*", + "s3:Abort*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "ArtifactBucket7410C9EF", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "ArtifactBucket7410C9EF", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "codecommit:GetBranch", + "codecommit:GetCommit", + "codecommit:UploadArchive", + "codecommit:GetUploadArchiveStatus", + "codecommit:CancelUploadArchive" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "CdkCodeSourceRepositoryF10B9DC6", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "CodePipelineDeployingEcsApplicationSourceCdkCodeSourceCodePipelineActionRoleDefaultPolicyB5DFA55D", + "Roles": [ + { + "Ref": "CodePipelineDeployingEcsApplicationSourceCdkCodeSourceCodePipelineActionRoleA1E3A5E9" + } + ] + } + }, + "CodePipelineDeployingEcsApplicationEventsRoleEEEA39E5": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "events.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "CodePipelineDeployingEcsApplicationEventsRoleDefaultPolicy19AFD1BD": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "codepipeline:StartPipelineExecution", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":codepipeline:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":", + { + "Ref": "CodePipelineDeployingEcsApplication81EB9383" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "CodePipelineDeployingEcsApplicationEventsRoleDefaultPolicy19AFD1BD", + "Roles": [ + { + "Ref": "CodePipelineDeployingEcsApplicationEventsRoleEEEA39E5" + } + ] + } + }, + "CodePipelineDeployingEcsApplicationBuildAppCodeDockerImageBuildAndPushCodePipelineActionRole9B025737": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + } + } + ], + "Version": "2012-10-17" + } + } + }, + "CodePipelineDeployingEcsApplicationBuildAppCodeDockerImageBuildAndPushCodePipelineActionRoleDefaultPolicyE8804DE5": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "codebuild:BatchGetBuilds", + "codebuild:StartBuild", + "codebuild:StopBuild" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "AppCodeDockerImageBuildAndPushProject00DD6671", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "CodePipelineDeployingEcsApplicationBuildAppCodeDockerImageBuildAndPushCodePipelineActionRoleDefaultPolicyE8804DE5", + "Roles": [ + { + "Ref": "CodePipelineDeployingEcsApplicationBuildAppCodeDockerImageBuildAndPushCodePipelineActionRole9B025737" + } + ] + } + }, + "CodePipelineDeployingEcsApplicationBuildCdkCodeBuildAndSynthCodePipelineActionRole54094521": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + } + } + ], + "Version": "2012-10-17" + } + } + }, + "CodePipelineDeployingEcsApplicationBuildCdkCodeBuildAndSynthCodePipelineActionRoleDefaultPolicy5BE54B75": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "codebuild:BatchGetBuilds", + "codebuild:StartBuild", + "codebuild:StopBuild" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "CdkCodeBuildProject98C8CAB8", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "CodePipelineDeployingEcsApplicationBuildCdkCodeBuildAndSynthCodePipelineActionRoleDefaultPolicy5BE54B75", + "Roles": [ + { + "Ref": "CodePipelineDeployingEcsApplicationBuildCdkCodeBuildAndSynthCodePipelineActionRole54094521" + } + ] + } + }, + "CodePipelineDeployingEcsApplicationDeployCFNDeployCodePipelineActionRoleC97FFCE2": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + } + } + ], + "Version": "2012-10-17" + } + } + }, + "CodePipelineDeployingEcsApplicationDeployCFNDeployCodePipelineActionRoleDefaultPolicy39F9A0A0": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "iam:PassRole", + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "CodePipelineDeployingEcsApplicationDeployCFNDeployRole71BFA647", + "Arn" + ] + } + }, + { + "Action": [ + "s3:GetObject*", + "s3:GetBucket*", + "s3:List*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "ArtifactBucket7410C9EF", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "ArtifactBucket7410C9EF", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "cloudformation:CreateStack", + "cloudformation:DescribeStack*", + "cloudformation:GetStackPolicy", + "cloudformation:GetTemplate*", + "cloudformation:SetStackPolicy", + "cloudformation:UpdateStack", + "cloudformation:ValidateTemplate" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":cloudformation:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":stack/SampleEcsStackDeployedFromCodePipeline/*" + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "CodePipelineDeployingEcsApplicationDeployCFNDeployCodePipelineActionRoleDefaultPolicy39F9A0A0", + "Roles": [ + { + "Ref": "CodePipelineDeployingEcsApplicationDeployCFNDeployCodePipelineActionRoleC97FFCE2" + } + ] + } + }, + "CodePipelineDeployingEcsApplicationDeployCFNDeployRole71BFA647": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "cloudformation.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "CodePipelineDeployingEcsApplicationDeployCFNDeployRoleDefaultPolicy859D7B9F": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetObject*", + "s3:GetBucket*", + "s3:List*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "ArtifactBucket7410C9EF", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "ArtifactBucket7410C9EF", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": "*", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "CodePipelineDeployingEcsApplicationDeployCFNDeployRoleDefaultPolicy859D7B9F", + "Roles": [ + { + "Ref": "CodePipelineDeployingEcsApplicationDeployCFNDeployRole71BFA647" + } + ] + } + } + }, + "Outputs": { + "ExportsOutputFnGetAttEcsDeployRepositoryE7A569C0ArnCCACE9DD": { + "Value": { + "Fn::GetAtt": [ + "EcsDeployRepositoryE7A569C0", + "Arn" + ] + }, + "Export": { + "Name": "aws-cdk-pipeline-ecs-separate-sources:ExportsOutputFnGetAttEcsDeployRepositoryE7A569C0ArnCCACE9DD" + } + }, + "ExportsOutputRefEcsDeployRepositoryE7A569C04EC3EB5E": { + "Value": { + "Ref": "EcsDeployRepositoryE7A569C0" + }, + "Export": { + "Name": "aws-cdk-pipeline-ecs-separate-sources:ExportsOutputRefEcsDeployRepositoryE7A569C04EC3EB5E" + } + } + } + }, + { + "Resources": { + "TaskDefinitionTaskRoleFD40A61D": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ecs-tasks.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "TaskDefinitionB36D86D9": { + "Type": "AWS::ECS::TaskDefinition", + "Properties": { + "ContainerDefinitions": [ + { + "Essential": true, + "Image": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 4, + { + "Fn::Split": [ + ":", + { + "Fn::ImportValue": "aws-cdk-pipeline-ecs-separate-sources:ExportsOutputFnGetAttEcsDeployRepositoryE7A569C0ArnCCACE9DD" + } + ] + } + ] + }, + ".dkr.ecr.", + { + "Fn::Select": [ + 3, + { + "Fn::Split": [ + ":", + { + "Fn::ImportValue": "aws-cdk-pipeline-ecs-separate-sources:ExportsOutputFnGetAttEcsDeployRepositoryE7A569C0ArnCCACE9DD" + } + ] + } + ] + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Fn::ImportValue": "aws-cdk-pipeline-ecs-separate-sources:ExportsOutputRefEcsDeployRepositoryE7A569C04EC3EB5E" + }, + ":", + { + "Ref": "TaskDefinitionAppContainerImageTagParam6DBCD720" + } + ] + ] + }, + "Name": "AppContainer" + } + ], + "Cpu": "1024", + "ExecutionRoleArn": { + "Fn::GetAtt": [ + "TaskDefinitionExecutionRole8D61C2FB", + "Arn" + ] + }, + "Family": "EcsStackDeployedInPipelineTaskDefinition3105C51D", + "Memory": "2048", + "NetworkMode": "awsvpc", + "RequiresCompatibilities": [ + "FARGATE" + ], + "TaskRoleArn": { + "Fn::GetAtt": [ + "TaskDefinitionTaskRoleFD40A61D", + "Arn" + ] + } + } + }, + "TaskDefinitionExecutionRole8D61C2FB": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ecs-tasks.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "TaskDefinitionExecutionRoleDefaultPolicy1F3406F5": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecr:BatchCheckLayerAvailability", + "ecr:GetDownloadUrlForLayer", + "ecr:BatchGetImage" + ], + "Effect": "Allow", + "Resource": { + "Fn::ImportValue": "aws-cdk-pipeline-ecs-separate-sources:ExportsOutputFnGetAttEcsDeployRepositoryE7A569C0ArnCCACE9DD" + } + }, + { + "Action": "ecr:GetAuthorizationToken", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "TaskDefinitionExecutionRoleDefaultPolicy1F3406F5", + "Roles": [ + { + "Ref": "TaskDefinitionExecutionRole8D61C2FB" + } + ] + } + }, + "Vpc8378EB38": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "EcsStackDeployedInPipeline/Vpc" + } + ] + } + }, + "VpcPublicSubnet1Subnet5C2D37C4": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.0.0/17", + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": "test-region-1a", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "EcsStackDeployedInPipeline/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1RouteTable6C95E38E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "EcsStackDeployedInPipeline/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1RouteTableAssociation97140677": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + } + } + }, + "VpcPublicSubnet1DefaultRoute3DA9E72A": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPublicSubnet1EIPD7E02669": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "EcsStackDeployedInPipeline/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1NATGateway4D7517AA": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet1EIPD7E02669", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "EcsStackDeployedInPipeline/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPrivateSubnet1Subnet536B997A": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.128.0/17", + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": "test-region-1a", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "EcsStackDeployedInPipeline/Vpc/PrivateSubnet1" + } + ] + } + }, + "VpcPrivateSubnet1RouteTableB2C5B500": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "EcsStackDeployedInPipeline/Vpc/PrivateSubnet1" + } + ] + } + }, + "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + } + } + }, + "VpcPrivateSubnet1DefaultRouteBE02A9ED": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + } + } + }, + "VpcIGWD7BA715C": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "EcsStackDeployedInPipeline/Vpc" + } + ] + } + }, + "VpcVPCGWBF912B6E": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "InternetGatewayId": { + "Ref": "VpcIGWD7BA715C" + } + } + }, + "ClusterEB0386A7": { + "Type": "AWS::ECS::Cluster" + }, + "EcsService81FC6EF6": { + "Type": "AWS::ECS::Service", + "Properties": { + "Cluster": { + "Ref": "ClusterEB0386A7" + }, + "DeploymentConfiguration": { + "MaximumPercent": 200, + "MinimumHealthyPercent": 50 + }, + "DesiredCount": 1, + "EnableECSManagedTags": false, + "LaunchType": "FARGATE", + "NetworkConfiguration": { + "AwsvpcConfiguration": { + "AssignPublicIp": "DISABLED", + "SecurityGroups": [ + { + "Fn::GetAtt": [ + "EcsServiceSecurityGroup8FDFD52F", + "GroupId" + ] + } + ], + "Subnets": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + } + ] + } + }, + "TaskDefinition": { + "Ref": "TaskDefinitionB36D86D9" + } + } + }, + "EcsServiceSecurityGroup8FDFD52F": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "EcsStackDeployedInPipeline/EcsService/SecurityGroup", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + } + }, + "Parameters": { + "TaskDefinitionAppContainerImageTagParam6DBCD720": { + "Type": "String" + } + } + } +] diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-separate-source.lit.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-separate-source.lit.ts new file mode 100644 index 0000000000000..ddf3a3a5cb93a --- /dev/null +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-separate-source.lit.ts @@ -0,0 +1,221 @@ +/// !cdk-integ * + +import * as codebuild from '@aws-cdk/aws-codebuild'; +import * as codecommit from '@aws-cdk/aws-codecommit'; +import * as codepipeline from '@aws-cdk/aws-codepipeline'; +import * as ec2 from '@aws-cdk/aws-ec2'; +import * as ecr from '@aws-cdk/aws-ecr'; +import * as ecs from '@aws-cdk/aws-ecs'; +import * as s3 from '@aws-cdk/aws-s3'; +import * as cdk from '@aws-cdk/core'; +import { Construct } from 'constructs'; +import * as codepipeline_actions from '../lib'; + +/** + * This example demonstrates how to create a CodePipeline that deploys an ECS Service + * from a different source repository than the source repository of your CDK code. + * If your application code and your CDK code are in the same repository, + * use the CDK Pipelines module instead of this method. + */ + +/// !show + +/** + * These are the construction properties for {@link EcsAppStack}. + * They extend the standard Stack properties, + * but also require providing the ContainerImage that the service will use. + * That Image will be provided from the Stack containing the CodePipeline. + */ +export interface EcsAppStackProps extends cdk.StackProps { + readonly image: ecs.ContainerImage; +} + +/** + * This is the Stack containing a simple ECS Service that uses the provided ContainerImage. + */ +export class EcsAppStack extends cdk.Stack { + constructor(scope: Construct, id: string, props: EcsAppStackProps) { + super(scope, id, props); + + const taskDefinition = new ecs.TaskDefinition(this, 'TaskDefinition', { + compatibility: ecs.Compatibility.FARGATE, + cpu: '1024', + memoryMiB: '2048', + }); + taskDefinition.addContainer('AppContainer', { + image: props.image, + }); + new ecs.FargateService(this, 'EcsService', { + taskDefinition, + cluster: new ecs.Cluster(this, 'Cluster', { + vpc: new ec2.Vpc(this, 'Vpc', { + maxAzs: 1, + }), + }), + }); + } +} + +/** + * This is the Stack containing the CodePipeline definition that deploys an ECS Service. + */ +export class PipelineStack extends cdk.Stack { + public readonly tagParameterContainerImage: ecs.TagParameterContainerImage; + + constructor(scope: Construct, id: string, props?: cdk.StackProps) { + super(scope, id, props); + + /* ********** ECS part **************** */ + + // this is the ECR repository where the built Docker image will be pushed + const appEcrRepo = new ecr.Repository(this, 'EcsDeployRepository'); + // the build that creates the Docker image, and pushes it to the ECR repo + const appCodeDockerBuild = new codebuild.PipelineProject(this, 'AppCodeDockerImageBuildAndPushProject', { + environment: { + // we need to run Docker + privileged: true, + }, + buildSpec: codebuild.BuildSpec.fromObject({ + version: '0.2', + phases: { + build: { + commands: [ + // login to ECR first + '$(aws ecr get-login --region $AWS_DEFAULT_REGION --no-include-email)', + // if your application needs any build steps, they would be invoked here + + // build the image, and tag it with the commit hash + // (CODEBUILD_RESOLVED_SOURCE_VERSION is a special environment variable available in CodeBuild) + 'docker build -t $REPOSITORY_URI:$CODEBUILD_RESOLVED_SOURCE_VERSION .', + ], + }, + post_build: { + commands: [ + // push the built image into the ECR repository + 'docker push $REPOSITORY_URI:$CODEBUILD_RESOLVED_SOURCE_VERSION', + // save the declared tag as an environment variable, + // that is then exported below in the 'exported-variables' section as a CodePipeline Variable + 'export imageTag=$CODEBUILD_RESOLVED_SOURCE_VERSION', + ], + }, + }, + env: { + // save the imageTag environment variable as a CodePipeline Variable + 'exported-variables': [ + 'imageTag', + ], + }, + }), + environmentVariables: { + REPOSITORY_URI: { + value: appEcrRepo.repositoryUri, + }, + }, + }); + // needed for `docker push` + appEcrRepo.grantPullPush(appCodeDockerBuild); + // create the ContainerImage used for the ECS application Stack + this.tagParameterContainerImage = new ecs.TagParameterContainerImage(appEcrRepo); + + const cdkCodeBuild = new codebuild.PipelineProject(this, 'CdkCodeBuildProject', { + buildSpec: codebuild.BuildSpec.fromObject({ + version: '0.2', + phases: { + install: { + commands: [ + 'npm install', + ], + }, + build: { + commands: [ + // synthesize the CDK code for the ECS application Stack + 'npx cdk synth --verbose', + ], + }, + }, + artifacts: { + // store the entire Cloud Assembly as the output artifact + 'base-directory': 'cdk.out', + 'files': '**/*', + }, + }), + }); + + /* ********** Pipeline part **************** */ + + const appCodeSourceOutput = new codepipeline.Artifact(); + const cdkCodeSourceOutput = new codepipeline.Artifact(); + const cdkCodeBuildOutput = new codepipeline.Artifact(); + const appCodeBuildAction = new codepipeline_actions.CodeBuildAction({ + actionName: 'AppCodeDockerImageBuildAndPush', + project: appCodeDockerBuild, + input: appCodeSourceOutput, + }); + new codepipeline.Pipeline(this, 'CodePipelineDeployingEcsApplication', { + artifactBucket: new s3.Bucket(this, 'ArtifactBucket', { + removalPolicy: cdk.RemovalPolicy.DESTROY, + }), + stages: [ + { + stageName: 'Source', + actions: [ + // this is the Action that takes the source of your application code + new codepipeline_actions.CodeCommitSourceAction({ + actionName: 'AppCodeSource', + repository: new codecommit.Repository(this, 'AppCodeSourceRepository', { repositoryName: 'AppCodeSourceRepository' }), + output: appCodeSourceOutput, + }), + // this is the Action that takes the source of your CDK code + // (which would probably include this Pipeline code as well) + new codepipeline_actions.CodeCommitSourceAction({ + actionName: 'CdkCodeSource', + repository: new codecommit.Repository(this, 'CdkCodeSourceRepository', { repositoryName: 'CdkCodeSourceRepository' }), + output: cdkCodeSourceOutput, + }), + ], + }, + { + stageName: 'Build', + actions: [ + appCodeBuildAction, + new codepipeline_actions.CodeBuildAction({ + actionName: 'CdkCodeBuildAndSynth', + project: cdkCodeBuild, + input: cdkCodeSourceOutput, + outputs: [cdkCodeBuildOutput], + }), + ], + }, + { + stageName: 'Deploy', + actions: [ + new codepipeline_actions.CloudFormationCreateUpdateStackAction({ + actionName: 'CFN_Deploy', + stackName: 'SampleEcsStackDeployedFromCodePipeline', + // this name has to be the same name as used below in the CDK code for the application Stack + templatePath: cdkCodeBuildOutput.atPath('EcsStackDeployedInPipeline.template.json'), + adminPermissions: true, + parameterOverrides: { + // read the tag pushed to the ECR repository from the CodePipeline Variable saved by the application build step, + // and pass it as the CloudFormation Parameter for the tag + [this.tagParameterContainerImage.tagParameterName]: appCodeBuildAction.variable('imageTag'), + }, + }), + ], + }, + ], + }); + } +} + +const app = new cdk.App(); + +// the CodePipeline Stack needs to be created first +const pipelineStack = new PipelineStack(app, 'aws-cdk-pipeline-ecs-separate-sources'); +// we supply the image to the ECS application Stack from the CodePipeline Stack +new EcsAppStack(app, 'EcsStackDeployedInPipeline', { + image: pipelineStack.tagParameterContainerImage, +}); +/// !hide + +app.synth(); diff --git a/packages/@aws-cdk/aws-ecs/lib/images/tag-parameter-container-image.ts b/packages/@aws-cdk/aws-ecs/lib/images/tag-parameter-container-image.ts new file mode 100644 index 0000000000000..de738d3c562e3 --- /dev/null +++ b/packages/@aws-cdk/aws-ecs/lib/images/tag-parameter-container-image.ts @@ -0,0 +1,48 @@ +import * as ecr from '@aws-cdk/aws-ecr'; +import * as cdk from '@aws-cdk/core'; +import { ContainerDefinition } from '../container-definition'; +import { ContainerImage, ContainerImageConfig } from '../container-image'; + +/** + * A special type of {@link ContainerImage} that uses an ECR repository for the image, + * but a CloudFormation Parameter for the tag of the image in that repository. + * This allows providing this tag through the Parameter at deploy time, + * for example in a CodePipeline that pushes a new tag of the image to the repository during a build step, + * and then provides that new tag through the CloudFormation Parameter in the deploy step. + * + * @see #tagParameterName + */ +export class TagParameterContainerImage extends ContainerImage { + private readonly repository: ecr.IRepository; + private imageTagParameter?: cdk.CfnParameter; + + public constructor(repository: ecr.IRepository) { + super(); + this.repository = repository; + } + + public bind(scope: cdk.Construct, containerDefinition: ContainerDefinition): ContainerImageConfig { + this.repository.grantPull(containerDefinition.taskDefinition.obtainExecutionRole()); + const imageTagParameter = new cdk.CfnParameter(scope, 'ImageTagParam'); + this.imageTagParameter = imageTagParameter; + return { + imageName: this.repository.repositoryUriForTag(imageTagParameter.valueAsString), + }; + } + + /** + * Returns the name of the CloudFormation Parameter that represents the tag of the image + * in the ECR repository. + */ + public get tagParameterName(): string { + return cdk.Lazy.string({ + produce: () => { + if (this.imageTagParameter) { + return this.imageTagParameter.logicalId; + } else { + throw new Error('TagParameterContainerImage must be used in a container definition when using tagParameterName'); + } + }, + }); + } +} diff --git a/packages/@aws-cdk/aws-ecs/lib/index.ts b/packages/@aws-cdk/aws-ecs/lib/index.ts index 6c6ebd10bd3c6..7b16d7be07827 100644 --- a/packages/@aws-cdk/aws-ecs/lib/index.ts +++ b/packages/@aws-cdk/aws-ecs/lib/index.ts @@ -20,6 +20,7 @@ export * from './linux-parameters'; export * from './images/asset-image'; export * from './images/repository'; export * from './images/ecr'; +export * from './images/tag-parameter-container-image'; export * from './log-drivers/aws-log-driver'; export * from './log-drivers/base-log-driver'; diff --git a/packages/@aws-cdk/aws-ecs/test/images/test.tag-parameter-container-image.ts b/packages/@aws-cdk/aws-ecs/test/images/test.tag-parameter-container-image.ts new file mode 100644 index 0000000000000..2a96c471b1417 --- /dev/null +++ b/packages/@aws-cdk/aws-ecs/test/images/test.tag-parameter-container-image.ts @@ -0,0 +1,25 @@ +import { SynthUtils } from '@aws-cdk/assert'; +import * as ecr from '@aws-cdk/aws-ecr'; +import * as cdk from '@aws-cdk/core'; +import { Test } from 'nodeunit'; +import * as ecs from '../../lib'; + +export = { + 'TagParameter container image': { + 'throws an error when tagParameterName() is used without binding the image'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const repository = new ecr.Repository(stack, 'Repository'); + const tagParameterContainerImage = new ecs.TagParameterContainerImage(repository); + new cdk.CfnOutput(stack, 'Output', { + value: tagParameterContainerImage.tagParameterName, + }); + + test.throws(() => { + SynthUtils.synthesize(stack); + }, /TagParameterContainerImage must be used in a container definition when using tagParameterName/); + + test.done(); + }, + }, +}; From cbe7a10053ce0e4e766f360cf8792f0b46c565f0 Mon Sep 17 00:00:00 2001 From: Shiv Lakshminarayan Date: Mon, 7 Dec 2020 15:47:30 -0800 Subject: [PATCH 290/314] feat(codeguruprofiler): the CodeGuru Profiler Construct Library is now Generally Available (stable) (#11924) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-codeguruprofiler/README.md | 12 +----------- packages/@aws-cdk/aws-codeguruprofiler/package.json | 4 ++-- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/packages/@aws-cdk/aws-codeguruprofiler/README.md b/packages/@aws-cdk/aws-codeguruprofiler/README.md index 3d7fb906f537e..09a2ea2d6b731 100644 --- a/packages/@aws-cdk/aws-codeguruprofiler/README.md +++ b/packages/@aws-cdk/aws-codeguruprofiler/README.md @@ -5,17 +5,7 @@ ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. -> -> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib - -![cdk-constructs: Developer Preview](https://img.shields.io/badge/cdk--constructs-developer--preview-informational.svg?style=for-the-badge) - -> The APIs of higher level constructs in this module are in **developer preview** before they -> become stable. We will only make breaking changes to address unforeseen API issues. Therefore, -> these APIs are not subject to [Semantic Versioning](https://semver.org/), and breaking changes -> will be announced in release notes. This means that while you may use them, you may need to -> update your source code when upgrading to a newer version of this package. +![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- diff --git a/packages/@aws-cdk/aws-codeguruprofiler/package.json b/packages/@aws-cdk/aws-codeguruprofiler/package.json index 7a14730452868..e20b324f116dd 100644 --- a/packages/@aws-cdk/aws-codeguruprofiler/package.json +++ b/packages/@aws-cdk/aws-codeguruprofiler/package.json @@ -94,8 +94,8 @@ "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" }, - "stability": "experimental", - "maturity": "developer-preview", + "stability": "stable", + "maturity": "stable", "awscdkio": { "announce": false } From 67ab39e4e377f4478e985287f83e5cf9706ae806 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Tue, 8 Dec 2020 12:55:05 +0100 Subject: [PATCH 291/314] chore(pipelines): test to make sure environment variables behave sanely (#11906) Make sure that environment variables combine correctly and a BuildSpec is still rendered. Relates to #11877. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/pipelines/test/builds.test.ts | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/packages/@aws-cdk/pipelines/test/builds.test.ts b/packages/@aws-cdk/pipelines/test/builds.test.ts index 8b753b5cbdc21..57521eb37c01b 100644 --- a/packages/@aws-cdk/pipelines/test/builds.test.ts +++ b/packages/@aws-cdk/pipelines/test/builds.test.ts @@ -149,6 +149,63 @@ test.each([['npm'], ['yarn']])('%s assumes no build step by default', (npmYarn) }); }); +test('complex setup with environemnt variables still renders correct project', () => { + // WHEN + new TestGitHubNpmPipeline(pipelineStack, 'Cdk', { + sourceArtifact, + cloudAssemblyArtifact, + synthAction: new cdkp.SimpleSynthAction({ + sourceArtifact, + cloudAssemblyArtifact, + environmentVariables: { + SOME_ENV_VAR: { value: 'SomeValue' }, + }, + environment: { + environmentVariables: { + INNER_VAR: { value: 'InnerValue' }, + }, + privileged: true, + }, + installCommands: [ + 'install1', + 'install2', + ], + synthCommand: 'synth', + }), + }); + + // THEN + expect(pipelineStack).toHaveResourceLike('AWS::CodeBuild::Project', { + Environment: objectLike({ + PrivilegedMode: true, + EnvironmentVariables: [ + { + Name: 'INNER_VAR', + Type: 'PLAINTEXT', + Value: 'InnerValue', + }, + { + Name: 'SOME_ENV_VAR', + Type: 'PLAINTEXT', + Value: 'SomeValue', + }, + ], + }), + Source: { + BuildSpec: encodedJson(deepObjectLike({ + phases: { + pre_build: { + commands: ['install1', 'install2'], + }, + build: { + commands: ['synth'], + }, + }, + })), + }, + }); +}); + test.each([['npm'], ['yarn']])('%s can have its install command overridden', (npmYarn) => { // WHEN new TestGitHubNpmPipeline(pipelineStack, 'Cdk', { From ae2e9c1a40070509e2fb5a95de8881906b500546 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Tue, 8 Dec 2020 17:28:25 +0100 Subject: [PATCH 292/314] chore: use "canned metrics" obtained from CloudWatch Explorer (#11717) CloudWatch Explorer is a new service who have been collecting a set of metrics emitted by various services. Integrate this model and use to generate convenience methods that are aware of per-metric dimensions and suggested default statistics. We switch over to these metrics to a get second source of confirmation that we have the dimensions correct. We can't do complete code generation off of this model yet. Adds a README document that explains why. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-apigateway/lib/restapi.ts | 41 +- .../@aws-cdk/aws-apigatewayv2/lib/http/api.ts | 32 +- .../@aws-cdk/aws-cloudwatch/lib/metric.ts | 3 +- .../@aws-cdk/aws-codebuild/lib/project.ts | 36 +- packages/@aws-cdk/aws-dynamodb/lib/table.ts | 40 +- packages/@aws-cdk/aws-ecs/lib/cluster.ts | 32 +- .../lib/alb/application-load-balancer.ts | 74 +- .../lib/alb/application-target-group.ts | 23 +- .../lib/nlb/network-load-balancer.ts | 51 +- .../@aws-cdk/aws-elasticsearch/lib/domain.ts | 3 +- .../aws-stepfunctions/lib/activity.ts | 28 +- .../aws-stepfunctions/lib/state-machine.ts | 35 +- .../@aws-cdk/aws-synthetics/lib/canary.ts | 40 +- .../cfnspec/build-tools/update-metrics.sh | 13 + .../@aws-cdk/cfnspec/lib/canned-metrics.ts | 121 + .../cfnspec/lib/canned-metrics/README.md | 163 + .../canned-metrics/canned-metrics-schema.ts | 74 + .../cfnspec/lib/canned-metrics/services.json | 22175 ++++++++++++++++ packages/@aws-cdk/cfnspec/lib/index.ts | 1 + packages/@aws-cdk/cfnspec/package.json | 1 + .../cfnspec/test/test.canned-metrics.ts | 40 + tools/cfn2ts/lib/augmentation-generator.ts | 29 + tools/cfn2ts/lib/canned-metrics-generator.ts | 126 + tools/cfn2ts/lib/index.ts | 6 + 24 files changed, 22996 insertions(+), 191 deletions(-) create mode 100755 packages/@aws-cdk/cfnspec/build-tools/update-metrics.sh create mode 100644 packages/@aws-cdk/cfnspec/lib/canned-metrics.ts create mode 100644 packages/@aws-cdk/cfnspec/lib/canned-metrics/README.md create mode 100644 packages/@aws-cdk/cfnspec/lib/canned-metrics/canned-metrics-schema.ts create mode 100644 packages/@aws-cdk/cfnspec/lib/canned-metrics/services.json create mode 100644 packages/@aws-cdk/cfnspec/test/test.canned-metrics.ts create mode 100644 tools/cfn2ts/lib/canned-metrics-generator.ts diff --git a/packages/@aws-cdk/aws-apigateway/lib/restapi.ts b/packages/@aws-cdk/aws-apigateway/lib/restapi.ts index af2e0b2b3da01..0911c92dda94b 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/restapi.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/restapi.ts @@ -5,6 +5,7 @@ import { CfnOutput, IResource as IResourceBase, Resource, Stack } from '@aws-cdk import { Construct } from 'constructs'; import { ApiDefinition } from './api-definition'; import { ApiKey, ApiKeyOptions, IApiKey } from './api-key'; +import { ApiGatewayMetrics } from './apigateway-canned-metrics.generated'; import { CfnAccount, CfnRestApi } from './apigateway.generated'; import { CorsOptions } from './cors'; import { Deployment } from './deployment'; @@ -397,63 +398,66 @@ export abstract class RestApiBase extends Resource implements IRestApi { metricName, dimensions: { ApiName: this.restApiName }, ...props, - }); + }).attachTo(this); } /** * Metric for the number of client-side errors captured in a given period. * - * @default - sum over 5 minutes + * Default: sum over 5 minutes */ public metricClientError(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('4XXError', { statistic: 'Sum', ...props }); + return this.cannedMetric(ApiGatewayMetrics._4XxErrorSum, props); } /** * Metric for the number of server-side errors captured in a given period. * - * @default - sum over 5 minutes + * Default: sum over 5 minutes */ public metricServerError(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('5XXError', { statistic: 'Sum', ...props }); + return this.cannedMetric(ApiGatewayMetrics._5XxErrorSum, props); } /** * Metric for the number of requests served from the API cache in a given period. * - * @default - sum over 5 minutes + * Default: sum over 5 minutes */ public metricCacheHitCount(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('CacheHitCount', { statistic: 'Sum', ...props }); + return this.cannedMetric(ApiGatewayMetrics.cacheHitCountSum, props); } /** * Metric for the number of requests served from the backend in a given period, * when API caching is enabled. * - * @default - sum over 5 minutes + * Default: sum over 5 minutes */ public metricCacheMissCount(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('CacheMissCount', { statistic: 'Sum', ...props }); + return this.cannedMetric(ApiGatewayMetrics.cacheMissCountSum, props); } /** * Metric for the total number API requests in a given period. * - * @default - SampleCount over 5 minutes + * Default: samplecount over 5 minutes */ public metricCount(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('Count', { statistic: 'SampleCount', ...props }); + return this.cannedMetric(ApiGatewayMetrics.countSum, { + statistic: 'SampleCount', + ...props, + }); } /** * Metric for the time between when API Gateway relays a request to the backend * and when it receives a response from the backend. * - * @default - no statistic + * Default: average over 5 minutes. */ public metricIntegrationLatency(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('IntegrationLatency', props); + return this.cannedMetric(ApiGatewayMetrics.integrationLatencyAverage, props); } /** @@ -461,10 +465,10 @@ export abstract class RestApiBase extends Resource implements IRestApi { * and when it returns a response to the client. * The latency includes the integration latency and other API Gateway overhead. * - * @default - no statistic + * Default: average over 5 minutes. */ public metricLatency(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('Latency', props); + return this.cannedMetric(ApiGatewayMetrics.latencyAverage, props); } /** @@ -544,6 +548,13 @@ export abstract class RestApiBase extends Resource implements IRestApi { } return undefined; } + + private cannedMetric(fn: (dims: { ApiName: string }) => cloudwatch.MetricProps, props?: cloudwatch.MetricOptions) { + return new cloudwatch.Metric({ + ...fn({ ApiName: this.restApiName }), + ...props, + }).attachTo(this); + } } /** diff --git a/packages/@aws-cdk/aws-apigatewayv2/lib/http/api.ts b/packages/@aws-cdk/aws-apigatewayv2/lib/http/api.ts index 3bc5f47676339..f3a042f06512f 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/lib/http/api.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/lib/http/api.ts @@ -1,4 +1,4 @@ -import { Metric, MetricOptions } from '@aws-cdk/aws-cloudwatch'; +import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; import { Duration, IResource, Resource } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnApi, CfnApiProps } from '../apigatewayv2.generated'; @@ -28,35 +28,35 @@ export interface IHttpApi extends IResource { * * @default - average over 5 minutes */ - metric(metricName: string, props?: MetricOptions): Metric; + metric(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric; /** * Metric for the number of client-side errors captured in a given period. * * @default - sum over 5 minutes */ - metricClientError(props?: MetricOptions): Metric; + metricClientError(props?: cloudwatch.MetricOptions): cloudwatch.Metric; /** * Metric for the number of server-side errors captured in a given period. * * @default - sum over 5 minutes */ - metricServerError(props?: MetricOptions): Metric; + metricServerError(props?: cloudwatch.MetricOptions): cloudwatch.Metric; /** * Metric for the amount of data processed in bytes. * * @default - sum over 5 minutes */ - metricDataProcessed(props?: MetricOptions): Metric; + metricDataProcessed(props?: cloudwatch.MetricOptions): cloudwatch.Metric; /** * Metric for the total number API requests in a given period. * * @default - SampleCount over 5 minutes */ - metricCount(props?: MetricOptions): Metric; + metricCount(props?: cloudwatch.MetricOptions): cloudwatch.Metric; /** * Metric for the time between when API Gateway relays a request to the backend @@ -64,7 +64,7 @@ export interface IHttpApi extends IResource { * * @default - no statistic */ - metricIntegrationLatency(props?: MetricOptions): Metric; + metricIntegrationLatency(props?: cloudwatch.MetricOptions): cloudwatch.Metric; /** * The time between when API Gateway receives a request from a client @@ -73,7 +73,7 @@ export interface IHttpApi extends IResource { * * @default - no statistic */ - metricLatency(props?: MetricOptions): Metric; + metricLatency(props?: cloudwatch.MetricOptions): cloudwatch.Metric; /** * Add a new VpcLink @@ -186,8 +186,8 @@ abstract class HttpApiBase extends Resource implements IHttpApi { // note that t public abstract readonly httpApiId: string; private vpcLinks: Record = {}; - public metric(metricName: string, props?: MetricOptions): Metric { - return new Metric({ + public metric(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return new cloudwatch.Metric({ namespace: 'AWS/ApiGateway', metricName, dimensions: { ApiId: this.httpApiId }, @@ -195,27 +195,27 @@ abstract class HttpApiBase extends Resource implements IHttpApi { // note that t }).attachTo(this); } - public metricClientError(props?: MetricOptions): Metric { + public metricClientError(props?: cloudwatch.MetricOptions): cloudwatch.Metric { return this.metric('4XXError', { statistic: 'Sum', ...props }); } - public metricServerError(props?: MetricOptions): Metric { + public metricServerError(props?: cloudwatch.MetricOptions): cloudwatch.Metric { return this.metric('5XXError', { statistic: 'Sum', ...props }); } - public metricDataProcessed(props?: MetricOptions): Metric { + public metricDataProcessed(props?: cloudwatch.MetricOptions): cloudwatch.Metric { return this.metric('DataProcessed', { statistic: 'Sum', ...props }); } - public metricCount(props?: MetricOptions): Metric { + public metricCount(props?: cloudwatch.MetricOptions): cloudwatch.Metric { return this.metric('Count', { statistic: 'SampleCount', ...props }); } - public metricIntegrationLatency(props?: MetricOptions): Metric { + public metricIntegrationLatency(props?: cloudwatch.MetricOptions): cloudwatch.Metric { return this.metric('IntegrationLatency', props); } - public metricLatency(props?: MetricOptions): Metric { + public metricLatency(props?: cloudwatch.MetricOptions): cloudwatch.Metric { return this.metric('Latency', props); } diff --git a/packages/@aws-cdk/aws-cloudwatch/lib/metric.ts b/packages/@aws-cdk/aws-cloudwatch/lib/metric.ts index e554edf80cc8d..3cc51050341b0 100644 --- a/packages/@aws-cdk/aws-cloudwatch/lib/metric.ts +++ b/packages/@aws-cdk/aws-cloudwatch/lib/metric.ts @@ -1,5 +1,6 @@ import * as iam from '@aws-cdk/aws-iam'; import * as cdk from '@aws-cdk/core'; +import * as constructs from 'constructs'; import { Alarm, ComparisonOperator, TreatMissingData } from './alarm'; import { Dimension, IMetric, MetricAlarmConfig, MetricConfig, MetricGraphConfig, Unit } from './metric-types'; import { dispatchMetric, metricKey } from './private/metric-util'; @@ -272,7 +273,7 @@ export class Metric implements IMetric { * If the scope we attach to is in an environment-agnostic stack, * nothing is done and the same Metric object is returned. */ - public attachTo(scope: cdk.Construct): Metric { + public attachTo(scope: constructs.IConstruct): Metric { const stack = cdk.Stack.of(scope); return this.with({ diff --git a/packages/@aws-cdk/aws-codebuild/lib/project.ts b/packages/@aws-cdk/aws-codebuild/lib/project.ts index 75c3b79f76b66..1e0950d5fd22a 100644 --- a/packages/@aws-cdk/aws-codebuild/lib/project.ts +++ b/packages/@aws-cdk/aws-codebuild/lib/project.ts @@ -12,6 +12,7 @@ import { Construct } from 'constructs'; import { IArtifacts } from './artifacts'; import { BuildSpec } from './build-spec'; import { Cache } from './cache'; +import { CodeBuildMetrics } from './codebuild-canned-metrics.generated'; import { CfnProject } from './codebuild.generated'; import { CodePipelineArtifacts } from './codepipeline-artifacts'; import { IFileSystemLocation } from './file-location'; @@ -340,11 +341,8 @@ abstract class ProjectBase extends Resource implements IProject { * * @default sum over 5 minutes */ - public metricBuilds(props?: cloudwatch.MetricOptions) { - return this.metric('Builds', { - statistic: 'sum', - ...props, - }); + public metricBuilds(props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return this.cannedMetric(CodeBuildMetrics.buildsSum, props); } /** @@ -356,11 +354,8 @@ abstract class ProjectBase extends Resource implements IProject { * * @default average over 5 minutes */ - public metricDuration(props?: cloudwatch.MetricOptions) { - return this.metric('Duration', { - statistic: 'avg', - ...props, - }); + public metricDuration(props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return this.cannedMetric(CodeBuildMetrics.durationAverage, props); } /** @@ -372,11 +367,8 @@ abstract class ProjectBase extends Resource implements IProject { * * @default sum over 5 minutes */ - public metricSucceededBuilds(props?: cloudwatch.MetricOptions) { - return this.metric('SucceededBuilds', { - statistic: 'sum', - ...props, - }); + public metricSucceededBuilds(props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return this.cannedMetric(CodeBuildMetrics.succeededBuildsSum, props); } /** @@ -389,11 +381,17 @@ abstract class ProjectBase extends Resource implements IProject { * * @default sum over 5 minutes */ - public metricFailedBuilds(props?: cloudwatch.MetricOptions) { - return this.metric('FailedBuilds', { - statistic: 'sum', + public metricFailedBuilds(props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return this.cannedMetric(CodeBuildMetrics.failedBuildsSum, props); + } + + private cannedMetric( + fn: (dims: { ProjectName: string }) => cloudwatch.MetricProps, + props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return new cloudwatch.Metric({ + ...fn({ ProjectName: this.projectName }), ...props, - }); + }).attachTo(this); } } diff --git a/packages/@aws-cdk/aws-dynamodb/lib/table.ts b/packages/@aws-cdk/aws-dynamodb/lib/table.ts index 780d240abbc55..4e8ebec509439 100644 --- a/packages/@aws-cdk/aws-dynamodb/lib/table.ts +++ b/packages/@aws-cdk/aws-dynamodb/lib/table.ts @@ -7,6 +7,7 @@ import { IResource, Lazy, Names, RemovalPolicy, Resource, Stack, Token, } from '@aws-cdk/core'; import { Construct } from 'constructs'; +import { DynamoDBMetrics } from './dynamodb-canned-metrics.generated'; import { CfnTable, CfnTableProps } from './dynamodb.generated'; import * as perms from './perms'; import { ReplicaProvider } from './replica-provider'; @@ -459,7 +460,6 @@ export interface ITable extends IResource { * */ metricSuccessfulRequestLatency(props?: cloudwatch.MetricOptions): cloudwatch.Metric; - } /** @@ -692,7 +692,7 @@ abstract class TableBase extends Resource implements ITable { TableName: this.tableName, }, ...props, - }); + }).attachTo(this); } /** @@ -702,7 +702,7 @@ abstract class TableBase extends Resource implements ITable { * You can customize this by using the `statistic` and `period` properties. */ public metricConsumedReadCapacityUnits(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('ConsumedReadCapacityUnits', { statistic: 'sum', ...props }); + return this.cannedMetric(DynamoDBMetrics.consumedReadCapacityUnitsSum, props); } /** @@ -712,7 +712,7 @@ abstract class TableBase extends Resource implements ITable { * You can customize this by using the `statistic` and `period` properties. */ public metricConsumedWriteCapacityUnits(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('ConsumedWriteCapacityUnits', { statistic: 'sum', ...props }); + return this.cannedMetric(DynamoDBMetrics.consumedWriteCapacityUnitsSum, props); } /** @@ -721,7 +721,6 @@ abstract class TableBase extends Resource implements ITable { * @deprecated use `metricSystemErrorsForOperations`. */ public metricSystemErrors(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - if (!props?.dimensions?.Operation) { // 'Operation' must be passed because its an operational metric. throw new Error("'Operation' dimension must be passed for the 'SystemErrors' metric."); @@ -743,7 +742,6 @@ abstract class TableBase extends Resource implements ITable { * You can customize this by using the `statistic` and `period` properties. */ public metricUserErrors(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - if (props?.dimensions) { throw new Error("'dimensions' is not supported for the 'UserErrors' metric"); } @@ -763,25 +761,36 @@ abstract class TableBase extends Resource implements ITable { return this.metric('ConditionalCheckFailedRequests', { statistic: 'sum', ...props }); } + /** + * How many requests are throttled on this table + * + * Default: sum over 5 minutes + */ + public metricThrottledRequests(props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return this.cannedMetric(DynamoDBMetrics.throttledRequestsSum, props); + } + /** * Metric for the successful request latency this table. * * By default, the metric will be calculated as an average over a period of 5 minutes. * You can customize this by using the `statistic` and `period` properties. - * */ public metricSuccessfulRequestLatency(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - if (!props?.dimensions?.Operation) { throw new Error("'Operation' dimension must be passed for the 'SuccessfulRequestLatency' metric."); } const dimensions = { TableName: this.tableName, - ...props?.dimensions ?? {}, + Operation: props.dimensions.Operation, }; - return this.metric('SuccessfulRequestLatency', { statistic: 'avg', ...props, dimensions }); + return new cloudwatch.Metric({ + ...DynamoDBMetrics.successfulRequestLatencyAverage(dimensions), + ...props, + dimensions, + }).attachTo(this); } /** @@ -904,6 +913,15 @@ abstract class TableBase extends Resource implements ITable { } throw new Error(`Unexpected 'action', ${ opts.tableActions || opts.streamActions }`); } + + private cannedMetric( + fn: (dims: { TableName: string }) => cloudwatch.MetricProps, + props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return new cloudwatch.Metric({ + ...fn({ TableName: this.tableName }), + ...props, + }).attachTo(this); + } } /** @@ -1647,4 +1665,4 @@ class SourceTableAttachedPrincipal extends iam.PrincipalBase { statementAdded: true, }; } -} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/lib/cluster.ts b/packages/@aws-cdk/aws-ecs/lib/cluster.ts index 802223b0a925d..1ae92f0abd4fc 100644 --- a/packages/@aws-cdk/aws-ecs/lib/cluster.ts +++ b/packages/@aws-cdk/aws-ecs/lib/cluster.ts @@ -8,6 +8,7 @@ import * as ssm from '@aws-cdk/aws-ssm'; import { Duration, IResource, Resource, Stack } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { InstanceDrainHook } from './drain-hook/instance-drain-hook'; +import { ECSMetrics } from './ecs-canned-metrics.generated'; import { CfnCluster } from './ecs.generated'; // v2 - keep this import as a separate section to reduce merge conflict when forward merging with the v2 branch. @@ -331,7 +332,16 @@ export class Cluster extends Resource implements ICluster { * @default average over 5 minutes */ public metricCpuReservation(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('CPUReservation', props); + return this.cannedMetric(ECSMetrics.cpuReservationAverage, props); + } + + /** + * This method returns the CloudWatch metric for this clusters CPU utilization. + * + * @default average over 5 minutes + */ + public metricCpuUtilization(props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return this.cannedMetric(ECSMetrics.cpuUtilizationAverage, props); } /** @@ -340,7 +350,16 @@ export class Cluster extends Resource implements ICluster { * @default average over 5 minutes */ public metricMemoryReservation(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('MemoryReservation', props); + return this.cannedMetric(ECSMetrics.memoryReservationAverage, props); + } + + /** + * This method returns the CloudWatch metric for this clusters memory utilization. + * + * @default average over 5 minutes + */ + public metricMemoryUtilization(props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return this.cannedMetric(ECSMetrics.memoryUtilizationAverage, props); } /** @@ -354,6 +373,15 @@ export class Cluster extends Resource implements ICluster { ...props, }).attachTo(this); } + + private cannedMetric( + fn: (dims: { ClusterName: string }) => cloudwatch.MetricProps, + props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return new cloudwatch.Metric({ + ...fn({ ClusterName: this.clusterName }), + ...props, + }).attachTo(this); + } } /** diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts index d3b428094a344..8f0ccf963cc5b 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts @@ -4,6 +4,7 @@ import * as cxschema from '@aws-cdk/cloud-assembly-schema'; import { Duration, Lazy, Names, Resource } from '@aws-cdk/core'; import * as cxapi from '@aws-cdk/cx-api'; import { Construct } from 'constructs'; +import { ApplicationELBMetrics } from '../elasticloadbalancingv2-canned-metrics.generated'; import { BaseLoadBalancer, BaseLoadBalancerLookupOptions, BaseLoadBalancerProps, ILoadBalancerV2 } from '../shared/base-load-balancer'; import { IpAddressType, ApplicationProtocol } from '../shared/enums'; import { ApplicationListener, BaseApplicationListenerProps } from './application-listener'; @@ -155,10 +156,7 @@ export class ApplicationLoadBalancer extends BaseLoadBalancer implements IApplic * @default Sum over 5 minutes */ public metricActiveConnectionCount(props?: cloudwatch.MetricOptions) { - return this.metric('ActiveConnectionCount', { - statistic: 'sum', - ...props, - }); + return this.cannedMetric(ApplicationELBMetrics.activeConnectionCountSum, props); } /** @@ -169,10 +167,7 @@ export class ApplicationLoadBalancer extends BaseLoadBalancer implements IApplic * @default Sum over 5 minutes */ public metricClientTlsNegotiationErrorCount(props?: cloudwatch.MetricOptions) { - return this.metric('ClientTLSNegotiationErrorCount', { - statistic: 'sum', - ...props, - }); + return this.cannedMetric(ApplicationELBMetrics.clientTlsNegotiationErrorCountSum, props); } /** @@ -181,7 +176,7 @@ export class ApplicationLoadBalancer extends BaseLoadBalancer implements IApplic * @default Sum over 5 minutes */ public metricConsumedLCUs(props?: cloudwatch.MetricOptions) { - return this.metric('ConsumedLCUs', { + return this.cannedMetric(ApplicationELBMetrics.consumedLcUsAverage, { statistic: 'sum', ...props, }); @@ -193,10 +188,7 @@ export class ApplicationLoadBalancer extends BaseLoadBalancer implements IApplic * @default Sum over 5 minutes */ public metricHttpFixedResponseCount(props?: cloudwatch.MetricOptions) { - return this.metric('HTTP_Fixed_Response_Count', { - statistic: 'Sum', - ...props, - }); + return this.cannedMetric(ApplicationELBMetrics.httpFixedResponseCountSum, props); } /** @@ -205,10 +197,7 @@ export class ApplicationLoadBalancer extends BaseLoadBalancer implements IApplic * @default Sum over 5 minutes */ public metricHttpRedirectCount(props?: cloudwatch.MetricOptions) { - return this.metric('HTTP_Redirect_Count', { - statistic: 'Sum', - ...props, - }); + return this.cannedMetric(ApplicationELBMetrics.httpRedirectCountSum, props); } /** @@ -218,10 +207,7 @@ export class ApplicationLoadBalancer extends BaseLoadBalancer implements IApplic * @default Sum over 5 minutes */ public metricHttpRedirectUrlLimitExceededCount(props?: cloudwatch.MetricOptions) { - return this.metric('HTTP_Redirect_Url_Limit_Exceeded_Count', { - statistic: 'Sum', - ...props, - }); + return this.cannedMetric(ApplicationELBMetrics.httpRedirectUrlLimitExceededCountSum, props); } /** @@ -259,10 +245,7 @@ export class ApplicationLoadBalancer extends BaseLoadBalancer implements IApplic * @default Sum over 5 minutes */ public metricIpv6ProcessedBytes(props?: cloudwatch.MetricOptions) { - return this.metric('IPv6ProcessedBytes', { - statistic: 'Sum', - ...props, - }); + return this.cannedMetric(ApplicationELBMetrics.iPv6ProcessedBytesSum, props); } /** @@ -271,10 +254,7 @@ export class ApplicationLoadBalancer extends BaseLoadBalancer implements IApplic * @default Sum over 5 minutes */ public metricIpv6RequestCount(props?: cloudwatch.MetricOptions) { - return this.metric('IPv6RequestCount', { - statistic: 'Sum', - ...props, - }); + return this.cannedMetric(ApplicationELBMetrics.iPv6RequestCountSum, props); } /** @@ -284,10 +264,7 @@ export class ApplicationLoadBalancer extends BaseLoadBalancer implements IApplic * @default Sum over 5 minutes */ public metricNewConnectionCount(props?: cloudwatch.MetricOptions) { - return this.metric('NewConnectionCount', { - statistic: 'Sum', - ...props, - }); + return this.cannedMetric(ApplicationELBMetrics.newConnectionCountSum, props); } /** @@ -296,10 +273,7 @@ export class ApplicationLoadBalancer extends BaseLoadBalancer implements IApplic * @default Sum over 5 minutes */ public metricProcessedBytes(props?: cloudwatch.MetricOptions) { - return this.metric('ProcessedBytes', { - statistic: 'Sum', - ...props, - }); + return this.cannedMetric(ApplicationELBMetrics.processedBytesSum, props); } /** @@ -309,10 +283,7 @@ export class ApplicationLoadBalancer extends BaseLoadBalancer implements IApplic * @default Sum over 5 minutes */ public metricRejectedConnectionCount(props?: cloudwatch.MetricOptions) { - return this.metric('RejectedConnectionCount', { - statistic: 'Sum', - ...props, - }); + return this.cannedMetric(ApplicationELBMetrics.rejectedConnectionCountSum, props); } /** @@ -323,10 +294,7 @@ export class ApplicationLoadBalancer extends BaseLoadBalancer implements IApplic * @default Sum over 5 minutes */ public metricRequestCount(props?: cloudwatch.MetricOptions) { - return this.metric('RequestCount', { - statistic: 'Sum', - ...props, - }); + return this.cannedMetric(ApplicationELBMetrics.requestCountSum, props); } /** @@ -335,10 +303,7 @@ export class ApplicationLoadBalancer extends BaseLoadBalancer implements IApplic * @default Sum over 5 minutes */ public metricRuleEvaluations(props?: cloudwatch.MetricOptions) { - return this.metric('RuleEvaluations', { - statistic: 'Sum', - ...props, - }); + return this.cannedMetric(ApplicationELBMetrics.ruleEvaluationsSum, props); } /** @@ -437,6 +402,15 @@ export class ApplicationLoadBalancer extends BaseLoadBalancer implements IApplic ...props, }); } + + private cannedMetric( + fn: (dims: { LoadBalancer: string }) => cloudwatch.MetricProps, + props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return new cloudwatch.Metric({ + ...fn({ LoadBalancer: this.loadBalancerFullName }), + ...props, + }).attachTo(this); + } } /** @@ -691,4 +665,4 @@ export interface ApplicationLoadBalancerRedirectConfig { */ readonly targetPort?: number; -} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-target-group.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-target-group.ts index 915711cf0e185..a457878c63bb9 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-target-group.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-target-group.ts @@ -2,6 +2,7 @@ import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; import * as ec2 from '@aws-cdk/aws-ec2'; import { Annotations, Construct as CoreConstruct, Duration } from '@aws-cdk/core'; import { IConstruct, Construct } from 'constructs'; +import { ApplicationELBMetrics } from '../elasticloadbalancingv2-canned-metrics.generated'; import { BaseTargetGroupProps, ITargetGroup, loadBalancerNameFromListenerArn, LoadBalancerTargetProps, TargetGroupAttributes, TargetGroupBase, TargetGroupImportProps, @@ -201,10 +202,7 @@ export class ApplicationTargetGroup extends TargetGroupBase implements IApplicat * @default Sum over 5 minutes */ public metricIpv6RequestCount(props?: cloudwatch.MetricOptions) { - return this.metric('IPv6RequestCount', { - statistic: 'Sum', - ...props, - }); + return this.cannedMetric(ApplicationELBMetrics.iPv6RequestCountSum, props); } /** @@ -215,10 +213,7 @@ export class ApplicationTargetGroup extends TargetGroupBase implements IApplicat * @default Sum over 5 minutes */ public metricRequestCount(props?: cloudwatch.MetricOptions) { - return this.metric('RequestCount', { - statistic: 'Sum', - ...props, - }); + return this.cannedMetric(ApplicationELBMetrics.requestCountSum, props); } /** @@ -328,6 +323,18 @@ export class ApplicationTargetGroup extends TargetGroupBase implements IApplicat return ret; } + + private cannedMetric( + fn: (dims: { LoadBalancer: string, TargetGroup: string }) => cloudwatch.MetricProps, + props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return new cloudwatch.Metric({ + ...fn({ + LoadBalancer: this.firstLoadBalancerFullName, + TargetGroup: this.targetGroupFullName, + }), + ...props, + }).attachTo(this); + } } /** diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-load-balancer.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-load-balancer.ts index 74dd1f060509f..d6f7858114102 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-load-balancer.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-load-balancer.ts @@ -6,6 +6,7 @@ import * as cxschema from '@aws-cdk/cloud-assembly-schema'; import { Resource } from '@aws-cdk/core'; import * as cxapi from '@aws-cdk/cx-api'; import { Construct } from 'constructs'; +import { NetworkELBMetrics } from '../elasticloadbalancingv2-canned-metrics.generated'; import { BaseLoadBalancer, BaseLoadBalancerLookupOptions, BaseLoadBalancerProps, ILoadBalancerV2 } from '../shared/base-load-balancer'; import { BaseNetworkListenerProps, NetworkListener } from './network-listener'; @@ -183,8 +184,8 @@ export class NetworkLoadBalancer extends BaseLoadBalancer implements INetworkLoa * @default Average over 5 minutes */ public metricActiveFlowCount(props?: cloudwatch.MetricOptions) { - return this.metric('ActiveFlowCount', { - statistic: 'Average', + return this.cannedMetric(NetworkELBMetrics.activeFlowCountSum, { + statistic: 'Average', // Doesn't make sense to me but backwards compatibility and all that ...props, }); } @@ -195,7 +196,7 @@ export class NetworkLoadBalancer extends BaseLoadBalancer implements INetworkLoa * @default Sum over 5 minutes */ public metricConsumedLCUs(props?: cloudwatch.MetricOptions) { - return this.metric('ConsumedLCUs', { + return this.cannedMetric(NetworkELBMetrics.consumedLcUsAverage, { statistic: 'Sum', ...props, }); @@ -208,10 +209,7 @@ export class NetworkLoadBalancer extends BaseLoadBalancer implements INetworkLoa * @deprecated use ``NetworkTargetGroup.metricHealthyHostCount`` instead */ public metricHealthyHostCount(props?: cloudwatch.MetricOptions) { - return this.metric('HealthyHostCount', { - statistic: 'Average', - ...props, - }); + return this.cannedMetric(NetworkELBMetrics.healthyHostCountAverage, props); } /** @@ -221,10 +219,7 @@ export class NetworkLoadBalancer extends BaseLoadBalancer implements INetworkLoa * @deprecated use ``NetworkTargetGroup.metricUnHealthyHostCount`` instead */ public metricUnHealthyHostCount(props?: cloudwatch.MetricOptions) { - return this.metric('UnHealthyHostCount', { - statistic: 'Average', - ...props, - }); + return this.cannedMetric(NetworkELBMetrics.unHealthyHostCountAverage, props); } /** @@ -233,10 +228,7 @@ export class NetworkLoadBalancer extends BaseLoadBalancer implements INetworkLoa * @default Sum over 5 minutes */ public metricNewFlowCount(props?: cloudwatch.MetricOptions) { - return this.metric('NewFlowCount', { - statistic: 'Sum', - ...props, - }); + return this.cannedMetric(NetworkELBMetrics.newFlowCountSum, props); } /** @@ -245,10 +237,7 @@ export class NetworkLoadBalancer extends BaseLoadBalancer implements INetworkLoa * @default Sum over 5 minutes */ public metricProcessedBytes(props?: cloudwatch.MetricOptions) { - return this.metric('ProcessedBytes', { - statistic: 'Sum', - ...props, - }); + return this.cannedMetric(NetworkELBMetrics.processedBytesSum, props); } /** @@ -259,10 +248,7 @@ export class NetworkLoadBalancer extends BaseLoadBalancer implements INetworkLoa * @default Sum over 5 minutes */ public metricTcpClientResetCount(props?: cloudwatch.MetricOptions) { - return this.metric('TCP_Client_Reset_Count', { - statistic: 'Sum', - ...props, - }); + return this.cannedMetric(NetworkELBMetrics.tcpClientResetCountSum, props); } /** @@ -271,10 +257,7 @@ export class NetworkLoadBalancer extends BaseLoadBalancer implements INetworkLoa * @default Sum over 5 minutes */ public metricTcpElbResetCount(props?: cloudwatch.MetricOptions) { - return this.metric('TCP_ELB_Reset_Count', { - statistic: 'Sum', - ...props, - }); + return this.cannedMetric(NetworkELBMetrics.tcpElbResetCountSum, props); } /** @@ -285,10 +268,16 @@ export class NetworkLoadBalancer extends BaseLoadBalancer implements INetworkLoa * @default Sum over 5 minutes */ public metricTcpTargetResetCount(props?: cloudwatch.MetricOptions) { - return this.metric('TCP_Target_Reset_Count', { - statistic: 'Sum', + return this.cannedMetric(NetworkELBMetrics.tcpTargetResetCountSum, props); + } + + private cannedMetric( + fn: (dims: { LoadBalancer: string }) => cloudwatch.MetricProps, + props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return new cloudwatch.Metric({ + ...fn({ LoadBalancer: this.loadBalancerFullName }), ...props, - }); + }).attachTo(this); } } @@ -334,4 +323,4 @@ class LookedUpNetworkLoadBalancer extends Resource implements INetworkLoadBalanc ...props, }); } -} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticsearch/lib/domain.ts b/packages/@aws-cdk/aws-elasticsearch/lib/domain.ts index 42e50714bdad8..1016d7e065da0 100644 --- a/packages/@aws-cdk/aws-elasticsearch/lib/domain.ts +++ b/packages/@aws-cdk/aws-elasticsearch/lib/domain.ts @@ -871,7 +871,7 @@ abstract class DomainBase extends cdk.Resource implements IDomain { ClientId: this.stack.account, }, ...props, - }); + }).attachTo(this); } /** @@ -1067,6 +1067,7 @@ abstract class DomainBase extends cdk.Resource implements IDomain { return grant; } + } diff --git a/packages/@aws-cdk/aws-stepfunctions/lib/activity.ts b/packages/@aws-cdk/aws-stepfunctions/lib/activity.ts index 2d5d423a930b7..3f474c93d7a1d 100644 --- a/packages/@aws-cdk/aws-stepfunctions/lib/activity.ts +++ b/packages/@aws-cdk/aws-stepfunctions/lib/activity.ts @@ -2,6 +2,7 @@ import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; import * as iam from '@aws-cdk/aws-iam'; import { IResource, Lazy, Names, Resource, Stack } from '@aws-cdk/core'; import { Construct } from 'constructs'; +import { StatesMetrics } from './stepfunctions-canned-metrics.generated'; import { CfnActivity } from './stepfunctions.generated'; /** @@ -110,7 +111,7 @@ export class Activity extends Resource implements IActivity { * @default average over 5 minutes */ public metricRunTime(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('ActivityRunTime', { statistic: 'avg', ...props }); + return this.cannedMetric(StatesMetrics.activityRunTimeAverage, props); } /** @@ -119,7 +120,7 @@ export class Activity extends Resource implements IActivity { * @default average over 5 minutes */ public metricScheduleTime(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('ActivityScheduleTime', { statistic: 'avg', ...props }); + return this.cannedMetric(StatesMetrics.activityScheduleTimeAverage, props); } /** @@ -128,7 +129,7 @@ export class Activity extends Resource implements IActivity { * @default average over 5 minutes */ public metricTime(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('ActivityTime', { statistic: 'avg', ...props }); + return this.cannedMetric(StatesMetrics.activityTimeAverage, props); } /** @@ -137,7 +138,7 @@ export class Activity extends Resource implements IActivity { * @default sum over 5 minutes */ public metricScheduled(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('ActivitiesScheduled', props); + return this.cannedMetric(StatesMetrics.activitiesScheduledSum, props); } /** @@ -146,7 +147,7 @@ export class Activity extends Resource implements IActivity { * @default sum over 5 minutes */ public metricTimedOut(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('ActivitiesTimedOut', props); + return this.cannedMetric(StatesMetrics.activitiesTimedOutSum, props); } /** @@ -155,7 +156,7 @@ export class Activity extends Resource implements IActivity { * @default sum over 5 minutes */ public metricStarted(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('ActivitiesStarted', props); + return this.cannedMetric(StatesMetrics.activitiesStartedSum, props); } /** @@ -164,7 +165,7 @@ export class Activity extends Resource implements IActivity { * @default sum over 5 minutes */ public metricSucceeded(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('ActivitiesSucceeded', props); + return this.cannedMetric(StatesMetrics.activitiesSucceededSum, props); } /** @@ -173,7 +174,7 @@ export class Activity extends Resource implements IActivity { * @default sum over 5 minutes */ public metricFailed(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('ActivitiesFailed', props); + return this.cannedMetric(StatesMetrics.activitiesFailedSum, props); } /** @@ -182,7 +183,7 @@ export class Activity extends Resource implements IActivity { * @default sum over 5 minutes */ public metricHeartbeatTimedOut(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('ActivitiesHeartbeatTimedOut', props); + return this.cannedMetric(StatesMetrics.activitiesHeartbeatTimedOutSum, props); } private generateName(): string { @@ -192,6 +193,15 @@ export class Activity extends Resource implements IActivity { } return name; } + + private cannedMetric( + fn: (dims: { ActivityArn: string }) => cloudwatch.MetricProps, + props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return new cloudwatch.Metric({ + ...fn({ ActivityArn: this.activityArn }), + ...props, + }).attachTo(this); + } } /** diff --git a/packages/@aws-cdk/aws-stepfunctions/lib/state-machine.ts b/packages/@aws-cdk/aws-stepfunctions/lib/state-machine.ts index 55ca077bbf856..56b14e69fa5d8 100644 --- a/packages/@aws-cdk/aws-stepfunctions/lib/state-machine.ts +++ b/packages/@aws-cdk/aws-stepfunctions/lib/state-machine.ts @@ -4,6 +4,7 @@ import * as logs from '@aws-cdk/aws-logs'; import { Arn, Duration, IResource, Resource, Stack } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { StateGraph } from './state-graph'; +import { StatesMetrics } from './stepfunctions-canned-metrics.generated'; import { CfnStateMachine } from './stepfunctions.generated'; import { IChainable } from './types'; @@ -249,7 +250,10 @@ abstract class StateMachineBase extends Resource implements IStateMachine { * @default - sum over 5 minutes */ public metricFailed(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('ExecutionsFailed', props); + return this.cannedMetric(StatesMetrics.executionsFailedAverage, { + statistic: 'sum', + ...props, + }); } /** @@ -258,6 +262,7 @@ abstract class StateMachineBase extends Resource implements IStateMachine { * @default - sum over 5 minutes */ public metricThrottled(props?: cloudwatch.MetricOptions): cloudwatch.Metric { + // There's a typo in the "canned" version of this return this.metric('ExecutionThrottled', props); } @@ -267,7 +272,10 @@ abstract class StateMachineBase extends Resource implements IStateMachine { * @default - sum over 5 minutes */ public metricAborted(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('ExecutionsAborted', props); + return this.cannedMetric(StatesMetrics.executionsAbortedAverage, { + statistic: 'sum', + ...props, + }); } /** @@ -276,7 +284,10 @@ abstract class StateMachineBase extends Resource implements IStateMachine { * @default - sum over 5 minutes */ public metricSucceeded(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('ExecutionsSucceeded', props); + return this.cannedMetric(StatesMetrics.executionsSucceededAverage, { + statistic: 'sum', + ...props, + }); } /** @@ -285,7 +296,10 @@ abstract class StateMachineBase extends Resource implements IStateMachine { * @default - sum over 5 minutes */ public metricTimedOut(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('ExecutionsTimedOut', props); + return this.cannedMetric(StatesMetrics.executionsTimedOutAverage, { + statistic: 'sum', + ...props, + }); } /** @@ -300,10 +314,10 @@ abstract class StateMachineBase extends Resource implements IStateMachine { /** * Metric for the interval, in milliseconds, between the time the execution starts and the time it closes * - * @default - sum over 5 minutes + * @default - average over 5 minutes */ public metricTime(props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return this.metric('ExecutionTime', props); + return this.cannedMetric(StatesMetrics.executionTimeAverage, props); } /** @@ -317,6 +331,15 @@ abstract class StateMachineBase extends Resource implements IStateMachine { sep: ':', }); } + + private cannedMetric( + fn: (dims: { StateMachineArn: string }) => cloudwatch.MetricProps, + props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return new cloudwatch.Metric({ + ...fn({ StateMachineArn: this.stateMachineArn }), + ...props, + }).attachTo(this); + } } /** diff --git a/packages/@aws-cdk/aws-synthetics/lib/canary.ts b/packages/@aws-cdk/aws-synthetics/lib/canary.ts index bee1d24e8cf11..367c9efe6e435 100644 --- a/packages/@aws-cdk/aws-synthetics/lib/canary.ts +++ b/packages/@aws-cdk/aws-synthetics/lib/canary.ts @@ -1,11 +1,12 @@ import * as crypto from 'crypto'; -import { Metric, MetricOptions } from '@aws-cdk/aws-cloudwatch'; +import { Metric, MetricOptions, MetricProps } from '@aws-cdk/aws-cloudwatch'; import * as iam from '@aws-cdk/aws-iam'; import * as s3 from '@aws-cdk/aws-s3'; import * as cdk from '@aws-cdk/core'; import { Construct } from 'constructs'; import { Code } from './code'; import { Schedule } from './schedule'; +import { CloudWatchSyntheticsMetrics } from './synthetics-canned-metrics.generated'; import { CfnCanary } from './synthetics.generated'; /** @@ -279,7 +280,7 @@ export class Canary extends cdk.Resource { * @default avg over 5 minutes */ public metricDuration(options?: MetricOptions): Metric { - return this.metric('Duration', options); + return this.cannedMetric(CloudWatchSyntheticsMetrics.durationAverage, options); } /** @@ -290,35 +291,21 @@ export class Canary extends cdk.Resource { * @default avg over 5 minutes */ public metricSuccessPercent(options?: MetricOptions): Metric { - return this.metric('SuccessPercent', options); + return this.cannedMetric(CloudWatchSyntheticsMetrics.successPercentAverage, options); } /** * Measure the number of failed canary runs over a given time period. * - * @param options - configuration options for the metric + * Default: average over 5 minutes * - * @default avg over 5 minutes - */ - public metricFailed(options?: MetricOptions): Metric { - return this.metric('Failed', options); - } - - /** - * @param metricName - the name of the metric * @param options - configuration options for the metric - * - * @returns a CloudWatch metric associated with the canary. - * @default avg over 5 minutes */ - private metric(metricName: string, options?: MetricOptions): Metric { - return new Metric({ - metricName, - namespace: 'CloudWatchSynthetics', - dimensions: { CanaryName: this.canaryName }, - statistic: 'avg', + public metricFailed(options?: MetricOptions): Metric { + return this.cannedMetric(CloudWatchSyntheticsMetrics.failedSum, { + statistic: 'Average', ...options, - }).attachTo(this); + }); } /** @@ -395,6 +382,15 @@ export class Canary extends cdk.Resource { return name.substring(0, 15) + nameHash(name); } } + + private cannedMetric( + fn: (dims: { CanaryName: string }) => MetricProps, + props?: MetricOptions): Metric { + return new Metric({ + ...fn({ CanaryName: this.canaryName }), + ...props, + }).attachTo(this); + } } /** diff --git a/packages/@aws-cdk/cfnspec/build-tools/update-metrics.sh b/packages/@aws-cdk/cfnspec/build-tools/update-metrics.sh new file mode 100755 index 0000000000000..f3817b59efdd6 --- /dev/null +++ b/packages/@aws-cdk/cfnspec/build-tools/update-metrics.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -eu + +explorer_tarball="$1" + +target_file=lib/canned-metrics/services.json + +mkdir -p $(dirname $target_file) + +tar xzOf "$explorer_tarball" "package/dist/lib/configuration/generated/services.json" > $target_file.json +node -p "JSON.stringify(require('./${target_file}.json'), undefined, 2)" > $target_file +rm $target_file.json +echo "Wrote $target_file" diff --git a/packages/@aws-cdk/cfnspec/lib/canned-metrics.ts b/packages/@aws-cdk/cfnspec/lib/canned-metrics.ts new file mode 100644 index 0000000000000..f3e26985ebdbb --- /dev/null +++ b/packages/@aws-cdk/cfnspec/lib/canned-metrics.ts @@ -0,0 +1,121 @@ +import { loadCannedMetricsFile, MetricTemplate } from './canned-metrics/canned-metrics-schema'; + +export type NonEmptyArray = [T, ...T[]]; + +/** + * A single canned service metric + * + * These are kindly provided to us by the good people of CloudWatch Explorer. + */ +export interface CannedMetric { + /** + * Metric namespace + */ + readonly namespace: string; + + /** + * Metric name + */ + readonly metricName: string; + + /** + * List of all possible dimension permutations for this metric + * + * Most metrics will have a single list of strings as their one set of + * allowed dimensions, but some metrics are emitted under multiple + * combinations of dimensions. + */ + readonly dimensions: NonEmptyArray; + + /** + * Suggested default aggregration statistic + * + * Not always the most appropriate one to use! These defaults have + * been classified by people and they generally just pick "Average" + * as the default, even if it doesn't make sense. + * + * For example: for event-based metrics that only ever emit `1` + * (and never `0`) the better statistic would be `Sum`. + * + * Use your judgement based on the type of metric this is. + */ + readonly defaultStat: string; +} + +/** + * Return the list of canned metrics for the given service + */ +export function cannedMetricsForService(cloudFormationNamespace: string): CannedMetric[] { + // One metricTemplate has a single set of dimensions, but the same metric NAME + // may occur in multiple metricTemplates (if it has multiple sets of dimensions) + const metricTemplates = cannedMetricsIndex()[cloudFormationNamespace] ?? []; + + // First construct almost what we need, but with a single dimension per metric + const metricsWithDuplicates = flatMap(metricTemplates, metricSet => { + const dimensions = metricSet.dimensions.map(d => d.dimensionName); + return metricSet.metrics.map(metric => ({ + namespace: metricSet.namespace, + dimensions, + metricName: metric.name, + defaultStat: metric.defaultStat, + })); + }); + + // Then combine the dimensions for the same metrics into a single list + return groupBy(metricsWithDuplicates, m => `${m.namespace}/${m.metricName}`).map(metrics => ({ + namespace: metrics[0].namespace, + metricName: metrics[0].metricName, + defaultStat: metrics[0].defaultStat, + dimensions: Array.from(dedupeStringLists(metrics.map(m => m.dimensions))) as any, + })); +} + +type CannedMetricsIndex = Record; + +let cannedMetricsCache: CannedMetricsIndex | undefined; + +/** + * Load the canned metrics file and process it into an index, grouped by service namespace + */ +function cannedMetricsIndex() { + if (cannedMetricsCache === undefined) { + cannedMetricsCache = {}; + for (const group of loadCannedMetricsFile()) { + for (const metricTemplate of group.metricTemplates) { + const [aws, service] = metricTemplate.resourceType.split('::'); + const serviceKey = [aws, service].join('::'); + (cannedMetricsCache[serviceKey] ?? (cannedMetricsCache[serviceKey] = [])).push(metricTemplate); + } + } + } + return cannedMetricsCache; +} + +function flatMap(xs: A[], fn: (x: A) => B[]): B[] { + return Array.prototype.concat.apply([], xs.map(fn)); +} + +function groupBy(xs: A[], keyFn: (x: A) => string): Array> { + const obj: Record> = {}; + for (const x of xs) { + const key = keyFn(x); + if (key in obj) { + obj[key].push(x); + } else { + obj[key] = [x]; + } + } + return Object.values(obj); +} + +function* dedupeStringLists(xs: string[][]): IterableIterator { + const seen = new Set(); + for (const x of xs) { + x.sort(); + const key = `${x.join(',')}`; + if (!seen.has(key)) { + yield x; + } + seen.add(key); + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/cfnspec/lib/canned-metrics/README.md b/packages/@aws-cdk/cfnspec/lib/canned-metrics/README.md new file mode 100644 index 0000000000000..84c31165a1c1a --- /dev/null +++ b/packages/@aws-cdk/cfnspec/lib/canned-metrics/README.md @@ -0,0 +1,163 @@ +# Canned Metrics + +This source of AWS metrics is kindly provided to us by the CloudWatch Explorer team +(and used in their console). + +## What are we generating? + +We are currently generating helpers to make it easier to product the `object.metricXXX()` +methods on resources. They will take care of the props (but not of instantiating a +`cloudwatch.Metric` object). + +## Why are we not generating customer facing APIs from these? + +We totally should, however there are some concerns that make this non-trivial. + +All of the following concerns would require manual annotations. + +### Adding methods + +Our metrics helpers currently live ON the resource objects and interfaces. + +This makes it so we have to codegen additional methods onto handwritten classes. This is not +impossible, and "augmentations" already do that, but it's somewhat uncomfortable. We need +to know interface and class names to codegen the appropriate additional methods, so these +need to be annotated everywhere. + +### Renaming metrics + +Whether this is a good thing or a bad thing might be a matter of opinion, but we +do rename metrics methods from the canonical names to make them more readable. + +API Gateway: 4xx/5xx are translated to client/server + +```js +metricClientError => '4XXError' +metricServerError => '5XXError' +``` + +StepFunctions State Machine: remove "executions", hide plurality change + +```js +metricFailed => 'ExecutionsFailed' +metricThrottled => 'ExecutionThrottled' // Yes the 's' is missing on purpose! +``` + +Renames will need to be annotated. + +Some metrics functions don't even map to a single metric because the actual +metric name is a parameter. + +ApplicationLoadBalancer: The metric method indicates the SOURCE of the +HTTP code (ELB or backend), the metric name itself comes from an ENUM. + +```js + public metricHttpCodeElb(code: HttpCodeElb, props?: cloudwatch.MetricOptions) { + public metricHttpCodeTarget(code: HttpCodeTarget, props?: cloudwatch.MetricOptions) { +``` + +NetworkLoadBalancer: get rid of underscores and recapitalize abbrevations + +```js +metricTcpClientResetCount => 'TCP_Client_Reset_Count' +``` + +### Mapping dimensions to attribute names + +Attribute names are chosen by hand, but dimension names are fixed. We need some kind +of mapping between the value that needs to go into the dimension, and the attribute +of the resource that we get it from. + +Examples: + +CodeBuild (simple enough) + +```js +dimensions: { ProjectName: project.projectName }, +``` + +API Gateway (slightly less clear) + +```js +dimensions: { ApiName: api.restApiName }, +``` + +ALB (even less clear) + +```js +dimensions: { LoadBalancer: resource.loadBalancerFullName } +``` + +This mapping requires annotations somewhere. + +### Metrics not consistently available on interface + +Some of these dimension values are available for imported resources, but some +are not. In the examples above, `restApiName` and `loadBalancerFullName` are +only available as return values by CloudFormation, and are not known for +imported resources (as they are different identifiers than we usually expect +people to import by). + +This means that the metrics cannot be made available on the resources +**interfaces**, only on the resource **classes**. + +The lack of consistency here makes it harder to codegen for (requires +annotations). + +## Additional logic in metrics methods + +Although *many* metrics are simply of the form "give me this value for this resource", +not all of them are. Some require additional parameters or additional logic. + +Examples: + +ChatBot Slack configuration: metrics only in `us-east-1` regardless of stack region + +```js + return new cloudwatch.Metric({ + namespace: 'AWS/Chatbot', + region: 'us-east-1', + dimensions: { + ConfigurationName: this.slackChannelConfigurationName, + }, + metricName, + ...props, + }); + } +``` + +### Resource dimensions aren't necessarily complete + +Some metrics require an additional dimensions that is not part of the resource +definition. + +DynamoDB: User must supply an additional `Operation` dimension + +Some metrics are emitted under `{ TableName, Operation }` instead of just `TableName`. +The API will have to have a non-standard shape like: + +```js + public metricSystemErrors(operation: Operation, options?: cloudwatch.MetricOptions): cloudwatch.IMetric { +``` + +### No docstrings + +All of our methods have docstrings that try and describe what the metric actually +represents. + +The model from CloudWatch Explorer does not have docstrings, so we would +still need to annotate them to make it user friendly. + +### Incomplete model + +The CW Model is certainly very exhaustive, but it's not complete. We currently +have metrics methods we would lose if we were to switch over completely. + +### Backwards compatibility of default statistics + +Since the CW Explorer team uses +these metrics as templates, they are free to change them at any time. For +example, when they decide that a `defaultStatistic` of `Average` should have +been `Sum`, for example. On the other hand, we have a fixed statistic +contract -- once a metric object emits under a particular statistic, we can +never change it or we will break downstream users. \ No newline at end of file diff --git a/packages/@aws-cdk/cfnspec/lib/canned-metrics/canned-metrics-schema.ts b/packages/@aws-cdk/cfnspec/lib/canned-metrics/canned-metrics-schema.ts new file mode 100644 index 0000000000000..1cc1dac632166 --- /dev/null +++ b/packages/@aws-cdk/cfnspec/lib/canned-metrics/canned-metrics-schema.ts @@ -0,0 +1,74 @@ +/** + * Get the canned metrics source file + */ +export function loadCannedMetricsFile(): CannedMetricsFile { + // eslint-disable-next-line @typescript-eslint/no-require-imports + return require('./services.json'); +} + +/** + * Schema definitions for the accompanying file "services.json". + */ +export type CannedMetricsFile = MetricInfoGroup[]; + +export interface MetricInfoGroup { + /** + * List of metric templates + */ + readonly metricTemplates: MetricTemplate[]; +} + + +export interface MetricTemplate { + /** + * CloudFormation resource name + */ + readonly resourceType: string; + + /** + * Metric namespace + */ + readonly namespace: string; + + /** + * Set of dimensions for this set of metrics + */ + readonly dimensions: Dimension[]; + + /** + * Set of metrics these dimensions apply to + */ + readonly metrics: Metric[]; +} + +/** + * Dimension for this set of metric templates + */ +export interface Dimension { + /** + * Name of the dimension + */ + readonly dimensionName: string; + + /** + * A potential fixed value for this dimension + * + * (Currently unused by the spec reader, but could be used) + */ + readonly dimensionValue?: string; +} + +/** + * A description of an available metric + */ +export interface Metric { + /** + * Name of the metric + */ + readonly name: string; + + /** + * Default (suggested) statistic for this metric + */ + readonly defaultStat: string; +} \ No newline at end of file diff --git a/packages/@aws-cdk/cfnspec/lib/canned-metrics/services.json b/packages/@aws-cdk/cfnspec/lib/canned-metrics/services.json new file mode 100644 index 0000000000000..38b6ba0e17c84 --- /dev/null +++ b/packages/@aws-cdk/cfnspec/lib/canned-metrics/services.json @@ -0,0 +1,22175 @@ +[ + { + "id": "AWS::A4B", + "dashboard": "A4B", + "crossServiceDashboard": "A4B:CrossService", + "resourceTypes": [ + { + "type": "AWS::A4B::Organization", + "keyMetric": "AWS::A4B::Organization:OfflineSharedDevices", + "dashboard": "A4B" + } + ], + "controls": { + "AWS::A4B.organizations": { + "type": "resource", + "resourceType": "AWS::A4B::Organization", + "labelField": "Organization", + "valueField": "Organization" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::A4B::Organization", + "namespace": "AWS/A4B", + "dimensions": [ + { + "dimensionName": "Organization", + "labelName": "Organization" + } + ], + "metrics": [ + { + "id": "AWS::A4B::Organization:OfflineSharedDevices", + "name": "OfflineSharedDevices", + "defaultStat": "Sum" + }, + { + "id": "AWS::A4B::Organization:OnlineSharedDevices", + "name": "OnlineSharedDevices", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "A4B:CrossService", + "name": "Alexa For Business", + "dependencies": [ + { + "namespace": "AWS/A4B" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::A4B::Organization:OfflineSharedDevices" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::A4B::Organization:OnlineSharedDevices" + } + ] + } + ] + } + ] + }, + { + "id": "A4B", + "name": "Alexa For Business", + "dependencies": [ + { + "namespace": "AWS/A4B" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::A4B.organizations" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::A4B::Organization:OfflineSharedDevices" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::A4B::Organization:OnlineSharedDevices" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::AmazonMQ", + "dashboard": "AmazonMQ", + "crossServiceDashboard": "AmazonMQ:CrossService", + "resourceTypes": [ + { + "type": "AWS::AmazonMQ::Broker", + "keyMetric": "AWS::AmazonMQ::Broker:CpuUtilization", + "dashboard": "AmazonMQ", + "arnRegex": ".*:broker:(.*)" + } + ], + "controls": { + "AWS::AmazonMQ.brokers": { + "type": "resource", + "resourceType": "AWS::AmazonMQ::Broker", + "labelField": "Broker", + "valueField": "Broker" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::AmazonMQ::Broker", + "namespace": "AWS/AmazonMQ", + "dimensions": [ + { + "dimensionName": "Broker", + "labelName": "Broker" + } + ], + "metrics": [ + { + "id": "AWS::AmazonMQ::Broker:CpuUtilization", + "name": "CpuUtilization", + "defaultStat": "Average" + }, + { + "id": "AWS::AmazonMQ::Broker:CurrentConnectionsCount", + "name": "CurrentConnectionsCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::AmazonMQ::Broker:CpuCreditBalanceHeapUsage", + "name": "CpuCreditBalanceHeapUsage", + "defaultStat": "Maximum" + }, + { + "id": "AWS::AmazonMQ::Broker:NetworkIn", + "name": "NetworkIn", + "defaultStat": "Sum" + }, + { + "id": "AWS::AmazonMQ::Broker:NetworkOut", + "name": "NetworkOut", + "defaultStat": "Sum" + }, + { + "id": "AWS::AmazonMQ::Broker:TotalConsumerCount", + "name": "TotalConsumerCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::AmazonMQ::Broker:TotalMessageCount", + "name": "TotalMessageCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::AmazonMQ::Broker:TotalProducerCount", + "name": "TotalProducerCount", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "AmazonMQ:CrossService", + "name": "Amazon MQ", + "dependencies": [ + { + "namespace": "AWS/AmazonMQ" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AmazonMQ::Broker:CpuUtilization" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AmazonMQ::Broker:CurrentConnectionsCount" + } + ] + } + ] + } + ] + }, + { + "id": "AmazonMQ", + "name": "Amazon MQ", + "dependencies": [ + { + "namespace": "AWS/AmazonMQ" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::AmazonMQ.brokers" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AmazonMQ::Broker:CpuUtilization" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AmazonMQ::Broker:CurrentConnectionsCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AmazonMQ::Broker:CpuCreditBalanceHeapUsage" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AmazonMQ::Broker:NetworkIn" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AmazonMQ::Broker:NetworkOut" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AmazonMQ::Broker:TotalConsumerCount" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AmazonMQ::Broker:TotalMessageCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AmazonMQ::Broker:TotalProducerCount" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::ApiGateway", + "dashboard": "ApiGateway", + "crossServiceDashboard": "ApiGateway:CrossService", + "resourceTypes": [ + { + "type": "AWS::ApiGateway::RestApi", + "keyMetric": "AWS::ApiGateway::RestApi:Count", + "arnRegex": ".*/restapis/([^/]*)" + }, + { + "type": "AWS::ApiGateway::Stage", + "keyMetric": "AWS::ApiGateway::Stage:Count", + "alarmPatterns": [ + { + "namespace": "AWS/ApiGateway", + "dimensions": [ + { + "dimensionName": "ApiName", + "labelName": "ApiName" + }, + { + "dimensionName": "Stage", + "labelName": "Stage" + } + ] + }, + { + "namespace": "AWS/ApiGateway", + "dimensions": [ + { + "dimensionName": "ApiName", + "labelName": "ApiName" + }, + { + "dimensionName": "Stage", + "dimensionValue": "" + } + ] + } + ], + "nodeNameRegex": "(.*)/(.*)", + "arnRegex": ".*/restapis/(.*)/stages/(.*)", + "dashboard": "ApiGateway", + "isResourceNode": true + } + ], + "controls": { + "AWS::ApiGateway.stages": { + "type": "resource", + "resourceType": "AWS::ApiGateway::Stage", + "labelField": "ApiName", + "valueField": "ApiName" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::ApiGateway::Stage", + "namespace": "AWS/ApiGateway", + "dimensions": [ + { + "dimensionName": "ApiName", + "labelName": "ApiName" + }, + { + "dimensionName": "Stage", + "labelName": "Stage" + } + ], + "metrics": [ + { + "id": "AWS::ApiGateway::Stage:5XXError", + "name": "5XXError", + "defaultStat": "Sum" + }, + { + "id": "AWS::ApiGateway::Stage:Latency", + "name": "Latency", + "defaultStat": "Average" + }, + { + "id": "AWS::ApiGateway::Stage:Count", + "name": "Count", + "defaultStat": "Sum" + }, + { + "id": "AWS::ApiGateway::Stage:4XXError", + "name": "4XXError", + "defaultStat": "Sum" + }, + { + "id": "AWS::ApiGateway::Stage:IntegrationLatency", + "name": "IntegrationLatency", + "defaultStat": "Average" + }, + { + "id": "AWS::ApiGateway::Stage:CacheHitCount", + "name": "CacheHitCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::ApiGateway::Stage:CacheMissCount", + "name": "CacheMissCount", + "defaultStat": "Sum" + } + ] + }, + { + "resourceType": "AWS::ApiGateway::RestApi", + "namespace": "AWS/ApiGateway", + "dimensions": [ + { + "dimensionName": "ApiName", + "labelName": "ApiName" + } + ], + "metrics": [ + { + "id": "AWS::ApiGateway::RestApi:5XXError", + "name": "5XXError", + "defaultStat": "Sum" + }, + { + "id": "AWS::ApiGateway::RestApi:Latency", + "name": "Latency", + "defaultStat": "Average" + }, + { + "id": "AWS::ApiGateway::RestApi:Count", + "name": "Count", + "defaultStat": "Sum" + }, + { + "id": "AWS::ApiGateway::RestApi:4XXError", + "name": "4XXError", + "defaultStat": "Sum" + }, + { + "id": "AWS::ApiGateway::RestApi:IntegrationLatency", + "name": "IntegrationLatency", + "defaultStat": "Average" + }, + { + "id": "AWS::ApiGateway::RestApi:CacheHitCount", + "name": "CacheHitCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::ApiGateway::RestApi:CacheMissCount", + "name": "CacheMissCount", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "ApiGateway:CrossService", + "name": "API Gateway", + "dependencies": [ + { + "namespace": "AWS/ApiGateway" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ApiGateway::Stage:5XXError" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ApiGateway::Stage:Latency" + } + ] + } + ] + } + ] + }, + { + "id": "ApiGateway", + "name": "API Gateway", + "dependencies": [ + { + "namespace": "AWS/ApiGateway" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::ApiGateway.stages" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ApiGateway::Stage:Count" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ApiGateway::Stage:5XXError" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ApiGateway::Stage:4XXError" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ApiGateway::Stage:Latency" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ApiGateway::Stage:IntegrationLatency" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ApiGateway::Stage:CacheHitCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ApiGateway::Stage:CacheMissCount" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::ApplicationELB", + "dashboard": "ApplicationELB", + "crossServiceDashboard": "ApplicationELB:CrossService", + "resourceTypes": [ + { + "type": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB", + "entityType": "AWS::ElasticLoadBalancingV2::LoadBalancer", + "keyMetric": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:ConsumedLCUs", + "dashboard": "ApplicationELB", + "arnRegex": ".*:loadbalancer/(app/.*)" + } + ], + "controls": { + "AWS::ApplicationELB.loadBalancers": { + "type": "resource", + "resourceType": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB", + "labelField": "LoadBalancer", + "valueField": "LoadBalancer" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB", + "namespace": "AWS/ApplicationELB", + "dimensions": [ + { + "dimensionName": "LoadBalancer", + "labelName": "LoadBalancer" + } + ], + "metrics": [ + { + "id": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:RequestCount", + "name": "RequestCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:HTTPCode_ELB_5XX_Count", + "name": "HTTPCode_ELB_5XX_Count", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:ActiveConnectionCount", + "name": "ActiveConnectionCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:ClientTLSNegotiationErrorCount", + "name": "ClientTLSNegotiationErrorCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:ConsumedLCUs", + "name": "ConsumedLCUs", + "defaultStat": "Average" + }, + { + "id": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:HTTP_Fixed_Response_Count", + "name": "HTTP_Fixed_Response_Count", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:HTTP_Redirect_Count", + "name": "HTTP_Redirect_Count", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:HTTP_Redirect_Url_Limit_Exceeded_Count", + "name": "HTTP_Redirect_Url_Limit_Exceeded_Count", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:HTTPCode_ELB_3XX_Count", + "name": "HTTPCode_ELB_3XX_Count", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:HTTPCode_ELB_4XX_Count", + "name": "HTTPCode_ELB_4XX_Count", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:IPv6ProcessedBytes", + "name": "IPv6ProcessedBytes", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:IPv6RequestCount", + "name": "IPv6RequestCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:NewConnectionCount", + "name": "NewConnectionCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:ProcessedBytes", + "name": "ProcessedBytes", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:RejectedConnectionCount", + "name": "RejectedConnectionCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:RuleEvaluations", + "name": "RuleEvaluations", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "ApplicationELB:CrossService", + "name": "Application ELB", + "dependencies": [ + { + "namespace": "AWS/ApplicationELB" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:RequestCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:HTTPCode_ELB_5XX_Count" + } + ] + } + ] + } + ] + }, + { + "id": "ApplicationELB:LoadBalancer", + "name": "Application ELB LoadBalancer", + "dependencies": [ + { + "namespace": "AWS/ApplicationELB" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::ApplicationELB.loadBalancers" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:RequestCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:HTTPCode_ELB_5XX_Count" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:ActiveConnectionCount" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:ClientTLSNegotiationErrorCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:ConsumedLCUs" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:HTTP_Fixed_Response_Count" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:HTTP_Redirect_Count" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:HTTP_Redirect_Url_Limit_Exceeded_Count" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:HTTPCode_ELB_3XX_Count" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:HTTPCode_ELB_4XX_Count" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:IPv6ProcessedBytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:IPv6RequestCount" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:NewConnectionCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:ProcessedBytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:RejectedConnectionCount" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "width": 8, + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:RuleEvaluations" + } + ] + } + ] + } + ] + }, + { + "id": "ApplicationELB", + "name": "Application ELB", + "dependencies": [ + { + "namespace": "AWS/ApplicationELB" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::ApplicationELB.loadBalancers" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:RequestCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:HTTPCode_ELB_5XX_Count" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:ActiveConnectionCount" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:ClientTLSNegotiationErrorCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:ConsumedLCUs" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:HTTP_Fixed_Response_Count" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:HTTP_Redirect_Count" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:HTTP_Redirect_Url_Limit_Exceeded_Count" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:HTTPCode_ELB_3XX_Count" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:HTTPCode_ELB_4XX_Count" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:IPv6ProcessedBytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:IPv6RequestCount" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:NewConnectionCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:ProcessedBytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:RejectedConnectionCount" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "width": 8, + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/ApplicationELB:RuleEvaluations" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::AppStream", + "dashboard": "AppStream", + "crossServiceDashboard": "AppStream:CrossService", + "resourceTypes": [ + { + "type": "AWS::AppStream::Fleet", + "keyMetric": "AWS::AppStream::Fleet:CapacityUtilization", + "dashboard": "AppStream", + "arnRegex": ".*:fleet/(.*)" + } + ], + "controls": { + "AWS::AppStream.fleets": { + "type": "resource", + "resourceType": "AWS::AppStream::Fleet", + "labelField": "Fleet", + "valueField": "Fleet" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::AppStream::Fleet", + "namespace": "AWS/AppStream", + "dimensions": [ + { + "dimensionName": "Fleet", + "labelName": "Fleet" + } + ], + "metrics": [ + { + "id": "AWS::AppStream::Fleet:CapacityUtilization", + "name": "CapacityUtilization", + "defaultStat": "Average" + }, + { + "id": "AWS::AppStream::Fleet:InsufficientCapacityError", + "name": "InsufficientCapacityError", + "defaultStat": "Sum" + }, + { + "id": "AWS::AppStream::Fleet:ActualCapacity", + "name": "ActualCapacity", + "defaultStat": "Average" + }, + { + "id": "AWS::AppStream::Fleet:AvailableCapacity", + "name": "AvailableCapacity", + "defaultStat": "Average" + }, + { + "id": "AWS::AppStream::Fleet:DesiredCapacity", + "name": "DesiredCapacity", + "defaultStat": "Average" + }, + { + "id": "AWS::AppStream::Fleet:InUseCapacity", + "name": "InUseCapacity", + "defaultStat": "Average" + }, + { + "id": "AWS::AppStream::Fleet:PendingCapacity", + "name": "PendingCapacity", + "defaultStat": "Average" + }, + { + "id": "AWS::AppStream::Fleet:RunningCapacity", + "name": "RunningCapacity", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "AppStream:CrossService", + "name": "AppStream", + "dependencies": [ + { + "namespace": "AWS/AppStream" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AppStream::Fleet:CapacityUtilization" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AppStream::Fleet:InsufficientCapacityError" + } + ] + } + ] + } + ] + }, + { + "id": "AppStream", + "name": "AppStream", + "dependencies": [ + { + "namespace": "AWS/AppStream" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::AppStream.fleets" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AppStream::Fleet:CapacityUtilization" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AppStream::Fleet:InsufficientCapacityError" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AppStream::Fleet:ActualCapacity" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AppStream::Fleet:AvailableCapacity" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AppStream::Fleet:DesiredCapacity" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AppStream::Fleet:InUseCapacity" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AppStream::Fleet:PendingCapacity" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AppStream::Fleet:RunningCapacity" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::AppSync", + "dashboard": "AppSync", + "crossServiceDashboard": "AppSync:CrossService", + "resourceTypes": [ + { + "type": "AWS::AppSync::GraphQLAPI", + "arnRegex": ".*/(?.*)", + "keyMetric": "AWS::AppSync::GraphQLAPI:4XXError", + "dashboard": "AppSync" + } + ], + "controls": { + "AWS::AppSync.graphQLAPIs": { + "type": "resource", + "resourceType": "AWS::AppSync::GraphQLAPI", + "labelField": "GraphQLAPIId", + "valueField": "GraphQLAPIId" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::AppSync::GraphQLAPI", + "namespace": "AWS/AppSync", + "dimensions": [ + { + "dimensionName": "GraphQLAPIId", + "labelName": "GraphQLAPIId" + } + ], + "metrics": [ + { + "id": "AWS::AppSync::GraphQLAPI:4XXError", + "name": "4XXError", + "defaultStat": "Sum" + }, + { + "id": "AWS::AppSync::GraphQLAPI:5XXError", + "name": "5XXError", + "defaultStat": "Sum" + }, + { + "id": "AWS::AppSync::GraphQLAPI:Latency", + "name": "Latency", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "AppSync:CrossService", + "name": "AppSync", + "dependencies": [ + { + "namespace": "AWS/AppSync" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AppSync::GraphQLAPI:4XXError" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AppSync::GraphQLAPI:5XXError" + } + ] + } + ] + } + ] + }, + { + "id": "AppSync", + "name": "AppSync", + "dependencies": [ + { + "namespace": "AWS/AppSync" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::AppSync.graphQLAPIs" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AppSync::GraphQLAPI:4XXError" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AppSync::GraphQLAPI:5XXError" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AppSync::GraphQLAPI:Latency" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::AutoScaling", + "dashboard": "AutoScaling", + "crossServiceDashboard": "AutoScaling:CrossService", + "resourceTypes": [ + { + "type": "AWS::AutoScaling::AutoScalingGroup", + "keyMetric": "AWS::AutoScaling::AutoScalingGroup:GroupTotalInstances", + "dashboard": "AutoScaling" + } + ], + "controls": { + "AWS::AutoScaling.autoScalingGroups": { + "type": "resource", + "resourceType": "AWS::AutoScaling::AutoScalingGroup", + "labelField": "AutoScalingGroupName", + "valueField": "AutoScalingGroupName" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::AutoScaling::AutoScalingGroup", + "namespace": "AWS/AutoScaling", + "dimensions": [ + { + "dimensionName": "AutoScalingGroupName", + "labelName": "AutoScalingGroupName" + } + ], + "metrics": [ + { + "id": "AWS::AutoScaling::AutoScalingGroup:GroupTotalInstances", + "name": "GroupTotalInstances", + "defaultStat": "Average" + }, + { + "id": "AWS::AutoScaling::AutoScalingGroup:GroupDesiredCapacity", + "name": "GroupDesiredCapacity", + "defaultStat": "Average" + }, + { + "id": "AWS::AutoScaling::AutoScalingGroup:GroupMaxSize", + "name": "GroupMaxSize", + "defaultStat": "Average" + }, + { + "id": "AWS::AutoScaling::AutoScalingGroup:GroupMinSize", + "name": "GroupMinSize", + "defaultStat": "Average" + }, + { + "id": "AWS::AutoScaling::AutoScalingGroup:GroupTerminatingInstances", + "name": "GroupTerminatingInstances", + "defaultStat": "Average" + }, + { + "id": "AWS::AutoScaling::AutoScalingGroup:GroupPendingInstances", + "name": "GroupPendingInstances", + "defaultStat": "Average" + }, + { + "id": "AWS::AutoScaling::AutoScalingGroup:GroupInServiceInstances", + "name": "GroupInServiceInstances", + "defaultStat": "Average" + }, + { + "id": "AWS::AutoScaling::AutoScalingGroup:GroupStandbyInstances", + "name": "GroupStandbyInstances", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "AutoScaling:CrossService", + "name": "AutoScaling", + "dependencies": [ + { + "namespace": "AWS/AutoScaling" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AutoScaling::AutoScalingGroup:GroupDesiredCapacity" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AutoScaling::AutoScalingGroup:GroupInServiceInstances" + } + ] + } + ] + } + ] + }, + { + "id": "AutoScaling", + "name": "AutoScaling", + "dependencies": [ + { + "namespace": "AWS/AutoScaling" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::AutoScaling.autoScalingGroups" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AutoScaling::AutoScalingGroup:GroupTotalInstances" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AutoScaling::AutoScalingGroup:GroupDesiredCapacity" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AutoScaling::AutoScalingGroup:GroupMaxSize" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AutoScaling::AutoScalingGroup:GroupMinSize" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AutoScaling::AutoScalingGroup:GroupTerminatingInstances" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AutoScaling::AutoScalingGroup:GroupPendingInstances" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AutoScaling::AutoScalingGroup:GroupInServiceInstances" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::AutoScaling::AutoScalingGroup:GroupStandbyInstances" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::Budgeting", + "dashboard": "Budgeting", + "crossServiceDashboard": "Budgeting:CrossService", + "resourceTypes": [ + { + "type": "AWS::Budgeting::Budget", + "keyMetric": "AWS::Budgeting::Budget:CostBudgetPercentageUsed", + "dashboard": "Budgeting" + } + ], + "controls": { + "AWS::Budgeting.budgets": { + "type": "resource", + "resourceType": "AWS::Budgeting::Budget", + "labelField": "BudgetId", + "valueField": "BudgetId" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::Budgeting::Budget", + "namespace": "AWS/Budgeting", + "dimensions": [ + { + "dimensionName": "BudgetId", + "labelName": "BudgetId" + } + ], + "metrics": [ + { + "id": "AWS::Budgeting::Budget:CostBudgetPercentageUsed", + "name": "CostBudgetPercentageUsed", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "Budgeting:CrossService", + "name": "Budgeting", + "dependencies": [ + { + "namespace": "AWS/Budgeting" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Budgeting::Budget:CostBudgetPercentageUsed" + } + ] + } + ] + } + ] + }, + { + "id": "Budgeting", + "name": "Budgeting", + "dependencies": [ + { + "namespace": "AWS/Budgeting" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::Budgeting.budgets" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Budgeting::Budget:CostBudgetPercentageUsed" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::EC2::CapacityReservation", + "dashboard": "EC2CapacityReservations", + "crossServiceDashboard": "EC2CapacityReservations:CrossService", + "resourceTypes": [ + { + "type": "AWS::EC2::CapacityReservation", + "keyMetric": "AWS::EC2::CapacityReservation:InstanceUtilization", + "dashboard": "EC2CapacityReservations", + "arnRegex": ".*:capacity-reservation/(.*)" + } + ], + "metricTemplates": [ + { + "resourceType": "AWS::EC2::CapacityReservation", + "namespace": "AWS/EC2CapacityReservations", + "dimensions": [ + { + "dimensionName": "CapacityReservationId", + "labelName": "CapacityReservationId" + } + ], + "metrics": [ + { + "id": "AWS::EC2::CapacityReservation:InstanceUtilization", + "name": "InstanceUtilization", + "defaultStat": "Average" + }, + { + "id": "AWS::EC2::CapacityReservation:UsedInstanceCount", + "name": "UsedInstanceCount", + "defaultStat": "Average" + }, + { + "id": "AWS::EC2::CapacityReservation:AvailableInstanceCount", + "name": "AvailableInstanceCount", + "defaultStat": "Average" + }, + { + "id": "AWS::EC2::CapacityReservation:TotalInstanceCount", + "name": "TotalInstanceCount", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "EC2CapacityReservations:CrossService", + "name": "EC2CapacityReservations", + "dependencies": [ + { + "namespace": "AWS/EC2CapacityReservations" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::CapacityReservation:InstanceUtilization" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::CapacityReservation:UsedInstanceCount" + } + ] + } + ] + } + ] + }, + { + "id": "EC2CapacityReservations", + "name": "EC2CapacityReservations", + "dependencies": [ + { + "namespace": "AWS/EC2CapacityReservations" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::CapacityReservation:InstanceUtilization" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::CapacityReservation:UsedInstanceCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::CapacityReservation:AvailableInstanceCount" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::CapacityReservation:TotalInstanceCount" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::CloudFront", + "dashboard": "CloudFront", + "crossServiceDashboard": "CloudFront:CrossService", + "resourceTypes": [ + { + "type": "AWS::CloudFront::Distribution", + "keyMetric": "AWS::CloudFront::Distribution:Requests", + "dashboard": "CloudFront", + "arnRegex": ".*:distribution/(.*)" + } + ], + "controls": { + "AWS::CloudFront.distributions": { + "type": "resource", + "resourceType": "AWS::CloudFront::Distribution", + "labelField": "DistributionId", + "valueField": "DistributionId" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::CloudFront::Distribution", + "namespace": "AWS/CloudFront", + "dimensions": [ + { + "dimensionName": "DistributionId", + "labelName": "DistributionId" + }, + { + "dimensionName": "Region", + "dimensionValue": "Global" + } + ], + "metrics": [ + { + "id": "AWS::CloudFront::Distribution:Requests", + "name": "Requests", + "defaultStat": "Sum" + }, + { + "id": "AWS::CloudFront::Distribution:TotalErrorRate", + "name": "TotalErrorRate", + "defaultStat": "Average" + }, + { + "id": "AWS::CloudFront::Distribution:BytesDownloaded", + "name": "BytesDownloaded", + "defaultStat": "Sum" + }, + { + "id": "AWS::CloudFront::Distribution:BytesUploaded", + "name": "BytesUploaded", + "defaultStat": "Average" + }, + { + "id": "AWS::CloudFront::Distribution:4xxErrorRate", + "name": "4xxErrorRate", + "defaultStat": "Average" + }, + { + "id": "AWS::CloudFront::Distribution:5xxErrorRate", + "name": "5xxErrorRate", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "CloudFront:CrossService", + "name": "CloudFront", + "dependencies": [ + { + "namespace": "AWS/CloudFront" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudFront::Distribution:Requests" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudFront::Distribution:TotalErrorRate" + } + ] + } + ] + } + ] + }, + { + "id": "CloudFront", + "name": "CloudFront", + "dependencies": [ + { + "namespace": "AWS/CloudFront" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::CloudFront.distributions" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudFront::Distribution:Requests" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudFront::Distribution:TotalErrorRate" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudFront::Distribution:BytesDownloaded" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudFront::Distribution:BytesUploaded" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudFront::Distribution:4xxErrorRate" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudFront::Distribution:5xxErrorRate" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::CloudHSM", + "dashboard": "CloudHSM", + "crossServiceDashboard": "CloudHSM:CrossService", + "resourceTypes": [ + { + "type": "AWS::CloudHSM::Cluster", + "keyMetric": "AWS::CloudHSM::Cluster:CpuActivePercent", + "dashboard": "CloudHSM" + } + ], + "controls": { + "AWS::CloudHSM.clusters": { + "type": "resource", + "resourceType": "AWS::CloudHSM::Cluster", + "labelField": "ClusterId", + "valueField": "ClusterId" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::CloudHSM::Cluster", + "namespace": "AWS/CloudHSM", + "dimensions": [ + { + "dimensionName": "ClusterId", + "labelName": "ClusterId" + } + ], + "metrics": [ + { + "id": "AWS::CloudHSM::Cluster:CpuActivePercent", + "name": "CpuActivePercent", + "defaultStat": "Average" + }, + { + "id": "AWS::CloudHSM::Cluster:HsmKeysSessionOccupied", + "name": "HsmKeysSessionOccupied", + "defaultStat": "Sum" + }, + { + "id": "AWS::CloudHSM::Cluster:HsmKeysTokenOccupied", + "name": "HsmKeysTokenOccupied", + "defaultStat": "Sum" + }, + { + "id": "AWS::CloudHSM::Cluster:HsmMemoryPrivateFree", + "name": "HsmMemoryPrivateFree", + "defaultStat": "Sum" + }, + { + "id": "AWS::CloudHSM::Cluster:HsmMemoryPublicFree", + "name": "HsmMemoryPublicFree", + "defaultStat": "Sum" + }, + { + "id": "AWS::CloudHSM::Cluster:HsmSessionCount", + "name": "HsmSessionCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::CloudHSM::Cluster:HsmTemperature", + "name": "HsmTemperature", + "defaultStat": "Average" + }, + { + "id": "AWS::CloudHSM::Cluster:HsmUnhealthy", + "name": "HsmUnhealthy", + "defaultStat": "Sum" + }, + { + "id": "AWS::CloudHSM::Cluster:HsmUsersAvailable", + "name": "HsmUsersAvailable", + "defaultStat": "Sum" + }, + { + "id": "AWS::CloudHSM::Cluster:HsmUsersMax", + "name": "HsmUsersMax", + "defaultStat": "Maximum" + }, + { + "id": "AWS::CloudHSM::Cluster:InterfaceEth2DroppedInput", + "name": "InterfaceEth2DroppedInput", + "defaultStat": "Sum" + }, + { + "id": "AWS::CloudHSM::Cluster:InterfaceEth2DroppedOutput", + "name": "InterfaceEth2DroppedOutput", + "defaultStat": "Sum" + }, + { + "id": "AWS::CloudHSM::Cluster:InterfaceEth2ErrorsOutput", + "name": "InterfaceEth2ErrorsOutput", + "defaultStat": "Sum" + }, + { + "id": "AWS::CloudHSM::Cluster:InterfaceEth2OctetsInput", + "name": "InterfaceEth2OctetsInput", + "defaultStat": "Sum" + }, + { + "id": "AWS::CloudHSM::Cluster:InterfaceEth2OctetsOutput", + "name": "InterfaceEth2OctetsOutput", + "defaultStat": "Sum" + }, + { + "id": "AWS::CloudHSM::Cluster:InterfaceEth2PacketsInput", + "name": "InterfaceEth2PacketsInput", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "CloudHSM:CrossService", + "name": "CloudHSM", + "dependencies": [ + { + "namespace": "AWS/CloudHSM" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudHSM::Cluster:CpuActivePercent" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudHSM::Cluster:HsmKeysSessionOccupied" + } + ] + } + ] + } + ] + }, + { + "id": "CloudHSM", + "name": "CloudHSM", + "dependencies": [ + { + "namespace": "AWS/CloudHSM" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::CloudHSM.clusters" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudHSM::Cluster:CpuActivePercent" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudHSM::Cluster:HsmKeysSessionOccupied" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudHSM::Cluster:HsmKeysTokenOccupied" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudHSM::Cluster:HsmMemoryPrivateFree" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudHSM::Cluster:HsmMemoryPublicFree" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudHSM::Cluster:HsmSessionCount" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudHSM::Cluster:HsmTemperature" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudHSM::Cluster:HsmUnhealthy" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudHSM::Cluster:HsmUsersAvailable" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudHSM::Cluster:HsmUsersMax" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudHSM::Cluster:InterfaceEth2DroppedInput" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudHSM::Cluster:InterfaceEth2DroppedOutput" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudHSM::Cluster:InterfaceEth2ErrorsOutput" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudHSM::Cluster:InterfaceEth2OctetsInput" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudHSM::Cluster:InterfaceEth2OctetsOutput" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "width": 8, + "metrics": [ + { + "metricTemplate": "AWS::CloudHSM::Cluster:InterfaceEth2PacketsInput" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::CloudSearch", + "dashboard": "CloudSearch", + "crossServiceDashboard": "CloudSearch:CrossService", + "resourceTypes": [ + { + "type": "AWS::CloudSearch::Client", + "keyMetric": "AWS::CloudSearch::Client:SuccessfulRequests", + "dashboard": "CloudSearch" + } + ], + "controls": { + "AWS::CloudSearch.clients": { + "type": "resource", + "resourceType": "AWS::CloudSearch::Client", + "labelField": "ClientId", + "valueField": "ClientId" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::CloudSearch::Client", + "namespace": "AWS/CloudSearch", + "dimensions": [ + { + "dimensionName": "ClientId", + "labelName": "ClientId" + } + ], + "metrics": [ + { + "id": "AWS::CloudSearch::Client:SuccessfulRequests", + "name": "SuccessfulRequests", + "defaultStat": "Sum" + }, + { + "id": "AWS::CloudSearch::Client:IndexUtilization", + "name": "IndexUtilization", + "defaultStat": "Average" + }, + { + "id": "AWS::CloudSearch::Client:SearchableDocuments", + "name": "SearchableDocuments", + "defaultStat": "Maximum" + }, + { + "id": "AWS::CloudSearch::Client:Partitions", + "name": "Partitions", + "defaultStat": "Maximum" + } + ] + } + ], + "dashboards": [ + { + "id": "CloudSearch:CrossService", + "name": "CloudSearch", + "dependencies": [ + { + "namespace": "AWS/CloudSearch" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudSearch::Client:SuccessfulRequests" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudSearch::Client:IndexUtilization" + } + ] + } + ] + } + ] + }, + { + "id": "CloudSearch", + "name": "CloudSearch", + "dependencies": [ + { + "namespace": "AWS/CloudSearch" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::CloudSearch.clients" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudSearch::Client:SuccessfulRequests" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudSearch::Client:IndexUtilization" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CloudSearch::Client:SearchableDocuments" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "width": 8, + "metrics": [ + { + "metricTemplate": "AWS::CloudSearch::Client:Partitions" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::CodeBuild", + "dashboard": "CodeBuild", + "crossServiceDashboard": "CodeBuild:CrossService", + "resourceTypes": [ + { + "type": "AWS::CodeBuild::Project", + "keyMetric": "AWS::CodeBuild::Project:SucceededBuilds", + "dashboard": "CodeBuild", + "arnRegex": ".*:project/(.*)" + } + ], + "controls": { + "AWS::CodeBuild.projects": { + "type": "resource", + "resourceType": "AWS::CodeBuild::Project", + "labelField": "ProjectName", + "valueField": "ProjectName" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::CodeBuild::Project", + "namespace": "AWS/CodeBuild", + "dimensions": [ + { + "dimensionName": "ProjectName", + "labelName": "ProjectName" + } + ], + "metrics": [ + { + "id": "AWS::CodeBuild::Project:SucceededBuilds", + "name": "SucceededBuilds", + "defaultStat": "Sum" + }, + { + "id": "AWS::CodeBuild::Project:FailedBuilds", + "name": "FailedBuilds", + "defaultStat": "Sum" + }, + { + "id": "AWS::CodeBuild::Project:Builds", + "name": "Builds", + "defaultStat": "Sum" + }, + { + "id": "AWS::CodeBuild::Project:Duration", + "name": "Duration", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "CodeBuild:CrossService", + "name": "CodeBuild", + "dependencies": [ + { + "namespace": "AWS/CodeBuild" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CodeBuild::Project:SucceededBuilds" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CodeBuild::Project:FailedBuilds" + } + ] + } + ] + } + ] + }, + { + "id": "CodeBuild", + "name": "CodeBuild", + "dependencies": [ + { + "namespace": "AWS/CodeBuild" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::CodeBuild.projects" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CodeBuild::Project:SucceededBuilds" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CodeBuild::Project:FailedBuilds" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::CodeBuild::Project:Builds" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "width": 8, + "metrics": [ + { + "metricTemplate": "AWS::CodeBuild::Project:Duration" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "CrossService", + "dashboard": "CrossService", + "resourceTypes": [], + "controls": {}, + "metricTemplates": [], + "dashboards": [ + { + "id": "CrossService", + "name": "CrossService", + "dependencies": [], + "controls": [ + "Shared::Group.ResourceGroup" + ], + "rows": [] + } + ] + }, + { + "id": "AWS::Datasync", + "dashboard": "DataSync", + "crossServiceDashboard": "DataSync:CrossService", + "resourceTypes": [ + { + "type": "AWS::Datasync::Agent", + "keyMetric": "AWS::Datasync::Agent:FilesTransferred", + "dashboard": "DataSync", + "arnRegex": ".*:agent/(.*)" + }, + { + "type": "AWS::Datasync::Task", + "keyMetric": "AWS::Datasync::Task:FilesTransferred", + "dashboard": "DataSync", + "arnRegex": ".*:task/(.*)" + } + ], + "metricTemplates": [ + { + "resourceType": "AWS::Datasync::Agent", + "namespace": "AWS/DataSync", + "dimensions": [ + { + "dimensionName": "AgentId", + "labelName": "AgentId" + } + ], + "metrics": [ + { + "id": "AWS::Datasync::Agent:FilesTransferred", + "name": "FilesTransferred", + "defaultStat": "Sum" + }, + { + "id": "AWS::Datasync::Agent:BytesTransferred", + "name": "BytesTransferred", + "defaultStat": "Sum" + }, + { + "id": "AWS::Datasync::Agent:BytesPreparedDestination", + "name": "BytesPreparedDestination", + "defaultStat": "Sum" + }, + { + "id": "AWS::Datasync::Agent:BytesPreparedSource", + "name": "BytesPreparedSource", + "defaultStat": "Sum" + }, + { + "id": "AWS::Datasync::Agent:BytesVerifiedDestination", + "name": "BytesVerifiedDestination", + "defaultStat": "Sum" + }, + { + "id": "AWS::Datasync::Agent:BytesVerifiedSource", + "name": "BytesVerifiedSource", + "defaultStat": "Sum" + }, + { + "id": "AWS::Datasync::Agent:BytesWritten", + "name": "BytesWritten", + "defaultStat": "Sum" + }, + { + "id": "AWS::Datasync::Agent:FilesPreparedDestination", + "name": "FilesPreparedDestination", + "defaultStat": "Sum" + }, + { + "id": "AWS::Datasync::Agent:FilesPreparedSource", + "name": "FilesPreparedSource", + "defaultStat": "Sum" + }, + { + "id": "AWS::Datasync::Agent:FilesVerifiedDestination", + "name": "FilesVerifiedDestination", + "defaultStat": "Sum" + }, + { + "id": "AWS::Datasync::Agent:FilesVerifiedSource", + "name": "FilesVerifiedSource", + "defaultStat": "Sum" + } + ] + }, + { + "resourceType": "AWS::Datasync::Task", + "namespace": "AWS/DataSync", + "dimensions": [ + { + "dimensionName": "TaskId", + "labelName": "TaskId" + } + ], + "metrics": [ + { + "id": "AWS::Datasync::Task:FilesTransferred", + "name": "FilesTransferred", + "defaultStat": "Sum" + }, + { + "id": "AWS::Datasync::Task:BytesTransferred", + "name": "BytesTransferred", + "defaultStat": "Sum" + }, + { + "id": "AWS::Datasync::Task:BytesPreparedDestination", + "name": "BytesPreparedDestination", + "defaultStat": "Sum" + }, + { + "id": "AWS::Datasync::Task:BytesPreparedSource", + "name": "BytesPreparedSource", + "defaultStat": "Sum" + }, + { + "id": "AWS::Datasync::Task:BytesVerifiedDestination", + "name": "BytesVerifiedDestination", + "defaultStat": "Sum" + }, + { + "id": "AWS::Datasync::Task:BytesVerifiedSource", + "name": "BytesVerifiedSource", + "defaultStat": "Sum" + }, + { + "id": "AWS::Datasync::Task:BytesWritten", + "name": "BytesWritten", + "defaultStat": "Sum" + }, + { + "id": "AWS::Datasync::Task:FilesPreparedDestination", + "name": "FilesPreparedDestination", + "defaultStat": "Sum" + }, + { + "id": "AWS::Datasync::Task:FilesPreparedSource", + "name": "FilesPreparedSource", + "defaultStat": "Sum" + }, + { + "id": "AWS::Datasync::Task:FilesVerifiedDestination", + "name": "FilesVerifiedDestination", + "defaultStat": "Sum" + }, + { + "id": "AWS::Datasync::Task:FilesVerifiedSource", + "name": "FilesVerifiedSource", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "DataSync:CrossService", + "name": "DataSync", + "dependencies": [ + { + "namespace": "AWS/DataSync" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Datasync::Agent:FilesTransferred" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Datasync::Agent:BytesTransferred" + } + ] + } + ] + } + ] + }, + { + "id": "DataSync", + "name": "DataSync", + "dependencies": [ + { + "namespace": "AWS/DataSync" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Datasync::Agent:FilesTransferred" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Datasync::Agent:BytesTransferred" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Datasync::Agent:BytesPreparedDestination" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Datasync::Agent:BytesPreparedSource" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Datasync::Agent:BytesVerifiedDestination" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Datasync::Agent:BytesVerifiedSource" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Datasync::Agent:BytesWritten" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Datasync::Agent:FilesPreparedDestination" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Datasync::Agent:FilesPreparedSource" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Datasync::Agent:FilesVerifiedDestination" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Datasync::Agent:FilesVerifiedSource" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Datasync::Task:FilesTransferred" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Datasync::Task:BytesTransferred" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Datasync::Task:BytesPreparedDestination" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Datasync::Task:BytesPreparedSource" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Datasync::Task:BytesVerifiedDestination" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Datasync::Task:BytesVerifiedSource" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Datasync::Task:BytesWritten" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Datasync::Task:FilesPreparedDestination" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Datasync::Task:FilesPreparedSource" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Datasync::Task:FilesVerifiedDestination" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Datasync::Task:FilesVerifiedSource" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::DAX::Cluster", + "dashboard": "DAX", + "crossServiceDashboard": "DAX:CrossService", + "resourceTypes": [ + { + "type": "AWS::DAX::Cluster", + "keyMetric": "AWS::DAX::Cluster:CPUUtilization", + "dashboard": "DAX", + "arnRegex": ".*:cache/(.*)" + } + ], + "metricTemplates": [ + { + "resourceType": "AWS::DAX::Cluster", + "namespace": "AWS/DAX", + "dimensions": [ + { + "dimensionName": "ClusterId", + "labelName": "ClusterId" + } + ], + "metrics": [ + { + "id": "AWS::DAX::Cluster:CPUUtilization", + "name": "CPUUtilization", + "defaultStat": "Average" + }, + { + "id": "AWS::DAX::Cluster:ItemCacheHits", + "name": "ItemCacheHits", + "defaultStat": "Sum" + }, + { + "id": "AWS::DAX::Cluster:ItemCacheMisses", + "name": "ItemCacheMisses", + "defaultStat": "Sum" + }, + { + "id": "AWS::DAX::Cluster:BatchGetItemRequestCount", + "name": "BatchGetItemRequestCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::DAX::Cluster:BatchWriteItemRequestCount", + "name": "BatchWriteItemRequestCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::DAX::Cluster:CacheMemoryUtilization", + "name": "CacheMemoryUtilization", + "defaultStat": "Average" + }, + { + "id": "AWS::DAX::Cluster:ClientConnections", + "name": "ClientConnections", + "defaultStat": "Sum" + }, + { + "id": "AWS::DAX::Cluster:DeleteItemRequestCount", + "name": "DeleteItemRequestCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::DAX::Cluster:ErrorRequestCount", + "name": "ErrorRequestCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::DAX::Cluster:EstimatedDbSize", + "name": "EstimatedDbSize", + "defaultStat": "Average" + }, + { + "id": "AWS::DAX::Cluster:EvictedSize", + "name": "EvictedSize", + "defaultStat": "Sum" + }, + { + "id": "AWS::DAX::Cluster:FailedRequestCount", + "name": "FailedRequestCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::DAX::Cluster:FaultRequestCount", + "name": "FaultRequestCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::DAX::Cluster:GetItemRequestCount", + "name": "GetItemRequestCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::DAX::Cluster:NetworkBytesIn", + "name": "NetworkBytesIn", + "defaultStat": "Sum" + }, + { + "id": "AWS::DAX::Cluster:NetworkBytesOut", + "name": "NetworkBytesOut", + "defaultStat": "Sum" + }, + { + "id": "AWS::DAX::Cluster:NetworkPacketsIn", + "name": "NetworkPacketsIn", + "defaultStat": "Sum" + }, + { + "id": "AWS::DAX::Cluster:NetworkPacketsOut", + "name": "NetworkPacketsOut", + "defaultStat": "Sum" + }, + { + "id": "AWS::DAX::Cluster:PutItemRequestCount", + "name": "PutItemRequestCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::DAX::Cluster:QueryCacheHits", + "name": "QueryCacheHits", + "defaultStat": "Sum" + }, + { + "id": "AWS::DAX::Cluster:QueryCacheMisses", + "name": "QueryCacheMisses", + "defaultStat": "Sum" + }, + { + "id": "AWS::DAX::Cluster:QueryRequestCount", + "name": "QueryRequestCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::DAX::Cluster:ScanCacheHits", + "name": "ScanCacheHits", + "defaultStat": "Sum" + }, + { + "id": "AWS::DAX::Cluster:ScanCacheMisses", + "name": "ScanCacheMisses", + "defaultStat": "Sum" + }, + { + "id": "AWS::DAX::Cluster:ScanRequestCount", + "name": "ScanRequestCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::DAX::Cluster:ThrottledRequestCount", + "name": "ThrottledRequestCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::DAX::Cluster:TotalRequestCount", + "name": "TotalRequestCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::DAX::Cluster:TransactGetItemsCount", + "name": "TransactGetItemsCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::DAX::Cluster:TransactWriteItemsCount", + "name": "TransactWriteItemsCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::DAX::Cluster:UpdateItemRequestCount", + "name": "UpdateItemRequestCount", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "DAX:CrossService", + "name": "DAX", + "dependencies": [ + { + "namespace": "AWS/DAX" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:CPUUtilization" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:ItemCacheHits" + } + ] + } + ] + } + ] + }, + { + "id": "DAX", + "name": "DAX", + "dependencies": [ + { + "namespace": "AWS/DAX" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:CPUUtilization" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:ItemCacheHits" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:ItemCacheMisses" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:BatchGetItemRequestCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:BatchWriteItemRequestCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:CacheMemoryUtilization" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:ClientConnections" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:DeleteItemRequestCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:ErrorRequestCount" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:EstimatedDbSize" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:EvictedSize" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:FailedRequestCount" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:FaultRequestCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:GetItemRequestCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:NetworkBytesIn" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:NetworkBytesOut" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:NetworkPacketsIn" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:NetworkPacketsOut" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:PutItemRequestCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:QueryCacheHits" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:QueryCacheMisses" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:QueryRequestCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:ScanCacheHits" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:ScanCacheMisses" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:ScanRequestCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:ThrottledRequestCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:TotalRequestCount" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:TransactGetItemsCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:TransactWriteItemsCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DAX::Cluster:UpdateItemRequestCount" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::DDoSProtection", + "dashboard": "DDoSProtection", + "crossServiceDashboard": "DDoSProtection:CrossService", + "resourceTypes": [ + { + "type": "AWS::DDoSProtection::AttackVector", + "keyMetric": "AWS::DDoSProtection::AttackVector:DDoSAttackRequestsPerSecond", + "dashboard": "DDoSProtection" + } + ], + "controls": { + "AWS::DDoSProtection.attackVectors": { + "type": "resource", + "resourceType": "AWS::DDoSProtection::AttackVector", + "labelField": "AttackVector", + "valueField": "AttackVector" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::DDoSProtection::AttackVector", + "namespace": "AWS/DDoSProtection", + "dimensions": [ + { + "dimensionName": "AttackVector", + "labelName": "AttackVector" + } + ], + "metrics": [ + { + "id": "AWS::DDoSProtection::AttackVector:DDoSAttackRequestsPerSecond", + "name": "DDoSAttackRequestsPerSecond", + "defaultStat": "Average" + }, + { + "id": "AWS::DDoSProtection::AttackVector:DDoSAttackBitsPerSecond", + "name": "DDoSAttackBitsPerSecond", + "defaultStat": "Average" + }, + { + "id": "AWS::DDoSProtection::AttackVector:DDoSAttackPacketsPerSecond", + "name": "DDoSAttackPacketsPerSecond", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "DDoSProtection:CrossService", + "name": "DDoS Protection", + "dependencies": [ + { + "namespace": "AWS/DDoSProtection" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DDoSProtection::AttackVector:DDoSAttackRequestsPerSecond" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DDoSProtection::AttackVector:DDoSAttackBitsPerSecond" + } + ] + } + ] + } + ] + }, + { + "id": "DDoSProtection", + "name": "DDoS Protection", + "dependencies": [ + { + "namespace": "AWS/DDoSProtection" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::DDoSProtection.attackVectors" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DDoSProtection::AttackVector:DDoSAttackRequestsPerSecond" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DDoSProtection::AttackVector:DDoSAttackBitsPerSecond" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DDoSProtection::AttackVector:DDoSAttackPacketsPerSecond" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::DMS::ReplicationInstance", + "dashboard": "DMS", + "crossServiceDashboard": "DMS:CrossService", + "resourceTypes": [ + { + "type": "AWS::DMS::ReplicationInstance", + "keyMetric": "AWS::DMS::ReplicationInstance:CDCLatencyTarget", + "dashboard": "DMS", + "arnRegex": ".*:rep:(.*)" + } + ], + "metricTemplates": [ + { + "resourceType": "AWS::DMS::ReplicationInstance", + "namespace": "AWS/DMS", + "dimensions": [ + { + "dimensionName": "ReplicationInstanceIdentifier", + "labelName": "ReplicationInstanceIdentifier" + } + ], + "metrics": [ + { + "id": "AWS::DMS::ReplicationInstance:CDCLatencyTarget", + "name": "CDCLatencyTarget", + "defaultStat": "Sum" + }, + { + "id": "AWS::DMS::ReplicationInstance:CDCLatencySource", + "name": "CDCLatencySource", + "defaultStat": "Sum" + }, + { + "id": "AWS::DMS::ReplicationInstance:AvailableMemory", + "name": "AvailableMemory", + "defaultStat": "Average" + }, + { + "id": "AWS::DMS::ReplicationInstance:CDCChangesDiskTarget", + "name": "CDCChangesDiskTarget", + "defaultStat": "Sum" + }, + { + "id": "AWS::DMS::ReplicationInstance:CDCChangesMemorySource", + "name": "CDCChangesMemorySource", + "defaultStat": "Sum" + }, + { + "id": "AWS::DMS::ReplicationInstance:CDCChangesMemoryTarget", + "name": "CDCChangesMemoryTarget", + "defaultStat": "Sum" + }, + { + "id": "AWS::DMS::ReplicationInstance:CDCIncomingChanges", + "name": "CDCIncomingChanges", + "defaultStat": "Sum" + }, + { + "id": "AWS::DMS::ReplicationInstance:CDCThroughputBandwidthSource", + "name": "CDCThroughputBandwidthSource", + "defaultStat": "Sum" + }, + { + "id": "AWS::DMS::ReplicationInstance:CDCThroughputBandwidthTarget", + "name": "CDCThroughputBandwidthTarget", + "defaultStat": "Sum" + }, + { + "id": "AWS::DMS::ReplicationInstance:CDCThroughputRowsSource", + "name": "CDCThroughputRowsSource", + "defaultStat": "Sum" + }, + { + "id": "AWS::DMS::ReplicationInstance:CDCThroughputRowsTarget", + "name": "CDCThroughputRowsTarget", + "defaultStat": "Sum" + }, + { + "id": "AWS::DMS::ReplicationInstance:CPUAllocated", + "name": "CPUAllocated", + "defaultStat": "Sum" + }, + { + "id": "AWS::DMS::ReplicationInstance:CPUUtilization", + "name": "CPUUtilization", + "defaultStat": "Average" + }, + { + "id": "AWS::DMS::ReplicationInstance:FreeMemory", + "name": "FreeMemory", + "defaultStat": "Average" + }, + { + "id": "AWS::DMS::ReplicationInstance:FullLoadThroughputBandwidthSource", + "name": "FullLoadThroughputBandwidthSource", + "defaultStat": "Sum" + }, + { + "id": "AWS::DMS::ReplicationInstance:FullLoadThroughputBandwidthTarget", + "name": "FullLoadThroughputBandwidthTarget", + "defaultStat": "Sum" + }, + { + "id": "AWS::DMS::ReplicationInstance:FullLoadThroughputRowsSource", + "name": "FullLoadThroughputRowsSource", + "defaultStat": "Sum" + }, + { + "id": "AWS::DMS::ReplicationInstance:FullLoadThroughputRowsTarget", + "name": "FullLoadThroughputRowsTarget", + "defaultStat": "Sum" + }, + { + "id": "AWS::DMS::ReplicationInstance:MemoryAllocated", + "name": "MemoryAllocated", + "defaultStat": "Average" + }, + { + "id": "AWS::DMS::ReplicationInstance:MemoryUsage", + "name": "MemoryUsage", + "defaultStat": "Average" + }, + { + "id": "AWS::DMS::ReplicationInstance:SwapUsage", + "name": "SwapUsage", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "DMS:CrossService", + "name": "DMS", + "dependencies": [ + { + "namespace": "AWS/DMS" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DMS::ReplicationInstance:CDCLatencyTarget" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DMS::ReplicationInstance:CDCLatencySource" + } + ] + } + ] + } + ] + }, + { + "id": "DMS", + "name": "DMS", + "dependencies": [ + { + "namespace": "AWS/DMS" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DMS::ReplicationInstance:CDCLatencyTarget" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DMS::ReplicationInstance:CDCLatencySource" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DMS::ReplicationInstance:AvailableMemory" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DMS::ReplicationInstance:CDCChangesDiskTarget" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DMS::ReplicationInstance:CDCChangesMemorySource" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DMS::ReplicationInstance:CDCChangesMemoryTarget" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DMS::ReplicationInstance:CDCIncomingChanges" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DMS::ReplicationInstance:CDCThroughputBandwidthSource" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DMS::ReplicationInstance:CDCThroughputBandwidthTarget" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DMS::ReplicationInstance:CDCThroughputRowsSource" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DMS::ReplicationInstance:CDCThroughputRowsTarget" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DMS::ReplicationInstance:CPUAllocated" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DMS::ReplicationInstance:CPUUtilization" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DMS::ReplicationInstance:FreeMemory" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DMS::ReplicationInstance:FullLoadThroughputBandwidthSource" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DMS::ReplicationInstance:FullLoadThroughputBandwidthTarget" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DMS::ReplicationInstance:FullLoadThroughputRowsSource" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DMS::ReplicationInstance:FullLoadThroughputRowsTarget" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DMS::ReplicationInstance:MemoryAllocated" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DMS::ReplicationInstance:MemoryUsage" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DMS::ReplicationInstance:SwapUsage" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::DocDB", + "dashboard": "DocDB", + "crossServiceDashboard": "DocDB:CrossService", + "resourceTypes": [ + { + "type": "AWS::DocDB::DBInstance", + "keyMetric": "AWS::DocDB::DBInstance:CPUUtilization", + "dashboard": "DocDB" + } + ], + "controls": { + "AWS::DocDB.dBInstances": { + "type": "resource", + "resourceType": "AWS::DocDB::DBInstance", + "labelField": "DBInstanceIdentifier", + "valueField": "DBInstanceIdentifier" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::DocDB::DBInstance", + "namespace": "AWS/DocDB", + "dimensions": [ + { + "dimensionName": "DBInstanceIdentifier", + "labelName": "DBInstanceIdentifier" + } + ], + "metrics": [ + { + "id": "AWS::DocDB::DBInstance:CPUUtilization", + "name": "CPUUtilization", + "defaultStat": "Average" + }, + { + "id": "AWS::DocDB::DBInstance:DatabaseConnections", + "name": "DatabaseConnections", + "defaultStat": "Average" + }, + { + "id": "AWS::DocDB::DBInstance:EngineUptime", + "name": "EngineUptime", + "defaultStat": "Average" + }, + { + "id": "AWS::DocDB::DBInstance:ReadThroughput", + "name": "ReadThroughput", + "defaultStat": "Sum" + }, + { + "id": "AWS::DocDB::DBInstance:WriteThroughput", + "name": "WriteThroughput", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "DocDB:CrossService", + "name": "DocDB", + "dependencies": [ + { + "namespace": "AWS/DocDB" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DocDB::DBInstance:CPUUtilization" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DocDB::DBInstance:DatabaseConnections" + } + ] + } + ] + } + ] + }, + { + "id": "DocDB", + "name": "DocDB", + "dependencies": [ + { + "namespace": "AWS/DocDB" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::DocDB.dBInstances" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DocDB::DBInstance:CPUUtilization" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DocDB::DBInstance:DatabaseConnections" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DocDB::DBInstance:EngineUptime" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DocDB::DBInstance:ReadThroughput" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DocDB::DBInstance:WriteThroughput" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::DX", + "dashboard": "DX", + "crossServiceDashboard": "DX:CrossService", + "resourceTypes": [ + { + "type": "AWS::DX::Connection", + "keyMetric": "AWS::DX::Connection:ConnectionBpsIngress", + "dashboard": "DX" + } + ], + "controls": { + "AWS::DX.connections": { + "type": "resource", + "resourceType": "AWS::DX::Connection", + "labelField": "ConnectionId", + "valueField": "ConnectionId" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::DX::Connection", + "namespace": "AWS/DX", + "dimensions": [ + { + "dimensionName": "ConnectionId", + "labelName": "ConnectionId" + } + ], + "metrics": [ + { + "id": "AWS::DX::Connection:ConnectionBpsIngress", + "name": "ConnectionBpsIngress", + "defaultStat": "Average" + }, + { + "id": "AWS::DX::Connection:ConnectionCRCErrorCount", + "name": "ConnectionCRCErrorCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::DX::Connection:ConnectionState", + "name": "ConnectionState", + "defaultStat": "Average" + }, + { + "id": "AWS::DX::Connection:ConnectionBpsEgress", + "name": "ConnectionBpsEgress", + "defaultStat": "Average" + }, + { + "id": "AWS::DX::Connection:ConnectionPpsEgress", + "name": "ConnectionPpsEgress", + "defaultStat": "Average" + }, + { + "id": "AWS::DX::Connection:ConnectionPpsIngress", + "name": "ConnectionPpsIngress", + "defaultStat": "Average" + }, + { + "id": "AWS::DX::Connection:ConnectionLightLevelTx", + "name": "ConnectionLightLevelTx", + "defaultStat": "Average" + }, + { + "id": "AWS::DX::Connection:ConnectionLightLevelRx", + "name": "ConnectionLightLevelRx", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "DX:CrossService", + "name": "Direct Connect", + "dependencies": [ + { + "namespace": "AWS/DX" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DX::Connection:ConnectionBpsIngress" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DX::Connection:ConnectionCRCErrorCount" + } + ] + } + ] + } + ] + }, + { + "id": "DX", + "name": "Direct Connect", + "dependencies": [ + { + "namespace": "AWS/DX" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::DX.connections" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DX::Connection:ConnectionBpsIngress" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DX::Connection:ConnectionCRCErrorCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DX::Connection:ConnectionState" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DX::Connection:ConnectionBpsEgress" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DX::Connection:ConnectionPpsEgress" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DX::Connection:ConnectionPpsIngress" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DX::Connection:ConnectionLightLevelTx" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DX::Connection:ConnectionLightLevelRx" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::DynamoDB", + "dashboard": "DynamoDB", + "crossServiceDashboard": "DynamoDB:CrossService", + "resourceTypes": [ + { + "type": "AWS::DynamoDB::Table", + "arnRegex": ".*:table/(.*)", + "keyMetric": "AWS::DynamoDB::Table:ProvisionedReadCapacityUnits", + "dashboard": "DynamoDB", + "describe": "dynamo-db-describe-tables", + "consoleLink": "/dynamodb/home?region={region}#tables:selected={TableName}", + "isResourceNode": true + } + ], + "controls": { + "AWS::DynamoDB.tables": { + "type": "resource", + "resourceType": "AWS::DynamoDB::Table", + "labelField": "TableName", + "valueField": "TableName" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::DynamoDB::Table", + "namespace": "AWS/DynamoDB", + "dimensions": [ + { + "dimensionName": "TableName", + "labelName": "TableName" + } + ], + "metrics": [ + { + "id": "AWS::DynamoDB::Table:UserErrors", + "name": "UserErrors", + "defaultStat": "Sum" + }, + { + "id": "AWS::DynamoDB::Table:ThrottledRequests", + "name": "ThrottledRequests", + "defaultStat": "Sum" + }, + { + "id": "AWS::DynamoDB::Table:ConsumedReadCapacityUnits", + "name": "ConsumedReadCapacityUnits", + "defaultStat": "Sum" + }, + { + "id": "AWS::DynamoDB::Table:ProvisionedReadCapacityUnits", + "name": "ProvisionedReadCapacityUnits", + "defaultStat": "Sum" + }, + { + "id": "AWS::DynamoDB::Table:ConsumedWriteCapacityUnits", + "name": "ConsumedWriteCapacityUnits", + "defaultStat": "Sum" + }, + { + "id": "AWS::DynamoDB::Table:ProvisionedWriteCapacityUnits", + "name": "ProvisionedWriteCapacityUnits", + "defaultStat": "Sum" + } + ] + }, + { + "resourceType": "AWS::DynamoDB::Table", + "id": "AWS::DynamoDB::Table:GetItem", + "namespace": "AWS/DynamoDB", + "dimensions": [ + { + "dimensionName": "TableName", + "labelName": "TableName" + }, + { + "dimensionName": "Operation", + "dimensionValue": "GetItem" + } + ], + "metrics": [ + { + "id": "AWS::DynamoDB::Table:GetItem:SuccessfulRequestLatency", + "name": "SuccessfulRequestLatency", + "defaultStat": "Average" + } + ] + }, + { + "resourceType": "AWS::DynamoDB::Table", + "id": "AWS::DynamoDB::Table:PutItem", + "namespace": "AWS/DynamoDB", + "dimensions": [ + { + "dimensionName": "TableName", + "labelName": "TableName" + }, + { + "dimensionName": "Operation", + "dimensionValue": "PutItem" + } + ], + "metrics": [ + { + "id": "AWS::DynamoDB::Table:PutItem:SuccessfulRequestLatency", + "name": "SuccessfulRequestLatency", + "defaultStat": "Average" + } + ] + }, + { + "resourceType": "AWS::DynamoDB::Table", + "id": "AWS::DynamoDB::Table:GetRecords", + "namespace": "AWS/DynamoDB", + "dimensions": [ + { + "dimensionName": "TableName", + "labelName": "TableName" + }, + { + "dimensionName": "Operation", + "dimensionValue": "GetRecords" + } + ], + "metrics": [ + { + "id": "AWS::DynamoDB::Table:GetRecords:ReturnedBytes", + "name": "ReturnedBytes", + "defaultStat": "Average" + } + ] + }, + { + "resourceType": "AWS::DynamoDB::Table", + "id": "AWS::DynamoDB::Table:Scan", + "namespace": "AWS/DynamoDB", + "dimensions": [ + { + "dimensionName": "TableName", + "labelName": "TableName" + }, + { + "dimensionName": "Operation", + "dimensionValue": "Scan" + } + ], + "metrics": [ + { + "id": "AWS::DynamoDB::Table:Scan:ReturnedItemCount", + "name": "ReturnedItemCount", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "DynamoDB:CrossService", + "name": "DynamoDB", + "dependencies": [ + { + "namespace": "AWS/DynamoDB" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DynamoDB::Table:UserErrors" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DynamoDB::Table:ThrottledRequests" + } + ] + } + ] + } + ] + }, + { + "id": "DynamoDB", + "name": "DynamoDB", + "dependencies": [ + { + "namespace": "AWS/DynamoDB" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::DynamoDB.tables" + ], + "tables": [ + { + "resourceType": "AWS::DynamoDB::Table", + "columns": [ + "TableName", + "TableStatus", + "TableSizeBytes", + "ItemCount", + "ReadCapacityUnits", + "WriteCapacityUnits" + ] + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DynamoDB::Table:GetItem:SuccessfulRequestLatency" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DynamoDB::Table:PutItem:SuccessfulRequestLatency" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DynamoDB::Table:ThrottledRequests" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DynamoDB::Table:UserErrors" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DynamoDB::Table:ConsumedReadCapacityUnits" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DynamoDB::Table:ProvisionedReadCapacityUnits" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DynamoDB::Table:ConsumedWriteCapacityUnits" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DynamoDB::Table:ProvisionedWriteCapacityUnits" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DynamoDB::Table:GetRecords:ReturnedBytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::DynamoDB::Table:Scan:ReturnedItemCount" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::EBS", + "dashboard": "EBS", + "crossServiceDashboard": "EBS:CrossService", + "resourceTypes": [ + { + "type": "AWS::EC2::Volume", + "keyMetric": "AWS::EC2::Volume:VolumeReadBytes", + "dashboard": "EBS", + "arnRegex": ".*:volume/(.*)", + "consoleLink": "/ec2/v2/home?region={region}#Volumes:volumeId={VolumeId}" + } + ], + "controls": { + "AWS::EBS.volumes": { + "type": "resource", + "resourceType": "AWS::EC2::Volume", + "labelField": "VolumeId", + "valueField": "VolumeId" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::EC2::Volume", + "namespace": "AWS/EBS", + "dimensions": [ + { + "dimensionName": "VolumeId", + "labelName": "VolumeId" + } + ], + "metrics": [ + { + "id": "AWS::EC2::Volume:VolumeReadBytes", + "name": "VolumeReadBytes", + "defaultStat": "Sum" + }, + { + "id": "AWS::EC2::Volume:VolumeWriteBytes", + "name": "VolumeWriteBytes", + "defaultStat": "Sum" + }, + { + "id": "AWS::EC2::Volume:VolumeReadOps", + "name": "VolumeReadOps", + "defaultStat": "Sum" + }, + { + "id": "AWS::EC2::Volume:VolumeTotalReadTime", + "name": "VolumeTotalReadTime", + "defaultStat": "Average" + }, + { + "id": "AWS::EC2::Volume:VolumeWriteOps", + "name": "VolumeWriteOps", + "defaultStat": "Sum" + }, + { + "id": "AWS::EC2::Volume:VolumeTotalWriteTime", + "name": "VolumeTotalWriteTime", + "defaultStat": "Average" + }, + { + "id": "AWS::EC2::Volume:VolumeIdleTime", + "name": "VolumeIdleTime", + "defaultStat": "Average" + }, + { + "id": "AWS::EC2::Volume:VolumeQueueLength", + "name": "VolumeQueueLength", + "defaultStat": "Average" + }, + { + "id": "AWS::EC2::Volume:BurstBalance", + "name": "BurstBalance", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "EBS:CrossService", + "name": "EBS", + "dependencies": [ + { + "namespace": "AWS/EBS" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::Volume:VolumeReadBytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::Volume:VolumeWriteBytes" + } + ] + } + ] + } + ] + }, + { + "id": "EBS", + "name": "EBS", + "dependencies": [ + { + "namespace": "AWS/EBS" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::EBS.volumes" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::Volume:VolumeReadBytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::Volume:VolumeReadOps" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::Volume:VolumeTotalReadTime" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::Volume:VolumeWriteBytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::Volume:VolumeWriteOps" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::Volume:VolumeTotalWriteTime" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::Volume:VolumeIdleTime" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::Volume:VolumeQueueLength" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::Volume:BurstBalance" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::EC2", + "dashboard": "EC2", + "crossServiceDashboard": "EC2:CrossService", + "resourceTypes": [ + { + "type": "AWS::EC2::Instance", + "keyMetric": "AWS::EC2::Instance:CPUUtilization", + "list": "ec2-describe-instances", + "dashboard": "EC2:Instance", + "arnRegex": ".*:instance/(.*)", + "consoleLink": "/ec2/home?region={region}#Instances:search={InstanceId};sort=instanceId)", + "describe": "ec2-describe-instances" + } + ], + "controls": { + "AWS::EC2.instances": { + "type": "resource", + "resourceType": "AWS::EC2::Instance", + "labelField": "InstanceId", + "valueField": "InstanceId" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::EC2::Instance", + "namespace": "AWS/EC2", + "dimensions": [ + { + "dimensionName": "InstanceId", + "labelName": "InstanceId" + } + ], + "metrics": [ + { + "id": "AWS::EC2::Instance:CPUUtilization", + "name": "CPUUtilization", + "defaultStat": "Average" + }, + { + "id": "AWS::EC2::Instance:StatusCheckFailed", + "name": "StatusCheckFailed", + "defaultStat": "Sum" + }, + { + "id": "AWS::EC2::Instance:StatusCheckFailed_Instance", + "name": "StatusCheckFailed_Instance", + "defaultStat": "Sum" + }, + { + "id": "AWS::EC2::Instance:StatusCheckFailed_System", + "name": "StatusCheckFailed_System", + "defaultStat": "Sum" + }, + { + "id": "AWS::EC2::Instance:DiskReadBytes", + "name": "DiskReadBytes", + "defaultStat": "Average" + }, + { + "id": "AWS::EC2::Instance:DiskReadOps", + "name": "DiskReadOps", + "defaultStat": "Average" + }, + { + "id": "AWS::EC2::Instance:DiskWriteBytes", + "name": "DiskWriteBytes", + "defaultStat": "Average" + }, + { + "id": "AWS::EC2::Instance:DiskWriteOps", + "name": "DiskWriteOps", + "defaultStat": "Average" + }, + { + "id": "AWS::EC2::Instance:NetworkIn", + "name": "NetworkIn", + "defaultStat": "Average" + }, + { + "id": "AWS::EC2::Instance:NetworkOut", + "name": "NetworkOut", + "defaultStat": "Average" + }, + { + "id": "AWS::EC2::Instance:NetworkPacketsIn", + "name": "NetworkPacketsIn", + "defaultStat": "Average" + }, + { + "id": "AWS::EC2::Instance:NetworkPacketsOut", + "name": "NetworkPacketsOut", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "EC2:CrossService", + "name": "EC2", + "dependencies": [ + { + "namespace": "AWS/EC2" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::Instance:CPUUtilization" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::Instance:StatusCheckFailed" + } + ] + } + ] + } + ] + }, + { + "id": "EC2:Instance", + "name": "EC2 Instance", + "dependencies": [ + { + "namespace": "AWS/EC2" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::EC2.instances" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "width": 4, + "properties": { + "view": "singleValue" + }, + "metrics": [ + { + "metricTemplate": "AWS::EC2::Instance:CPUUtilization" + } + ] + }, + { + "type": "chart", + "width": 10, + "metrics": [ + { + "metricTemplate": "AWS::EC2::Instance:CPUUtilization" + } + ] + }, + { + "type": "chart", + "width": 10, + "metrics": [ + { + "metricTemplate": "AWS::EC2::Instance:StatusCheckFailed" + }, + { + "metricOptions": { + "yAxis": "right" + }, + "metricTemplate": "AWS::EC2::Instance:StatusCheckFailed_Instance" + }, + { + "metricOptions": { + "yAxis": "right" + }, + "metricTemplate": "AWS::EC2::Instance:StatusCheckFailed_System" + } + ] + } + ] + } + ] + }, + { + "id": "EC2", + "name": "EC2", + "dependencies": [ + { + "namespace": "AWS/EC2" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::EC2.instances" + ], + "tables": [ + { + "resourceType": "AWS::EC2::Instance", + "columns": [ + "InstanceId", + "Name", + "InstanceType", + "Monitoring", + "State", + "AvailabilityZone" + ] + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::Instance:CPUUtilization" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::Instance:DiskReadBytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::Instance:DiskReadOps" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::Instance:DiskWriteBytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::Instance:DiskWriteOps" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::Instance:NetworkIn" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::Instance:NetworkOut" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::Instance:NetworkPacketsIn" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::Instance:NetworkPacketsOut" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::Instance:StatusCheckFailed" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::Instance:StatusCheckFailed_Instance" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::Instance:StatusCheckFailed_System" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::EC2Spot", + "dashboard": "EC2Spot", + "crossServiceDashboard": "EC2Spot:CrossService", + "resourceTypes": [ + { + "type": "AWS::EC2Spot::FleetRequest", + "keyMetric": "AWS::EC2Spot::FleetRequest:PendingCapacity", + "dashboard": "EC2Spot" + } + ], + "controls": { + "AWS::EC2Spot.fleetRequests": { + "type": "resource", + "resourceType": "AWS::EC2Spot::FleetRequest", + "labelField": "FleetRequestId", + "valueField": "FleetRequestId" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::EC2Spot::FleetRequest", + "namespace": "AWS/EC2Spot", + "dimensions": [ + { + "dimensionName": "FleetRequestId", + "labelName": "FleetRequestId" + } + ], + "metrics": [ + { + "id": "AWS::EC2Spot::FleetRequest:PendingCapacity", + "name": "PendingCapacity", + "defaultStat": "Average" + }, + { + "id": "AWS::EC2Spot::FleetRequest:MaxPercentCapacityAllocation", + "name": "MaxPercentCapacityAllocation", + "defaultStat": "Average" + }, + { + "id": "AWS::EC2Spot::FleetRequest:AvailableInstancePoolsCount", + "name": "AvailableInstancePoolsCount", + "defaultStat": "Average" + }, + { + "id": "AWS::EC2Spot::FleetRequest:BidsSubmittedForCapacity", + "name": "BidsSubmittedForCapacity", + "defaultStat": "Average" + }, + { + "id": "AWS::EC2Spot::FleetRequest:EligibleInstancePoolCount", + "name": "EligibleInstancePoolCount", + "defaultStat": "Average" + }, + { + "id": "AWS::EC2Spot::FleetRequest:FulfilledCapacity", + "name": "FulfilledCapacity", + "defaultStat": "Average" + }, + { + "id": "AWS::EC2Spot::FleetRequest:PercentCapacityAllocation", + "name": "PercentCapacityAllocation", + "defaultStat": "Average" + }, + { + "id": "AWS::EC2Spot::FleetRequest:TargetCapacity", + "name": "TargetCapacity", + "defaultStat": "Average" + }, + { + "id": "AWS::EC2Spot::FleetRequest:TerminatingCapacity", + "name": "TerminatingCapacity", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "EC2Spot:CrossService", + "name": "EC2 Spot", + "dependencies": [ + { + "namespace": "AWS/EC2Spot" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2Spot::FleetRequest:PendingCapacity" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2Spot::FleetRequest:MaxPercentCapacityAllocation" + } + ] + } + ] + } + ] + }, + { + "id": "EC2Spot", + "name": "EC2 Spot", + "dependencies": [ + { + "namespace": "AWS/EC2Spot" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::EC2Spot.fleetRequests" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2Spot::FleetRequest:PendingCapacity" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2Spot::FleetRequest:MaxPercentCapacityAllocation" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2Spot::FleetRequest:AvailableInstancePoolsCount" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2Spot::FleetRequest:BidsSubmittedForCapacity" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2Spot::FleetRequest:EligibleInstancePoolCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2Spot::FleetRequest:FulfilledCapacity" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2Spot::FleetRequest:PercentCapacityAllocation" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2Spot::FleetRequest:TargetCapacity" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2Spot::FleetRequest:TerminatingCapacity" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::ECS", + "dashboard": "AWS:ECS", + "resourceTypes": [ + { + "type": "AWS::ECS::Cluster", + "keyMetric": "AWS::ECS::Cluster:CPUUtilization", + "dashboard": "AWS:ECS", + "arnRegex": ".*:cluster/(.*)" + } + ], + "controls": { + "AWS::ECS.clusters": { + "type": "resource", + "resourceType": "AWS::ECS::Cluster", + "labelField": "ClusterName", + "valueField": "ClusterName" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::ECS::Cluster", + "namespace": "AWS/ECS", + "dimensions": [ + { + "dimensionName": "ClusterName", + "labelName": "ClusterName" + } + ], + "metrics": [ + { + "id": "AWS::ECS::Cluster:CPUUtilization", + "name": "CPUUtilization", + "defaultStat": "Average" + }, + { + "id": "AWS::ECS::Cluster:MemoryUtilization", + "name": "MemoryUtilization", + "defaultStat": "Average" + }, + { + "id": "AWS::ECS::Cluster:CPUReservation", + "name": "CPUReservation", + "defaultStat": "Average" + }, + { + "id": "AWS::ECS::Cluster:MemoryReservation", + "name": "MemoryReservation", + "defaultStat": "Average" + }, + { + "id": "AWS::ECS::Cluster:GPUReservation", + "name": "GPUReservation", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "AWS:ECS", + "name": "ECS", + "dependencies": [ + { + "namespace": "AWS/ECS" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::ECS.clusters" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ECS::Cluster:CPUUtilization" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ECS::Cluster:MemoryUtilization" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ECS::Cluster:CPUReservation" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ECS::Cluster:MemoryReservation" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ECS::Cluster:GPUReservation" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "CW::ECS", + "dashboard": "ECS:Cluster", + "resourceTypes": [ + { + "type": "CW::ECS::Cluster", + "keyMetric": "CW::ECS::Cluster:MemoryUtilized", + "dashboard": "ECS:Cluster", + "drawerDashboard": "ECS:Cluster:Drawer", + "alarmPatterns": [ + { + "namespace": "AWS/ECS", + "dimensions": [ + { + "dimensionName": "ClusterName", + "labelName": "ClusterName" + }, + { + "dimensionName": "ServiceName", + "labelName": "" + } + ] + }, + { + "namespace": "ECS/ContainerInsights", + "dimensions": [ + { + "dimensionName": "ClusterName", + "labelName": "ClusterName" + }, + { + "dimensionName": "ServiceName", + "labelName": "" + }, + { + "dimensionName": "TaskDefinitionFamily", + "labelName": "" + } + ] + } + ] + }, + { + "type": "CW::ECS::ServiceName", + "keyMetric": "CW::ECS::ServiceName:MemoryUtilized", + "dashboard": "ECS:Service", + "drawerDashboard": "ECS:Service:Drawer", + "foreignKeys": [ + { + "resourceType": "CW::ECS::Cluster", + "fields": [ + "ClusterName" + ] + } + ], + "alarmPatterns": [ + { + "namespace": "AWS/ECS", + "dimensions": [ + { + "dimensionName": "ClusterName", + "labelName": "ClusterName" + }, + { + "dimensionName": "ServiceName", + "labelName": "ServiceName" + } + ] + }, + { + "namespace": "ECS/ContainerInsights", + "dimensions": [ + { + "dimensionName": "ClusterName", + "labelName": "ClusterName" + }, + { + "dimensionName": "ServiceName", + "labelName": "ServiceName" + } + ] + } + ] + }, + { + "type": "CW::ECS::Task", + "keyMetric": "CW::ECS::Task:MemoryUtilized", + "dashboard": "ECS:Task", + "drawerDashboard": "ECS:Task:Drawer", + "foreignKeys": [ + { + "resourceType": "CW::ECS::Cluster", + "fields": [ + "ClusterName" + ] + } + ], + "alarmPatterns": [ + { + "namespace": "ECS/ContainerInsights", + "dimensions": [ + { + "dimensionName": "ClusterName", + "labelName": "ClusterName" + }, + { + "dimensionName": "TaskDefinitionFamily", + "labelName": "TaskDefinitionFamily" + } + ] + } + ] + }, + { + "type": "CW::ECS::Instance", + "keyMetric": "CW::ECS::Instance:instance_memory_utilization", + "dashboard": "ECS:Instance", + "foreignKeys": [ + { + "resourceType": "CW::ECS::Cluster", + "fields": [ + "ClusterName" + ] + } + ] + } + ], + "controls": { + "CW::ECS.cluster": { + "type": "resource", + "resourceType": "CW::ECS::Cluster", + "labelField": "ClusterName", + "valueField": "ClusterName" + } + }, + "metricTemplates": [ + { + "resourceType": "CW::ECS::Cluster", + "namespace": "ECS/ContainerInsights", + "dimensions": [ + { + "dimensionName": "ClusterName", + "labelName": "ClusterName" + } + ], + "metrics": [ + { + "id": "CW::ECS::Cluster:CpuReserved", + "name": "CpuReserved", + "defaultStat": "Sum" + }, + { + "id": "CW::ECS::Cluster:CpuUtilized", + "name": "CpuUtilized", + "defaultStat": "Sum" + }, + { + "id": "CW::ECS::Cluster:MemoryReserved", + "name": "MemoryReserved", + "defaultStat": "Sum" + }, + { + "id": "CW::ECS::Cluster:MemoryUtilized", + "name": "MemoryUtilized", + "defaultStat": "Sum" + }, + { + "id": "CW::ECS::Cluster:NetworkRxBytes", + "name": "NetworkRxBytes", + "defaultStat": "Average" + }, + { + "id": "CW::ECS::Cluster:NetworkTxBytes", + "name": "NetworkTxBytes", + "defaultStat": "Average" + }, + { + "id": "CW::ECS::Cluster:ContainerInstanceCount", + "name": "ContainerInstanceCount", + "defaultStat": "Average" + }, + { + "id": "CW::ECS::Cluster:TaskCount", + "name": "TaskCount", + "defaultStat": "Average" + }, + { + "id": "CW::ECS::Cluster:ServiceCount", + "name": "ServiceCount", + "defaultStat": "Average" + } + ] + }, + { + "resourceType": "CW::ECS::Instance", + "namespace": "ECS/ContainerInsights", + "dimensions": [ + { + "dimensionName": "ClusterName", + "labelName": "ClusterName" + }, + { + "dimensionName": "InstanceId", + "labelName": "InstanceId" + }, + { + "dimensionName": "ContainerInstanceId", + "labelName": "ContainerInstanceId" + } + ], + "metrics": [ + { + "id": "CW::ECS::Instance:instance_cpu_utilization", + "name": "instance_cpu_utilization", + "defaultStat": "Average" + }, + { + "id": "CW::ECS::Instance:instance_memory_utilization", + "name": "instance_memory_utilization", + "defaultStat": "Average" + }, + { + "id": "CW::ECS::Instance:instance_network_total_bytes", + "name": "instance_network_total_bytes", + "defaultStat": "Average" + }, + { + "id": "CW::ECS::Instance:instance_number_of_running_tasks", + "name": "instance_number_of_running_tasks", + "defaultStat": "Average" + }, + { + "id": "CW::ECS::Instance:instance_cpu_reserved_capacity", + "name": "instance_cpu_reserved_capacity", + "defaultStat": "Average" + }, + { + "id": "CW::ECS::Instance:instance_memory_reserved_capacity", + "name": "instance_memory_reserved_capacity", + "defaultStat": "Average" + } + ] + }, + { + "resourceType": "CW::ECS::ServiceName", + "namespace": "ECS/ContainerInsights", + "dimensions": [ + { + "dimensionName": "ClusterName", + "labelName": "ClusterName" + }, + { + "dimensionName": "ServiceName", + "labelName": "ServiceName" + } + ], + "metrics": [ + { + "id": "CW::ECS::ServiceName:-", + "name": "-", + "defaultStat": "Average" + }, + { + "id": "CW::ECS::ServiceName:CpuReserved", + "name": "CpuReserved", + "defaultStat": "Sum" + }, + { + "id": "CW::ECS::ServiceName:CpuUtilized", + "name": "CpuUtilized", + "defaultStat": "Sum" + }, + { + "id": "CW::ECS::ServiceName:MemoryReserved", + "name": "MemoryReserved", + "defaultStat": "Sum" + }, + { + "id": "CW::ECS::ServiceName:MemoryUtilized", + "name": "MemoryUtilized", + "defaultStat": "Sum" + }, + { + "id": "CW::ECS::ServiceName:NetworkTxBytes", + "name": "NetworkTxBytes", + "defaultStat": "Average" + }, + { + "id": "CW::ECS::ServiceName:NetworkRxBytes", + "name": "NetworkRxBytes", + "defaultStat": "Average" + }, + { + "id": "CW::ECS::ServiceName:DesiredTaskCount", + "name": "DesiredTaskCount", + "defaultStat": "Average" + }, + { + "id": "CW::ECS::ServiceName:RunningTaskCount", + "name": "RunningTaskCount", + "defaultStat": "Average" + }, + { + "id": "CW::ECS::ServiceName:PendingTaskCount", + "name": "PendingTaskCount", + "defaultStat": "Average" + }, + { + "id": "CW::ECS::ServiceName:TaskSetCount", + "name": "TaskSetCount", + "defaultStat": "Average" + }, + { + "id": "CW::ECS::ServiceName:DeploymentCount", + "name": "DeploymentCount", + "defaultStat": "Average" + } + ] + }, + { + "resourceType": "CW::ECS::Task", + "namespace": "ECS/ContainerInsights", + "dimensions": [ + { + "dimensionName": "ClusterName", + "labelName": "ClusterName" + }, + { + "dimensionName": "TaskDefinitionFamily", + "labelName": "TaskDefinitionFamily" + } + ], + "metrics": [ + { + "id": "CW::ECS::Task:CpuReserved", + "name": "CpuReserved", + "defaultStat": "Sum" + }, + { + "id": "CW::ECS::Task:CpuUtilized", + "name": "CpuUtilized", + "defaultStat": "Sum" + }, + { + "id": "CW::ECS::Task:MemoryReserved", + "name": "MemoryReserved", + "defaultStat": "Sum" + }, + { + "id": "CW::ECS::Task:MemoryUtilized", + "name": "MemoryUtilized", + "defaultStat": "Sum" + }, + { + "id": "CW::ECS::Task:NetworkTxBytes", + "name": "NetworkTxBytes", + "defaultStat": "Average" + }, + { + "id": "CW::ECS::Task:NetworkRxBytes", + "name": "NetworkRxBytes", + "defaultStat": "Average" + }, + { + "id": "CW::ECS::Task:StorageReadBytes", + "name": "StorageReadBytes", + "defaultStat": "Average" + }, + { + "id": "CW::ECS::Task:StorageWriteBytes", + "name": "StorageWriteBytes", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "ECS:Cluster:Drawer", + "rows": [ + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "CPUUtilization", + "yAxis": { + "left": { + "min": 0, + "showUnits": false, + "label": "Percent" + } + } + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "CPU (avg)" + }, + "metricExpression": "mm1 * 100 / mm0", + "resourceType": "CW::ECS::Cluster" + }, + { + "metricOptions": { + "id": "mm0", + "visible": false + }, + "metricTemplate": "CW::ECS::Cluster:CpuReserved" + }, + { + "metricOptions": { + "id": "mm1", + "visible": false + }, + "metricTemplate": "CW::ECS::Cluster:CpuUtilized" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "MemoryUtilization", + "yAxis": { + "left": { + "min": 0, + "showUnits": false, + "label": "Percent" + } + } + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "Memory (avg)" + }, + "metricExpression": "mm1 * 100 / mm0", + "resourceType": "CW::ECS::Cluster" + }, + { + "metricOptions": { + "id": "mm0", + "visible": false + }, + "metricTemplate": "CW::ECS::Cluster:MemoryReserved" + }, + { + "metricOptions": { + "id": "mm1", + "visible": false + }, + "metricTemplate": "CW::ECS::Cluster:MemoryUtilized" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "Network", + "yAxis": { + "left": { + "showUnits": false, + "label": "Bytes/Second" + }, + "right": { + "showUnits": false, + "label": "Bytes/Second" + } + } + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "RX (avg)", + "yAxis": "left" + }, + "metricExpression": "RATE(mm0)", + "resourceType": "CW::ECS::Cluster" + }, + { + "metricOptions": { + "id": "expr2", + "label": "TX (avg)", + "yAxis": "right" + }, + "metricExpression": "RATE(mm1)", + "resourceType": "CW::ECS::Cluster" + }, + { + "metricOptions": { + "id": "mm0", + "visible": false + }, + "metricTemplate": "CW::ECS::Cluster:NetworkRxBytes" + }, + { + "metricOptions": { + "id": "mm1", + "visible": false + }, + "metricTemplate": "CW::ECS::Cluster:NetworkTxBytes" + } + ] + } + ] + } + ] + }, + { + "id": "ECS:Cluster", + "name": "ECS Cluster", + "dependencies": [ + { + "namespace": "ECS/ContainerInsights" + } + ], + "controls": [ + "CW::ECS.cluster" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "CPUUtilization", + "yAxis": { + "left": { + "min": 0, + "showUnits": false, + "label": "Percent" + } + } + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "{ClusterName}" + }, + "metricExpression": "mm1 * 100 / mm0", + "resourceType": "CW::ECS::Cluster" + }, + { + "metricOptions": { + "id": "mm0", + "visible": false + }, + "metricTemplate": "CW::ECS::Cluster:CpuReserved" + }, + { + "metricOptions": { + "id": "mm1", + "visible": false + }, + "metricTemplate": "CW::ECS::Cluster:CpuUtilized" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "MemoryUtilization", + "yAxis": { + "left": { + "min": 0, + "showUnits": false, + "label": "Percent" + } + } + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "{ClusterName}" + }, + "metricExpression": "mm1 * 100 / mm0", + "resourceType": "CW::ECS::Cluster" + }, + { + "metricOptions": { + "id": "mm0", + "visible": false + }, + "metricTemplate": "CW::ECS::Cluster:MemoryReserved" + }, + { + "metricOptions": { + "id": "mm1", + "visible": false + }, + "metricTemplate": "CW::ECS::Cluster:MemoryUtilized" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "Network", + "yAxis": { + "left": { + "showUnits": false, + "label": "Bytes/Second" + } + } + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "{ClusterName}" + }, + "metricExpression": "RATE(mm0) + RATE(mm1)", + "resourceType": "CW::ECS::Cluster" + }, + { + "metricOptions": { + "id": "mm0", + "visible": false + }, + "metricTemplate": "CW::ECS::Cluster:NetworkRxBytes" + }, + { + "metricOptions": { + "id": "mm1", + "visible": false + }, + "metricTemplate": "CW::ECS::Cluster:NetworkTxBytes" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "ContainerInstanceCount" + }, + "metrics": [ + { + "metricTemplate": "CW::ECS::Cluster:ContainerInstanceCount" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "TaskCount" + }, + "metrics": [ + { + "metricTemplate": "CW::ECS::Cluster:TaskCount" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "ServiceCount" + }, + "metrics": [ + { + "metricTemplate": "CW::ECS::Cluster:ServiceCount" + } + ] + } + ] + } + ] + }, + { + "id": "ECS:Instance", + "name": "ECS Instance", + "dependencies": [ + { + "namespace": "ECS/ContainerInsights" + } + ], + "controls": [ + "CW::ECS.cluster" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "CPUUtilization" + }, + "metrics": [ + { + "metricTemplate": "CW::ECS::Instance:instance_cpu_utilization" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "MemoryUtilization" + }, + "metrics": [ + { + "metricTemplate": "CW::ECS::Instance:instance_memory_utilization" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "Network" + }, + "metrics": [ + { + "metricTemplate": "CW::ECS::Instance:instance_network_total_bytes" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "DiskUtilization" + }, + "metrics": [ + { + "metricTemplate": "CW::ECS::Instance:instance_cpu_utilization" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "ECS:Instance.NumberOfTasks" + }, + "metrics": [ + { + "metricTemplate": "CW::ECS::Instance:instance_number_of_running_tasks" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "ECS:Instance.CPUReservedCapacity" + }, + "metrics": [ + { + "metricTemplate": "CW::ECS::Instance:instance_cpu_reserved_capacity" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "ECS:Instance.MemoryReservedCapacity" + }, + "metrics": [ + { + "metricTemplate": "CW::ECS::Instance:instance_memory_reserved_capacity" + } + ] + } + ] + } + ] + }, + { + "id": "ECS:Service:Drawer", + "rows": [ + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "CPUUtilization", + "yAxis": { + "left": { + "min": 0, + "showUnits": false, + "label": "Percent" + } + } + }, + "metrics": [ + { + "metricExpression": "mm1 * 100 / mm0", + "resourceType": "CW::ECS::ServiceName", + "metricOptions": { + "id": "expr1", + "label": "{ServiceName}" + } + }, + { + "metricTemplate": "CW::ECS::ServiceName:CpuReserved", + "metricOptions": { + "id": "mm0", + "visible": false + } + }, + { + "metricTemplate": "CW::ECS::ServiceName:CpuUtilized", + "metricOptions": { + "id": "mm1", + "visible": false + } + } + ] + }, + { + "type": "chart", + "properties": { + "title": "MemoryUtilization", + "yAxis": { + "left": { + "min": 0, + "showUnits": false, + "label": "Percent" + } + } + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "{ServiceName}" + }, + "metricExpression": "mm1 * 100 / mm0", + "resourceType": "CW::ECS::ServiceName" + }, + { + "metricOptions": { + "id": "mm0", + "visible": false + }, + "metricTemplate": "CW::ECS::ServiceName:MemoryReserved" + }, + { + "metricOptions": { + "id": "mm1", + "visible": false + }, + "metricTemplate": "CW::ECS::ServiceName:MemoryUtilized" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "Network", + "yAxis": { + "left": { + "showUnits": false, + "label": "Bytes/Second" + }, + "right": { + "showUnits": false, + "label": "Bytes/Second" + } + } + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "TX (avg)", + "yAxis": "right" + }, + "metricExpression": "RATE(mm0)", + "resourceType": "CW::ECS::ServiceName" + }, + { + "metricOptions": { + "id": "mm0", + "visible": false + }, + "metricTemplate": "CW::ECS::ServiceName:NetworkTxBytes" + }, + { + "metricOptions": { + "id": "expr2", + "label": "RX (avg)", + "yAxis": "left" + }, + "metricExpression": "RATE(mm1)", + "resourceType": "CW::ECS::ServiceName" + }, + { + "metricOptions": { + "id": "mm1", + "visible": false + }, + "metricTemplate": "CW::ECS::ServiceName:NetworkRxBytes" + } + ] + } + ] + } + ] + }, + { + "id": "ECS:Service", + "name": "ECS Service", + "dependencies": [ + { + "namespace": "ECS/ContainerInsights" + } + ], + "controls": [ + "CW::ECS.cluster" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "CPUUtilization", + "yAxis": { + "left": { + "min": 0, + "showUnits": false, + "label": "Percent" + } + } + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "{ServiceName}" + }, + "metricExpression": "mm1 * 100 / mm0", + "resourceType": "CW::ECS::ServiceName" + }, + { + "metricOptions": { + "id": "mm0", + "visible": false + }, + "metricTemplate": "CW::ECS::ServiceName:CpuReserved" + }, + { + "metricOptions": { + "id": "mm1", + "visible": false + }, + "metricTemplate": "CW::ECS::ServiceName:CpuUtilized" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "MemoryUtilization", + "yAxis": { + "left": { + "min": 0, + "showUnits": false, + "label": "Percent" + } + } + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "{ServiceName}" + }, + "metricExpression": "mm1 * 100 / mm0", + "resourceType": "CW::ECS::ServiceName" + }, + { + "metricOptions": { + "id": "mm0", + "visible": false + }, + "metricTemplate": "CW::ECS::ServiceName:MemoryReserved" + }, + { + "metricOptions": { + "id": "mm1", + "visible": false + }, + "metricTemplate": "CW::ECS::ServiceName:MemoryUtilized" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "NetworkTX", + "yAxis": { + "left": { + "showUnits": false, + "label": "Bytes/Second" + } + } + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "{ServiceName}" + }, + "metricExpression": "RATE(mm0)", + "resourceType": "CW::ECS::ServiceName" + }, + { + "metricOptions": { + "id": "mm0", + "visible": false + }, + "metricTemplate": "CW::ECS::ServiceName:NetworkTxBytes" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "NetworkRX", + "yAxis": { + "left": { + "showUnits": false, + "label": "Bytes/Second" + } + } + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "{ServiceName}" + }, + "metricExpression": "RATE(mm0)", + "resourceType": "CW::ECS::ServiceName" + }, + { + "metricOptions": { + "id": "mm0", + "visible": false + }, + "metricTemplate": "CW::ECS::ServiceName:NetworkRxBytes" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "ECS:Services.DesiredTaskCount" + }, + "metrics": [ + { + "metricTemplate": "CW::ECS::ServiceName:DesiredTaskCount" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "ECS:Services.RunningTaskCount" + }, + "metrics": [ + { + "metricTemplate": "CW::ECS::ServiceName:RunningTaskCount" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "ECS:Services.PendingTaskCount" + }, + "metrics": [ + { + "metricTemplate": "CW::ECS::ServiceName:PendingTaskCount" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "ECS:Services.TaskSetCount" + }, + "metrics": [ + { + "metricTemplate": "CW::ECS::ServiceName:TaskSetCount" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "ECS:Services.DeploymentCount" + }, + "metrics": [ + { + "metricTemplate": "CW::ECS::ServiceName:DeploymentCount" + } + ] + } + ] + } + ] + }, + { + "id": "ECS:Task:Drawer", + "rows": [ + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "CPUUtilization", + "yAxis": { + "left": { + "min": 0, + "showUnits": false, + "label": "Percent" + } + } + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "CPU (avg)" + }, + "metricExpression": "mm1 * 100 / mm0", + "resourceType": "CW::ECS::Task" + }, + { + "metricTemplate": "CW::ECS::Task:CpuReserved", + "metricOptions": { + "id": "mm0", + "visible": false + } + }, + { + "metricTemplate": "CW::ECS::Task:CpuUtilized", + "metricOptions": { + "id": "mm1", + "visible": false + } + } + ] + }, + { + "type": "chart", + "properties": { + "title": "MemoryUtilization", + "yAxis": { + "left": { + "min": 0, + "showUnits": false, + "label": "Percent" + } + } + }, + "metrics": [ + { + "metricExpression": "mm1 * 100 / mm0", + "resourceType": "CW::ECS::Task", + "metricOptions": { + "id": "expr1", + "label": "Memory (avg)" + } + }, + { + "metricTemplate": "CW::ECS::Task:MemoryReserved", + "metricOptions": { + "id": "mm0", + "visible": false + } + }, + { + "metricTemplate": "CW::ECS::Task:MemoryUtilized", + "metricOptions": { + "id": "mm1", + "visible": false + } + } + ] + }, + { + "type": "chart", + "properties": { + "title": "Network", + "yAxis": { + "left": { + "showUnits": false, + "label": "Bytes/Second" + }, + "right": { + "showUnits": false, + "label": "Bytes/Second" + } + } + }, + "metrics": [ + { + "metricExpression": "RATE(mm0)", + "resourceType": "CW::ECS::Task", + "metricOptions": { + "id": "expr1", + "label": "TX (avg)", + "yAxis": "right" + } + }, + { + "metricTemplate": "CW::ECS::Task:NetworkTxBytes", + "metricOptions": { + "id": "mm0", + "visible": false + } + }, + { + "metricExpression": "RATE(mm1)", + "resourceType": "CW::ECS::Task", + "metricOptions": { + "id": "expr2", + "label": "RX (avg)", + "yAxis": "left" + } + }, + { + "metricTemplate": "CW::ECS::Task:NetworkRxBytes", + "metricOptions": { + "id": "mm1", + "visible": false + } + } + ] + } + ] + } + ] + }, + { + "id": "ECS:Task", + "name": "ECS Task", + "dependencies": [ + { + "namespace": "ECS/ContainerInsights" + } + ], + "controls": [ + "CW::ECS.cluster" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "CPUUtilization", + "yAxis": { + "left": { + "min": 0, + "showUnits": false, + "label": "Percent" + } + } + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "{TaskDefinitionFamily}" + }, + "metricExpression": "mm1 * 100 / mm0", + "resourceType": "CW::ECS::Task" + }, + { + "metricOptions": { + "id": "mm0", + "visible": false + }, + "metricTemplate": "CW::ECS::Task:CpuReserved" + }, + { + "metricOptions": { + "id": "mm1", + "visible": false + }, + "metricTemplate": "CW::ECS::Task:CpuUtilized" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "MemoryUtilization", + "yAxis": { + "left": { + "min": 0, + "showUnits": false, + "label": "Percent" + } + } + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "{TaskDefinitionFamily}" + }, + "metricExpression": "mm1 * 100 / mm0", + "resourceType": "CW::ECS::Task" + }, + { + "metricOptions": { + "id": "mm0", + "visible": false + }, + "metricTemplate": "CW::ECS::Task:MemoryReserved" + }, + { + "metricOptions": { + "id": "mm1", + "visible": false + }, + "metricTemplate": "CW::ECS::Task:MemoryUtilized" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "NetworkTX", + "yAxis": { + "left": { + "showUnits": false, + "label": "Bytes/Second" + } + } + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "{TaskDefinitionFamily}" + }, + "metricExpression": "RATE(mm0)", + "resourceType": "CW::ECS::Task" + }, + { + "metricOptions": { + "id": "mm0", + "visible": false + }, + "metricTemplate": "CW::ECS::Task:NetworkTxBytes" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "NetworkRX", + "yAxis": { + "left": { + "showUnits": false, + "label": "Bytes/Second" + } + } + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "{TaskDefinitionFamily}" + }, + "metricExpression": "RATE(mm0)", + "resourceType": "CW::ECS::Task" + }, + { + "metricOptions": { + "id": "mm0", + "visible": false + }, + "metricTemplate": "CW::ECS::Task:NetworkRxBytes" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "ECS:Task.StorageReadBytes" + }, + "metrics": [ + { + "metricTemplate": "CW::ECS::Task:StorageReadBytes" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "ECS:Task.StorageWriteBytes" + }, + "metrics": [ + { + "metricTemplate": "CW::ECS::Task:StorageWriteBytes" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::EFS", + "dashboard": "EFS", + "crossServiceDashboard": "EFS:CrossService", + "resourceTypes": [ + { + "type": "AWS::EFS::FileSystem", + "keyMetric": "AWS::EFS::FileSystem:PermittedThroughput", + "dashboard": "EFS", + "arnRegex": ".*:file-system/(.*)" + } + ], + "controls": { + "AWS::EFS.filesystems": { + "type": "resource", + "resourceType": "AWS::EFS::FileSystem", + "labelField": "FileSystemId", + "valueField": "FileSystemId" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::EFS::FileSystem", + "namespace": "AWS/EFS", + "dimensions": [ + { + "dimensionName": "FileSystemId", + "labelName": "FileSystemId" + } + ], + "metrics": [ + { + "id": "AWS::EFS::FileSystem:DataReadIOBytes", + "name": "DataReadIOBytes", + "defaultStat": "Average" + }, + { + "id": "AWS::EFS::FileSystem:DataWriteIOBytes", + "name": "DataWriteIOBytes", + "defaultStat": "Average" + }, + { + "id": "AWS::EFS::FileSystem:ClientConnections", + "name": "ClientConnections", + "defaultStat": "Sum" + }, + { + "id": "AWS::EFS::FileSystem:BurstCreditBalance", + "name": "BurstCreditBalance", + "defaultStat": "Average" + }, + { + "id": "AWS::EFS::FileSystem:PercentIOLimit", + "name": "PercentIOLimit", + "defaultStat": "Average" + }, + { + "id": "AWS::EFS::FileSystem:PermittedThroughput", + "name": "PermittedThroughput", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "EFS:CrossService", + "name": "EFS", + "dependencies": [ + { + "namespace": "AWS/EFS" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EFS::FileSystem:DataReadIOBytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EFS::FileSystem:DataWriteIOBytes" + } + ] + } + ] + } + ] + }, + { + "id": "EFS", + "name": "EFS", + "dependencies": [ + { + "namespace": "AWS/EFS" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::EFS.filesystems" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EFS::FileSystem:ClientConnections" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EFS::FileSystem:DataReadIOBytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EFS::FileSystem:DataWriteIOBytes" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EFS::FileSystem:BurstCreditBalance" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EFS::FileSystem:PercentIOLimit" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EFS::FileSystem:PermittedThroughput" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "CW::EKS", + "dashboard": "EKS:Cluster", + "resourceTypes": [ + { + "type": "CW::EKS::Cluster", + "keyMetric": "CW::EKS::Cluster:pod_cpu_utilization", + "dashboard": "EKS:Cluster", + "drawerDashboard": "EKS:Cluster:Drawer", + "alarmPatterns": [ + { + "namespace": "ContainerInsights", + "dimensions": [ + { + "dimensionName": "ClusterName", + "labelName": "ClusterName" + }, + { + "dimensionName": "Namespace", + "labelName": "" + }, + { + "dimensionName": "Service", + "labelName": "" + }, + { + "dimensionName": "PodName", + "labelName": "" + }, + { + "dimensionName": "NodeName", + "labelName": "" + } + ] + } + ] + }, + { + "type": "CW::EKS::Node", + "keyMetric": "CW::EKS::Node:node_cpu_utilization", + "dashboard": "EKS:Node", + "foreignKeys": [ + { + "resourceType": "CW::EKS::Cluster", + "fields": [ + "ClusterName" + ] + } + ] + }, + { + "type": "CW::EKS::Namespace", + "keyMetric": "CW::EKS::Namespace:pod_cpu_utilization", + "dashboard": "EKS:Namespace", + "drawerDashboard": "EKS:Namespace:Drawer", + "foreignKeys": [ + { + "resourceType": "CW::EKS::Cluster", + "fields": [ + "ClusterName" + ] + } + ], + "alarmPatterns": [ + { + "namespace": "ContainerInsights", + "dimensions": [ + { + "dimensionName": "ClusterName", + "labelName": "ClusterName" + }, + { + "dimensionName": "Namespace", + "labelName": "Namespace" + }, + { + "dimensionName": "Service", + "labelName": "" + }, + { + "dimensionName": "PodName", + "labelName": "" + }, + { + "dimensionName": "NodeName", + "labelName": "" + } + ] + } + ] + }, + { + "type": "CW::EKS::Service", + "keyMetric": "CW::EKS::Service:pod_cpu_utilization", + "dashboard": "EKS:Service", + "drawerDashboard": "EKS:Service:Drawer", + "foreignKeys": [ + { + "resourceType": "CW::EKS::Cluster", + "fields": [ + "ClusterName" + ] + }, + { + "resourceType": "CW::EKS::Namespace", + "fields": [ + "Namespace" + ] + } + ], + "alarmPatterns": [ + { + "namespace": "ContainerInsights", + "dimensions": [ + { + "dimensionName": "ClusterName", + "labelName": "ClusterName" + }, + { + "dimensionName": "Namespace", + "labelName": "Namespace" + }, + { + "dimensionName": "Service", + "labelName": "Service" + } + ] + }, + { + "namespace": "ContainerInsights/Prometheus", + "dimensions": [ + { + "dimensionName": "ClusterName", + "labelName": "ClusterName" + }, + { + "dimensionName": "Namespace", + "labelName": "Namespace" + }, + { + "dimensionName": "Service", + "labelName": "Service" + } + ] + } + ] + }, + { + "type": "CW::EKS::Pod", + "keyMetric": "CW::EKS::Pod:pod_cpu_utilization", + "dashboard": "EKS:Pod", + "drawerDashboard": "EKS:Pod:Drawer", + "foreignKeys": [ + { + "resourceType": "CW::EKS::Cluster", + "fields": [ + "ClusterName" + ] + }, + { + "resourceType": "CW::EKS::Namespace", + "fields": [ + "Namespace" + ] + } + ], + "alarmPatterns": [ + { + "namespace": "ContainerInsights", + "dimensions": [ + { + "dimensionName": "ClusterName", + "labelName": "ClusterName" + }, + { + "dimensionName": "Namespace", + "labelName": "Namespace" + }, + { + "dimensionName": "PodName", + "labelName": "PodName" + } + ] + } + ] + }, + { + "type": "CW::EKS::Nginx", + "keyMetric": "CW::EKS::Nginx:nginx_ingress_controller_requests", + "dashboard": "EKS:Nginx" + }, + { + "type": "CW::EKS::AppMesh", + "keyMetric": "CW::EKS::AppMesh:envoy_server_memory_allocated", + "dashboard": "EKS:AppMesh" + }, + { + "type": "CW::EKS::JavaJMX", + "keyMetric": "CW::EKS::JavaJMX:java_lang_operatingsystem_totalphysicalmemorysize", + "dashboard": "EKS:JavaJMX" + } + ], + "controls": { + "CW::EKS.service": { + "type": "resource", + "resourceType": "CW::EKS::Service", + "labelField": "Service", + "valueField": "Service", + "resourceDashboard": "EKS:Service", + "serviceDashboard": "EKS:Service" + }, + "CW::EKS.pod": { + "type": "resource", + "resourceType": "CW::EKS::Pod", + "labelField": "PodName", + "valueField": "PodName", + "resourceDashboard": "EKS:Pod", + "serviceDashboard": "EKS:Pod" + }, + "CW::EKS.namespace": { + "type": "resource", + "resourceType": "CW::EKS::Namespace", + "labelField": "Namespace", + "valueField": "Namespace", + "resourceDashboard": "EKS:Namespace", + "serviceDashboard": "EKS:Namespace" + }, + "CW::EKS.cluster": { + "type": "resource", + "resourceType": "CW::EKS::Cluster", + "labelField": "ClusterName", + "valueField": "ClusterName" + }, + "CW::EKS.node": { + "type": "resource", + "resourceType": "CW::EKS::Node", + "labelField": "NodeName", + "valueField": "NodeName" + } + }, + "metricTemplates": [ + { + "resourceType": "CW::EKS::Cluster", + "namespace": "ContainerInsights", + "dimensions": [ + { + "dimensionName": "ClusterName", + "labelName": "ClusterName" + } + ], + "metrics": [ + { + "id": "CW::EKS::Cluster:node_cpu_limit", + "name": "node_cpu_limit", + "defaultStat": "Sum" + }, + { + "id": "CW::EKS::Cluster:node_cpu_usage_total", + "name": "node_cpu_usage_total", + "defaultStat": "Sum" + }, + { + "id": "CW::EKS::Cluster:node_memory_limit", + "name": "node_memory_limit", + "defaultStat": "Sum" + }, + { + "id": "CW::EKS::Cluster:node_memory_working_set", + "name": "node_memory_working_set", + "defaultStat": "Sum" + }, + { + "id": "CW::EKS::Cluster:pod_network_rx_bytes", + "name": "pod_network_rx_bytes", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Cluster:pod_network_tx_bytes", + "name": "pod_network_tx_bytes", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Cluster:node_network_total_bytes", + "name": "node_network_total_bytes", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Cluster:cluster_failed_node_count", + "name": "cluster_failed_node_count", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Cluster:node_filesystem_utilization", + "name": "node_filesystem_utilization", + "defaultStat": "p90" + }, + { + "id": "CW::EKS::Cluster:cluster_node_count", + "name": "cluster_node_count", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Cluster:pod_cpu_utilization", + "name": "pod_cpu_utilization", + "defaultStat": "Average" + } + ] + }, + { + "resourceType": "CW::EKS::Namespace", + "namespace": "ContainerInsights", + "dimensions": [ + { + "dimensionName": "Namespace", + "labelName": "Namespace" + }, + { + "dimensionName": "ClusterName", + "labelName": "ClusterName" + } + ], + "metrics": [ + { + "id": "CW::EKS::Namespace:pod_cpu_utilization", + "name": "pod_cpu_utilization", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Namespace:pod_memory_utilization", + "name": "pod_memory_utilization", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Namespace:pod_network_tx_bytes", + "name": "pod_network_tx_bytes", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Namespace:pod_network_rx_bytes", + "name": "pod_network_rx_bytes", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Namespace:pod_cpu_utilization_over_pod_limit", + "name": "pod_cpu_utilization_over_pod_limit", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Namespace:pod_memory_utilization_over_pod_limit", + "name": "pod_memory_utilization_over_pod_limit", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Namespace:namespace_number_of_running_pods", + "name": "namespace_number_of_running_pods", + "defaultStat": "Average" + } + ] + }, + { + "resourceType": "CW::EKS::Service", + "namespace": "ContainerInsights", + "dimensions": [ + { + "dimensionName": "Service", + "labelName": "Service" + }, + { + "dimensionName": "Namespace", + "labelName": "Namespace" + }, + { + "dimensionName": "ClusterName", + "labelName": "ClusterName" + } + ], + "metrics": [ + { + "id": "CW::EKS::Service:nginx_ingress_controller_requests", + "name": "nginx_ingress_controller_requests", + "defaultStat": "Sum" + }, + { + "id": "CW::EKS::Service:nginx_ingress_controller_nginx_process_connections", + "name": "nginx_ingress_controller_nginx_process_connections", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Service:nginx_ingress_controller_nginx_process_cpu_seconds_total", + "name": "nginx_ingress_controller_nginx_process_cpu_seconds_total", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Service:nginx_ingress_controller_nginx_process_resident_memory_bytes", + "name": "nginx_ingress_controller_nginx_process_resident_memory_bytes", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Service:pod_cpu_utilization", + "name": "pod_cpu_utilization", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Service:pod_memory_utilization", + "name": "pod_memory_utilization", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Service:pod_network_tx_bytes", + "name": "pod_network_tx_bytes", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Service:pod_network_rx_bytes", + "name": "pod_network_rx_bytes", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Service:pod_cpu_utilization_over_pod_limit", + "name": "pod_cpu_utilization_over_pod_limit", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Service:pod_memory_utilization_over_pod_limit", + "name": "pod_memory_utilization_over_pod_limit", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Service:service_number_of_running_pods", + "name": "service_number_of_running_pods", + "defaultStat": "Average" + } + ] + }, + { + "resourceType": "CW::EKS::Node", + "namespace": "ContainerInsights", + "dimensions": [ + { + "dimensionName": "InstanceId", + "labelName": "InstanceId" + }, + { + "dimensionName": "NodeName", + "labelName": "NodeName" + }, + { + "dimensionName": "ClusterName", + "labelName": "ClusterName" + } + ], + "metrics": [ + { + "id": "CW::EKS::Node:node_cpu_utilization", + "name": "node_cpu_utilization", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Node:node_cpu_reserved_capacity", + "name": "node_cpu_reserved_capacity", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Node:node_memory_utilization", + "name": "node_memory_utilization", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Node:node_memory_reserved_capacity", + "name": "node_memory_reserved_capacity", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Node:node_filesystem_utilization", + "name": "node_filesystem_utilization", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Node:node_network_total_bytes", + "name": "node_network_total_bytes", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Node:node_number_of_running_pods", + "name": "node_number_of_running_pods", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Node:node_number_of_running_containers", + "name": "node_number_of_running_containers", + "defaultStat": "Average" + } + ] + }, + { + "resourceType": "CW::EKS::Pod", + "namespace": "ContainerInsights", + "dimensions": [ + { + "dimensionName": "PodName", + "labelName": "PodName" + }, + { + "dimensionName": "Namespace", + "labelName": "Namespace" + }, + { + "dimensionName": "ClusterName", + "labelName": "ClusterName" + } + ], + "metrics": [ + { + "id": "CW::EKS::Pod:pod_cpu_utilization", + "name": "pod_cpu_utilization", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Pod:pod_memory_utilization", + "name": "pod_memory_utilization", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Pod:pod_network_tx_bytes", + "name": "pod_network_tx_bytes", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Pod:pod_network_rx_bytes", + "name": "pod_network_rx_bytes", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Pod:pod_cpu_utilization_over_pod_limit", + "name": "pod_cpu_utilization_over_pod_limit", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Pod:pod_memory_utilization_over_pod_limit", + "name": "pod_memory_utilization_over_pod_limit", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Pod:pod_cpu_reserved_capacity", + "name": "pod_cpu_reserved_capacity", + "defaultStat": "Average" + }, + { + "id": "CW::EKS::Pod:pod_memory_reserved_capacity", + "name": "pod_memory_reserved_capacity", + "defaultStat": "Average" + } + ] + }, + { + "resourceType": "CW::EKS::Nginx", + "namespace": "ContainerInsights/Prometheus", + "dimensions": [ + { + "dimensionName": "Service", + "labelName": "Service" + }, + { + "dimensionName": "Namespace", + "labelName": "Namespace" + }, + { + "dimensionName": "ClusterName", + "labelName": "ClusterName" + } + ], + "metrics": [ + { + "id": "CW::EKS::Nginx:nginx_ingress_controller_requests", + "name": "nginx_ingress_controller_requests", + "defaultStat": "Sum" + } + ] + }, + { + "resourceType": "CW::EKS::AppMesh", + "namespace": "ContainerInsights/Prometheus", + "dimensions": [ + { + "dimensionName": "Namespace", + "labelName": "Namespace" + }, + { + "dimensionName": "ClusterName", + "labelName": "ClusterName" + } + ], + "metrics": [ + { + "id": "CW::EKS::AppMesh:envoy_server_memory_allocated", + "name": "envoy_server_memory_allocated", + "defaultStat": "Sum" + } + ] + }, + { + "resourceType": "CW::EKS::JavaJMX", + "namespace": "ContainerInsights/Prometheus", + "dimensions": [ + { + "dimensionName": "Namespace", + "labelName": "Namespace" + }, + { + "dimensionName": "ClusterName", + "labelName": "ClusterName" + } + ], + "metrics": [ + { + "id": "CW::EKS::JavaJMX:java_lang_operatingsystem_totalphysicalmemorysize", + "name": "java_lang_operatingsystem_totalphysicalmemorysize", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "EKS:AppMesh", + "name": "EKS AppMesh Report", + "dependencies": [ + { + "namespace": "ContainerInsights" + }, + { + "namespace": "ContainerInsights/Prometheus" + } + ], + "controls": [ + "CW::EKS.cluster" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "width": 4, + "properties": { + "title": "EKS:AppMesh.MeshedPods", + "view": "singleValue" + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "{ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName, Namespace} envoy_server_live ClusterName=\"{ClusterName}\"', 'Sum', 60))" + } + ] + }, + { + "type": "chart", + "width": 4, + "properties": { + "title": "EKS:AppMesh.RPS", + "view": "singleValue" + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "{ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" envoy_http_downstream_rq_total', 'Sum', 60))/60" + } + ] + }, + { + "type": "chart", + "width": 4, + "properties": { + "title": "EKS:AppMesh.FailuresPerSecond", + "view": "singleValue" + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "{ClusterName}" + }, + "resourceType": false, + "metricExpression": "(SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace,envoy_http_conn_manager_prefix,envoy_response_code_class} envoy_http_downstream_rq_xx$ {ClusterName} (envoy_http_conn_manager_prefix=\"ingress\" OR envoy_http_conn_manager_prefix=\"egress\") envoy_response_code_class=\"4\"', 'Sum', 60)) + SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace,envoy_http_conn_manager_prefix,envoy_response_code_class} envoy_http_downstream_rq_xx$ {ClusterName} (envoy_http_conn_manager_prefix=\"ingress\" OR envoy_http_conn_manager_prefix=\"egress\") envoy_response_code_class=\"5\"', 'Sum', 60)))/60" + } + ] + }, + { + "type": "chart", + "width": 6, + "properties": { + "title": "EKS:AppMesh.EnvoyHeap", + "view": "singleValue" + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "{ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" envoy_server_memory_heap_size', 'Sum', 60))" + } + ] + }, + { + "type": "chart", + "width": 6, + "properties": { + "title": "EKS:AppMesh.MemoryUsage", + "view": "singleValue" + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "{ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" envoy_server_memory_allocated', 'Sum', 60))" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "width": 4, + "properties": { + "title": "EKS:AppMesh.AverageUptime", + "view": "singleValue" + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "{ClusterName}" + }, + "resourceType": false, + "metricExpression": "AVG(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" envoy_server_uptime', 'Average', 60)/3600))" + } + ] + }, + { + "type": "chart", + "width": 4, + "properties": { + "title": "EKS:AppMesh.InboundTraffic", + "view": "singleValue" + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "{ClusterName}" + }, + "resourceType": false, + "metricExpression": " SUM(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" envoy_cluster_upstream_cx_rx_bytes_total', 'Sum', 60)))/60" + } + ] + }, + { + "type": "chart", + "width": 4, + "properties": { + "title": "EKS:AppMesh.OutboundTraffic", + "view": "singleValue" + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "{ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" envoy_cluster_upstream_cx_tx_bytes_total', 'Sum', 60)))/60" + } + ] + }, + { + "type": "chart", + "width": 6, + "properties": { + "title": "EKS:AppMesh.UnhealthyPods", + "view": "singleValue" + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "{ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" envoy_cluster_membership_total', 'Sum', 60))) - SUM(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" envoy_cluster_membership_healthy', 'Sum', 60)))" + } + ] + }, + { + "type": "chart", + "width": 6, + "properties": { + "title": "EKS:AppMesh.ConnectionTimeouts", + "view": "singleValue" + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "{ClusterName}" + }, + "resourceType": false, + "metricExpression": "AVG(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} envoy_cluster_upstream_cx_connect_timeout ClusterName=\"{ClusterName}\"', 'Average', 60)))" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "EKS:AppMesh.InboundOutboundTraffic" + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "InBound (TX) {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" envoy_cluster_upstream_cx_rx_bytes_total', 'Sum', 60)))/60" + }, + { + "metricOptions": { + "id": "expr2", + "label": "OutBound (RX) {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" envoy_cluster_upstream_cx_tx_bytes_total', 'Sum', 60)))/60" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "EKS:AppMesh.IngressHttpRequestsPerSecond" + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "[avg: ${AVG}] HTTP 1XX {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace,envoy_http_conn_manager_prefix,envoy_response_code_class} envoy_http_downstream_rq_xx ClusterName=\"{ClusterName}\" envoy_http_conn_manager_prefix=\"ingress\" envoy_response_code_class=\"1\"', 'Sum', 60))/60" + }, + { + "metricOptions": { + "id": "expr2", + "label": "[avg: ${AVG}] HTTP 2XX {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace,envoy_http_conn_manager_prefix,envoy_response_code_class} envoy_http_downstream_rq_xx ClusterName=\"{ClusterName}\" envoy_http_conn_manager_prefix=\"ingress\" envoy_response_code_class=\"2\"', 'Sum', 60))/60" + }, + { + "metricOptions": { + "id": "expr3", + "label": "[avg: ${AVG}] HTTP 3XX {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace,envoy_http_conn_manager_prefix,envoy_response_code_class} envoy_http_downstream_rq_xx ClusterName=\"{ClusterName}\" envoy_http_conn_manager_prefix=\"ingress\" envoy_response_code_class=\"3\"', 'Sum', 60))/60" + }, + { + "metricOptions": { + "id": "expr4", + "label": "[avg: ${AVG}] HTTP 4XX {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace,envoy_http_conn_manager_prefix,envoy_response_code_class} envoy_http_downstream_rq_xx ClusterName=\"{ClusterName}\" envoy_http_conn_manager_prefix=\"ingress\" envoy_response_code_class=\"4\"', 'Sum', 60))/60" + }, + { + "metricOptions": { + "id": "expr5", + "label": "[avg: ${AVG}] HTTP 5XX {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace,envoy_http_conn_manager_prefix,envoy_response_code_class} envoy_http_downstream_rq_xx ClusterName=\"{ClusterName}\" envoy_http_conn_manager_prefix=\"ingress\" envoy_response_code_class=\"5\"', 'Sum', 60))/60" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "EKS:AppMesh.EgressHttpRequestsPerSecond" + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "[avg: ${AVG}] HTTP 1XX {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace,envoy_http_conn_manager_prefix,envoy_response_code_class} envoy_http_downstream_rq_xx ClusterName=\"{ClusterName}\" envoy_http_conn_manager_prefix=\"egress\" envoy_response_code_class=\"1\"', 'Sum', 60))/60" + }, + { + "metricOptions": { + "id": "expr2", + "label": "[avg: ${AVG}] HTTP 2XX {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace,envoy_http_conn_manager_prefix,envoy_response_code_class} envoy_http_downstream_rq_xx ClusterName=\"{ClusterName}\" envoy_http_conn_manager_prefix=\"egress\" envoy_response_code_class=\"2\"', 'Sum', 60))/60" + }, + { + "metricOptions": { + "id": "expr3", + "label": "[avg: ${AVG}] HTTP 3XX {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace,envoy_http_conn_manager_prefix,envoy_response_code_class} envoy_http_downstream_rq_xx ClusterName=\"{ClusterName}\" envoy_http_conn_manager_prefix=\"egress\" envoy_response_code_class=\"3\"', 'Sum', 60))/60" + }, + { + "metricOptions": { + "id": "expr4", + "label": "[avg: ${AVG}] HTTP 4XX {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace,envoy_http_conn_manager_prefix,envoy_response_code_class} envoy_http_downstream_rq_xx ClusterName=\"{ClusterName}\" envoy_http_conn_manager_prefix=\"egress\" envoy_response_code_class=\"4\"', 'Sum', 60))/60" + }, + { + "metricOptions": { + "id": "expr5", + "label": "[avg: ${AVG}] HTTP 5XX {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace,envoy_http_conn_manager_prefix,envoy_response_code_class} envoy_http_downstream_rq_xx ClusterName=\"{ClusterName}\" envoy_http_conn_manager_prefix=\"egress\" envoy_response_code_class=\"5\"', 'Sum', 60))/60" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "EKS:AppMesh.UpstreamRequestErrorsPerSecond" + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "[min: ${MIN}, max: ${MAX}, avg: ${AVG}, last: ${LAST}] pending failure ejection {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" envoy_cluster_upstream_rq_pending_failure_eject', 'Sum', 60))/60" + }, + { + "metricOptions": { + "id": "expr2", + "label": "[min: ${MIN}, max: ${MAX}, avg: ${AVG}, last: ${LAST}] pending overflow {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" envoy_cluster_upstream_rq_pending_overflow', 'Sum', 60))/60" + }, + { + "metricOptions": { + "id": "expr3", + "label": "[min: ${MIN}, max: ${MAX}, avg: ${AVG}, last: ${LAST}] connect timeout {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" envoy_cluster_upstream_cx_connect_timeout', 'Sum', 60))/60" + }, + { + "metricOptions": { + "id": "expr4", + "label": "[min: ${MIN}, max: ${MAX}, avg: ${AVG}, last: ${LAST}] request timeout {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" envoy_cluster_upstream_rq_timeout', 'Sum', 60))/60" + }, + { + "metricOptions": { + "id": "expr5", + "label": "[min: ${MIN}, max: ${MAX}, avg: ${AVG}, last: ${LAST}] per try request timeout {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" envoy_cluster_upstream_rq_per_try_timeout', 'Sum', 60))/60" + }, + { + "metricOptions": { + "id": "expr6", + "label": "[min: ${MIN}, max: ${MAX}, avg: ${AVG}, last: ${LAST}] request reset {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" envoy_cluster_upstream_rq_rx_reset', 'Sum', 60))/60" + }, + { + "metricOptions": { + "id": "expr7", + "label": "[min: ${MIN}, max: ${MAX}, avg: ${AVG}, last: ${LAST}] destroy initialized from originating service {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" envoy_cluster_upstream_cx_destroy_local_with_active_rq', 'Sum', 60))/60" + }, + { + "metricOptions": { + "id": "expr8", + "label": "[min: ${MIN}, max: ${MAX}, avg: ${AVG}, last: ${LAST}] destroy initialized from remote service {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" envoy_http_downstream_cx_destroy_remote_active_rq', 'Sum', 60))/60" + }, + { + "metricOptions": { + "id": "expr9", + "label": "[min: ${MIN}, max: ${MAX}, avg: ${AVG}, last: ${LAST}] request failed maintenance mode {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" envoy_cluster_upstream_rq_maintenance_mode', 'Sum', 60))/60" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "EKS:AppMesh.UpstreamFlowControl" + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": " [avg: ${AVG}] paused reading from destination service {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" envoy_cluster_upstream_flow_control_paused_reading_total', 'Sum', 60))/60" + }, + { + "metricOptions": { + "id": "expr2", + "label": " [avg: ${AVG}] resumed reading from destination service {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" envoy_cluster_upstream_flow_control_resumed_reading_total', 'Sum', 60))/60" + }, + { + "metricOptions": { + "id": "expr3", + "label": " [avg: ${AVG}] paused reading from originating service {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" envoy_cluster_upstream_flow_control_backed_up_total', 'Sum', 60))/60" + }, + { + "metricOptions": { + "id": "expr4", + "label": " [avg: ${AVG}] resumed reading from originating service {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" envoy_cluster_upstream_flow_control_drained_total', 'Sum', 60))/60" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "EKS:AppMesh.UpstreamRequestRetry" + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": " [avg: ${AVG}] request retry {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} {ClusterName} envoy_cluster_upstream_flow_control_resumed_reading_total', 'Sum', 60))/60" + }, + { + "metricOptions": { + "id": "expr2", + "label": " [avg: ${AVG}] request retry success {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} {ClusterName} envoy_cluster_upstream_rq_retry_success', 'Sum', 60))/60" + }, + { + "metricOptions": { + "id": "expr3", + "label": " [avg: ${AVG}] request retry overflow {ClusterName}" + }, + "resourceType": false, + "metricExpression": "SUM(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} {ClusterName} envoy_cluster_upstream_rq_retry_overflow', 'Sum', 60))/60" + } + ] + } + ] + } + ] + }, + { + "id": "EKS:Cluster:Drawer", + "rows": [ + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "CPUUtilization", + "yAxis": { + "left": { + "min": 0, + "showUnits": false, + "label": "Percent" + } + } + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "CPU (avg)" + }, + "metricExpression": "mm1 * 100 / mm0", + "resourceType": "CW::EKS::Cluster" + }, + { + "metricOptions": { + "id": "mm0", + "visible": false + }, + "metricTemplate": "CW::EKS::Cluster:node_cpu_limit" + }, + { + "metricOptions": { + "id": "mm1", + "visible": false + }, + "metricTemplate": "CW::EKS::Cluster:node_cpu_usage_total" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "MemoryUtilization", + "yAxis": { + "left": { + "min": 0, + "showUnits": false, + "label": "Percent" + } + } + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "Memory (avg)" + }, + "metricExpression": "mm1 * 100 / mm0", + "resourceType": "CW::EKS::Cluster" + }, + { + "metricOptions": { + "id": "mm0", + "visible": false + }, + "metricTemplate": "CW::EKS::Cluster:node_memory_limit" + }, + { + "metricOptions": { + "id": "mm1", + "visible": false + }, + "metricTemplate": "CW::EKS::Cluster:node_memory_working_set" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "Network" + }, + "metrics": [ + { + "metricOptions": { + "yAxis": "left", + "label": "RX (avg)" + }, + "metricTemplate": "CW::EKS::Cluster:pod_network_rx_bytes" + }, + { + "metricOptions": { + "yAxis": "right", + "label": "TX (avg)" + }, + "metricTemplate": "CW::EKS::Cluster:pod_network_tx_bytes" + } + ] + } + ] + } + ] + }, + { + "id": "EKS:Cluster", + "name": "EKS Cluster", + "dependencies": [ + { + "namespace": "ContainerInsights" + } + ], + "controls": [ + "CW::EKS.cluster" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "CPUUtilization", + "yAxis": { + "left": { + "min": 0, + "showUnits": false, + "label": "Percent" + } + } + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "{ClusterName}" + }, + "metricExpression": "mm1 * 100 / mm0", + "resourceType": "CW::EKS::Cluster" + }, + { + "metricOptions": { + "id": "mm0", + "visible": false + }, + "metricTemplate": "CW::EKS::Cluster:node_cpu_limit" + }, + { + "metricOptions": { + "id": "mm1", + "visible": false + }, + "metricTemplate": "CW::EKS::Cluster:node_cpu_usage_total" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "MemoryUtilization", + "yAxis": { + "left": { + "min": 0, + "showUnits": false, + "label": "Percent" + } + } + }, + "metrics": [ + { + "metricOptions": { + "id": "expr1", + "label": "{ClusterName}" + }, + "metricExpression": "mm1 * 100 / mm0", + "resourceType": "CW::EKS::Cluster" + }, + { + "metricOptions": { + "id": "mm0", + "visible": false + }, + "metricTemplate": "CW::EKS::Cluster:node_memory_limit" + }, + { + "metricOptions": { + "id": "mm1", + "visible": false + }, + "metricTemplate": "CW::EKS::Cluster:node_memory_working_set" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "Network" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Cluster:node_network_total_bytes" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "EKS:Clusters.ClusterFailures" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Cluster:cluster_failed_node_count" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "DiskUtilization" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Cluster:node_filesystem_utilization" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "EKS:Clusters.NumberOfNodes" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Cluster:cluster_node_count" + } + ] + } + ] + } + ] + }, + { + "id": "EKS:JavaJMX", + "name": "EKS JavaJMX Report", + "dependencies": [ + { + "namespace": "ContainerInsights" + }, + { + "namespace": "ContainerInsights/Prometheus" + } + ], + "controls": [ + "CW::EKS.cluster" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "EKS:JavaJMX.TotalRAM", + "view": "singleValue" + }, + "metrics": [ + { + "metricExpression": "AVG(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" java_lang_operatingsystem_totalphysicalmemorysize', 'Average', 60)))", + "resourceType": "CW::EKS::Cluster", + "metricOptions": { + "id": "expr1", + "label": "{ClusterName}" + } + } + ] + }, + { + "type": "chart", + "properties": { + "title": "EKS:JavaJMX.SWAP", + "view": "singleValue" + }, + "metrics": [ + { + "metricExpression": "AVG(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" java_lang_operatingsystem_totalswapspacesize', 'Average', 60)))", + "resourceType": "CW::EKS::Cluster", + "metricOptions": { + "id": "expr1", + "label": "{ClusterName}" + } + } + ] + }, + { + "type": "chart", + "properties": { + "title": "EKS:JavaJMX.CPUSystemLoad", + "view": "singleValue" + }, + "metrics": [ + { + "metricExpression": "AVG(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" java_lang_operatingsystem_systemcpuload', 'Average', 60)) * 100)", + "resourceType": "CW::EKS::Cluster", + "metricOptions": { + "id": "expr1", + "label": "{ClusterName}" + } + } + ] + }, + { + "type": "chart", + "properties": { + "title": "EKS:JavaJMX.CPUCores", + "view": "singleValue" + }, + "metrics": [ + { + "metricExpression": "AVG(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" jvm_classes_loaded', 'Average', 60)) * 100)", + "resourceType": "CW::EKS::Cluster", + "metricOptions": { + "id": "expr1", + "label": "{ClusterName}" + } + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "EKS:JavaJMX.CPUUsage" + }, + "metrics": [ + { + "metricExpression": "AVG(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" java_lang_operatingsystem_systemcpuload', 'Average', 60)) * 100)", + "resourceType": "CW::EKS::Cluster", + "metricOptions": { + "id": "expr1", + "label": "System cpu load {ClusterName}" + } + }, + { + "metricExpression": "AVG(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" java_lang_operatingsystem_processcpuload', 'Average', 60)) * 100)", + "resourceType": "CW::EKS::Cluster", + "metricOptions": { + "id": "expr2", + "label": "Process cpu load {ClusterName}" + } + } + ] + }, + { + "type": "chart", + "properties": { + "title": "EKS:JavaJMX.Memory" + }, + "metrics": [ + { + "metricExpression": "AVG(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace, area} ClusterName=\"{ClusterName}\" jvm_memory_bytes_used', 'Average', 60))/AVG(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} java_lang_operatingsystem_totalphysicalmemorysize', 'Average', 60))) * 100)", + "resourceType": "CW::EKS::Cluster", + "metricOptions": { + "id": "expr1", + "label": "{ClusterName}" + } + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "EKS:JavaJMX.MemoryPoolUsed" + }, + "metrics": [ + { + "metricExpression": "AVG(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace, pool} ClusterName=\"{ClusterName}\" jvm_memory_pool_bytes_used', 'Average', 60)))", + "resourceType": "CW::EKS::Cluster", + "metricOptions": { + "id": "expr1", + "label": "{ClusterName}" + } + } + ] + }, + { + "type": "chart", + "properties": { + "title": "EKS:JavaJMX.ThreadsUsed" + }, + "metrics": [ + { + "metricExpression": "AVG(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" jvm_threads_daemon', 'Average', 60)))", + "resourceType": "CW::EKS::Cluster", + "metricOptions": { + "id": "expr2", + "label": "Daemon {ClusterName}" + } + }, + { + "metricExpression": "AVG(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" jvm_threads_current', 'Average', 60)))", + "resourceType": "CW::EKS::Cluster", + "metricOptions": { + "id": "expr1", + "label": "Current {ClusterName}" + } + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "EKS:JavaJMX.OpenFileDescriptors" + }, + "metrics": [ + { + "metricExpression": "AVG(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" java_lang_operatingsystem_openfiledescriptorcount', 'Average', 60)))", + "resourceType": "CW::EKS::Cluster", + "metricOptions": { + "id": "expr1", + "label": "{ClusterName}" + } + } + ] + }, + { + "type": "chart", + "properties": { + "title": "EKS:JavaJMX.ClassLoading" + }, + "metrics": [ + { + "metricExpression": "AVG(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" jvm_classes_loaded', 'Average', 60)) * 100)", + "resourceType": "CW::EKS::Cluster", + "metricOptions": { + "id": "expr1", + "label": "{ClusterName}" + } + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "EKS:JavaJMX.CatalinaManagerSessions" + }, + "metrics": [ + { + "metricExpression": "AVG(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" catalina_manager_activesessions', 'Average', 60)))", + "resourceType": "CW::EKS::Cluster", + "metricOptions": { + "id": "expr1", + "label": "Active sessions {ClusterName}" + } + }, + { + "metricExpression": "AVG(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" catalina_manager_rejectedsessions', 'Average', 60)))", + "resourceType": "CW::EKS::Cluster", + "metricOptions": { + "id": "expr2", + "label": "Rejected sessions {ClusterName}" + } + } + ] + }, + { + "type": "chart", + "properties": { + "title": "EKS:JavaJMX.CatalinaRequestProcessorBytes" + }, + "metrics": [ + { + "metricExpression": "AVG(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" catalina_globalrequestprocessor_bytesreceived', 'Average', 60)))", + "resourceType": "CW::EKS::Cluster", + "metricOptions": { + "id": "expr1", + "label": "Bytes received {ClusterName}" + } + }, + { + "metricExpression": "AVG(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" catalina_globalrequestprocessor_bytessent', 'Average', 60)))", + "resourceType": "CW::EKS::Cluster", + "metricOptions": { + "id": "expr2", + "label": "Bytes sent {ClusterName}" + } + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "EKS:JavaJMX.CatalinaRequestProcessorRequests" + }, + "metrics": [ + { + "metricExpression": "AVG(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" catalina_globalrequestprocessor_requestcount', 'Average', 60)))", + "resourceType": "CW::EKS::Cluster", + "metricOptions": { + "id": "expr1", + "label": "Request count{ClusterName}" + } + }, + { + "metricExpression": "AVG(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" catalina_globalrequestprocessor_errorcount', 'Average', 60)))", + "resourceType": "CW::EKS::Cluster", + "metricOptions": { + "id": "expr2", + "label": "Error count {ClusterName}" + } + } + ] + }, + { + "type": "chart", + "properties": { + "title": "EKS:JavaJMX.CatalinaRequestProcessorTime", + "yAxis": { + "left": { + "showUnits": false, + "label": "ms" + } + } + }, + "metrics": [ + { + "metricExpression": "REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace} ClusterName=\"{ClusterName}\" catalina_globalrequestprocessor_processingtime', 'Average', 60))", + "resourceType": "CW::EKS::Cluster", + "metricOptions": { + "id": "expr1", + "label": "{ClusterName}" + } + } + ] + } + ] + } + ] + }, + { + "id": "EKS:Namespace:Drawer", + "rows": [ + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "CPUUtilization" + }, + "metrics": [ + { + "metricOptions": { + "label": "CPU (avg)" + }, + "metricTemplate": "CW::EKS::Namespace:pod_cpu_utilization" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "MemoryUtilization" + }, + "metrics": [ + { + "metricOptions": { + "label": "Memory (avg)" + }, + "metricTemplate": "CW::EKS::Namespace:pod_memory_utilization" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "Network" + }, + "metrics": [ + { + "metricOptions": { + "yAxis": "right", + "label": "TX (avg)" + }, + "metricTemplate": "CW::EKS::Namespace:pod_network_tx_bytes" + }, + { + "metricOptions": { + "yAxis": "left", + "label": "RX (avg)" + }, + "metricTemplate": "CW::EKS::Namespace:pod_network_rx_bytes" + } + ] + } + ] + } + ] + }, + { + "id": "EKS:Namespace", + "name": "EKS Namespace", + "dependencies": [ + { + "namespace": "ContainerInsights" + } + ], + "controls": [ + "CW::EKS.namespace", + "CW::EKS.cluster" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "CPUUtilization" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Namespace:pod_cpu_utilization" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "MemoryUtilization" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Namespace:pod_memory_utilization" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "Network" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Namespace:pod_network_tx_bytes" + }, + { + "metricTemplate": "CW::EKS::Namespace:pod_network_rx_bytes" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "CPUUtilizationOverLimit" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Namespace:pod_cpu_utilization_over_pod_limit" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "MemoryUtilizationOverLimit" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Namespace:pod_memory_utilization_over_pod_limit" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "NumberOfPods" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Namespace:namespace_number_of_running_pods" + } + ] + } + ] + } + ] + }, + { + "id": "EKS:Nginx", + "name": "EKS Nginx Report", + "dependencies": [ + { + "namespace": "ContainerInsights" + }, + { + "namespace": "ContainerInsights/Prometheus" + } + ], + "controls": [ + "CW::EKS.cluster", + "CW::EKS.namespace", + "CW::EKS.service" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "EKS:Nginx.RequestVolume", + "yAxis": { + "left": { + "label": "Count" + } + } + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Service:nginx_ingress_controller_requests" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "EKS:Nginx.ControllerConnections", + "yAxis": { + "left": { + "showUnits": false, + "label": "Count" + } + } + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Service:nginx_ingress_controller_nginx_process_connections" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "EKS:Nginx.SuccessRate", + "yAxis": { + "left": { + "showUnits": false, + "label": "Count" + } + } + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Service:nginx_ingress_controller_requests" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "EKS:Nginx.IngressRequestVolume", + "yAxis": { + "left": { + "showUnits": false, + "label": "Count" + } + } + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Service:nginx_ingress_controller_nginx_process_cpu_seconds_total" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "EKS:Nginx.AverageMemoryUsage", + "yAxis": { + "left": { + "showUnits": false, + "label": "MiB" + } + } + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Service:nginx_ingress_controller_nginx_process_resident_memory_bytes" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "EKS:Nginx.AverageCPUUsage", + "yAxis": { + "left": { + "showUnits": false, + "label": "%" + } + } + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Service:nginx_ingress_controller_nginx_process_cpu_seconds_total" + } + ] + } + ] + } + ] + }, + { + "id": "EKS:Node", + "name": "EKS Node", + "dependencies": [ + { + "namespace": "ContainerInsights" + } + ], + "controls": [ + "CW::EKS.cluster" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "CPUUtilization" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Node:node_cpu_utilization" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "CPUReservedCapacity" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Node:node_cpu_reserved_capacity" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "MemoryUtilization" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Node:node_memory_utilization" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "MemoryReservedCapacity" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Node:node_memory_reserved_capacity" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "DiskUtilization" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Node:node_filesystem_utilization" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "Network" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Node:node_network_total_bytes" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "NumberOfPods" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Node:node_number_of_running_pods" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "EKS:Nodes.NumberOfContainers" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Node:node_number_of_running_containers" + } + ] + } + ] + } + ] + }, + { + "id": "EKS:Pod:Drawer", + "rows": [ + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "CPUUtilization" + }, + "metrics": [ + { + "metricOptions": { + "label": "CPU (avg)" + }, + "metricTemplate": "CW::EKS::Pod:pod_cpu_utilization" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "MemoryUtilization" + }, + "metrics": [ + { + "metricOptions": { + "label": "Memory (avg)" + }, + "metricTemplate": "CW::EKS::Pod:pod_memory_utilization" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "Network" + }, + "metrics": [ + { + "metricOptions": { + "label": "TX (avg)", + "yAxis": "right" + }, + "metricTemplate": "CW::EKS::Pod:pod_network_tx_bytes" + }, + { + "metricOptions": { + "label": "RX (avg)", + "yAxis": "left" + }, + "metricTemplate": "CW::EKS::Pod:pod_network_rx_bytes" + } + ] + } + ] + } + ] + }, + { + "id": "EKS:Pod", + "name": "EKS Pod", + "dependencies": [ + { + "namespace": "ContainerInsights" + } + ], + "controls": [ + "CW::EKS.cluster", + "CW::EKS.namespace", + "CW::EKS.pod" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "CPUUtilization" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Pod:pod_cpu_utilization" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "MemoryUtilization" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Pod:pod_memory_utilization" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "Network" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Pod:pod_network_tx_bytes" + }, + { + "metricTemplate": "CW::EKS::Pod:pod_network_rx_bytes" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "CPUUtilizationOverLimit" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Pod:pod_cpu_utilization_over_pod_limit" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "MemoryUtilizationOverLimit" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Pod:pod_memory_utilization_over_pod_limit" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "CPUReservedCapacity" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Pod:pod_cpu_reserved_capacity" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "Network" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Pod:pod_memory_reserved_capacity" + } + ] + } + ] + } + ] + }, + { + "id": "EKS:Service:Drawer", + "rows": [ + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "CPUUtilization" + }, + "metrics": [ + { + "metricOptions": { + "label": "CPU (avg)" + }, + "metricTemplate": "CW::EKS::Service:pod_cpu_utilization" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "MemoryUtilization" + }, + "metrics": [ + { + "metricOptions": { + "label": "Memory (avg)" + }, + "metricTemplate": "CW::EKS::Service:pod_memory_utilization" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "Network" + }, + "metrics": [ + { + "metricOptions": { + "label": "TX (avg)", + "yAxis": "right" + }, + "metricTemplate": "CW::EKS::Service:pod_network_tx_bytes" + }, + { + "metricOptions": { + "label": "RX (avg)", + "yAxis": "left" + }, + "metricTemplate": "CW::EKS::Service:pod_network_rx_bytes" + } + ] + } + ] + } + ] + }, + { + "id": "EKS:Service", + "name": "EKS Service", + "dependencies": [ + { + "namespace": "ContainerInsights" + } + ], + "controls": [ + "CW::EKS.cluster", + "CW::EKS.namespace", + "CW::EKS.service" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "CPUUtilization" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Service:pod_cpu_utilization" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "MemoryUtilization" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Service:pod_memory_utilization" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "Network" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Service:pod_network_tx_bytes" + }, + { + "metricTemplate": "CW::EKS::Service:pod_network_rx_bytes" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "CPUUtilizationOverLimit" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Service:pod_cpu_utilization_over_pod_limit" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "MemoryUtilizationOverLimit" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Service:pod_memory_utilization_over_pod_limit" + } + ] + }, + { + "type": "chart", + "properties": { + "title": "NumberOfPods" + }, + "metrics": [ + { + "metricTemplate": "CW::EKS::Service:service_number_of_running_pods" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::ElastiCache", + "dashboard": "ElastiCache", + "crossServiceDashboard": "ElastiCache:CrossService", + "resourceTypes": [ + { + "type": "AWS::ElastiCache::CacheCluster", + "keyMetric": "AWS::ElastiCache::CacheCluster:CPUUtilization", + "dashboard": "ElastiCache", + "arnRegex": ".*:cluster:(.*)" + }, + { + "type": "AWS::ElastiCache::ReplicationGroup", + "keyMetric": "AWS::ElastiCache::ReplicationGroup:GlobalDatastoreReplicationLag", + "dashboard": "ElastiCache", + "arnRegex": ".*:replicationgroup:(.*)" + } + ], + "controls": { + "AWS::ElastiCache.cacheClusters": { + "type": "resource", + "resourceType": "AWS::ElastiCache::CacheCluster", + "labelField": "CacheClusterId", + "valueField": "CacheClusterId" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::ElastiCache::CacheCluster", + "namespace": "AWS/ElastiCache", + "dimensions": [ + { + "dimensionName": "CacheClusterId", + "labelName": "CacheClusterId" + } + ], + "metrics": [ + { + "id": "AWS::ElastiCache::CacheCluster:CPUUtilization", + "name": "CPUUtilization", + "defaultStat": "Average" + }, + { + "id": "AWS::ElastiCache::CacheCluster:FreeableMemory", + "name": "FreeableMemory", + "defaultStat": "Average" + }, + { + "id": "AWS::ElastiCache::CacheCluster:SwapUsage", + "name": "SwapUsage", + "defaultStat": "Average" + }, + { + "id": "AWS::ElastiCache::CacheCluster:NetworkBytesIn", + "name": "NetworkBytesIn", + "defaultStat": "Average" + }, + { + "id": "AWS::ElastiCache::CacheCluster:NetworkBytesOut", + "name": "NetworkBytesOut", + "defaultStat": "Average" + }, + { + "id": "AWS::ElastiCache::CacheCluster:CurrConnections", + "name": "CurrConnections", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElastiCache::CacheCluster:Evictions", + "name": "Evictions", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElastiCache::CacheCluster:Reclaimed", + "name": "Reclaimed", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElastiCache::CacheCluster:CacheHits", + "name": "CacheHits", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElastiCache::CacheCluster:CacheMisses", + "name": "CacheMisses", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElastiCache::CacheCluster:ReplicationBytes", + "name": "ReplicationBytes", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElastiCache::CacheCluster:ReplicationLag", + "name": "ReplicationLag", + "defaultStat": "Average" + }, + { + "id": "AWS::ElastiCache::CacheCluster:BytesUsedForCache", + "name": "BytesUsedForCache", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElastiCache::CacheCluster:CurrItems", + "name": "CurrItems", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElastiCache::CacheCluster:CasHits", + "name": "CasHits", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElastiCache::CacheCluster:CasMisses", + "name": "CasMisses", + "defaultStat": "Sum" + } + ] + }, + { + "resourceType": "AWS::ElastiCache::ReplicationGroup", + "namespace": "AWS/ElastiCache", + "dimensions": [ + { + "dimensionName": "ReplicationGroupId", + "labelName": "ReplicationGroupId" + } + ], + "metrics": [ + { + "id": "AWS::ElastiCache::ReplicationGroup:GlobalDatastoreReplicationLag", + "name": "GlobalDatastoreReplicationLag", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "ElastiCache:CrossService", + "name": "ElastiCache", + "dependencies": [ + { + "namespace": "AWS/ElastiCache" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElastiCache::CacheCluster:CPUUtilization" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElastiCache::CacheCluster:Evictions" + } + ] + } + ] + } + ] + }, + { + "id": "ElastiCache", + "name": "ElastiCache", + "dependencies": [ + { + "namespace": "AWS/ElastiCache" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::ElastiCache.cacheClusters" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElastiCache::CacheCluster:CPUUtilization" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElastiCache::CacheCluster:FreeableMemory" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElastiCache::CacheCluster:SwapUsage" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElastiCache::CacheCluster:NetworkBytesIn" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElastiCache::CacheCluster:NetworkBytesOut" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElastiCache::CacheCluster:CurrConnections" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElastiCache::CacheCluster:Evictions" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElastiCache::CacheCluster:Reclaimed" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElastiCache::CacheCluster:CacheHits" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElastiCache::CacheCluster:CacheMisses" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElastiCache::CacheCluster:ReplicationBytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElastiCache::CacheCluster:ReplicationLag" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElastiCache::CacheCluster:BytesUsedForCache" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElastiCache::CacheCluster:CurrItems" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElastiCache::CacheCluster:CasHits" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElastiCache::CacheCluster:CasMisses" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::ElasticBeanstalk", + "dashboard": "ElasticBeanstalk", + "crossServiceDashboard": "ElasticBeanstalk:CrossService", + "resourceTypes": [ + { + "type": "AWS::ElasticBeanstalk::Environment", + "keyMetric": "AWS::ElasticBeanstalk::Environment:EnvironmentHealth", + "dashboard": "ElasticBeanstalk", + "arnRegex": ".*:environment/.*/(.*)" + } + ], + "controls": { + "AWS::ElasticBeanstalk.environments": { + "type": "resource", + "resourceType": "AWS::ElasticBeanstalk::Environment", + "labelField": "EnvironmentName", + "valueField": "EnvironmentName" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::ElasticBeanstalk::Environment", + "namespace": "AWS/ElasticBeanstalk", + "dimensions": [ + { + "dimensionName": "EnvironmentName", + "labelName": "EnvironmentName" + } + ], + "metrics": [ + { + "id": "AWS::ElasticBeanstalk::Environment:EnvironmentHealth", + "name": "EnvironmentHealth", + "defaultStat": "Average" + }, + { + "id": "AWS::ElasticBeanstalk::Environment:ApplicationRequests5xx", + "name": "ApplicationRequests5xx", + "defaultStat": "Average" + }, + { + "id": "AWS::ElasticBeanstalk::Environment:ApplicationRequests2xx", + "name": "ApplicationRequests2xx", + "defaultStat": "Average" + }, + { + "id": "AWS::ElasticBeanstalk::Environment:ApplicationRequests3xx", + "name": "ApplicationRequests3xx", + "defaultStat": "Average" + }, + { + "id": "AWS::ElasticBeanstalk::Environment:ApplicationRequests4xx", + "name": "ApplicationRequests4xx", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "ElasticBeanstalk:CrossService", + "name": "Elastic Beanstalk", + "dependencies": [ + { + "namespace": "AWS/ElasticBeanstalk" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticBeanstalk::Environment:EnvironmentHealth" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticBeanstalk::Environment:ApplicationRequests5xx" + } + ] + } + ] + } + ] + }, + { + "id": "ElasticBeanstalk", + "name": "Elastic Beanstalk", + "dependencies": [ + { + "namespace": "AWS/ElasticBeanstalk" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::ElasticBeanstalk.environments" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticBeanstalk::Environment:EnvironmentHealth" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticBeanstalk::Environment:ApplicationRequests2xx" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticBeanstalk::Environment:ApplicationRequests3xx" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticBeanstalk::Environment:ApplicationRequests4xx" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticBeanstalk::Environment:ApplicationRequests5xx" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::ElasticInference", + "dashboard": "ElasticInference", + "crossServiceDashboard": "ElasticInference:CrossService", + "resourceTypes": [ + { + "type": "AWS::ElasticInference::ElasticInferenceAccelerator", + "keyMetric": "AWS::ElasticInference::ElasticInferenceAccelerator:AcceleratorHealthCheckFailed", + "dashboard": "ElasticInference" + } + ], + "controls": { + "AWS::ElasticInference.elasticInferenceAccelerators": { + "type": "resource", + "resourceType": "AWS::ElasticInference::ElasticInferenceAccelerator", + "labelField": "ElasticInferenceAcceleratorId", + "valueField": "ElasticInferenceAcceleratorId" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::ElasticInference::ElasticInferenceAccelerator", + "namespace": "AWS/ElasticInference", + "dimensions": [ + { + "dimensionName": "ElasticInferenceAcceleratorId", + "labelName": "ElasticInferenceAcceleratorId" + } + ], + "metrics": [ + { + "id": "AWS::ElasticInference::ElasticInferenceAccelerator:AcceleratorHealthCheckFailed", + "name": "AcceleratorHealthCheckFailed", + "defaultStat": "Average" + }, + { + "id": "AWS::ElasticInference::ElasticInferenceAccelerator:ConnectivityCheckFailed", + "name": "ConnectivityCheckFailed", + "defaultStat": "Average" + }, + { + "id": "AWS::ElasticInference::ElasticInferenceAccelerator:AcceleratorMemoryUsage", + "name": "AcceleratorMemoryUsage", + "defaultStat": "Maximum" + } + ] + } + ], + "dashboards": [ + { + "id": "ElasticInference:CrossService", + "name": "Elastic Inference", + "dependencies": [ + { + "namespace": "AWS/ElasticInference" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticInference::ElasticInferenceAccelerator:AcceleratorHealthCheckFailed" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticInference::ElasticInferenceAccelerator:ConnectivityCheckFailed" + } + ] + } + ] + } + ] + }, + { + "id": "ElasticInference", + "name": "Elastic Inference", + "dependencies": [ + { + "namespace": "AWS/ElasticInference" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::ElasticInference.elasticInferenceAccelerators" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticInference::ElasticInferenceAccelerator:AcceleratorHealthCheckFailed" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticInference::ElasticInferenceAccelerator:ConnectivityCheckFailed" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticInference::ElasticInferenceAccelerator:AcceleratorMemoryUsage" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::EMR", + "dashboard": "ElasticMapReduce", + "crossServiceDashboard": "ElasticMapReduce:CrossService", + "resourceTypes": [ + { + "type": "AWS::EMR::Cluster", + "keyMetric": "AWS::EMR::Cluster:JobsRunning", + "dashboard": "ElasticMapReduce", + "arnRegex": ".*:cluster/(.*)" + } + ], + "controls": { + "AWS::EMR.clusters": { + "type": "resource", + "resourceType": "AWS::EMR::Cluster", + "labelField": "ClusterId", + "valueField": "ClusterId" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::EMR::Cluster", + "namespace": "AWS/ElasticMapReduce", + "dimensions": [ + { + "dimensionName": "ClusterId", + "labelName": "ClusterId" + } + ], + "metrics": [ + { + "id": "AWS::EMR::Cluster:JobsRunning", + "name": "JobsRunning", + "defaultStat": "Average" + }, + { + "id": "AWS::EMR::Cluster:JobsFailed", + "name": "JobsFailed", + "defaultStat": "Average" + }, + { + "id": "AWS::EMR::Cluster:IsIdle", + "name": "IsIdle", + "defaultStat": "Average" + }, + { + "id": "AWS::EMR::Cluster:MapTasksRunning", + "name": "MapTasksRunning", + "defaultStat": "Average" + }, + { + "id": "AWS::EMR::Cluster:MapTasksRemaining", + "name": "MapTasksRemaining", + "defaultStat": "Average" + }, + { + "id": "AWS::EMR::Cluster:MapSlotsOpen", + "name": "MapSlotsOpen", + "defaultStat": "Average" + }, + { + "id": "AWS::EMR::Cluster:RemainingMapTasksPerSlot", + "name": "RemainingMapTasksPerSlot", + "defaultStat": "Average" + }, + { + "id": "AWS::EMR::Cluster:ReduceTasksRunning", + "name": "ReduceTasksRunning", + "defaultStat": "Average" + }, + { + "id": "AWS::EMR::Cluster:ReduceTasksRemaining", + "name": "ReduceTasksRemaining", + "defaultStat": "Average" + }, + { + "id": "AWS::EMR::Cluster:ReduceSlotsOpen", + "name": "ReduceSlotsOpen", + "defaultStat": "Average" + }, + { + "id": "AWS::EMR::Cluster:CoreNodesRunning", + "name": "CoreNodesRunning", + "defaultStat": "Average" + }, + { + "id": "AWS::EMR::Cluster:CoreNodesPending", + "name": "CoreNodesPending", + "defaultStat": "Average" + }, + { + "id": "AWS::EMR::Cluster:LiveDataNodes", + "name": "LiveDataNodes", + "defaultStat": "Average" + }, + { + "id": "AWS::EMR::Cluster:TaskNodesRunning", + "name": "TaskNodesRunning", + "defaultStat": "Average" + }, + { + "id": "AWS::EMR::Cluster:TaskNodesPending", + "name": "TaskNodesPending", + "defaultStat": "Average" + }, + { + "id": "AWS::EMR::Cluster:LiveTaskTrackers", + "name": "LiveTaskTrackers", + "defaultStat": "Average" + }, + { + "id": "AWS::EMR::Cluster:S3BytesWritten", + "name": "S3BytesWritten", + "defaultStat": "Sum" + }, + { + "id": "AWS::EMR::Cluster:S3BytesRead", + "name": "S3BytesRead", + "defaultStat": "Sum" + }, + { + "id": "AWS::EMR::Cluster:HDFSUtilization", + "name": "HDFSUtilization", + "defaultStat": "Average" + }, + { + "id": "AWS::EMR::Cluster:HDFSBytesRead", + "name": "HDFSBytesRead", + "defaultStat": "Sum" + }, + { + "id": "AWS::EMR::Cluster:HDFSBytesWritten", + "name": "HDFSBytesWritten", + "defaultStat": "Sum" + }, + { + "id": "AWS::EMR::Cluster:MissingBlocks", + "name": "MissingBlocks", + "defaultStat": "Average" + }, + { + "id": "AWS::EMR::Cluster:TotalLoad", + "name": "TotalLoad", + "defaultStat": "Average" + }, + { + "id": "AWS::EMR::Cluster:BackupFailed", + "name": "BackupFailed", + "defaultStat": "Average" + }, + { + "id": "AWS::EMR::Cluster:MostRecentBackupDuration", + "name": "MostRecentBackupDuration", + "defaultStat": "Average" + }, + { + "id": "AWS::EMR::Cluster:TimeSinceLastSuccessfulBackup", + "name": "TimeSinceLastSuccessfulBackup", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "ElasticMapReduce:CrossService", + "name": "EMR", + "dependencies": [ + { + "namespace": "AWS/ElasticMapReduce" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:JobsRunning" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:JobsFailed" + } + ] + } + ] + } + ] + }, + { + "id": "ElasticMapReduce", + "name": "EMR", + "dependencies": [ + { + "namespace": "AWS/ElasticMapReduce" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::EMR.clusters" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:JobsRunning" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:JobsFailed" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:IsIdle" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:MapTasksRunning" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:MapTasksRemaining" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:MapSlotsOpen" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:RemainingMapTasksPerSlot" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:ReduceTasksRunning" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:ReduceTasksRemaining" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:ReduceSlotsOpen" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:CoreNodesRunning" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:CoreNodesPending" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:LiveDataNodes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:TaskNodesRunning" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:TaskNodesPending" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:LiveTaskTrackers" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:S3BytesWritten" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:S3BytesRead" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:HDFSUtilization" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:HDFSBytesRead" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:HDFSBytesWritten" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:MissingBlocks" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:TotalLoad" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:BackupFailed" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:MostRecentBackupDuration" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EMR::Cluster:TimeSinceLastSuccessfulBackup" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::ElasticTranscoder", + "dashboard": "ElasticTranscoder", + "crossServiceDashboard": "ElasticTranscoder:CrossService", + "resourceTypes": [ + { + "type": "AWS::ElasticTranscoder::Operation", + "keyMetric": "AWS::ElasticTranscoder::Operation:Errors", + "dashboard": "ElasticTranscoder" + } + ], + "controls": { + "AWS::ElasticTranscoder.operations": { + "type": "resource", + "resourceType": "AWS::ElasticTranscoder::Operation", + "labelField": "Operation", + "valueField": "Operation" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::ElasticTranscoder::Operation", + "namespace": "AWS/ElasticTranscoder", + "dimensions": [ + { + "dimensionName": "Operation", + "labelName": "Operation" + } + ], + "metrics": [ + { + "id": "AWS::ElasticTranscoder::Operation:Errors", + "name": "Errors", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElasticTranscoder::Operation:Throttles", + "name": "Throttles", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElasticTranscoder::Operation:BilledHDOutput", + "name": "BilledHDOutput", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElasticTranscoder::Operation:BilledSDOutput", + "name": "BilledSDOutput", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElasticTranscoder::Operation:BilledAudioOutput", + "name": "BilledAudioOutput", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElasticTranscoder::Operation:JobsCompleted", + "name": "JobsCompleted", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElasticTranscoder::Operation:JobsErrored", + "name": "JobsErrored", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElasticTranscoder::Operation:OutputsPerJob", + "name": "OutputsPerJob", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElasticTranscoder::Operation:StandbyTime", + "name": "StandbyTime", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "ElasticTranscoder:CrossService", + "name": "Elastic Transcoder", + "dependencies": [ + { + "namespace": "AWS/ElasticTranscoder" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticTranscoder::Operation:Errors" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticTranscoder::Operation:Throttles" + } + ] + } + ] + } + ] + }, + { + "id": "ElasticTranscoder", + "name": "Elastic Transcoder", + "dependencies": [ + { + "namespace": "AWS/ElasticTranscoder" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::ElasticTranscoder.operations" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticTranscoder::Operation:Errors" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticTranscoder::Operation:Throttles" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticTranscoder::Operation:BilledHDOutput" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticTranscoder::Operation:BilledSDOutput" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticTranscoder::Operation:BilledAudioOutput" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticTranscoder::Operation:JobsCompleted" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticTranscoder::Operation:JobsErrored" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticTranscoder::Operation:OutputsPerJob" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticTranscoder::Operation:StandbyTime" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::ELB", + "dashboard": "ELB", + "crossServiceDashboard": "ELB:CrossService", + "resourceTypes": [ + { + "type": "AWS::ElasticLoadBalancing::LoadBalancer", + "keyMetric": "AWS::ElasticLoadBalancing::LoadBalancer:RequestCount", + "dashboard": "ELB", + "arnRegex": ".*:loadbalancer\\/(?!.*net|app)(.*)" + } + ], + "controls": { + "AWS::ELB.loadBalancers": { + "type": "resource", + "resourceType": "AWS::ElasticLoadBalancing::LoadBalancer", + "labelField": "LoadBalancerName", + "valueField": "LoadBalancerName" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::ElasticLoadBalancing::LoadBalancer", + "namespace": "AWS/ELB", + "dimensions": [ + { + "dimensionName": "LoadBalancerName", + "labelName": "LoadBalancerName" + } + ], + "metrics": [ + { + "id": "AWS::ElasticLoadBalancing::LoadBalancer:Latency", + "name": "Latency", + "defaultStat": "Average" + }, + { + "id": "AWS::ElasticLoadBalancing::LoadBalancer:BackendConnectionErrors", + "name": "BackendConnectionErrors", + "defaultStat": "Average" + }, + { + "id": "AWS::ElasticLoadBalancing::LoadBalancer:RequestCount", + "name": "RequestCount", + "defaultStat": "Average" + }, + { + "id": "AWS::ElasticLoadBalancing::LoadBalancer:SpilloverCount", + "name": "SpilloverCount", + "defaultStat": "Average" + }, + { + "id": "AWS::ElasticLoadBalancing::LoadBalancer:SurgeQueueLength", + "name": "SurgeQueueLength", + "defaultStat": "Average" + }, + { + "id": "AWS::ElasticLoadBalancing::LoadBalancer:HealthyHostCount", + "name": "HealthyHostCount", + "defaultStat": "Average" + }, + { + "id": "AWS::ElasticLoadBalancing::LoadBalancer:UnHealthyHostCount", + "name": "UnHealthyHostCount", + "defaultStat": "Average" + }, + { + "id": "AWS::ElasticLoadBalancing::LoadBalancer:HTTPCode_Backend_2XX", + "name": "HTTPCode_Backend_2XX", + "defaultStat": "Average" + }, + { + "id": "AWS::ElasticLoadBalancing::LoadBalancer:HTTPCode_Backend_3XX", + "name": "HTTPCode_Backend_3XX", + "defaultStat": "Average" + }, + { + "id": "AWS::ElasticLoadBalancing::LoadBalancer:HTTPCode_Backend_4XX", + "name": "HTTPCode_Backend_4XX", + "defaultStat": "Average" + }, + { + "id": "AWS::ElasticLoadBalancing::LoadBalancer:HTTPCode_Backend_5XX", + "name": "HTTPCode_Backend_5XX", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "ELB:CrossService", + "name": "ELB", + "dependencies": [ + { + "namespace": "AWS/ELB" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancing::LoadBalancer:Latency" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancing::LoadBalancer:BackendConnectionErrors" + } + ] + } + ] + } + ] + }, + { + "id": "ELB", + "name": "ELB", + "dependencies": [ + { + "namespace": "AWS/ELB" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::ELB.loadBalancers" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancing::LoadBalancer:RequestCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancing::LoadBalancer:Latency" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancing::LoadBalancer:BackendConnectionErrors" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancing::LoadBalancer:SpilloverCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancing::LoadBalancer:SurgeQueueLength" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancing::LoadBalancer:HealthyHostCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancing::LoadBalancer:UnHealthyHostCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancing::LoadBalancer:HTTPCode_Backend_2XX" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancing::LoadBalancer:HTTPCode_Backend_3XX" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancing::LoadBalancer:HTTPCode_Backend_4XX" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancing::LoadBalancer:HTTPCode_Backend_5XX" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::ES", + "dashboard": "ES", + "crossServiceDashboard": "ES:CrossService", + "resourceTypes": [ + { + "type": "AWS::ES::Client", + "keyMetric": "AWS::ES::Client:CPUUtilization", + "dashboard": "ES" + } + ], + "controls": { + "AWS::ES.clients": { + "type": "resource", + "resourceType": "AWS::ES::Client", + "labelField": "ClientId", + "valueField": "ClientId" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::ES::Client", + "namespace": "AWS/ES", + "dimensions": [ + { + "dimensionName": "ClientId", + "labelName": "ClientId" + } + ], + "metrics": [ + { + "id": "AWS::ES::Client:CPUUtilization", + "name": "CPUUtilization", + "defaultStat": "Average" + }, + { + "id": "AWS::ES::Client:ElasticsearchRequests", + "name": "ElasticsearchRequests", + "defaultStat": "Sum" + }, + { + "id": "AWS::ES::Client:SearchableDocuments", + "name": "SearchableDocuments", + "defaultStat": "Average" + }, + { + "id": "AWS::ES::Client:ClusterStatus.green", + "name": "ClusterStatus.green", + "defaultStat": "Average" + }, + { + "id": "AWS::ES::Client:ClusterStatus.yellow", + "name": "ClusterStatus.yellow", + "defaultStat": "Average" + }, + { + "id": "AWS::ES::Client:ClusterStatus.red", + "name": "ClusterStatus.red", + "defaultStat": "Average" + }, + { + "id": "AWS::ES::Client:Nodes", + "name": "Nodes", + "defaultStat": "Average" + }, + { + "id": "AWS::ES::Client:DeletedDocuments", + "name": "DeletedDocuments", + "defaultStat": "Sum" + }, + { + "id": "AWS::ES::Client:FreeStorageSpace", + "name": "FreeStorageSpace", + "defaultStat": "Average" + }, + { + "id": "AWS::ES::Client:ClusterUsedSpace", + "name": "ClusterUsedSpace", + "defaultStat": "Average" + }, + { + "id": "AWS::ES::Client:ClusterIndexWritesBlocked", + "name": "ClusterIndexWritesBlocked", + "defaultStat": "Maximum" + }, + { + "id": "AWS::ES::Client:JVMMemoryPressure", + "name": "JVMMemoryPressure", + "defaultStat": "Maximum" + }, + { + "id": "AWS::ES::Client:AutomatedSnapshotFailure", + "name": "AutomatedSnapshotFailure", + "defaultStat": "Maximum" + }, + { + "id": "AWS::ES::Client:CPUCreditBalance", + "name": "CPUCreditBalance", + "defaultStat": "Minimum" + }, + { + "id": "AWS::ES::Client:KibanaHealthyNodes", + "name": "KibanaHealthyNodes", + "defaultStat": "Minimum" + }, + { + "id": "AWS::ES::Client:KMSKeyError", + "name": "KMSKeyError", + "defaultStat": "Maximum" + }, + { + "id": "AWS::ES::Client:KMSKeyInaccessible", + "name": "KMSKeyInaccessible", + "defaultStat": "Maximum" + }, + { + "id": "AWS::ES::Client:InvalidHostHeaderRequests", + "name": "InvalidHostHeaderRequests", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "ES:CrossService", + "name": "ES", + "dependencies": [ + { + "namespace": "AWS/ES" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ES::Client:CPUUtilization" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ES::Client:ElasticsearchRequests" + } + ] + } + ] + } + ] + }, + { + "id": "ES", + "name": "ES", + "dependencies": [ + { + "namespace": "AWS/ES" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::ES.clients" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ES::Client:CPUUtilization" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ES::Client:ElasticsearchRequests" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ES::Client:SearchableDocuments" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ES::Client:ClusterStatus.green" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ES::Client:ClusterStatus.yellow" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ES::Client:ClusterStatus.red" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ES::Client:Nodes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ES::Client:DeletedDocuments" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ES::Client:FreeStorageSpace" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ES::Client:ClusterUsedSpace" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ES::Client:ClusterIndexWritesBlocked" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ES::Client:JVMMemoryPressure" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ES::Client:AutomatedSnapshotFailure" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ES::Client:CPUCreditBalance" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ES::Client:KibanaHealthyNodes" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ES::Client:KMSKeyError" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ES::Client:KMSKeyInaccessible" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ES::Client:InvalidHostHeaderRequests" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::Events", + "dashboard": "Events", + "crossServiceDashboard": "Events:CrossService", + "resourceTypes": [ + { + "type": "AWS::Events::Rule", + "keyMetric": "AWS::Events::Rule:Invocations", + "dashboard": "Events", + "arnRegex": ".*:rule/(.*)" + } + ], + "controls": { + "AWS::Events.rules": { + "type": "resource", + "resourceType": "AWS::Events::Rule", + "labelField": "RuleName", + "valueField": "RuleName" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::Events::Rule", + "namespace": "AWS/Events", + "dimensions": [ + { + "dimensionName": "RuleName", + "labelName": "RuleName" + } + ], + "metrics": [ + { + "id": "AWS::Events::Rule:Invocations", + "name": "Invocations", + "defaultStat": "Average" + }, + { + "id": "AWS::Events::Rule:FailedInvocations", + "name": "FailedInvocations", + "defaultStat": "Average" + }, + { + "id": "AWS::Events::Rule:TriggeredRules", + "name": "TriggeredRules", + "defaultStat": "Average" + }, + { + "id": "AWS::Events::Rule:MatchedEvents", + "name": "MatchedEvents", + "defaultStat": "Average" + }, + { + "id": "AWS::Events::Rule:DeadLetterInvocations", + "name": "DeadLetterInvocations", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "Events:CrossService", + "name": "CloudWatch Events", + "dependencies": [ + { + "namespace": "AWS/Events" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Events::Rule:Invocations" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Events::Rule:FailedInvocations" + } + ] + } + ] + } + ] + }, + { + "id": "Events", + "name": "CloudWatch Events", + "dependencies": [ + { + "namespace": "AWS/Events" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::Events.rules" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Events::Rule:Invocations" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Events::Rule:TriggeredRules" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Events::Rule:MatchedEvents" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Events::Rule:FailedInvocations" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Events::Rule:DeadLetterInvocations" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::FileSync", + "dashboard": "FileSync", + "crossServiceDashboard": "FileSync:CrossService", + "resourceTypes": [ + { + "type": "AWS::FileSync::Host", + "keyMetric": "AWS::FileSync::Host:FilesTransferred", + "dashboard": "FileSync" + } + ], + "controls": { + "AWS::FileSync.hosts": { + "type": "resource", + "resourceType": "AWS::FileSync::Host", + "labelField": "HostId", + "valueField": "HostId" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::FileSync::Host", + "namespace": "AWS/FileSync", + "dimensions": [ + { + "dimensionName": "HostId", + "labelName": "HostId" + } + ], + "metrics": [ + { + "id": "AWS::FileSync::Host:FilesTransferred", + "name": "FilesTransferred", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "FileSync:CrossService", + "name": "EFS File Sync", + "dependencies": [ + { + "namespace": "AWS/FileSync" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::FileSync::Host:FilesTransferred" + } + ] + } + ] + } + ] + }, + { + "id": "FileSync", + "name": "EFS File Sync", + "dependencies": [ + { + "namespace": "AWS/FileSync" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::FileSync.hosts" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::FileSync::Host:FilesTransferred" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::KinesisFirehose", + "dashboard": "Firehose", + "crossServiceDashboard": "Firehose:CrossService", + "resourceTypes": [ + { + "type": "AWS::KinesisFirehose::DeliveryStream", + "keyMetric": "AWS::KinesisFirehose::DeliveryStream:IncomingBytes", + "dashboard": "Firehose", + "arnRegex": ".*:deliverystream/(.*)" + } + ], + "controls": { + "AWS::KinesisFirehose.deliveryStreams": { + "type": "resource", + "resourceType": "AWS::KinesisFirehose::DeliveryStream", + "labelField": "DeliveryStreamName", + "valueField": "DeliveryStreamName" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::KinesisFirehose::DeliveryStream", + "namespace": "AWS/Firehose", + "dimensions": [ + { + "dimensionName": "DeliveryStreamName", + "labelName": "DeliveryStreamName" + } + ], + "metrics": [ + { + "id": "AWS::KinesisFirehose::DeliveryStream:IncomingBytes", + "name": "IncomingBytes", + "defaultStat": "Average" + }, + { + "id": "AWS::KinesisFirehose::DeliveryStream:IncomingRecords", + "name": "IncomingRecords", + "defaultStat": "Average" + }, + { + "id": "AWS::KinesisFirehose::DeliveryStream:BackupToS3.Bytes", + "name": "BackupToS3.Bytes", + "defaultStat": "Average" + }, + { + "id": "AWS::KinesisFirehose::DeliveryStream:BackupToS3.DataFreshness", + "name": "BackupToS3.DataFreshness", + "defaultStat": "Average" + }, + { + "id": "AWS::KinesisFirehose::DeliveryStream:BackupToS3.Records", + "name": "BackupToS3.Records", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "Firehose:CrossService", + "name": "Firehose", + "dependencies": [ + { + "namespace": "AWS/Firehose" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisFirehose::DeliveryStream:IncomingBytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisFirehose::DeliveryStream:IncomingRecords" + } + ] + } + ] + } + ] + }, + { + "id": "Firehose", + "name": "Firehose", + "dependencies": [ + { + "namespace": "AWS/Firehose" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::KinesisFirehose.deliveryStreams" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisFirehose::DeliveryStream:IncomingBytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisFirehose::DeliveryStream:IncomingRecords" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisFirehose::DeliveryStream:BackupToS3.Bytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisFirehose::DeliveryStream:BackupToS3.DataFreshness" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisFirehose::DeliveryStream:BackupToS3.Records" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::FSx", + "dashboard": "FSx", + "crossServiceDashboard": "FSx:CrossService", + "resourceTypes": [ + { + "type": "AWS::FSx::FileSystem", + "keyMetric": "AWS::FSx::FileSystem:DataReadBytes", + "dashboard": "FSx", + "arnRegex": ".*:file-system/(.*)" + } + ], + "controls": { + "AWS::FSx.fileSystems": { + "type": "resource", + "resourceType": "AWS::FSx::FileSystem", + "labelField": "FileSystemId", + "valueField": "FileSystemId" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::FSx::FileSystem", + "namespace": "AWS/FSx", + "dimensions": [ + { + "dimensionName": "FileSystemId", + "labelName": "FileSystemId" + } + ], + "metrics": [ + { + "id": "AWS::FSx::FileSystem:DataReadBytes", + "name": "DataReadBytes", + "defaultStat": "Sum" + }, + { + "id": "AWS::FSx::FileSystem:DataWriteBytes", + "name": "DataWriteBytes", + "defaultStat": "Sum" + }, + { + "id": "AWS::FSx::FileSystem:FreeDataStorageCapacity", + "name": "FreeDataStorageCapacity", + "defaultStat": "Sum" + }, + { + "id": "AWS::FSx::FileSystem:DataReadOperations", + "name": "DataReadOperations", + "defaultStat": "Sum" + }, + { + "id": "AWS::FSx::FileSystem:DataWriteOperations", + "name": "DataWriteOperations", + "defaultStat": "Sum" + }, + { + "id": "AWS::FSx::FileSystem:MetadataOperations", + "name": "MetadataOperations", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "FSx:CrossService", + "name": "FSx", + "dependencies": [ + { + "namespace": "AWS/FSx" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::FSx::FileSystem:DataReadBytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::FSx::FileSystem:DataWriteBytes" + } + ] + } + ] + } + ] + }, + { + "id": "FSx", + "name": "FSx", + "dependencies": [ + { + "namespace": "AWS/FSx" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::FSx.fileSystems" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::FSx::FileSystem:DataReadBytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::FSx::FileSystem:DataWriteBytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::FSx::FileSystem:FreeDataStorageCapacity" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::FSx::FileSystem:DataReadOperations" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::FSx::FileSystem:DataWriteOperations" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::FSx::FileSystem:MetadataOperations" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::GameLift", + "dashboard": "GameLift", + "crossServiceDashboard": "GameLift:CrossService", + "resourceTypes": [ + { + "type": "AWS::GameLift::Fleet", + "keyMetric": "AWS::GameLift::Fleet:ActiveInstances", + "dashboard": "GameLift" + } + ], + "controls": { + "AWS::GameLift.fleets": { + "type": "resource", + "resourceType": "AWS::GameLift::Fleet", + "labelField": "FleetId", + "valueField": "FleetId" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::GameLift::Fleet", + "namespace": "AWS/GameLift", + "dimensions": [ + { + "dimensionName": "FleetId", + "labelName": "FleetId" + } + ], + "metrics": [ + { + "id": "AWS::GameLift::Fleet:ActiveInstances", + "name": "ActiveInstances", + "defaultStat": "Average" + }, + { + "id": "AWS::GameLift::Fleet:PercentIdleInstances", + "name": "PercentIdleInstances", + "defaultStat": "Average" + }, + { + "id": "AWS::GameLift::Fleet:DesiredInstances", + "name": "DesiredInstances", + "defaultStat": "Average" + }, + { + "id": "AWS::GameLift::Fleet:IdleInstances", + "name": "IdleInstances", + "defaultStat": "Average" + }, + { + "id": "AWS::GameLift::Fleet:MaxInstances", + "name": "MaxInstances", + "defaultStat": "Average" + }, + { + "id": "AWS::GameLift::Fleet:MinInstances", + "name": "MinInstances", + "defaultStat": "Average" + }, + { + "id": "AWS::GameLift::Fleet:InstanceInterruptions", + "name": "InstanceInterruptions", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "GameLift:CrossService", + "name": "GameLift", + "dependencies": [ + { + "namespace": "AWS/GameLift" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::GameLift::Fleet:ActiveInstances" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::GameLift::Fleet:PercentIdleInstances" + } + ] + } + ] + } + ] + }, + { + "id": "GameLift", + "name": "GameLift", + "dependencies": [ + { + "namespace": "AWS/GameLift" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::GameLift.fleets" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::GameLift::Fleet:ActiveInstances" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::GameLift::Fleet:PercentIdleInstances" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::GameLift::Fleet:DesiredInstances" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::GameLift::Fleet:IdleInstances" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::GameLift::Fleet:MaxInstances" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::GameLift::Fleet:MinInstances" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "width": 8, + "metrics": [ + { + "metricTemplate": "AWS::GameLift::Fleet:InstanceInterruptions" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::GlobalAccelerator::Accelerator", + "dashboard": "GlobalAccelerator", + "crossServiceDashboard": "GlobalAccelerator:CrossService", + "resourceTypes": [ + { + "type": "AWS::GlobalAccelerator::Accelerator", + "keyMetric": "AWS::GlobalAccelerator::Accelerator:NewFlowCount", + "dashboard": "GlobalAccelerator", + "arnRegex": ".*:accelerator/(.*)" + } + ], + "metricTemplates": [ + { + "resourceType": "AWS::GlobalAccelerator::Accelerator", + "namespace": "AWS/GlobalAccelerator", + "dimensions": [ + { + "dimensionName": "Accelerator", + "labelName": "Accelerator" + } + ], + "metrics": [ + { + "id": "AWS::GlobalAccelerator::Accelerator:NewFlowCount", + "name": "NewFlowCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::GlobalAccelerator::Accelerator:ProcessedBytesIn", + "name": "ProcessedBytesIn", + "defaultStat": "Sum" + }, + { + "id": "AWS::GlobalAccelerator::Accelerator:ProcessedBytesOut", + "name": "ProcessedBytesOut", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "GlobalAccelerator:CrossService", + "name": "GlobalAccelerator", + "dependencies": [ + { + "namespace": "AWS/GlobalAccelerator" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::GlobalAccelerator::Accelerator:NewFlowCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::GlobalAccelerator::Accelerator:ProcessedBytesIn" + } + ] + } + ] + } + ] + }, + { + "id": "GlobalAccelerator", + "name": "GlobalAccelerator", + "dependencies": [ + { + "namespace": "AWS/GlobalAccelerator" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::GlobalAccelerator::Accelerator:NewFlowCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::GlobalAccelerator::Accelerator:ProcessedBytesIn" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::GlobalAccelerator::Accelerator:ProcessedBytesOut" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::Inspector", + "dashboard": "Inspector", + "crossServiceDashboard": "Inspector:CrossService", + "resourceTypes": [ + { + "type": "AWS::Inspector::AssessmentTemplateName", + "keyMetric": "AWS::Inspector::AssessmentTemplateName:TotalAssessmentRuns", + "dashboard": "Inspector" + } + ], + "controls": { + "AWS::Inspector.assessmentTemplateNames": { + "type": "resource", + "resourceType": "AWS::Inspector::AssessmentTemplateName", + "labelField": "AssessmentTemplateName", + "valueField": "AssessmentTemplateName" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::Inspector::AssessmentTemplateName", + "namespace": "AWS/Inspector", + "dimensions": [ + { + "dimensionName": "AssessmentTemplateName", + "labelName": "AssessmentTemplateName" + } + ], + "metrics": [ + { + "id": "AWS::Inspector::AssessmentTemplateName:TotalHealthyAgents", + "name": "TotalHealthyAgents", + "defaultStat": "Average" + }, + { + "id": "AWS::Inspector::AssessmentTemplateName:TotalAssessmentRuns", + "name": "TotalAssessmentRuns", + "defaultStat": "Average" + }, + { + "id": "AWS::Inspector::AssessmentTemplateName:TotalMatchingAgents", + "name": "TotalMatchingAgents", + "defaultStat": "Average" + }, + { + "id": "AWS::Inspector::AssessmentTemplateName:TotalFindings", + "name": "TotalFindings", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "Inspector:CrossService", + "name": "Inspector", + "dependencies": [ + { + "namespace": "AWS/Inspector" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Inspector::AssessmentTemplateName:TotalHealthyAgents" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Inspector::AssessmentTemplateName:TotalAssessmentRuns" + } + ] + } + ] + } + ] + }, + { + "id": "Inspector", + "name": "Inspector", + "dependencies": [ + { + "namespace": "AWS/Inspector" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::Inspector.assessmentTemplateNames" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Inspector::AssessmentTemplateName:TotalHealthyAgents" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Inspector::AssessmentTemplateName:TotalAssessmentRuns" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Inspector::AssessmentTemplateName:TotalMatchingAgents" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "width": 8, + "metrics": [ + { + "metricTemplate": "AWS::Inspector::AssessmentTemplateName:TotalFindings" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::IoT::TopicRule", + "dashboard": "IoT", + "crossServiceDashboard": "IoT:CrossService", + "resourceTypes": [ + { + "type": "AWS::IoT::TopicRule", + "keyMetric": "AWS::IoT::TopicRule:TopicMatch", + "dashboard": "IoT", + "arnRegex": ".*:rule/(.*)" + } + ], + "metricTemplates": [ + { + "resourceType": "AWS::IoT::TopicRule", + "namespace": "AWS/IoT", + "dimensions": [ + { + "dimensionName": "RuleName", + "labelName": "RuleName" + } + ], + "metrics": [ + { + "id": "AWS::IoT::TopicRule:TopicMatch", + "name": "TopicMatch", + "defaultStat": "Sum" + }, + { + "id": "AWS::IoT::TopicRule:ParseError", + "name": "ParseError", + "defaultStat": "Sum" + }, + { + "id": "AWS::IoT::TopicRule:RuleMessageThrottled", + "name": "RuleMessageThrottled", + "defaultStat": "Sum" + }, + { + "id": "AWS::IoT::TopicRule:RuleNotFound", + "name": "RuleNotFound", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "IoT:CrossService", + "name": "IoT", + "dependencies": [ + { + "namespace": "AWS/IoT" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::IoT::TopicRule:TopicMatch" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::IoT::TopicRule:ParseError" + } + ] + } + ] + } + ] + }, + { + "id": "IoT", + "name": "IoT", + "dependencies": [ + { + "namespace": "AWS/IoT" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::IoT::TopicRule:TopicMatch" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::IoT::TopicRule:ParseError" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::IoT::TopicRule:RuleMessageThrottled" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::IoT::TopicRule:RuleNotFound" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::IoT1Click::Device", + "dashboard": "IoT1Click", + "crossServiceDashboard": "IoT1Click:CrossService", + "resourceTypes": [ + { + "type": "AWS::IoT1Click::Device", + "keyMetric": "AWS::IoT1Click::Device:TotalEvents", + "dashboard": "IoT1Click", + "arnRegex": ".*:devices/(.*)" + } + ], + "metricTemplates": [ + { + "resourceType": "AWS::IoT1Click::Device", + "namespace": "AWS/IoT1Click", + "dimensions": [ + { + "dimensionName": "DeviceType", + "labelName": "DeviceType" + } + ], + "metrics": [ + { + "id": "AWS::IoT1Click::Device:TotalEvents", + "name": "TotalEvents", + "defaultStat": "Sum" + }, + { + "id": "AWS::IoT1Click::Device:RemainingLife", + "name": "RemainingLife", + "defaultStat": "Average" + }, + { + "id": "AWS::IoT1Click::Device:CallbackInvocationErrors", + "name": "CallbackInvocationErrors", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "IoT1Click:CrossService", + "name": "IoT1Click", + "dependencies": [ + { + "namespace": "AWS/IoT1Click" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::IoT1Click::Device:TotalEvents" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::IoT1Click::Device:RemainingLife" + } + ] + } + ] + } + ] + }, + { + "id": "IoT1Click", + "name": "IoT1Click", + "dependencies": [ + { + "namespace": "AWS/IoT1Click" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::IoT1Click::Device:TotalEvents" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::IoT1Click::Device:RemainingLife" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::IoT1Click::Device:CallbackInvocationErrors" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::IoTAnalytics", + "dashboard": "IoTAnalytics", + "crossServiceDashboard": "IoTAnalytics:CrossService", + "resourceTypes": [ + { + "type": "AWS::IoTAnalytics::Channel", + "keyMetric": "AWS::IoTAnalytics::Channel:IncomingMessages", + "dashboard": "IoTAnalytics", + "arnRegex": ".*:channel/(.*)" + }, + { + "type": "AWS::IoTAnalytics::Dataset", + "keyMetric": "AWS::IoTAnalytics::Dataset:ActionExecution", + "dashboard": "IoTAnalytics", + "arnRegex": ".*:dataset/(.*)" + }, + { + "type": "AWS::IoTAnalytics::Datastore", + "keyMetric": "AWS::IoTAnalytics::Datastore:ActionExecution", + "dashboard": "IoTAnalytics", + "arnRegex": ".*:datastore/(.*)" + }, + { + "type": "AWS::IoTAnalytics::Pipeline", + "keyMetric": "AWS::IoTAnalytics::Pipeline:ActionExecution", + "dashboard": "IoTAnalytics", + "arnRegex": ".*:pipeline/(.*)" + } + ], + "controls": { + "AWS::IoTAnalytics.channels": { + "type": "resource", + "resourceType": "AWS::IoTAnalytics::Channel", + "labelField": "ChannelName", + "valueField": "ChannelName" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::IoTAnalytics::Channel", + "namespace": "AWS/IoTAnalytics", + "dimensions": [ + { + "dimensionName": "ChannelName", + "labelName": "ChannelName" + } + ], + "metrics": [ + { + "id": "AWS::IoTAnalytics::Channel:IncomingMessages", + "name": "IncomingMessages", + "defaultStat": "Average" + } + ] + }, + { + "resourceType": "AWS::IoTAnalytics::Dataset", + "namespace": "AWS/IoTAnalytics", + "dimensions": [ + { + "dimensionName": "DatasetName", + "labelName": "DatasetName" + } + ], + "metrics": [ + { + "id": "AWS::IoTAnalytics::Dataset:ActionExecution", + "name": "ActionExecution", + "defaultStat": "Sum" + }, + { + "id": "AWS::IoTAnalytics::Dataset:IncomingMessages", + "name": "IncomingMessages", + "defaultStat": "Sum" + }, + { + "id": "AWS::IoTAnalytics::Dataset:ActionExecutionThrottled", + "name": "ActionExecutionThrottled", + "defaultStat": "Sum" + }, + { + "id": "AWS::IoTAnalytics::Dataset:ActivityExecutionError", + "name": "ActivityExecutionError", + "defaultStat": "Sum" + }, + { + "id": "AWS::IoTAnalytics::Dataset:PipelineConcurrentExecutionCount", + "name": "PipelineConcurrentExecutionCount", + "defaultStat": "Sum" + } + ] + }, + { + "resourceType": "AWS::IoTAnalytics::Datastore", + "namespace": "AWS/IoTAnalytics", + "dimensions": [ + { + "dimensionName": "DatastoreName", + "labelName": "DatastoreName" + } + ], + "metrics": [ + { + "id": "AWS::IoTAnalytics::Datastore:ActionExecution", + "name": "ActionExecution", + "defaultStat": "Sum" + }, + { + "id": "AWS::IoTAnalytics::Datastore:IncomingMessages", + "name": "IncomingMessages", + "defaultStat": "Sum" + }, + { + "id": "AWS::IoTAnalytics::Datastore:ActionExecutionThrottled", + "name": "ActionExecutionThrottled", + "defaultStat": "Sum" + }, + { + "id": "AWS::IoTAnalytics::Datastore:ActivityExecutionError", + "name": "ActivityExecutionError", + "defaultStat": "Sum" + }, + { + "id": "AWS::IoTAnalytics::Datastore:PipelineConcurrentExecutionCount", + "name": "PipelineConcurrentExecutionCount", + "defaultStat": "Sum" + } + ] + }, + { + "resourceType": "AWS::IoTAnalytics::Pipeline", + "namespace": "AWS/IoTAnalytics", + "dimensions": [ + { + "dimensionName": "PipelineActivityName", + "labelName": "PipelineActivityName" + } + ], + "metrics": [ + { + "id": "AWS::IoTAnalytics::Pipeline:ActionExecution", + "name": "ActionExecution", + "defaultStat": "Sum" + }, + { + "id": "AWS::IoTAnalytics::Pipeline:IncomingMessages", + "name": "IncomingMessages", + "defaultStat": "Sum" + }, + { + "id": "AWS::IoTAnalytics::Pipeline:ActionExecutionThrottled", + "name": "ActionExecutionThrottled", + "defaultStat": "Sum" + }, + { + "id": "AWS::IoTAnalytics::Pipeline:ActivityExecutionError", + "name": "ActivityExecutionError", + "defaultStat": "Sum" + }, + { + "id": "AWS::IoTAnalytics::Pipeline:PipelineConcurrentExecutionCount", + "name": "PipelineConcurrentExecutionCount", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "IoTAnalytics:CrossService", + "name": "IoT Analytics", + "dependencies": [ + { + "namespace": "AWS/IoTAnalytics" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::IoTAnalytics::Channel:IncomingMessages" + } + ] + } + ] + } + ] + }, + { + "id": "IoTAnalytics", + "name": "IoT Analytics", + "dependencies": [ + { + "namespace": "AWS/IoTAnalytics" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::IoTAnalytics.channels" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::IoTAnalytics::Channel:IncomingMessages" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::Kafka::Cluster", + "dashboard": "Kafka", + "crossServiceDashboard": "Kafka:CrossService", + "resourceTypes": [ + { + "type": "AWS::Kafka::Cluster", + "keyMetric": "AWS::Kafka::Cluster:ActiveControllerCount", + "dashboard": "Kafka", + "arnRegex": ".*:cluster/(.*)/.*" + } + ], + "metricTemplates": [ + { + "resourceType": "AWS::Kafka::Cluster", + "namespace": "AWS/Kafka", + "dimensions": [ + { + "dimensionName": "Cluster Name", + "labelName": "Cluster Name" + } + ], + "metrics": [ + { + "id": "AWS::Kafka::Cluster:ActiveControllerCount", + "name": "ActiveControllerCount", + "defaultStat": "Average" + }, + { + "id": "AWS::Kafka::Cluster:CpuIdle", + "name": "CpuIdle", + "defaultStat": "Average" + }, + { + "id": "AWS::Kafka::Cluster:CpuSystem", + "name": "CpuSystem", + "defaultStat": "Average" + }, + { + "id": "AWS::Kafka::Cluster:CpuUser", + "name": "CpuUser", + "defaultStat": "Average" + }, + { + "id": "AWS::Kafka::Cluster:GlobalPartitionCount", + "name": "GlobalPartitionCount", + "defaultStat": "Average" + }, + { + "id": "AWS::Kafka::Cluster:GlobalTopicCount", + "name": "GlobalTopicCount", + "defaultStat": "Average" + }, + { + "id": "AWS::Kafka::Cluster:KafkaAppLogsDiskUsed", + "name": "KafkaAppLogsDiskUsed", + "defaultStat": "Average" + }, + { + "id": "AWS::Kafka::Cluster:KafkaDataLogsDiskUsed", + "name": "KafkaDataLogsDiskUsed", + "defaultStat": "Average" + }, + { + "id": "AWS::Kafka::Cluster:MemoryBuffered", + "name": "MemoryBuffered", + "defaultStat": "Average" + }, + { + "id": "AWS::Kafka::Cluster:MemoryCached", + "name": "MemoryCached", + "defaultStat": "Average" + }, + { + "id": "AWS::Kafka::Cluster:MemoryFree", + "name": "MemoryFree", + "defaultStat": "Average" + }, + { + "id": "AWS::Kafka::Cluster:MemoryUsed", + "name": "MemoryUsed", + "defaultStat": "Average" + }, + { + "id": "AWS::Kafka::Cluster:NetworkRxDropped", + "name": "NetworkRxDropped", + "defaultStat": "Sum" + }, + { + "id": "AWS::Kafka::Cluster:NetworkRxErrors", + "name": "NetworkRxErrors", + "defaultStat": "Sum" + }, + { + "id": "AWS::Kafka::Cluster:NetworkRxPackets", + "name": "NetworkRxPackets", + "defaultStat": "Sum" + }, + { + "id": "AWS::Kafka::Cluster:NetworkTxDropped", + "name": "NetworkTxDropped", + "defaultStat": "Sum" + }, + { + "id": "AWS::Kafka::Cluster:NetworkTxErrors", + "name": "NetworkTxErrors", + "defaultStat": "Sum" + }, + { + "id": "AWS::Kafka::Cluster:NetworkTxPackets", + "name": "NetworkTxPackets", + "defaultStat": "Sum" + }, + { + "id": "AWS::Kafka::Cluster:OfflinePartitionsCount", + "name": "OfflinePartitionsCount", + "defaultStat": "Average" + }, + { + "id": "AWS::Kafka::Cluster:RootDiskUsed", + "name": "RootDiskUsed", + "defaultStat": "Average" + }, + { + "id": "AWS::Kafka::Cluster:SwapFree", + "name": "SwapFree", + "defaultStat": "Average" + }, + { + "id": "AWS::Kafka::Cluster:SwapUsed", + "name": "SwapUsed", + "defaultStat": "Average" + }, + { + "id": "AWS::Kafka::Cluster:ZooKeeperRequestLatencyMsMean", + "name": "ZooKeeperRequestLatencyMsMean", + "defaultStat": "Average" + }, + { + "id": "AWS::Kafka::Cluster:ZooKeeperSessionState", + "name": "ZooKeeperSessionState", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "Kafka:CrossService", + "name": "Kafka", + "dependencies": [ + { + "namespace": "AWS/Kafka" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kafka::Cluster:ActiveControllerCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kafka::Cluster:CpuIdle" + } + ] + } + ] + } + ] + }, + { + "id": "Kafka", + "name": "Kafka", + "dependencies": [ + { + "namespace": "AWS/Kafka" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kafka::Cluster:ActiveControllerCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kafka::Cluster:CpuIdle" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kafka::Cluster:CpuSystem" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kafka::Cluster:CpuUser" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kafka::Cluster:GlobalPartitionCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kafka::Cluster:GlobalTopicCount" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kafka::Cluster:KafkaAppLogsDiskUsed" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kafka::Cluster:KafkaDataLogsDiskUsed" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kafka::Cluster:MemoryBuffered" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kafka::Cluster:MemoryCached" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kafka::Cluster:MemoryFree" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kafka::Cluster:MemoryUsed" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kafka::Cluster:NetworkRxDropped" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kafka::Cluster:NetworkRxErrors" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kafka::Cluster:NetworkRxPackets" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kafka::Cluster:NetworkTxDropped" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kafka::Cluster:NetworkTxErrors" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kafka::Cluster:NetworkTxPackets" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kafka::Cluster:OfflinePartitionsCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kafka::Cluster:RootDiskUsed" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kafka::Cluster:SwapFree" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kafka::Cluster:SwapUsed" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kafka::Cluster:ZooKeeperRequestLatencyMsMean" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kafka::Cluster:ZooKeeperSessionState" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::Kinesis", + "dashboard": "Kinesis", + "crossServiceDashboard": "Kinesis:CrossService", + "resourceTypes": [ + { + "type": "AWS::Kinesis::Stream", + "keyMetric": "AWS::Kinesis::Stream:GetRecord.Records", + "dashboard": "Kinesis", + "arnRegex": ".*:stream/(.*)" + } + ], + "controls": { + "AWS::Kinesis.streams": { + "type": "resource", + "resourceType": "AWS::Kinesis::Stream", + "labelField": "StreamName", + "valueField": "StreamName" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::Kinesis::Stream", + "namespace": "AWS/Kinesis", + "dimensions": [ + { + "dimensionName": "StreamName", + "labelName": "StreamName" + } + ], + "metrics": [ + { + "id": "AWS::Kinesis::Stream:ReadProvisionedThroughputExceeded", + "name": "ReadProvisionedThroughputExceeded", + "defaultStat": "Average" + }, + { + "id": "AWS::Kinesis::Stream:WriteProvisionedThroughputExceeded", + "name": "WriteProvisionedThroughputExceeded", + "defaultStat": "Average" + }, + { + "id": "AWS::Kinesis::Stream:GetRecords.IteratorAgeMilliseconds", + "name": "GetRecords.IteratorAgeMilliseconds", + "defaultStat": "Maximum" + }, + { + "id": "AWS::Kinesis::Stream:PutRecord.Success", + "name": "PutRecord.Success", + "defaultStat": "Average" + }, + { + "id": "AWS::Kinesis::Stream:PutRecords.Bytes", + "name": "PutRecords.Bytes", + "defaultStat": "Average" + }, + { + "id": "AWS::Kinesis::Stream:GetRecord.Success", + "name": "GetRecord.Success", + "defaultStat": "Average" + }, + { + "id": "AWS::Kinesis::Stream:GetRecord.Bytes", + "name": "GetRecord.Bytes", + "defaultStat": "Average" + }, + { + "id": "AWS::Kinesis::Stream:GetRecord.Records", + "name": "GetRecord.Records", + "defaultStat": "Average" + }, + { + "id": "AWS::Kinesis::Stream:GetRecord.Latency", + "name": "GetRecord.Latency", + "defaultStat": "Maximum" + }, + { + "id": "AWS::Kinesis::Stream:IncomingBytes", + "name": "IncomingBytes", + "defaultStat": "Average" + }, + { + "id": "AWS::Kinesis::Stream:IncomingRecords", + "name": "IncomingRecords", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "Kinesis:CrossService", + "name": "Kinesis", + "dependencies": [ + { + "namespace": "AWS/Kinesis" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kinesis::Stream:ReadProvisionedThroughputExceeded" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kinesis::Stream:WriteProvisionedThroughputExceeded" + } + ] + } + ] + } + ] + }, + { + "id": "Kinesis", + "name": "Kinesis", + "dependencies": [ + { + "namespace": "AWS/Kinesis" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::Kinesis.streams" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kinesis::Stream:GetRecords.IteratorAgeMilliseconds" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kinesis::Stream:ReadProvisionedThroughputExceeded" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kinesis::Stream:WriteProvisionedThroughputExceeded" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kinesis::Stream:PutRecord.Success" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kinesis::Stream:PutRecords.Bytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kinesis::Stream:GetRecord.Success" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kinesis::Stream:GetRecord.Bytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kinesis::Stream:GetRecord.Records" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kinesis::Stream:GetRecord.Latency" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kinesis::Stream:IncomingBytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Kinesis::Stream:IncomingRecords" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::KinesisAnalytics", + "dashboard": "KinesisAnalytics", + "crossServiceDashboard": "KinesisAnalytics:CrossService", + "resourceTypes": [ + { + "type": "AWS::KinesisAnalytics::Application", + "keyMetric": "AWS::KinesisAnalytics::Application:Bytes", + "dashboard": "KinesisAnalytics", + "arnRegex": ".*:application/(.*)" + } + ], + "controls": { + "AWS::KinesisAnalytics.applications": { + "type": "resource", + "resourceType": "AWS::KinesisAnalytics::Application", + "labelField": "Application", + "valueField": "Application" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::KinesisAnalytics::Application", + "namespace": "AWS/KinesisAnalytics", + "dimensions": [ + { + "dimensionName": "Application", + "labelName": "Application" + } + ], + "metrics": [ + { + "id": "AWS::KinesisAnalytics::Application:Bytes", + "name": "Bytes", + "defaultStat": "Average" + }, + { + "id": "AWS::KinesisAnalytics::Application:KPUs", + "name": "KPUs", + "defaultStat": "Average" + }, + { + "id": "AWS::KinesisAnalytics::Application:MillisBehindLatest", + "name": "MillisBehindLatest", + "defaultStat": "Average" + }, + { + "id": "AWS::KinesisAnalytics::Application:Records", + "name": "Records", + "defaultStat": "Average" + }, + { + "id": "AWS::KinesisAnalytics::Application:Success", + "name": "Success", + "defaultStat": "Average" + }, + { + "id": "AWS::KinesisAnalytics::Application:InputProcessing.Duration", + "name": "InputProcessing.Duration", + "defaultStat": "Average" + }, + { + "id": "AWS::KinesisAnalytics::Application:InputProcessing.OkRecords", + "name": "InputProcessing.OkRecords", + "defaultStat": "Sum" + }, + { + "id": "AWS::KinesisAnalytics::Application:InputProcessing.OkBytes", + "name": "InputProcessing.OkBytes", + "defaultStat": "Sum" + }, + { + "id": "AWS::KinesisAnalytics::Application:InputProcessing.DroppedRecords", + "name": "InputProcessing.DroppedRecords", + "defaultStat": "Sum" + }, + { + "id": "AWS::KinesisAnalytics::Application:InputProcessing.ProcessingFailedRecords", + "name": "InputProcessing.ProcessingFailedRecords", + "defaultStat": "Sum" + }, + { + "id": "AWS::KinesisAnalytics::Application:InputProcessing.Success", + "name": "InputProcessing.Success", + "defaultStat": "Sum" + }, + { + "id": "AWS::KinesisAnalytics::Application:LambdaDelivery.OkRecords", + "name": "LambdaDelivery.OkRecords", + "defaultStat": "Sum" + }, + { + "id": "AWS::KinesisAnalytics::Application:LambdaDelivery.DeliveryFailedRecords", + "name": "LambdaDelivery.DeliveryFailedRecords", + "defaultStat": "Sum" + }, + { + "id": "AWS::KinesisAnalytics::Application:LambdaDelivery.Duration", + "name": "LambdaDelivery.Duration", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "KinesisAnalytics:CrossService", + "name": "Kinesis Analytics", + "dependencies": [ + { + "namespace": "AWS/KinesisAnalytics" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisAnalytics::Application:Bytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisAnalytics::Application:KPUs" + } + ] + } + ] + } + ] + }, + { + "id": "KinesisAnalytics", + "name": "Kinesis Analytics", + "dependencies": [ + { + "namespace": "AWS/KinesisAnalytics" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::KinesisAnalytics.applications" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisAnalytics::Application:Bytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisAnalytics::Application:KPUs" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisAnalytics::Application:MillisBehindLatest" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisAnalytics::Application:Records" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisAnalytics::Application:Success" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisAnalytics::Application:InputProcessing.Duration" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisAnalytics::Application:InputProcessing.OkRecords" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisAnalytics::Application:InputProcessing.OkBytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisAnalytics::Application:InputProcessing.DroppedRecords" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisAnalytics::Application:InputProcessing.ProcessingFailedRecords" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisAnalytics::Application:InputProcessing.Success" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisAnalytics::Application:LambdaDelivery.OkRecords" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisAnalytics::Application:LambdaDelivery.DeliveryFailedRecords" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisAnalytics::Application:LambdaDelivery.Duration" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::KinesisVideo", + "dashboard": "KinesisVideo", + "crossServiceDashboard": "KinesisVideo:CrossService", + "resourceTypes": [ + { + "type": "AWS::KinesisVideo::Stream", + "keyMetric": "AWS::KinesisVideo::Stream:GetMedia.Success", + "dashboard": "KinesisVideo" + } + ], + "controls": { + "AWS::KinesisVideo.streams": { + "type": "resource", + "resourceType": "AWS::KinesisVideo::Stream", + "labelField": "StreamName", + "valueField": "StreamName" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::KinesisVideo::Stream", + "namespace": "AWS/KinesisVideo", + "dimensions": [ + { + "dimensionName": "StreamName", + "labelName": "StreamName" + } + ], + "metrics": [ + { + "id": "AWS::KinesisVideo::Stream:GetMedia.Success", + "name": "GetMedia.Success", + "defaultStat": "Sum" + }, + { + "id": "AWS::KinesisVideo::Stream:PutMedia.Success", + "name": "PutMedia.Success", + "defaultStat": "Sum" + }, + { + "id": "AWS::KinesisVideo::Stream:GetMedia.MillisBehindNow", + "name": "GetMedia.MillisBehindNow", + "defaultStat": "Sum" + }, + { + "id": "AWS::KinesisVideo::Stream:ListFragments.Latency", + "name": "ListFragments.Latency", + "defaultStat": "Sum" + }, + { + "id": "AWS::KinesisVideo::Stream:PutMedia.FragmentIngestionLatency", + "name": "PutMedia.FragmentIngestionLatency", + "defaultStat": "Sum" + }, + { + "id": "AWS::KinesisVideo::Stream:PutMedia.FragmentPersistLatency", + "name": "PutMedia.FragmentPersistLatency", + "defaultStat": "Sum" + }, + { + "id": "AWS::KinesisVideo::Stream:PutMedia.IncomingBytes", + "name": "PutMedia.IncomingBytes", + "defaultStat": "Sum" + }, + { + "id": "AWS::KinesisVideo::Stream:PutMedia.IncomingFrames", + "name": "PutMedia.IncomingFrames", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "KinesisVideo:CrossService", + "name": "Kinesis Video", + "dependencies": [ + { + "namespace": "AWS/KinesisVideo" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisVideo::Stream:GetMedia.Success" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisVideo::Stream:PutMedia.Success" + } + ] + } + ] + } + ] + }, + { + "id": "KinesisVideo", + "name": "Kinesis Video", + "dependencies": [ + { + "namespace": "AWS/KinesisVideo" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::KinesisVideo.streams" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisVideo::Stream:GetMedia.Success" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisVideo::Stream:PutMedia.Success" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisVideo::Stream:GetMedia.MillisBehindNow" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisVideo::Stream:ListFragments.Latency" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisVideo::Stream:PutMedia.FragmentIngestionLatency" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisVideo::Stream:PutMedia.FragmentPersistLatency" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisVideo::Stream:PutMedia.IncomingBytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KinesisVideo::Stream:PutMedia.IncomingFrames" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::KMS", + "dashboard": "KMS", + "crossServiceDashboard": "KMS:CrossService", + "resourceTypes": [ + { + "type": "AWS::KMS::Key", + "keyMetric": "AWS::KMS::Key:SecondsUntilKeyMaterialExpiration", + "dashboard": "KMS", + "arnRegex": ".*:key/(.*)" + } + ], + "controls": { + "AWS::KMS.keys": { + "type": "resource", + "resourceType": "AWS::KMS::Key", + "labelField": "KeyId", + "valueField": "KeyId" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::KMS::Key", + "namespace": "AWS/KMS", + "dimensions": [ + { + "dimensionName": "KeyId", + "labelName": "KeyId" + } + ], + "metrics": [ + { + "id": "AWS::KMS::Key:SecondsUntilKeyMaterialExpiration", + "name": "SecondsUntilKeyMaterialExpiration", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "KMS:CrossService", + "name": "KMS", + "dependencies": [ + { + "namespace": "AWS/KMS" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KMS::Key:SecondsUntilKeyMaterialExpiration" + } + ] + } + ] + } + ] + }, + { + "id": "KMS", + "name": "KMS", + "dependencies": [ + { + "namespace": "AWS/KMS" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::KMS.keys" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::KMS::Key:SecondsUntilKeyMaterialExpiration" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::Lambda", + "dashboard": "Lambda", + "crossServiceDashboard": "Lambda:CrossService", + "resourceTypes": [ + { + "type": "AWS::Lambda::Function", + "consoleLink": "/lambda/home?region={region}#/functions/{FunctionName}", + "keyMetric": "AWS::Lambda::Function:Duration", + "describe": "lambda-describe-functions", + "dashboard": "Lambda", + "isResourceNode": true, + "arnRegex": ".*:function:(.*)" + } + ], + "controls": { + "AWS::Lambda.functions": { + "type": "resource", + "resourceType": "AWS::Lambda::Function", + "labelField": "FunctionName", + "valueField": "FunctionName" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::Lambda::Function", + "namespace": "AWS/Lambda", + "dimensions": [ + { + "dimensionName": "FunctionName", + "labelName": "FunctionName" + } + ], + "metrics": [ + { + "id": "AWS::Lambda::Function:Duration", + "name": "Duration", + "defaultStat": "p90" + }, + { + "id": "AWS::Lambda::Function:Errors", + "name": "Errors", + "defaultStat": "Sum" + }, + { + "id": "AWS::Lambda::Function:Invocations", + "name": "Invocations", + "defaultStat": "Sum" + }, + { + "id": "AWS::Lambda::Function:Throttles", + "name": "Throttles", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "Lambda:CrossService", + "name": "Lambda", + "dependencies": [ + { + "namespace": "AWS/Lambda" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Lambda::Function:Duration" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Lambda::Function:Errors" + } + ] + } + ] + } + ] + }, + { + "id": "Lambda", + "name": "Lambda", + "dependencies": [ + { + "namespace": "AWS/Lambda" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::Lambda.functions" + ], + "tables": [ + { + "resourceType": "AWS::Lambda::Function", + "columns": [ + "FunctionName", + "Description", + "Runtime", + "CodeSize", + "MemorySize", + "LastModified" + ] + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Lambda::Function:Invocations" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Lambda::Function:Duration" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Lambda::Function:Errors" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Lambda::Function:Throttles" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::Lex", + "dashboard": "Lex", + "crossServiceDashboard": "Lex:CrossService", + "resourceTypes": [ + { + "type": "AWS::Lex::BotAlias", + "keyMetric": "AWS::Lex::BotAlias:RuntimeRequestCount", + "dashboard": "Lex" + } + ], + "controls": { + "AWS::Lex.botAliass": { + "type": "resource", + "resourceType": "AWS::Lex::BotAlias", + "labelField": "BotAlias", + "valueField": "BotAlias" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::Lex::BotAlias", + "namespace": "AWS/Lex", + "dimensions": [ + { + "dimensionName": "BotAlias", + "labelName": "BotAlias" + } + ], + "metrics": [ + { + "id": "AWS::Lex::BotAlias:RuntimeRequestCount", + "name": "RuntimeRequestCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::Lex::BotAlias:RuntimeSucessfulRequestLatency", + "name": "RuntimeSucessfulRequestLatency", + "defaultStat": "Average" + }, + { + "id": "AWS::Lex::BotAlias:RuntimeInvalidLambdaResponses", + "name": "RuntimeInvalidLambdaResponses", + "defaultStat": "Sum" + }, + { + "id": "AWS::Lex::BotAlias:RuntimeLambdaErrors", + "name": "RuntimeLambdaErrors", + "defaultStat": "Sum" + }, + { + "id": "AWS::Lex::BotAlias:MissedUtteranceCount", + "name": "MissedUtteranceCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::Lex::BotAlias:RuntimePollyErrors", + "name": "RuntimePollyErrors", + "defaultStat": "Sum" + }, + { + "id": "AWS::Lex::BotAlias:RuntimeSystemErrors", + "name": "RuntimeSystemErrors", + "defaultStat": "Sum" + }, + { + "id": "AWS::Lex::BotAlias:RuntimeThrottledEvents", + "name": "RuntimeThrottledEvents", + "defaultStat": "Sum" + }, + { + "id": "AWS::Lex::BotAlias:RuntimeUserErrors", + "name": "RuntimeUserErrors", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "Lex:CrossService", + "name": "Lex", + "dependencies": [ + { + "namespace": "AWS/Lex" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Lex::BotAlias:RuntimeRequestCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Lex::BotAlias:RuntimeSucessfulRequestLatency" + } + ] + } + ] + } + ] + }, + { + "id": "Lex", + "name": "Lex", + "dependencies": [ + { + "namespace": "AWS/Lex" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::Lex.botAliass" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Lex::BotAlias:RuntimeRequestCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Lex::BotAlias:RuntimeSucessfulRequestLatency" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Lex::BotAlias:RuntimeInvalidLambdaResponses" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Lex::BotAlias:RuntimeLambdaErrors" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Lex::BotAlias:MissedUtteranceCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Lex::BotAlias:RuntimePollyErrors" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Lex::BotAlias:RuntimeSystemErrors" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Lex::BotAlias:RuntimeThrottledEvents" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Lex::BotAlias:RuntimeUserErrors" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::Logs", + "dashboard": "Logs", + "crossServiceDashboard": "Logs:CrossService", + "resourceTypes": [ + { + "type": "AWS::Logs::LogGroup", + "keyMetric": "AWS::Logs::LogGroup:IncomingLogEvents", + "dashboard": "Logs", + "arnRegex": ".*:log-group:(.*)" + } + ], + "controls": { + "AWS::Logs.logGroups": { + "type": "resource", + "resourceType": "AWS::Logs::LogGroup", + "labelField": "LogGroupName", + "valueField": "LogGroupName" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::Logs::LogGroup", + "namespace": "AWS/Logs", + "dimensions": [ + { + "dimensionName": "LogGroupName", + "labelName": "LogGroupName" + } + ], + "metrics": [ + { + "id": "AWS::Logs::LogGroup:IncomingLogEvents", + "name": "IncomingLogEvents", + "defaultStat": "Sum" + }, + { + "id": "AWS::Logs::LogGroup:DeliveryErrors", + "name": "DeliveryErrors", + "defaultStat": "Sum" + }, + { + "id": "AWS::Logs::LogGroup:IncomingBytes", + "name": "IncomingBytes", + "defaultStat": "Sum" + }, + { + "id": "AWS::Logs::LogGroup:ForwardedBytes", + "name": "ForwardedBytes", + "defaultStat": "Sum" + }, + { + "id": "AWS::Logs::LogGroup:ForwardedLogEvents", + "name": "ForwardedLogEvents", + "defaultStat": "Sum" + }, + { + "id": "AWS::Logs::LogGroup:DeliveryThrottling", + "name": "DeliveryThrottling", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "Logs:CrossService", + "name": "CloudWatch Logs", + "dependencies": [ + { + "namespace": "AWS/Logs" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Logs::LogGroup:IncomingLogEvents" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Logs::LogGroup:DeliveryErrors" + } + ] + } + ] + } + ] + }, + { + "id": "Logs", + "name": "CloudWatch Logs", + "dependencies": [ + { + "namespace": "AWS/Logs" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::Logs.logGroups" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Logs::LogGroup:IncomingLogEvents" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Logs::LogGroup:DeliveryErrors" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Logs::LogGroup:IncomingBytes" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Logs::LogGroup:ForwardedBytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Logs::LogGroup:ForwardedLogEvents" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Logs::LogGroup:DeliveryThrottling" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::MediaConvert::Queue", + "dashboard": "MediaConvert", + "crossServiceDashboard": "MediaConvert:CrossService", + "resourceTypes": [ + { + "type": "AWS::MediaConvert::Queue", + "keyMetric": "AWS::MediaConvert::Queue:TranscodingTime", + "dashboard": "MediaConvert", + "arnRegex": ".*:queues/(.*)" + } + ], + "metricTemplates": [ + { + "resourceType": "AWS::MediaConvert::Queue", + "namespace": "AWS/MediaConvert", + "dimensions": [ + { + "dimensionName": "Queue", + "labelName": "Queue" + } + ], + "metrics": [ + { + "id": "AWS::MediaConvert::Queue:TranscodingTime", + "name": "TranscodingTime", + "defaultStat": "Average" + }, + { + "id": "AWS::MediaConvert::Queue:JobsCompletedCount", + "name": "JobsCompletedCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::MediaConvert::Queue:8KOutputDuration", + "name": "8KOutputDuration", + "defaultStat": "Average" + }, + { + "id": "AWS::MediaConvert::Queue:AudioOutputDuration", + "name": "AudioOutputDuration", + "defaultStat": "Average" + }, + { + "id": "AWS::MediaConvert::Queue:HDOutputDuration", + "name": "HDOutputDuration", + "defaultStat": "Average" + }, + { + "id": "AWS::MediaConvert::Queue:JobsErroredCount", + "name": "JobsErroredCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::MediaConvert::Queue:SDOutputDuration", + "name": "SDOutputDuration", + "defaultStat": "Average" + }, + { + "id": "AWS::MediaConvert::Queue:StandbyTime", + "name": "StandbyTime", + "defaultStat": "Sum" + }, + { + "id": "AWS::MediaConvert::Queue:UHDOutputDuration", + "name": "UHDOutputDuration", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "MediaConvert:CrossService", + "name": "MediaConvert", + "dependencies": [ + { + "namespace": "AWS/MediaConvert" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaConvert::Queue:TranscodingTime" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaConvert::Queue:JobsCompletedCount" + } + ] + } + ] + } + ] + }, + { + "id": "MediaConvert", + "name": "MediaConvert", + "dependencies": [ + { + "namespace": "AWS/MediaConvert" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaConvert::Queue:TranscodingTime" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaConvert::Queue:JobsCompletedCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaConvert::Queue:8KOutputDuration" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaConvert::Queue:AudioOutputDuration" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaConvert::Queue:HDOutputDuration" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaConvert::Queue:JobsErroredCount" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaConvert::Queue:SDOutputDuration" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaConvert::Queue:StandbyTime" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaConvert::Queue:UHDOutputDuration" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::MediaPackage", + "dashboard": "MediaPackage", + "crossServiceDashboard": "MediaPackage:CrossService", + "resourceTypes": [ + { + "type": "AWS::MediaPackage::Channel", + "keyMetric": "AWS::MediaPackage::Channel:EgressRequestCount", + "dashboard": "MediaPackage" + } + ], + "controls": { + "AWS::MediaPackage.channels": { + "type": "resource", + "resourceType": "AWS::MediaPackage::Channel", + "labelField": "Channel", + "valueField": "Channel" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::MediaPackage::Channel", + "namespace": "AWS/MediaPackage", + "dimensions": [ + { + "dimensionName": "Channel", + "labelName": "Channel" + } + ], + "metrics": [ + { + "id": "AWS::MediaPackage::Channel:EgressRequestCount", + "name": "EgressRequestCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::MediaPackage::Channel:EgressResponseTime", + "name": "EgressResponseTime", + "defaultStat": "Average" + }, + { + "id": "AWS::MediaPackage::Channel:EgressBytes", + "name": "EgressBytes", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "MediaPackage:CrossService", + "name": "Media Package", + "dependencies": [ + { + "namespace": "AWS/MediaPackage" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaPackage::Channel:EgressRequestCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaPackage::Channel:EgressResponseTime" + } + ] + } + ] + } + ] + }, + { + "id": "MediaPackage", + "name": "Media Package", + "dependencies": [ + { + "namespace": "AWS/MediaPackage" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::MediaPackage.channels" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaPackage::Channel:EgressRequestCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaPackage::Channel:EgressResponseTime" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaPackage::Channel:EgressBytes" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::MediaStore::Container", + "dashboard": "MediaStore", + "crossServiceDashboard": "MediaStore:CrossService", + "resourceTypes": [ + { + "type": "AWS::MediaStore::Container", + "keyMetric": "AWS::MediaStore::Container:RequestCount", + "dashboard": "MediaStore", + "arnRegex": ".*:container/(.*)" + } + ], + "metricTemplates": [ + { + "resourceType": "AWS::MediaStore::Container", + "namespace": "AWS/MediaStore", + "dimensions": [ + { + "dimensionName": "ContainerName", + "labelName": "ContainerName" + } + ], + "metrics": [ + { + "id": "AWS::MediaStore::Container:RequestCount", + "name": "RequestCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::MediaStore::Container:TurnaroundTime", + "name": "TurnaroundTime", + "defaultStat": "Average" + }, + { + "id": "AWS::MediaStore::Container:4xxErrorCount", + "name": "4xxErrorCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::MediaStore::Container:5xxErrorCount", + "name": "5xxErrorCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::MediaStore::Container:BytesDownloaded", + "name": "BytesDownloaded", + "defaultStat": "Sum" + }, + { + "id": "AWS::MediaStore::Container:BytesUploaded", + "name": "BytesUploaded", + "defaultStat": "Sum" + }, + { + "id": "AWS::MediaStore::Container:TotalTime", + "name": "TotalTime", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "MediaStore:CrossService", + "name": "MediaStore", + "dependencies": [ + { + "namespace": "AWS/MediaStore" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaStore::Container:RequestCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaStore::Container:TurnaroundTime" + } + ] + } + ] + } + ] + }, + { + "id": "MediaStore", + "name": "MediaStore", + "dependencies": [ + { + "namespace": "AWS/MediaStore" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaStore::Container:RequestCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaStore::Container:TurnaroundTime" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaStore::Container:4xxErrorCount" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaStore::Container:5xxErrorCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaStore::Container:BytesDownloaded" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaStore::Container:BytesUploaded" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaStore::Container:TotalTime" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::MediaTailor", + "dashboard": "MediaTailor", + "crossServiceDashboard": "MediaTailor:CrossService", + "resourceTypes": [ + { + "type": "AWS::MediaTailor::Configuration", + "keyMetric": "AWS::MediaTailor::Configuration:AdDecisionServer.Ads", + "dashboard": "MediaTailor" + } + ], + "controls": { + "AWS::MediaTailor.configurations": { + "type": "resource", + "resourceType": "AWS::MediaTailor::Configuration", + "labelField": "ConfigurationName", + "valueField": "ConfigurationName" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::MediaTailor::Configuration", + "namespace": "AWS/MediaTailor", + "dimensions": [ + { + "dimensionName": "ConfigurationName", + "labelName": "ConfigurationName" + } + ], + "metrics": [ + { + "id": "AWS::MediaTailor::Configuration:AdDecisionServer.Ads", + "name": "AdDecisionServer.Ads", + "defaultStat": "Sum" + }, + { + "id": "AWS::MediaTailor::Configuration:AdDecisionServer.Duration", + "name": "AdDecisionServer.Duration", + "defaultStat": "Average" + }, + { + "id": "AWS::MediaTailor::Configuration:AdDecisionServer.Errors", + "name": "AdDecisionServer.Errors", + "defaultStat": "Sum" + }, + { + "id": "AWS::MediaTailor::Configuration:AdDecisionServer.FillRate", + "name": "AdDecisionServer.FillRate", + "defaultStat": "Sum" + }, + { + "id": "AWS::MediaTailor::Configuration:AdDecisionServer.Latency", + "name": "AdDecisionServer.Latency", + "defaultStat": "Average" + }, + { + "id": "AWS::MediaTailor::Configuration:AdNotReady", + "name": "AdNotReady", + "defaultStat": "Sum" + }, + { + "id": "AWS::MediaTailor::Configuration:Avail.Duration", + "name": "Avail.Duration", + "defaultStat": "Sum" + }, + { + "id": "AWS::MediaTailor::Configuration:Avail.FillRate", + "name": "Avail.FillRate", + "defaultStat": "Sum" + }, + { + "id": "AWS::MediaTailor::Configuration:Avail.FilledDuration", + "name": "Avail.FilledDuration", + "defaultStat": "Average" + }, + { + "id": "AWS::MediaTailor::Configuration:GetManifest.Errors", + "name": "GetManifest.Errors", + "defaultStat": "Sum" + }, + { + "id": "AWS::MediaTailor::Configuration:GetManifest.Latency", + "name": "GetManifest.Latency", + "defaultStat": "Average" + }, + { + "id": "AWS::MediaTailor::Configuration:Origin.Errors", + "name": "Origin.Errors", + "defaultStat": "Sum" + }, + { + "id": "AWS::MediaTailor::Configuration:Origin.Latency", + "name": "Origin.Latency", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "MediaTailor:CrossService", + "name": "MediaTailor", + "dependencies": [ + { + "namespace": "AWS/MediaTailor" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaTailor::Configuration:AdDecisionServer.Ads" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaTailor::Configuration:AdDecisionServer.Duration" + } + ] + } + ] + } + ] + }, + { + "id": "MediaTailor", + "name": "MediaTailor", + "dependencies": [ + { + "namespace": "AWS/MediaTailor" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::MediaTailor.configurations" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaTailor::Configuration:AdDecisionServer.Ads" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaTailor::Configuration:AdDecisionServer.Duration" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaTailor::Configuration:AdDecisionServer.Errors" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaTailor::Configuration:AdDecisionServer.FillRate" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaTailor::Configuration:AdDecisionServer.Latency" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaTailor::Configuration:AdNotReady" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaTailor::Configuration:Avail.Duration" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaTailor::Configuration:Avail.FillRate" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaTailor::Configuration:Avail.FilledDuration" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaTailor::Configuration:GetManifest.Errors" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaTailor::Configuration:GetManifest.Latency" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::MediaTailor::Configuration:Origin.Errors" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "width": 8, + "metrics": [ + { + "metricTemplate": "AWS::MediaTailor::Configuration:Origin.Latency" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::EC2::NATGateway", + "dashboard": "NATGateway", + "crossServiceDashboard": "NATGateway:CrossService", + "resourceTypes": [ + { + "type": "AWS::EC2::NatGateway", + "keyMetric": "AWS::EC2::NatGateway:ActiveConnectionCount", + "dashboard": "NATGateway" + } + ], + "controls": { + "AWS::EC2::NATGateway.natGateways": { + "type": "resource", + "resourceType": "AWS::EC2::NatGateway", + "labelField": "NatGatewayId", + "valueField": "NatGatewayId" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::EC2::NatGateway", + "namespace": "AWS/NATGateway", + "dimensions": [ + { + "dimensionName": "NatGatewayId", + "labelName": "NatGatewayId" + } + ], + "metrics": [ + { + "id": "AWS::EC2::NatGateway:ActiveConnectionCount", + "name": "ActiveConnectionCount", + "defaultStat": "Maximum" + }, + { + "id": "AWS::EC2::NatGateway:PacketsDropCount", + "name": "PacketsDropCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::EC2::NatGateway:BytesInFromDestination", + "name": "BytesInFromDestination", + "defaultStat": "Sum" + }, + { + "id": "AWS::EC2::NatGateway:BytesInFromSource", + "name": "BytesInFromSource", + "defaultStat": "Sum" + }, + { + "id": "AWS::EC2::NatGateway:BytesOutToDestination", + "name": "BytesOutToDestination", + "defaultStat": "Sum" + }, + { + "id": "AWS::EC2::NatGateway:BytesOutToSource", + "name": "BytesOutToSource", + "defaultStat": "Sum" + }, + { + "id": "AWS::EC2::NatGateway:ConnectionAttemptCount", + "name": "ConnectionAttemptCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::EC2::NatGateway:ConnectionEstablishedCount", + "name": "ConnectionEstablishedCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::EC2::NatGateway:ErrorPortAllocation", + "name": "ErrorPortAllocation", + "defaultStat": "Sum" + }, + { + "id": "AWS::EC2::NatGateway:IdleTimeoutCount", + "name": "IdleTimeoutCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::EC2::NatGateway:PacketsInFromDestination", + "name": "PacketsInFromDestination", + "defaultStat": "Sum" + }, + { + "id": "AWS::EC2::NatGateway:PacketsInFromSource", + "name": "PacketsInFromSource", + "defaultStat": "Sum" + }, + { + "id": "AWS::EC2::NatGateway:PacketsOutToDestination", + "name": "PacketsOutToDestination", + "defaultStat": "Sum" + }, + { + "id": "AWS::EC2::NatGateway:PacketsOutToSource", + "name": "PacketsOutToSource", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "NATGateway:CrossService", + "name": "NAT Gateway", + "dependencies": [ + { + "namespace": "AWS/NATGateway" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::NatGateway:ActiveConnectionCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::NatGateway:PacketsDropCount" + } + ] + } + ] + } + ] + }, + { + "id": "NATGateway", + "name": "NAT Gateway", + "dependencies": [ + { + "namespace": "AWS/NATGateway" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::EC2::NATGateway.natGateways" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::NatGateway:ActiveConnectionCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::NatGateway:PacketsDropCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::NatGateway:BytesInFromDestination" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::NatGateway:BytesInFromSource" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::NatGateway:BytesOutToDestination" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::NatGateway:BytesOutToSource" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::NatGateway:ConnectionAttemptCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::NatGateway:ConnectionEstablishedCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::NatGateway:ErrorPortAllocation" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::NatGateway:IdleTimeoutCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::NatGateway:PacketsInFromDestination" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::NatGateway:PacketsInFromSource" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::NatGateway:PacketsOutToDestination" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::NatGateway:PacketsOutToSource" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::Neptune", + "dashboard": "Neptune", + "crossServiceDashboard": "Neptune:CrossService", + "resourceTypes": [ + { + "type": "AWS::Neptune::DBCluster", + "keyMetric": "AWS::Neptune::DBCluster:CPUUtilization", + "dashboard": "Neptune" + } + ], + "controls": { + "AWS::Neptune.dBClusters": { + "type": "resource", + "resourceType": "AWS::Neptune::DBCluster", + "labelField": "DBClusterIdentifier", + "valueField": "DBClusterIdentifier" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::Neptune::DBCluster", + "namespace": "AWS/Neptune", + "dimensions": [ + { + "dimensionName": "DBClusterIdentifier", + "labelName": "DBClusterIdentifier" + } + ], + "metrics": [ + { + "id": "AWS::Neptune::DBCluster:CPUUtilization", + "name": "CPUUtilization", + "defaultStat": "Average" + }, + { + "id": "AWS::Neptune::DBCluster:FreeLocalStorage", + "name": "FreeLocalStorage", + "defaultStat": "Minimum" + }, + { + "id": "AWS::Neptune::DBCluster:FreeableMemory", + "name": "FreeableMemory", + "defaultStat": "Minimum" + }, + { + "id": "AWS::Neptune::DBCluster:GremlinErrors", + "name": "GremlinErrors", + "defaultStat": "Sum" + }, + { + "id": "AWS::Neptune::DBCluster:GremlinRequests", + "name": "GremlinRequests", + "defaultStat": "Sum" + }, + { + "id": "AWS::Neptune::DBCluster:GremlinRequestsPerSec", + "name": "GremlinRequestsPerSec", + "defaultStat": "Average" + }, + { + "id": "AWS::Neptune::DBCluster:Http413", + "name": "Http413", + "defaultStat": "Sum" + }, + { + "id": "AWS::Neptune::DBCluster:Http500", + "name": "Http500", + "defaultStat": "Sum" + }, + { + "id": "AWS::Neptune::DBCluster:LoaderRequests", + "name": "LoaderRequests", + "defaultStat": "Sum" + }, + { + "id": "AWS::Neptune::DBCluster:NetworkReceiveThroughput", + "name": "NetworkReceiveThroughput", + "defaultStat": "Sum" + }, + { + "id": "AWS::Neptune::DBCluster:SparqlErrors", + "name": "SparqlErrors", + "defaultStat": "Sum" + }, + { + "id": "AWS::Neptune::DBCluster:SparqlRequestsPerSec", + "name": "SparqlRequestsPerSec", + "defaultStat": "Sum" + }, + { + "id": "AWS::Neptune::DBCluster:VolumeBytesUsed", + "name": "VolumeBytesUsed", + "defaultStat": "Sum" + }, + { + "id": "AWS::Neptune::DBCluster:VolumeReadIOPs", + "name": "VolumeReadIOPs", + "defaultStat": "Sum" + }, + { + "id": "AWS::Neptune::DBCluster:VolumeWriteIOPs", + "name": "VolumeWriteIOPs", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "Neptune:CrossService", + "name": "Neptune", + "dependencies": [ + { + "namespace": "AWS/Neptune" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Neptune::DBCluster:CPUUtilization" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Neptune::DBCluster:FreeLocalStorage" + } + ] + } + ] + } + ] + }, + { + "id": "Neptune", + "name": "Neptune", + "dependencies": [ + { + "namespace": "AWS/Neptune" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::Neptune.dBClusters" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Neptune::DBCluster:CPUUtilization" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Neptune::DBCluster:FreeLocalStorage" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Neptune::DBCluster:FreeableMemory" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Neptune::DBCluster:GremlinErrors" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Neptune::DBCluster:GremlinRequests" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Neptune::DBCluster:GremlinRequestsPerSec" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Neptune::DBCluster:Http413" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Neptune::DBCluster:Http500" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Neptune::DBCluster:LoaderRequests" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Neptune::DBCluster:NetworkReceiveThroughput" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Neptune::DBCluster:SparqlErrors" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Neptune::DBCluster:SparqlRequestsPerSec" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Neptune::DBCluster:VolumeBytesUsed" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Neptune::DBCluster:VolumeReadIOPs" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Neptune::DBCluster:VolumeWriteIOPs" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::NetworkELB", + "dashboard": "NetworkELB", + "crossServiceDashboard": "NetworkELB:CrossService", + "resourceTypes": [ + { + "type": "AWS::ElasticLoadBalancingV2::LoadBalancer/NetworkELB", + "entityType": "AWS::ElasticLoadBalancingV2::LoadBalancer", + "keyMetric": "AWS::ElasticLoadBalancingV2::LoadBalancer/NetworkELB:ConsumedLCUs", + "dashboard": "NetworkELB", + "arnRegex": ".*:loadbalancer/(net/.*)" + } + ], + "controls": { + "AWS::NetworkELB.loadBalancers": { + "type": "resource", + "resourceType": "AWS::ElasticLoadBalancingV2::LoadBalancer/NetworkELB", + "labelField": "LoadBalancer", + "valueField": "LoadBalancer" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::ElasticLoadBalancingV2::LoadBalancer/NetworkELB", + "namespace": "AWS/NetworkELB", + "dimensions": [ + { + "dimensionName": "LoadBalancer", + "labelName": "LoadBalancer" + } + ], + "metrics": [ + { + "id": "AWS::ElasticLoadBalancingV2::LoadBalancer/NetworkELB:HealthyHostCount", + "name": "HealthyHostCount", + "defaultStat": "Average" + }, + { + "id": "AWS::ElasticLoadBalancingV2::LoadBalancer/NetworkELB:UnHealthyHostCount", + "name": "UnHealthyHostCount", + "defaultStat": "Average" + }, + { + "id": "AWS::ElasticLoadBalancingV2::LoadBalancer/NetworkELB:ActiveFlowCount", + "name": "ActiveFlowCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElasticLoadBalancingV2::LoadBalancer/NetworkELB:ConsumedLCUs", + "name": "ConsumedLCUs", + "defaultStat": "Average" + }, + { + "id": "AWS::ElasticLoadBalancingV2::LoadBalancer/NetworkELB:NewFlowCount", + "name": "NewFlowCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElasticLoadBalancingV2::LoadBalancer/NetworkELB:ProcessedBytes", + "name": "ProcessedBytes", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElasticLoadBalancingV2::LoadBalancer/NetworkELB:TCP_Client_Reset_Count", + "name": "TCP_Client_Reset_Count", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElasticLoadBalancingV2::LoadBalancer/NetworkELB:TCP_ELB_Reset_Count", + "name": "TCP_ELB_Reset_Count", + "defaultStat": "Sum" + }, + { + "id": "AWS::ElasticLoadBalancingV2::LoadBalancer/NetworkELB:TCP_Target_Reset_Count", + "name": "TCP_Target_Reset_Count", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "NetworkELB:CrossService", + "name": "Network ELB", + "dependencies": [ + { + "namespace": "AWS/NetworkELB" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/NetworkELB:HealthyHostCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/NetworkELB:UnHealthyHostCount" + } + ] + } + ] + } + ] + }, + { + "id": "NetworkELB", + "name": "Network ELB", + "dependencies": [ + { + "namespace": "AWS/NetworkELB" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::NetworkELB.loadBalancers" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/NetworkELB:HealthyHostCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/NetworkELB:UnHealthyHostCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/NetworkELB:ActiveFlowCount" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/NetworkELB:ConsumedLCUs" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/NetworkELB:NewFlowCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/NetworkELB:ProcessedBytes" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/NetworkELB:TCP_Client_Reset_Count" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/NetworkELB:TCP_ELB_Reset_Count" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ElasticLoadBalancingV2::LoadBalancer/NetworkELB:TCP_Target_Reset_Count" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::OpsWorks::Instance", + "dashboard": "OpsWorks", + "crossServiceDashboard": "OpsWorks:CrossService", + "resourceTypes": [ + { + "type": "AWS::OpsWorks::Instance", + "keyMetric": "AWS::OpsWorks::Instance:procs", + "dashboard": "OpsWorks", + "arnRegex": ".*:instance/(.*)" + }, + { + "type": "AWS::OpsWorks::Layer", + "keyMetric": "AWS::OpsWorks::Layer:cpu_user", + "dashboard": "OpsWorks", + "arnRegex": ".*:layer/(.*)" + }, + { + "type": "AWS::OpsWorks::Stack", + "keyMetric": "AWS::OpsWorks::Stack:cpu_user", + "dashboard": "OpsWorks", + "arnRegex": ".*:stack/(.*)/" + } + ], + "metricTemplates": [ + { + "resourceType": "AWS::OpsWorks::Instance", + "namespace": "AWS/OpsWorks", + "dimensions": [ + { + "dimensionName": "InstanceId", + "labelName": "InstanceId" + } + ], + "metrics": [ + { + "id": "AWS::OpsWorks::Instance:procs", + "name": "procs", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Instance:memory_used", + "name": "memory_used", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Instance:cpu_idle", + "name": "cpu_idle", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Instance:cpu_nice", + "name": "cpu_nice", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Instance:cpu_steal", + "name": "cpu_steal", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Instance:cpu_system", + "name": "cpu_system", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Instance:cpu_user", + "name": "cpu_user", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Instance:cpu_waitio", + "name": "cpu_waitio", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Instance:load_1", + "name": "load_1", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Instance:load_15", + "name": "load_15", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Instance:load_5", + "name": "load_5", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Instance:memory_buffers", + "name": "memory_buffers", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Instance:memory_cached", + "name": "memory_cached", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Instance:memory_free", + "name": "memory_free", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Instance:memory_swap", + "name": "memory_swap", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Instance:memory_total", + "name": "memory_total", + "defaultStat": "Average" + } + ] + }, + { + "resourceType": "AWS::OpsWorks::Layer", + "namespace": "AWS/OpsWorks", + "dimensions": [ + { + "dimensionName": "LayerId", + "labelName": "LayerId" + } + ], + "metrics": [ + { + "id": "AWS::OpsWorks::Layer:cpu_user", + "name": "cpu_user", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Layer:load_1", + "name": "load_1", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Layer:cpu_idle", + "name": "cpu_idle", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Layer:cpu_nice", + "name": "cpu_nice", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Layer:cpu_steal", + "name": "cpu_steal", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Layer:cpu_system", + "name": "cpu_system", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Layer:cpu_waitio", + "name": "cpu_waitio", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Layer:load_15", + "name": "load_15", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Layer:load_5", + "name": "load_5", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Layer:memory_buffers", + "name": "memory_buffers", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Layer:memory_cached", + "name": "memory_cached", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Layer:memory_free", + "name": "memory_free", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Layer:memory_swap", + "name": "memory_swap", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Layer:memory_total", + "name": "memory_total", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Layer:memory_used", + "name": "memory_used", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Layer:procs", + "name": "procs", + "defaultStat": "Average" + } + ] + }, + { + "resourceType": "AWS::OpsWorks::Stack", + "namespace": "AWS/OpsWorks", + "dimensions": [ + { + "dimensionName": "StackId", + "labelName": "StackId" + } + ], + "metrics": [ + { + "id": "AWS::OpsWorks::Stack:cpu_user", + "name": "cpu_user", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Stack:load_1", + "name": "load_1", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Stack:cpu_idle", + "name": "cpu_idle", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Stack:cpu_nice", + "name": "cpu_nice", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Stack:cpu_steal", + "name": "cpu_steal", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Stack:cpu_system", + "name": "cpu_system", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Stack:cpu_waitio", + "name": "cpu_waitio", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Stack:load_15", + "name": "load_15", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Stack:load_5", + "name": "load_5", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Stack:memory_buffers", + "name": "memory_buffers", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Stack:memory_cached", + "name": "memory_cached", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Stack:memory_free", + "name": "memory_free", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Stack:memory_swap", + "name": "memory_swap", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Stack:memory_total", + "name": "memory_total", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Stack:memory_used", + "name": "memory_used", + "defaultStat": "Average" + }, + { + "id": "AWS::OpsWorks::Stack:procs", + "name": "procs", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "OpsWorks:CrossService", + "name": "OpsWorks", + "dependencies": [ + { + "namespace": "AWS/OpsWorks" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::OpsWorks::Instance:procs" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::OpsWorks::Instance:memory_used" + } + ] + } + ] + } + ] + }, + { + "id": "OpsWorks", + "name": "OpsWorks", + "dependencies": [ + { + "namespace": "AWS/OpsWorks" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::OpsWorks::Instance:procs" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::OpsWorks::Instance:memory_used" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::OpsWorks::Instance:cpu_idle" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::OpsWorks::Instance:cpu_nice" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::OpsWorks::Instance:cpu_steal" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::OpsWorks::Instance:cpu_system" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::OpsWorks::Instance:cpu_user" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::OpsWorks::Instance:cpu_waitio" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::OpsWorks::Instance:load_1" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::OpsWorks::Instance:load_15" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::OpsWorks::Instance:load_5" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::OpsWorks::Instance:memory_buffers" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::OpsWorks::Instance:memory_cached" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::OpsWorks::Instance:memory_free" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::OpsWorks::Instance:memory_swap" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::OpsWorks::Instance:memory_total" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "Overview", + "dashboard": "Overview", + "resourceTypes": [], + "controls": {}, + "metricTemplates": [], + "dashboards": [ + { + "id": "Overview", + "name": "Overview", + "controls": [ + "Shared::Group.ResourceGroup" + ], + "rows": [] + } + ] + }, + { + "id": "AWS::Polly", + "dashboard": "Polly", + "crossServiceDashboard": "Polly:CrossService", + "resourceTypes": [ + { + "type": "AWS::Polly::Operation", + "keyMetric": "AWS::Polly::Operation:RequestCharacters", + "dashboard": "Polly" + } + ], + "controls": { + "AWS::Polly.operations": { + "type": "resource", + "resourceType": "AWS::Polly::Operation", + "labelField": "Operation", + "valueField": "Operation" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::Polly::Operation", + "namespace": "AWS/Polly", + "dimensions": [ + { + "dimensionName": "Operation", + "labelName": "Operation" + } + ], + "metrics": [ + { + "id": "AWS::Polly::Operation:RequestCharacters", + "name": "RequestCharacters", + "defaultStat": "Average" + }, + { + "id": "AWS::Polly::Operation:5XXCount", + "name": "5XXCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::Polly::Operation:ResponseLatency", + "name": "ResponseLatency", + "defaultStat": "Average" + }, + { + "id": "AWS::Polly::Operation:2XXCount", + "name": "2XXCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::Polly::Operation:4XXCount", + "name": "4XXCount", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "Polly:CrossService", + "name": "Polly", + "dependencies": [ + { + "namespace": "AWS/Polly" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Polly::Operation:RequestCharacters" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Polly::Operation:5XXCount" + } + ] + } + ] + } + ] + }, + { + "id": "Polly", + "name": "Polly", + "dependencies": [ + { + "namespace": "AWS/Polly" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::Polly.operations" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Polly::Operation:RequestCharacters" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Polly::Operation:5XXCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Polly::Operation:ResponseLatency" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Polly::Operation:2XXCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Polly::Operation:4XXCount" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::QLDB::Ledger", + "dashboard": "QLDB", + "crossServiceDashboard": "QLDB:CrossService", + "resourceTypes": [ + { + "type": "AWS::QLDB::Ledger", + "keyMetric": "AWS::QLDB::Ledger:CommandLatency", + "dashboard": "QLDB", + "arnRegex": ".*:ledger/(.*)" + } + ], + "metricTemplates": [ + { + "resourceType": "AWS::QLDB::Ledger", + "namespace": "AWS/QLDB", + "dimensions": [ + { + "dimensionName": "LedgerName", + "labelName": "LedgerName" + } + ], + "metrics": [ + { + "id": "AWS::QLDB::Ledger:CommandLatency", + "name": "CommandLatency", + "defaultStat": "Average" + }, + { + "id": "AWS::QLDB::Ledger:JournalStorage", + "name": "JournalStorage", + "defaultStat": "Sum" + }, + { + "id": "AWS::QLDB::Ledger:IndexedStorage", + "name": "IndexedStorage", + "defaultStat": "Sum" + }, + { + "id": "AWS::QLDB::Ledger:IsImpaired", + "name": "IsImpaired", + "defaultStat": "Sum" + }, + { + "id": "AWS::QLDB::Ledger:OccConflictExceptions", + "name": "OccConflictExceptions", + "defaultStat": "Sum" + }, + { + "id": "AWS::QLDB::Ledger:ReadIOs", + "name": "ReadIOs", + "defaultStat": "Sum" + }, + { + "id": "AWS::QLDB::Ledger:Session4xxExceptions", + "name": "Session4xxExceptions", + "defaultStat": "Sum" + }, + { + "id": "AWS::QLDB::Ledger:Session5xxExceptions", + "name": "Session5xxExceptions", + "defaultStat": "Sum" + }, + { + "id": "AWS::QLDB::Ledger:SessionRateExceededExceptions", + "name": "SessionRateExceededExceptions", + "defaultStat": "Sum" + }, + { + "id": "AWS::QLDB::Ledger:WriteIOs", + "name": "WriteIOs", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "QLDB:CrossService", + "name": "QLDB", + "dependencies": [ + { + "namespace": "AWS/QLDB" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::QLDB::Ledger:CommandLatency" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::QLDB::Ledger:JournalStorage" + } + ] + } + ] + } + ] + }, + { + "id": "QLDB", + "name": "QLDB", + "dependencies": [ + { + "namespace": "AWS/QLDB" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::QLDB::Ledger:CommandLatency" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::QLDB::Ledger:JournalStorage" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::QLDB::Ledger:IndexedStorage" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::QLDB::Ledger:IsImpaired" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::QLDB::Ledger:OccConflictExceptions" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::QLDB::Ledger:ReadIOs" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::QLDB::Ledger:Session4xxExceptions" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::QLDB::Ledger:Session5xxExceptions" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::QLDB::Ledger:SessionRateExceededExceptions" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::QLDB::Ledger:WriteIOs" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::RDS", + "dashboard": "RDS", + "crossServiceDashboard": "RDS:CrossService", + "resourceTypes": [ + { + "type": "AWS::RDS::DBInstance", + "keyMetric": "AWS::RDS::DBInstance:CPUUtilization", + "dashboard": "RDS", + "arnRegex": ".*:db:(.*)" + } + ], + "controls": { + "AWS::RDS.dbinstances": { + "type": "resource", + "resourceType": "AWS::RDS::DBInstance", + "labelField": "DBInstanceIdentifier", + "valueField": "DBInstanceIdentifier" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::RDS::DBInstance", + "namespace": "AWS/RDS", + "dimensions": [ + { + "dimensionName": "DBInstanceIdentifier", + "labelName": "DBInstanceIdentifier" + } + ], + "metrics": [ + { + "id": "AWS::RDS::DBInstance:CPUUtilization", + "name": "CPUUtilization", + "defaultStat": "Average" + }, + { + "id": "AWS::RDS::DBInstance:ReadLatency", + "name": "ReadLatency", + "defaultStat": "Average" + }, + { + "id": "AWS::RDS::DBInstance:DatabaseConnections", + "name": "DatabaseConnections", + "defaultStat": "Sum" + }, + { + "id": "AWS::RDS::DBInstance:FreeStorageSpace", + "name": "FreeStorageSpace", + "defaultStat": "Average" + }, + { + "id": "AWS::RDS::DBInstance:FreeableMemory", + "name": "FreeableMemory", + "defaultStat": "Average" + }, + { + "id": "AWS::RDS::DBInstance:ReadThroughput", + "name": "ReadThroughput", + "defaultStat": "Average" + }, + { + "id": "AWS::RDS::DBInstance:ReadIOPS", + "name": "ReadIOPS", + "defaultStat": "Average" + }, + { + "id": "AWS::RDS::DBInstance:WriteLatency", + "name": "WriteLatency", + "defaultStat": "Average" + }, + { + "id": "AWS::RDS::DBInstance:WriteThroughput", + "name": "WriteThroughput", + "defaultStat": "Average" + }, + { + "id": "AWS::RDS::DBInstance:WriteIOPS", + "name": "WriteIOPS", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "RDS:CrossService", + "name": "RDS", + "dependencies": [ + { + "namespace": "AWS/RDS" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::RDS::DBInstance:CPUUtilization" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::RDS::DBInstance:ReadLatency" + } + ] + } + ] + } + ] + }, + { + "id": "RDS", + "name": "RDS", + "dependencies": [ + { + "namespace": "AWS/RDS" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::RDS.dbinstances" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::RDS::DBInstance:CPUUtilization" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::RDS::DBInstance:DatabaseConnections" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::RDS::DBInstance:FreeStorageSpace" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::RDS::DBInstance:FreeableMemory" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::RDS::DBInstance:ReadLatency" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricOptions": { + "yAxis": "right" + }, + "metricTemplate": "AWS::RDS::DBInstance:ReadThroughput" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricOptions": { + "yAxis": "right" + }, + "metricTemplate": "AWS::RDS::DBInstance:ReadIOPS" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::RDS::DBInstance:WriteLatency" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricOptions": { + "yAxis": "right" + }, + "metricTemplate": "AWS::RDS::DBInstance:WriteThroughput" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricOptions": { + "yAxis": "right" + }, + "metricTemplate": "AWS::RDS::DBInstance:WriteIOPS" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::Redshift", + "dashboard": "Redshift", + "crossServiceDashboard": "Redshift:CrossService", + "resourceTypes": [ + { + "type": "AWS::Redshift::Cluster", + "keyMetric": "AWS::Redshift::Cluster:CPUUtilization", + "dashboard": "Redshift", + "arnRegex": ".*:cluster:(.*)" + } + ], + "controls": { + "AWS::Redshift.clusters": { + "type": "resource", + "resourceType": "AWS::Redshift::Cluster", + "labelField": "ClusterIdentifier", + "valueField": "ClusterIdentifier" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::Redshift::Cluster", + "namespace": "AWS/Redshift", + "dimensions": [ + { + "dimensionName": "ClusterIdentifier", + "labelName": "ClusterIdentifier" + } + ], + "metrics": [ + { + "id": "AWS::Redshift::Cluster:CPUUtilization", + "name": "CPUUtilization", + "defaultStat": "Average" + }, + { + "id": "AWS::Redshift::Cluster:PercentageDiskSpaceUsed", + "name": "PercentageDiskSpaceUsed", + "defaultStat": "Average" + }, + { + "id": "AWS::Redshift::Cluster:DatabaseConnections", + "name": "DatabaseConnections", + "defaultStat": "Average" + }, + { + "id": "AWS::Redshift::Cluster:HealthStatus", + "name": "HealthStatus", + "defaultStat": "Sum" + }, + { + "id": "AWS::Redshift::Cluster:MaintenanceMode", + "name": "MaintenanceMode", + "defaultStat": "Sum" + }, + { + "id": "AWS::Redshift::Cluster:NetworkReceiveThroughput", + "name": "NetworkReceiveThroughput", + "defaultStat": "Sum" + }, + { + "id": "AWS::Redshift::Cluster:NetworkTransmitThroughput", + "name": "NetworkTransmitThroughput", + "defaultStat": "Sum" + }, + { + "id": "AWS::Redshift::Cluster:QueriesCompletedPerSecond", + "name": "QueriesCompletedPerSecond", + "defaultStat": "Sum" + }, + { + "id": "AWS::Redshift::Cluster:QueryDuration", + "name": "QueryDuration", + "defaultStat": "Average" + }, + { + "id": "AWS::Redshift::Cluster:QueryRuntimeBreakdown", + "name": "QueryRuntimeBreakdown", + "defaultStat": "Sum" + }, + { + "id": "AWS::Redshift::Cluster:ReadIOPS", + "name": "ReadIOPS", + "defaultStat": "Sum" + }, + { + "id": "AWS::Redshift::Cluster:ReadLatency", + "name": "ReadLatency", + "defaultStat": "Average" + }, + { + "id": "AWS::Redshift::Cluster:ReadThroughput", + "name": "ReadThroughput", + "defaultStat": "Sum" + }, + { + "id": "AWS::Redshift::Cluster:WLMQueriesCompletedPerSecond", + "name": "WLMQueriesCompletedPerSecond", + "defaultStat": "Average" + }, + { + "id": "AWS::Redshift::Cluster:WLMQueryDuration", + "name": "WLMQueryDuration", + "defaultStat": "Average" + }, + { + "id": "AWS::Redshift::Cluster:WLMQueueLength", + "name": "WLMQueueLength", + "defaultStat": "Sum" + }, + { + "id": "AWS::Redshift::Cluster:WriteIOPS", + "name": "WriteIOPS", + "defaultStat": "Sum" + }, + { + "id": "AWS::Redshift::Cluster:WriteLatency", + "name": "WriteLatency", + "defaultStat": "Average" + }, + { + "id": "AWS::Redshift::Cluster:WriteThroughput", + "name": "WriteThroughput", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "Redshift:CrossService", + "name": "Redshift", + "dependencies": [ + { + "namespace": "AWS/Redshift" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Redshift::Cluster:CPUUtilization" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Redshift::Cluster:PercentageDiskSpaceUsed" + } + ] + } + ] + } + ] + }, + { + "id": "Redshift", + "name": "Redshift", + "dependencies": [ + { + "namespace": "AWS/Redshift" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::Redshift.clusters" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Redshift::Cluster:CPUUtilization" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Redshift::Cluster:PercentageDiskSpaceUsed" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Redshift::Cluster:DatabaseConnections" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Redshift::Cluster:HealthStatus" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Redshift::Cluster:MaintenanceMode" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Redshift::Cluster:NetworkReceiveThroughput" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Redshift::Cluster:NetworkTransmitThroughput" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Redshift::Cluster:QueriesCompletedPerSecond" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Redshift::Cluster:QueryDuration" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Redshift::Cluster:QueryRuntimeBreakdown" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Redshift::Cluster:ReadIOPS" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Redshift::Cluster:ReadLatency" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Redshift::Cluster:ReadThroughput" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Redshift::Cluster:WLMQueriesCompletedPerSecond" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Redshift::Cluster:WLMQueryDuration" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Redshift::Cluster:WLMQueueLength" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Redshift::Cluster:WriteIOPS" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Redshift::Cluster:WriteLatency" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "width": 8, + "metrics": [ + { + "metricTemplate": "AWS::Redshift::Cluster:WriteThroughput" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::Rekognition", + "dashboard": "Rekognition", + "crossServiceDashboard": "Rekognition:CrossService", + "resourceTypes": [ + { + "type": "AWS::Rekognition::Operation", + "keyMetric": "AWS::Rekognition::Operation:SuccessfulRequestCount", + "dashboard": "Rekognition" + } + ], + "controls": { + "AWS::Rekognition.operations": { + "type": "resource", + "resourceType": "AWS::Rekognition::Operation", + "labelField": "Operation", + "valueField": "Operation" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::Rekognition::Operation", + "namespace": "AWS/Rekognition", + "dimensions": [ + { + "dimensionName": "Operation", + "labelName": "Operation" + } + ], + "metrics": [ + { + "id": "AWS::Rekognition::Operation:SuccessfulRequestCount", + "name": "SuccessfulRequestCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::Rekognition::Operation:ServerErrorCount", + "name": "ServerErrorCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::Rekognition::Operation:DetectedFaceCount", + "name": "DetectedFaceCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::Rekognition::Operation:DetectedLabelCount", + "name": "DetectedLabelCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::Rekognition::Operation:ResponseTime", + "name": "ResponseTime", + "defaultStat": "Average" + }, + { + "id": "AWS::Rekognition::Operation:UserErrorCount", + "name": "UserErrorCount", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "Rekognition:CrossService", + "name": "Rekognition", + "dependencies": [ + { + "namespace": "AWS/Rekognition" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Rekognition::Operation:SuccessfulRequestCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Rekognition::Operation:ServerErrorCount" + } + ] + } + ] + } + ] + }, + { + "id": "Rekognition", + "name": "Rekognition", + "dependencies": [ + { + "namespace": "AWS/Rekognition" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::Rekognition.operations" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Rekognition::Operation:SuccessfulRequestCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Rekognition::Operation:ServerErrorCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Rekognition::Operation:DetectedFaceCount" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Rekognition::Operation:DetectedLabelCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Rekognition::Operation:ResponseTime" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Rekognition::Operation:UserErrorCount" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::RoboMaker", + "dashboard": "RoboMaker", + "crossServiceDashboard": "RoboMaker:CrossService", + "resourceTypes": [ + { + "type": "AWS::RoboMaker::SimulationJob", + "keyMetric": "AWS::RoboMaker::SimulationJob:vCPU", + "dashboard": "RoboMaker", + "arnRegex": ".*simulation-job/(.*)" + } + ], + "controls": { + "AWS::RoboMaker.simulationJobs": { + "type": "resource", + "resourceType": "AWS::RoboMaker::SimulationJob", + "labelField": "SimulationJobId", + "valueField": "SimulationJobId" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::RoboMaker::SimulationJob", + "namespace": "AWS/RoboMaker", + "dimensions": [ + { + "dimensionName": "SimulationJobId", + "labelName": "SimulationJobId" + } + ], + "metrics": [ + { + "id": "AWS::RoboMaker::SimulationJob:vCPU", + "name": "vCPU", + "defaultStat": "Average" + }, + { + "id": "AWS::RoboMaker::SimulationJob:Memory", + "name": "Memory", + "defaultStat": "Maximum" + }, + { + "id": "AWS::RoboMaker::SimulationJob:RealTimeRatio", + "name": "RealTimeRatio", + "defaultStat": "Average" + }, + { + "id": "AWS::RoboMaker::SimulationJob:SimulationUnit", + "name": "SimulationUnit", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "RoboMaker:CrossService", + "name": "RoboMaker", + "dependencies": [ + { + "namespace": "AWS/RoboMaker" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::RoboMaker::SimulationJob:vCPU" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::RoboMaker::SimulationJob:Memory" + } + ] + } + ] + } + ] + }, + { + "id": "RoboMaker", + "name": "RoboMaker", + "dependencies": [ + { + "namespace": "AWS/RoboMaker" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::RoboMaker.simulationJobs" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::RoboMaker::SimulationJob:vCPU" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::RoboMaker::SimulationJob:Memory" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::RoboMaker::SimulationJob:RealTimeRatio" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::RoboMaker::SimulationJob:SimulationUnit" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::Route53", + "dashboard": "Route53", + "crossServiceDashboard": "Route53:CrossService", + "resourceTypes": [ + { + "type": "AWS::Route53::HealthCheck", + "keyMetric": "AWS::Route53::HealthCheck:HealthCheckPercentageHealthy", + "dashboard": "Route53", + "arnRegex": ".*:healthcheck/(.*)" + } + ], + "controls": { + "AWS::Route53.healthchecks": { + "type": "resource", + "resourceType": "AWS::Route53::HealthCheck", + "labelField": "HealthCheckId", + "valueField": "HealthCheckId" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::Route53::HealthCheck", + "namespace": "AWS/Route53", + "dimensions": [ + { + "dimensionName": "HealthCheckId", + "labelName": "HealthCheckId" + } + ], + "metrics": [ + { + "id": "AWS::Route53::HealthCheck:HealthCheckPercentageHealthy", + "name": "HealthCheckPercentageHealthy", + "defaultStat": "Average" + }, + { + "id": "AWS::Route53::HealthCheck:ConnectionTime", + "name": "ConnectionTime", + "defaultStat": "Average" + }, + { + "id": "AWS::Route53::HealthCheck:HealthCheckStatus", + "name": "HealthCheckStatus", + "defaultStat": "Minimum" + }, + { + "id": "AWS::Route53::HealthCheck:SSLHandshakeTime", + "name": "SSLHandshakeTime", + "defaultStat": "Average" + }, + { + "id": "AWS::Route53::HealthCheck:ChildHealthCheckHealthyCount", + "name": "ChildHealthCheckHealthyCount", + "defaultStat": "Average" + }, + { + "id": "AWS::Route53::HealthCheck:TimeToFirstByte", + "name": "TimeToFirstByte", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "Route53:CrossService", + "name": "Route53", + "dependencies": [ + { + "namespace": "AWS/Route53" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Route53::HealthCheck:HealthCheckPercentageHealthy" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Route53::HealthCheck:ConnectionTime" + } + ] + } + ] + } + ] + }, + { + "id": "Route53", + "name": "Route53", + "dependencies": [ + { + "namespace": "AWS/Route53" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::Route53.healthchecks" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Route53::HealthCheck:HealthCheckPercentageHealthy" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Route53::HealthCheck:ConnectionTime" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Route53::HealthCheck:HealthCheckStatus" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Route53::HealthCheck:SSLHandshakeTime" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Route53::HealthCheck:ChildHealthCheckHealthyCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Route53::HealthCheck:TimeToFirstByte" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::Route53Resolver::ResolverEndpoint", + "dashboard": "Route53Resolver", + "crossServiceDashboard": "Route53Resolver:CrossService", + "resourceTypes": [ + { + "type": "AWS::Route53Resolver::ResolverEndpoint", + "keyMetric": "AWS::Route53Resolver::ResolverEndpoint:InboundQueryVolume", + "dashboard": "Route53Resolver", + "arnRegex": ".*:resolver-endpoint/(.*)" + } + ], + "metricTemplates": [ + { + "resourceType": "AWS::Route53Resolver::ResolverEndpoint", + "namespace": "AWS/Route53Resolver", + "dimensions": [ + { + "dimensionName": "EndpointId", + "labelName": "EndpointId" + } + ], + "metrics": [ + { + "id": "AWS::Route53Resolver::ResolverEndpoint:InboundQueryVolume", + "name": "InboundQueryVolume", + "defaultStat": "Sum" + }, + { + "id": "AWS::Route53Resolver::ResolverEndpoint:OutboundQueryVolume", + "name": "OutboundQueryVolume", + "defaultStat": "Sum" + }, + { + "id": "AWS::Route53Resolver::ResolverEndpoint:OutboundQueryAggregateVolume", + "name": "OutboundQueryAggregateVolume", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "Route53Resolver:CrossService", + "name": "Route53Resolver", + "dependencies": [ + { + "namespace": "AWS/Route53Resolver" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Route53Resolver::ResolverEndpoint:InboundQueryVolume" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Route53Resolver::ResolverEndpoint:OutboundQueryVolume" + } + ] + } + ] + } + ] + }, + { + "id": "Route53Resolver", + "name": "Route53Resolver", + "dependencies": [ + { + "namespace": "AWS/Route53Resolver" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Route53Resolver::ResolverEndpoint:InboundQueryVolume" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Route53Resolver::ResolverEndpoint:OutboundQueryVolume" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Route53Resolver::ResolverEndpoint:OutboundQueryAggregateVolume" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::S3", + "dashboard": "S3", + "crossServiceDashboard": "S3:CrossService", + "resourceTypes": [ + { + "type": "AWS::S3::Bucket", + "keyMetric": "AWS::S3::Bucket:BucketSizeBytes", + "dashboard": "S3", + "arnRegex": "s3:::(.*)" + }, + { + "type": "CW::S3::BucketFilter", + "keyMetric": "CW::S3::BucketFilter:AllRequests" + } + ], + "controls": { + "AWS::S3.buckets": { + "type": "resource", + "resourceType": "AWS::S3::Bucket", + "labelField": "BucketName", + "valueField": "BucketName" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::S3::Bucket", + "namespace": "AWS/S3", + "defaultPeriod": 86400, + "dimensions": [ + { + "dimensionName": "BucketName", + "labelName": "BucketName" + }, + { + "dimensionName": "StorageType", + "dimensionValue": "StandardStorage" + } + ], + "metrics": [ + { + "id": "AWS::S3::Bucket:BucketSizeBytes", + "name": "BucketSizeBytes", + "defaultStat": "Average", + "defaultPeriod": 86400 + } + ] + }, + { + "resourceType": "AWS::S3::Bucket", + "id": "AWS::S3::Bucket:AllStorageTypes", + "namespace": "AWS/S3", + "defaultPeriod": 86400, + "dimensions": [ + { + "dimensionName": "BucketName", + "labelName": "BucketName" + }, + { + "dimensionName": "StorageType", + "dimensionValue": "AllStorageTypes" + } + ], + "metrics": [ + { + "id": "AWS::S3::Bucket:AllStorageTypes:NumberOfObjects", + "name": "NumberOfObjects", + "defaultStat": "Average", + "defaultPeriod": 86400 + } + ] + }, + { + "resourceType": "CW::S3::BucketFilter", + "namespace": "AWS/S3", + "dimensions": [ + { + "dimensionName": "BucketName", + "labelName": "BucketName" + }, + { + "dimensionName": "FilterId", + "labelName": "FilterId" + } + ], + "metrics": [ + { + "id": "CW::S3::BucketFilter:AllRequests", + "name": "AllRequests", + "defaultStat": "Average" + }, + { + "id": "CW::S3::BucketFilter:GetRequests", + "name": "GetRequests", + "defaultStat": "Average" + }, + { + "id": "CW::S3::BucketFilter:PutRequests", + "name": "PutRequests", + "defaultStat": "Average" + }, + { + "id": "CW::S3::BucketFilter:DeleteRequests", + "name": "DeleteRequests", + "defaultStat": "Average" + }, + { + "id": "CW::S3::BucketFilter:HeadRequests", + "name": "HeadRequests", + "defaultStat": "Average" + }, + { + "id": "CW::S3::BucketFilter:PostRequests", + "name": "PostRequests", + "defaultStat": "Average" + }, + { + "id": "CW::S3::BucketFilter:ListRequests", + "name": "ListRequests", + "defaultStat": "Average" + }, + { + "id": "CW::S3::BucketFilter:BytesDownloaded", + "name": "BytesDownloaded", + "defaultStat": "Average" + }, + { + "id": "CW::S3::BucketFilter:BytesUploaded", + "name": "BytesUploaded", + "defaultStat": "Average" + }, + { + "id": "CW::S3::BucketFilter:4xxErrors", + "name": "4xxErrors", + "defaultStat": "Sum" + }, + { + "id": "CW::S3::BucketFilter:5xxErrors", + "name": "5xxErrors", + "defaultStat": "Sum" + }, + { + "id": "CW::S3::BucketFilter:FirstByteLatency", + "name": "FirstByteLatency", + "defaultStat": "Average" + }, + { + "id": "CW::S3::BucketFilter:TotalRequestLatency", + "name": "TotalRequestLatency", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "S3:CrossService", + "name": "S3", + "dependencies": [ + { + "namespace": "AWS/S3" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::S3::Bucket:BucketSizeBytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::S3::Bucket:AllStorageTypes:NumberOfObjects" + } + ] + } + ] + } + ] + }, + { + "id": "S3", + "name": "S3", + "dependencies": [ + { + "namespace": "AWS/S3" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::S3.buckets" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::S3::Bucket:BucketSizeBytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::S3::Bucket:AllStorageTypes:NumberOfObjects" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "CW::S3::BucketFilter:AllRequests" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "CW::S3::BucketFilter:GetRequests" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "CW::S3::BucketFilter:PutRequests" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "CW::S3::BucketFilter:DeleteRequests" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "CW::S3::BucketFilter:HeadRequests" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "CW::S3::BucketFilter:PostRequests" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "CW::S3::BucketFilter:ListRequests" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "CW::S3::BucketFilter:BytesDownloaded" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "CW::S3::BucketFilter:BytesUploaded" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "CW::S3::BucketFilter:4xxErrors" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "CW::S3::BucketFilter:5xxErrors" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "CW::S3::BucketFilter:FirstByteLatency" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "CW::S3::BucketFilter:TotalRequestLatency" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::SageMaker", + "dashboard": "SageMaker", + "crossServiceDashboard": "SageMaker:CrossService", + "resourceTypes": [ + { + "type": "AWS::SageMaker::Endpoint", + "keyMetric": "AWS::SageMaker::Endpoint:Invocations", + "dashboard": "SageMaker", + "arnRegex": ".*:endpoint/(.*)" + } + ], + "controls": { + "AWS::SageMaker.endpoints": { + "type": "resource", + "resourceType": "AWS::SageMaker::Endpoint", + "labelField": "EndpointName", + "valueField": "EndpointName" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::SageMaker::Endpoint", + "namespace": "AWS/SageMaker", + "dimensions": [ + { + "dimensionName": "EndpointName", + "labelName": "EndpointName" + } + ], + "metrics": [ + { + "id": "AWS::SageMaker::Endpoint:Invocations", + "name": "Invocations", + "defaultStat": "Sum" + }, + { + "id": "AWS::SageMaker::Endpoint:Invocation5XXErrors", + "name": "Invocation5XXErrors", + "defaultStat": "Sum" + }, + { + "id": "AWS::SageMaker::Endpoint:Invocation4XXErrors", + "name": "Invocation4XXErrors", + "defaultStat": "Sum" + }, + { + "id": "AWS::SageMaker::Endpoint:InvocationsPerInstance", + "name": "InvocationsPerInstance", + "defaultStat": "Sum" + }, + { + "id": "AWS::SageMaker::Endpoint:ModelLatency", + "name": "ModelLatency", + "defaultStat": "Sum" + }, + { + "id": "AWS::SageMaker::Endpoint:OverheadLatency", + "name": "OverheadLatency", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "SageMaker:CrossService", + "name": "SageMaker", + "dependencies": [ + { + "namespace": "AWS/SageMaker" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SageMaker::Endpoint:Invocations" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SageMaker::Endpoint:Invocation5XXErrors" + } + ] + } + ] + } + ] + }, + { + "id": "SageMaker", + "name": "SageMaker", + "dependencies": [ + { + "namespace": "AWS/SageMaker" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::SageMaker.endpoints" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SageMaker::Endpoint:Invocations" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SageMaker::Endpoint:Invocation5XXErrors" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SageMaker::Endpoint:Invocation4XXErrors" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SageMaker::Endpoint:InvocationsPerInstance" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SageMaker::Endpoint:ModelLatency" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SageMaker::Endpoint:OverheadLatency" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::SDKMetrics", + "dashboard": "SDKMetrics", + "crossServiceDashboard": "SDKMetrics:CrossService", + "resourceTypes": [ + { + "type": "AWS::SDKMetrics::DestinationRegion", + "keyMetric": "AWS::SDKMetrics::DestinationRegion:CallCount", + "dashboard": "SDKMetrics" + } + ], + "controls": { + "AWS::SDKMetrics.destinationRegions": { + "type": "resource", + "resourceType": "AWS::SDKMetrics::DestinationRegion", + "labelField": "DestinationRegion", + "valueField": "DestinationRegion" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::SDKMetrics::DestinationRegion", + "namespace": "AWS/SDKMetrics", + "dimensions": [ + { + "dimensionName": "DestinationRegion", + "labelName": "DestinationRegion" + } + ], + "metrics": [ + { + "id": "AWS::SDKMetrics::DestinationRegion:CallCount", + "name": "CallCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::SDKMetrics::DestinationRegion:ServerErrorCount", + "name": "ServerErrorCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::SDKMetrics::DestinationRegion:ThrottleCount", + "name": "ThrottleCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::SDKMetrics::DestinationRegion:Latency", + "name": "Latency", + "defaultStat": "p50" + }, + { + "id": "AWS::SDKMetrics::DestinationRegion:RetryCount", + "name": "RetryCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::SDKMetrics::DestinationRegion:ClientErrorCount", + "name": "ClientErrorCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::SDKMetrics::DestinationRegion:ConnectionErrorCount", + "name": "ConnectionErrorCount", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "SDKMetrics:CrossService", + "name": "SDK Metrics", + "dependencies": [ + { + "namespace": "AWS/SDKMetrics" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SDKMetrics::DestinationRegion:CallCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SDKMetrics::DestinationRegion:ServerErrorCount" + } + ] + } + ] + } + ] + }, + { + "id": "SDKMetrics", + "name": "SDK Metrics", + "dependencies": [ + { + "namespace": "AWS/SDKMetrics" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::SDKMetrics.destinationRegions" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SDKMetrics::DestinationRegion:CallCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SDKMetrics::DestinationRegion:ServerErrorCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SDKMetrics::DestinationRegion:ThrottleCount" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SDKMetrics::DestinationRegion:Latency" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SDKMetrics::DestinationRegion:Latency" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SDKMetrics::DestinationRegion:RetryCount" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SDKMetrics::DestinationRegion:ClientErrorCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SDKMetrics::DestinationRegion:ConnectionErrorCount" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::ServiceCatalog::CloudFormationProduct", + "dashboard": "ServiceCatalog", + "crossServiceDashboard": "ServiceCatalog:CrossService", + "resourceTypes": [ + { + "type": "AWS::ServiceCatalog::CloudFormationProduct", + "keyMetric": "AWS::ServiceCatalog::CloudFormationProduct:ProvisionedProductLaunch", + "dashboard": "ServiceCatalog", + "arnRegex": ".*:product/(.*)" + } + ], + "metricTemplates": [ + { + "resourceType": "AWS::ServiceCatalog::CloudFormationProduct", + "namespace": "AWS/ServiceCatalog", + "dimensions": [ + { + "dimensionName": "ProductId", + "labelName": "ProductId" + } + ], + "metrics": [ + { + "id": "AWS::ServiceCatalog::CloudFormationProduct:ProvisionedProductLaunch", + "name": "ProvisionedProductLaunch", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "ServiceCatalog:CrossService", + "name": "ServiceCatalog", + "dependencies": [ + { + "namespace": "AWS/ServiceCatalog" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ServiceCatalog::CloudFormationProduct:ProvisionedProductLaunch" + } + ] + } + ] + } + ] + }, + { + "id": "ServiceCatalog", + "name": "ServiceCatalog", + "dependencies": [ + { + "namespace": "AWS/ServiceCatalog" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::ServiceCatalog::CloudFormationProduct:ProvisionedProductLaunch" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::SNS", + "dashboard": "SNS", + "crossServiceDashboard": "SNS:CrossService", + "resourceTypes": [ + { + "type": "AWS::SNS::Topic", + "keyMetric": "AWS::SNS::Topic:NumberOfNotificationsDelivered", + "dashboard": "SNS", + "isResourceNode": true, + "arnRegex": ".*:(.*)" + } + ], + "controls": { + "AWS::SNS.topics": { + "type": "resource", + "resourceType": "AWS::SNS::Topic", + "labelField": "TopicName", + "valueField": "TopicName" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::SNS::Topic", + "namespace": "AWS/SNS", + "dimensions": [ + { + "dimensionName": "TopicName", + "labelName": "TopicName" + } + ], + "metrics": [ + { + "id": "AWS::SNS::Topic:NumberOfNotificationsDelivered", + "name": "NumberOfNotificationsDelivered", + "defaultStat": "Average" + }, + { + "id": "AWS::SNS::Topic:NumberOfNotificationsFailed", + "name": "NumberOfNotificationsFailed", + "defaultStat": "Average" + }, + { + "id": "AWS::SNS::Topic:NumberOfMessagesPublished", + "name": "NumberOfMessagesPublished", + "defaultStat": "Average" + }, + { + "id": "AWS::SNS::Topic:PublishSize", + "name": "PublishSize", + "defaultStat": "Average" + }, + { + "id": "AWS::SNS::Topic:SMSSuccessRate", + "name": "SMSSuccessRate", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "SNS:CrossService", + "name": "SNS", + "dependencies": [ + { + "namespace": "AWS/SNS" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SNS::Topic:NumberOfNotificationsDelivered" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SNS::Topic:NumberOfNotificationsFailed" + } + ] + } + ] + } + ] + }, + { + "id": "SNS", + "name": "SNS", + "dependencies": [ + { + "namespace": "AWS/SNS" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::SNS.topics" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SNS::Topic:NumberOfNotificationsDelivered" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SNS::Topic:NumberOfNotificationsFailed" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SNS::Topic:NumberOfMessagesPublished" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SNS::Topic:PublishSize" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SNS::Topic:SMSSuccessRate" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::SQS", + "dashboard": "SQS", + "crossServiceDashboard": "SQS:CrossService", + "resourceTypes": [ + { + "type": "AWS::SQS::Queue", + "keyMetric": "AWS::SQS::Queue:NumberOfMessagesSent", + "dashboard": "SQS", + "isResourceNode": true, + "arnRegex": ".*:(.*)", + "describe": "sqs-describe-queues" + } + ], + "controls": { + "AWS::SQS.queues": { + "type": "resource", + "resourceType": "AWS::SQS::Queue", + "labelField": "QueueName", + "valueField": "QueueName" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::SQS::Queue", + "namespace": "AWS/SQS", + "dimensions": [ + { + "dimensionName": "QueueName", + "labelName": "QueueName" + } + ], + "metrics": [ + { + "id": "AWS::SQS::Queue:NumberOfMessagesSent", + "name": "NumberOfMessagesSent", + "defaultStat": "Average" + }, + { + "id": "AWS::SQS::Queue:ApproximateNumberOfMessagesDelayed", + "name": "ApproximateNumberOfMessagesDelayed", + "defaultStat": "Average" + }, + { + "id": "AWS::SQS::Queue:NumberOfMessagesReceived", + "name": "NumberOfMessagesReceived", + "defaultStat": "Average" + }, + { + "id": "AWS::SQS::Queue:NumberOfMessagesDeleted", + "name": "NumberOfMessagesDeleted", + "defaultStat": "Average" + }, + { + "id": "AWS::SQS::Queue:ApproximateNumberOfMessagesNotVisible", + "name": "ApproximateNumberOfMessagesNotVisible", + "defaultStat": "Average" + }, + { + "id": "AWS::SQS::Queue:ApproximateNumberOfMessagesVisible", + "name": "ApproximateNumberOfMessagesVisible", + "defaultStat": "Average" + }, + { + "id": "AWS::SQS::Queue:ApproximateAgeOfOldestMessage", + "name": "ApproximateAgeOfOldestMessage", + "defaultStat": "Average" + }, + { + "id": "AWS::SQS::Queue:NumberOfEmptyReceives", + "name": "NumberOfEmptyReceives", + "defaultStat": "Average" + }, + { + "id": "AWS::SQS::Queue:SentMessageSize", + "name": "SentMessageSize", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "SQS:CrossService", + "name": "SQS", + "dependencies": [ + { + "namespace": "AWS/SQS" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SQS::Queue:NumberOfMessagesSent" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SQS::Queue:ApproximateNumberOfMessagesDelayed" + } + ] + } + ] + } + ] + }, + { + "id": "SQS", + "name": "SQS", + "dependencies": [ + { + "namespace": "AWS/SQS" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::SQS.queues" + ], + "tables": [ + { + "resourceType": "AWS::SQS::Queue", + "columns": [ + "QueueUrl", + "QueueName", + "ApproximateNumberOfMessages", + "ApproximateNumberOfMessagesDelayed", + "ApproximateNumberOfMessagesNotVisible", + "DelaySeconds", + "CreatedTimestamp" + ] + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SQS::Queue:NumberOfMessagesSent" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SQS::Queue:NumberOfMessagesReceived" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SQS::Queue:NumberOfMessagesDeleted" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SQS::Queue:ApproximateNumberOfMessagesDelayed" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SQS::Queue:ApproximateNumberOfMessagesNotVisible" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SQS::Queue:ApproximateNumberOfMessagesVisible" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SQS::Queue:ApproximateAgeOfOldestMessage" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SQS::Queue:NumberOfEmptyReceives" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SQS::Queue:SentMessageSize" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::StepFunctions", + "dashboard": "States", + "crossServiceDashboard": "States:CrossService", + "resourceTypes": [ + { + "type": "AWS::StepFunctions::StateMachine", + "keyMetric": "AWS::StepFunctions::StateMachine:ExecutionTime", + "dashboard": "States", + "arnRegex": ".*:stateMachine:(.*)" + }, + { + "type": "AWS::StepFunctions::Activity", + "keyMetric": "AWS::StepFunctions::Activity:ActivityTime", + "dashboard": "States", + "arnRegex": ".*:activity:(.*)" + } + ], + "controls": { + "AWS::StepFunctions.stateMachineArns": { + "type": "resource", + "resourceType": "AWS::StepFunctions::StateMachine", + "labelField": "StateMachine", + "valueField": "StateMachine" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::StepFunctions::StateMachine", + "namespace": "AWS/States", + "dimensions": [ + { + "dimensionName": "StateMachineArn", + "labelName": "StateMachineArn" + } + ], + "metrics": [ + { + "id": "AWS::StepFunctions::StateMachine:ExecutionTime", + "name": "ExecutionTime", + "defaultStat": "Average" + }, + { + "id": "AWS::StepFunctions::StateMachine:ExecutionsFailed", + "name": "ExecutionsFailed", + "defaultStat": "Average" + }, + { + "id": "AWS::StepFunctions::StateMachine:ExecutionsSucceeded", + "name": "ExecutionsSucceeded", + "defaultStat": "Average" + }, + { + "id": "AWS::StepFunctions::StateMachine:ExecutionsThrottled", + "name": "ExecutionsThrottled", + "defaultStat": "Average" + }, + { + "id": "AWS::StepFunctions::StateMachine:ExecutionsAborted", + "name": "ExecutionsAborted", + "defaultStat": "Average" + }, + { + "id": "AWS::StepFunctions::StateMachine:ExecutionsTimedOut", + "name": "ExecutionsTimedOut", + "defaultStat": "Average" + } + ] + }, + { + "resourceType": "AWS::StepFunctions::Activity", + "namespace": "AWS/States", + "dimensions": [ + { + "dimensionName": "ActivityArn", + "labelName": "ActivityArn" + } + ], + "metrics": [ + { + "id": "AWS::StepFunctions::Activity:ActivityTime", + "name": "ActivityTime", + "defaultStat": "Average" + }, + { + "id": "AWS::StepFunctions::Activity:ActivitiesSucceeded", + "name": "ActivitiesSucceeded", + "defaultStat": "Sum" + }, + { + "id": "AWS::StepFunctions::Activity:ActivitiesFailed", + "name": "ActivitiesFailed", + "defaultStat": "Sum" + }, + { + "id": "AWS::StepFunctions::Activity:ActivitiesHeartbeatTimedOut", + "name": "ActivitiesHeartbeatTimedOut", + "defaultStat": "Sum" + }, + { + "id": "AWS::StepFunctions::Activity:ActivitiesScheduled", + "name": "ActivitiesScheduled", + "defaultStat": "Sum" + }, + { + "id": "AWS::StepFunctions::Activity:ActivitiesStarted", + "name": "ActivitiesStarted", + "defaultStat": "Sum" + }, + { + "id": "AWS::StepFunctions::Activity:ActivitiesTimedOut", + "name": "ActivitiesTimedOut", + "defaultStat": "Sum" + }, + { + "id": "AWS::StepFunctions::Activity:ActivityRunTime", + "name": "ActivityRunTime", + "defaultStat": "Average" + }, + { + "id": "AWS::StepFunctions::Activity:ActivityScheduleTime", + "name": "ActivityScheduleTime", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "States:CrossService", + "name": "Step Functions", + "dependencies": [ + { + "namespace": "AWS/States" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StepFunctions::StateMachine:ExecutionTime" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StepFunctions::StateMachine:ExecutionsFailed" + } + ] + } + ] + } + ] + }, + { + "id": "States", + "name": "Step Functions", + "dependencies": [ + { + "namespace": "AWS/States" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::StepFunctions.stateMachineArns" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StepFunctions::StateMachine:ExecutionTime" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StepFunctions::StateMachine:ExecutionsSucceeded" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StepFunctions::StateMachine:ExecutionsFailed" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StepFunctions::StateMachine:ExecutionsThrottled" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StepFunctions::StateMachine:ExecutionsAborted" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StepFunctions::StateMachine:ExecutionsTimedOut" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::StorageGateway", + "dashboard": "StorageGateway", + "crossServiceDashboard": "StorageGateway:CrossService", + "resourceTypes": [ + { + "type": "AWS::StorageGateway::Gateway", + "keyMetric": "AWS::StorageGateway::Gateway:CacheHitPercent", + "dashboard": "StorageGateway", + "arnRegex": ".*:gateway/(.*)" + } + ], + "controls": { + "AWS::StorageGateway.gateways": { + "type": "resource", + "resourceType": "AWS::StorageGateway::Gateway", + "labelField": "GatewayId", + "valueField": "GatewayId" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::StorageGateway::Gateway", + "namespace": "AWS/StorageGateway", + "dimensions": [ + { + "dimensionName": "GatewayId", + "labelName": "GatewayId" + } + ], + "metrics": [ + { + "id": "AWS::StorageGateway::Gateway:CacheHitPercent", + "name": "CacheHitPercent", + "defaultStat": "Average" + }, + { + "id": "AWS::StorageGateway::Gateway:CachePercentUsed", + "name": "CachePercentUsed", + "defaultStat": "Average" + }, + { + "id": "AWS::StorageGateway::Gateway:CachePercentDirty", + "name": "CachePercentDirty", + "defaultStat": "Average" + }, + { + "id": "AWS::StorageGateway::Gateway:CloudBytesDownloaded", + "name": "CloudBytesDownloaded", + "defaultStat": "Sum" + }, + { + "id": "AWS::StorageGateway::Gateway:CloudDownloadLatency", + "name": "CloudDownloadLatency", + "defaultStat": "Average" + }, + { + "id": "AWS::StorageGateway::Gateway:CloudBytesUploaded", + "name": "CloudBytesUploaded", + "defaultStat": "Sum" + }, + { + "id": "AWS::StorageGateway::Gateway:UploadBufferFree", + "name": "UploadBufferFree", + "defaultStat": "Average" + }, + { + "id": "AWS::StorageGateway::Gateway:CacheFree", + "name": "CacheFree", + "defaultStat": "Average" + }, + { + "id": "AWS::StorageGateway::Gateway:UploadBufferPercentUsed", + "name": "UploadBufferPercentUsed", + "defaultStat": "Average" + }, + { + "id": "AWS::StorageGateway::Gateway:UploadBufferUsed", + "name": "UploadBufferUsed", + "defaultStat": "Average" + }, + { + "id": "AWS::StorageGateway::Gateway:CacheUsed", + "name": "CacheUsed", + "defaultStat": "Average" + }, + { + "id": "AWS::StorageGateway::Gateway:QueuedWrites", + "name": "QueuedWrites", + "defaultStat": "Sum" + }, + { + "id": "AWS::StorageGateway::Gateway:ReadBytes", + "name": "ReadBytes", + "defaultStat": "Sum" + }, + { + "id": "AWS::StorageGateway::Gateway:ReadTime", + "name": "ReadTime", + "defaultStat": "Average" + }, + { + "id": "AWS::StorageGateway::Gateway:TotalCacheSize", + "name": "TotalCacheSize", + "defaultStat": "Average" + }, + { + "id": "AWS::StorageGateway::Gateway:WriteBytes", + "name": "WriteBytes", + "defaultStat": "Sum" + }, + { + "id": "AWS::StorageGateway::Gateway:WriteTime", + "name": "WriteTime", + "defaultStat": "Average" + }, + { + "id": "AWS::StorageGateway::Gateway:TimeSinceLastRecoveryPoint", + "name": "TimeSinceLastRecoveryPoint", + "defaultStat": "Average" + }, + { + "id": "AWS::StorageGateway::Gateway:WorkingStorageFree", + "name": "WorkingStorageFree", + "defaultStat": "Average" + }, + { + "id": "AWS::StorageGateway::Gateway:WorkingStoragePercentUsed", + "name": "WorkingStoragePercentUsed", + "defaultStat": "Average" + }, + { + "id": "AWS::StorageGateway::Gateway:WorkingStorageUsed", + "name": "WorkingStorageUsed", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "StorageGateway:CrossService", + "name": "Storage Gateway", + "dependencies": [ + { + "namespace": "AWS/StorageGateway" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StorageGateway::Gateway:CacheHitPercent" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StorageGateway::Gateway:CachePercentUsed" + } + ] + } + ] + } + ] + }, + { + "id": "StorageGateway", + "name": "Storage Gateway", + "dependencies": [ + { + "namespace": "AWS/StorageGateway" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::StorageGateway.gateways" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StorageGateway::Gateway:CacheHitPercent" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StorageGateway::Gateway:CachePercentUsed" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StorageGateway::Gateway:CachePercentDirty" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StorageGateway::Gateway:CloudBytesDownloaded" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StorageGateway::Gateway:CloudDownloadLatency" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StorageGateway::Gateway:CloudBytesUploaded" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StorageGateway::Gateway:UploadBufferFree" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StorageGateway::Gateway:CacheFree" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StorageGateway::Gateway:UploadBufferPercentUsed" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StorageGateway::Gateway:UploadBufferUsed" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StorageGateway::Gateway:CacheUsed" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StorageGateway::Gateway:QueuedWrites" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StorageGateway::Gateway:ReadBytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StorageGateway::Gateway:ReadTime" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StorageGateway::Gateway:TotalCacheSize" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StorageGateway::Gateway:WriteBytes" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StorageGateway::Gateway:WriteTime" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StorageGateway::Gateway:TimeSinceLastRecoveryPoint" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StorageGateway::Gateway:WorkingStorageFree" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StorageGateway::Gateway:WorkingStoragePercentUsed" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::StorageGateway::Gateway:WorkingStorageUsed" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::SWF", + "dashboard": "SWF", + "crossServiceDashboard": "SWF:CrossService", + "resourceTypes": [ + { + "type": "AWS::SWF::API", + "keyMetric": "AWS::SWF::API:ConsumedCapacity", + "dashboard": "SWF" + } + ], + "controls": { + "AWS::SWF.apis": { + "type": "resource", + "resourceType": "AWS::SWF::API", + "labelField": "APIName", + "valueField": "APIName" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::SWF::API", + "namespace": "AWS/SWF", + "dimensions": [ + { + "dimensionName": "APIName", + "labelName": "APIName" + } + ], + "metrics": [ + { + "id": "AWS::SWF::API:ConsumedCapacity", + "name": "ConsumedCapacity", + "defaultStat": "Average" + }, + { + "id": "AWS::SWF::API:ThrottledEvents", + "name": "ThrottledEvents", + "defaultStat": "Sum" + }, + { + "id": "AWS::SWF::API:ProvisionedBucketSize", + "name": "ProvisionedBucketSize", + "defaultStat": "Average" + }, + { + "id": "AWS::SWF::API:ProvisionedRefillRate", + "name": "ProvisionedRefillRate", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "SWF:CrossService", + "name": "SWF", + "dependencies": [ + { + "namespace": "AWS/SWF" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SWF::API:ConsumedCapacity" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SWF::API:ThrottledEvents" + } + ] + } + ] + } + ] + }, + { + "id": "SWF", + "name": "SWF", + "dependencies": [ + { + "namespace": "AWS/SWF" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::SWF.apis" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SWF::API:ConsumedCapacity" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SWF::API:ThrottledEvents" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SWF::API:ProvisionedBucketSize" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::SWF::API:ProvisionedRefillRate" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::Synthetics::Canary", + "dashboard": "CloudWatchSynthetics", + "crossServiceDashboard": "CloudWatchSynthetics:CrossService", + "resourceTypes": [ + { + "type": "AWS::Synthetics::Canary", + "keyMetric": "AWS::Synthetics::Canary:2xx", + "dashboard": "CloudWatchSynthetics", + "arnRegex": ".*:canary:(.*)" + } + ], + "metricTemplates": [ + { + "resourceType": "AWS::Synthetics::Canary", + "namespace": "CloudWatchSynthetics", + "dimensions": [ + { + "dimensionName": "CanaryName", + "labelName": "CanaryName" + } + ], + "metrics": [ + { + "id": "AWS::Synthetics::Canary:2xx", + "name": "2xx", + "defaultStat": "Sum" + }, + { + "id": "AWS::Synthetics::Canary:4xx", + "name": "4xx", + "defaultStat": "Sum" + }, + { + "id": "AWS::Synthetics::Canary:5xx", + "name": "5xx", + "defaultStat": "Sum" + }, + { + "id": "AWS::Synthetics::Canary:Duration", + "name": "Duration", + "defaultStat": "Average" + }, + { + "id": "AWS::Synthetics::Canary:Failed", + "name": "Failed", + "defaultStat": "Sum" + }, + { + "id": "AWS::Synthetics::Canary:Failed requests", + "name": "Failed requests", + "defaultStat": "Sum" + }, + { + "id": "AWS::Synthetics::Canary:SuccessPercent", + "name": "SuccessPercent", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "CloudWatchSynthetics:CrossService", + "name": "CloudWatchSynthetics", + "dependencies": [ + { + "namespace": "CloudWatchSynthetics" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Synthetics::Canary:2xx" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Synthetics::Canary:4xx" + } + ] + } + ] + } + ] + }, + { + "id": "CloudWatchSynthetics", + "name": "CloudWatchSynthetics", + "dependencies": [ + { + "namespace": "CloudWatchSynthetics" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Synthetics::Canary:2xx" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Synthetics::Canary:4xx" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Synthetics::Canary:5xx" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Synthetics::Canary:Duration" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Synthetics::Canary:Failed" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Synthetics::Canary:Failed requests" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Synthetics::Canary:SuccessPercent" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::Tardigrade", + "dashboard": "Tardigrade", + "crossServiceDashboard": "Tardigrade:CrossService", + "resourceTypes": [ + { + "type": "AWS::Tardigrade::LoadBalancer", + "keyMetric": "AWS::Tardigrade::LoadBalancer:ProcessedBytes", + "dashboard": "Tardigrade" + } + ], + "controls": { + "AWS::Tardigrade.loadBalancers": { + "type": "resource", + "resourceType": "AWS::Tardigrade::LoadBalancer", + "labelField": "LoadBalancer", + "valueField": "LoadBalancer" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::Tardigrade::LoadBalancer", + "namespace": "AWS/Tardigrade", + "dimensions": [ + { + "dimensionName": "LoadBalancer", + "labelName": "LoadBalancer" + } + ], + "metrics": [ + { + "id": "AWS::Tardigrade::LoadBalancer:ProcessedBytes", + "name": "ProcessedBytes", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "Tardigrade:CrossService", + "name": "Tardigrade", + "dependencies": [ + { + "namespace": "AWS/Tardigrade" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Tardigrade::LoadBalancer:ProcessedBytes" + } + ] + } + ] + } + ] + }, + { + "id": "Tardigrade", + "name": "Tardigrade", + "dependencies": [ + { + "namespace": "AWS/Tardigrade" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::Tardigrade.loadBalancers" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Tardigrade::LoadBalancer:ProcessedBytes" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::Tiros", + "dashboard": "Tiros", + "crossServiceDashboard": "Tiros:CrossService", + "resourceTypes": [ + { + "type": "AWS::Tiros::ApiCall", + "keyMetric": "AWS::Tiros::ApiCall:ErrorCount", + "dashboard": "Tiros" + } + ], + "controls": { + "AWS::Tiros.apiCalls": { + "type": "resource", + "resourceType": "AWS::Tiros::ApiCall", + "labelField": "ApiCall", + "valueField": "ApiCall" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::Tiros::ApiCall", + "namespace": "AWS/Tiros", + "dimensions": [ + { + "dimensionName": "ApiCall", + "labelName": "ApiCall" + } + ], + "metrics": [ + { + "id": "AWS::Tiros::ApiCall:ErrorCount", + "name": "ErrorCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::Tiros::ApiCall:RequestCount", + "name": "RequestCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::Tiros::ApiCall:ResponseCount", + "name": "ResponseCount", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "Tiros:CrossService", + "name": "Tiros", + "dependencies": [ + { + "namespace": "AWS/Tiros" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Tiros::ApiCall:ErrorCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Tiros::ApiCall:RequestCount" + } + ] + } + ] + } + ] + }, + { + "id": "Tiros", + "name": "Tiros", + "dependencies": [ + { + "namespace": "AWS/Tiros" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::Tiros.apiCalls" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Tiros::ApiCall:ErrorCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Tiros::ApiCall:RequestCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Tiros::ApiCall:ResponseCount" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::Transfer::Server", + "dashboard": "Transfer", + "crossServiceDashboard": "Transfer:CrossService", + "resourceTypes": [ + { + "type": "AWS::Transfer::Server", + "keyMetric": "AWS::Transfer::Server:BytesIn", + "dashboard": "Transfer", + "arnRegex": ".*:server/(.*)" + } + ], + "metricTemplates": [ + { + "resourceType": "AWS::Transfer::Server", + "namespace": "AWS/Transfer", + "dimensions": [ + { + "dimensionName": "ServerId", + "labelName": "ServerId" + } + ], + "metrics": [ + { + "id": "AWS::Transfer::Server:BytesIn", + "name": "BytesIn", + "defaultStat": "Sum" + }, + { + "id": "AWS::Transfer::Server:BytesOut", + "name": "BytesOut", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "Transfer:CrossService", + "name": "Transfer", + "dependencies": [ + { + "namespace": "AWS/Transfer" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Transfer::Server:BytesIn" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Transfer::Server:BytesOut" + } + ] + } + ] + } + ] + }, + { + "id": "Transfer", + "name": "Transfer", + "dependencies": [ + { + "namespace": "AWS/Transfer" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Transfer::Server:BytesIn" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Transfer::Server:BytesOut" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::EC2::TransitGateway", + "dashboard": "TransitGateway", + "crossServiceDashboard": "TransitGateway:CrossService", + "resourceTypes": [ + { + "type": "AWS::EC2::TransitGateway", + "keyMetric": "AWS::EC2::TransitGateway:BytesIn", + "dashboard": "TransitGateway", + "arnRegex": ".*:transit-gateway/(.*)" + } + ], + "metricTemplates": [ + { + "resourceType": "AWS::EC2::TransitGateway", + "namespace": "AWS/TransitGateway", + "dimensions": [ + { + "dimensionName": "TransitGateway", + "labelName": "TransitGateway" + } + ], + "metrics": [ + { + "id": "AWS::EC2::TransitGateway:BytesIn", + "name": "BytesIn", + "defaultStat": "Sum" + }, + { + "id": "AWS::EC2::TransitGateway:BytesOut", + "name": "BytesOut", + "defaultStat": "Sum" + }, + { + "id": "AWS::EC2::TransitGateway:PacketDropCountBlackhole", + "name": "PacketDropCountBlackhole", + "defaultStat": "Sum" + }, + { + "id": "AWS::EC2::TransitGateway:PacketDropCountNoRoute", + "name": "PacketDropCountNoRoute", + "defaultStat": "Sum" + }, + { + "id": "AWS::EC2::TransitGateway:PacketsIn", + "name": "PacketsIn", + "defaultStat": "Sum" + }, + { + "id": "AWS::EC2::TransitGateway:PacketsOut", + "name": "PacketsOut", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "TransitGateway:CrossService", + "name": "TransitGateway", + "dependencies": [ + { + "namespace": "AWS/TransitGateway" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::TransitGateway:BytesIn" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::TransitGateway:BytesOut" + } + ] + } + ] + } + ] + }, + { + "id": "TransitGateway", + "name": "TransitGateway", + "dependencies": [ + { + "namespace": "AWS/TransitGateway" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::TransitGateway:BytesIn" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::TransitGateway:BytesOut" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::TransitGateway:PacketDropCountBlackhole" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::TransitGateway:PacketDropCountNoRoute" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::TransitGateway:PacketsIn" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::TransitGateway:PacketsOut" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::Translate", + "dashboard": "Translate", + "crossServiceDashboard": "Translate:CrossService", + "resourceTypes": [ + { + "type": "AWS::Translate::LanguagePair", + "keyMetric": "AWS::Translate::LanguagePair:CharacterCount", + "dashboard": "Translate" + } + ], + "controls": { + "AWS::Translate.languagePairs": { + "type": "resource", + "resourceType": "AWS::Translate::LanguagePair", + "labelField": "LanguagePair", + "valueField": "LanguagePair" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::Translate::LanguagePair", + "namespace": "AWS/Translate", + "dimensions": [ + { + "dimensionName": "LanguagePair", + "labelName": "LanguagePair" + } + ], + "metrics": [ + { + "id": "AWS::Translate::LanguagePair:CharacterCount", + "name": "CharacterCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::Translate::LanguagePair:ResponseTime", + "name": "ResponseTime", + "defaultStat": "Average" + }, + { + "id": "AWS::Translate::LanguagePair:ServerErrorCount", + "name": "ServerErrorCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::Translate::LanguagePair:SuccessfulRequestCount", + "name": "SuccessfulRequestCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::Translate::LanguagePair:ThrottledCount", + "name": "ThrottledCount", + "defaultStat": "Sum" + }, + { + "id": "AWS::Translate::LanguagePair:UserErrorCount", + "name": "UserErrorCount", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "Translate:CrossService", + "name": "Translate", + "dependencies": [ + { + "namespace": "AWS/Translate" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Translate::LanguagePair:CharacterCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Translate::LanguagePair:ResponseTime" + } + ] + } + ] + } + ] + }, + { + "id": "Translate", + "name": "Translate", + "dependencies": [ + { + "namespace": "AWS/Translate" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::Translate.languagePairs" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Translate::LanguagePair:CharacterCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Translate::LanguagePair:ResponseTime" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Translate::LanguagePair:ServerErrorCount" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Translate::LanguagePair:SuccessfulRequestCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Translate::LanguagePair:ThrottledCount" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::Translate::LanguagePair:UserErrorCount" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::TrustedAdvisor", + "dashboard": "TrustedAdvisor", + "crossServiceDashboard": "TrustedAdvisor:CrossService", + "resourceTypes": [ + { + "type": "AWS::TrustedAdvisor::Check", + "keyMetric": "AWS::TrustedAdvisor::Check:RedResources", + "dashboard": "TrustedAdvisor" + } + ], + "controls": { + "AWS::TrustedAdvisor.checks": { + "type": "resource", + "resourceType": "AWS::TrustedAdvisor::Check", + "labelField": "CheckName", + "valueField": "CheckName" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::TrustedAdvisor::Check", + "namespace": "AWS/TrustedAdvisor", + "dimensions": [ + { + "dimensionName": "CheckName", + "labelName": "CheckName" + } + ], + "metrics": [ + { + "id": "AWS::TrustedAdvisor::Check:RedResources", + "name": "RedResources", + "defaultStat": "Average" + }, + { + "id": "AWS::TrustedAdvisor::Check:YellowResources", + "name": "YellowResources", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "TrustedAdvisor:CrossService", + "name": "Trusted Advisor", + "dependencies": [ + { + "namespace": "AWS/TrustedAdvisor" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::TrustedAdvisor::Check:RedResources" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::TrustedAdvisor::Check:YellowResources" + } + ] + } + ] + } + ] + }, + { + "id": "TrustedAdvisor", + "name": "Trusted Advisor", + "dependencies": [ + { + "namespace": "AWS/TrustedAdvisor" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::TrustedAdvisor.checks" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::TrustedAdvisor::Check:RedResources" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::TrustedAdvisor::Check:YellowResources" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::EC2::VPNConnection", + "dashboard": "VPN", + "crossServiceDashboard": "VPN:CrossService", + "resourceTypes": [ + { + "type": "AWS::EC2::VPNConnection", + "keyMetric": "AWS::EC2::VPNConnection:TunnelDataIn", + "dashboard": "VPN", + "arnRegex": ".*:vpn-gateway/(.*)" + } + ], + "controls": { + "AWS::EC2::VPNConnection.resources": { + "type": "resource", + "resourceType": "AWS::EC2::VPNConnection", + "labelField": "VpnId", + "valueField": "VpnId" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::EC2::VPNConnection", + "namespace": "AWS/VPN", + "dimensions": [ + { + "dimensionName": "VpnId", + "labelName": "VpnId" + } + ], + "metrics": [ + { + "id": "AWS::EC2::VPNConnection:TunnelDataIn", + "name": "TunnelDataIn", + "defaultStat": "Sum" + }, + { + "id": "AWS::EC2::VPNConnection:TunnelState", + "name": "TunnelState", + "defaultStat": "Average" + }, + { + "id": "AWS::EC2::VPNConnection:TunnelDataOut", + "name": "TunnelDataOut", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "VPN:CrossService", + "name": "VPN", + "dependencies": [ + { + "namespace": "AWS/VPN" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::VPNConnection:TunnelDataIn" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::VPNConnection:TunnelState" + } + ] + } + ] + } + ] + }, + { + "id": "VPN", + "name": "VPN", + "dependencies": [ + { + "namespace": "AWS/VPN" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::EC2::VPNConnection.resources" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::VPNConnection:TunnelDataIn" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::VPNConnection:TunnelState" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::EC2::VPNConnection:TunnelDataOut" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::WorkMail", + "dashboard": "WorkMail", + "crossServiceDashboard": "WorkMail:CrossService", + "resourceTypes": [ + { + "type": "AWS::WorkMail::Organization", + "keyMetric": "AWS::WorkMail::Organization:OrganizationEmailReceived", + "dashboard": "WorkMail" + } + ], + "controls": { + "AWS::WorkMail.organizations": { + "type": "resource", + "resourceType": "AWS::WorkMail::Organization", + "labelField": "OrganizationId", + "valueField": "OrganizationId" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::WorkMail::Organization", + "namespace": "AWS/WorkMail", + "dimensions": [ + { + "dimensionName": "OrganizationId", + "labelName": "OrganizationId" + } + ], + "metrics": [ + { + "id": "AWS::WorkMail::Organization:OrganizationEmailReceived", + "name": "OrganizationEmailReceived", + "defaultStat": "Sum" + }, + { + "id": "AWS::WorkMail::Organization:OutgoingEmailSent", + "name": "OutgoingEmailSent", + "defaultStat": "Sum" + }, + { + "id": "AWS::WorkMail::Organization:MailboxEmailDelivered", + "name": "MailboxEmailDelivered", + "defaultStat": "Sum" + }, + { + "id": "AWS::WorkMail::Organization:OutgoingEmailBounced", + "name": "OutgoingEmailBounced", + "defaultStat": "Sum" + }, + { + "id": "AWS::WorkMail::Organization:IncomingEmailBounced", + "name": "IncomingEmailBounced", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "WorkMail:CrossService", + "name": "WorkMail", + "dependencies": [ + { + "namespace": "AWS/WorkMail" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::WorkMail::Organization:OrganizationEmailReceived" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::WorkMail::Organization:OutgoingEmailSent" + } + ] + } + ] + } + ] + }, + { + "id": "WorkMail", + "name": "WorkMail", + "dependencies": [ + { + "namespace": "AWS/WorkMail" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::WorkMail.organizations" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::WorkMail::Organization:OrganizationEmailReceived" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::WorkMail::Organization:MailboxEmailDelivered" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::WorkMail::Organization:OutgoingEmailBounced" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::WorkMail::Organization:IncomingEmailBounced" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::WorkMail::Organization:OutgoingEmailSent" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::WorkSpaces", + "dashboard": "WorkSpaces", + "crossServiceDashboard": "WorkSpaces:CrossService", + "resourceTypes": [ + { + "type": "AWS::WorkSpaces::Workspace", + "keyMetric": "AWS::WorkSpaces::Workspace:Available", + "dashboard": "WorkSpaces", + "arnRegex": ".*:workspace/(.*)" + } + ], + "controls": { + "AWS::WorkSpaces.workspaces": { + "type": "resource", + "resourceType": "AWS::WorkSpaces::Workspace", + "labelField": "WorkspaceId", + "valueField": "WorkspaceId" + } + }, + "metricTemplates": [ + { + "resourceType": "AWS::WorkSpaces::Workspace", + "namespace": "AWS/WorkSpaces", + "dimensions": [ + { + "dimensionName": "WorkspaceId", + "labelName": "WorkspaceId" + } + ], + "metrics": [ + { + "id": "AWS::WorkSpaces::Workspace:Available", + "name": "Available", + "defaultStat": "Average" + }, + { + "id": "AWS::WorkSpaces::Workspace:Unhealthy", + "name": "Unhealthy", + "defaultStat": "Average" + }, + { + "id": "AWS::WorkSpaces::Workspace:SessionLaunchTime", + "name": "SessionLaunchTime", + "defaultStat": "Average" + }, + { + "id": "AWS::WorkSpaces::Workspace:ConnectionSuccess", + "name": "ConnectionSuccess", + "defaultStat": "Sum" + }, + { + "id": "AWS::WorkSpaces::Workspace:ConnectionFailure", + "name": "ConnectionFailure", + "defaultStat": "Sum" + }, + { + "id": "AWS::WorkSpaces::Workspace:ConnectionAttempt", + "name": "ConnectionAttempt", + "defaultStat": "Sum" + }, + { + "id": "AWS::WorkSpaces::Workspace:InSessionLatency", + "name": "InSessionLatency", + "defaultStat": "Average" + }, + { + "id": "AWS::WorkSpaces::Workspace:SessionDisconnect", + "name": "SessionDisconnect", + "defaultStat": "Sum" + }, + { + "id": "AWS::WorkSpaces::Workspace:UserConnected", + "name": "UserConnected", + "defaultStat": "Sum" + }, + { + "id": "AWS::WorkSpaces::Workspace:Stopped", + "name": "Stopped", + "defaultStat": "Sum" + }, + { + "id": "AWS::WorkSpaces::Workspace:Maintenance", + "name": "Maintenance", + "defaultStat": "Sum" + } + ] + } + ], + "dashboards": [ + { + "id": "WorkSpaces:CrossService", + "name": "WorkSpaces", + "dependencies": [ + { + "namespace": "AWS/WorkSpaces" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::WorkSpaces::Workspace:Available" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::WorkSpaces::Workspace:Unhealthy" + } + ] + } + ] + } + ] + }, + { + "id": "WorkSpaces", + "name": "WorkSpaces", + "dependencies": [ + { + "namespace": "AWS/WorkSpaces" + } + ], + "controls": [ + "Shared::View.AlarmState", + "Shared::Group.ResourceGroup", + "AWS::WorkSpaces.workspaces" + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::WorkSpaces::Workspace:Available" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::WorkSpaces::Workspace:Unhealthy" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::WorkSpaces::Workspace:SessionLaunchTime" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::WorkSpaces::Workspace:ConnectionSuccess" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::WorkSpaces::Workspace:ConnectionFailure" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::WorkSpaces::Workspace:ConnectionAttempt" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::WorkSpaces::Workspace:InSessionLatency" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::WorkSpaces::Workspace:SessionDisconnect" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::WorkSpaces::Workspace:UserConnected" + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::WorkSpaces::Workspace:Stopped" + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "AWS::WorkSpaces::Workspace:Maintenance" + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "AWS::XRay", + "resourceTypes": [ + { + "type": "CW::XRay::Node", + "keyMetric": "CW::XRay::Node:TracedRequestCount", + "dashboard": "XRay:Node", + "drawerDashboard": "XRay:Drawer", + "alarmPatterns": [ + { + "namespace": "AWS/X-Ray", + "dimensions": [ + { + "dimensionName": "ServiceName", + "labelName": "ServiceName" + }, + { + "dimensionName": "ServiceType", + "labelName": "ServiceType" + }, + { + "dimensionName": "GroupName", + "labelName": "GroupName" + } + ] + }, + { + "namespace": "AWS/X-Ray", + "dimensions": [ + { + "dimensionName": "ServiceName", + "labelName": "ServiceName" + }, + { + "dimensionName": "ServiceType", + "labelName": "ServiceType" + }, + { + "dimensionName": "GroupName", + "labelName": "" + } + ] + } + ] + } + ], + "metricTemplates": [ + { + "resourceType": "CW::XRay::Node", + "namespace": "AWS/X-Ray", + "dimensions": [ + { + "dimensionName": "GroupName", + "labelName": "GroupName" + }, + { + "dimensionName": "ServiceName", + "labelName": "ServiceName" + }, + { + "dimensionName": "ServiceType", + "labelName": "ServiceType" + } + ], + "metrics": [ + { + "id": "CW::XRay::Node:ResponseTime", + "name": "ResponseTime", + "defaultStat": "p50" + }, + { + "id": "CW::XRay::Node:TracedRequestCount", + "name": "TracedRequestCount", + "defaultStat": "Sum" + }, + { + "id": "CW::XRay::Node:FaultRate", + "name": "FaultRate", + "defaultStat": "Average" + }, + { + "id": "CW::XRay::Node:OkRate", + "name": "OkRate", + "defaultStat": "Average" + }, + { + "id": "CW::XRay::Node:ThrottleRate", + "name": "ThrottleRate", + "defaultStat": "Average" + }, + { + "id": "CW::XRay::Node:ErrorRate", + "name": "ErrorRate", + "defaultStat": "Average" + } + ] + } + ], + "dashboards": [ + { + "id": "XRay:Drawer", + "name": "XRay Node", + "dependencies": [ + { + "namespace": "AWS/X-Ray" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "Latency" + }, + "metrics": [ + { + "metricTemplate": "CW::XRay::Node:ResponseTime", + "metricOptions": { + "stat": "p50", + "color": "#1f77b4" + } + }, + { + "metricTemplate": "CW::XRay::Node:ResponseTime", + "metricOptions": { + "stat": "p90", + "color": "#e377c2" + } + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "CW::XRay::Node:TracedRequestCount", + "metricOptions": { + "stat": "Sum", + "id": "m1", + "visible": false + } + }, + { + "metricExpression": "FILL(m1, 0)", + "resourceType": "CW::XRay::Node", + "metricOptions": { + "id": "e1", + "label": "TracedRequestCount", + "color": "#8c564b" + } + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "CW::XRay::Node:FaultRate", + "metricOptions": { + "stat": "Average", + "id": "m1", + "visible": false + } + }, + { + "metricExpression": "100 * FILL(m1, 0)", + "resourceType": "CW::XRay::Node", + "metricOptions": { + "id": "e1", + "label": "FaultRate", + "color": "#d62728" + } + } + ] + } + ] + } + ] + }, + { + "id": "XRay:Node", + "name": "XRay Node", + "dependencies": [ + { + "namespace": "AWS/X-Ray" + } + ], + "rows": [ + { + "widgets": [ + { + "type": "chart", + "properties": { + "title": "Latency" + }, + "metrics": [ + { + "metricTemplate": "CW::XRay::Node:ResponseTime", + "metricOptions": { + "stat": "p50", + "color": "#1f77b4" + } + }, + { + "metricTemplate": "CW::XRay::Node:ResponseTime", + "metricOptions": { + "stat": "p90", + "color": "#e377c2" + } + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "CW::XRay::Node:TracedRequestCount", + "metricOptions": { + "stat": "Sum", + "id": "m1", + "visible": false + } + }, + { + "metricExpression": "FILL(m1, 0)", + "resourceType": "CW::XRay::Node", + "metricOptions": { + "id": "e1", + "label": "TracedRequestCount", + "color": "#8c564b" + } + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "CW::XRay::Node:FaultRate", + "metricOptions": { + "stat": "Average", + "id": "m1", + "visible": false + } + }, + { + "metricExpression": "100 * FILL(m1, 0)", + "resourceType": "CW::XRay::Node", + "metricOptions": { + "id": "e1", + "label": "FaultRate", + "color": "#d62728" + } + } + ] + } + ] + }, + { + "widgets": [ + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "CW::XRay::Node:OkRate", + "metricOptions": { + "stat": "Average", + "id": "m1", + "visible": false + } + }, + { + "metricExpression": "100 * FILL(m1, 0)", + "resourceType": "CW::XRay::Node", + "metricOptions": { + "id": "e1", + "label": "OkRate", + "color": "#2ca02c" + } + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "CW::XRay::Node:ErrorRate", + "metricOptions": { + "stat": "Average", + "id": "m1", + "visible": false + } + }, + { + "metricExpression": "100 * FILL(m1, 0)", + "resourceType": "CW::XRay::Node", + "metricOptions": { + "id": "e1", + "label": "ErrorRate", + "color": "#ff7f0e" + } + } + ] + }, + { + "type": "chart", + "metrics": [ + { + "metricTemplate": "CW::XRay::Node:ThrottleRate", + "metricOptions": { + "stat": "Average", + "id": "m1", + "visible": false + } + }, + { + "metricExpression": "100 * FILL(m1, 0)", + "resourceType": "CW::XRay::Node", + "metricOptions": { + "id": "e1", + "label": "ThrottleRate", + "color": "#9467bd" + } + } + ] + } + ] + } + ] + } + ] + } +] diff --git a/packages/@aws-cdk/cfnspec/lib/index.ts b/packages/@aws-cdk/cfnspec/lib/index.ts index bbc0323faba5e..8584e6877ed62 100644 --- a/packages/@aws-cdk/cfnspec/lib/index.ts +++ b/packages/@aws-cdk/cfnspec/lib/index.ts @@ -1,6 +1,7 @@ import * as crypto from 'crypto'; import * as schema from './schema'; export { schema }; +export * from './canned-metrics'; /** * The complete AWS CloudFormation Resource specification, having any CDK patches and enhancements included in it. diff --git a/packages/@aws-cdk/cfnspec/package.json b/packages/@aws-cdk/cfnspec/package.json index 98e7db7193f32..a16dd12e2c0d0 100644 --- a/packages/@aws-cdk/cfnspec/package.json +++ b/packages/@aws-cdk/cfnspec/package.json @@ -4,6 +4,7 @@ "version": "0.0.0", "scripts": { "update": "cdk-build && /bin/bash build-tools/update.sh", + "update-metrics": "/bin/bash build-tools/update-metrics.sh", "build": "cdk-build && node build-tools/build", "watch": "cdk-watch", "lint": "cdk-lint", diff --git a/packages/@aws-cdk/cfnspec/test/test.canned-metrics.ts b/packages/@aws-cdk/cfnspec/test/test.canned-metrics.ts new file mode 100644 index 0000000000000..ff14500769c8d --- /dev/null +++ b/packages/@aws-cdk/cfnspec/test/test.canned-metrics.ts @@ -0,0 +1,40 @@ +import { Test } from 'nodeunit'; +import * as cfnspec from '../lib'; + +module.exports = { + 'spot-check DynamoDB metrics'(test: Test) { + const metrics = cfnspec.cannedMetricsForService('AWS::DynamoDB'); + test.ok(metrics.length > 0); + + const resLatency = metrics.find(m => m.metricName === 'SuccessfulRequestLatency'); + test.ok(resLatency); + + test.deepEqual(resLatency?.dimensions, [['Operation', 'TableName']]); + + test.done(); + }, + + 'spot-check MediaStore metrics'(test: Test) { + const metrics = cfnspec.cannedMetricsForService('AWS::MediaStore'); + test.ok(metrics.length > 0); + + test.done(); + }, +}; + +/** + * Test that we can read canned metrics for all namespaces in the spec without throwing an error + */ +for (const _namespace of cfnspec.namespaces()) { + const namespace = _namespace; + module.exports[`Validate canned metrics for ${namespace}`] = (test: Test) => { + const metrics = cfnspec.cannedMetricsForService(namespace); + + // Check that there are no duplicates in these list (duplicates may occur because of duplicate + // dimensions, but those have readly been combined). + const uniqueMetricNames = new Set(metrics.map(m => `${m.namespace}/${m.metricName}`)); + test.equal(uniqueMetricNames.size, metrics.length, 'There are metrics with duplicate names'); + + test.done(); + }; +} \ No newline at end of file diff --git a/tools/cfn2ts/lib/augmentation-generator.ts b/tools/cfn2ts/lib/augmentation-generator.ts index 847c7f15c4187..2c145546acdb2 100644 --- a/tools/cfn2ts/lib/augmentation-generator.ts +++ b/tools/cfn2ts/lib/augmentation-generator.ts @@ -3,6 +3,35 @@ import { CodeMaker } from 'codemaker'; import * as genspec from './genspec'; import { SpecName } from './spec-utils'; +/** + * Generate augmentation methods for the given types + * + * Augmentation consists of two parts: + * + * - Adding method declarations to an interface (IBucket) + * - Adding implementations for those methods to the base class (BucketBase) + * + * The augmentation file must be imported in `index.ts`. + * + * ---------------------------------------------------------- + * + * Generates code similar to the following: + * + * ``` + * import Base from './-base'; + * + * declare module './-base' { + * interface { + * method(...): Type; + * } + * interface { + * method(...): Type; + * } + * } + * + * .prototype. = // ...impl... + * ``` + */ export class AugmentationGenerator { private readonly code = new CodeMaker(); private readonly outputFile: string; diff --git a/tools/cfn2ts/lib/canned-metrics-generator.ts b/tools/cfn2ts/lib/canned-metrics-generator.ts new file mode 100644 index 0000000000000..6a540f81c7895 --- /dev/null +++ b/tools/cfn2ts/lib/canned-metrics-generator.ts @@ -0,0 +1,126 @@ +import * as cfnspec from '@aws-cdk/cfnspec'; +import { CodeMaker, toCamelCase } from 'codemaker'; + + +/** + * Generate default prop sets for canned metric + * + * We don't generate `cloudwatch.Metric` objects directly (because we can't + * guarantee that all packages already properly depend on + * `@aws-cdk/aws-cloudwatch`). + * + * Instead, we generate functions that return the set of properties that should + * be passed to a `cloudwatch.Metric` to construct it. + * + * ---------------------------------------------------------- + * + * Generates code similar to the following: + * + * ``` + * export class Metrics { + * public static (): Props { + * // ... + * } + * } + * ``` + */ +export class CannedMetricsGenerator { + private readonly code = new CodeMaker({ indentationLevel: 2 }); + private readonly outputFile: string; + + constructor(moduleName: string, private readonly namespace: string) { + this.outputFile = `${moduleName}-canned-metrics.generated.ts`; + this.code.openFile(this.outputFile); + + this.code.line(`// Copyright 2012-${new Date().getFullYear()} Amazon.com, Inc. or its affiliates. All Rights Reserved.`); + this.code.line(); + this.code.line('/* eslint-disable max-len */ // This is generated code - line lengths are difficult to control'); + this.code.line(); + } + + public generate(): boolean { + let emittedOverloads = false; + + const namespaces = groupByNamespace(cfnspec.cannedMetricsForService(this.namespace)); + for (const [namespace, metrics] of Object.entries(namespaces)) { + this.code.openBlock(`export class ${namespace}Metrics`); + + for (const metric of metrics) { + const functionName = this.functionName(metric); + + if (metric.dimensions.length > 1) { + emittedOverloads = true; + // Generate overloads for every possible dimensions type + for (const dims of metric.dimensions) { + const dimsType = dimensionsType(dims); + this.code.line(`public static ${functionName}(dimensions: ${dimsType}): MetricWithDims<${dimsType}>;`); + } + this.code.openBlock(`public static ${functionName}(dimensions: any)`); + } else { + // Else just the one type + this.code.openBlock(`public static ${functionName}(dimensions: ${dimensionsType(metric.dimensions[0])})`); + } + + this.code.line('return {'); + this.code.line(` namespace: '${metric.namespace}',`); + this.code.line(` metricName: '${metric.metricName}',`); + this.code.line(' dimensions,'); + this.code.line(` statistic: '${metric.defaultStat}',`); + this.code.line('};'); + this.code.closeBlock(); + } + + this.code.closeBlock(); + } + + if (emittedOverloads) { + this.emitTypeDef(); + } + + return Object.keys(namespaces).length > 0; + } + + /** + * Saves the generated file. + */ + public async save(dir: string): Promise { + this.code.closeFile(this.outputFile); + return this.code.save(dir); + } + + private functionName(metric: cfnspec.CannedMetric) { + return makeIdentifier(toCamelCase(`${metric.metricName}${metric.defaultStat}`)); + } + + private emitTypeDef() { + this.code.line('type MetricWithDims = { namespace: string, metricName: string, statistic: string, dimensions: D };'); + } +} + +/** + * If not a valid identifier, prefix with a '_' + */ +function makeIdentifier(s: string) { + // Strip invalid characters from identifier + s = s.replace(/([^a-zA-Z0-9_])/g, ''); + // If it doesn't start with an alpha char, prefix with _ + s = s.replace(/^([^a-zA-Z_])/, '_$1'); + return s; +} + +/** + * Return an anonymous TypeScript type that would accept the given dimensions + */ +function dimensionsType(dims: string[]) { + return `{ ${dims.map(d => `${d}: string`).join(', ')} }`; +} + +function groupByNamespace(metrics: cfnspec.CannedMetric[]): Record { + const ret: Record = {}; + for (const metric of metrics) { + // Always starts with 'AWS/' (except when it doesn't, looking at you `CloudWatchSynthetics`) + const namespace = metric.namespace.replace(/^AWS\//, ''); + (ret[namespace] ?? (ret[namespace] = [])).push(metric); + } + return ret; +} \ No newline at end of file diff --git a/tools/cfn2ts/lib/index.ts b/tools/cfn2ts/lib/index.ts index 4528bfa924bcb..5763e4d746546 100644 --- a/tools/cfn2ts/lib/index.ts +++ b/tools/cfn2ts/lib/index.ts @@ -1,6 +1,7 @@ import * as cfnSpec from '@aws-cdk/cfnspec'; import * as fs from 'fs-extra'; import { AugmentationGenerator } from './augmentation-generator'; +import { CannedMetricsGenerator } from './canned-metrics-generator'; import CodeGenerator, { CodeGeneratorOptions } from './codegen'; import { packageName } from './genspec'; @@ -25,6 +26,11 @@ export default async function(scopes: string | string[], outPath: string, option if (augs.emitCode()) { await augs.save(outPath); } + + const canned = new CannedMetricsGenerator(name, scope); + if (canned.generate()) { + await canned.save(outPath); + } } } From 7a09c185f03a22c78f83536da07535227b301a1b Mon Sep 17 00:00:00 2001 From: Markus Lindqvist Date: Tue, 8 Dec 2020 21:07:42 +0200 Subject: [PATCH 293/314] fix(codebuild): incorrect SSM Parameter ARN in Project's IAM permissions (#11917) (CodeBuild) Build fails after introducing environmentVariables with type BuildEnvironmentVariableType.PARAMETER_STORE. Fixes #9980 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-codebuild/lib/project.ts | 9 +++++++-- packages/@aws-cdk/aws-codebuild/test/test.project.ts | 6 +++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/@aws-cdk/aws-codebuild/lib/project.ts b/packages/@aws-cdk/aws-codebuild/lib/project.ts index 1e0950d5fd22a..597a816ca8fc1 100644 --- a/packages/@aws-cdk/aws-codebuild/lib/project.ts +++ b/packages/@aws-cdk/aws-codebuild/lib/project.ts @@ -929,11 +929,16 @@ export class Project extends ProjectBase { const resources = Object.values(props.environmentVariables) .filter(envVariable => envVariable.type === BuildEnvironmentVariableType.PARAMETER_STORE) + .map(envVariable => + // If the parameter name starts with / the resource name is not separated with a double '/' + // arn:aws:ssm:region:1111111111:parameter/PARAM_NAME + (envVariable.value as string).startsWith('/') + ? (envVariable.value as string).substr(1) + : envVariable.value) .map(envVariable => Stack.of(this).formatArn({ service: 'ssm', resource: 'parameter', - sep: ':', - resourceName: envVariable.value, + resourceName: envVariable, })); if (resources.length === 0) { diff --git a/packages/@aws-cdk/aws-codebuild/test/test.project.ts b/packages/@aws-cdk/aws-codebuild/test/test.project.ts index ba7b804d779f1..81a09bd3b96f8 100644 --- a/packages/@aws-cdk/aws-codebuild/test/test.project.ts +++ b/packages/@aws-cdk/aws-codebuild/test/test.project.ts @@ -796,7 +796,7 @@ export = { }, 'ENV_VAR2': { type: codebuild.BuildEnvironmentVariableType.PARAMETER_STORE, - value: '/params/param2', + value: 'params/param2', }, }, }); @@ -823,7 +823,7 @@ export = { { Ref: 'AWS::AccountId', }, - ':parameter:/params/param1', + ':parameter/params/param1', ], ], }, @@ -843,7 +843,7 @@ export = { { Ref: 'AWS::AccountId', }, - ':parameter:/params/param2', + ':parameter/params/param2', ], ], }], From d9cba8d16f0c60018ce7e9718479680910ae169c Mon Sep 17 00:00:00 2001 From: sullis Date: Tue, 8 Dec 2020 22:33:48 -0800 Subject: [PATCH 294/314] chore(init/java): assertj-core 3.18.1 (#11949) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-cdk/lib/init-templates/v1/app/java/pom.template.xml | 2 +- .../lib/init-templates/v1/sample-app/java/pom.template.xml | 2 +- .../aws-cdk/lib/init-templates/v2/app/java/pom.template.xml | 2 +- .../lib/init-templates/v2/sample-app/java/pom.template.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/aws-cdk/lib/init-templates/v1/app/java/pom.template.xml b/packages/aws-cdk/lib/init-templates/v1/app/java/pom.template.xml index 5de56f23d4815..37be67aa2c7a5 100644 --- a/packages/aws-cdk/lib/init-templates/v1/app/java/pom.template.xml +++ b/packages/aws-cdk/lib/init-templates/v1/app/java/pom.template.xml @@ -59,7 +59,7 @@ org.assertj assertj-core - 3.18.0 + 3.18.1 test diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/java/pom.template.xml b/packages/aws-cdk/lib/init-templates/v1/sample-app/java/pom.template.xml index ca8d28b14c159..0355825bf0a7a 100644 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/java/pom.template.xml +++ b/packages/aws-cdk/lib/init-templates/v1/sample-app/java/pom.template.xml @@ -71,7 +71,7 @@ org.assertj assertj-core - 3.18.0 + 3.18.1 test diff --git a/packages/aws-cdk/lib/init-templates/v2/app/java/pom.template.xml b/packages/aws-cdk/lib/init-templates/v2/app/java/pom.template.xml index efc6616ae82a0..f49fe7b60e963 100644 --- a/packages/aws-cdk/lib/init-templates/v2/app/java/pom.template.xml +++ b/packages/aws-cdk/lib/init-templates/v2/app/java/pom.template.xml @@ -59,7 +59,7 @@ org.assertj assertj-core - 3.18.0 + 3.18.1 test diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/java/pom.template.xml b/packages/aws-cdk/lib/init-templates/v2/sample-app/java/pom.template.xml index ea3de05fcc2b3..1236d332e9bab 100644 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/java/pom.template.xml +++ b/packages/aws-cdk/lib/init-templates/v2/sample-app/java/pom.template.xml @@ -54,7 +54,7 @@ org.assertj assertj-core - 3.18.0 + 3.18.1 test From 3530e8c758df3ea2fb26d654109e17a75f157b37 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Wed, 9 Dec 2020 10:01:06 +0100 Subject: [PATCH 295/314] fix(synthetics): `metricFailed` uses `Average` instead of `Sum` by default (#11941) Because the `Failed` metric is emitted as `1` if there is a failure, and no data points are emitted otherwise, the `Average` of all data points will always be `1`. `Sum` is a more appropriate default metric. This PR should not be merged before https://github.com/aws/aws-cdk/pull/11717 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-synthetics/lib/canary.ts | 7 ++----- packages/@aws-cdk/aws-synthetics/test/metric.test.ts | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/@aws-cdk/aws-synthetics/lib/canary.ts b/packages/@aws-cdk/aws-synthetics/lib/canary.ts index 367c9efe6e435..7b1ccf79f5830 100644 --- a/packages/@aws-cdk/aws-synthetics/lib/canary.ts +++ b/packages/@aws-cdk/aws-synthetics/lib/canary.ts @@ -297,15 +297,12 @@ export class Canary extends cdk.Resource { /** * Measure the number of failed canary runs over a given time period. * - * Default: average over 5 minutes + * Default: sum over 5 minutes * * @param options - configuration options for the metric */ public metricFailed(options?: MetricOptions): Metric { - return this.cannedMetric(CloudWatchSyntheticsMetrics.failedSum, { - statistic: 'Average', - ...options, - }); + return this.cannedMetric(CloudWatchSyntheticsMetrics.failedSum, options); } /** diff --git a/packages/@aws-cdk/aws-synthetics/test/metric.test.ts b/packages/@aws-cdk/aws-synthetics/test/metric.test.ts index a2f13cd7e9fcc..6144d2d678cdb 100644 --- a/packages/@aws-cdk/aws-synthetics/test/metric.test.ts +++ b/packages/@aws-cdk/aws-synthetics/test/metric.test.ts @@ -31,7 +31,7 @@ test('.metricXxx() methods can be used to obtain Metrics for the canary', () => dimensions: { CanaryName: canary.canaryName }, namespace: 'CloudWatchSynthetics', metricName: 'Failed', - statistic: 'Average', + statistic: 'Sum', })); expect(metricDuration).toEqual(expect.objectContaining({ From 6f306adc7ac12cb24ec0cad2a543976464b037b8 Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Wed, 9 Dec 2020 14:21:14 +0000 Subject: [PATCH 296/314] chore: apply mergify rules to v2-main branch (#11939) The same set of mergify rules are used for 'master' and 'v2-main' branches. With these changes, regular PRs from contributors get auto-merged. This is currently not the case. This also removes any special rules for v2 and reduces the number of rules. --- .mergify.yml | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/.mergify.yml b/.mergify.yml index 2675841005330..97ca6d16de18b 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -19,7 +19,6 @@ pull_request_rules: commit_message: title+body conditions: - base!=release - - -base~=^v2 - -title~=(WIP|wip) - -label~=(blocked|do-not-merge|no-squash|two-approvers) - -merged @@ -34,7 +33,7 @@ pull_request_rules: - name: automatic merge (2+ approvers) actions: comment: - message: Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to [allow changes to be pushed to your fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork)). + message: Thank you for contributing! Your pull request will be automatically updated and merged (do not update manually, and be sure to [allow changes to be pushed to your fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork)). merge: strict: smart method: squash @@ -42,7 +41,6 @@ pull_request_rules: commit_message: title+body conditions: - base!=release - - -base~=^v2 - -title~=(WIP|wip) - label~=two-approvers - -label~=(blocked|do-not-merge|no-squash) @@ -58,7 +56,7 @@ pull_request_rules: - name: automatic merge (no-squash) actions: comment: - message: Thank you for contributing! Your pull request will be updated from master and then merged automatically without squashing (do not update manually, and be sure to [allow changes to be pushed to your fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork)). + message: Thank you for contributing! Your pull request will be automatically updated and merged without squashing (do not update manually, and be sure to [allow changes to be pushed to your fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork)). merge: strict: smart # Merge instead of squash @@ -66,7 +64,6 @@ pull_request_rules: strict_method: merge commit_message: title+body conditions: - - -base~=^v2 - -title~=(WIP|wip) - -label~=(blocked|do-not-merge) # Only if no-squash is set @@ -121,22 +118,4 @@ pull_request_rules: - "#approved-reviews-by>=1" - "#changes-requested-reviews-by=0" - status-success~=AWS CodeBuild us-east-1 - - status-success=validate-pr - - name: automatic merge of v2 forward merges - actions: - comment: - message: Forward merge successful! - merge: - method: merge - strict: smart+fasttrack - strict_method: merge - commit_message: title+body - conditions: - - base=v2-main - - label~=forward-merge - - -label~=(blocked|do-not-merge) - - -merged - - -closed - - author~=aws-cdk-automation - - "#approved-reviews-by>=1" - - status-success~=AWS CodeBuild us-east-1 + - status-success=validate-pr \ No newline at end of file From 2ec294803427675b0ba594e929f32aca1ffdb075 Mon Sep 17 00:00:00 2001 From: Elad Ben-Israel Date: Wed, 9 Dec 2020 19:14:04 +0200 Subject: [PATCH 297/314] fix(eks): kubectl provider out-of-memory for large manifests/charts (now 1GiB) (#11957) Increase the default memory size of the kubectl provider's lambda function to 1GiB and introduce a `kubectlMemory` option that can be used to control memory allocation if needed. Fixes #11787 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-eks/README.md | 25 ++++++++++- packages/@aws-cdk/aws-eks/lib/cluster.ts | 34 ++++++++++++-- .../@aws-cdk/aws-eks/lib/kubectl-provider.ts | 3 +- .../@aws-cdk/aws-eks/test/test.cluster.ts | 44 +++++++++++++++++-- 4 files changed, 97 insertions(+), 9 deletions(-) diff --git a/packages/@aws-cdk/aws-eks/README.md b/packages/@aws-cdk/aws-eks/README.md index 1b09a3ac995e5..cf08a43a16bfe 100644 --- a/packages/@aws-cdk/aws-eks/README.md +++ b/packages/@aws-cdk/aws-eks/README.md @@ -450,7 +450,11 @@ The `ClusterHandler` is a Lambda function responsible to interact the EKS API in ### Kubectl Support -The resources are created in the cluster by running `kubectl apply` from a python lambda function. You can configure the environment of this function by specifying it at cluster instantiation. For example, this can be useful in order to configure an http proxy: +The resources are created in the cluster by running `kubectl apply` from a python lambda function. + +#### Environment + +You can configure the environment of this function by specifying it at cluster instantiation. For example, this can be useful in order to configure an http proxy: ```ts const cluster = new eks.Cluster(this, 'hello-eks', { @@ -461,6 +465,8 @@ const cluster = new eks.Cluster(this, 'hello-eks', { }); ``` +#### Runtime + By default, the `kubectl`, `helm` and `aws` commands used to operate the cluster are provided by an AWS Lambda Layer from the AWS Serverless Application in [aws-lambda-layer-kubectl](https://github.com/aws-samples/aws-lambda-layer-kubectl). In most cases this should be sufficient. You can provide a custom layer in case the default layer does not meet your @@ -496,6 +502,23 @@ const cluster = eks.Cluster.fromClusterAttributes(this, 'MyCluster', { > Instructions on how to build `layer.zip` can be found > [here](https://github.com/aws-samples/aws-lambda-layer-kubectl/blob/master/cdk/README.md). +#### Memory + +By default, the kubectl provider is configured with 1024MiB of memory. You can use the `kubectlMemory` option to specify the memory size for the AWS Lambda function: + +```ts +import { Size } from '@aws-cdk/core'; + +new eks.Cluster(this, 'MyCluster', { + kubectlMemory: Size.gibibytes(4) +}); + +// or +eks.Cluster.fromClusterAttributes(this, 'MyCluster', { + kubectlMemory: Size.gibibytes(4) +}); +``` + ### ARM64 Support Instance types with `ARM64` architecture are supported in both managed nodegroup and self-managed capacity. Simply specify an ARM64 `instanceType` (such as `m6g.medium`), and the latest diff --git a/packages/@aws-cdk/aws-eks/lib/cluster.ts b/packages/@aws-cdk/aws-eks/lib/cluster.ts index 54cbeb9379d02..beee73cca05dd 100644 --- a/packages/@aws-cdk/aws-eks/lib/cluster.ts +++ b/packages/@aws-cdk/aws-eks/lib/cluster.ts @@ -6,7 +6,7 @@ import * as iam from '@aws-cdk/aws-iam'; import * as kms from '@aws-cdk/aws-kms'; import * as lambda from '@aws-cdk/aws-lambda'; import * as ssm from '@aws-cdk/aws-ssm'; -import { Annotations, CfnOutput, CfnResource, IResource, Resource, Stack, Tags, Token, Duration } from '@aws-cdk/core'; +import { Annotations, CfnOutput, CfnResource, IResource, Resource, Stack, Tags, Token, Duration, Size } from '@aws-cdk/core'; import { Construct, Node } from 'constructs'; import * as YAML from 'yaml'; import { AwsAuth } from './aws-auth'; @@ -92,14 +92,13 @@ export interface ICluster extends IResource, ec2.IConnectable { /** * Custom environment variables when running `kubectl` against this cluster. - * @default - no additional environment variables */ readonly kubectlEnvironment?: { [key: string]: string }; /** * A security group to use for `kubectl` execution. * - * @default - If not specified, the k8s endpoint is expected to be accessible + * If this is undefined, the k8s endpoint is expected to be accessible * publicly. */ readonly kubectlSecurityGroup?: ec2.ISecurityGroup; @@ -107,7 +106,7 @@ export interface ICluster extends IResource, ec2.IConnectable { /** * Subnets to host the `kubectl` compute resources. * - * @default - If not specified, the k8s endpoint is expected to be accessible + * If this is undefined, the k8s endpoint is expected to be accessible * publicly. */ readonly kubectlPrivateSubnets?: ec2.ISubnet[]; @@ -119,6 +118,10 @@ export interface ICluster extends IResource, ec2.IConnectable { */ readonly kubectlLayer?: lambda.ILayerVersion; + /** + * Amount of memory to allocate to the provider's lambda function. + */ + readonly kubectlMemory?: Size; /** * Creates a new service account with corresponding IAM Role (IRSA). * @@ -271,6 +274,13 @@ export interface ClusterAttributes { * @see https://github.com/aws-samples/aws-lambda-layer-kubectl */ readonly kubectlLayer?: lambda.ILayerVersion; + + /** + * Amount of memory to allocate to the provider's lambda function. + * + * @default Size.gibibytes(1) + */ + readonly kubectlMemory?: Size; } /** @@ -416,6 +426,13 @@ export interface ClusterOptions extends CommonClusterOptions { * @see https://github.com/aws-samples/aws-lambda-layer-kubectl */ readonly kubectlLayer?: lambda.ILayerVersion; + + /** + * Amount of memory to allocate to the provider's lambda function. + * + * @default Size.gibibytes(1) + */ + readonly kubectlMemory?: Size; } /** @@ -630,6 +647,7 @@ abstract class ClusterBase extends Resource implements ICluster { public abstract readonly kubectlEnvironment?: { [key: string]: string }; public abstract readonly kubectlSecurityGroup?: ec2.ISecurityGroup; public abstract readonly kubectlPrivateSubnets?: ec2.ISubnet[]; + public abstract readonly kubectlMemory?: Size; public abstract readonly openIdConnectProvider: iam.IOpenIdConnectProvider; /** @@ -842,6 +860,11 @@ export class Cluster extends ClusterBase { */ public readonly kubectlLayer?: lambda.ILayerVersion; + /** + * The amount of memory allocated to the kubectl provider's lambda function. + */ + public readonly kubectlMemory?: Size; + /** * If this cluster is kubectl-enabled, returns the `ClusterResource` object * that manages it. If this cluster is not kubectl-enabled (i.e. uses the @@ -929,6 +952,7 @@ export class Cluster extends ClusterBase { this.endpointAccess = props.endpointAccess ?? EndpointAccess.PUBLIC_AND_PRIVATE; this.kubectlEnvironment = props.kubectlEnvironment; this.kubectlLayer = props.kubectlLayer; + this.kubectlMemory = props.kubectlMemory; const privateSubents = this.selectPrivateSubnets().slice(0, 16); const publicAccessDisabled = !this.endpointAccess._config.publicAccess; @@ -1630,6 +1654,7 @@ class ImportedCluster extends ClusterBase { public readonly kubectlSecurityGroup?: ec2.ISecurityGroup | undefined; public readonly kubectlPrivateSubnets?: ec2.ISubnet[] | undefined; public readonly kubectlLayer?: lambda.ILayerVersion; + public readonly kubectlMemory?: Size; constructor(scope: Construct, id: string, private readonly props: ClusterAttributes) { super(scope, id); @@ -1641,6 +1666,7 @@ class ImportedCluster extends ClusterBase { this.kubectlEnvironment = props.kubectlEnvironment; this.kubectlPrivateSubnets = props.kubectlPrivateSubnetIds ? props.kubectlPrivateSubnetIds.map((subnetid, index) => ec2.Subnet.fromSubnetId(this, `KubectlSubnet${index}`, subnetid)) : undefined; this.kubectlLayer = props.kubectlLayer; + this.kubectlMemory = props.kubectlMemory; let i = 1; for (const sgid of props.securityGroupIds ?? []) { diff --git a/packages/@aws-cdk/aws-eks/lib/kubectl-provider.ts b/packages/@aws-cdk/aws-eks/lib/kubectl-provider.ts index be23ac355c42e..4cf2d254099f6 100644 --- a/packages/@aws-cdk/aws-eks/lib/kubectl-provider.ts +++ b/packages/@aws-cdk/aws-eks/lib/kubectl-provider.ts @@ -67,6 +67,7 @@ export class KubectlProvider extends NestedStack { } const layer = cluster.kubectlLayer ?? getOrCreateKubectlLayer(this); + const memorySize = cluster.kubectlMemory ? cluster.kubectlMemory.toMebibytes() : 1024; const handler = new lambda.Function(this, 'Handler', { code: lambda.Code.fromAsset(path.join(__dirname, 'kubectl-handler')), @@ -75,7 +76,7 @@ export class KubectlProvider extends NestedStack { timeout: Duration.minutes(15), description: 'onEvent handler for EKS kubectl resource provider', layers: [layer], - memorySize: 256, + memorySize, environment: cluster.kubectlEnvironment, // defined only when using private access diff --git a/packages/@aws-cdk/aws-eks/test/test.cluster.ts b/packages/@aws-cdk/aws-eks/test/test.cluster.ts index facdf1880d426..409fb829bbc93 100644 --- a/packages/@aws-cdk/aws-eks/test/test.cluster.ts +++ b/packages/@aws-cdk/aws-eks/test/test.cluster.ts @@ -12,7 +12,7 @@ import * as constructs from 'constructs'; import { Test } from 'nodeunit'; import * as YAML from 'yaml'; import * as eks from '../lib'; -import { getOrCreateKubectlLayer } from '../lib/kubectl-provider'; +import * as kubectl from '../lib/kubectl-provider'; import { BottleRocketImage } from '../lib/private/bottlerocket'; import { testFixture, testFixtureNoVpc } from './util'; @@ -391,7 +391,7 @@ export = { // WHEN const vpc = new ec2.Vpc(stack, 'VPC'); new eks.Cluster(stack, 'Cluster', { vpc, defaultCapacity: 0, version: CLUSTER_VERSION }); - getOrCreateKubectlLayer(stack); + kubectl.getOrCreateKubectlLayer(stack); // THEN expect(stack).to(haveResource('Custom::AWSCDK-EKS-Cluster')); @@ -411,7 +411,7 @@ export = { // WHEN const vpc = new ec2.Vpc(stack, 'VPC'); new eks.Cluster(stack, 'Cluster', { vpc, defaultCapacity: 0, version: CLUSTER_VERSION }); - getOrCreateKubectlLayer(stack); + kubectl.getOrCreateKubectlLayer(stack); // THEN expect(stack).to(haveResource('Custom::AWSCDK-EKS-Cluster')); @@ -2583,4 +2583,42 @@ export = { })); test.done(); }, + + 'custom memory size for kubectl provider'(test: Test) { + // GIVEN + const { stack, vpc, app } = testFixture(); + + // WHEN + new eks.Cluster(stack, 'Cluster', { + vpc, + version: CLUSTER_VERSION, + kubectlMemory: cdk.Size.gibibytes(2), + }); + + // THEN + const casm = app.synth(); + const providerNestedStackTemplate = JSON.parse(fs.readFileSync(path.join(casm.directory, 'StackawscdkawseksKubectlProvider7346F799.nested.template.json'), 'utf-8')); + test.equal(providerNestedStackTemplate?.Resources?.Handler886CB40B?.Properties?.MemorySize, 2048); + test.done(); + }, + + 'custom memory size for imported clusters'(test: Test) { + // GIVEN + const { stack, app } = testFixture(); + + // WHEN + const cluster = eks.Cluster.fromClusterAttributes(stack, 'Imported', { + clusterName: 'my-cluster', + kubectlRoleArn: 'arn:aws:iam::123456789012:role/MyRole', + kubectlMemory: cdk.Size.gibibytes(4), + }); + + cluster.addManifest('foo', { bar: 123 }); + + // THEN + const casm = app.synth(); + const providerNestedStackTemplate = JSON.parse(fs.readFileSync(path.join(casm.directory, 'StackStackImported1CBA9C50KubectlProviderAA00BA49.nested.template.json'), 'utf-8')); + test.equal(providerNestedStackTemplate?.Resources?.Handler886CB40B?.Properties?.MemorySize, 4096); + test.done(); + }, }; From 46d4ca659073062e502511584a36be3912f7656d Mon Sep 17 00:00:00 2001 From: Sanghyun Park Date: Thu, 10 Dec 2020 04:43:27 +1100 Subject: [PATCH 298/314] docs(iam): typo on AuthorizationToken documentation (#11953) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-ecr/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-ecr/README.md b/packages/@aws-cdk/aws-ecr/README.md index 0a2ef76458ac3..6278238b84eab 100644 --- a/packages/@aws-cdk/aws-ecr/README.md +++ b/packages/@aws-cdk/aws-ecr/README.md @@ -53,7 +53,7 @@ grants an IAM user access to call this API. import * as iam from '@aws-cdk/aws-iam'; const user = new iam.User(this, 'User', { ... }); -AuthorizationToken.grantRead(user); +iam.AuthorizationToken.grantRead(user); ``` ## Automatically clean up repositories From 8069a7e85c7c1652848624ba1b8085c89d3b1db2 Mon Sep 17 00:00:00 2001 From: Nick Law Date: Thu, 10 Dec 2020 05:48:14 +1100 Subject: [PATCH 299/314] fix(apigateway): base path url cannot contain upper case characters (#11799) We're migrating an existing API Gateway application to CDK and have [hit this error](https://github.com/aws/aws-cdk/blob/2f0a598720f7ecf4dfea7dde97182940fcbe8d9a/packages/%40aws-cdk/aws-apigateway/lib/base-path-mapping.ts#L52), because our base paths include capitalised characters. This PR resolves that issue and I've included some basics tests for the `BasePathMapping` resource. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-apigateway/lib/base-path-mapping.ts | 2 +- .../test/base-path-mapping.test.ts | 107 ++++++++++++++++++ 2 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 packages/@aws-cdk/aws-apigateway/test/base-path-mapping.test.ts diff --git a/packages/@aws-cdk/aws-apigateway/lib/base-path-mapping.ts b/packages/@aws-cdk/aws-apigateway/lib/base-path-mapping.ts index 17fa52ee7005c..d87fe8536f099 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/base-path-mapping.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/base-path-mapping.ts @@ -48,7 +48,7 @@ export class BasePathMapping extends Resource { super(scope, id); if (props.basePath && !Token.isUnresolved(props.basePath)) { - if (!props.basePath.match(/^[a-z0-9$_.+!*'()-]+$/)) { + if (!props.basePath.match(/^[a-zA-Z0-9$_.+!*'()-]+$/)) { throw new Error(`A base path may only contain letters, numbers, and one of "$-_.+!*'()", received: ${props.basePath}`); } } diff --git a/packages/@aws-cdk/aws-apigateway/test/base-path-mapping.test.ts b/packages/@aws-cdk/aws-apigateway/test/base-path-mapping.test.ts new file mode 100644 index 0000000000000..49dc8e50759f8 --- /dev/null +++ b/packages/@aws-cdk/aws-apigateway/test/base-path-mapping.test.ts @@ -0,0 +1,107 @@ +import '@aws-cdk/assert/jest'; +import * as acm from '@aws-cdk/aws-certificatemanager'; +import * as cdk from '@aws-cdk/core'; +import * as apigw from '../lib'; + +describe('BasePathMapping', () => { + test('default setup', () => { + // GIVEN + const stack = new cdk.Stack(); + const api = new apigw.RestApi(stack, 'MyApi'); + api.root.addMethod('GET'); // api must have atleast one method. + const domain = new apigw.DomainName(stack, 'MyDomain', { + domainName: 'example.com', + certificate: acm.Certificate.fromCertificateArn(stack, 'cert', 'arn:aws:acm:us-east-1:1111111:certificate/11-3336f1-44483d-adc7-9cd375c5169d'), + endpointType: apigw.EndpointType.REGIONAL, + }); + + // WHEN + new apigw.BasePathMapping(stack, 'MyBasePath', { + restApi: api, + domainName: domain, + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGateway::BasePathMapping', { + DomainName: { Ref: 'MyDomainE4943FBC' }, + RestApiId: { Ref: 'MyApi49610EDF' }, + }); + }); + + test('specify basePath property', () => { + // GIVEN + const stack = new cdk.Stack(); + const api = new apigw.RestApi(stack, 'MyApi'); + api.root.addMethod('GET'); // api must have atleast one method. + const domain = new apigw.DomainName(stack, 'MyDomain', { + domainName: 'example.com', + certificate: acm.Certificate.fromCertificateArn(stack, 'cert', 'arn:aws:acm:us-east-1:1111111:certificate/11-3336f1-44483d-adc7-9cd375c5169d'), + endpointType: apigw.EndpointType.REGIONAL, + }); + + // WHEN + new apigw.BasePathMapping(stack, 'MyBasePath', { + restApi: api, + domainName: domain, + basePath: 'My_B45E-P4th', + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::ApiGateway::BasePathMapping', { + BasePath: 'My_B45E-P4th', + }); + }); + + test('throw error for invalid basePath property', () => { + // GIVEN + const stack = new cdk.Stack(); + const api = new apigw.RestApi(stack, 'MyApi'); + api.root.addMethod('GET'); // api must have atleast one method. + const domain = new apigw.DomainName(stack, 'MyDomain', { + domainName: 'example.com', + certificate: acm.Certificate.fromCertificateArn(stack, 'cert', 'arn:aws:acm:us-east-1:1111111:certificate/11-3336f1-44483d-adc7-9cd375c5169d'), + endpointType: apigw.EndpointType.REGIONAL, + }); + + // WHEN + const invalidBasePath = '/invalid-/base-path'; + + // THEN + expect(() => { + new apigw.BasePathMapping(stack, 'MyBasePath', { + restApi: api, + domainName: domain, + basePath: invalidBasePath, + }); + }).toThrowError(/base path may only contain/); + }); + + test('specify stage property', () => { + // GIVEN + const stack = new cdk.Stack(); + const api = new apigw.RestApi(stack, 'MyApi'); + api.root.addMethod('GET'); // api must have atleast one method. + const domain = new apigw.DomainName(stack, 'MyDomain', { + domainName: 'example.com', + certificate: acm.Certificate.fromCertificateArn(stack, 'cert', 'arn:aws:acm:us-east-1:1111111:certificate/11-3336f1-44483d-adc7-9cd375c5169d'), + endpointType: apigw.EndpointType.REGIONAL, + }); + const stage = new apigw.Stage(stack, 'MyStage', { + deployment: new apigw.Deployment(stack, 'MyDeplouyment', { + api, + }), + }); + + // WHEN + new apigw.BasePathMapping(stack, 'MyBasePathMapping', { + restApi: api, + domainName: domain, + stage, + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::ApiGateway::BasePathMapping', { + Stage: { Ref: 'MyStage572B0482' }, + }); + }); +}); From ff695daee41b22bfaeef148dd0faa8e451bfd9af Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Wed, 9 Dec 2020 19:21:02 +0000 Subject: [PATCH 300/314] feat(kms): change default key policy to align with KMS best practices (under feature flag) (#11918) In #5575, a new flag (`trustAccountIdentities`) was introduced which -- when set -- changes the default key policy from a custom key admin policy to one that grants all access to the key to the root account user. This key policy matches the default policy when a key is created via the KMS APIs or console. For backwards-compatibility reasons, the default for `trustAccountIdentities` had to be set to `false`. Without the flag explicitly set, the default key policy is one that (a) doesn't match the KMS-recommended admin policy and (b) doesn't explicitly enable IAM principal policies to acccess the key. This means that all usage operations (e.g., Encrypt, GenerateDataKey) must be added to both the key policy and to the principal policy. This change introduces a new feature flag to flip the default behavior of the `trustAccountIdentities` flag, so new keys created will have the sane defaults matching the KMS recommended best practices. As a related change, this feature flag also changes the behavior when a user passes in `policy` when creating a Key. Without the feature flag set, the policy is always appended to the default key policy. With the feature flag set, the policy will *override* the default key policy, enabling users to opt-out of the default key policy to introduce a more restrictive policy if desired. This also matches the KMS API behavior, where a policy provided by the user will override the defaults. Marking this PR as `requires-two-approvers` to ensure this PR gets an appropriately-critical review. BREAKING CHANGE: change the default value of trustAccountIdentities to true, which will result in the key getting the KMS-recommended default key policy. This is enabled through the '@aws-cdk/aws-kms:defaultKeyPolicies' feature flag. fixes #8977 fixes #10575 fixes #11309 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-kms/README.md | 128 +-- packages/@aws-cdk/aws-kms/lib/key.ts | 115 ++- .../@aws-cdk/aws-kms/lib/private/perms.ts | 28 + packages/@aws-cdk/aws-kms/package.json | 2 + packages/@aws-cdk/aws-kms/test/key.test.ts | 783 ++++++++++++------ packages/@aws-cdk/cx-api/lib/features.ts | 17 + 6 files changed, 728 insertions(+), 345 deletions(-) create mode 100644 packages/@aws-cdk/aws-kms/lib/private/perms.ts diff --git a/packages/@aws-cdk/aws-kms/README.md b/packages/@aws-cdk/aws-kms/README.md index 0f9c4c6df67cc..ac7c9c2571a1e 100644 --- a/packages/@aws-cdk/aws-kms/README.md +++ b/packages/@aws-cdk/aws-kms/README.md @@ -31,8 +31,6 @@ key.addAlias('alias/bar'); ## Sharing keys between stacks -> see Trust Account Identities for additional details - To use a KMS key in a different stack in the same CDK application, pass the construct to the other stack: @@ -41,8 +39,6 @@ pass the construct to the other stack: ## Importing existing keys -> see Trust Account Identities for additional details - To use a KMS key that is not defined in this CDK app, but is created through other means, use `Key.fromKeyArn(parent, name, ref)`: @@ -72,61 +68,29 @@ Note that calls to `addToResourcePolicy` and `grant*` methods on `myKeyAlias` wi no-ops, and `addAlias` and `aliasTargetKey` will fail, as the imported alias does not have a reference to the underlying KMS Key. -## Trust Account Identities - -KMS keys can be created to trust IAM policies. This is the default behavior in -the console and is described -[here](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html). -This same behavior can be enabled by: +## Key Policies -```ts -new Key(stack, 'MyKey', { trustAccountIdentities: true }); -``` +Controlling access and usage of KMS Keys requires the use of key policies (resource-based policies attached to the key); +this is in contrast to most other AWS resources where access can be entirely controlled with IAM policies, +and optionally complemented with resource policies. For more in-depth understanding of KMS key access and policies, see -Using `trustAccountIdentities` solves many issues around cyclic dependencies -between stacks. The most common use case is creating an S3 Bucket with CMK -default encryption which is later accessed by IAM roles in other stacks. +* https://docs.aws.amazon.com/kms/latest/developerguide/control-access-overview.html +* https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html -stack-1 (bucket and key created) +KMS keys can be created to trust IAM policies. This is the default behavior for both the KMS APIs and in +the console. This behavior is enabled by the '@aws-cdk/aws-kms:defaultKeyPolicies' feature flag, +which is set for all new projects; for existing projects, this same behavior can be enabled by +passing the `trustAccountIdentities` property as `true` when creating the key: ```ts -// ... snip -const myKmsKey = new kms.Key(this, 'MyKey', { trustAccountIdentities: true }); - -const bucket = new Bucket(this, 'MyEncryptedBucket', { - bucketName: 'myEncryptedBucket', - encryption: BucketEncryption.KMS, - encryptionKey: myKmsKey -}); +new kms.Key(stack, 'MyKey', { trustAccountIdentities: true }); ``` -stack-2 (lambda that operates on bucket and key) - -```ts -// ... snip - -const fn = new lambda.Function(this, 'MyFunction', { - runtime: lambda.Runtime.NODEJS_10_X, - handler: 'index.handler', - code: lambda.Code.fromAsset(path.join(__dirname, 'lambda-handler')), -}); - -const bucket = s3.Bucket.fromBucketName(this, 'BucketId', 'myEncryptedBucket'); - -const key = kms.Key.fromKeyArn(this, 'KeyId', 'arn:aws:...'); // key ARN passed via stack props - -bucket.grantReadWrite(fn); -key.grantEncryptDecrypt(fn); -``` - -The challenge in this scenario is the KMS key policy behavior. The simple way to understand -this, is IAM policies for account entities can only grant the permissions granted to the -account root principle in the key policy. When `trustAccountIdentities` is true, -the following policy statement is added: +With either the `@aws-cdk/aws-kms:defaultKeyPolicies` feature flag set, +or the `trustAccountIdentities` prop set, the Key will be given the following default key policy: ```json { - "Sid": "Enable IAM User Permissions", "Effect": "Allow", "Principal": {"AWS": "arn:aws:iam::111122223333:root"}, "Action": "kms:*", @@ -134,9 +98,67 @@ the following policy statement is added: } ``` -As the name suggests this trusts IAM policies to control access to the key. -If account root does not have permissions to the specific actions, then the key -policy and the IAM policy for the entity (e.g. Lambda) both need to grant -permission. +This policy grants full access to the key to the root account user. +This enables the root account user -- via IAM policies -- to grant access to other IAM principals. +With the above default policy, future permissions can be added to either the key policy or IAM principal policy. +```ts +const key = new kms.Key(stack, 'MyKey'); +const user = new iam.User(stack, 'MyUser'); +key.grantEncrypt(user); // Adds encrypt permissions to user policy; key policy is unmodified. +``` + +Adopting the default KMS key policy (and so trusting account identities) +solves many issues around cyclic dependencies between stacks. +Without this default key policy, future permissions must be added to both the key policy and IAM principal policy, +which can cause cyclic dependencies if the permissions cross stack boundaries. +(For example, an encrypted bucket in one stack, and Lambda function that accesses it in another.) + +### Appending to or replacing the default key policy + +The default key policy can be amended or replaced entirely, depending on your use case and requirements. +A common addition to the key policy would be to add other key admins that are allowed to administer the key +(e.g., change permissions, revoke, delete). Additional key admins can be specified at key creation or after +via the `grantAdmin` method. + +```ts +const myTrustedAdminRole = iam.Role.fromRoleArn(stack, 'TrustedRole', 'arn:aws:iam:....'); +const key = new kms.Key(stack, 'MyKey', { + admins: [myTrustedAdminRole], +}); + +const secondKey = new kms.Key(stack, 'MyKey2'); +secondKey.grantAdmin(myTrustedAdminRole); +``` + +Alternatively, a custom key policy can be specified, which will replace the default key policy. + +> **Note**: In applications without the '@aws-cdk/aws-kms:defaultKeyPolicies' feature flag set +and with `trustedAccountIdentities` set to false (the default), specifying a policy at key creation _appends_ the +provided policy to the default key policy, rather than _replacing_ the default policy. + +```ts +const myTrustedAdminRole = iam.Role.fromRoleArn(stack, 'TrustedRole', 'arn:aws:iam:....'); +// Creates a limited admin policy and assigns to the account root. +const myCustomPolicy = new iam.PolicyDocument({ + statements: [new iam.PolicyStatement({ + actions: [ + 'kms:Create*', + 'kms:Describe*', + 'kms:Enable*', + 'kms:List*', + 'kms:Put*', + ], + principals: [new iam.AccountRootPrincipal()], + resources: ['*'], + })], +}); +const key = new kms.Key(stack, 'MyKey', { + policy: myCustomPolicy, +}); +``` +> **Warning:** Replacing the default key policy with one that only grants access to a specific user or role +runs the risk of the key becoming unmanageable if that user or role is deleted. +It is highly recommended that the key policy grants access to the account root, rather than specific principals. +See https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html for more information. diff --git a/packages/@aws-cdk/aws-kms/lib/key.ts b/packages/@aws-cdk/aws-kms/lib/key.ts index db13ee4d761ea..82098129e27a2 100644 --- a/packages/@aws-cdk/aws-kms/lib/key.ts +++ b/packages/@aws-cdk/aws-kms/lib/key.ts @@ -1,8 +1,10 @@ import * as iam from '@aws-cdk/aws-iam'; -import { IResource, RemovalPolicy, Resource, Stack } from '@aws-cdk/core'; +import { FeatureFlags, IResource, RemovalPolicy, Resource, Stack } from '@aws-cdk/core'; +import * as cxapi from '@aws-cdk/cx-api'; import { IConstruct, Construct } from 'constructs'; import { Alias } from './alias'; import { CfnKey } from './kms.generated'; +import * as perms from './private/perms'; /** * A KMS Key, either managed by this CDK app, or imported. @@ -77,8 +79,9 @@ abstract class KeyBase extends Resource implements IKey { /** * Optional property to control trusting account identities. * - * If specified grants will default identity policies instead of to both - * resource and identity policies. + * If specified, grants will default identity policies instead of to both + * resource and identity policies. This matches the default behavior when creating + * KMS keys via the API or console. */ protected abstract readonly trustAccountIdentities: boolean; @@ -168,35 +171,24 @@ abstract class KeyBase extends Resource implements IKey { } /** - * Grant decryption permisisons using this key to the given principal + * Grant decryption permissions using this key to the given principal */ public grantDecrypt(grantee: iam.IGrantable): iam.Grant { - return this.grant(grantee, - 'kms:Decrypt', - ); + return this.grant(grantee, ...perms.DECRYPT_ACTIONS); } /** - * Grant encryption permisisons using this key to the given principal + * Grant encryption permissions using this key to the given principal */ public grantEncrypt(grantee: iam.IGrantable): iam.Grant { - return this.grant(grantee, - 'kms:Encrypt', - 'kms:ReEncrypt*', - 'kms:GenerateDataKey*', - ); + return this.grant(grantee, ...perms.ENCRYPT_ACTIONS); } /** - * Grant encryption and decryption permisisons using this key to the given principal + * Grant encryption and decryption permissions using this key to the given principal */ public grantEncryptDecrypt(grantee: iam.IGrantable): iam.Grant { - return this.grant(grantee, - 'kms:Decrypt', - 'kms:Encrypt', - 'kms:ReEncrypt*', - 'kms:GenerateDataKey*', - ); + return this.grant(grantee, ...[...perms.DECRYPT_ACTIONS, ...perms.ENCRYPT_ACTIONS]); } /** @@ -293,11 +285,27 @@ export interface KeyProps { /** * Custom policy document to attach to the KMS key. * + * NOTE - If the '@aws-cdk/aws-kms:defaultKeyPolicies' feature flag is set (the default for new projects), + * this policy will *override* the default key policy and become the only key policy for the key. If the + * feature flag is not set, this policy will be appended to the default key policy. + * * @default - A policy document with permissions for the account root to * administer the key will be created. */ readonly policy?: iam.PolicyDocument; + /** + * A list of principals to add as key administrators to the key policy. + * + * Key administrators have permissions to manage the key (e.g., change permissions, revoke), but do not have permissions + * to use the key in cryptographic operations (e.g., encrypt, decrypt). + * + * These principals will be added to the default key policy (if none specified), or to the specified policy (if provided). + * + * @default [] + */ + readonly admins?: iam.IPrincipal[]; + /** * Whether the encryption key should be retained when it is removed from the Stack. This is useful when one wants to * retain access to data that was encrypted with a key that is being retired. @@ -311,10 +319,15 @@ export interface KeyProps { * * Setting this to true adds a default statement which delegates key * access control completely to the identity's IAM policy (similar - * to how it works for other AWS resources). + * to how it works for other AWS resources). This matches the default behavior + * when creating KMS keys via the API or console. * - * @default false + * If the '@aws-cdk/aws-kms:defaultKeyPolicies' feature flag is set (the default for new projects), + * this flag will always be treated as 'true' and does not need to be explicitly set. + * + * @default - false, unless the '@aws-cdk/aws-kms:defaultKeyPolicies' feature flag is set. * @see https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam + * @deprecated redundant with the '@aws-cdk/aws-kms:defaultKeyPolicies' feature flag */ readonly trustAccountIdentities?: boolean; } @@ -365,12 +378,26 @@ export class Key extends KeyBase { constructor(scope: Construct, id: string, props: KeyProps = {}) { super(scope, id); - this.policy = props.policy || new iam.PolicyDocument(); - this.trustAccountIdentities = props.trustAccountIdentities || false; - if (this.trustAccountIdentities) { - this.allowAccountIdentitiesToControl(); + const defaultKeyPoliciesFeatureEnabled = FeatureFlags.of(this).isEnabled(cxapi.KMS_DEFAULT_KEY_POLICIES); + + this.policy = props.policy ?? new iam.PolicyDocument(); + if (defaultKeyPoliciesFeatureEnabled) { + if (props.trustAccountIdentities === false) { + throw new Error('`trustAccountIdentities` cannot be false if the @aws-cdk/aws-kms:defaultKeyPolicies feature flag is set'); + } + + this.trustAccountIdentities = true; + // Set the default key policy if one hasn't been provided by the user. + if (!props.policy) { + this.addDefaultAdminPolicy(); + } } else { - this.allowAccountToAdmin(); + this.trustAccountIdentities = props.trustAccountIdentities ?? false; + if (this.trustAccountIdentities) { + this.addDefaultAdminPolicy(); + } else { + this.addLegacyAdminPolicy(); + } } const resource = new CfnKey(this, 'Resource', { @@ -384,25 +411,49 @@ export class Key extends KeyBase { this.keyId = resource.ref; resource.applyRemovalPolicy(props.removalPolicy); + (props.admins ?? []).forEach((p) => this.grantAdmin(p)); + if (props.alias !== undefined) { this.addAlias(props.alias); } } - private allowAccountIdentitiesToControl() { + /** + * Grant admins permissions using this key to the given principal + * + * Key administrators have permissions to manage the key (e.g., change permissions, revoke), but do not have permissions + * to use the key in cryptographic operations (e.g., encrypt, decrypt). + */ + public grantAdmin(grantee: iam.IGrantable): iam.Grant { + return this.grant(grantee, ...perms.ADMIN_ACTIONS); + } + + /** + * Adds the default key policy to the key. This policy gives the AWS account (root user) full access to the CMK, + * which reduces the risk of the CMK becoming unmanageable and enables IAM policies to allow access to the CMK. + * This is the same policy that is default when creating a Key via the KMS API or Console. + * @see https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default + */ + private addDefaultAdminPolicy() { this.addToResourcePolicy(new iam.PolicyStatement({ resources: ['*'], actions: ['kms:*'], principals: [new iam.AccountRootPrincipal()], })); - } + /** - * Let users or IAM policies from this account admin this key. + * Grants the account admin privileges -- not full account access -- plus the GenerateDataKey action. + * The GenerateDataKey action was added for interop with S3 in https://github.com/aws/aws-cdk/issues/3458. + * + * This policy is discouraged and deprecated by the '@aws-cdk/aws-kms:defaultKeyPolicies' feature flag. + * * @link https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default - * @link https://aws.amazon.com/premiumsupport/knowledge-center/update-key-policy-future/ + * @deprecated */ - private allowAccountToAdmin() { + private addLegacyAdminPolicy() { + // This is equivalent to `[...perms.ADMIN_ACTIONS, 'kms:GenerateDataKey']`, + // but keeping this explicit ordering for backwards-compatibility (changing the ordering causes resource updates) const actions = [ 'kms:Create*', 'kms:Describe*', diff --git a/packages/@aws-cdk/aws-kms/lib/private/perms.ts b/packages/@aws-cdk/aws-kms/lib/private/perms.ts new file mode 100644 index 0000000000000..fe510359d7e89 --- /dev/null +++ b/packages/@aws-cdk/aws-kms/lib/private/perms.ts @@ -0,0 +1,28 @@ +// https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html + +export const ADMIN_ACTIONS = [ + 'kms:Create*', + 'kms:Describe*', + 'kms:Enable*', + 'kms:List*', + 'kms:Put*', + 'kms:Update*', + 'kms:Revoke*', + 'kms:Disable*', + 'kms:Get*', + 'kms:Delete*', + 'kms:TagResource', + 'kms:UntagResource', + 'kms:ScheduleKeyDeletion', + 'kms:CancelKeyDeletion', +]; + +export const ENCRYPT_ACTIONS = [ + 'kms:Encrypt', + 'kms:ReEncrypt*', + 'kms:GenerateDataKey*', +]; + +export const DECRYPT_ACTIONS = [ + 'kms:Decrypt', +]; diff --git a/packages/@aws-cdk/aws-kms/package.json b/packages/@aws-cdk/aws-kms/package.json index 65c05ca946fbf..04ed686b059de 100644 --- a/packages/@aws-cdk/aws-kms/package.json +++ b/packages/@aws-cdk/aws-kms/package.json @@ -82,12 +82,14 @@ "dependencies": { "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/core": "0.0.0", + "@aws-cdk/cx-api": "0.0.0", "constructs": "^3.2.0" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/core": "0.0.0", + "@aws-cdk/cx-api": "0.0.0", "constructs": "^3.2.0" }, "engines": { diff --git a/packages/@aws-cdk/aws-kms/test/key.test.ts b/packages/@aws-cdk/aws-kms/test/key.test.ts index 93b5d1bc67e31..6560a31381691 100644 --- a/packages/@aws-cdk/aws-kms/test/key.test.ts +++ b/packages/@aws-cdk/aws-kms/test/key.test.ts @@ -1,10 +1,27 @@ -import { ResourcePart } from '@aws-cdk/assert'; +import { arrayWith, ResourcePart } from '@aws-cdk/assert'; import '@aws-cdk/assert/jest'; import * as iam from '@aws-cdk/aws-iam'; -import { App, CfnOutput, RemovalPolicy, Stack, Tags } from '@aws-cdk/core'; -import { Key } from '../lib'; +import * as cdk from '@aws-cdk/core'; +import * as kms from '../lib'; -const ACTIONS: string[] = [ +const ADMIN_ACTIONS: string[] = [ + 'kms:Create*', + 'kms:Describe*', + 'kms:Enable*', + 'kms:List*', + 'kms:Put*', + 'kms:Update*', + 'kms:Revoke*', + 'kms:Disable*', + 'kms:Get*', + 'kms:Delete*', + 'kms:TagResource', + 'kms:UntagResource', + 'kms:ScheduleKeyDeletion', + 'kms:CancelKeyDeletion', +]; + +const LEGACY_ADMIN_ACTIONS: string[] = [ 'kms:Create*', 'kms:Describe*', 'kms:Enable*', @@ -22,160 +39,283 @@ const ACTIONS: string[] = [ 'kms:UntagResource', ]; +let app: cdk.App; +let stack: cdk.Stack; +beforeEach(() => { + app = new cdk.App({ + context: { + // By default, enable the correct key policy behavior. Specific tests will test the disabled behavior. + '@aws-cdk/aws-kms:defaultKeyPolicies': true, + }, + }); + stack = new cdk.Stack(app); +}); + test('default key', () => { - const stack = new Stack(); - - new Key(stack, 'MyKey'); - - expect(stack).toMatchTemplate({ - Resources: { - MyKey6AB29FA6: { - Type: 'AWS::KMS::Key', - Properties: { - KeyPolicy: { - Statement: [ - { - Action: ACTIONS, - Effect: 'Allow', - Principal: { - AWS: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::', { Ref: 'AWS::AccountId' }, ':root']] }, - }, - Resource: '*', - }, - ], - Version: '2012-10-17', + new kms.Key(stack, 'MyKey'); + + expect(stack).toHaveResource('AWS::KMS::Key', { + Properties: { + KeyPolicy: { + Statement: [ + { + Action: 'kms:*', + Effect: 'Allow', + Principal: { + AWS: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::', { Ref: 'AWS::AccountId' }, ':root']] }, + }, + Resource: '*', }, - }, - DeletionPolicy: 'Retain', - UpdateReplacePolicy: 'Retain', + ], + Version: '2012-10-17', }, }, - }); + DeletionPolicy: 'Retain', + UpdateReplacePolicy: 'Retain', + }, ResourcePart.CompleteDefinition); }); test('default with no retention', () => { - const app = new App(); - const stack = new Stack(app, 'TestStack'); - - new Key(stack, 'MyKey', { removalPolicy: RemovalPolicy.DESTROY }); + new kms.Key(stack, 'MyKey', { removalPolicy: cdk.RemovalPolicy.DESTROY }); expect(stack).toHaveResource('AWS::KMS::Key', { DeletionPolicy: 'Delete', UpdateReplacePolicy: 'Delete' }, ResourcePart.CompleteDefinition); }); -test('default with some permission', () => { - const app = new App(); - const stack = new Stack(app, 'Test'); - - const key = new Key(stack, 'MyKey'); - const p = new iam.PolicyStatement({ resources: ['*'], actions: ['kms:encrypt'] }); - p.addArnPrincipal('arn'); - key.addToResourcePolicy(p); - - expect(stack).toMatchTemplate({ - Resources: { - MyKey6AB29FA6: { - Type: 'AWS::KMS::Key', - Properties: { - KeyPolicy: { - Statement: [ - { - Action: ACTIONS, - Effect: 'Allow', - Principal: { - AWS: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::', { Ref: 'AWS::AccountId' }, ':root']] }, - }, - Resource: '*', - }, - { - Action: 'kms:encrypt', - Effect: 'Allow', - Principal: { - AWS: 'arn', - }, - Resource: '*', - }, - ], - Version: '2012-10-17', +describe('key policies', () => { + test('can specify a default key policy', () => { + const policy = new iam.PolicyDocument(); + const statement = new iam.PolicyStatement({ resources: ['*'], actions: ['kms:Put*'] }); + statement.addArnPrincipal('arn:aws:iam::111122223333:root'); + policy.addStatements(statement); + + new kms.Key(stack, 'MyKey', { policy }); + + expect(stack).toHaveResource('AWS::KMS::Key', { + KeyPolicy: { + Statement: [ + { + Action: 'kms:Put*', + Effect: 'Allow', + Principal: { + AWS: 'arn:aws:iam::111122223333:root', + }, + Resource: '*', }, - }, - DeletionPolicy: 'Retain', - UpdateReplacePolicy: 'Retain', + ], + Version: '2012-10-17', }, - }, + }); }); -}); + test('can append to the default key policy', () => { + const statement = new iam.PolicyStatement({ resources: ['*'], actions: ['kms:Put*'] }); + statement.addArnPrincipal('arn:aws:iam::111122223333:root'); + + const key = new kms.Key(stack, 'MyKey'); + key.addToResourcePolicy(statement); + + expect(stack).toHaveResource('AWS::KMS::Key', { + KeyPolicy: { + Statement: [ + { + Action: 'kms:*', + Effect: 'Allow', + Principal: { + AWS: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::', { Ref: 'AWS::AccountId' }, ':root']] }, + }, + Resource: '*', + }, + { + Action: 'kms:Put*', + Effect: 'Allow', + Principal: { + AWS: 'arn:aws:iam::111122223333:root', + }, + Resource: '*', + }, + ], + Version: '2012-10-17', + }, + }); + }); -test('key with some options', () => { - const stack = new Stack(); + test.each([ + ['decrypt', (key: kms.Key, user: iam.IGrantable) => key.grantDecrypt(user), 'kms:Decrypt'], + ['encrypt', (key: kms.Key, user: iam.IGrantable) => key.grantEncrypt(user), ['kms:Encrypt', 'kms:ReEncrypt*', 'kms:GenerateDataKey*']], + ])('grant %s', (_, grantFn, actions) => { + // GIVEN + const key = new kms.Key(stack, 'Key'); + const user = new iam.User(stack, 'User'); + + // WHEN + grantFn(key, user); + + // THEN + // Key policy should be unmodified by the grant. + expect(stack).toHaveResource('AWS::KMS::Key', { + KeyPolicy: { + Statement: [ + { + Action: 'kms:*', + Effect: 'Allow', + Principal: { AWS: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::', { Ref: 'AWS::AccountId' }, ':root']] } }, + Resource: '*', + }, + ], + Version: '2012-10-17', + }, + }); - const key = new Key(stack, 'MyKey', { - enableKeyRotation: true, - enabled: false, + expect(stack).toHaveResource('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ + { + Action: actions, + Effect: 'Allow', + Resource: { 'Fn::GetAtt': ['Key961B73FD', 'Arn'] }, + }, + ], + Version: '2012-10-17', + }, + }); }); - const p = new iam.PolicyStatement({ resources: ['*'], actions: ['kms:encrypt'] }); - p.addArnPrincipal('arn'); - key.addToResourcePolicy(p); - - Tags.of(key).add('tag1', 'value1'); - Tags.of(key).add('tag2', 'value2'); - Tags.of(key).add('tag3', ''); - - expect(stack).toMatchTemplate({ - Resources: { - MyKey6AB29FA6: { - Type: 'AWS::KMS::Key', - Properties: { - KeyPolicy: { - Statement: [ - { - Action: ACTIONS, - Effect: 'Allow', - Principal: { - AWS: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::', { Ref: 'AWS::AccountId' }, ':root']] }, - }, - Resource: '*', - }, - { - Action: 'kms:encrypt', - Effect: 'Allow', - Principal: { - AWS: 'arn', - }, - Resource: '*', - }, + + test('grant for a principal in a dependent stack works correctly', () => { + const principalStack = new cdk.Stack(app, 'PrincipalStack'); + const principal = new iam.Role(principalStack, 'Role', { + assumedBy: new iam.AnyPrincipal(), + }); + + const keyStack = new cdk.Stack(app, 'KeyStack'); + const key = new kms.Key(keyStack, 'Key'); + + principalStack.addDependency(keyStack); + + key.grantEncrypt(principal); + + expect(principalStack).toHaveResourceLike('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ + { + Action: [ + 'kms:Encrypt', + 'kms:ReEncrypt*', + 'kms:GenerateDataKey*', ], - Version: '2012-10-17', + Effect: 'Allow', + Resource: { + 'Fn::ImportValue': 'KeyStack:ExportsOutputFnGetAttKey961B73FDArn5A860C43', + }, }, - Enabled: false, - EnableKeyRotation: true, - Tags: [ - { - Key: 'tag1', - Value: 'value1', + ], + Version: '2012-10-17', + }, + }); + }); + + test('additional key admins can be specified (with imported/immutable principal)', () => { + const adminRole = iam.Role.fromRoleArn(stack, 'Admin', 'arn:aws:iam::123456789012:role/TrustedAdmin'); + new kms.Key(stack, 'MyKey', { admins: [adminRole] }); + + expect(stack).toHaveResource('AWS::KMS::Key', { + KeyPolicy: { + Statement: [ + { + Action: 'kms:*', + Effect: 'Allow', + Principal: { + AWS: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::', { Ref: 'AWS::AccountId' }, ':root']] }, }, - { - Key: 'tag2', - Value: 'value2', + Resource: '*', + }, + { + Action: ADMIN_ACTIONS, + Effect: 'Allow', + Principal: { + AWS: 'arn:aws:iam::123456789012:role/TrustedAdmin', }, - { - Key: 'tag3', - Value: '', + Resource: '*', + }, + ], + Version: '2012-10-17', + }, + }); + }); + + test('additional key admins can be specified (with owned/mutable principal)', () => { + const adminRole = new iam.Role(stack, 'AdminRole', { + assumedBy: new iam.AccountRootPrincipal(), + }); + new kms.Key(stack, 'MyKey', { admins: [adminRole] }); + + expect(stack).toHaveResource('AWS::KMS::Key', { + KeyPolicy: { + // Unmodified - default key policy + Statement: [ + { + Action: 'kms:*', + Effect: 'Allow', + Principal: { + AWS: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::', { Ref: 'AWS::AccountId' }, ':root']] }, }, - ], - }, - DeletionPolicy: 'Retain', - UpdateReplacePolicy: 'Retain', + Resource: '*', + }, + ], + Version: '2012-10-17', }, - }, + }); + expect(stack).toHaveResource('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ + { + Action: ADMIN_ACTIONS, + Effect: 'Allow', + Resource: { 'Fn::GetAtt': ['MyKey6AB29FA6', 'Arn'] }, + }, + ], + Version: '2012-10-17', + }, + }); }); }); -test('addAlias creates an alias', () => { - const app = new App(); - const stack = new Stack(app, 'Test'); +test('key with some options', () => { + const key = new kms.Key(stack, 'MyKey', { + enableKeyRotation: true, + enabled: false, + }); + + cdk.Tags.of(key).add('tag1', 'value1'); + cdk.Tags.of(key).add('tag2', 'value2'); + cdk.Tags.of(key).add('tag3', ''); + + expect(stack).toHaveResourceLike('AWS::KMS::Key', { + Enabled: false, + EnableKeyRotation: true, + Tags: [ + { + Key: 'tag1', + Value: 'value1', + }, + { + Key: 'tag2', + Value: 'value2', + }, + { + Key: 'tag3', + Value: '', + }, + ], + }); +}); + +test('setting trustAccountIdentities to false will throw (when the defaultKeyPolicies feature flag is enabled)', () => { + expect(() => new kms.Key(stack, 'MyKey', { trustAccountIdentities: false })) + .toThrow('`trustAccountIdentities` cannot be false if the @aws-cdk/aws-kms:defaultKeyPolicies feature flag is set'); +}); - const key = new Key(stack, 'MyKey', { +test('addAlias creates an alias', () => { + const key = new kms.Key(stack, 'MyKey', { enableKeyRotation: true, enabled: false, }); @@ -196,10 +336,7 @@ test('addAlias creates an alias', () => { }); test('can run multiple addAlias', () => { - const app = new App(); - const stack = new Stack(app, 'Test'); - - const key = new Key(stack, 'MyKey', { + const key = new kms.Key(stack, 'MyKey', { enableKeyRotation: true, enabled: false, }); @@ -230,97 +367,10 @@ test('can run multiple addAlias', () => { }); }); -test('grant decrypt on a key', () => { - // GIVEN - const stack = new Stack(); - const key = new Key(stack, 'Key'); - const user = new iam.User(stack, 'User'); - - // WHEN - key.grantDecrypt(user); - - // THEN - expect(stack).toHaveResource('AWS::KMS::Key', { - KeyPolicy: { - Statement: [ - // This one is there by default - { - Action: ACTIONS, - Effect: 'Allow', - Principal: { AWS: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::', { Ref: 'AWS::AccountId' }, ':root']] } }, - Resource: '*', - }, - // This is the interesting one - { - Action: 'kms:Decrypt', - Effect: 'Allow', - Principal: { AWS: { 'Fn::GetAtt': ['User00B015A1', 'Arn'] } }, - Resource: '*', - }, - ], - Version: '2012-10-17', - }, - }); - - expect(stack).toHaveResource('AWS::IAM::Policy', { - PolicyDocument: { - Statement: [ - { - Action: 'kms:Decrypt', - Effect: 'Allow', - Resource: { 'Fn::GetAtt': ['Key961B73FD', 'Arn'] }, - }, - ], - Version: '2012-10-17', - }, - }); - -}); - -test('grant for a principal in a dependent stack works correctly', () => { - const app = new App(); - - const principalStack = new Stack(app, 'PrincipalStack'); - const principal = new iam.Role(principalStack, 'Role', { - assumedBy: new iam.AnyPrincipal(), - }); - - const keyStack = new Stack(app, 'KeyStack'); - const key = new Key(keyStack, 'Key'); - - principalStack.addDependency(keyStack); - - key.grantEncrypt(principal); - - expect(keyStack).toHaveResourceLike('AWS::KMS::Key', { - KeyPolicy: { - Statement: [ - { - // owning account management permissions - we don't care about them in this test - }, - { - Action: [ - 'kms:Encrypt', - 'kms:ReEncrypt*', - 'kms:GenerateDataKey*', - ], - Effect: 'Allow', - Principal: { - AWS: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::', { Ref: 'AWS::AccountId' }, ':root']] }, - }, - Resource: '*', - }, - ], - }, - }); - -}); - test('keyId resolves to a Ref', () => { - const stack = new Stack(); - const key = new Key(stack, 'MyKey'); + const key = new kms.Key(stack, 'MyKey'); - new CfnOutput(stack, 'Out', { + new cdk.CfnOutput(stack, 'Out', { value: key.keyId, }); @@ -330,29 +380,8 @@ test('keyId resolves to a Ref', () => { }); }); -test('enablePolicyControl changes key policy to allow IAM control', () => { - const stack = new Stack(); - new Key(stack, 'MyKey', { trustAccountIdentities: true }); - expect(stack).toHaveResourceLike('AWS::KMS::Key', { - KeyPolicy: { - Statement: [ - { - Action: 'kms:*', - Effect: 'Allow', - Principal: { - AWS: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::', { Ref: 'AWS::AccountId' }, ':root']] }, - }, - Resource: '*', - }, - ], - }, - }); -}); - test('fails if key policy has no actions', () => { - const app = new App(); - const stack = new Stack(app, 'my-stack'); - const key = new Key(stack, 'MyKey'); + const key = new kms.Key(stack, 'MyKey'); key.addToResourcePolicy(new iam.PolicyStatement({ resources: ['*'], @@ -363,9 +392,7 @@ test('fails if key policy has no actions', () => { }); test('fails if key policy has no IAM principals', () => { - const app = new App(); - const stack = new Stack(app, 'my-stack'); - const key = new Key(stack, 'MyKey'); + const key = new kms.Key(stack, 'MyKey'); key.addToResourcePolicy(new iam.PolicyStatement({ resources: ['*'], @@ -377,17 +404,15 @@ test('fails if key policy has no IAM principals', () => { describe('imported keys', () => { test('throw an error when providing something that is not a valid key ARN', () => { - const stack = new Stack(); - expect(() => { - Key.fromKeyArn(stack, 'Imported', 'arn:aws:kms:us-east-1:123456789012:key'); + kms.Key.fromKeyArn(stack, 'Imported', 'arn:aws:kms:us-east-1:123456789012:key'); }).toThrow(/KMS key ARN must be in the format 'arn:aws:kms:::key\/', got: 'arn:aws:kms:us-east-1:123456789012:key'/); }); test('can have aliases added to them', () => { - const stack2 = new Stack(); - const myKeyImported = Key.fromKeyArn(stack2, 'MyKeyImported', + const stack2 = new cdk.Stack(app, 'Stack2'); + const myKeyImported = kms.Key.fromKeyArn(stack2, 'MyKeyImported', 'arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012'); // addAlias can be called on imported keys. @@ -407,14 +432,11 @@ describe('imported keys', () => { }, }); }); - }); describe('addToResourcePolicy allowNoOp and there is no policy', () => { test('succeed if set to true (default)', () => { - const stack = new Stack(); - - const key = Key.fromKeyArn(stack, 'Imported', + const key = kms.Key.fromKeyArn(stack, 'Imported', 'arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012'); key.addToResourcePolicy(new iam.PolicyStatement({ resources: ['*'], actions: ['*'] })); @@ -422,9 +444,7 @@ describe('addToResourcePolicy allowNoOp and there is no policy', () => { }); test('fails if set to false', () => { - const stack = new Stack(); - - const key = Key.fromKeyArn(stack, 'Imported', + const key = kms.Key.fromKeyArn(stack, 'Imported', 'arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012'); expect(() => { @@ -433,3 +453,246 @@ describe('addToResourcePolicy allowNoOp and there is no policy', () => { }); }); + +describe('when the defaultKeyPolicies feature flag is disabled', () => { + beforeEach(() => { + app = new cdk.App({ + context: { + '@aws-cdk/aws-kms:defaultKeyPolicies': false, + }, + }); + stack = new cdk.Stack(app); + }); + + test('default key policy', () => { + new kms.Key(stack, 'MyKey'); + + expect(stack).toHaveResource('AWS::KMS::Key', { + Properties: { + KeyPolicy: { + Statement: [ + { + Action: LEGACY_ADMIN_ACTIONS, + Effect: 'Allow', + Principal: { + AWS: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::', { Ref: 'AWS::AccountId' }, ':root']] }, + }, + Resource: '*', + }, + ], + Version: '2012-10-17', + }, + }, + DeletionPolicy: 'Retain', + UpdateReplacePolicy: 'Retain', + }, ResourcePart.CompleteDefinition); + }); + + test('policy if specified appends to the default key policy', () => { + const key = new kms.Key(stack, 'MyKey'); + const p = new iam.PolicyStatement({ resources: ['*'], actions: ['kms:Encrypt'] }); + p.addArnPrincipal('arn:aws:iam::111122223333:root'); + key.addToResourcePolicy(p); + + expect(stack).toMatchTemplate({ + Resources: { + MyKey6AB29FA6: { + Type: 'AWS::KMS::Key', + Properties: { + KeyPolicy: { + Statement: [ + { + Action: LEGACY_ADMIN_ACTIONS, + Effect: 'Allow', + Principal: { + AWS: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::', { Ref: 'AWS::AccountId' }, ':root']] }, + }, + Resource: '*', + }, + { + Action: 'kms:Encrypt', + Effect: 'Allow', + Principal: { + AWS: 'arn:aws:iam::111122223333:root', + }, + Resource: '*', + }, + ], + Version: '2012-10-17', + }, + }, + DeletionPolicy: 'Retain', + UpdateReplacePolicy: 'Retain', + }, + }, + }); + }); + + test('trustAccountIdentities changes key policy to allow IAM control', () => { + new kms.Key(stack, 'MyKey', { trustAccountIdentities: true }); + expect(stack).toHaveResourceLike('AWS::KMS::Key', { + KeyPolicy: { + Statement: [ + { + Action: 'kms:*', + Effect: 'Allow', + Principal: { + AWS: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::', { Ref: 'AWS::AccountId' }, ':root']] }, + }, + Resource: '*', + }, + ], + }, + }); + }); + + test('additional key admins can be specified (with imported/immutable principal)', () => { + const adminRole = iam.Role.fromRoleArn(stack, 'Admin', 'arn:aws:iam::123456789012:role/TrustedAdmin'); + new kms.Key(stack, 'MyKey', { admins: [adminRole] }); + + expect(stack).toHaveResource('AWS::KMS::Key', { + KeyPolicy: { + Statement: [ + { + Action: LEGACY_ADMIN_ACTIONS, + Effect: 'Allow', + Principal: { + AWS: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::', { Ref: 'AWS::AccountId' }, ':root']] }, + }, + Resource: '*', + }, + { + Action: ADMIN_ACTIONS, + Effect: 'Allow', + Principal: { + AWS: 'arn:aws:iam::123456789012:role/TrustedAdmin', + }, + Resource: '*', + }, + ], + Version: '2012-10-17', + }, + }); + }); + + test('additional key admins can be specified (with owned/mutable principal)', () => { + const adminRole = new iam.Role(stack, 'AdminRole', { + assumedBy: new iam.AccountRootPrincipal(), + }); + new kms.Key(stack, 'MyKey', { admins: [adminRole] }); + + expect(stack).toHaveResource('AWS::KMS::Key', { + KeyPolicy: { + Statement: [ + { + Action: LEGACY_ADMIN_ACTIONS, + Effect: 'Allow', + Principal: { + AWS: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::', { Ref: 'AWS::AccountId' }, ':root']] }, + }, + Resource: '*', + }, + { + Action: ADMIN_ACTIONS, + Effect: 'Allow', + Principal: { + AWS: { 'Fn::GetAtt': ['AdminRole38563C57', 'Arn'] }, + }, + Resource: '*', + }, + ], + Version: '2012-10-17', + }, + }); + expect(stack).toHaveResource('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ + { + Action: ADMIN_ACTIONS, + Effect: 'Allow', + Resource: { 'Fn::GetAtt': ['MyKey6AB29FA6', 'Arn'] }, + }, + ], + Version: '2012-10-17', + }, + }); + }); + + describe('grants', () => { + test('grant decrypt on a key', () => { + // GIVEN + const key = new kms.Key(stack, 'Key'); + const user = new iam.User(stack, 'User'); + + // WHEN + key.grantDecrypt(user); + + // THEN + expect(stack).toHaveResource('AWS::KMS::Key', { + KeyPolicy: { + Statement: [ + // This one is there by default + { + Action: LEGACY_ADMIN_ACTIONS, + Effect: 'Allow', + Principal: { AWS: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::', { Ref: 'AWS::AccountId' }, ':root']] } }, + Resource: '*', + }, + // This is the interesting one + { + Action: 'kms:Decrypt', + Effect: 'Allow', + Principal: { AWS: { 'Fn::GetAtt': ['User00B015A1', 'Arn'] } }, + Resource: '*', + }, + ], + Version: '2012-10-17', + }, + }); + + expect(stack).toHaveResource('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ + { + Action: 'kms:Decrypt', + Effect: 'Allow', + Resource: { 'Fn::GetAtt': ['Key961B73FD', 'Arn'] }, + }, + ], + Version: '2012-10-17', + }, + }); + }); + + test('grant for a principal in a dependent stack works correctly', () => { + const principalStack = new cdk.Stack(app, 'PrincipalStack'); + const principal = new iam.Role(principalStack, 'Role', { + assumedBy: new iam.AnyPrincipal(), + }); + + const keyStack = new cdk.Stack(app, 'KeyStack'); + const key = new kms.Key(keyStack, 'Key'); + + principalStack.addDependency(keyStack); + + key.grantEncrypt(principal); + + expect(keyStack).toHaveResourceLike('AWS::KMS::Key', { + KeyPolicy: { + Statement: arrayWith({ + Action: [ + 'kms:Encrypt', + 'kms:ReEncrypt*', + 'kms:GenerateDataKey*', + ], + Effect: 'Allow', + Principal: { + AWS: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::', { Ref: 'AWS::AccountId' }, ':root']] }, + }, + Resource: '*', + }), + }, + }); + }); + }); +}); diff --git a/packages/@aws-cdk/cx-api/lib/features.ts b/packages/@aws-cdk/cx-api/lib/features.ts index 84485ddf3c416..499c8e3438fe8 100644 --- a/packages/@aws-cdk/cx-api/lib/features.ts +++ b/packages/@aws-cdk/cx-api/lib/features.ts @@ -65,6 +65,21 @@ export const DOCKER_IGNORE_SUPPORT = '@aws-cdk/aws-ecr-assets:dockerIgnoreSuppor */ export const SECRETS_MANAGER_PARSE_OWNED_SECRET_NAME = '@aws-cdk/aws-secretsmanager:parseOwnedSecretName'; +/** + * KMS Keys start with a default key policy that grants the account access to administer the key, + * mirroring the behavior of the KMS SDK/CLI/Console experience. Users may override the default key + * policy by specifying their own. + * + * If this flag is not set, the default key policy depends on the setting of the `trustAccountIdentities` + * flag. If false (the default, for backwards-compatibility reasons), the default key policy somewhat + * resemebles the default admin key policy, but with the addition of 'GenerateDataKey' permissions. If + * true, the policy matches what happens when this feature flag is set. + * + * Additionally, if this flag is not set and the user supplies a custom key policy, this will be appended + * to the key's default policy (rather than replacing it). + */ +export const KMS_DEFAULT_KEY_POLICIES = '@aws-cdk/aws-kms:defaultKeyPolicies'; + /** * This map includes context keys and values for feature flags that enable * capabilities "from the future", which we could not introduce as the default @@ -84,6 +99,7 @@ export const FUTURE_FLAGS = { [STACK_RELATIVE_EXPORTS_CONTEXT]: 'true', [DOCKER_IGNORE_SUPPORT]: true, [SECRETS_MANAGER_PARSE_OWNED_SECRET_NAME]: true, + [KMS_DEFAULT_KEY_POLICIES]: true, // We will advertise this flag when the feature is complete // [NEW_STYLE_STACK_SYNTHESIS_CONTEXT]: 'true', @@ -100,6 +116,7 @@ const FUTURE_FLAGS_DEFAULTS: { [key: string]: boolean } = { [NEW_STYLE_STACK_SYNTHESIS_CONTEXT]: false, [DOCKER_IGNORE_SUPPORT]: false, [SECRETS_MANAGER_PARSE_OWNED_SECRET_NAME]: false, + [KMS_DEFAULT_KEY_POLICIES]: false, }; export function futureFlagDefault(flag: string): boolean { From 84c959c1734f308e8c53c7f7e6ca9e6a4f129e7e Mon Sep 17 00:00:00 2001 From: Ayush Goyal Date: Thu, 10 Dec 2020 01:51:42 +0530 Subject: [PATCH 301/314] feat(batch): Log configuration for job definitions (#11771) Ref: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-containerproperties-logconfiguration.html Closes #11218 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-batch/README.md | 19 ++++ .../@aws-cdk/aws-batch/lib/exposed-secret.ts | 40 ++++++++ packages/@aws-cdk/aws-batch/lib/index.ts | 1 + .../@aws-cdk/aws-batch/lib/job-definition.ts | 94 +++++++++++++++++++ packages/@aws-cdk/aws-batch/package.json | 4 + .../aws-batch/test/job-definition.test.ts | 77 +++++++++++++++ 6 files changed, 235 insertions(+) create mode 100644 packages/@aws-cdk/aws-batch/lib/exposed-secret.ts diff --git a/packages/@aws-cdk/aws-batch/README.md b/packages/@aws-cdk/aws-batch/README.md index da6edc3d55998..99ea697ae4f28 100644 --- a/packages/@aws-cdk/aws-batch/README.md +++ b/packages/@aws-cdk/aws-batch/README.md @@ -248,6 +248,25 @@ new batch.JobDefinition(stack, 'batch-job-def-from-local', { }); ``` +### Providing custom log configuration + +You can provide custom log driver and its configuration for the container. + +```ts +new batch.JobDefinition(stack, 'job-def', { + container: { + image: ecs.EcrImage.fromRegistry('docker/whalesay'), + logConfiguration: { + logDriver: batch.LogDriver.AWSLOGS, + options: { 'awslogs-region': 'us-east-1' }, + secretOptions: [ + batch.ExposedSecret.fromParametersStore('xyz', ssm.StringParameter.fromStringParameterName(stack, 'parameter', 'xyz')), + ], + }, + }, +}); +``` + ### Importing an existing Job Definition #### From ARN diff --git a/packages/@aws-cdk/aws-batch/lib/exposed-secret.ts b/packages/@aws-cdk/aws-batch/lib/exposed-secret.ts new file mode 100644 index 0000000000000..351095536add0 --- /dev/null +++ b/packages/@aws-cdk/aws-batch/lib/exposed-secret.ts @@ -0,0 +1,40 @@ +import * as secretsmanager from '@aws-cdk/aws-secretsmanager'; +import * as ssm from '@aws-cdk/aws-ssm'; + +/** + * Exposed secret for log configuration + */ +export class ExposedSecret { + /** + * Use Secrets Manager Secret + * @param optionaName - The name of the option + * @param secret - A secret from secrets manager + */ + public static fromSecretsManager(optionaName: string, secret: secretsmanager.ISecret): ExposedSecret { + return new ExposedSecret(optionaName, secret.secretArn); + } + + /** + * User Parameters Store Parameter + * @param optionaName - The name of the option + * @param parameter - A parameter from parameters store + */ + public static fromParametersStore(optionaName: string, parameter: ssm.IParameter): ExposedSecret { + return new ExposedSecret(optionaName, parameter.parameterArn); + } + + /** + * Name of the option + */ + public optionName: string; + + /** + * ARN of the secret option + */ + public secretArn: string; + + constructor(optionName: string, secretArn: string) { + this.optionName = optionName; + this.secretArn = secretArn; + } +} diff --git a/packages/@aws-cdk/aws-batch/lib/index.ts b/packages/@aws-cdk/aws-batch/lib/index.ts index 251be8901a3ea..5d1e094147107 100644 --- a/packages/@aws-cdk/aws-batch/lib/index.ts +++ b/packages/@aws-cdk/aws-batch/lib/index.ts @@ -1,5 +1,6 @@ // AWS::Batch CloudFormation Resources: export * from './batch.generated'; +export * from './exposed-secret'; export * from './compute-environment'; export * from './job-definition'; export * from './job-queue'; diff --git a/packages/@aws-cdk/aws-batch/lib/job-definition.ts b/packages/@aws-cdk/aws-batch/lib/job-definition.ts index d496dfa6a7c77..88107b0266615 100644 --- a/packages/@aws-cdk/aws-batch/lib/job-definition.ts +++ b/packages/@aws-cdk/aws-batch/lib/job-definition.ts @@ -4,8 +4,79 @@ import * as iam from '@aws-cdk/aws-iam'; import { Duration, IResource, Resource, Stack } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnJobDefinition } from './batch.generated'; +import { ExposedSecret } from './exposed-secret'; import { JobDefinitionImageConfig } from './job-definition-image-config'; +/** + * The log driver to use for the container. + */ +export enum LogDriver { + /** + * Specifies the Amazon CloudWatch Logs logging driver. + */ + AWSLOGS = 'awslogs', + + /** + * Specifies the Fluentd logging driver. + */ + FLUENTD = 'fluentd', + + /** + * Specifies the Graylog Extended Format (GELF) logging driver. + */ + GELF = 'gelf', + + /** + * Specifies the journald logging driver. + */ + JOURNALD = 'journald', + + /** + * Specifies the logentries logging driver. + */ + LOGENTRIES = 'logentries', + + /** + * Specifies the JSON file logging driver. + */ + JSON_FILE = 'json-file', + + /** + * Specifies the Splunk logging driver. + */ + SPLUNK = 'splunk', + + /** + * Specifies the syslog logging driver. + */ + SYSLOG = 'syslog' +} + +/** + * Log configuration options to send to a custom log driver for the container. + */ +export interface LogConfiguration { + /** + * The log driver to use for the container. + */ + readonly logDriver: LogDriver; + + /** + * The configuration options to send to the log driver. + * + * @default - No configuration options are sent + */ + readonly options?: any; + + /** + * The secrets to pass to the log configuration as options. + * For more information, see https://docs.aws.amazon.com/batch/latest/userguide/specifying-sensitive-data-secrets.html#secrets-logconfig + * + * @default - No secrets are passed + */ + readonly secretOptions?: ExposedSecret[]; +} + /** * Properties of a job definition container. */ @@ -55,6 +126,13 @@ export interface JobDefinitionContainer { */ readonly linuxParams?: ecs.LinuxParameters; + /** + * The log configuration specification for the container. + * + * @default - containers use the same logging driver that the Docker daemon uses + */ + readonly logConfiguration?: LogConfiguration; + /** * The hard limit (in MiB) of memory to present to the container. If your container attempts to exceed * the memory specified here, the container is killed. You must specify at least 4 MiB of memory for a job. @@ -362,6 +440,13 @@ export class JobDefinition extends Resource implements IJobDefinition { linuxParameters: container.linuxParams ? { devices: container.linuxParams.renderLinuxParameters().devices } : undefined, + logConfiguration: container.logConfiguration ? { + logDriver: container.logConfiguration.logDriver, + options: container.logConfiguration.options, + secretOptions: container.logConfiguration.secretOptions + ? this.buildLogConfigurationSecretOptions(container.logConfiguration.secretOptions) + : undefined, + } : undefined, memory: container.memoryLimitMiB || 4, mountPoints: container.mountPoints, privileged: container.privileged || false, @@ -388,4 +473,13 @@ export class JobDefinition extends Resource implements IJobDefinition { return rangeProps; } + + private buildLogConfigurationSecretOptions(secretOptions: ExposedSecret[]): CfnJobDefinition.SecretProperty[] { + return secretOptions.map(secretOption => { + return { + name: secretOption.optionName, + valueFrom: secretOption.secretArn, + }; + }); + } } diff --git a/packages/@aws-cdk/aws-batch/package.json b/packages/@aws-cdk/aws-batch/package.json index 042c700c214d7..ace4bf6d5fa51 100644 --- a/packages/@aws-cdk/aws-batch/package.json +++ b/packages/@aws-cdk/aws-batch/package.json @@ -86,6 +86,8 @@ "@aws-cdk/aws-ecr": "0.0.0", "@aws-cdk/aws-ecs": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", + "@aws-cdk/aws-secretsmanager": "0.0.0", + "@aws-cdk/aws-ssm": "0.0.0", "constructs": "^3.2.0" }, "homepage": "https://github.com/aws/aws-cdk", @@ -95,6 +97,8 @@ "@aws-cdk/aws-ecr": "0.0.0", "@aws-cdk/aws-ecs": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", + "@aws-cdk/aws-secretsmanager": "0.0.0", + "@aws-cdk/aws-ssm": "0.0.0", "constructs": "^3.2.0" }, "engines": { diff --git a/packages/@aws-cdk/aws-batch/test/job-definition.test.ts b/packages/@aws-cdk/aws-batch/test/job-definition.test.ts index 71129c4906c9e..d7d1b6fbf11b7 100644 --- a/packages/@aws-cdk/aws-batch/test/job-definition.test.ts +++ b/packages/@aws-cdk/aws-batch/test/job-definition.test.ts @@ -4,6 +4,8 @@ import * as ec2 from '@aws-cdk/aws-ec2'; import * as ecr from '@aws-cdk/aws-ecr'; import * as ecs from '@aws-cdk/aws-ecs'; import * as iam from '@aws-cdk/aws-iam'; +import * as secretsmanager from '@aws-cdk/aws-secretsmanager'; +import * as ssm from '@aws-cdk/aws-ssm'; import * as cdk from '@aws-cdk/core'; import * as batch from '../lib'; @@ -23,6 +25,11 @@ describe('Batch Job Definition', () => { sharedMemorySize: 1, }); + const logConfiguration: batch.LogConfiguration = { + logDriver: batch.LogDriver.AWSLOGS, + options: { 'awslogs-region': 'us-east-1' }, + }; + jobDefProps = { jobDefinitionName: 'test-job', container: { @@ -35,6 +42,7 @@ describe('Batch Job Definition', () => { image: ecs.EcrImage.fromRegistry('docker/whalesay'), instanceType: ec2.InstanceType.of(ec2.InstanceClass.T2, ec2.InstanceSize.MICRO), linuxParams, + logConfiguration, memoryLimitMiB: 1, mountPoints: new Array(), privileged: true, @@ -74,6 +82,12 @@ describe('Batch Job Definition', () => { ], InstanceType: jobDefProps.container.instanceType ? jobDefProps.container.instanceType.toString() : '', LinuxParameters: {}, + LogConfiguration: { + LogDriver: 'awslogs', + Options: { + 'awslogs-region': 'us-east-1', + }, + }, Memory: jobDefProps.container.memoryLimitMiB, MountPoints: [], Privileged: jobDefProps.container.privileged, @@ -210,4 +224,67 @@ describe('Batch Job Definition', () => { expect(importedJob.jobDefinitionArn) .toEqual('arn:${Token[AWS.Partition.3]}:batch:${Token[AWS.Region.4]}:${Token[AWS.AccountId.0]}:job-definition/job-def-name'); }); + + test('can configure log configuration secrets properly', () => { + // GIVEN + const secretArn = 'arn:aws:secretsmanager:eu-west-1:111111111111:secret:MySecret-f3gDy9'; + + const logConfiguration: batch.LogConfiguration = { + logDriver: batch.LogDriver.AWSLOGS, + options: { 'awslogs-region': 'us-east-1' }, + secretOptions: [ + batch.ExposedSecret.fromSecretsManager('abc', secretsmanager.Secret.fromSecretCompleteArn(stack, 'secret', secretArn)), + batch.ExposedSecret.fromParametersStore('xyz', ssm.StringParameter.fromStringParameterName(stack, 'parameter', 'xyz')), + ], + }; + + // WHEN + new batch.JobDefinition(stack, 'job-def', { + container: { + image: ecs.EcrImage.fromRegistry('docker/whalesay'), + logConfiguration, + }, + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::Batch::JobDefinition', { + ContainerProperties: { + LogConfiguration: { + LogDriver: 'awslogs', + Options: { + 'awslogs-region': 'us-east-1', + }, + SecretOptions: [ + { + Name: 'abc', + ValueFrom: secretArn, + }, + { + Name: 'xyz', + ValueFrom: { + 'Fn::Join': [ + '', + [ + 'arn:', + { + Ref: 'AWS::Partition', + }, + ':ssm:', + { + Ref: 'AWS::Region', + }, + ':', + { + Ref: 'AWS::AccountId', + }, + ':parameter/xyz', + ], + ], + }, + }, + ], + }, + }, + }, ResourcePart.Properties); + }); }); From e328f22e7daa5fb5ea3de9fb26828314131e8a57 Mon Sep 17 00:00:00 2001 From: tmokmss Date: Thu, 10 Dec 2020 08:49:05 +0900 Subject: [PATCH 302/314] fix(ecs): cannot disable container insights of an ECS cluster (#9151) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes #9149 The clusterSettings should be explicitly defined even when container insights is disabled, because CFn doesn't allow to remove the existing settings (as described in the issue.) By this change, users who sets `containerInsights` prop `false` will see a diff like below, but it won't be a problem because by default container insights is disabled hence no actual change to existing resources: ``` Resources [~] AWS::ECS::Cluster cluster cluster611F8AFF └─ [+] ClusterSettings └─ [{"Name":"containerInsights","Value":"disabled"}] ``` To prevent the existing tests from failing, the clusterSettings is only defined when `containerInsight` prop is explicitly defined(i.e. `true` or `false`, not `undefined`.) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-ecs/lib/cluster.ts | 6 +++-- .../@aws-cdk/aws-ecs/test/test.ecs-cluster.ts | 22 ++++++++++++++++++- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/aws-ecs/lib/cluster.ts b/packages/@aws-cdk/aws-ecs/lib/cluster.ts index 1ae92f0abd4fc..4108002c2a1fb 100644 --- a/packages/@aws-cdk/aws-ecs/lib/cluster.ts +++ b/packages/@aws-cdk/aws-ecs/lib/cluster.ts @@ -124,8 +124,10 @@ export class Cluster extends Resource implements ICluster { physicalName: props.clusterName, }); - const containerInsights = props.containerInsights !== undefined ? props.containerInsights : false; - const clusterSettings = containerInsights ? [{ name: 'containerInsights', value: 'enabled' }] : undefined; + let clusterSettings = undefined; + if (props.containerInsights !== undefined) { + clusterSettings = [{ name: 'containerInsights', value: props.containerInsights ? 'enabled' : 'disabled' }]; + } const cluster = new CfnCluster(this, 'Resource', { clusterName: this.physicalName, diff --git a/packages/@aws-cdk/aws-ecs/test/test.ecs-cluster.ts b/packages/@aws-cdk/aws-ecs/test/test.ecs-cluster.ts index 146c5a908c074..4cf4667663949 100644 --- a/packages/@aws-cdk/aws-ecs/test/test.ecs-cluster.ts +++ b/packages/@aws-cdk/aws-ecs/test/test.ecs-cluster.ts @@ -1457,7 +1457,27 @@ export = { test.done(); }, - 'default container insights undefined'(test: Test) { + 'disable container insights'(test: Test) { + // GIVEN + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'test'); + + new ecs.Cluster(stack, 'EcsCluster', { containerInsights: false }); + + // THEN + expect(stack).to(haveResource('AWS::ECS::Cluster', { + ClusterSettings: [ + { + Name: 'containerInsights', + Value: 'disabled', + }, + ], + }, ResourcePart.Properties)); + + test.done(); + }, + + 'default container insights is disabled'(test: Test) { // GIVEN const app = new cdk.App(); const stack = new cdk.Stack(app, 'test'); From ac66fc7247e4f5ffdd6f4655d9113731165365d0 Mon Sep 17 00:00:00 2001 From: Hsing-Hui Hsu Date: Wed, 9 Dec 2020 17:34:22 -0800 Subject: [PATCH 303/314] chore(ecs): constantize containerInsights setting (#11971) Also fixes unit test name for default setting Extension of https://github.com/aws/aws-cdk/pull/9151 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-ecs/lib/cluster.ts | 20 ++++++++++++++++++- .../@aws-cdk/aws-ecs/test/test.ecs-cluster.ts | 3 ++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-ecs/lib/cluster.ts b/packages/@aws-cdk/aws-ecs/lib/cluster.ts index 4108002c2a1fb..ae3b3d0a6c163 100644 --- a/packages/@aws-cdk/aws-ecs/lib/cluster.ts +++ b/packages/@aws-cdk/aws-ecs/lib/cluster.ts @@ -124,9 +124,14 @@ export class Cluster extends Resource implements ICluster { physicalName: props.clusterName, }); + /** + * clusterSettings needs to be undefined if containerInsights is not explicitly set in order to allow any + * containerInsights settings on the account to apply. See: + * https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-clustersettings.html#cfn-ecs-cluster-clustersettings-value + */ let clusterSettings = undefined; if (props.containerInsights !== undefined) { - clusterSettings = [{ name: 'containerInsights', value: props.containerInsights ? 'enabled' : 'disabled' }]; + clusterSettings = [{ name: 'containerInsights', value: props.containerInsights ? ContainerInsights.ENABLED : ContainerInsights.DISABLED }]; } const cluster = new CfnCluster(this, 'Resource', { @@ -885,3 +890,16 @@ export enum AmiHardwareType { */ ARM = 'ARM64', } + +enum ContainerInsights { + /** + * Enable CloudWatch Container Insights for the cluster + */ + + ENABLED = 'enabled', + + /** + * Disable CloudWatch Container Insights for the cluster + */ + DISABLED = 'disabled', +} diff --git a/packages/@aws-cdk/aws-ecs/test/test.ecs-cluster.ts b/packages/@aws-cdk/aws-ecs/test/test.ecs-cluster.ts index 4cf4667663949..cbccd0683dd0d 100644 --- a/packages/@aws-cdk/aws-ecs/test/test.ecs-cluster.ts +++ b/packages/@aws-cdk/aws-ecs/test/test.ecs-cluster.ts @@ -1477,7 +1477,7 @@ export = { test.done(); }, - 'default container insights is disabled'(test: Test) { + 'default container insights is undefined'(test: Test) { // GIVEN const app = new cdk.App(); const stack = new cdk.Stack(app, 'test'); @@ -1498,6 +1498,7 @@ export = { test.done(); }, + 'BottleRocketImage() returns correct AMI'(test: Test) { // GIVEN const app = new cdk.App(); From f75c264df04f7250a4ec4692b6e8a7105d62e535 Mon Sep 17 00:00:00 2001 From: Dominic Fezzie Date: Thu, 10 Dec 2020 00:27:13 -0800 Subject: [PATCH 304/314] feat(appmesh): change Virtual Node service discovery to a union-like class (#11926) Addresses part of the conversation on https://github.com/aws/aws-cdk/issues/9490 BREAKING CHANGE: the properties `dnsHostName` and `awsCloudMap` of `VirtualNodeProps` have been replaced with the property `serviceDiscovery` ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../lib/extensions/appmesh.ts | 6 +- packages/@aws-cdk/aws-appmesh/README.md | 16 ++- packages/@aws-cdk/aws-appmesh/lib/index.ts | 1 + .../aws-appmesh/lib/service-discovery.ts | 110 ++++++++++++++++++ .../@aws-cdk/aws-appmesh/lib/virtual-node.ts | 41 ++----- .../@aws-cdk/aws-appmesh/test/integ.mesh.ts | 6 +- .../aws-appmesh/test/test.health-check.ts | 2 +- .../@aws-cdk/aws-appmesh/test/test.mesh.ts | 16 +-- .../@aws-cdk/aws-appmesh/test/test.route.ts | 4 +- .../aws-appmesh/test/test.virtual-node.ts | 14 +-- .../aws-appmesh/test/test.virtual-router.ts | 10 +- 11 files changed, 161 insertions(+), 65 deletions(-) create mode 100644 packages/@aws-cdk/aws-appmesh/lib/service-discovery.ts diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts index 1c17ed4628181..65f77a81c9fac 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts +++ b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/appmesh.ts @@ -279,7 +279,11 @@ export class AppMeshExtension extends ServiceExtension { this.virtualNode = new appmesh.VirtualNode(this.scope, `${this.parentService.id}-virtual-node`, { mesh: this.mesh, virtualNodeName: this.parentService.id, - cloudMapService: service.cloudMapService, + serviceDiscovery: service.cloudMapService + ? appmesh.ServiceDiscovery.cloudMap({ + service: service.cloudMapService, + }) + : undefined, listeners: [addListener(this.protocol, containerextension.trafficPort)], }); diff --git a/packages/@aws-cdk/aws-appmesh/README.md b/packages/@aws-cdk/aws-appmesh/README.md index 4b38e150a042e..0b736380de817 100644 --- a/packages/@aws-cdk/aws-appmesh/README.md +++ b/packages/@aws-cdk/aws-appmesh/README.md @@ -130,7 +130,7 @@ mesh.addVirtualService('virtual-service', { A `virtual node` acts as a logical pointer to a particular task group, such as an Amazon ECS service or a Kubernetes deployment. -When you create a `virtual node`, you must specify the DNS service discovery hostname for your task group. Any inbound traffic that your `virtual node` expects should be specified as a listener. Any outbound traffic that your `virtual node` expects to reach should be specified as a backend. +When you create a `virtual node`, any inbound traffic that your `virtual node` expects should be specified as a listener. Any outbound traffic that your `virtual node` expects to reach should be specified as a backend. The response metadata for your new `virtual node` contains the Amazon Resource Name (ARN) that is associated with the `virtual node`. Set this value (either the full ARN or the truncated resource name) as the APPMESH_VIRTUAL_NODE_NAME environment variable for your task group's Envoy proxy container in your task definition or pod spec. For example, the value could be mesh/default/virtualNode/simpleapp. This is then mapped to the node.id and node.cluster Envoy parameters. @@ -146,7 +146,9 @@ const namespace = new servicediscovery.PrivateDnsNamespace(this, 'test-namespace const service = namespace.createService('Svc'); const node = mesh.addVirtualNode('virtual-node', { - cloudMapService: service, + serviceDiscovery: appmesh.ServiceDiscovery.cloudMap({ + service: service, + }), listeners: [appmesh.VirtualNodeListener.httpNodeListener({ port: 8081, healthCheck: { @@ -168,7 +170,9 @@ Create a `VirtualNode` with the constructor and add tags. ```ts const node = new VirtualNode(this, 'node', { mesh, - cloudMapService: service, + serviceDiscovery: appmesh.ServiceDiscovery.cloudMap({ + service: service, + }), listeners: [appmesh.VirtualNodeListener.httpNodeListener({ port: 8080, healthCheck: { @@ -198,7 +202,9 @@ Create a `VirtualNode` with the constructor and add backend virtual service. ```ts const node = new VirtualNode(this, 'node', { mesh, - cloudMapService: service, + serviceDiscovery: appmesh.ServiceDiscovery.cloudMap({ + service: service, + }), listeners: [appmesh.VirtualNodeListener.httpNodeListener({ port: 8080, healthCheck: { @@ -218,7 +224,7 @@ const node = new VirtualNode(this, 'node', { }); const virtualService = new appmesh.VirtualService(stack, 'service-1', { - virtualServiceName: 'service1.domain.local', + serviceDiscovery: appmesh.ServiceDiscovery.dns('service1.domain.local'), mesh, clientPolicy: appmesh.ClientPolicy.fileTrust({ certificateChain: '/keys/local_cert_chain.pem', diff --git a/packages/@aws-cdk/aws-appmesh/lib/index.ts b/packages/@aws-cdk/aws-appmesh/lib/index.ts index f9e4b6a07ff36..a10ef54aa977b 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/index.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/index.ts @@ -2,6 +2,7 @@ export * from './appmesh.generated'; export * from './mesh'; export * from './route'; +export * from './service-discovery'; export * from './route-spec'; export * from './shared-interfaces'; export * from './virtual-node'; diff --git a/packages/@aws-cdk/aws-appmesh/lib/service-discovery.ts b/packages/@aws-cdk/aws-appmesh/lib/service-discovery.ts new file mode 100644 index 0000000000000..b5fca6525c851 --- /dev/null +++ b/packages/@aws-cdk/aws-appmesh/lib/service-discovery.ts @@ -0,0 +1,110 @@ +import * as cloudmap from '@aws-cdk/aws-servicediscovery'; +import * as cdk from '@aws-cdk/core'; +import { CfnVirtualNode } from './appmesh.generated'; + + +/** + * Represents the properties needed to define CloudMap Service Discovery + */ +export interface CloudMapServiceDiscoveryOptions { + /** + * The AWS Cloud Map Service to use for service discovery + */ + readonly service: cloudmap.IService; + + /** + * A string map that contains attributes with values that you can use to + * filter instances by any custom attribute that you specified when you + * registered the instance. Only instances that match all of the specified + * key/value pairs will be returned. + * + * @default - no instance attributes + */ + readonly instanceAttributes?: {[key: string]: string}; +} + +/** + * Properties for VirtualNode Service Discovery + */ +export interface ServiceDiscoveryConfig { + /** + * DNS based Service Discovery + * + * @default - no DNS based service discovery + */ + readonly dns?: CfnVirtualNode.DnsServiceDiscoveryProperty; + + /** + * Cloud Map based Service Discovery + * + * @default - no Cloud Map based service discovery + */ + readonly cloudmap?: CfnVirtualNode.AwsCloudMapServiceDiscoveryProperty; +} + +/** + * Provides the Service Discovery method a VirtualNode uses + */ +export abstract class ServiceDiscovery { + /** + * Returns DNS based service discovery + */ + public static dns(hostname: string): ServiceDiscovery { + return new DnsServiceDiscovery(hostname); + } + + /** + * Returns Cloud Map based service discovery + */ + public static cloudMap(options: CloudMapServiceDiscoveryOptions): ServiceDiscovery { + return new CloudMapServiceDiscovery(options); + } + + /** + * Binds the current object when adding Service Discovery to a VirtualNode + */ + public abstract bind(scope: cdk.Construct): ServiceDiscoveryConfig; +} + +class DnsServiceDiscovery extends ServiceDiscovery { + private readonly hostname: string; + + constructor(hostname: string) { + super(); + this.hostname = hostname; + } + + public bind(_scope: cdk.Construct): ServiceDiscoveryConfig { + return { + dns: { + hostname: this.hostname, + }, + }; + } +} + +class CloudMapServiceDiscovery extends ServiceDiscovery { + private readonly service: cloudmap.IService; + private readonly instanceAttributes?: {[key: string]: string}; + + constructor(options: CloudMapServiceDiscoveryOptions) { + super(); + this.service = options.service; + this.instanceAttributes = options.instanceAttributes; + } + + public bind(_scope: cdk.Construct): ServiceDiscoveryConfig { + return { + cloudmap: { + namespaceName: this.service.namespace.namespaceName, + serviceName: this.service.serviceName, + attributes: renderAttributes(this.instanceAttributes), + }, + }; + } +} + +function renderAttributes(attrs?: {[key: string]: string}) { + if (attrs === undefined) { return undefined; } + return Object.entries(attrs).map(([key, value]) => ({ key, value })); +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts index f092b85caa0e2..2cf56c74631a2 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts @@ -1,9 +1,9 @@ -import * as cloudmap from '@aws-cdk/aws-servicediscovery'; import * as cdk from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnVirtualNode } from './appmesh.generated'; import { ClientPolicy } from './client-policy'; import { IMesh, Mesh } from './mesh'; +import { ServiceDiscovery } from './service-discovery'; import { AccessLog } from './shared-interfaces'; import { VirtualNodeListener, VirtualNodeListenerConfig } from './virtual-node-listener'; import { IVirtualService } from './virtual-service'; @@ -48,32 +48,13 @@ export interface VirtualNodeBaseProps { */ readonly virtualNodeName?: string; - /** - * Host name of DNS record used to discover Virtual Node members - * - * The IP addresses returned by querying this DNS record will be considered - * part of the Virtual Node. - * - * @default - Don't use DNS-based service discovery - */ - readonly dnsHostName?: string; /** - * CloudMap service where Virtual Node members register themselves - * - * Instances registering themselves into this CloudMap will - * be considered part of the Virtual Node. + * Defines how upstream clients will discover this VirtualNode * - * @default - Don't use CloudMap-based service discovery + * @default - No Service Discovery */ - readonly cloudMapService?: cloudmap.IService; - - /** - * Filter down the list of CloudMap service instance - * - * @default - No CloudMap instance filter - */ - readonly cloudMapServiceInstanceAttributes?: {[key: string]: string}; + readonly serviceDiscovery?: ServiceDiscovery; /** * Virtual Services that this is node expected to send outbound traffic to @@ -196,6 +177,7 @@ export class VirtualNode extends VirtualNodeBase { props.backends?.forEach(backend => this.addBackend(backend)); props.listeners?.forEach(listener => this.addListener(listener)); const accessLogging = props.accessLog?.bind(this); + const serviceDiscovery = props.serviceDiscovery?.bind(this); const node = new CfnVirtualNode(this, 'Resource', { virtualNodeName: this.physicalName, @@ -205,12 +187,8 @@ export class VirtualNode extends VirtualNodeBase { listeners: cdk.Lazy.anyValue({ produce: () => this.listeners.map(listener => listener.listener) }, { omitEmptyArray: true }), backendDefaults: props.backendsDefaultClientPolicy?.bind(this), serviceDiscovery: { - dns: props.dnsHostName !== undefined ? { hostname: props.dnsHostName } : undefined, - awsCloudMap: props.cloudMapService !== undefined ? { - serviceName: props.cloudMapService.serviceName, - namespaceName: props.cloudMapService.namespace.namespaceName, - attributes: renderAttributes(props.cloudMapServiceInstanceAttributes), - } : undefined, + dns: serviceDiscovery?.dns, + awsCloudMap: serviceDiscovery?.cloudmap, }, logging: accessLogging !== undefined ? { accessLog: accessLogging.virtualNodeAccessLog, @@ -246,11 +224,6 @@ export class VirtualNode extends VirtualNodeBase { } } -function renderAttributes(attrs?: {[key: string]: string}) { - if (attrs === undefined) { return undefined; } - return Object.entries(attrs).map(([key, value]) => ({ key, value })); -} - /** * Interface with properties necessary to import a reusable VirtualNode */ diff --git a/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts b/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts index 63e027b8ef0e5..6790f4c749316 100644 --- a/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts +++ b/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts @@ -30,7 +30,7 @@ const virtualService = mesh.addVirtualService('service', { }); const node = mesh.addVirtualNode('node', { - dnsHostName: `node1.${namespace.namespaceName}`, + serviceDiscovery: appmesh.ServiceDiscovery.dns(`node1.${namespace.namespaceName}`), listeners: [appmesh.VirtualNodeListener.http({ healthCheck: { healthyThreshold: 3, @@ -65,7 +65,7 @@ router.addRoute('route-1', { const certificateAuthorityArn = 'arn:aws:acm-pca:us-east-1:123456789012:certificate-authority/12345678-1234-1234-1234-123456789012'; const node2 = mesh.addVirtualNode('node2', { - dnsHostName: `node2.${namespace.namespaceName}`, + serviceDiscovery: appmesh.ServiceDiscovery.dns(`node2.${namespace.namespaceName}`), listeners: [appmesh.VirtualNodeListener.http({ healthCheck: { healthyThreshold: 3, @@ -89,7 +89,7 @@ const node2 = mesh.addVirtualNode('node2', { }); const node3 = mesh.addVirtualNode('node3', { - dnsHostName: `node3.${namespace.namespaceName}`, + serviceDiscovery: appmesh.ServiceDiscovery.dns(`node3.${namespace.namespaceName}`), listeners: [appmesh.VirtualNodeListener.http({ healthCheck: { healthyThreshold: 3, diff --git a/packages/@aws-cdk/aws-appmesh/test/test.health-check.ts b/packages/@aws-cdk/aws-appmesh/test/test.health-check.ts index d65177a124b70..7eec2b6d450b9 100644 --- a/packages/@aws-cdk/aws-appmesh/test/test.health-check.ts +++ b/packages/@aws-cdk/aws-appmesh/test/test.health-check.ts @@ -9,7 +9,7 @@ const getNode = (stack: cdk.Stack) => { meshName: 'test-mesh', }); return mesh.addVirtualNode(`virtual-node-${idCounter}`, { - dnsHostName: 'test-node', + serviceDiscovery: appmesh.ServiceDiscovery.dns('test-node'), }); }; diff --git a/packages/@aws-cdk/aws-appmesh/test/test.mesh.ts b/packages/@aws-cdk/aws-appmesh/test/test.mesh.ts index 1f67c708e561a..c6d2fbfbbb294 100644 --- a/packages/@aws-cdk/aws-appmesh/test/test.mesh.ts +++ b/packages/@aws-cdk/aws-appmesh/test/test.mesh.ts @@ -105,7 +105,9 @@ export = { // WHEN new appmesh.VirtualNode(stack, 'test-node', { mesh, - cloudMapService: service, + serviceDiscovery: appmesh.ServiceDiscovery.cloudMap({ + service: service, + }), }); // THEN @@ -136,7 +138,7 @@ export = { const testNode = new appmesh.VirtualNode(stack, 'test-node', { mesh, - dnsHostName: 'test-node', + serviceDiscovery: appmesh.ServiceDiscovery.dns('test-node'), }); const testRouter = mesh.addVirtualRouter('router', { @@ -207,7 +209,7 @@ export = { }); const node = mesh.addVirtualNode('test-node', { - dnsHostName: 'test.domain.local', + serviceDiscovery: appmesh.ServiceDiscovery.dns('test.domain.local'), listeners: [appmesh.VirtualNodeListener.http({ port: 8080, })], @@ -249,7 +251,7 @@ export = { }); mesh.addVirtualNode('test-node', { - dnsHostName: 'test.domain.local', + serviceDiscovery: appmesh.ServiceDiscovery.dns('test.domain.local'), }); // THEN @@ -283,7 +285,7 @@ export = { }); mesh.addVirtualNode('test-node', { - dnsHostName: 'test.domain.local', + serviceDiscovery: appmesh.ServiceDiscovery.dns('test.domain.local'), listeners: [appmesh.VirtualNodeListener.http({ port: 8080, })], @@ -322,7 +324,7 @@ export = { }); mesh.addVirtualNode('test-node', { - dnsHostName: 'test.domain.local', + serviceDiscovery: appmesh.ServiceDiscovery.dns('test.domain.local'), listeners: [appmesh.VirtualNodeListener.http({ port: 8080, healthCheck: { @@ -378,7 +380,7 @@ export = { }); mesh.addVirtualNode('test-node', { - dnsHostName: 'test.domain.local', + serviceDiscovery: appmesh.ServiceDiscovery.dns('test.domain.local'), listeners: [appmesh.VirtualNodeListener.http({ port: 8080, })], diff --git a/packages/@aws-cdk/aws-appmesh/test/test.route.ts b/packages/@aws-cdk/aws-appmesh/test/test.route.ts index c3b6bab0357cb..2fd03f907f236 100644 --- a/packages/@aws-cdk/aws-appmesh/test/test.route.ts +++ b/packages/@aws-cdk/aws-appmesh/test/test.route.ts @@ -18,7 +18,7 @@ export = { // WHEN const node = mesh.addVirtualNode('test-node', { - dnsHostName: 'test', + serviceDiscovery: appmesh.ServiceDiscovery.dns('test'), listeners: [appmesh.VirtualNodeListener.http()], }); @@ -174,7 +174,7 @@ export = { // WHEN const node = mesh.addVirtualNode('test-node', { - dnsHostName: 'test', + serviceDiscovery: appmesh.ServiceDiscovery.dns('test'), listeners: [appmesh.VirtualNodeListener.http()], }); diff --git a/packages/@aws-cdk/aws-appmesh/test/test.virtual-node.ts b/packages/@aws-cdk/aws-appmesh/test/test.virtual-node.ts index 739b34476331c..ffc7e60107ba1 100644 --- a/packages/@aws-cdk/aws-appmesh/test/test.virtual-node.ts +++ b/packages/@aws-cdk/aws-appmesh/test/test.virtual-node.ts @@ -27,7 +27,7 @@ export = { const node = new appmesh.VirtualNode(stack, 'test-node', { mesh, - dnsHostName: 'test', + serviceDiscovery: appmesh.ServiceDiscovery.dns('test'), backends: [service1], }); @@ -70,7 +70,7 @@ export = { }); const node = mesh.addVirtualNode('test-node', { - dnsHostName: 'test', + serviceDiscovery: appmesh.ServiceDiscovery.dns('test'), }); node.addListener(appmesh.VirtualNodeListener.tcp({ @@ -107,7 +107,7 @@ export = { new appmesh.VirtualNode(stack, 'test-node', { mesh, - dnsHostName: 'test', + serviceDiscovery: appmesh.ServiceDiscovery.dns('test'), listeners: [appmesh.VirtualNodeListener.grpc({ port: 80, timeout: { @@ -159,7 +159,7 @@ export = { new appmesh.VirtualNode(stack, 'test-node', { mesh, - dnsHostName: 'test', + serviceDiscovery: appmesh.ServiceDiscovery.dns('test'), listeners: [appmesh.VirtualNodeListener.http2({ port: 80, healthCheck: {}, @@ -213,7 +213,7 @@ export = { const node = new appmesh.VirtualNode(stack, 'test-node', { mesh, - dnsHostName: 'test', + serviceDiscovery: appmesh.ServiceDiscovery.dns('test'), }); node.addListener(appmesh.VirtualNodeListener.tcp({ @@ -270,7 +270,7 @@ export = { new appmesh.VirtualNode(stack, 'test-node', { mesh, - dnsHostName: 'test', + serviceDiscovery: appmesh.ServiceDiscovery.dns('test'), backendsDefaultClientPolicy: appmesh.ClientPolicy.acmTrust({ certificateAuthorities: [acmpca.CertificateAuthority.fromCertificateAuthorityArn(stack, 'certificate', certificateAuthorityArn)], ports: [8080, 8081], @@ -313,7 +313,7 @@ export = { const node = new appmesh.VirtualNode(stack, 'test-node', { mesh, - dnsHostName: 'test', + serviceDiscovery: appmesh.ServiceDiscovery.dns('test'), }); const service1 = new appmesh.VirtualService(stack, 'service-1', { diff --git a/packages/@aws-cdk/aws-appmesh/test/test.virtual-router.ts b/packages/@aws-cdk/aws-appmesh/test/test.virtual-router.ts index 671ffb8aa61ae..aafe3dff8ce7f 100644 --- a/packages/@aws-cdk/aws-appmesh/test/test.virtual-router.ts +++ b/packages/@aws-cdk/aws-appmesh/test/test.virtual-router.ts @@ -105,7 +105,7 @@ export = { }); const node = mesh.addVirtualNode('test-node', { - dnsHostName: 'test', + serviceDiscovery: appmesh.ServiceDiscovery.dns('test'), listeners: [appmesh.VirtualNodeListener.http({ port: 8080, })], @@ -178,7 +178,7 @@ export = { }); const node = mesh.addVirtualNode('test-node', { - dnsHostName: 'test', + serviceDiscovery: appmesh.ServiceDiscovery.dns('test'), listeners: [appmesh.VirtualNodeListener.http({ port: 8080, })], @@ -187,7 +187,7 @@ export = { ], }); const node2 = mesh.addVirtualNode('test-node2', { - dnsHostName: 'test', + serviceDiscovery: appmesh.ServiceDiscovery.dns('test'), listeners: [appmesh.VirtualNodeListener.http({ port: 8080, })], @@ -196,7 +196,7 @@ export = { ], }); const node3 = mesh.addVirtualNode('test-node3', { - dnsHostName: 'test', + serviceDiscovery: appmesh.ServiceDiscovery.dns('test'), listeners: [appmesh.VirtualNodeListener.http({ port: 8080, })], @@ -336,7 +336,7 @@ export = { }); const node = mesh.addVirtualNode('test-node', { - dnsHostName: 'test', + serviceDiscovery: appmesh.ServiceDiscovery.dns('test'), listeners: [appmesh.VirtualNodeListener.http({ port: 8080, })], From ca88fa5c27ed4c8ca6dfb50b29b7b478992a7a01 Mon Sep 17 00:00:00 2001 From: Jonathan Goldwasser Date: Thu, 10 Dec 2020 10:51:42 +0100 Subject: [PATCH 305/314] chore(lambda-nodejs): reorganize and improve README (#11982) Reorder sections: move the most useful ones closer to the top. Improve native modules with `forceDockerBundling` instructions. Various tiny improvements. Closes #11439 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-lambda-nodejs/README.md | 166 +++++++++--------- 1 file changed, 87 insertions(+), 79 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda-nodejs/README.md b/packages/@aws-cdk/aws-lambda-nodejs/README.md index 66e1a4bcbbcd0..1a84a58440f6c 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/README.md +++ b/packages/@aws-cdk/aws-lambda-nodejs/README.md @@ -52,46 +52,6 @@ All other properties of `lambda.Function` are supported, see also the [AWS Lambd The `NodejsFunction` construct automatically [reuses existing connections](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/node-reusing-connections.html) when working with the AWS SDK for JavaScript. Set the `awsSdkConnectionReuse` prop to `false` to disable it. -Use the `environment` prop under `bundling` to define environments variables when esbuild runs: - -```ts -new lambda.NodejsFunction(this, 'my-handler', { - bundling: { - environment: { - NODE_ENV: 'production', - }, - }, -}); -``` - -Use the `buildArgs` under `bundling` prop to pass build arguments when building the bundling image: - -```ts -new lambda.NodejsFunction(this, 'my-handler', { - bundling: { - buildArgs: { - HTTPS_PROXY: 'https://127.0.0.1:3001', - }, - } -}); -``` - -Use the `dockerImage` prop under `bundling` to use a custom bundling image: - -```ts -new lambda.NodejsFunction(this, 'my-handler', { - bundling: { - dockerImage: cdk.BundlingDockerImage.fromAsset('/path/to/Dockerfile'), - }, -}); -``` - -This image should have esbuild installed globally. If you plan to use `nodeModules` it -should also have `npm` or `yarn` depending on the lock file you're using. - -Use the [default image provided by `@aws-cdk/aws-lambda-nodejs`](https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-lambda-nodejs/lib/Dockerfile) -as a source of inspiration. - ## Lock file The `NodejsFunction` requires a dependencies lock file (`yarn.lock` or @@ -99,34 +59,41 @@ The `NodejsFunction` requires a dependencies lock file (`yarn.lock` or lock file is used as the source (`/asset-input`) for the volume mounted in the container. -By default, it will try to automatically determine your project lock file. +By default, the construct will try to automatically determine your project lock file. Alternatively, you can specify the `depsLockFilePath` prop manually. In this case you need to ensure that this path includes `entry` and any module/dependencies used by your function. Otherwise bundling will fail. -### Configuring esbuild +## Local bundling -The `NodejsFunction` construct exposes some [esbuild](https://esbuild.github.io/) options via properties under `bundling`: `minify`, `sourceMap`, `target` and `loader`. +If `esbuild` is available it will be used to bundle your code in your environment. Otherwise, +bundling will happen in a [Lambda compatible Docker container](https://hub.docker.com/r/amazon/aws-sam-cli-build-image-nodejs12.x). -```ts -new lambda.NodejsFunction(this, 'my-handler', { - bundling: { - minify: true, // minify code, defaults to false - sourceMap: true, // include source map, defaults to false - target: 'es2020', // target environment for the generated JavaScript code - loader: { // Use the 'dataurl' loader for '.png' files - '.png': 'dataurl', - }, - }, -}); +For macOS the recommendend approach is to install `esbuild` as Docker volume performance is really poor. + +`esbuild` can be installed with: + +```console +$ npm install --save-dev esbuild@0 ``` +OR + +```console +$ yarn add --dev esbuild@0 +``` + +To force bundling in a Docker container even if `esbuild` is available in your environment, +set `bundling.forceDockerBundling` to `true`. This is useful if your function relies on node +modules that should be installed (`nodeModules` prop, see [below](#install-modules)) in a Lambda +compatible environment. This is usually the case with modules using native dependencies. + ## Working with modules ### Externals By default, all node modules are bundled except for `aws-sdk`. This can be configured by specifying -the `externalModules` prop under `bundling`. +`bundling.externalModules`: ```ts new lambda.NodejsFunction(this, 'my-handler', { @@ -141,10 +108,10 @@ new lambda.NodejsFunction(this, 'my-handler', { ### Install modules -By default, all node modules referenced in your Lambda code will be bundled by esbuild. +By default, all node modules referenced in your Lambda code will be bundled by `esbuild`. Use the `nodeModules` prop under `bundling` to specify a list of modules that should not be bundled but instead included in the `node_modules` folder of the Lambda package. This is useful -when working with native dependencies or when esbuild fails to bundle a module. +when working with native dependencies or when `esbuild` fails to bundle a module. ```ts new lambda.NodejsFunction(this, 'my-handler', { @@ -154,34 +121,33 @@ new lambda.NodejsFunction(this, 'my-handler', { }); ``` -The modules listed in `nodeModules` must be present in the `package.json`'s dependencies. The -same version will be used for installation. The lock file (`yarn.lock` or `package-lock.json`) -will be used along with the right installer (`yarn` or `npm`). +The modules listed in `nodeModules` must be present in the `package.json`'s dependencies or +installed. The same version will be used for installation. The lock file (`yarn.lock` or +`package-lock.json`) will be used along with the right installer (`yarn` or `npm`). -## Local bundling - -If esbuild is available it will be used to bundle your code in your environment. Otherwise, -bundling will happen in a [Lambda compatible Docker container](https://hub.docker.com/r/amazon/aws-sam-cli-build-image-nodejs12.x). - -For macOS the recommendend approach is to install esbuild as Docker volume performance is really poor. +When working with `nodeModules` using native dependencies, you might want to force bundling in a +Docker container even if `esbuild` is available in your environment. This can be done by setting +`bundling.forceDockerBundling` to `true`. -esbuild can be installed with: +## Configuring `esbuild` -```console -$ npm install --save-dev esbuild@0 -``` +The `NodejsFunction` construct exposes some [esbuild options](https://esbuild.github.io/api/#build-api) +via properties under `bundling`: `minify`, `sourceMap`, `target` and `loader`. -OR - -```console -$ yarn add --dev esbuild@0 +```ts +new lambda.NodejsFunction(this, 'my-handler', { + bundling: { + minify: true, // minify code, defaults to false + sourceMap: true, // include source map, defaults to false + target: 'es2020', // target environment for the generated JavaScript code + loader: { // Use the 'dataurl' loader for '.png' files + '.png': 'dataurl', + }, + }, +}); ``` -To force bundling in a Docker container, set the `forceDockerBundling` prop to `true`. This -is useful if your function relies on node modules that should be installed (`nodeModules` prop, see [above](#install-modules)) in a Lambda compatible environment. This is usually the -case with modules using native dependencies. - -### Command hooks +## Command hooks It is possible to run additional commands by specifying the `commandHooks` prop: @@ -209,3 +175,45 @@ an array of commands to run. Commands are chained with `&&`. The commands will run in the environment in which bundling occurs: inside the container for Docker bundling or on the host OS for local bundling. + +## Customizing Docker bundling + +Use `bundling.environment` to define environments variables when `esbuild` runs: + +```ts +new lambda.NodejsFunction(this, 'my-handler', { + bundling: { + environment: { + NODE_ENV: 'production', + }, + }, +}); +``` + +Use `bundling.buildArgs` to pass build arguments when building the Docker bundling image: + +```ts +new lambda.NodejsFunction(this, 'my-handler', { + bundling: { + buildArgs: { + HTTPS_PROXY: 'https://127.0.0.1:3001', + }, + } +}); +``` + +Use `bundling.dockerImage` to use a custom Docker bundling image: + +```ts +new lambda.NodejsFunction(this, 'my-handler', { + bundling: { + dockerImage: cdk.BundlingDockerImage.fromAsset('/path/to/Dockerfile'), + }, +}); +``` + +This image should have `esbuild` installed **globally**. If you plan to use `nodeModules` it +should also have `npm` or `yarn` depending on the lock file you're using. + +Use the [default image provided by `@aws-cdk/aws-lambda-nodejs`](https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-lambda-nodejs/lib/Dockerfile) +as a source of inspiration. From 0d289cc5e0f87c416c8490c514a158fa162ee8b9 Mon Sep 17 00:00:00 2001 From: saudkhanzada Date: Thu, 10 Dec 2020 16:56:35 +0500 Subject: [PATCH 306/314] feat(s3): add support to set bucket OwnershipControls (#11834) added new props for `objectOwnership` that bucket class will transform to the required rules fields by the CfnBucket. `objectOwnerships` is an enum will two possible values `BucketOwnerPreferred` and `ObjectWriter` Closes #11591 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-s3/README.md | 26 ++++++++ packages/@aws-cdk/aws-s3/lib/bucket.ts | 38 ++++++++++- packages/@aws-cdk/aws-s3/test/bucket.test.ts | 68 ++++++++++++++++++++ 3 files changed, 131 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-s3/README.md b/packages/@aws-cdk/aws-s3/README.md index f453a84daa447..84e176f62a6a5 100644 --- a/packages/@aws-cdk/aws-s3/README.md +++ b/packages/@aws-cdk/aws-s3/README.md @@ -346,3 +346,29 @@ bucket.urlForObject('objectname'); // Path-Style URL bucket.virtualHostedUrlForObject('objectname'); // Virtual Hosted-Style URL bucket.virtualHostedUrlForObject('objectname', { regional: false }); // Virtual Hosted-Style URL but non-regional ``` + +### Object Ownership + +You can use the two following properties to specify the bucket [object Ownership]. + +[object Ownership]: https://docs.aws.amazon.com/AmazonS3/latest/dev/about-object-ownership.html + +#### Object writer + +The Uploading account will own the object. + +```ts +new s3.Bucket(this, 'MyBucket', { + objectOwnership: s3.ObjectOwnership.OBJECT_WRITER, +}); +``` + +#### Bucket owner preferred + +The bucket owner will own the object if the object is uploaded with the bucket-owner-full-control canned ACL. Without this setting and canned ACL, the object is uploaded and remains owned by the uploading account. + +```ts +new s3.Bucket(this, 'MyBucket', { + objectOwnership: s3.ObjectOwnership.BUCKET_OWNER_PREFERRED, +}); +``` diff --git a/packages/@aws-cdk/aws-s3/lib/bucket.ts b/packages/@aws-cdk/aws-s3/lib/bucket.ts index 305674a847a15..30a6acf40d13c 100644 --- a/packages/@aws-cdk/aws-s3/lib/bucket.ts +++ b/packages/@aws-cdk/aws-s3/lib/bucket.ts @@ -988,7 +988,22 @@ export interface Inventory { */ readonly optionalFields?: string[]; } - +/** + * The ObjectOwnership of the bucket. + * + * @see https://docs.aws.amazon.com/AmazonS3/latest/dev/about-object-ownership.html + * + */ +export enum ObjectOwnership { + /** + * Objects uploaded to the bucket change ownership to the bucket owner . + */ + BUCKET_OWNER_PREFERRED = 'BucketOwnerPreferred', + /** + * The uploading account will own the object. + */ + OBJECT_WRITER = 'ObjectWriter', +} export interface BucketProps { /** * The kind of server-side encryption to apply to this bucket. @@ -1136,6 +1151,15 @@ export interface BucketProps { * @default - No inventory configuration */ readonly inventories?: Inventory[]; + /** + * The objectOwnership of the bucket. + * + * @see https://docs.aws.amazon.com/AmazonS3/latest/dev/about-object-ownership.html + * + * @default - No ObjectOwnership configuration, uploading account will own the object. + * + */ + readonly objectOwnership?: ObjectOwnership; } /** @@ -1254,6 +1278,7 @@ export class Bucket extends BucketBase { accessControl: Lazy.string({ produce: () => this.accessControl }), loggingConfiguration: this.parseServerAccessLogs(props), inventoryConfigurations: Lazy.any({ produce: () => this.parseInventoryConfiguration() }), + ownershipControls: this.parseOwnershipControls(props), }); resource.applyRemovalPolicy(props.removalPolicy); @@ -1597,6 +1622,17 @@ export class Bucket extends BucketBase { })); } + private parseOwnershipControls({ objectOwnership }: BucketProps): CfnBucket.OwnershipControlsProperty | undefined { + if (!objectOwnership) { + return undefined; + } + return { + rules: [{ + objectOwnership, + }], + }; + } + private renderWebsiteConfiguration(props: BucketProps): CfnBucket.WebsiteConfigurationProperty | undefined { if (!props.websiteErrorDocument && !props.websiteIndexDocument && !props.websiteRedirect && !props.websiteRoutingRules) { return undefined; diff --git a/packages/@aws-cdk/aws-s3/test/bucket.test.ts b/packages/@aws-cdk/aws-s3/test/bucket.test.ts index 900a33852beef..c9ea670dbb126 100644 --- a/packages/@aws-cdk/aws-s3/test/bucket.test.ts +++ b/packages/@aws-cdk/aws-s3/test/bucket.test.ts @@ -2248,4 +2248,72 @@ nodeunitShim({ test.done(); }, + 'Bucket with objectOwnership set to BUCKET_OWNER_PREFERRED'(test: Test) { + const stack = new cdk.Stack(); + new s3.Bucket(stack, 'MyBucket', { + objectOwnership: s3.ObjectOwnership.BUCKET_OWNER_PREFERRED, + }); + expect(stack).toMatch({ + 'Resources': { + 'MyBucketF68F3FF0': { + 'Type': 'AWS::S3::Bucket', + 'Properties': { + 'OwnershipControls': { + 'Rules': [ + { + 'ObjectOwnership': 'BucketOwnerPreferred', + }, + ], + }, + }, + 'UpdateReplacePolicy': 'Retain', + 'DeletionPolicy': 'Retain', + }, + }, + }); + test.done(); + }, + + 'Bucket with objectOwnership set to OBJECT_WRITER'(test: Test) { + const stack = new cdk.Stack(); + new s3.Bucket(stack, 'MyBucket', { + objectOwnership: s3.ObjectOwnership.OBJECT_WRITER, + }); + expect(stack).toMatch({ + 'Resources': { + 'MyBucketF68F3FF0': { + 'Type': 'AWS::S3::Bucket', + 'Properties': { + 'OwnershipControls': { + 'Rules': [ + { + 'ObjectOwnership': 'ObjectWriter', + }, + ], + }, + }, + 'UpdateReplacePolicy': 'Retain', + 'DeletionPolicy': 'Retain', + }, + }, + }); + test.done(); + }, + + 'Bucket with objectOwnerships set to undefined'(test: Test) { + const stack = new cdk.Stack(); + new s3.Bucket(stack, 'MyBucket', { + objectOwnership: undefined, + }); + expect(stack).toMatch({ + 'Resources': { + 'MyBucketF68F3FF0': { + 'Type': 'AWS::S3::Bucket', + 'UpdateReplacePolicy': 'Retain', + 'DeletionPolicy': 'Retain', + }, + }, + }); + test.done(); + }, }); From 1fdd549af6372a7b639e9db5435f755e5a2515ad Mon Sep 17 00:00:00 2001 From: Elad Ben-Israel Date: Thu, 10 Dec 2020 14:56:48 +0200 Subject: [PATCH 307/314] feat(eks): kubernetes resource pruning (#11932) In order to support deletion of kubernetes manifest resources, the EKS module now automatically allocates and injects a "prune label" to all resources. This label is then passed down to `kubectl apply` with the `--prune` option so that any resources in the cluster that do not appear in the manifest will get deleted. The `prune` option can be set to `false` (either at the `Cluster` level or at the KubernetesResource level) to disable this. In order to avoid needing to update all tests, many of the existing tests set `prune: false` so that their outputs are not impacted. Resolves #10495 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-eks/README.md | 19 +- packages/@aws-cdk/aws-eks/lib/cluster.ts | 38 +++ packages/@aws-cdk/aws-eks/lib/k8s-manifest.ts | 76 +++++- .../lib/kubectl-handler/apply/__init__.py | 10 +- .../@aws-cdk/aws-eks/lib/legacy-cluster.ts | 3 + .../integ.eks-cluster-private-endpoint.ts | 1 + .../test/integ.eks-cluster.expected.json | 174 ++++++------ .../aws-eks/test/integ.fargate-cluster.ts | 1 + .../@aws-cdk/aws-eks/test/test.awsauth.ts | 8 +- .../@aws-cdk/aws-eks/test/test.cluster.ts | 104 +++++-- .../@aws-cdk/aws-eks/test/test.fargate.ts | 2 +- .../aws-eks/test/test.k8s-manifest.ts | 257 +++++++++++++++++- .../@aws-cdk/aws-eks/test/test.nodegroup.ts | 3 +- .../aws-eks/test/test.service-account.ts | 3 +- packages/@aws-cdk/aws-eks/test/util.ts | 10 +- 15 files changed, 581 insertions(+), 128 deletions(-) diff --git a/packages/@aws-cdk/aws-eks/README.md b/packages/@aws-cdk/aws-eks/README.md index cf08a43a16bfe..903636c5d4e89 100644 --- a/packages/@aws-cdk/aws-eks/README.md +++ b/packages/@aws-cdk/aws-eks/README.md @@ -807,16 +807,29 @@ or through `cluster.addManifest()`) (e.g. `cluster.addManifest('foo', r1, r2, r3,...)`), these resources will be applied as a single manifest via `kubectl` and will be applied sequentially (the standard behavior in `kubectl`). ----------------------- +--- Since Kubernetes manifests are implemented as CloudFormation resources in the CDK. This means that if the manifest is deleted from your code (or the stack is deleted), the next `cdk deploy` will issue a `kubectl delete` command and the Kubernetes resources in that manifest will be deleted. -#### Caveat +#### Resource Pruning + +When a resource is deleted from a Kubernetes manifest, the EKS module will +automatically delete these resources by injecting a _prune label_ to all +manifest resources. This label is then passed to [`kubectl apply --prune`]. + +[`kubectl apply --prune`]: https://kubernetes.io/docs/tasks/manage-kubernetes-objects/declarative-config/#alternative-kubectl-apply-f-directory-prune-l-your-label + +Pruning is enabled by default but can be disabled through the `prune` option +when a cluster is defined: -If you have multiple resources in a single `KubernetesManifest`, and one of those **resources** is removed from the manifest, it will not be deleted and will remain orphan. See [Support Object pruning](https://github.com/aws/aws-cdk/issues/10495) for more details. +```ts +new Cluster(this, 'MyCluster', { + prune: false +}); +``` ### Helm Charts diff --git a/packages/@aws-cdk/aws-eks/lib/cluster.ts b/packages/@aws-cdk/aws-eks/lib/cluster.ts index beee73cca05dd..fcbc2aaffdf10 100644 --- a/packages/@aws-cdk/aws-eks/lib/cluster.ts +++ b/packages/@aws-cdk/aws-eks/lib/cluster.ts @@ -122,6 +122,15 @@ export interface ICluster extends IResource, ec2.IConnectable { * Amount of memory to allocate to the provider's lambda function. */ readonly kubectlMemory?: Size; + + /** + * Indicates whether Kubernetes resources can be automatically pruned. When + * this is enabled (default), prune labels will be allocated and injected to + * each resource. These labels will then be used when issuing the `kubectl + * apply` operation with the `--prune` switch. + */ + readonly prune: boolean; + /** * Creates a new service account with corresponding IAM Role (IRSA). * @@ -281,6 +290,16 @@ export interface ClusterAttributes { * @default Size.gibibytes(1) */ readonly kubectlMemory?: Size; + + /** + * Indicates whether Kubernetes resources added through `addManifest()` can be + * automatically pruned. When this is enabled (default), prune labels will be + * allocated and injected to each resource. These labels will then be used + * when issuing the `kubectl apply` operation with the `--prune` switch. + * + * @default true + */ + readonly prune?: boolean; } /** @@ -433,6 +452,16 @@ export interface ClusterOptions extends CommonClusterOptions { * @default Size.gibibytes(1) */ readonly kubectlMemory?: Size; + + /** + * Indicates whether Kubernetes resources added through `addManifest()` can be + * automatically pruned. When this is enabled (default), prune labels will be + * allocated and injected to each resource. These labels will then be used + * when issuing the `kubectl apply` operation with the `--prune` switch. + * + * @default true + */ + readonly prune?: boolean; } /** @@ -648,6 +677,7 @@ abstract class ClusterBase extends Resource implements ICluster { public abstract readonly kubectlSecurityGroup?: ec2.ISecurityGroup; public abstract readonly kubectlPrivateSubnets?: ec2.ISubnet[]; public abstract readonly kubectlMemory?: Size; + public abstract readonly prune: boolean; public abstract readonly openIdConnectProvider: iam.IOpenIdConnectProvider; /** @@ -865,6 +895,11 @@ export class Cluster extends ClusterBase { */ public readonly kubectlMemory?: Size; + /** + * Determines if Kubernetes resources can be pruned automatically. + */ + public readonly prune: boolean; + /** * If this cluster is kubectl-enabled, returns the `ClusterResource` object * that manages it. If this cluster is not kubectl-enabled (i.e. uses the @@ -925,6 +960,7 @@ export class Cluster extends ClusterBase { const stack = Stack.of(this); + this.prune = props.prune ?? true; this.vpc = props.vpc || new ec2.Vpc(this, 'DefaultVpc'); this.version = props.version; @@ -1655,6 +1691,7 @@ class ImportedCluster extends ClusterBase { public readonly kubectlPrivateSubnets?: ec2.ISubnet[] | undefined; public readonly kubectlLayer?: lambda.ILayerVersion; public readonly kubectlMemory?: Size; + public readonly prune: boolean; constructor(scope: Construct, id: string, private readonly props: ClusterAttributes) { super(scope, id); @@ -1667,6 +1704,7 @@ class ImportedCluster extends ClusterBase { this.kubectlPrivateSubnets = props.kubectlPrivateSubnetIds ? props.kubectlPrivateSubnetIds.map((subnetid, index) => ec2.Subnet.fromSubnetId(this, `KubectlSubnet${index}`, subnetid)) : undefined; this.kubectlLayer = props.kubectlLayer; this.kubectlMemory = props.kubectlMemory; + this.prune = props.prune ?? true; let i = 1; for (const sgid of props.securityGroupIds ?? []) { diff --git a/packages/@aws-cdk/aws-eks/lib/k8s-manifest.ts b/packages/@aws-cdk/aws-eks/lib/k8s-manifest.ts index fa7ec654d3d77..09bd952f2e64a 100644 --- a/packages/@aws-cdk/aws-eks/lib/k8s-manifest.ts +++ b/packages/@aws-cdk/aws-eks/lib/k8s-manifest.ts @@ -1,5 +1,5 @@ import { CustomResource, Stack } from '@aws-cdk/core'; -import { Construct } from 'constructs'; +import { Construct, Node } from 'constructs'; import { ICluster } from './cluster'; import { KubectlProvider } from './kubectl-provider'; @@ -7,10 +7,42 @@ import { KubectlProvider } from './kubectl-provider'; // eslint-disable-next-line import { Construct as CoreConstruct } from '@aws-cdk/core'; +const PRUNE_LABEL_PREFIX = 'aws.cdk.eks/prune-'; + +/** + * Options for `KubernetesManifest`. + */ +export interface KubernetesManifestOptions { + /** + * When a resource is removed from a Kubernetes manifest, it no longer appears + * in the manifest, and there is no way to know that this resource needs to be + * deleted. To address this, `kubectl apply` has a `--prune` option which will + * query the cluster for all resources with a specific label and will remove + * all the labeld resources that are not part of the applied manifest. If this + * option is disabled and a resource is removed, it will become "orphaned" and + * will not be deleted from the cluster. + * + * When this option is enabled (default), the construct will inject a label to + * all Kubernetes resources included in this manifest which will be used to + * prune resources when the manifest changes via `kubectl apply --prune`. + * + * The label name will be `aws.cdk.eks/prune-` where `` is the + * 42-char unique address of this construct in the construct tree. Value is + * empty. + * + * @see + * https://kubernetes.io/docs/tasks/manage-kubernetes-objects/declarative-config/#alternative-kubectl-apply-f-directory-prune-l-your-label + * + * @default - based on the prune option of the cluster, which is `true` unless + * otherwise specified. + */ + readonly prune?: boolean; +} + /** * Properties for KubernetesManifest */ -export interface KubernetesManifestProps { +export interface KubernetesManifestProps extends KubernetesManifestOptions { /** * The EKS cluster to apply this manifest to. * @@ -62,6 +94,11 @@ export class KubernetesManifest extends CoreConstruct { const stack = Stack.of(this); const provider = KubectlProvider.getOrCreate(this, props.cluster); + const prune = props.prune ?? props.cluster.prune; + const pruneLabel = prune + ? this.injectPruneLabel(props.manifest) + : undefined; + new CustomResource(this, 'Resource', { serviceToken: provider.serviceToken, resourceType: KubernetesManifest.RESOURCE_TYPE, @@ -72,7 +109,42 @@ export class KubernetesManifest extends CoreConstruct { Manifest: stack.toJsonString(props.manifest), ClusterName: props.cluster.clusterName, RoleArn: provider.roleArn, // TODO: bake into provider's environment + PruneLabel: pruneLabel, }, }); } + + /** + * Injects a generated prune label to all resources in this manifest. The + * label name will be `awscdk.eks/manifest-ADDR` where `ADDR` is the address + * of the construct in the construct tree. + * + * @returns the label name + */ + private injectPruneLabel(manifest: Record[]): string { + // max label name is 64 chars and addrs is always 42. + const pruneLabel = PRUNE_LABEL_PREFIX + Node.of(this).addr; + + for (const resource of manifest) { + // skip resource if it's not an object or if it does not have a "kind" + if (typeof(resource) !== 'object' || !resource.kind) { + continue; + } + + if (!resource.metadata) { + resource.metadata = {}; + } + + if (!resource.metadata.labels) { + resource.metadata.labels = {}; + } + + resource.metadata.labels = { + [pruneLabel]: '', + ...resource.metadata.labels, + }; + } + + return pruneLabel; + } } diff --git a/packages/@aws-cdk/aws-eks/lib/kubectl-handler/apply/__init__.py b/packages/@aws-cdk/aws-eks/lib/kubectl-handler/apply/__init__.py index e5c9d712758fd..7509e77b24cf1 100644 --- a/packages/@aws-cdk/aws-eks/lib/kubectl-handler/apply/__init__.py +++ b/packages/@aws-cdk/aws-eks/lib/kubectl-handler/apply/__init__.py @@ -22,6 +22,7 @@ def apply_handler(event, context): cluster_name = props['ClusterName'] manifest_text = props['Manifest'] role_arn = props['RoleArn'] + prune_label = props.get('PruneLabel', None) # "log in" to the cluster subprocess.check_call([ 'aws', 'eks', 'update-kubeconfig', @@ -40,7 +41,10 @@ def apply_handler(event, context): logger.info("manifest written to: %s" % manifest_file) if request_type == 'Create' or request_type == 'Update': - kubectl('apply', manifest_file) + opts = [] + if prune_label is not None: + opts = ['--prune', '-l', prune_label] + kubectl('apply', manifest_file, *opts) elif request_type == "Delete": try: kubectl('delete', manifest_file) @@ -48,12 +52,12 @@ def apply_handler(event, context): logger.info("delete error: %s" % e) -def kubectl(verb, file): +def kubectl(verb, file, *opts): maxAttempts = 3 retry = maxAttempts while retry > 0: try: - cmd = ['kubectl', verb, '--kubeconfig', kubeconfig, '-f', file] + cmd = ['kubectl', verb, '--kubeconfig', kubeconfig, '-f', file] + list(opts) logger.info(f'Running command: {cmd}') output = subprocess.check_output(cmd, stderr=subprocess.STDOUT) except subprocess.CalledProcessError as exc: diff --git a/packages/@aws-cdk/aws-eks/lib/legacy-cluster.ts b/packages/@aws-cdk/aws-eks/lib/legacy-cluster.ts index 27014e73871ef..2193ec301de3c 100644 --- a/packages/@aws-cdk/aws-eks/lib/legacy-cluster.ts +++ b/packages/@aws-cdk/aws-eks/lib/legacy-cluster.ts @@ -147,6 +147,8 @@ export class LegacyCluster extends Resource implements ICluster { */ public readonly defaultNodegroup?: Nodegroup; + public readonly prune: boolean = false; + private readonly version: KubernetesVersion; /** @@ -424,6 +426,7 @@ class ImportedCluster extends Resource implements ICluster { public readonly clusterName: string; public readonly clusterArn: string; public readonly connections = new ec2.Connections(); + public readonly prune: boolean = false; constructor(scope: Construct, id: string, private readonly props: ClusterAttributes) { super(scope, id); diff --git a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster-private-endpoint.ts b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster-private-endpoint.ts index b359c548c43ae..0a0c9a61230e9 100644 --- a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster-private-endpoint.ts +++ b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster-private-endpoint.ts @@ -26,6 +26,7 @@ class EksClusterStack extends TestStack { defaultCapacity: 2, version: CLUSTER_VERSION, endpointAccess: eks.EndpointAccess.PRIVATE, + prune: false, }); // this is the valdiation. it won't work if the private access is not setup properly. diff --git a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json index 7e5d81152c4d8..d2c359b55bc8c 100644 --- a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json +++ b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json @@ -1180,7 +1180,7 @@ "Fn::Join": [ "", [ - "[{\"apiVersion\":\"v1\",\"kind\":\"ConfigMap\",\"metadata\":{\"name\":\"aws-auth\",\"namespace\":\"kube-system\"},\"data\":{\"mapRoles\":\"[{\\\"rolearn\\\":\\\"", + "[{\"apiVersion\":\"v1\",\"kind\":\"ConfigMap\",\"metadata\":{\"name\":\"aws-auth\",\"namespace\":\"kube-system\",\"labels\":{\"aws.cdk.eks/prune-c842be348c45337cd97b8759de76d5a68b4910d487\":\"\"}},\"data\":{\"mapRoles\":\"[{\\\"rolearn\\\":\\\"", { "Fn::GetAtt": [ "AdminRole38563C57", @@ -1276,7 +1276,8 @@ "ClusterCreationRole360249B6", "Arn" ] - } + }, + "PruneLabel": "aws.cdk.eks/prune-c842be348c45337cd97b8759de76d5a68b4910d487" }, "DependsOn": [ "ClusterKubectlReadyBarrier200052AF" @@ -3101,7 +3102,7 @@ "Outputs.awscdkeksclustertestawscdkawseksKubectlProviderframeworkonEventC681B49AArn" ] }, - "Manifest": "[{\"apiVersion\":\"apps/v1\",\"kind\":\"DaemonSet\",\"metadata\":{\"name\":\"neuron-device-plugin-daemonset\",\"namespace\":\"kube-system\"},\"spec\":{\"selector\":{\"matchLabels\":{\"name\":\"neuron-device-plugin-ds\"}},\"updateStrategy\":{\"type\":\"RollingUpdate\"},\"template\":{\"metadata\":{\"annotations\":{\"scheduler.alpha.kubernetes.io/critical-pod\":\"\"},\"labels\":{\"name\":\"neuron-device-plugin-ds\"}},\"spec\":{\"tolerations\":[{\"key\":\"CriticalAddonsOnly\",\"operator\":\"Exists\"},{\"key\":\"aws.amazon.com/neuron\",\"operator\":\"Exists\",\"effect\":\"NoSchedule\"}],\"priorityClassName\":\"system-node-critical\",\"affinity\":{\"nodeAffinity\":{\"requiredDuringSchedulingIgnoredDuringExecution\":{\"nodeSelectorTerms\":[{\"matchExpressions\":[{\"key\":\"beta.kubernetes.io/instance-type\",\"operator\":\"In\",\"values\":[\"inf1.xlarge\",\"inf1.2xlarge\",\"inf1.6xlarge\",\"inf1.4xlarge\"]}]},{\"matchExpressions\":[{\"key\":\"node.kubernetes.io/instance-type\",\"operator\":\"In\",\"values\":[\"inf1.xlarge\",\"inf1.2xlarge\",\"inf1.6xlarge\",\"inf1.24xlarge\"]}]}]}}},\"containers\":[{\"image\":\"790709498068.dkr.ecr.us-west-2.amazonaws.com/neuron-device-plugin:1.0.9043.0\",\"imagePullPolicy\":\"Always\",\"name\":\"k8s-neuron-device-plugin-ctr\",\"securityContext\":{\"allowPrivilegeEscalation\":false,\"capabilities\":{\"drop\":[\"ALL\"]}},\"volumeMounts\":[{\"name\":\"device-plugin\",\"mountPath\":\"/var/lib/kubelet/device-plugins\"}]}],\"volumes\":[{\"name\":\"device-plugin\",\"hostPath\":{\"path\":\"/var/lib/kubelet/device-plugins\"}}]}}}}]", + "Manifest": "[{\"apiVersion\":\"apps/v1\",\"kind\":\"DaemonSet\",\"metadata\":{\"name\":\"neuron-device-plugin-daemonset\",\"namespace\":\"kube-system\",\"labels\":{\"aws.cdk.eks/prune-c88223d575036bcf663303b6778373ae4854f1fe3b\":\"\"}},\"spec\":{\"selector\":{\"matchLabels\":{\"name\":\"neuron-device-plugin-ds\"}},\"updateStrategy\":{\"type\":\"RollingUpdate\"},\"template\":{\"metadata\":{\"annotations\":{\"scheduler.alpha.kubernetes.io/critical-pod\":\"\"},\"labels\":{\"name\":\"neuron-device-plugin-ds\"}},\"spec\":{\"tolerations\":[{\"key\":\"CriticalAddonsOnly\",\"operator\":\"Exists\"},{\"key\":\"aws.amazon.com/neuron\",\"operator\":\"Exists\",\"effect\":\"NoSchedule\"}],\"priorityClassName\":\"system-node-critical\",\"affinity\":{\"nodeAffinity\":{\"requiredDuringSchedulingIgnoredDuringExecution\":{\"nodeSelectorTerms\":[{\"matchExpressions\":[{\"key\":\"beta.kubernetes.io/instance-type\",\"operator\":\"In\",\"values\":[\"inf1.xlarge\",\"inf1.2xlarge\",\"inf1.6xlarge\",\"inf1.4xlarge\"]}]},{\"matchExpressions\":[{\"key\":\"node.kubernetes.io/instance-type\",\"operator\":\"In\",\"values\":[\"inf1.xlarge\",\"inf1.2xlarge\",\"inf1.6xlarge\",\"inf1.24xlarge\"]}]}]}}},\"containers\":[{\"image\":\"790709498068.dkr.ecr.us-west-2.amazonaws.com/neuron-device-plugin:1.0.9043.0\",\"imagePullPolicy\":\"Always\",\"name\":\"k8s-neuron-device-plugin-ctr\",\"securityContext\":{\"allowPrivilegeEscalation\":false,\"capabilities\":{\"drop\":[\"ALL\"]}},\"volumeMounts\":[{\"name\":\"device-plugin\",\"mountPath\":\"/var/lib/kubelet/device-plugins\"}]}],\"volumes\":[{\"name\":\"device-plugin\",\"hostPath\":{\"path\":\"/var/lib/kubelet/device-plugins\"}}]}}}}]", "ClusterName": { "Ref": "Cluster9EE0221C" }, @@ -3110,7 +3111,8 @@ "ClusterCreationRole360249B6", "Arn" ] - } + }, + "PruneLabel": "aws.cdk.eks/prune-c88223d575036bcf663303b6778373ae4854f1fe3b" }, "DependsOn": [ "ClusterKubectlReadyBarrier200052AF" @@ -3369,7 +3371,7 @@ "Outputs.awscdkeksclustertestawscdkawseksKubectlProviderframeworkonEventC681B49AArn" ] }, - "Manifest": "[{\"apiVersion\":\"v1\",\"kind\":\"Service\",\"metadata\":{\"name\":\"hello-kubernetes\"},\"spec\":{\"type\":\"LoadBalancer\",\"ports\":[{\"port\":80,\"targetPort\":8080}],\"selector\":{\"app\":\"hello-kubernetes\"}}},{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"metadata\":{\"name\":\"hello-kubernetes\"},\"spec\":{\"replicas\":1,\"selector\":{\"matchLabels\":{\"app\":\"hello-kubernetes\"}},\"template\":{\"metadata\":{\"labels\":{\"app\":\"hello-kubernetes\"}},\"spec\":{\"containers\":[{\"name\":\"hello-kubernetes\",\"image\":\"paulbouwer/hello-kubernetes:1.5\",\"ports\":[{\"containerPort\":8080}]}]}}}}]", + "Manifest": "[{\"apiVersion\":\"v1\",\"kind\":\"Service\",\"metadata\":{\"name\":\"hello-kubernetes\",\"labels\":{\"aws.cdk.eks/prune-c8f0f7140f7358e29b7f58e81b507dcf744a3908f4\":\"\"}},\"spec\":{\"type\":\"LoadBalancer\",\"ports\":[{\"port\":80,\"targetPort\":8080}],\"selector\":{\"app\":\"hello-kubernetes\"}}},{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"metadata\":{\"name\":\"hello-kubernetes\",\"labels\":{\"aws.cdk.eks/prune-c8f0f7140f7358e29b7f58e81b507dcf744a3908f4\":\"\"}},\"spec\":{\"replicas\":1,\"selector\":{\"matchLabels\":{\"app\":\"hello-kubernetes\"}},\"template\":{\"metadata\":{\"labels\":{\"app\":\"hello-kubernetes\"}},\"spec\":{\"containers\":[{\"name\":\"hello-kubernetes\",\"image\":\"paulbouwer/hello-kubernetes:1.5\",\"ports\":[{\"containerPort\":8080}]}]}}}}]", "ClusterName": { "Ref": "Cluster9EE0221C" }, @@ -3378,7 +3380,8 @@ "ClusterCreationRole360249B6", "Arn" ] - } + }, + "PruneLabel": "aws.cdk.eks/prune-c8f0f7140f7358e29b7f58e81b507dcf744a3908f4" }, "DependsOn": [ "ClusterKubectlReadyBarrier200052AF" @@ -3433,7 +3436,7 @@ { "Ref": "Cluster9EE0221C" }, - "\"},\"kind\":\"ConfigMap\",\"metadata\":{\"name\":\"chart-config-map-configmap-cccf3117\"}}]" + "\"},\"kind\":\"ConfigMap\",\"metadata\":{\"name\":\"chart-config-map-configmap-cccf3117\",\"labels\":{\"aws.cdk.eks/prune-c8cd9cb2e127e0b0375ebc544f18d8513721895a27\":\"\"}}}]" ] ] }, @@ -3445,7 +3448,8 @@ "ClusterCreationRole360249B6", "Arn" ] - } + }, + "PruneLabel": "aws.cdk.eks/prune-c8cd9cb2e127e0b0375ebc544f18d8513721895a27" }, "DependsOn": [ "ClusterKubectlReadyBarrier200052AF" @@ -3462,7 +3466,7 @@ "Outputs.awscdkeksclustertestawscdkawseksKubectlProviderframeworkonEventC681B49AArn" ] }, - "Manifest": "[{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"name\":\"nginx\"}}]", + "Manifest": "[{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"name\":\"nginx\",\"labels\":{\"aws.cdk.eks/prune-c84fd26f70b01a84daa5d3646e813820af6fde0970\":\"\"}}}]", "ClusterName": { "Ref": "Cluster9EE0221C" }, @@ -3471,7 +3475,8 @@ "ClusterCreationRole360249B6", "Arn" ] - } + }, + "PruneLabel": "aws.cdk.eks/prune-c84fd26f70b01a84daa5d3646e813820af6fde0970" }, "DependsOn": [ "ClusterKubectlReadyBarrier200052AF" @@ -3600,7 +3605,7 @@ "Fn::Join": [ "", [ - "[{\"apiVersion\":\"v1\",\"kind\":\"ServiceAccount\",\"metadata\":{\"name\":\"awscdkeksclustertestclustermyserviceaccount4080bcdd\",\"namespace\":\"default\",\"labels\":{\"app.kubernetes.io/name\":\"awscdkeksclustertestclustermyserviceaccount4080bcdd\"},\"annotations\":{\"eks.amazonaws.com/role-arn\":\"", + "[{\"apiVersion\":\"v1\",\"kind\":\"ServiceAccount\",\"metadata\":{\"name\":\"awscdkeksclustertestclustermyserviceaccount4080bcdd\",\"namespace\":\"default\",\"labels\":{\"aws.cdk.eks/prune-c8f8dbf23319159cc2fef46283f7450b814e818252\":\"\",\"app.kubernetes.io/name\":\"awscdkeksclustertestclustermyserviceaccount4080bcdd\"},\"annotations\":{\"eks.amazonaws.com/role-arn\":\"", { "Fn::GetAtt": [ "ClusterMyServiceAccountRole85337B29", @@ -3619,7 +3624,8 @@ "ClusterCreationRole360249B6", "Arn" ] - } + }, + "PruneLabel": "aws.cdk.eks/prune-c8f8dbf23319159cc2fef46283f7450b814e818252" }, "DependsOn": [ "ClusterKubectlReadyBarrier200052AF" @@ -3661,7 +3667,7 @@ "Outputs.awscdkeksclustertestawscdkawseksKubectlProviderframeworkonEventC681B49AArn" ] }, - "Manifest": "[{\"kind\":\"Pod\",\"apiVersion\":\"v1\",\"metadata\":{\"name\":\"webpod\",\"labels\":{\"app\":\"simple-web\"}},\"spec\":{\"containers\":[{\"name\":\"simplewebcontainer\",\"image\":\"nginx\",\"ports\":[{\"containerPort\":80}]}]}}]", + "Manifest": "[{\"kind\":\"Pod\",\"apiVersion\":\"v1\",\"metadata\":{\"name\":\"webpod\",\"labels\":{\"aws.cdk.eks/prune-c8b6a5b3e6f9f4f1aa9dc400a13c96633da4822b2d\":\"\",\"app\":\"simple-web\"}},\"spec\":{\"containers\":[{\"name\":\"simplewebcontainer\",\"image\":\"nginx\",\"ports\":[{\"containerPort\":80}]}]}}]", "ClusterName": { "Ref": "Cluster9EE0221C" }, @@ -3670,7 +3676,8 @@ "ClusterCreationRole360249B6", "Arn" ] - } + }, + "PruneLabel": "aws.cdk.eks/prune-c8b6a5b3e6f9f4f1aa9dc400a13c96633da4822b2d" }, "DependsOn": [ "ClusterKubectlReadyBarrier200052AF" @@ -3698,7 +3705,7 @@ "GroupId" ] }, - "\"}},\"spec\":{\"type\":\"LoadBalancer\",\"ports\":[{\"port\":9000,\"targetPort\":80}],\"selector\":{\"app\":\"simple-web\"}}}]" + "\"},\"labels\":{\"aws.cdk.eks/prune-c84c09bc8d75d4cc4d672e0d3872dcdb35f628dc2c\":\"\"}},\"spec\":{\"type\":\"LoadBalancer\",\"ports\":[{\"port\":9000,\"targetPort\":80}],\"selector\":{\"app\":\"simple-web\"}}}]" ] ] }, @@ -3710,7 +3717,8 @@ "ClusterCreationRole360249B6", "Arn" ] - } + }, + "PruneLabel": "aws.cdk.eks/prune-c84c09bc8d75d4cc4d672e0d3872dcdb35f628dc2c" }, "DependsOn": [ "ClusterKubectlReadyBarrier200052AF" @@ -3828,7 +3836,7 @@ }, "/", { - "Ref": "AssetParameters8a716921b900641df041bd35d4d1817780375a004ec952e2cab0cd621c5a4d64S3BucketAA0CCE0D" + "Ref": "AssetParameters25aed688c0803654674984565f9e68dec4fbd4f8427b6e9db1be3c61b4fa2956S3BucketE0699DCA" }, "/", { @@ -3838,7 +3846,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters8a716921b900641df041bd35d4d1817780375a004ec952e2cab0cd621c5a4d64S3VersionKey3012C8DD" + "Ref": "AssetParameters25aed688c0803654674984565f9e68dec4fbd4f8427b6e9db1be3c61b4fa2956S3VersionKey09D9D914" } ] } @@ -3851,7 +3859,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters8a716921b900641df041bd35d4d1817780375a004ec952e2cab0cd621c5a4d64S3VersionKey3012C8DD" + "Ref": "AssetParameters25aed688c0803654674984565f9e68dec4fbd4f8427b6e9db1be3c61b4fa2956S3VersionKey09D9D914" } ] } @@ -3873,11 +3881,11 @@ "Arn" ] }, - "referencetoawscdkeksclustertestAssetParametersb7d8a9750f8bfded8ac76be100e3bee1c3d4824df006766110d023f42952f5c2S3BucketC2E03523Ref": { - "Ref": "AssetParametersb7d8a9750f8bfded8ac76be100e3bee1c3d4824df006766110d023f42952f5c2S3Bucket9ABBD5A2" + "referencetoawscdkeksclustertestAssetParameters340a58e595482ebd1921fce6a3eb5df2c7afea6183bb3da2a531bd7f48e776e2S3Bucket43161A4BRef": { + "Ref": "AssetParameters340a58e595482ebd1921fce6a3eb5df2c7afea6183bb3da2a531bd7f48e776e2S3Bucket7C9DE002" }, - "referencetoawscdkeksclustertestAssetParametersb7d8a9750f8bfded8ac76be100e3bee1c3d4824df006766110d023f42952f5c2S3VersionKey901D947ARef": { - "Ref": "AssetParametersb7d8a9750f8bfded8ac76be100e3bee1c3d4824df006766110d023f42952f5c2S3VersionKey40FF2C4A" + "referencetoawscdkeksclustertestAssetParameters340a58e595482ebd1921fce6a3eb5df2c7afea6183bb3da2a531bd7f48e776e2S3VersionKeyDF17FE61Ref": { + "Ref": "AssetParameters340a58e595482ebd1921fce6a3eb5df2c7afea6183bb3da2a531bd7f48e776e2S3VersionKey45F6B914" }, "referencetoawscdkeksclustertestVpcPrivateSubnet1Subnet32A4EC2ARef": { "Ref": "VpcPrivateSubnet1Subnet536B997A" @@ -3927,7 +3935,7 @@ } } }, - "AWSCDKCfnUtilsProviderCustomResourceProviderRoleFE0EE867": { + "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65": { "Type": "AWS::IAM::Role", "Properties": { "AssumeRolePolicyDocument": { @@ -3946,15 +3954,36 @@ { "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" } + ], + "Policies": [ + { + "PolicyName": "Inline", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Resource": "*", + "Action": [ + "iam:CreateOpenIDConnectProvider", + "iam:DeleteOpenIDConnectProvider", + "iam:UpdateOpenIDConnectProviderThumbprint", + "iam:AddClientIDToOpenIDConnectProvider", + "iam:RemoveClientIDFromOpenIDConnectProvider" + ] + } + ] + } + } ] } }, - "AWSCDKCfnUtilsProviderCustomResourceProviderHandlerCF82AA57": { + "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderHandlerF2C543E0": { "Type": "AWS::Lambda::Function", "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deS3Bucket055DC235" + "Ref": "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deS3Bucket14156880" }, "S3Key": { "Fn::Join": [ @@ -3967,7 +3996,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deS3VersionKey2FFFA299" + "Ref": "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deS3VersionKey5225BCA4" } ] } @@ -3980,7 +4009,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deS3VersionKey2FFFA299" + "Ref": "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deS3VersionKey5225BCA4" } ] } @@ -3995,17 +4024,17 @@ "Handler": "__entrypoint__.handler", "Role": { "Fn::GetAtt": [ - "AWSCDKCfnUtilsProviderCustomResourceProviderRoleFE0EE867", + "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65", "Arn" ] }, "Runtime": "nodejs12.x" }, "DependsOn": [ - "AWSCDKCfnUtilsProviderCustomResourceProviderRoleFE0EE867" + "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65" ] }, - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65": { + "AWSCDKCfnUtilsProviderCustomResourceProviderRoleFE0EE867": { "Type": "AWS::IAM::Role", "Properties": { "AssumeRolePolicyDocument": { @@ -4024,36 +4053,15 @@ { "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" } - ], - "Policies": [ - { - "PolicyName": "Inline", - "PolicyDocument": { - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Resource": "*", - "Action": [ - "iam:CreateOpenIDConnectProvider", - "iam:DeleteOpenIDConnectProvider", - "iam:UpdateOpenIDConnectProviderThumbprint", - "iam:AddClientIDToOpenIDConnectProvider", - "iam:RemoveClientIDFromOpenIDConnectProvider" - ] - } - ] - } - } ] } }, - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderHandlerF2C543E0": { + "AWSCDKCfnUtilsProviderCustomResourceProviderHandlerCF82AA57": { "Type": "AWS::Lambda::Function", "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParameters952bd1c03e8201c4c1c67d6de0f3fdaaf88fda05f89a1232c3f6364343cd5344S3Bucket14156880" + "Ref": "AssetParameters952bd1c03e8201c4c1c67d6de0f3fdaaf88fda05f89a1232c3f6364343cd5344S3Bucket055DC235" }, "S3Key": { "Fn::Join": [ @@ -4066,7 +4074,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters952bd1c03e8201c4c1c67d6de0f3fdaaf88fda05f89a1232c3f6364343cd5344S3VersionKey5225BCA4" + "Ref": "AssetParameters952bd1c03e8201c4c1c67d6de0f3fdaaf88fda05f89a1232c3f6364343cd5344S3VersionKey2FFFA299" } ] } @@ -4079,7 +4087,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters952bd1c03e8201c4c1c67d6de0f3fdaaf88fda05f89a1232c3f6364343cd5344S3VersionKey5225BCA4" + "Ref": "AssetParameters952bd1c03e8201c4c1c67d6de0f3fdaaf88fda05f89a1232c3f6364343cd5344S3VersionKey2FFFA299" } ] } @@ -4094,14 +4102,14 @@ "Handler": "__entrypoint__.handler", "Role": { "Fn::GetAtt": [ - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65", + "AWSCDKCfnUtilsProviderCustomResourceProviderRoleFE0EE867", "Arn" ] }, "Runtime": "nodejs12.x" }, "DependsOn": [ - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65" + "AWSCDKCfnUtilsProviderCustomResourceProviderRoleFE0EE867" ] }, "WebServiceSecurityGroupA556AEB5": { @@ -4533,29 +4541,17 @@ "Type": "String", "Description": "Artifact hash for asset \"daeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1\"" }, - "AssetParametersb7d8a9750f8bfded8ac76be100e3bee1c3d4824df006766110d023f42952f5c2S3Bucket9ABBD5A2": { + "AssetParameters340a58e595482ebd1921fce6a3eb5df2c7afea6183bb3da2a531bd7f48e776e2S3Bucket7C9DE002": { "Type": "String", - "Description": "S3 bucket for asset \"b7d8a9750f8bfded8ac76be100e3bee1c3d4824df006766110d023f42952f5c2\"" + "Description": "S3 bucket for asset \"340a58e595482ebd1921fce6a3eb5df2c7afea6183bb3da2a531bd7f48e776e2\"" }, - "AssetParametersb7d8a9750f8bfded8ac76be100e3bee1c3d4824df006766110d023f42952f5c2S3VersionKey40FF2C4A": { + "AssetParameters340a58e595482ebd1921fce6a3eb5df2c7afea6183bb3da2a531bd7f48e776e2S3VersionKey45F6B914": { "Type": "String", - "Description": "S3 key for asset version \"b7d8a9750f8bfded8ac76be100e3bee1c3d4824df006766110d023f42952f5c2\"" + "Description": "S3 key for asset version \"340a58e595482ebd1921fce6a3eb5df2c7afea6183bb3da2a531bd7f48e776e2\"" }, - "AssetParametersb7d8a9750f8bfded8ac76be100e3bee1c3d4824df006766110d023f42952f5c2ArtifactHashE86B38C7": { + "AssetParameters340a58e595482ebd1921fce6a3eb5df2c7afea6183bb3da2a531bd7f48e776e2ArtifactHashEDD75501": { "Type": "String", - "Description": "Artifact hash for asset \"b7d8a9750f8bfded8ac76be100e3bee1c3d4824df006766110d023f42952f5c2\"" - }, - "AssetParameters952bd1c03e8201c4c1c67d6de0f3fdaaf88fda05f89a1232c3f6364343cd5344S3Bucket055DC235": { - "Type": "String", - "Description": "S3 bucket for asset \"952bd1c03e8201c4c1c67d6de0f3fdaaf88fda05f89a1232c3f6364343cd5344\"" - }, - "AssetParameters952bd1c03e8201c4c1c67d6de0f3fdaaf88fda05f89a1232c3f6364343cd5344S3VersionKey2FFFA299": { - "Type": "String", - "Description": "S3 key for asset version \"952bd1c03e8201c4c1c67d6de0f3fdaaf88fda05f89a1232c3f6364343cd5344\"" - }, - "AssetParameters952bd1c03e8201c4c1c67d6de0f3fdaaf88fda05f89a1232c3f6364343cd5344ArtifactHash1AB042BC": { - "Type": "String", - "Description": "Artifact hash for asset \"952bd1c03e8201c4c1c67d6de0f3fdaaf88fda05f89a1232c3f6364343cd5344\"" + "Description": "Artifact hash for asset \"340a58e595482ebd1921fce6a3eb5df2c7afea6183bb3da2a531bd7f48e776e2\"" }, "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deS3Bucket14156880": { "Type": "String", @@ -4569,6 +4565,18 @@ "Type": "String", "Description": "Artifact hash for asset \"b075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0de\"" }, + "AssetParameters952bd1c03e8201c4c1c67d6de0f3fdaaf88fda05f89a1232c3f6364343cd5344S3Bucket055DC235": { + "Type": "String", + "Description": "S3 bucket for asset \"952bd1c03e8201c4c1c67d6de0f3fdaaf88fda05f89a1232c3f6364343cd5344\"" + }, + "AssetParameters952bd1c03e8201c4c1c67d6de0f3fdaaf88fda05f89a1232c3f6364343cd5344S3VersionKey2FFFA299": { + "Type": "String", + "Description": "S3 key for asset version \"952bd1c03e8201c4c1c67d6de0f3fdaaf88fda05f89a1232c3f6364343cd5344\"" + }, + "AssetParameters952bd1c03e8201c4c1c67d6de0f3fdaaf88fda05f89a1232c3f6364343cd5344ArtifactHash1AB042BC": { + "Type": "String", + "Description": "Artifact hash for asset \"952bd1c03e8201c4c1c67d6de0f3fdaaf88fda05f89a1232c3f6364343cd5344\"" + }, "AssetParameters2acc31b34c05692ab3ea9831a27e5f241cffb21857e633d8256b8f0ebf5f3f43S3BucketB43AFE04": { "Type": "String", "Description": "S3 bucket for asset \"2acc31b34c05692ab3ea9831a27e5f241cffb21857e633d8256b8f0ebf5f3f43\"" @@ -4593,17 +4601,17 @@ "Type": "String", "Description": "Artifact hash for asset \"a69aadbed84d554dd9f2eb7987ffe5d8f76b53a86f1909059df07050e57bef0c\"" }, - "AssetParameters8a716921b900641df041bd35d4d1817780375a004ec952e2cab0cd621c5a4d64S3BucketAA0CCE0D": { + "AssetParameters25aed688c0803654674984565f9e68dec4fbd4f8427b6e9db1be3c61b4fa2956S3BucketE0699DCA": { "Type": "String", - "Description": "S3 bucket for asset \"8a716921b900641df041bd35d4d1817780375a004ec952e2cab0cd621c5a4d64\"" + "Description": "S3 bucket for asset \"25aed688c0803654674984565f9e68dec4fbd4f8427b6e9db1be3c61b4fa2956\"" }, - "AssetParameters8a716921b900641df041bd35d4d1817780375a004ec952e2cab0cd621c5a4d64S3VersionKey3012C8DD": { + "AssetParameters25aed688c0803654674984565f9e68dec4fbd4f8427b6e9db1be3c61b4fa2956S3VersionKey09D9D914": { "Type": "String", - "Description": "S3 key for asset version \"8a716921b900641df041bd35d4d1817780375a004ec952e2cab0cd621c5a4d64\"" + "Description": "S3 key for asset version \"25aed688c0803654674984565f9e68dec4fbd4f8427b6e9db1be3c61b4fa2956\"" }, - "AssetParameters8a716921b900641df041bd35d4d1817780375a004ec952e2cab0cd621c5a4d64ArtifactHashFBD3EEB7": { + "AssetParameters25aed688c0803654674984565f9e68dec4fbd4f8427b6e9db1be3c61b4fa2956ArtifactHash2F859D25": { "Type": "String", - "Description": "Artifact hash for asset \"8a716921b900641df041bd35d4d1817780375a004ec952e2cab0cd621c5a4d64\"" + "Description": "Artifact hash for asset \"25aed688c0803654674984565f9e68dec4fbd4f8427b6e9db1be3c61b4fa2956\"" }, "SsmParameterValueawsserviceeksoptimizedami118amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { "Type": "AWS::SSM::Parameter::Value", @@ -4626,4 +4634,4 @@ "Default": "/aws/service/eks/optimized-ami/1.14/amazon-linux-2/recommended/image_id" } } -} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eks/test/integ.fargate-cluster.ts b/packages/@aws-cdk/aws-eks/test/integ.fargate-cluster.ts index 704878c4091a7..a97389ce4622e 100644 --- a/packages/@aws-cdk/aws-eks/test/integ.fargate-cluster.ts +++ b/packages/@aws-cdk/aws-eks/test/integ.fargate-cluster.ts @@ -13,6 +13,7 @@ class EksFargateClusterStack extends TestStack { new eks.FargateCluster(this, 'FargateCluster', { version: CLUSTER_VERSION, + prune: false, }); } } diff --git a/packages/@aws-cdk/aws-eks/test/test.awsauth.ts b/packages/@aws-cdk/aws-eks/test/test.awsauth.ts index 631622aedc836..64c83bce12f2e 100644 --- a/packages/@aws-cdk/aws-eks/test/test.awsauth.ts +++ b/packages/@aws-cdk/aws-eks/test/test.awsauth.ts @@ -57,7 +57,7 @@ export = { 'empty aws-auth'(test: Test) { // GIVEN const { stack } = testFixtureNoVpc(); - const cluster = new Cluster(stack, 'cluster', { version: CLUSTER_VERSION }); + const cluster = new Cluster(stack, 'cluster', { version: CLUSTER_VERSION, prune: false }); // WHEN new AwsAuth(stack, 'AwsAuth', { cluster }); @@ -77,7 +77,7 @@ export = { 'addRoleMapping and addUserMapping can be used to define the aws-auth ConfigMap'(test: Test) { // GIVEN const { stack } = testFixtureNoVpc(); - const cluster = new Cluster(stack, 'Cluster', { version: CLUSTER_VERSION }); + const cluster = new Cluster(stack, 'Cluster', { version: CLUSTER_VERSION, prune: false }); const role = new iam.Role(stack, 'role', { assumedBy: new iam.AnyPrincipal() }); const user = new iam.User(stack, 'user'); @@ -185,7 +185,7 @@ export = { 'Fn::Join': [ '', [ - '[{"apiVersion":"v1","kind":"ConfigMap","metadata":{"name":"aws-auth","namespace":"kube-system"},"data":{"mapRoles":"[{\\"rolearn\\":\\"', + '[{"apiVersion":"v1","kind":"ConfigMap","metadata":{"name":"aws-auth","namespace":"kube-system","labels":{"aws.cdk.eks/prune-c82ececabf77e03e3590f2ebe02adba8641d1b3e76":""}},"data":{"mapRoles":"[{\\"rolearn\\":\\"', { 'Fn::GetAtt': [ 'ClusterMastersRole9AA35625', @@ -233,7 +233,7 @@ export = { 'addMastersRole after addNodegroup correctly'(test: Test) { // GIVEN const { stack } = testFixtureNoVpc(); - const cluster = new Cluster(stack, 'Cluster', { version: CLUSTER_VERSION }); + const cluster = new Cluster(stack, 'Cluster', { version: CLUSTER_VERSION, prune: false }); cluster.addNodegroupCapacity('NG'); const role = iam.Role.fromRoleArn(stack, 'imported-role', 'arn:aws:iam::123456789012:role/S3Access'); diff --git a/packages/@aws-cdk/aws-eks/test/test.cluster.ts b/packages/@aws-cdk/aws-eks/test/test.cluster.ts index 409fb829bbc93..d57c18561c2b4 100644 --- a/packages/@aws-cdk/aws-eks/test/test.cluster.ts +++ b/packages/@aws-cdk/aws-eks/test/test.cluster.ts @@ -28,6 +28,7 @@ export = { const cluster = new eks.Cluster(stack, 'Cluster', { version: CLUSTER_VERSION, + prune: false, }); // create a plain construct, not a cdk8s chart @@ -44,6 +45,7 @@ export = { const cluster = new eks.Cluster(stack, 'Cluster', { version: CLUSTER_VERSION, + prune: false, }); // create a plain construct, not a cdk8s chart @@ -60,6 +62,7 @@ export = { const cluster = new eks.Cluster(stack, 'Cluster', { version: CLUSTER_VERSION, + prune: false, }); const app = new cdk8s.App(); @@ -103,6 +106,7 @@ export = { const cluster = new eks.Cluster(stack, 'Cluster', { version: CLUSTER_VERSION, + prune: false, }); test.deepEqual(cluster.connections.securityGroups.map(sg => stack.resolve(sg.securityGroupId)), [ @@ -123,6 +127,7 @@ export = { super(scope, id); this.eksCluster = new eks.Cluster(this, 'Cluster', { version: CLUSTER_VERSION, + prune: false, securityGroup: props.sg, vpc: props.vpc, }); @@ -161,6 +166,7 @@ export = { super(scope, id, props); this.eksCluster = new eks.Cluster(this, 'Cluster', { version: CLUSTER_VERSION, + prune: false, }); } } @@ -212,6 +218,7 @@ export = { super(scope, id, props); this.eksCluster = new eks.Cluster(this, 'Cluster', { version: CLUSTER_VERSION, + prune: false, }); } } @@ -254,6 +261,7 @@ export = { super(scope, id, props); this.eksCluster = new eks.Cluster(this, 'Cluster', { version: CLUSTER_VERSION, + prune: false, }); } } @@ -287,6 +295,7 @@ export = { super(scope, id, props); this.eksCluster = new eks.Cluster(this, 'Cluster', { version: CLUSTER_VERSION, + prune: false, }); } } @@ -307,7 +316,6 @@ export = { nodeType: eks.NodeType.STANDARD, }), }); - } } @@ -334,6 +342,7 @@ export = { super(scope, id, props); this.eksCluster = new eks.Cluster(this, 'EKSCluster', { version: CLUSTER_VERSION, + prune: false, }); } } @@ -361,7 +370,7 @@ export = { const { stack, vpc } = testFixture(); // WHEN - new eks.Cluster(stack, 'Cluster', { vpc, defaultCapacity: 0, version: CLUSTER_VERSION }); + new eks.Cluster(stack, 'Cluster', { vpc, defaultCapacity: 0, version: CLUSTER_VERSION, prune: false }); // THEN expect(stack).to(haveResourceLike('Custom::AWSCDK-EKS-Cluster', { @@ -390,7 +399,7 @@ export = { // WHEN const vpc = new ec2.Vpc(stack, 'VPC'); - new eks.Cluster(stack, 'Cluster', { vpc, defaultCapacity: 0, version: CLUSTER_VERSION }); + new eks.Cluster(stack, 'Cluster', { vpc, defaultCapacity: 0, version: CLUSTER_VERSION, prune: false }); kubectl.getOrCreateKubectlLayer(stack); // THEN @@ -410,7 +419,7 @@ export = { // WHEN const vpc = new ec2.Vpc(stack, 'VPC'); - new eks.Cluster(stack, 'Cluster', { vpc, defaultCapacity: 0, version: CLUSTER_VERSION }); + new eks.Cluster(stack, 'Cluster', { vpc, defaultCapacity: 0, version: CLUSTER_VERSION, prune: false }); kubectl.getOrCreateKubectlLayer(stack); // THEN @@ -428,7 +437,7 @@ export = { const { stack } = testFixtureNoVpc(); // WHEN - new eks.Cluster(stack, 'cluster', { version: CLUSTER_VERSION }) ; + new eks.Cluster(stack, 'cluster', { version: CLUSTER_VERSION, prune: false }) ; // THEN expect(stack).to(haveResource('AWS::EC2::VPC')); @@ -442,7 +451,7 @@ export = { const { stack } = testFixtureNoVpc(); // WHEN - const cluster = new eks.Cluster(stack, 'cluster', { version: CLUSTER_VERSION }); + const cluster = new eks.Cluster(stack, 'cluster', { version: CLUSTER_VERSION, prune: false }); // THEN test.ok(cluster.defaultNodegroup); @@ -468,6 +477,7 @@ export = { defaultCapacity: 10, defaultCapacityInstance: new ec2.InstanceType('m2.xlarge'), version: CLUSTER_VERSION, + prune: false, }); // THEN @@ -488,7 +498,7 @@ export = { const { stack } = testFixtureNoVpc(); // WHEN - const cluster = new eks.Cluster(stack, 'cluster', { defaultCapacity: 0, version: CLUSTER_VERSION }); + const cluster = new eks.Cluster(stack, 'cluster', { defaultCapacity: 0, version: CLUSTER_VERSION, prune: false }); // THEN test.ok(!cluster.defaultCapacity); @@ -503,7 +513,7 @@ export = { const { stack, vpc } = testFixture(); // WHEN - new eks.Cluster(stack, 'Cluster', { vpc, defaultCapacity: 0, version: CLUSTER_VERSION }); + new eks.Cluster(stack, 'Cluster', { vpc, defaultCapacity: 0, version: CLUSTER_VERSION, prune: false }); // THEN expect(stack).to(haveResource('AWS::EC2::Subnet', { @@ -523,7 +533,7 @@ export = { const { stack, vpc } = testFixture(); // WHEN - new eks.Cluster(stack, 'Cluster', { vpc, defaultCapacity: 0, version: CLUSTER_VERSION }); + new eks.Cluster(stack, 'Cluster', { vpc, defaultCapacity: 0, version: CLUSTER_VERSION, prune: false }); // THEN expect(stack).to(haveResource('AWS::EC2::Subnet', { @@ -546,6 +556,7 @@ export = { vpc, defaultCapacity: 0, version: CLUSTER_VERSION, + prune: false, }); // WHEN @@ -564,6 +575,7 @@ export = { vpc, defaultCapacity: 0, version: CLUSTER_VERSION, + prune: false, }); // WHEN @@ -599,6 +611,7 @@ export = { defaultCapacity: 10, defaultCapacityInstance: new ec2.InstanceType('m2.xlarge'), version: CLUSTER_VERSION, + prune: false, }); const existingRole = new iam.Role(stack, 'ExistingRole', { @@ -629,6 +642,7 @@ export = { vpc, defaultCapacity: 0, version: CLUSTER_VERSION, + prune: false, }); // WHEN @@ -662,6 +676,7 @@ export = { vpc, defaultCapacity: 0, version: CLUSTER_VERSION, + prune: false, }); test.throws(() => cluster.addAutoScalingGroupCapacity('Bottlerocket', { @@ -703,6 +718,7 @@ export = { vpc, defaultCapacity: 0, version: CLUSTER_VERSION, + prune: false, }); // WHEN @@ -759,6 +775,7 @@ export = { mastersRole: role, defaultCapacity: 0, version: CLUSTER_VERSION, + prune: false, }); // THEN @@ -797,6 +814,7 @@ export = { vpc, defaultCapacity: 0, version: CLUSTER_VERSION, + prune: false, }); // WHEN @@ -818,7 +836,7 @@ export = { 'kubectl resources can be created in a separate stack'(test: Test) { // GIVEN const { stack, app } = testFixture(); - const cluster = new eks.Cluster(stack, 'cluster', { version: CLUSTER_VERSION }); // cluster is under stack2 + const cluster = new eks.Cluster(stack, 'cluster', { version: CLUSTER_VERSION, prune: false }); // cluster is under stack2 // WHEN resource is under stack2 const stack2 = new cdk.Stack(app, 'stack2', { env: { account: stack.account, region: stack.region } }); @@ -859,6 +877,7 @@ export = { vpc, defaultCapacity: 0, version: CLUSTER_VERSION, + prune: false, }); // WHEN @@ -909,6 +928,7 @@ export = { vpc, defaultCapacity: 0, version: CLUSTER_VERSION, + prune: false, }); // WHEN @@ -951,7 +971,7 @@ export = { const { app, stack } = testFixtureNoVpc(); // WHEN - new eks.Cluster(stack, 'Cluster', { version: CLUSTER_VERSION }); + new eks.Cluster(stack, 'Cluster', { version: CLUSTER_VERSION, prune: false }); // THEN const assembly = app.synth(); @@ -972,6 +992,7 @@ export = { new eks.Cluster(stack, 'Cluster', { mastersRole, version: CLUSTER_VERSION, + prune: false, }); // THEN @@ -994,6 +1015,7 @@ export = { mastersRole, outputConfigCommand: false, version: CLUSTER_VERSION, + prune: false, }); // THEN @@ -1012,6 +1034,7 @@ export = { outputConfigCommand: false, outputClusterName: true, version: CLUSTER_VERSION, + prune: false, }); // THEN @@ -1033,6 +1056,7 @@ export = { outputMastersRoleArn: true, mastersRole: new iam.Role(stack, 'masters', { assumedBy: new iam.AccountRootPrincipal() }), version: CLUSTER_VERSION, + prune: false, }); // THEN @@ -1049,7 +1073,7 @@ export = { 'rendered by default for ASGs'(test: Test) { // GIVEN const { app, stack } = testFixtureNoVpc(); - const cluster = new eks.Cluster(stack, 'Cluster', { defaultCapacity: 0, version: CLUSTER_VERSION }); + const cluster = new eks.Cluster(stack, 'Cluster', { defaultCapacity: 0, version: CLUSTER_VERSION, prune: false }); // WHEN cluster.addAutoScalingGroupCapacity('MyCapcity', { instanceType: new ec2.InstanceType('m3.xlargs') }); @@ -1064,7 +1088,7 @@ export = { 'not rendered if bootstrap is disabled'(test: Test) { // GIVEN const { app, stack } = testFixtureNoVpc(); - const cluster = new eks.Cluster(stack, 'Cluster', { defaultCapacity: 0, version: CLUSTER_VERSION }); + const cluster = new eks.Cluster(stack, 'Cluster', { defaultCapacity: 0, version: CLUSTER_VERSION, prune: false }); // WHEN cluster.addAutoScalingGroupCapacity('MyCapcity', { @@ -1083,7 +1107,7 @@ export = { 'bootstrap options'(test: Test) { // GIVEN const { app, stack } = testFixtureNoVpc(); - const cluster = new eks.Cluster(stack, 'Cluster', { defaultCapacity: 0, version: CLUSTER_VERSION }); + const cluster = new eks.Cluster(stack, 'Cluster', { defaultCapacity: 0, version: CLUSTER_VERSION, prune: false }); // WHEN cluster.addAutoScalingGroupCapacity('MyCapcity', { @@ -1105,7 +1129,7 @@ export = { 'nodes labeled an tainted accordingly'(test: Test) { // GIVEN const { app, stack } = testFixtureNoVpc(); - const cluster = new eks.Cluster(stack, 'Cluster', { defaultCapacity: 0, version: CLUSTER_VERSION }); + const cluster = new eks.Cluster(stack, 'Cluster', { defaultCapacity: 0, version: CLUSTER_VERSION, prune: false }); // WHEN cluster.addAutoScalingGroupCapacity('MyCapcity', { @@ -1123,7 +1147,7 @@ export = { 'interrupt handler is added'(test: Test) { // GIVEN const { stack } = testFixtureNoVpc(); - const cluster = new eks.Cluster(stack, 'Cluster', { defaultCapacity: 0, version: CLUSTER_VERSION }); + const cluster = new eks.Cluster(stack, 'Cluster', { defaultCapacity: 0, version: CLUSTER_VERSION, prune: false }); // WHEN cluster.addAutoScalingGroupCapacity('MyCapcity', { @@ -1145,7 +1169,7 @@ export = { 'its possible to add two capacities with spot instances and only one stop handler will be installed'(test: Test) { // GIVEN const { stack } = testFixtureNoVpc(); - const cluster = new eks.Cluster(stack, 'Cluster', { defaultCapacity: 0, version: CLUSTER_VERSION }); + const cluster = new eks.Cluster(stack, 'Cluster', { defaultCapacity: 0, version: CLUSTER_VERSION, prune: false }); // WHEN cluster.addAutoScalingGroupCapacity('Spot1', { @@ -1170,7 +1194,7 @@ export = { 'if bootstrap is disabled cannot specify options'(test: Test) { // GIVEN const { stack } = testFixtureNoVpc(); - const cluster = new eks.Cluster(stack, 'Cluster', { defaultCapacity: 0, version: CLUSTER_VERSION }); + const cluster = new eks.Cluster(stack, 'Cluster', { defaultCapacity: 0, version: CLUSTER_VERSION, prune: false }); // THEN test.throws(() => cluster.addAutoScalingGroupCapacity('MyCapcity', { @@ -1232,6 +1256,7 @@ export = { new eks.Cluster(stack, 'cluster', { defaultCapacity: 1, version: CLUSTER_VERSION, + prune: false, defaultCapacityInstance: new ec2.InstanceType('m6g.medium'), }); @@ -1250,6 +1275,7 @@ export = { new eks.Cluster(stack, 'cluster', { defaultCapacity: 0, version: CLUSTER_VERSION, + prune: false, defaultCapacityInstance: new ec2.InstanceType('m6g.medium'), }).addNodegroupCapacity('ng', { instanceType: new ec2.InstanceType('m6g.medium'), @@ -1270,6 +1296,7 @@ export = { new eks.Cluster(stack, 'cluster', { defaultCapacity: 0, version: CLUSTER_VERSION, + prune: false, defaultCapacityInstance: new ec2.InstanceType('t4g.medium'), }).addNodegroupCapacity('ng', { instanceType: new ec2.InstanceType('t4g.medium'), @@ -1290,6 +1317,7 @@ export = { new eks.Cluster(stack, 'cluster', { defaultCapacity: 0, version: CLUSTER_VERSION, + prune: false, }).addAutoScalingGroupCapacity('ng', { instanceType: new ec2.InstanceType('t4g.medium'), }); @@ -1312,6 +1340,7 @@ export = { new eks.Cluster(stack, 'cluster', { defaultCapacity: 0, version: CLUSTER_VERSION, + prune: false, }).addAutoScalingGroupCapacity('GPUCapacity', { instanceType: new ec2.InstanceType('g4dn.xlarge'), }); @@ -1333,6 +1362,7 @@ export = { new eks.Cluster(stack, 'cluster', { defaultCapacity: 0, version: CLUSTER_VERSION, + prune: false, }).addAutoScalingGroupCapacity('ARMCapacity', { instanceType: new ec2.InstanceType('m6g.medium'), }); @@ -1375,6 +1405,7 @@ export = { new eks.Cluster(stack, 'MyCluster', { clusterName: 'my-cluster-name', version: CLUSTER_VERSION, + prune: false, }); // THEN @@ -1555,7 +1586,7 @@ export = { const { stack } = testFixture(); // WHEN - new eks.Cluster(stack, 'MyCluster', { version: CLUSTER_VERSION }); + new eks.Cluster(stack, 'MyCluster', { version: CLUSTER_VERSION, prune: false }); // THEN expect(stack).to(haveResource('AWS::IAM::Policy', { @@ -1648,6 +1679,7 @@ export = { const cluster = new eks.Cluster(stack, 'MyCluster', { clusterName: 'my-cluster-name', version: CLUSTER_VERSION, + prune: false, }); // WHEN @@ -1697,6 +1729,7 @@ export = { new eks.Cluster(stack, 'MyCluster', { coreDnsComputeType: eks.CoreDnsComputeType.FARGATE, version: CLUSTER_VERSION, + prune: false, }); // THEN @@ -1720,7 +1753,7 @@ export = { 'if openIDConnectProvider a new OpenIDConnectProvider resource is created and exposed'(test: Test) { // GIVEN const { stack } = testFixtureNoVpc(); - const cluster = new eks.Cluster(stack, 'Cluster', { defaultCapacity: 0, version: CLUSTER_VERSION }); + const cluster = new eks.Cluster(stack, 'Cluster', { defaultCapacity: 0, version: CLUSTER_VERSION, prune: false }); // WHEN const provider = cluster.openIdConnectProvider; @@ -1752,7 +1785,7 @@ export = { 'inference instances are supported'(test: Test) { // GIVEN const { stack } = testFixtureNoVpc(); - const cluster = new eks.Cluster(stack, 'Cluster', { defaultCapacity: 0, version: CLUSTER_VERSION }); + const cluster = new eks.Cluster(stack, 'Cluster', { defaultCapacity: 0, version: CLUSTER_VERSION, prune: false }); // WHEN cluster.addAutoScalingGroupCapacity('InferenceInstances', { @@ -1772,7 +1805,7 @@ export = { 'kubectl resources are always created after all fargate profiles'(test: Test) { // GIVEN const { stack, app } = testFixture(); - const cluster = new eks.Cluster(stack, 'Cluster', { version: CLUSTER_VERSION }); + const cluster = new eks.Cluster(stack, 'Cluster', { version: CLUSTER_VERSION, prune: false }); // WHEN cluster.addFargateProfile('profile1', { selectors: [{ namespace: 'profile1' }] }); @@ -1820,7 +1853,7 @@ export = { 'kubectl provider role can assume creation role'(test: Test) { // GIVEN const { stack } = testFixture(); - const c1 = new eks.Cluster(stack, 'Cluster1', { version: CLUSTER_VERSION }); + const c1 = new eks.Cluster(stack, 'Cluster1', { version: CLUSTER_VERSION, prune: false }); // WHEN @@ -1862,6 +1895,7 @@ export = { const cluster = new eks.Cluster(stack, 'Cluster1', { version: CLUSTER_VERSION, + prune: false, endpointAccess: eks.EndpointAccess.PRIVATE, kubectlEnvironment: { Foo: 'Bar', @@ -1908,6 +1942,7 @@ export = { new eks.Cluster(stack, 'Cluster', { version: CLUSTER_VERSION, + prune: false, endpointAccess: eks.EndpointAccess.PUBLIC, vpcSubnets: [{ subnetType: ec2.SubnetType.PUBLIC }], }); @@ -1928,6 +1963,7 @@ export = { new eks.Cluster(stack, 'Cluster', { version: CLUSTER_VERSION, + prune: false, endpointAccess: eks.EndpointAccess.PUBLIC, }); @@ -1948,6 +1984,7 @@ export = { test.throws(() => { new eks.Cluster(stack, 'Cluster', { version: CLUSTER_VERSION, + prune: false, endpointAccess: eks.EndpointAccess.PRIVATE, vpcSubnets: [{ subnetType: ec2.SubnetType.PUBLIC }], }); @@ -1962,6 +1999,7 @@ export = { new eks.Cluster(stack, 'Cluster', { version: CLUSTER_VERSION, + prune: false, endpointAccess: eks.EndpointAccess.PRIVATE, }); @@ -1981,6 +2019,7 @@ export = { new eks.Cluster(stack, 'Cluster', { version: CLUSTER_VERSION, + prune: false, endpointAccess: eks.EndpointAccess.PUBLIC_AND_PRIVATE, vpcSubnets: [{ subnetType: ec2.SubnetType.PUBLIC }], }); @@ -2000,6 +2039,7 @@ export = { new eks.Cluster(stack, 'Cluster', { version: CLUSTER_VERSION, + prune: false, endpointAccess: eks.EndpointAccess.PUBLIC_AND_PRIVATE, }); @@ -2019,6 +2059,7 @@ export = { test.throws(() => { new eks.Cluster(stack, 'Cluster', { version: CLUSTER_VERSION, + prune: false, endpointAccess: eks.EndpointAccess.PUBLIC_AND_PRIVATE.onlyFrom('1.2.3.4/32'), vpcSubnets: [{ subnetType: ec2.SubnetType.PUBLIC }], }); @@ -2032,6 +2073,7 @@ export = { new eks.Cluster(stack, 'Cluster', { version: CLUSTER_VERSION, + prune: false, endpointAccess: eks.EndpointAccess.PUBLIC_AND_PRIVATE.onlyFrom('1.2.3.4/32'), }); @@ -2093,6 +2135,7 @@ export = { new eks.Cluster(stack, 'Cluster', { vpc, version: CLUSTER_VERSION, + prune: false, endpointAccess: eks.EndpointAccess.PRIVATE, }); @@ -2154,6 +2197,7 @@ export = { new eks.Cluster(stack, 'Cluster', { vpc, version: CLUSTER_VERSION, + prune: false, endpointAccess: eks.EndpointAccess.PRIVATE, vpcSubnets: [{ subnets: [ @@ -2182,6 +2226,7 @@ export = { new eks.Cluster(stack, 'Cluster', { vpc, version: CLUSTER_VERSION, + prune: false, endpointAccess: eks.EndpointAccess.PRIVATE, vpcSubnets: [{ subnets: [ @@ -2207,6 +2252,7 @@ export = { const { stack } = testFixture(); new eks.Cluster(stack, 'Cluster', { version: CLUSTER_VERSION, + prune: false, endpointAccess: eks.EndpointAccess.PRIVATE, vpcSubnets: [{ @@ -2231,7 +2277,7 @@ export = { 'can configure private endpoint access'(test: Test) { // GIVEN const { stack } = testFixture(); - new eks.Cluster(stack, 'Cluster1', { version: CLUSTER_VERSION, endpointAccess: eks.EndpointAccess.PRIVATE }); + new eks.Cluster(stack, 'Cluster1', { version: CLUSTER_VERSION, endpointAccess: eks.EndpointAccess.PRIVATE, prune: false }); test.equal(expect(stack).value.Resources.Cluster1B02DD5A2.Properties.Config.resourcesVpcConfig.endpointPrivateAccess, true); test.equal(expect(stack).value.Resources.Cluster1B02DD5A2.Properties.Config.resourcesVpcConfig.endpointPublicAccess, false); @@ -2260,6 +2306,7 @@ export = { const cluster = new eks.Cluster(stack, 'Cluster1', { version: CLUSTER_VERSION, + prune: false, endpointAccess: eks.EndpointAccess.PRIVATE, vpc, }); @@ -2325,6 +2372,7 @@ export = { const cluster = new eks.Cluster(stack, 'Cluster1', { version: CLUSTER_VERSION, + prune: false, endpointAccess: eks.EndpointAccess.PRIVATE, vpc: vpc2, }); @@ -2374,6 +2422,7 @@ export = { const cluster = new eks.Cluster(stack, 'Cluster1', { version: CLUSTER_VERSION, + prune: false, endpointAccess: eks.EndpointAccess.PRIVATE, vpc: vpc2, vpcSubnets: [{ subnetGroupName: 'Private1' }, { subnetGroupName: 'Private2' }], @@ -2429,6 +2478,7 @@ export = { enableDnsSupport: false, }), version: CLUSTER_VERSION, + prune: false, }); }, /Private endpoint access requires the VPC to have DNS support and DNS hostnames enabled/); test.done(); @@ -2444,6 +2494,7 @@ export = { enableDnsHostnames: false, }), version: CLUSTER_VERSION, + prune: false, }); }, /Private endpoint access requires the VPC to have DNS support and DNS hostnames enabled/); test.done(); @@ -2462,7 +2513,7 @@ export = { 'getServiceLoadBalancerAddress'(test: Test) { const { stack } = testFixture(); - const cluster = new eks.Cluster(stack, 'Cluster1', { version: CLUSTER_VERSION }); + const cluster = new eks.Cluster(stack, 'Cluster1', { version: CLUSTER_VERSION, prune: false }); const loadBalancerAddress = cluster.getServiceLoadBalancerAddress('myservice'); @@ -2511,6 +2562,7 @@ export = { const layer = lambda.LayerVersion.fromLayerVersionArn(stack, 'MyLayer', 'arn:of:layer'); new eks.Cluster(stack, 'Cluster1', { version: CLUSTER_VERSION, + prune: false, kubectlLayer: layer, }); @@ -2535,6 +2587,7 @@ export = { new eks.Cluster(stack, 'Cluster1', { version: CLUSTER_VERSION, + prune: false, kubectlLayer: layer, }); @@ -2562,6 +2615,7 @@ export = { new eks.Cluster(stack, 'Cluster', { vpc, version: CLUSTER_VERSION, + prune: false, secretsEncryptionKey: new kms.Key(stack, 'Key'), }); diff --git a/packages/@aws-cdk/aws-eks/test/test.fargate.ts b/packages/@aws-cdk/aws-eks/test/test.fargate.ts index 2787122883b82..a606a5cfe7496 100644 --- a/packages/@aws-cdk/aws-eks/test/test.fargate.ts +++ b/packages/@aws-cdk/aws-eks/test/test.fargate.ts @@ -314,7 +314,7 @@ export = { 'Fn::Join': [ '', [ - '[{"apiVersion":"v1","kind":"ConfigMap","metadata":{"name":"aws-auth","namespace":"kube-system"},"data":{"mapRoles":"[{\\"rolearn\\":\\"', + '[{"apiVersion":"v1","kind":"ConfigMap","metadata":{"name":"aws-auth","namespace":"kube-system","labels":{"aws.cdk.eks/prune-c858eb9c291620a59a3334f61f9b8a259e9786af60":""}},"data":{"mapRoles":"[{\\"rolearn\\":\\"', { 'Fn::GetAtt': [ 'FargateClusterMastersRole50BAF9FD', diff --git a/packages/@aws-cdk/aws-eks/test/test.k8s-manifest.ts b/packages/@aws-cdk/aws-eks/test/test.k8s-manifest.ts index b00a33012c5ae..8cad065c454f6 100644 --- a/packages/@aws-cdk/aws-eks/test/test.k8s-manifest.ts +++ b/packages/@aws-cdk/aws-eks/test/test.k8s-manifest.ts @@ -1,8 +1,8 @@ -import { expect, haveResource } from '@aws-cdk/assert'; +import { expect, haveResource, SynthUtils } from '@aws-cdk/assert'; import { Stack } from '@aws-cdk/core'; import { Test } from 'nodeunit'; import { Cluster, KubernetesManifest, KubernetesVersion, HelmChart } from '../lib'; -import { testFixtureNoVpc } from './util'; +import { testFixtureNoVpc, testFixtureCluster } from './util'; /* eslint-disable max-len */ @@ -108,4 +108,257 @@ export = { test.done(); }, + + 'prune labels': { + + 'base case'(test: Test) { + // GIVEN + const { stack } = testFixtureNoVpc(); + + // prune is enabled by default + const cluster = new Cluster(stack, 'Cluster', { + version: KubernetesVersion.V1_16, + }); + + test.equal(cluster.prune, true, '"prune" is enabled by default'); + + // WHEN + cluster.addManifest('m1', { + apiVersion: 'v1beta1', + kind: 'Foo', + }); + + // THEN + expect(stack).to(haveResource(KubernetesManifest.RESOURCE_TYPE, { + Manifest: JSON.stringify([{ + apiVersion: 'v1beta1', + kind: 'Foo', + metadata: { + labels: { + 'aws.cdk.eks/prune-c89a5983505f58231ac2a9a86fd82735ccf2308eac': '', + }, + }, + }]), + PruneLabel: 'aws.cdk.eks/prune-c89a5983505f58231ac2a9a86fd82735ccf2308eac', + })); + + test.done(); + }, + + 'multiple resources in the same manifest'(test: Test) { + // GIVEN + const { stack, cluster } = testFixtureCluster({ prune: true }); + + // WHEN + cluster.addManifest('m1', + { + apiVersion: 'v1beta', + kind: 'Foo', + }, + { + apiVersion: 'v1', + kind: 'Pod', + metadata: { + name: 'foo', + labels: { + bar: 1234, + }, + }, + spec: { + containers: [{ name: 'main', image: 'main' }], + }, + }, + ); + + // THEN + expect(stack).to(haveResource(KubernetesManifest.RESOURCE_TYPE, { + Manifest: JSON.stringify([ + { + apiVersion: 'v1beta', + kind: 'Foo', + metadata: { + labels: { + 'aws.cdk.eks/prune-c89a5983505f58231ac2a9a86fd82735ccf2308eac': '', + }, + }, + }, + { + apiVersion: 'v1', + kind: 'Pod', + metadata: { + name: 'foo', + labels: { + 'aws.cdk.eks/prune-c89a5983505f58231ac2a9a86fd82735ccf2308eac': '', + 'bar': 1234, + }, + }, + spec: { + containers: [ + { + name: 'main', + image: 'main', + }, + ], + }, + }, + ]), + PruneLabel: 'aws.cdk.eks/prune-c89a5983505f58231ac2a9a86fd82735ccf2308eac', + })); + + test.done(); + }, + + 'different KubernetesManifest resource use different prune labels'(test: Test) { + // GIVEN + const { stack, cluster } = testFixtureCluster({ prune: true }); + + // WHEN + cluster.addManifest('m1', { + apiVersion: 'v1beta', + kind: 'Foo', + }); + + cluster.addManifest('m2', { + apiVersion: 'v1', + kind: 'Pod', + metadata: { + name: 'foo', + labels: { + bar: 1234, + }, + }, + spec: { + containers: [{ name: 'main', image: 'main' }], + }, + }); + + // THEN + expect(stack).to(haveResource(KubernetesManifest.RESOURCE_TYPE, { + Manifest: JSON.stringify([ + { + apiVersion: 'v1beta', + kind: 'Foo', + metadata: { + labels: { + 'aws.cdk.eks/prune-c89a5983505f58231ac2a9a86fd82735ccf2308eac': '', + }, + }, + }, + ]), + PruneLabel: 'aws.cdk.eks/prune-c89a5983505f58231ac2a9a86fd82735ccf2308eac', + })); + + expect(stack).to(haveResource(KubernetesManifest.RESOURCE_TYPE, { + Manifest: JSON.stringify([ + { + apiVersion: 'v1', + kind: 'Pod', + metadata: { + name: 'foo', + labels: { + 'aws.cdk.eks/prune-c8aff6ac817006dd4d644e9d99b2cdbb8c8cd036d9': '', + 'bar': 1234, + }, + }, + spec: { + containers: [ + { + name: 'main', + image: 'main', + }, + ], + }, + }, + ]), + PruneLabel: 'aws.cdk.eks/prune-c8aff6ac817006dd4d644e9d99b2cdbb8c8cd036d9', + })); + + test.done(); + }, + + 'ignores resources without "kind"'(test: Test) { + // GIVEN + const { stack, cluster } = testFixtureCluster({ prune: true }); + + // WHEN + cluster.addManifest('m1', { + malformed: { resource: 'yes' }, + }); + + // THEN + expect(stack).to(haveResource(KubernetesManifest.RESOURCE_TYPE, { + Manifest: JSON.stringify([{ malformed: { resource: 'yes' } }]), + PruneLabel: 'aws.cdk.eks/prune-c89a5983505f58231ac2a9a86fd82735ccf2308eac', + })); + + test.done(); + }, + + 'ignores entries that are not objects (invalid type)'(test: Test) { + // GIVEN + const { stack, cluster } = testFixtureCluster({ prune: true }); + test.equal(cluster.prune, true); + + // WHEN + cluster.addManifest('m1', ['foo']); + + // THEN + expect(stack).to(haveResource(KubernetesManifest.RESOURCE_TYPE, { + Manifest: JSON.stringify([['foo']]), + PruneLabel: 'aws.cdk.eks/prune-c89a5983505f58231ac2a9a86fd82735ccf2308eac', + })); + + test.done(); + }, + + 'no prune labels when "prune" is disabled'(test: Test) { + // GIVEN + const { stack } = testFixtureNoVpc(); + const cluster = new Cluster(stack, 'Cluster', { + version: KubernetesVersion.V1_16, + prune: false, + }); + + // WHEN + cluster.addManifest('m1', { apiVersion: 'v1beta', kind: 'Foo' }); + + // if "prune" is not specified at the manifest level, it is derived from the cluster settings. + new KubernetesManifest(stack, 'm2', { + cluster, + manifest: [{ apiVersion: 'v1', kind: 'Pod' }], + }); + + // can be overridden at the manifest level + new KubernetesManifest(stack, 'm3', { + cluster, + manifest: [{ apiVersion: 'v1', kind: 'Deployment' }], + prune: true, + }); + + // THEN + const template = SynthUtils.synthesize(stack).template; + + const m1 = template.Resources.Clustermanifestm1E5FBE3C1.Properties; + const m2 = template.Resources.m201F909C5.Properties; + const m3 = template.Resources.m3B0AF9264.Properties; + + test.deepEqual(m1.Manifest, JSON.stringify([{ apiVersion: 'v1beta', kind: 'Foo' }])); + test.deepEqual(m2.Manifest, JSON.stringify([{ apiVersion: 'v1', kind: 'Pod' }])); + test.deepEqual(m3.Manifest, JSON.stringify([ + { + apiVersion: 'v1', + kind: 'Deployment', + metadata: { + labels: { + 'aws.cdk.eks/prune-c8971972440c5bb3661e468e4cb8069f7ee549414c': '', + }, + }, + }, + ])); + test.ok(!m1.PruneLabel); + test.ok(!m2.PruneLabel); + test.equal(m3.PruneLabel, 'aws.cdk.eks/prune-c8971972440c5bb3661e468e4cb8069f7ee549414c'); + test.done(); + }, + }, }; diff --git a/packages/@aws-cdk/aws-eks/test/test.nodegroup.ts b/packages/@aws-cdk/aws-eks/test/test.nodegroup.ts index c21f81ded307a..29d683d2c0d09 100644 --- a/packages/@aws-cdk/aws-eks/test/test.nodegroup.ts +++ b/packages/@aws-cdk/aws-eks/test/test.nodegroup.ts @@ -72,7 +72,7 @@ export = { 'Fn::Join': [ '', [ - '[{"apiVersion":"v1","kind":"ConfigMap","metadata":{"name":"aws-auth","namespace":"kube-system"},"data":{"mapRoles":"[{\\"rolearn\\":\\"', + '[{"apiVersion":"v1","kind":"ConfigMap","metadata":{"name":"aws-auth","namespace":"kube-system","labels":{"aws.cdk.eks/prune-c82ececabf77e03e3590f2ebe02adba8641d1b3e76":""}},"data":{"mapRoles":"[{\\"rolearn\\":\\"', { 'Fn::GetAtt': [ 'ClusterMastersRole9AA35625', @@ -106,6 +106,7 @@ export = { 'Arn', ], }, + PruneLabel: 'aws.cdk.eks/prune-c82ececabf77e03e3590f2ebe02adba8641d1b3e76', })); test.done(); }, diff --git a/packages/@aws-cdk/aws-eks/test/test.service-account.ts b/packages/@aws-cdk/aws-eks/test/test.service-account.ts index 14207c92cf64d..cf83a8527cdf2 100644 --- a/packages/@aws-cdk/aws-eks/test/test.service-account.ts +++ b/packages/@aws-cdk/aws-eks/test/test.service-account.ts @@ -130,11 +130,12 @@ export = { 'Outputs.StackStackClusterF0EB02FAKubectlProviderframeworkonEvent8377F076Arn', ], }, + PruneLabel: 'aws.cdk.eks/prune-c8d8e1722a4f3ed332f8ac74cb3d962f01fbb62291', Manifest: { 'Fn::Join': [ '', [ - '[{"apiVersion":"v1","kind":"ServiceAccount","metadata":{"name":"stackclustermyserviceaccount373b933c","namespace":"default","labels":{"app.kubernetes.io/name":"stackclustermyserviceaccount373b933c"},"annotations":{"eks.amazonaws.com/role-arn":"', + '[{"apiVersion":"v1","kind":"ServiceAccount","metadata":{"name":"stackclustermyserviceaccount373b933c","namespace":"default","labels":{"aws.cdk.eks/prune-c8d8e1722a4f3ed332f8ac74cb3d962f01fbb62291":"","app.kubernetes.io/name":"stackclustermyserviceaccount373b933c"},"annotations":{"eks.amazonaws.com/role-arn":"', { 'Fn::GetAtt': [ 'ClusterMyServiceAccountRole85337B29', diff --git a/packages/@aws-cdk/aws-eks/test/util.ts b/packages/@aws-cdk/aws-eks/test/util.ts index 2d1490e79d62f..c2e32783e7468 100644 --- a/packages/@aws-cdk/aws-eks/test/util.ts +++ b/packages/@aws-cdk/aws-eks/test/util.ts @@ -1,7 +1,7 @@ import * as ec2 from '@aws-cdk/aws-ec2'; import { App, Stack } from '@aws-cdk/core'; import { Construct } from 'constructs'; -import { Cluster, KubernetesVersion } from '../lib'; +import { Cluster, ClusterProps, KubernetesVersion } from '../lib'; const CLUSTER_VERSION = KubernetesVersion.V1_16; @@ -18,9 +18,13 @@ export function testFixtureNoVpc() { return { stack, app }; } -export function testFixtureCluster() { +export function testFixtureCluster(props: Omit = {}) { const { stack, app } = testFixtureNoVpc(); - const cluster = new Cluster(stack, 'Cluster', { version: CLUSTER_VERSION }); + const cluster = new Cluster(stack, 'Cluster', { + version: CLUSTER_VERSION, + prune: false, // mainly because this feature was added later and we wanted to avoid having to update all test expectations.... + ...props, + }); return { stack, app, cluster }; } From 1be831abc873c60df16c769ccf5e21fb9b1733c0 Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Thu, 10 Dec 2020 15:26:23 +0000 Subject: [PATCH 308/314] chore(apigatewayv2): rename 'domainName' to 'name' in the DomainName construct (#11989) C# does not allow a property to have the same name as its class. Jsii works around this by renaming the construct to `_DomainName` which is ugly. Instead, change the property name from `domainName` to `name` and avoid this conflict entirely. Further, re-categorize these class of defects as an error instead of a warning. BREAKING CHANGE: `domainName` property under `DomainName` has been renamed to `name`. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../lib/common/domain-name.ts | 29 ++++--------------- .../aws-apigatewayv2/lib/http/api-mapping.ts | 2 +- .../@aws-cdk/aws-apigatewayv2/package.json | 4 +++ .../test/http/domain-name.test.ts | 4 +-- 4 files changed, 13 insertions(+), 26 deletions(-) diff --git a/packages/@aws-cdk/aws-apigatewayv2/lib/common/domain-name.ts b/packages/@aws-cdk/aws-apigatewayv2/lib/common/domain-name.ts index eaef6605ef897..94d284c7f16c6 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/lib/common/domain-name.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/lib/common/domain-name.ts @@ -10,22 +10,18 @@ import { CfnDomainName, CfnDomainNameProps } from '../apigatewayv2.generated'; export interface IDomainName extends IResource { /** * The custom domain name - * * @attribute - * */ - readonly domainName: string; + readonly name: string; /** * The domain name associated with the regional endpoint for this custom domain name. - * * @attribute */ readonly regionalDomainName: string; /** * The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint. - * * @attribute */ readonly regionalHostedZoneId: string; @@ -38,7 +34,7 @@ export interface DomainNameAttributes { /** * domain name string */ - readonly domainName: string; + readonly name: string; /** * The domain name associated with the regional endpoint for this custom domain name. @@ -70,32 +66,19 @@ export interface DomainNameProps { */ export class DomainName extends Resource implements IDomainName { /** - * import from attributes + * Import from attributes */ public static fromDomainNameAttributes(scope: Construct, id: string, attrs: DomainNameAttributes): IDomainName { class Import extends Resource implements IDomainName { public readonly regionalDomainName = attrs.regionalDomainName; public readonly regionalHostedZoneId = attrs.regionalHostedZoneId; - public readonly domainName = attrs.domainName; + public readonly name = attrs.name; } return new Import(scope, id); } - /** - * The custom domain name for your API in Amazon API Gateway. - * - * @attribute - */ - public readonly domainName: string; - - /** - * The domain name associated with the regional endpoint for this custom domain name. - */ + public readonly name: string; public readonly regionalDomainName: string; - - /** - * The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint. - */ public readonly regionalHostedZoneId: string; constructor(scope: Construct, id: string, props: DomainNameProps) { @@ -111,7 +94,7 @@ export class DomainName extends Resource implements IDomainName { ], }; const resource = new CfnDomainName(this, 'Resource', domainNameProps); - this.domainName = props.domainName ?? resource.ref; + this.name = props.domainName ?? resource.ref; this.regionalDomainName = Token.asString(resource.getAtt('RegionalDomainName')); this.regionalHostedZoneId = Token.asString(resource.getAtt('RegionalHostedZoneId')); } diff --git a/packages/@aws-cdk/aws-apigatewayv2/lib/http/api-mapping.ts b/packages/@aws-cdk/aws-apigatewayv2/lib/http/api-mapping.ts index 98410038708d3..ee9323240833d 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/lib/http/api-mapping.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/lib/http/api-mapping.ts @@ -85,7 +85,7 @@ export class HttpApiMapping extends Resource implements IApiMapping { const apiMappingProps: CfnApiMappingProps = { apiId: props.api.httpApiId, - domainName: props.domainName.domainName, + domainName: props.domainName.name, stage: props.stage?.stageName ?? props.api.defaultStage!.stageName, apiMappingKey: props.apiMappingKey, }; diff --git a/packages/@aws-cdk/aws-apigatewayv2/package.json b/packages/@aws-cdk/aws-apigatewayv2/package.json index c701baf1a8023..b00184f1a7d83 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/package.json +++ b/packages/@aws-cdk/aws-apigatewayv2/package.json @@ -6,6 +6,10 @@ "types": "lib/index.d.ts", "jsii": { "outdir": "dist", + "diagnostics": { + "language-compatibility/member-name-conflicts-with-type-name": "error", + "language-compatibility/reserved-word": "error" + }, "targets": { "dotnet": { "namespace": "Amazon.CDK.AWS.APIGatewayv2", diff --git a/packages/@aws-cdk/aws-apigatewayv2/test/http/domain-name.test.ts b/packages/@aws-cdk/aws-apigatewayv2/test/http/domain-name.test.ts index 8624158e8787b..f0a355c42f746 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/test/http/domain-name.test.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/test/http/domain-name.test.ts @@ -41,13 +41,13 @@ describe('DomainName', () => { // WHEN const imported = DomainName.fromDomainNameAttributes(stack, 'dn', { - domainName: dn.domainName, + name: dn.name, regionalDomainName: dn.regionalDomainName, regionalHostedZoneId: dn.regionalHostedZoneId, }); // THEN; - expect(imported.domainName).toEqual(dn.domainName); + expect(imported.name).toEqual(dn.name); expect(imported.regionalDomainName).toEqual(dn.regionalDomainName); expect(imported.regionalHostedZoneId).toEqual(dn.regionalHostedZoneId); }); From b9d28ed591c92bb1dd150a1c3f89c6508a64816d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Riel?= Date: Thu, 10 Dec 2020 12:16:57 -0500 Subject: [PATCH 309/314] docs(apigateway): Typo fix in comments (#11938) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This one should be easy 😄 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-apigateway/lib/resource.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-apigateway/lib/resource.ts b/packages/@aws-cdk/aws-apigateway/lib/resource.ts index 1d2c889a8e427..04d9598303ad8 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/resource.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/resource.ts @@ -37,7 +37,7 @@ export interface IResource extends IResourceBase { readonly resourceId: string; /** - * The full path of this resuorce. + * The full path of this resource. */ readonly path: string; From ef143257844180e77deb11706e8ecf6dc33d7d8e Mon Sep 17 00:00:00 2001 From: Shiv Lakshminarayan Date: Thu, 10 Dec 2020 10:17:55 -0800 Subject: [PATCH 310/314] chore(cxapi): use enums in tests instead of strings to match type (#11993) These fail with the bump of @types/jest in #11948 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/cx-api/test/cloud-assembly-builder.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/@aws-cdk/cx-api/test/cloud-assembly-builder.test.ts b/packages/@aws-cdk/cx-api/test/cloud-assembly-builder.test.ts index 13b81c572a126..acc063cb1afca 100644 --- a/packages/@aws-cdk/cx-api/test/cloud-assembly-builder.test.ts +++ b/packages/@aws-cdk/cx-api/test/cloud-assembly-builder.test.ts @@ -72,7 +72,7 @@ test('cloud assembly builder', () => { missing: [ { key: 'foo', - provider: 'vpc-provider', + provider: cxschema.ContextProvider.VPC_PROVIDER, props: { account: '1234', region: 'us-east-1', @@ -84,13 +84,13 @@ test('cloud assembly builder', () => { ], artifacts: { 'tree-artifact': { - type: 'cdk:tree', + type: cxschema.ArtifactType.CDK_TREE, properties: { file: 'foo.tree.json', }, }, 'my-first-artifact': { - type: 'aws:cloudformation:stack', + type: cxschema.ArtifactType.AWS_CLOUDFORMATION_STACK, environment: 'aws://1222344/us-east-1', dependencies: ['minimal-artifact'], metadata: { foo: [{ data: '123', type: 'foo', trace: [] }] }, @@ -103,7 +103,7 @@ test('cloud assembly builder', () => { }, }, 'minimal-artifact': { - type: 'aws:cloudformation:stack', + type: cxschema.ArtifactType.AWS_CLOUDFORMATION_STACK, environment: 'aws://111/helo-world', properties: { templateFile: 'foo.template.json' }, }, From faee6a83fdb1d17d79d93e5d63bd7a2d1893c571 Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Thu, 10 Dec 2020 19:01:26 +0000 Subject: [PATCH 311/314] chore: jest/recommended linter rules and fixes (#11990) I discovered a rogue focused (`test.only`) test that snuck past code review. Introducing the `eslint-plugin-jest` to `cdk-build-tools`, as this seems like the most common linter plugin that will detect this (and other common issues). I adopted the "recommended" set of settings, then toned down those that seemed like they'd be a huge effort to cleanup across the codebase, and cleaned up other tests that needed slight changes to pass. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-appsync/test/appsync-auth.test.ts | 4 +-- .../test/appsync-code-first.test.ts | 8 ++--- .../aws-dynamodb/test/dynamodb.test.ts | 2 +- .../aws-efs/test/access-point.test.ts | 12 +++---- .../test/alb/load-balancer.test.ts | 7 +++-- .../aws-cdk/test/api/sdk-provider.test.ts | 14 ++++----- packages/aws-cdk/test/diff.test.ts | 15 +++------ packages/cdk-assets/test/archive.test.ts | 4 +-- tools/cdk-build-tools/config/eslintrc.js | 9 ++++++ tools/cdk-build-tools/package.json | 1 + tools/cfn2ts/test/gen.test.ts | 31 ------------------- 11 files changed, 39 insertions(+), 68 deletions(-) delete mode 100644 tools/cfn2ts/test/gen.test.ts diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-auth.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-auth.test.ts index fbac8fcd07350..d1ca8a57ec5a0 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-auth.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-auth.test.ts @@ -405,7 +405,7 @@ describe('AppSync User Pool Authorization', () => { }); }); - test('User Pool property defaultAction does not configure when in additional auth', () => { + test('User Pool property defaultAction does not configure when in additional auth (complex)', () => { // WHEN new appsync.GraphqlApi(stack, 'api', { name: 'api', @@ -629,4 +629,4 @@ describe('AppSync OIDC Authorization', () => { ], }); }); -}); \ No newline at end of file +}); diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-code-first.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-code-first.test.ts index 6b82de88ad7c8..f23b63ef1e301 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-code-first.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-code-first.test.ts @@ -80,7 +80,7 @@ describe('code-first implementation through GraphQL Api functions`', () => { }); }); - test('addField dynamically adds field to schema', () => { + test('addField dynamically adds field to schema for ObjectType', () => { // WHEN const test = api.addType(new appsync.ObjectType('Test', { definition: { @@ -121,7 +121,7 @@ describe('code-first implementation through GraphQL Api functions`', () => { }); }); - test('addField dynamically adds field to schema', () => { + test('addField dynamically adds field to schema for InterfaceType', () => { // WHEN const test = api.addType(new appsync.InterfaceType('Test', { definition: { @@ -228,7 +228,7 @@ describe('code-first implementation through Schema functions`', () => { }); }); - test('addField dynamically adds field to schema', () => { + test('schema.addField dynamically adds field to schema for ObjectType', () => { // WHEN const test = schema.addType(new appsync.ObjectType('Test', { definition: { @@ -277,7 +277,7 @@ describe('code-first implementation through Schema functions`', () => { }); }); - test('addField dynamically adds field to schema', () => { + test('schema addField dynamically adds field to schema for InterfaceType', () => { // WHEN const test = schema.addType(new appsync.InterfaceType('Test', { definition: { diff --git a/packages/@aws-cdk/aws-dynamodb/test/dynamodb.test.ts b/packages/@aws-cdk/aws-dynamodb/test/dynamodb.test.ts index 3a4dad70f1463..550a47f81ec1d 100644 --- a/packages/@aws-cdk/aws-dynamodb/test/dynamodb.test.ts +++ b/packages/@aws-cdk/aws-dynamodb/test/dynamodb.test.ts @@ -1817,7 +1817,7 @@ describe('grants', () => { }); }); - test('"grant" allows adding arbitrary actions associated with this table resource', () => { + test('"grant" allows adding arbitrary actions associated with this table resource (via testGrant)', () => { testGrant( ['action1', 'action2'], (p, t) => t.grant(p, 'dynamodb:action1', 'dynamodb:action2')); }); diff --git a/packages/@aws-cdk/aws-efs/test/access-point.test.ts b/packages/@aws-cdk/aws-efs/test/access-point.test.ts index 29770d2077d2f..24115574eb704 100644 --- a/packages/@aws-cdk/aws-efs/test/access-point.test.ts +++ b/packages/@aws-cdk/aws-efs/test/access-point.test.ts @@ -1,4 +1,4 @@ -import { expect as expectCDK, haveResource } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import * as ec2 from '@aws-cdk/aws-ec2'; import { Stack } from '@aws-cdk/core'; import { AccessPoint, FileSystem } from '../lib'; @@ -19,7 +19,7 @@ test('addAccessPoint correctly', () => { // WHEN fileSystem.addAccessPoint('MyAccessPoint'); // THEN - expectCDK(stack).to(haveResource('AWS::EFS::AccessPoint')); + expect(stack).toHaveResource('AWS::EFS::AccessPoint'); }); test('new AccessPoint correctly', () => { @@ -28,7 +28,7 @@ test('new AccessPoint correctly', () => { fileSystem, }); // THEN - expectCDK(stack).to(haveResource('AWS::EFS::AccessPoint')); + expect(stack).toHaveResource('AWS::EFS::AccessPoint'); }); test('import an AccessPoint using fromAccessPointId', () => { @@ -41,7 +41,7 @@ test('import an AccessPoint using fromAccessPointId', () => { expect(imported.accessPointId).toEqual(ap.accessPointId); }); -test('import an AccessPoint using fromAccessPointId', () => { +test('import an AccessPoint using fromAccessPointId throws when accessing fileSystem', () => { // WHEN const ap = new AccessPoint(stack, 'MyAccessPoint', { fileSystem, @@ -143,7 +143,7 @@ test('custom access point is created correctly', () => { }); // THEN - expectCDK(stack).to(haveResource('AWS::EFS::AccessPoint', { + expect(stack).toHaveResource('AWS::EFS::AccessPoint', { FileSystemId: { Ref: 'EfsFileSystem37910666', }, @@ -163,5 +163,5 @@ test('custom access point is created correctly', () => { }, Path: '/export/share', }, - })); + }); }); diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/load-balancer.test.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/load-balancer.test.ts index e2745a2fb02aa..38b328ec153a4 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/load-balancer.test.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/load-balancer.test.ts @@ -315,7 +315,7 @@ describe('tests', () => { expect(() => listener.addTargets('Targets', { port: 8080 })).not.toThrow(); }); - test.only('can add secondary security groups', () => { + test('can add secondary security groups', () => { const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -355,11 +355,11 @@ describe('tests', () => { // THEN expect(stack).not.toHaveResource('AWS::ElasticLoadBalancingV2::ApplicationLoadBalancer'); - expect(loadBalancer.loadBalancerArn).toEqual('arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188'); + expect(loadBalancer.loadBalancerArn).toEqual('arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/application/my-load-balancer/50dc6c495c0c9188'); expect(loadBalancer.loadBalancerCanonicalHostedZoneId).toEqual('Z3DZXE0EXAMPLE'); expect(loadBalancer.loadBalancerDnsName).toEqual('my-load-balancer-1234567890.us-west-2.elb.amazonaws.com'); expect(loadBalancer.ipAddressType).toEqual(elbv2.IpAddressType.DUAL_STACK); - expect(loadBalancer.connections.securityGroups[0].securityGroupId).toEqual('sg-1234'); + expect(loadBalancer.connections.securityGroups[0].securityGroupId).toEqual('sg-12345'); }); test('Can add listeners to a looked-up ApplicationLoadBalancer', () => { @@ -381,6 +381,7 @@ describe('tests', () => { // WHEN loadBalancer.addListener('listener', { protocol: elbv2.ApplicationProtocol.HTTP, + defaultAction: elbv2.ListenerAction.fixedResponse(200), }); // THEN diff --git a/packages/aws-cdk/test/api/sdk-provider.test.ts b/packages/aws-cdk/test/api/sdk-provider.test.ts index 77ff8778d24b0..0b9057b5eab1b 100644 --- a/packages/aws-cdk/test/api/sdk-provider.test.ts +++ b/packages/aws-cdk/test/api/sdk-provider.test.ts @@ -201,14 +201,12 @@ describe('with default config files', () => { const promptlyMockCalls = (promptly.prompt as jest.Mock).mock.calls.length; // THEN - try { - await provider.withAssumedRole('arn:aws:iam::account:role/role', undefined, undefined, Mode.ForReading); - fail('Should error as no credentials could be loaded'); - } catch (e) { - // Mock response was set to fail to make sure we don't call STS - // Make sure the MFA mock was called during this test - expect((promptly.prompt as jest.Mock).mock.calls.length).toBe(promptlyMockCalls + 1); - } + await expect(() => provider.withAssumedRole('arn:aws:iam::account:role/role', undefined, undefined, Mode.ForReading)) + .rejects + .toThrowError(); + // Mock response was set to fail to make sure we don't call STS + // Make sure the MFA mock was called during this test + expect((promptly.prompt as jest.Mock).mock.calls.length).toBe(promptlyMockCalls + 1); }); test('different account throws', async () => { diff --git a/packages/aws-cdk/test/diff.test.ts b/packages/aws-cdk/test/diff.test.ts index b5bd12ac0472f..c1bcd11c78caa 100644 --- a/packages/aws-cdk/test/diff.test.ts +++ b/packages/aws-cdk/test/diff.test.ts @@ -115,17 +115,10 @@ test('throws an error during diffs on stack with error metadata', async () => { const buffer = new StringWritable(); // WHEN - try { - const exitCode = await toolkit.diff({ - stackNames: ['C'], - stream: buffer, - }); - - // THEN - expect(exitCode).toBe(1); - } catch (e) { - expect(e.toString()).toContain('Found errors'); - } + await expect(() => toolkit.diff({ + stackNames: ['C'], + stream: buffer, + })).rejects.toThrow(/Found errors/); }); class StringWritable extends Writable { diff --git a/packages/cdk-assets/test/archive.test.ts b/packages/cdk-assets/test/archive.test.ts index 3a4cf5d0eda60..afa8b87175b42 100644 --- a/packages/cdk-assets/test/archive.test.ts +++ b/packages/cdk-assets/test/archive.test.ts @@ -71,6 +71,6 @@ test('zipDirectory follows symlinks', async () => { } }); -export function contentHash(data: string | Buffer | DataView) { +function contentHash(data: string | Buffer | DataView) { return crypto.createHash('sha256').update(data).digest('hex'); -} \ No newline at end of file +} diff --git a/tools/cdk-build-tools/config/eslintrc.js b/tools/cdk-build-tools/config/eslintrc.js index 26a357f4e6f25..a047a30a99800 100644 --- a/tools/cdk-build-tools/config/eslintrc.js +++ b/tools/cdk-build-tools/config/eslintrc.js @@ -16,6 +16,7 @@ module.exports = { '@typescript-eslint', 'import', 'cdk', + 'jest', ], parser: '@typescript-eslint/parser', parserOptions: { @@ -25,6 +26,7 @@ module.exports = { }, extends: [ 'plugin:import/typescript', + 'plugin:jest/recommended', ], settings: { 'import/parsers': { @@ -193,5 +195,12 @@ module.exports = { 'method', ], }], + + // Overrides for plugin:jest/recommended + "jest/no-conditional-expect": "off", + "jest/no-done-callback": "off", // Far too many of these in the codebase. + "jest/no-standalone-expect": "off", // nodeunitShim confuses this check. + "jest/valid-expect": "off", // expect from '@aws-cdk/assert' can take a second argument + "jest/valid-title": "off", // A little over-zealous with test('test foo') being an error. }, }; diff --git a/tools/cdk-build-tools/package.json b/tools/cdk-build-tools/package.json index e5b2b0c5f8479..b0d135ec35391 100644 --- a/tools/cdk-build-tools/package.json +++ b/tools/cdk-build-tools/package.json @@ -48,6 +48,7 @@ "eslint-import-resolver-typescript": "^2.3.0", "eslint-plugin-cdk": "0.0.0", "eslint-plugin-import": "^2.22.1", + "eslint-plugin-jest": "^24.1.3", "fs-extra": "^9.0.1", "jest": "^26.6.3", "jsii": "^1.15.0", diff --git a/tools/cfn2ts/test/gen.test.ts b/tools/cfn2ts/test/gen.test.ts deleted file mode 100644 index c6b11768459e9..0000000000000 --- a/tools/cfn2ts/test/gen.test.ts +++ /dev/null @@ -1,31 +0,0 @@ -// import generate from '../lib' -// import { TargetLibrary } from '../lib/codegen' -// import * as fs from 'fs' -// import * as path from 'path' - -// export const cfnobjects = codeGenTest(TargetLibrary.CfnObjects, 'expected.cfnobjects.output'); -// export const cdk = codeGenTest(TargetLibrary.CDK, 'expected.cdk.output', path.join(__dirname, 'enrichments')); - -test('test me', () => expect(true).toBe(true)); - -// function codeGenTest(target: TargetLibrary, expectedFileName: string, enrichmentsDir?: string) { -// return async function(test: Test) { -// let outdir = fs.mkdtempSync('/tmp/cfngen'); -// let outfile = path.join(outdir, 'out.ts'); - -// try { -// await generate(outfile, target, enrichmentsDir); -// } -// catch (e) { -// console.log(e); -// throw e; -// } - -// let expectedPath = path.join(__dirname, expectedFileName); -// let expected = fs.readFileSync(expectedPath); -// let actual = fs.readFileSync(outfile); - -// test.deepEqual(actual, expected, `Expected: ${expectedPath}, actual: ${outfile}`); -// test.done(); -// } -// } From 1ba8b4b583d423dd2c07ae727d895cefb5d536d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 10 Dec 2020 19:33:27 +0000 Subject: [PATCH 312/314] chore(deps): bump ini from 1.3.5 to 1.3.7 (#11999) Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 57 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index d838b8d976915..769da3dd542e8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1799,6 +1799,18 @@ eslint-scope "^5.0.0" eslint-utils "^2.0.0" +"@typescript-eslint/experimental-utils@^4.0.1": + version "4.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.9.1.tgz#86633e8395191d65786a808dc3df030a55267ae2" + integrity sha512-c3k/xJqk0exLFs+cWSJxIjqLYwdHCuLWhnpnikmPQD2+NGAx9KjLYlBDcSI81EArh9FDYSL6dslAUSwILeWOxg== + dependencies: + "@types/json-schema" "^7.0.3" + "@typescript-eslint/scope-manager" "4.9.1" + "@typescript-eslint/types" "4.9.1" + "@typescript-eslint/typescript-estree" "4.9.1" + eslint-scope "^5.0.0" + eslint-utils "^2.0.0" + "@typescript-eslint/parser@^4.7.0": version "4.7.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.7.0.tgz#44bdab0f788b478178368baa65d3365fdc63da1c" @@ -1825,6 +1837,14 @@ "@typescript-eslint/types" "4.9.0" "@typescript-eslint/visitor-keys" "4.9.0" +"@typescript-eslint/scope-manager@4.9.1": + version "4.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.9.1.tgz#cc2fde310b3f3deafe8436a924e784eaab265103" + integrity sha512-sa4L9yUfD/1sg9Kl8OxPxvpUcqxKXRjBeZxBuZSSV1v13hjfEJkn84n0An2hN8oLQ1PmEl2uA6FkI07idXeFgQ== + dependencies: + "@typescript-eslint/types" "4.9.1" + "@typescript-eslint/visitor-keys" "4.9.1" + "@typescript-eslint/types@4.7.0": version "4.7.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.7.0.tgz#5e95ef5c740f43d942542b35811f87b62fccca69" @@ -1835,6 +1855,11 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.9.0.tgz#3fe8c3632abd07095c7458f7451bd14c85d0033c" integrity sha512-luzLKmowfiM/IoJL/rus1K9iZpSJK6GlOS/1ezKplb7MkORt2dDcfi8g9B0bsF6JoRGhqn0D3Va55b+vredFHA== +"@typescript-eslint/types@4.9.1": + version "4.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.9.1.tgz#a1a7dd80e4e5ac2c593bc458d75dd1edaf77faa2" + integrity sha512-fjkT+tXR13ks6Le7JiEdagnwEFc49IkOyys7ueWQ4O8k4quKPwPJudrwlVOJCUQhXo45PrfIvIarcrEjFTNwUA== + "@typescript-eslint/typescript-estree@4.7.0": version "4.7.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.7.0.tgz#539531167f05ba20eb0b6785567076679e29d393" @@ -1863,6 +1888,20 @@ semver "^7.3.2" tsutils "^3.17.1" +"@typescript-eslint/typescript-estree@4.9.1": + version "4.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.9.1.tgz#6e5b86ff5a5f66809e1f347469fadeec69ac50bf" + integrity sha512-bzP8vqwX6Vgmvs81bPtCkLtM/Skh36NE6unu6tsDeU/ZFoYthlTXbBmpIrvosgiDKlWTfb2ZpPELHH89aQjeQw== + dependencies: + "@typescript-eslint/types" "4.9.1" + "@typescript-eslint/visitor-keys" "4.9.1" + debug "^4.1.1" + globby "^11.0.1" + is-glob "^4.0.1" + lodash "^4.17.15" + semver "^7.3.2" + tsutils "^3.17.1" + "@typescript-eslint/visitor-keys@4.7.0": version "4.7.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.7.0.tgz#6783824f22acfc49e754970ed21b88ac03b80e6f" @@ -1879,6 +1918,14 @@ "@typescript-eslint/types" "4.9.0" eslint-visitor-keys "^2.0.0" +"@typescript-eslint/visitor-keys@4.9.1": + version "4.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.9.1.tgz#d76374a58c4ead9e92b454d186fea63487b25ae1" + integrity sha512-9gspzc6UqLQHd7lXQS7oWs+hrYggspv/rk6zzEMhCbYwPE/sF7oxo7GAjkS35Tdlt7wguIG+ViWCPtVZHz/ybQ== + dependencies: + "@typescript-eslint/types" "4.9.1" + eslint-visitor-keys "^2.0.0" + "@yarnpkg/lockfile@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" @@ -4006,6 +4053,13 @@ eslint-plugin-import@^2.22.1: resolve "^1.17.0" tsconfig-paths "^3.9.0" +eslint-plugin-jest@^24.1.3: + version "24.1.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.1.3.tgz#fa3db864f06c5623ff43485ca6c0e8fc5fe8ba0c" + integrity sha512-dNGGjzuEzCE3d5EPZQ/QGtmlMotqnYWD/QpCZ1UuZlrMAdhG5rldh0N0haCvhGnUkSeuORS5VNROwF9Hrgn3Lg== + dependencies: + "@typescript-eslint/experimental-utils" "^4.0.1" + eslint-plugin-rulesdir@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/eslint-plugin-rulesdir/-/eslint-plugin-rulesdir-0.1.0.tgz#ad144d7e98464fda82963eff3fab331aecb2bf08" @@ -5204,9 +5258,9 @@ inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, i integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== ini@^1.3.2, ini@^1.3.4, ini@~1.3.0: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + version "1.3.7" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.7.tgz#a09363e1911972ea16d7a8851005d84cf09a9a84" + integrity sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ== init-package-json@^1.10.3: version "1.10.3" From 9da67a863f6bfc1c159f0f19e615df35a9898ca6 Mon Sep 17 00:00:00 2001 From: jkenn99 Date: Thu, 10 Dec 2020 19:45:37 +0000 Subject: [PATCH 313/314] Add requested tests for Fargate taskdef --- .../aws-ecs/test/test.container-definition.ts | 293 ++++++++++++------ 1 file changed, 200 insertions(+), 93 deletions(-) diff --git a/packages/@aws-cdk/aws-ecs/test/test.container-definition.ts b/packages/@aws-cdk/aws-ecs/test/test.container-definition.ts index 054380f82aec0..e994a9174f51d 100644 --- a/packages/@aws-cdk/aws-ecs/test/test.container-definition.ts +++ b/packages/@aws-cdk/aws-ecs/test/test.container-definition.ts @@ -703,108 +703,215 @@ export = { }, 'Environment Files': { - 'can add asset environment file to the container definition'(test: Test) { - // GIVEN - const stack = new cdk.Stack(); - const taskDefinition = new ecs.Ec2TaskDefinition(stack, 'TaskDef'); + 'with EC2 task definitions': { + 'can add asset environment file to the container definition'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const taskDefinition = new ecs.Ec2TaskDefinition(stack, 'TaskDef'); - // WHEN - taskDefinition.addContainer('cont', { - image: ecs.ContainerImage.fromRegistry('test'), - memoryLimitMiB: 1024, - environmentFiles: [ecs.EnvironmentFile.fromAsset(path.join(__dirname, 'demo-envfiles/test-envfile.env'))], - }); + // WHEN + taskDefinition.addContainer('cont', { + image: ecs.ContainerImage.fromRegistry('test'), + memoryLimitMiB: 1024, + environmentFiles: [ecs.EnvironmentFile.fromAsset(path.join(__dirname, 'demo-envfiles/test-envfile.env'))], + }); - // THEN - expect(stack).to(haveResourceLike('AWS::ECS::TaskDefinition', { - ContainerDefinitions: [ - { - EnvironmentFiles: [{ - Type: 's3', - Value: { - 'Fn::Join': [ - '', - [ - 'arn:aws:s3:::', - { - Ref: 'AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3Bucket7B2069B7', - }, - '/', - { - 'Fn::Select': [ - 0, - { - 'Fn::Split': [ - '||', - { - Ref: 'AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3VersionKey40E12C15', - }, - ], - }, - ], - }, - { - 'Fn::Select': [ - 1, - { - 'Fn::Split': [ - '||', - { - Ref: 'AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3VersionKey40E12C15', - }, - ], - }, - ], - }, + // THEN + expect(stack).to(haveResourceLike('AWS::ECS::TaskDefinition', { + ContainerDefinitions: [ + { + EnvironmentFiles: [{ + Type: 's3', + Value: { + 'Fn::Join': [ + '', + [ + 'arn:aws:s3:::', + { + Ref: 'AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3Bucket7B2069B7', + }, + '/', + { + 'Fn::Select': [ + 0, + { + 'Fn::Split': [ + '||', + { + Ref: 'AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3VersionKey40E12C15', + }, + ], + }, + ], + }, + { + 'Fn::Select': [ + 1, + { + 'Fn::Split': [ + '||', + { + Ref: 'AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3VersionKey40E12C15', + }, + ], + }, + ], + }, + ], ], - ], - }, - }], - }, - ], - })); + }, + }], + }, + ], + })); - test.done(); + test.done(); + }, + 'can add s3 bucket environment file to the container definition'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const bucket = new s3.Bucket(stack, 'Bucket', { + bucketName: 'test-bucket', + }); + const taskDefinition = new ecs.Ec2TaskDefinition(stack, 'TaskDef'); + + // WHEN + taskDefinition.addContainer('cont', { + image: ecs.ContainerImage.fromRegistry('test'), + memoryLimitMiB: 1024, + environmentFiles: [ecs.EnvironmentFile.fromBucket(bucket, 'test-key')], + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::ECS::TaskDefinition', { + ContainerDefinitions: [ + { + EnvironmentFiles: [{ + Type: 's3', + Value: { + 'Fn::Join': [ + '', + [ + 'arn:aws:s3:::', + { + Ref: 'Bucket83908E77', + }, + '/test-key', + ], + ], + }, + }], + }, + ], + })); + + test.done(); + }, }, - 'can add s3 bucket environment file to the container definition'(test: Test) { - // GIVEN - const stack = new cdk.Stack(); - const bucket = new s3.Bucket(stack, 'Bucket', { - bucketName: 'test-bucket', - }); - const taskDefinition = new ecs.Ec2TaskDefinition(stack, 'TaskDef'); + 'with Fargate task definitions': { + 'can add asset environment file to the container definition'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const taskDefinition = new ecs.FargateTaskDefinition(stack, 'TaskDef'); - // WHEN - taskDefinition.addContainer('cont', { - image: ecs.ContainerImage.fromRegistry('test'), - memoryLimitMiB: 1024, - environmentFiles: [ecs.EnvironmentFile.fromBucket(bucket, 'test-key')], - }); + // WHEN + taskDefinition.addContainer('cont', { + image: ecs.ContainerImage.fromRegistry('test'), + memoryLimitMiB: 1024, + environmentFiles: [ecs.EnvironmentFile.fromAsset(path.join(__dirname, 'demo-envfiles/test-envfile.env'))], + }); - // THEN - expect(stack).to(haveResourceLike('AWS::ECS::TaskDefinition', { - ContainerDefinitions: [ - { - EnvironmentFiles: [{ - Type: 's3', - Value: { - 'Fn::Join': [ - '', - [ - 'arn:aws:s3:::', - { - Ref: 'Bucket83908E77', - }, - '/test-key', + // THEN + expect(stack).to(haveResourceLike('AWS::ECS::TaskDefinition', { + ContainerDefinitions: [ + { + EnvironmentFiles: [{ + Type: 's3', + Value: { + 'Fn::Join': [ + '', + [ + 'arn:aws:s3:::', + { + Ref: 'AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3Bucket7B2069B7', + }, + '/', + { + 'Fn::Select': [ + 0, + { + 'Fn::Split': [ + '||', + { + Ref: 'AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3VersionKey40E12C15', + }, + ], + }, + ], + }, + { + 'Fn::Select': [ + 1, + { + 'Fn::Split': [ + '||', + { + Ref: 'AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3VersionKey40E12C15', + }, + ], + }, + ], + }, + ], ], - ], - }, - }], - }, - ], - })); + }, + }], + }, + ], + })); - test.done(); + test.done(); + }, + 'can add s3 bucket environment file to the container definition'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const bucket = new s3.Bucket(stack, 'Bucket', { + bucketName: 'test-bucket', + }); + const taskDefinition = new ecs.FargateTaskDefinition(stack, 'TaskDef'); + + // WHEN + taskDefinition.addContainer('cont', { + image: ecs.ContainerImage.fromRegistry('test'), + memoryLimitMiB: 1024, + environmentFiles: [ecs.EnvironmentFile.fromBucket(bucket, 'test-key')], + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::ECS::TaskDefinition', { + ContainerDefinitions: [ + { + EnvironmentFiles: [{ + Type: 's3', + Value: { + 'Fn::Join': [ + '', + [ + 'arn:aws:s3:::', + { + Ref: 'Bucket83908E77', + }, + '/test-key', + ], + ], + }, + }], + }, + ], + })); + + test.done(); + }, }, }, From 9cd76cdf4b062f736f4ad00ee04bc49ab63b44c5 Mon Sep 17 00:00:00 2001 From: Aaron Suggs Date: Thu, 10 Dec 2020 15:34:22 -0500 Subject: [PATCH 314/314] chore(dynamodb): add metricSystemErrorsForOperations to ITable (#11980) Adds `metricSystemErrorsForOperations` and `metricThrottledRequests` to the `ITable` interface. Previously they were just in the `Table` class. Thx @SomayaB and @skinny85 for highlighting the fix. Fixes #11541 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-dynamodb/lib/table.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/@aws-cdk/aws-dynamodb/lib/table.ts b/packages/@aws-cdk/aws-dynamodb/lib/table.ts index 4e8ebec509439..dfcae3146ad56 100644 --- a/packages/@aws-cdk/aws-dynamodb/lib/table.ts +++ b/packages/@aws-cdk/aws-dynamodb/lib/table.ts @@ -439,6 +439,14 @@ export interface ITable extends IResource { */ metricSystemErrors(props?: cloudwatch.MetricOptions): cloudwatch.Metric; + /** + * Metric for the system errors this table + * + * @param props properties of a metric + * + */ + metricSystemErrorsForOperations(props?: SystemErrorsForOperationsMetricOptions): cloudwatch.IMetric; + /** * Metric for the user errors * @@ -453,6 +461,14 @@ export interface ITable extends IResource { */ metricConditionalCheckFailedRequests(props?: cloudwatch.MetricOptions): cloudwatch.Metric; + /** + * Metric for throttled requests + * + * @param props properties of a metric + * + */ + metricThrottledRequests(props?: cloudwatch.MetricOptions): cloudwatch.Metric; + /** * Metric for the successful request latency *